Repository navigation
claude protocol denial shape fix - #178
Merged
Merged
Conversation
…reconciliation check A permission_denials entry with no tool_use_id at all was falling into the same "no corresponding entry ... the host was never consulted" branch as a genuinely unexplained denial. The two are different problems: the first is a shape/parse issue (nothing to correlate against either set), the second is the actual sentinel-failure signal. Conflating them names a cause with no evidence behind it, and would make a future CLI release that drops tool_use_id fail every denial in every repo with an ordinary deny rule while pointing debugging at the wrong flag -- the same blast radius as the two-way check this rework replaced. Both branches still fail closed; only the message differs now. Added the missing-tool_use_id case to the classify_line parse test, plus a dedicated end-to-end test asserting the shape message appears and the "host was never consulted" claim does not.
…ol-frame fixture messaging_socket_path's port was already placeholder-scrubbed (/tmp/cc-socks/0.sock, consistent with session_id/uuid/cwd on the same line) -- no real socket path was ever committed, and the original scrub pass did not miss it. What remained was the directory itself, /tmp/cc-socks/, which is our own agent harness's cross-session socket location, not a value the capture produced. Incidental to what this fixture proves (the calibration call's own permissionMode/ permission_denials shape), worth removing so a later reader doesn't wonder whether our own tooling's socket layout mattered to that null result. Replaced with a neutral, self-documenting placeholder in the style already used for the other scrubbed fields on that line.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #177, found in review after that PR had already landed (783b141).
Behavior fix:
drive_turn's ledger-reconciliation check was treating apermission_denialsentry with notool_use_idthe same as a genuinely unexplained one, and reporting both with "the host was never consulted for it." The two are different problems -- a missingtool_use_idis a shape/parse issue (nothing to correlate against either the bridged-request set or the observed-notice set), not evidence the sentinel failed. Split into two branches; both still fail closed, only the message differs now. Test added asserting the new message's presence and the old claim's absence, so a regression that reintroduces the wrong wording under the right conditions gets caught.Fixture correction:
ask-rule-no-control-frame.jsonl'smessaging_socket_pathstill named/tmp/cc-socks/, this agent harness's own cross-session socket directory -- incidental to what the fixture proves, not a real leaked value (the port itself was already placeholder-scrubbed). Replaced with a neutral placeholder.This lands before the maintainer-observed proof run so a live, billed run never hits the mis-diagnosing message.
cargo fmt,cargo clippy --all-targets --all-features -- -D warnings,cargo test --workspace, andbun run checkall clean.