test(server): replay denied Claude writes through V2 - #10452
Open
CouchRiv wants to merge 1 commit into
Open
Conversation
Contributor
ApprovabilityVerdict: Would Approve Macroscope's review found this PR approvable — The PR adds a Claude denied-write replay fixture and supporting recorder behavior entirely within scripts and testkit code. It does not alter production request handling, product defaults, schemas, deployment, or static-analysis configuration. Not approved because:
Review your spending limits in Billing settings. You can add or adjust custom eligibility rules. Learn more. |
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.
What Changed
Add a recorded Claude Write denial to the V2 orchestrator replay suite, completing the
claude-v2/approvals-deniedfixture TODO in #2829. The scenario checks a declined file-change approval, a failed write item, and a completed turn with Claude's final response.Why
The recorded Claude fixtures contained allowed permission responses but no denied response. This capture uses workspace-write with on-request approval so Write is exposed and reaches the permission callback.
The recorder forwards the scenario's permission decision and uses the installed Claude executable, since this workspace excludes the SDK's bundled binaries. Replay accepts the partial stream messages the recorder already emits; output paths use the platform path service.
Captured with Claude Agent SDK 0.3.260, Claude Code 2.1.263 and
claude-sonnet-4-6. The target file was not created. Workspace paths and opaque thinking signatures are redacted.Validation: 32 focused replay/config tests and the denial and existing approval scenarios pass; one gated live-recording test is skipped. A separate protocol check completes for deny and fails at
permission.response:Writewhen allow is substituted. Server typecheck and targeted lint/format checks pass. Live capture exercised streaming mode.Windows replay validation included #10451's fixture-loading fix. That independent fix is not included in this diff.
Checklist
Implemented and verified with GPT-6 via Codex desktop.