Repository navigation
fix: restore prompt cache observation check after tool changes - #186233
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 maintainer review before merge. What this changesThis PR updates the prompt-submission test to expect a positional tool descriptor instead of a raw tool name. Example: The third observed request changes the read tool description from Read text to Read workspace text after a request with zero cached tokens.
Review scores
ProductKind: Test only · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this PR open: it makes the smallest correct repair to a stale test expectation while preserving the intended diagnostic privacy contract; no actionable defects found. Priority: P3 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe embedded prompt runner passes foreground model-request context to the cache observer, which combines request fingerprints and usage into content-free cache diagnostics. flowchart LR
A[Foreground model request] --> B[Prompt submission runner]
B --> C[Cache request observer]
C --> D[Snapshot and tool comparison]
E[Model usage] --> C
D --> F[Bounded diagnostic]
F --> G[Integration assertion]
Technical reviewBest possible solution: Retain the one-line expectation repair and complete the existing exact-head CI gates. Do we have a high-confidence way to reproduce the issue? Source establishes the mismatch: fetched main expects the raw read name while the diagnostic owner produces tool[1]; no target tests were executed during this read-only review. Is this the best way to solve the issue? Yes: replacing the stale expected string preserves the exact contract assertion and avoids reverting the intentional privacy improvement. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 364c0d4ebcd4. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceTests 0. Total 0 across 1 file. Added test files: 0. View PR surface stats
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 October 27, 2026, 3:28 PM ET / 19:28 UTC. |
|
Fixed: the prompt-cache observation check now matches bounded positional tool diagnostics. |
Restores the prompt-cache observation check to the bounded positional tool diagnostic.
What Problem This Solves
Fixes a CI failure in the prompt-submission cache observation test when a tool description changes. Prompt-cache diagnostics now identify non-built-in tools by a bounded position, but this integration case still expected the retired raw tool name.
User Impact
There is no user-visible runtime change. The existing test once again checks the diagnostic contract that production already emits while preserving request counts, cache-read and cache-break semantics, compaction exclusion, canonical prefix observation, authority rechecks, and the privacy boundary that avoids exposing custom tool names.
Why This Change Was Made
The existing case matrix now expects the exact positional
tool[1]descriptor. It remains an exact assertion rather than accepting a loose substring. This recovery-hit case intentionally does not copy the sibling drop-onlyfacts:suffix: its immediately preceding request reported a zero cache read, so it consumes the start-of-request change detail without cache-drop fact enrichment.Evidence
"read"detail while production returned the boundedtool[1]form.33/33, the complete prompt-submit observation file passed2/2, and the exact-base test-line ratchet passed with 12 lines of slack.