Skip to content

fix(test): restore gateway steering validation - #158478

Merged
RomneyDa merged 1 commit into
mainfrom
fix/frv-steering-20260925
Sep 26, 2026
Merged

RomneyDa merged 1 commit into
mainfrom
fix/frv-steering-20260925

Conversation

@roboclaw-bot

@roboclaw-bot roboclaw-bot commented Sep 26, 2026 •

Copy link
Copy Markdown
Collaborator

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.send steering 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.ts changes. The assertions still verify ordering, exactly-once injection, sequential-tool suppression, cancellation, and attachment content.

Evidence

  • Retained baseline: 2 failed, 5 passed; repaired suite: 7/7 passed (100.46 seconds including the test wrapper) on base c935d7184ea21f720d3a4c88df88ff4bc439fb08.
  • Scoped check:changed passed, including root-test typecheck, formatting, dead exports, and lint; git diff --check passed. Normal commit hook passed; committed bytes match the retained tested patch.
  • Source review confirmed the connection authority fingerprint and its rejection/acceptance tests, and the sender filename contract. No production files or access checks changed.
  • Main advanced through runtime persistence and attachment preparation changes. The patch applied unchanged to 13e14dd6ae6507b418fe54d1f1221bcea5ddabb8. Exact published head af803f3a7fcde7774f72fb779c3166a91ceae556: NO_PROXY="${NO_PROXY:+$NO_PROXY,}127.0.0.1,localhost,::1" pnpm test test/gateway-steer-fifo.e2e.test.ts passed 7/7, exit 0, 99.46 seconds including the wrapper (84.26 seconds Vitest).
  • The first refreshed attempt hit HTTP 502/non-JSON on the owned loopback readiness probe despite the child reporting ready; it was stopped, not counted as a pass. The successful rerun added command-scoped loopback proxy exclusions only, preserving external proxy settings and every assertion.
  • Local independent autoreview was attempted but unavailable: Responses CONNECT HTTP 403, terminal status 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.
  • No full release validation is dispatched by this PR task. The separate validation cut does not include this unmerged fix. No merge, deployment, or release is authorized here.

Contributor credit: RomneyDa.

Align direct-tool fixtures, connection-scoped steering, protected context parsing, and sender filename expectations with current runtime contracts.

Co-authored-by: RomneyDa <[email protected]>
@clawsweeper

clawsweeper Bot commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@roboclaw-bot
roboclaw-bot marked this pull request as ready for review September 26, 2026 00:24
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 26, 2026
@clawsweeper

clawsweeper Bot commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 25, 2026, 8:46 PM ET / September 26, 2026, 00:46 UTC (Revision 2).

ClawSweeper review

What this changes

Updates 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
Reviewed head: af803f3a7fcde7774f72fb779c3166a91ceae556

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The focused fixture repair aligns with current contracts and has exact-head E2E and hosted CI evidence, with no actionable defect found.
Proof confidence 🐚 platinum hermit (4/6) Not applicable: This bot-authored, test-only PR has no contributor live-proof gate. Its captured body reports that the exact-head suite drove the production Gateway through chat RPCs against a scripted model server and passed all seven scenarios; hosted CI also succeeded. No stored-data contract changes.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This bot-authored, test-only PR has no contributor live-proof gate. Its captured body reports that the exact-head suite drove the production Gateway through chat RPCs against a scripted model server and passed all seven scenarios; hosted CI also succeeded. No stored-data contract changes.
Evidence reviewed 9 items Introduced patch: The pinned PR delta changes only the Gateway steering E2E test, including fixture tool exposure, client selection, protected-context parsing, and the attachment expectation.
Still needed on main: Fetched main still uses the earlier fixture configuration and assertions; the PR's test repair is absent there.
Tool-surface contract: The runtime selects Code Mode and Tool Search controls before presenting tools to the model, supporting the fixture's explicit direct-tool settings. The test selects OpenClaw's runtime and a scripted OpenAI Responses provider; no Codex dependency contract is claimed.
Findings None None.
Security None None.

How this fits together

The 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]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests +15. Total +15 across 1 file.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 28 13 +15
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 1 28 13 +15

Review metrics

Metric Value Why it matters
Focused Gateway E2E result Baseline 2 failed/5 passed; repaired 7/7 passed in 99.46s wall time The PR reports restored coverage for all existing scenarios and makes the cost of this full Gateway test visible.

Technical review

Best 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.

Labels

Label changes:

No label changes.

Label justifications:

  • P3: This is a focused test-validation repair with no user-visible runtime change.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This bot-authored, test-only PR has no contributor live-proof gate. Its captured body reports that the exact-head suite drove the production Gateway through chat RPCs against a scripted model server and passed all seven scenarios; hosted CI also succeeded. No stored-data contract changes.

Evidence

What I checked:

Likely related people:

  • unknown: The claimed source-line change could not be verified from bounded local history. (role: source history unknown; confidence: low)
  • unknown: The claimed source-line change could not be verified from bounded local history. (role: source history unknown; confidence: low)
  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (1 earlier review cycle)
  • reviewed 2026-09-26T00:30:41.628Z sha af803f3 :: needs maintainer review before merge. :: none

@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Sep 26, 2026
@roboclaw-bot

roboclaw-bot commented Sep 26, 2026 •

Copy link
Copy Markdown
Collaborator Author

@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.

@RomneyDa
RomneyDa enabled auto-merge (squash) September 26, 2026 05:42
@RomneyDa
RomneyDa merged commit eb2ab19 into main Sep 26, 2026
136 of 137 checks passed
@RomneyDa
RomneyDa deleted the fix/frv-steering-20260925 branch September 26, 2026 05:42
vincentkoc added a commit that referenced this pull request Sep 26, 2026
* 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
  ...
vincentkoc added a commit that referenced this pull request Sep 26, 2026
* 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]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 27, 2026
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]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 27, 2026
* 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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XS status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants