Repository navigation
fix(server): a Grok deny shown cut counts as shown, not hidden - #237
Conversation
Grok shows a hook's deny reason up to 256 characters and marks the cut with '… [+N chars]'. The evidence check looked only for the whole rule, so every such deny was 'hidden': never counted toward the cap and not deduped. A deny whose shown text is the rule's start up to the cut mark is now 'truncated': it counts toward the cap, and an inline rule stays armed. Closes #228 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Baseline: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
|
What: Independent review PASS at efb064c. VERDICT: PASS No blocking findings. A projected Grok deny prefix followed by the cut marker is adjudicated shown with whole=0, logged truncated, and counted toward the cap without lifting its inline rule. The projection consumer recursively extracts text from finished structured dynamic-tool outputs, excluding input. Proof:
Full-read tightening is a separate slice in #226, not included or regressed here. Reviewed the complete diff, linked Issue and prior PR/Issue review comments, and affected selection, harness, state and transport consumers. All eight heads matched the brief. Tests used exact-head git archives in temporary directories and existing dependencies. Baseline runs held the head tests constant and restored changed production files from the stated merge base. Chromeria command: vp test run --config review.config.ts, with include=['src/contextmd/*.test.ts'], node environment and serial files. Passing state/route tests retain the cap of 3, failed/pending reads, session/epoch isolation, dropped/concurrent deliveries, fail-open guards and after-action suppression, including Grok carries. No checkout, reset, pull or source edits in any checkout. No private data or credentials found in the diff. Proof is synthetic hook/production-code execution, not a fresh live model session or deployment. Reviewer: Codex gpt-6.1-sol, independent review, requested high effort. |
|
What: PASS at Head matches the brief. Base is
The mark matches a live Grok deny observed this session ( CI on this head: Lint, Test, Test Server 1-6, and Check succeeded. I did not re-run the server suite locally. No private data in the diff. |
|
Merged by the planner: review/independent-sol and review/independent-grok both success on efb064c, checks green. |
Grok shows a hook's deny reason up to 256 characters and marks the cut with '… [+N chars]'. The evidence check looked only for the whole rule, so every such deny was 'hidden': never counted toward the cap and not deduped. A deny whose shown text is the rule's start up to the cut mark is now 'truncated': it counts toward the cap, and an inline rule stays armed. Closes #228 Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
What changed: a ContextMD deny that Grok showed cut (the rule's start, then
… [+N chars]) is now loggedtruncated: it counts toward the deny cap, and an inline rule stays armed because it was not seen whole.Why: Grok shows a hook's deny reason only up to 256 characters; the evidence check required the whole rule in the projected output, so those denies were logged
hidden, never counted toward the cap and kept denying (chromeria#228; live sample: threadmcp:843cf768, 256 characters shown, then… [+54 chars]).So what: the planner runs the Sol and Grok reviews; chromeria#229 then makes Grok denies fit, so the target path is never the part cut.
Closes #228
Change
ServingState.applyChecks: when the whole probe is not in the projected output,shownCutchecks for Grok's cut mark and that the text before it holds the probe's opening (its first 40 characters) followed only by more of the probe. Such a deny is adjudicatedshownwithwhole = 0, outcometruncated, anddenyShowncounts it; the inline lift needswhole = 1, so it does not lift. Anything else stayshiddenas before.Upstream: fork-only module, no upstream counterpart. Independent of #226 (different function); whichever merges second rebases.
Proof (head
efb064cc89)hidden; nowtruncated, the inline rule stays denied, and the cap releases the fourth call.vp test run src/contextmd/: 68 passed; lint, format andapps/servertypecheck clean.Elon record
… [+54 chars]) and the tests above.Work by Claude Opus 5.5 in Claude Code (Chromeria thread).
🤖 Generated with Claude Code