Repository navigation
fix(ui): make active-run steering reliable - #120083
Conversation
|
Codex review: needs maintainer review before merge. Reviewed August 6, 2026, 10:45 PM ET / August 7, 2026, 02:45 UTC. ClawSweeper reviewWhat this changesThe PR replaces streaming-only steering admission with a shared freshness-and-injectability check and preserves steering intent across UI delivery failures and retries. Regression provenancePossible regression — probable (reviewed change; failure trace). No predecessor PR is attributed. Merge readinessKeep this protected maintainer PR open for manual review: source supports the owner-boundary repair, but the required sibling Codex checkout is unavailable for an independent upstream contract verification. Priority: P1 Review scores
Verification
How this fits togetherControl UI steering messages enter Gateway admission, which verifies the active reply-run owner before injecting input into the agent runtime. Gateway outcomes then drive the queue’s accepted, rejected, or delivery-uncertain UI state. flowchart LR
A[Control UI steer] --> B[Gateway admission]
B --> C[Reply-run owner check]
C --> D[Agent runtime injection]
D --> E[Gateway outcome]
E --> F[UI queue state]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +59, Tests +137. Total +196 across 11 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Retain the registry-owned single admission-and-delivery predicate, then complete an exact-head review with the sibling Codex source available before merge. Do we have a high-confidence way to reproduce the issue? No independent high-confidence live reproduction was run; current source does show a non-streaming injectable owner rejected by the streaming-only admission predicate. Is this the best way to solve the issue? Unclear pending the required direct Codex inspection; locally, sharing one freshness-and-injectability predicate is the narrowest owner-boundary repair. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 0f92db6a5ad5. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
e70cf88 to
e079789
Compare
|
@clawsweeper re-review Exact-head rank-up accounting for e079789523d72e75ce7b80eefce779a8626ea96d:
Please refresh review on this exact head. |
|
🦞👀 Command router queued. I will update this comment with the next step. |
b1de76f to
bc209cc
Compare
|
@clawsweeper re-review Final exact-head refresh for bc209cc:
Please refresh the durable review on this exact head. |
|
🦞👀 Command router queued. I will update this comment with the next step. |
|
@clawsweeper re-review Exact-head P1 disposition for 0f496fb:
Please refresh the durable review on this exact head. |
|
🦞👀 Command router queued. I will update this comment with the next step. |
|
Exact-head Rank-up move disposition for
The durable exact-head review reports no findings; no re-review is requested solely to refresh its rating. |
|
Merged via squash.
|
* origin/main: (58 commits) fix(test): restart shared gateway after migration convergence (openclaw#120089) fix(ui): make active-run steering reliable (openclaw#120083) fix(telegram): preserve voice fallback text test(swift): preserve queued websocket frames (openclaw#120106) fix: reject missing oxlint shard selectors (openclaw#120096) test(channels): align prerelease fallback catalog spec (openclaw#120092) fix(node-cli): warn when systemd user lingering is disabled after install (openclaw#118430) fix(diagnostics): preserve CLI turn usage totals (openclaw#120100) fix(gateway): derive lock and coordinator paths from the resolved state dir (openclaw#120110) fix(release): isolate private Telegram QA harness (openclaw#120088) test(agents): exercise execution attribution ingress guard fix(gateway): defer attribution until admission succeeds refactor(agents): centralize exact execution attribution fix(google): accept base64url provider media (openclaw#116204) fix(plugins): warn when registerHook uses a typed hook event name (openclaw#118601) fix(canvas): serve Content-Length on A2UI HEAD responses (openclaw#117961) fix(gateway): make doctor dreaming timestamp comparators NaN-safe (openclaw#118749) fix(heartbeat): explain target-none skips (openclaw#119689) fix(security): stop recommending retired install-policy bypasses (openclaw#120011) fix(plugins): preserve startup release during repair (openclaw#120085) ... # Conflicts: # CHANGELOG.md # src/config/sessions/session-accessor.sqlite-transcript-write.ts
* fix(ui): make active-run steering reliable * chore: leave release notes to release prep * fix(ui): align steer result typing with main * fix(gateway): reject stale steering owners
What Problem This Solves
Fixes an issue where users steering an active Control UI run during tool work could briefly see “Steered,” then have the message downgraded to the opaque “Needs review” state even though they had explicitly asked to steer. In the observed live failure, one unique steer changed from Steered to Needs review in about 3 seconds, the queue grew from 1 to 2, and no matching transcript entry appeared after 28 seconds.
Why This Change Was Made
The Gateway treated token streaming as the proof that an active run could accept a message. Embedded runs remain steerable while tools execute even when token streaming is false, so admission could reject valid steering after the transcript leaf advanced. The shared reply-run owner now reports actual message-injection availability, preserving the existing originating-leaf fence and rejecting stopped, evidence-stale, or different-leaf owners. Admission and delivery use the same freshness-and-injectability predicate, so a stale owner cannot waive the leaf fence and then reject the same steer during injection.
The Control UI now distinguishes definitive Gateway rejection frames from ambiguous transport loss. Definitive rejections remain failed with the Gateway reason; transport loss remains parked as Delivery uncertain because admission may already have succeeded. Retrying either state preserves the durable steer kind, the original idempotency key, and steer queue mode, and refuses to turn the message into a normal chat turn when no active run exists.
The follow-up intentionally remains: Gateway exact-run terminal evidence for restored outbox reconciliation. The current shared API exposes active-run presence but not authoritative exact-run terminal evidence for every restored browser outbox.
User Impact
Users can steer throughout active tool work. Errors now say whether the Gateway actually rejected the steer or whether delivery is merely uncertain, and Retry preserves the original steering intent instead of accidentally replaying it as a normal turn.
Evidence
Focused proof on the final patch:
pnpm formaton the changed files: passedpnpm ui:i18n:verify: passed (raw-copy: baseline entries=98,source: keys=4690)node scripts/run-vitest.mjs src/auto-reply/reply/reply-run-registry.test.ts: 52 passednode scripts/run-vitest.mjs src/gateway/server-methods/chat.directive-tags.test.ts: 163 passednode scripts/run-vitest.mjs ui/src/pages/chat/chat-send.test.ts: 269 passedpnpm deadcode:unused-files: production and full-tree scans passed with 0 entries.agents/skills/autoreview/scripts/autoreview --mode branch --base origin/main --stream-engine-output: clean, no accepted/actionable findings; overall correct at 0.97git diff --check: passedThe focused tests cover fresh non-streaming injectable tool work, evidence-stale owners at both registry and moved-leaf Gateway admission, stopped owners, different originating leaves, definitive Gateway rejection, active-run absence, preserved idempotency key and queue mode on retry, ambiguous transport parking, and no automatic normal-turn replay.
Codex contract evidence was checked directly at sibling Codex origin/main
842547640ee37451c2d66f7e01f8d762e07b336d:codex-rs/core/src/session/mod.rs:3983-4066: active regular turns accept same-turn input atomically and independently of token streamingcodex-rs/app-server/src/request_processors/turn_processor.rs:910-1016: no-active, expected-turn mismatch, and non-steerable turns are definitive request errorscodex-rs/core/tests/suite/pending_input.rs:497-510and following: steering is accepted during wait/tool workProduction LOC: +89/-30 (net +59) | Tests: +149/-12 (net +137). The positive production delta adds the required transport-outcome distinction, durable steer retry ownership, and one canonical freshness-and-injectability owner predicate; no config, protocol, storage, or changelog surface changes.
Provenance: the streaming-only owner predicate was introduced in #119594 by PR/code author and merger @fuller-stack-dev on 2026-08-05 (squash
6d2ba0d5622fa7aa21a4770cb4c6fd93cae44e04). This patch narrows that predicate to the canonical backend injection lifecycle rather than adding a parallel steering path.