Repository navigation
test(system-agent): reuse CLI backend fixture - #118541
Conversation
|
Codex review: needs maintainer review before merge. Reviewed August 3, 2026, 2:31 AM ET / 06:31 UTC. ClawSweeper reviewWhat this changesThe PR extracts the existing selectable Claude CLI backend test double into a shared system-agent helper and reuses it in agent-turn and chat-engine tests, avoiding an unrelated generated plugin artifact. Merge readiness✅ Ready for maintainer review Keep this PR open: it is a focused, production-neutral test-suite performance cleanup with a coherent shared-fixture boundary and no concrete correctness or security finding. The protected Priority: P3 Review scores
Verification
How this fits togetherSystem-agent tests exercise configured model routing into the agent loop. The CLI backend resolver normally gets descriptors from plugin runtime metadata; these focused core tests instead inject a contract-level backend so they can verify routing, tool enforcement, and session continuity without loading the Anthropic plugin’s generated setup artifact. flowchart LR
A[System-agent chat test] --> B[Shared CLI backend fixture]
B --> C[CLI backend test seam]
C --> D[Configured backend resolver]
D --> E[Agent loop mocks]
E --> F[Routing and session assertions]
G[Anthropic plugin tests] --> H[Generated backend descriptor contract]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +30, Tests -9. Total +21 across 3 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Technical reviewBest possible solution: Land the shared contract-level fixture once the exact-head checks finish successfully, while retaining the Anthropic plugin suites as the owner of generated-descriptor and execution-argument contract coverage. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR optimizes test setup rather than correcting a user-facing failure. The performance claim has a concrete same-head benchmark in the PR body, but this read-only review did not execute tests. Is this the best way to solve the issue? Yes. Reusing the existing contract-level injection seam is the narrowest maintainable fix because it removes duplicate test setup without importing Anthropic plugin internals into core tests or changing production behavior. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against b65cc592cc07. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
Co-authored-by: Peter Steinberger <[email protected]>
What Problem This Solves
The system-agent chat suite spent most of one CLI-routing test loading the Anthropic plugin's generated setup artifact even though the test mocks CLI execution and owns only chat routing, tool restriction, and native-session continuity.
Why This Change Was Made
Move the existing contract-level selectable Claude CLI backend fixture into the shared system-agent test helper and reuse it from both agent-turn and chat tests. Anthropic plugin tests remain the owner of the real generated backend descriptor, normalization, and execution-argument contract.
User Impact
No user-visible behavior changes. The same assertions run with substantially less CPU, memory, and wall time; production code is unchanged.
Evidence