Repository navigation
Conversation
When input sanitization blocks a request in run_shield_moderation_v2,
the ShieldModerationBlocked was using str(uuid.uuid4()) for moderation_id
instead of the established f'modr-{uuid4()}' convention.
LCORE uses the 'modr-' prefix to identify moderation-blocked responses
(see is_moderation_id() in suid.py). Existing capabilities
(QuestionValidity, PiiRedactionCapability) already follow this convention.
Without the prefix, callers cannot distinguish a shield block from a
regular response via the response ID.
Also adds an explicit assertion to the existing sanitization block test
to prevent regression.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
|
@asimurka, @tisnik - this fix to return the It didn't get to v0.7.2 via #3026 as the LCORE history handling fix in #3021 did, though. Could you backport it as well, please, so that we are able to move to 0.7.2 in our staging? CC: @r0x0d, @samdoran |
|
🤖 Finished Retro · ✅ Success · Started 4:08 PM UTC · Completed 4:20 PM UTC Commit: Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $3.63 |
Retro: PR #3058 — Fix sanitization moderation IDs (backport to release/0.7)This was a straightforward manual backport of PR #2862 (merged to Timeline
Agent workflowNo agent review ran. CodeRabbit skipped (disabled for non-default branches). The fullsend Review job was explicitly skipped. Only the retro agent ran post-merge. No dispatch repo ( Observations (all covered by existing issues)
ConclusionThe workflow went well — a simple, correct backport reviewed and approved by two domain experts. No new proposals filed; all identified observations are covered by existing open issues. |
Summary
Ensure the pre-shield input sanitization path returns moderation IDs with the established
modr-prefix.Without this prefix, clients cannot identify sanitization refusals as moderation blocks, and a refused turn cannot participate in history-poisoning remediation flows.
Changes
modr-.Validation
uv run pytest -q tests/unit/utils/test_shields.py(21 passed)