Repository navigation
fix(test): assert tool-result fidelity at each output - #197771
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs changes before merge. What this changesThis PR records a plan to replace pooled tool-result checks with independent assertions for each output. Example: A tool result contains build output and the same synthetic credential value in metadata.
Review scores
ProductKind: Docs · Worth it: Yes · Fix scope: Partial Merge readiness⛔ Needs changes before merge - 1 item remains Keep this maintainer-authored draft open: its ledger accurately identifies an existing assertion gap, but the planned test repair is not implemented. No introduced defect was found in the documentation change. Priority: P3 Before merge
FindingsNone. Agent review detailsHow this fits togetherTool lifecycle results feed trajectory recording, delivery callbacks, terminal consumers, and session persistence; the audit ledger tracks planned improvements to their regression coverage. flowchart TD
A[Tool result] --> B[Tool lifecycle]
B --> C[Trajectory recorder]
B --> D[Delivery callback]
B --> E[Terminal consumer]
A --> F[Session persistence]
G[Reuse regression] --> B
G --> F
Technical reviewBest possible solution: Strengthen the existing lifecycle regression with independent expected payloads while preserving both completion routes and the distinct stored and display image contracts. Do we have a high-confidence way to reproduce the issue? Source inspection confirms that the assertions do not require complete text at each output; no mutation or test run was performed, and this establishes a coverage weakness rather than a production failure. Is this the best way to solve the issue? The recorded plan targets the existing regression without introducing another owner, helper, or test case; implementation correctness remains unassessed because no executable repair is included. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against e6ac4035b7ed. Provenance checked
TestingProof path: none. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceTests +11. Total +11 across 1 file. Added test files: 0. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed November 12, 2026, 9:37 AM ET / 14:37 UTC. |
|
Merged via squash.
|
* docs(test): record tool-result fidelity audit * fix(test): assert tool-result fidelity at each output
What Problem This Solves
The tool-result reuse test could pass after losing output text: it searched combined results and stored messages for a secret also present in metadata.
User Impact
The existing regression now detects lost text or metadata independently at trajectory capture, delivery callbacks, terminal output and guarded in-memory storage. Production behavior is unchanged.
Why This Change Was Made
Keep the nested and emitted completion routes in one case, preserve the different display/storage image contracts, await the session append, and remove the redundant direct sanitizer replay and unused mock-reset hook. Production/support delta: zero; test delta: +29 lines; physical and expanded case counts remain one. Maintainer test-audit context and retained proof are in
test/test-audit-ledger.md.Evidence
a41c7111235fdfcb5e4103edba0e5ff711d7e02c.node scripts/run-tsgo.mjs --noEmit -p test/tsconfig/tsconfig.core.test.agents-root.json, targeted typed lint, formatting and diff checks passed. The matching installed PR toolchain also passed commit hooks.a41c7111235fdfcb5e4103edba0e5ff711d7e02c..dbdea04a67b99b9541ea64fba03de9a10a3cfe3f: complete, no actionable findings. The later change only updates ledger evidence.The original routes to agents-core and the repaired case to unit-fast. Different worker-cache states and these single runs do not establish a speedup. Storage proof covers the explicit guarded in-memory append, not disk durability or automatic runner persistence.