Repository navigation
fix(test): restore gateway steering validation - #158478
Conversation
Align direct-tool fixtures, connection-scoped steering, protected context parsing, and sender filename expectations with current runtime contracts. Co-authored-by: RomneyDa <[email protected]>
|
🦞👀 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. Reviewed September 25, 2026, 8:46 PM ET / September 26, 2026, 00:46 UTC (Revision 2). ClawSweeper reviewWhat this changesUpdates the Gateway steering end-to-end test to expose scripted tools directly, use one admitted client for direct steering, ignore protected context blocks in user-input assertions, and expect the sender’s attachment filename. Merge readiness✅ Ready for maintainer review Current main retains the stale Gateway steering fixture, and this focused repair matches the existing runtime contracts. The PR now records the exact-head E2E result requested in the prior review; no actionable patch defect was found. Priority: P3 Review scores
Verification
How this fits togetherThe Gateway accepts chat turns and steers follow-up input into an active agent run. This test drives the Gateway with a scripted model server and checks the model requests, tool execution, and attachment context that result. flowchart LR
Client[Chat client] --> Gateway[Gateway admission]
Gateway --> Run[Active agent run]
Client --> Steering[Steering input]
Steering --> Gateway
Run --> Model[Scripted model server]
Model --> Tools[Sequential tools]
Run --> Checks[E2E assertions]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceTests +15. Total +15 across 1 file. View PR surface stats
Review metrics
Technical reviewBest possible solution: Retain one reliable Gateway E2E check for steering order, connection authority, tool suppression, cancellation, and extracted document context. Do we have a high-confidence way to reproduce the issue? Yes at the source level: current main retains the stale fixture, and the captured PR body reports two failing baseline cases. This read-only review did not rerun the suite. Is this the best way to solve the issue? Yes. The patch adjusts the test setup and expectations to the existing Gateway contracts without changing runtime policy. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against fb1c32ba78b2. LabelsLabel changes: No label changes. Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
@RomneyDa — the separate-client supplement is now runtime-qualified, without changing production authority or weakening the shared-secret SYSTEM rejection. I am offering it through this existing PR rather than opening a competing steering PR. The steering-only commit preserves two independent connections: normal shared-secret pairing bootstrap, then Gateway-issued device-token reconnects for the same Owner. Both positive cases verified the public auth method, identical four scopes, distinct connection IDs and users.self principal. Both recorded completed/active_run_injected and exactly one committed history row whose protected steerTargetRunId points to the original run, after source chat.final. The original tool-tail, FIFO, exactly-once, CLI isolation and document filename/MIME/body assertions remain. Proof used a normal private-QA build on configured Blacksmith Testbox (Node24.19.0, pnpm12.4.2, 4 CPUs). All seven FIFO cases passed; the independently prepared timeout-recovery case also passed, 8/8 total in131.84s after a556.15s normal build. All49,946 source entries and exact content tree d7cf6f6b52c4e89756d83499b5ec417dd4024283 matched before/after. Local types/lint/format/ratchets and repository autoreview P0–P2 are clean. The owned lease is stopped/completed; raw captures remain private. The companion timeout commit49f91dbb82aaca7c171de7930c8c12e1f7a3e45c is separate and is not proposed for this PR. Your existing connection-local proof remains a different, valid scope. The added history oracle addresses the observed possibility of ACK/document content succeeding as an ordinary followup rather than steering. Would you like to incorporate the qualified paired-Owner fixture here? I have not edited or taken over this branch, requested a rerun/re-review, or merged anything. No new release run was started. |
* commit '66b812f26e725cd709e08860d2cb46ba496cd308': (70 commits) fix(gateway): preserve typed boxed-number coercion chore(ui): refresh control ui locales (#158689) fix(gateway): reset staged headers on authority errors (#158669) fix(workers): keep inbound staging stable during quota scans fix: preserve Telegram delivery after bot identity changes (#158612) fix(ui): keep automation starter prompts out of startup (#158482) fix(cli): distinguish configuration read failures from invalid input (#158671) test: remove retired progress coercion suppression allowance refactor(gateway): schedule worker placement maintenance (#158662) fix(daemon): keep native service checks within their timeout (#154565) fix(test): restore gateway steering fixture contracts (#158478) fix(acpx): use SDK filesystem publication boundary fix(agentsapi): load OpenClaw persona and workspace context (#158328) fix(gateway): drop progress snapshot coercion suppression fix(qa): accept native Codex truncation in cache evidence (#158454) fix(gateway): keep chat subscriptions stable during unrelated approvals (#158633) perf(gateway): release event payloads from live text guards (#158643) perf(sessions): reduce stalls when saving large chat messages (#158402) fix(qa): reject history-bearing utility requests without session affinity (#158496) test: allow intentional progress snapshot coercion ...
* fix(test): verify followup completion ordering Exercise the real presentation settlement helper with asynchronous cleanup, preserve continuation and admission semantics, and unconditionally release and join the held work. Remote proof covers the strengthened ordering contract and both missing-await faults. * fix(test): verify followup completion ordering * chore: retain followup test branch ancestry The current-main reconstruction preserves the original reviewed scope and supersedes its stale base. Keep the remotely qualified candidate tree unchanged while retaining the original PR ancestry for a non-force branch update. * commit 'ff35145de21cf6296bec05e86bee37b5ed53bcb8': fix(test): verify followup completion ordering * test(auto-reply): signal queued presentation entry * chore: refresh followup test on boundary fix * commit '66b812f26e725cd709e08860d2cb46ba496cd308': (70 commits) fix(gateway): preserve typed boxed-number coercion chore(ui): refresh control ui locales (#158689) fix(gateway): reset staged headers on authority errors (#158669) fix(workers): keep inbound staging stable during quota scans fix: preserve Telegram delivery after bot identity changes (#158612) fix(ui): keep automation starter prompts out of startup (#158482) fix(cli): distinguish configuration read failures from invalid input (#158671) test: remove retired progress coercion suppression allowance refactor(gateway): schedule worker placement maintenance (#158662) fix(daemon): keep native service checks within their timeout (#154565) fix(test): restore gateway steering fixture contracts (#158478) fix(acpx): use SDK filesystem publication boundary fix(agentsapi): load OpenClaw persona and workspace context (#158328) fix(gateway): drop progress snapshot coercion suppression fix(qa): accept native Codex truncation in cache evidence (#158454) fix(gateway): keep chat subscriptions stable during unrelated approvals (#158633) perf(gateway): release event payloads from live text guards (#158643) perf(sessions): reduce stalls when saving large chat messages (#158402) fix(qa): reject history-bearing utility requests without session affinity (#158496) test: allow intentional progress snapshot coercion ... Co-authored-by: Vincent Koc <[email protected]>
Align direct-tool fixtures, connection-scoped steering, protected context parsing, and sender filename expectations with current runtime contracts. Co-authored-by: roboclaw-bot <[email protected]> Co-authored-by: RomneyDa <[email protected]>
* fix(test): verify followup completion ordering Exercise the real presentation settlement helper with asynchronous cleanup, preserve continuation and admission semantics, and unconditionally release and join the held work. Remote proof covers the strengthened ordering contract and both missing-await faults. * fix(test): verify followup completion ordering * chore: retain followup test branch ancestry The current-main reconstruction preserves the original reviewed scope and supersedes its stale base. Keep the remotely qualified candidate tree unchanged while retaining the original PR ancestry for a non-force branch update. * commit 'ff35145de21cf6296bec05e86bee37b5ed53bcb8': fix(test): verify followup completion ordering * test(auto-reply): signal queued presentation entry * chore: refresh followup test on boundary fix * commit '622be54be3ffe0fce27d6a4b147c76d4b19c528c': (70 commits) fix(gateway): preserve typed boxed-number coercion chore(ui): refresh control ui locales (openclaw#158689) fix(gateway): reset staged headers on authority errors (openclaw#158669) fix(workers): keep inbound staging stable during quota scans fix: preserve Telegram delivery after bot identity changes (openclaw#158612) fix(ui): keep automation starter prompts out of startup (openclaw#158482) fix(cli): distinguish configuration read failures from invalid input (openclaw#158671) test: remove retired progress coercion suppression allowance refactor(gateway): schedule worker placement maintenance (openclaw#158662) fix(daemon): keep native service checks within their timeout (openclaw#154565) fix(test): restore gateway steering fixture contracts (openclaw#158478) fix(acpx): use SDK filesystem publication boundary fix(agentsapi): load OpenClaw persona and workspace context (openclaw#158328) fix(gateway): drop progress snapshot coercion suppression fix(qa): accept native Codex truncation in cache evidence (openclaw#158454) fix(gateway): keep chat subscriptions stable during unrelated approvals (openclaw#158633) perf(gateway): release event payloads from live text guards (openclaw#158643) perf(sessions): reduce stalls when saving large chat messages (openclaw#158402) fix(qa): reject history-bearing utility requests without session affinity (openclaw#158496) test: allow intentional progress snapshot coercion ... Co-authored-by: Vincent Koc <[email protected]>
What Problem This Solves
Fixes gateway steering validation failures caused by fixture assumptions that no longer match the admitted connection authority, direct-tool configuration, protected context blocks, and attachment filename contracts.
Maintainer-requested validation repair: Dallin explicitly requested these fixes as PRs on September 25, 2026, after the local independent reviewer remained unavailable. This is a scoped test-only repair, not a runtime policy change.
User Impact
No user-visible behavior change. Developers regain meaningful steering regression coverage without weakening the runtime authority boundary. No migrations or configuration changes are required.
Why This Change Was Made
The scripted provider needs its fixture tools directly exposed. Direct
chat.sendsteering cases now start and steer through the same admitted connection; TUI queue-admission cases retain their separate path. User-input assertions skip the protected internal-context block and check the sender filename preserved by document extraction.Only
test/gateway-steer-fifo.e2e.test.tschanges. The assertions still verify ordering, exactly-once injection, sequential-tool suppression, cancellation, and attachment content.Evidence
c935d7184ea21f720d3a4c88df88ff4bc439fb08.check:changedpassed, including root-test typecheck, formatting, dead exports, and lint;git diff --checkpassed. Normal commit hook passed; committed bytes match the retained tested patch.13e14dd6ae6507b418fe54d1f1221bcea5ddabb8. Exact published headaf803f3a7fcde7774f72fb779c3166a91ceae556:NO_PROXY="${NO_PROXY:+$NO_PROXY,}127.0.0.1,localhost,::1" pnpm test test/gateway-steer-fifo.e2e.test.tspassed 7/7, exit 0, 99.46 seconds including the wrapper (84.26 seconds Vitest).reviewer_unavailable, no report or verdict. The local outage remains unresolved and is not a successful local review. Hosted CI run 36204724066 completed successfully on the exact published head. ClawSweeper review completed on that head with no actionable findings and “Ready for maintainer review”; it is not maintainer approval or a merge-ready claim. Its only proof gap (the then-pending refreshed-base E2E result) is now addressed above.Contributor credit: RomneyDa.