Repository navigation
fix: align update-routing tests with system actor dispatch - #137199
Conversation
|
Codex review: needs maintainer review before merge. Reviewed September 3, 2026, 4:52 AM ET / 08:52 UTC. ClawSweeper reviewWhat this changesThis PR updates two update-routing tests to expect the system actor and producer-owned thread field already sent by in-process Gateway dispatch. Merge readiness✅ Ready for maintainer review Keep open. The two introduced assertions accurately match the existing in-process update dispatch contract; no correctness or security defect was found. Priority: P3 Review scores
Verification
How this fits togetherThe Gateway tool and the chat flowchart LR
A[Owner update request] --> B[Gateway tool or chat command]
B --> C[In-process Gateway helper]
C --> D[System actor and scoped client]
D --> E[Gateway update handler]
E --> F[Update result and reply]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceTests +2. Total +2 across 2 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep the direct system-actor and thread-field expectations so both update entry points continue to detect dispatch-contract drift. Do we have a high-confidence way to reproduce the issue? Yes—source inspection reproduces the deterministic expectation mismatch: current production dispatch adds the system actor while the current-main test expectations omit it. Is this the best way to solve the issue? Yes. Reusing the helper’s actual argument contract in both caller-level tests is the narrowest maintainable repair and adds no parallel behavior. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 32bb94ee8467. 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.
|
What Problem This Solves
CI's two update-routing suites reject valid in-process calls because their expected dispatch options omit the explicit system actor added by #136952. This fails four existing cases across the compact check shards.
Why This Change Was Made
Assert the existing
operatorRoleActor: { kind: "system" }option in both exact call expectations. Also express the expected trusted thread field directly, matching its producer. The undefined-valued thread key is not a separate defect: the installed matcher ignores such keys.The system actor is already supplied by the in-process call helper. The dispatcher still retains scoped/inherited operator authority instead of accepting an explicit system actor over it. No production code, authorization policy, mock breadth, call count, timeout or routing assertion changes.
User Impact
Required CI can verify the existing owner-only update flow again. Production LOC is unchanged; test LOC is +3/−1 (net +2). No runtime performance claim is made for this CI repair.
Evidence
All four failures reproduced before editing: one
/updatecase and three Gateway tool routing cases. Afterward, all 31 tests in the two changed suites passed. Another 34 real-dispatch authorization tests and 19 in-process helper tests passed, along with formatting and the complete changed-file gate. Independent managed Codex review found no actionable P0–P2 findings.The original Linux full-shard execution order was not replayed locally; the focused suites exercise the same deterministic argument mismatch. No real Gateway self-update was invoked for this test-only repair. Current archive and open-PR searches found no competing fix after one preserved transient search failure.