Skip to content

refactor(steering): make active-run admission exact and atomic - #120285

Merged
steipete merged 9 commits into
mainfrom
codex/refactor-steer-admission
Aug 7, 2026
Merged

steipete merged 9 commits into
mainfrom
codex/refactor-steer-admission

Conversation

@steipete

@steipete steipete commented Aug 7, 2026 •

Copy link
Copy Markdown
Contributor

Related: #120083

What Problem This Solves

Active-run steering was coupled to the wrong signals and the wrong lifecycle. It inferred injectability from token streaming, then delayed the actual backend queue call until normal reply dispatch had performed plugin, context, skill, model, and auth work. A tool-running native turn could therefore be correctly selected at Gateway admission yet disappear before turn/steer was invoked.

Root Cause and Architecture

Message injection is now an explicit capability owned by the active reply operation. Gateway admission captures an opaque operation target plus the active native run ID. The Control UI persists only that immutable run ID with durable retry state; advancing transcript leaves are context, not run identity. Modern steering uses operation + run identity, while the shipped legacy targetless seam retains exact origin-leaf fencing.

The queue operation now begins at the owner boundary. After attachment preparation and final abort/routing checks, handleChatSend synchronously prepares the exact user-turn recorder and media options and calls beginReplyMessageInjectionTarget before sending the started ACK. The backend queue is therefore already running before reply dispatch, context resolution, plugin binding, or agent-reply hooks can delay it.

The detached continuation awaits a typed result:

  • Accepted input is irrevocable. Gateway records the user turn once, emits normal message-received/audit/diagnostic observations, touches the session, caches and broadcasts the client-run terminal, and never creates a successor reply operation.
  • Accepted-but-unconfirmed input aborts only the captured operation object, never a same-key successor, and is never replayed.
  • Definite rejection enters the existing dispatch exactly once with the injection attempt marked complete. Normal plugin binding, before_dispatch, reply_dispatch, before_agent_reply, follow-up policy, cancellation, and transcript ownership remain unchanged.

Accepted steering no longer runs before_agent_reply: injection adds user input to the current native turn; it is not a new OpenClaw model/reply turn. Talk, /steer, and active sessions_send already follow the same direct-queue contract.

Token streaming is no longer an injection gate. Embedded, Codex, and Copilot producers expose messageInjection; CLI-only backends expose cancellation but cannot claim steering support. Codex and Copilot replacement handles preserve the negotiated taskSuggestionDeliveryMode. Explicit wire queueMode: "steer" fails closed without expectedRunId.

Session-suggestion compatibility is preserved without weakening that contract. send targets the sole authoritative active Gateway run with expectedRunId, sends an ordinary immediate turn when idle, and fails visibly while keeping the suggestion pending when active work has zero or multiple authoritative run IDs. queue remains a follow-up.

Upstream Codex confirms this boundary at openai/codex@57f42a81131ccf5933e7ec5dc659c381eeb5d72b: TurnSteerParams.expected_turn_id, turn_steer_inner, and the atomic active-turn check plus pending-input append in Session::steer_input.

Best-Fix Decision

This is the owner-boundary fix, not a consumer workaround. Keeping token streaming was rejected because output progress does not imply input capability. Targetless delivery-time discovery was rejected because stale retry could hit a successor run and Codex requires an exact active-turn precondition. Delayed injection inside reply dispatch was rejected by live evidence: context/plugin work can outlive the selected native turn.

Live Evidence

  • Live attempt 1 exposed an identity bug: the same active run advanced its transcript leaf during Shell work and the steer was rejected. Commit f5e8d07c4fa corrected modern targeting to operation + run identity and kept leaf equality only for the legacy targetless seam.
  • Live attempt 2 proved admission capture alone was insufficient. Gateway accepted the steer while the original tool owner remained active, but detached dispatch reached reply execution only after context work and after the native owner ended. No Codex turn/steer RPC occurred. That trace motivated the pre-ACK synchronous begin path in 451128b175b.
  • Live attempt 3 reached the synchronous begin path but rejected before the native queue because Codex and Copilot replacement handles dropped the negotiated gateway task-suggestion mode. Commit 7e73f1a7345 preserves that mode on both owner backends.
  • Live-6 passed on 7e73f1a7345795910f26217807b0510614d9a63c: one outer run (ea29d8ac…232c), one native turn (019fdd92-202f…), one turn/start, one turn/steer 503 ms after ACK, matching steered-user completion in the same native turn, one native task_started, zero successor run, final STEER_ACCEPTED, no WAIT_FINISHED, aborted=false. Source-blind UI verification passed after refresh with no Retry, uncertainty, queue, waiting, steering, or error residue.
  • Cleanup completed: Gateway and app-server stopped, port closed, and temporary credential state/facade removed.

The exact-head follow-up 9e1a4a62b2a5d3e17eef94a74826d9b47c9d0d33 changes only sessions-suggestions.ts and its focused test, so the core injection/Control UI/backend path exercised by live-6 is patch-identical.

Verification

  • Pre-follow-up steering head: 1,215 focused tests passing across Gateway request/chat, agent-runner E2E, dispatch, registry, embedded queue, audit protocol, Codex/Copilot owner backends, Control UI lifecycle, and mocked browser E2E.
  • Exact head: src/gateway/server-methods/sessions-suggestions.test.ts passes 22/22, including active exact targeting, idle immediate send, and zero/multiple-identity visible failures.
  • Exact-head full-branch autoreview against origin/main: clean, no accepted/actionable findings (gpt-5.6-sol, high reasoning, confidence 0.96; 193,269-byte bundle in one pass).
  • git diff --check and targeted formatting pass.
  • Hosted exact-head CI and native scripts/pr prepare-run remain required before merge.

Compatibility and User Impact

The public queue-mode shape remains additive. Shipped legacy handle fields remain only as a structural Plugin SDK compatibility seam; the queue operation, not token streaming, is authoritative. No protocol version, config, persistence, SQLite schema, auth, or setup surface changes.

Steering now reaches the native turn while it still owns the work, including non-streaming tool execution. Retry cannot silently jump to a later run. Definite rejection falls back once; irreversible acceptance cannot become a duplicate follow-up. Session-suggestion send/queue behavior remains intact.

Production LOC: +866/-443 (net +423), justified by the explicit injection capability, exact operation/run fencing, Gateway-owned pre-ACK begin/typed terminalization boundary, and session-suggestion compatibility owner. Tests: +1071/-186 (net +885). Generated Swift protocol: +6/-0.

No changelog entry is included; release generation owns changelog updates.

Unrelated follow-up: the selected-agent sidebar auth state observed during live setup is outside this PR's injection lifecycle and did not affect the steering proof.

Exact-head CI Repair

Head ac99c24d43d5f67ca1f1f17657b5d2c16ad9df8d preserves sibling delivery contracts without weakening exact steering. Modern backends use explicit messageInjection; only legacy embedded handles retain their shipped isStopped/isStreaming eligibility adapter. CLI backends remain cancellation-only. Restored Control UI steering now proves exact run and leaf identity, and Copilot cleanup retains the concrete backend-handle type.

Focused exact-head proof: agent/session suites 88/88, Gateway suites 286/286, Control UI mocked browser E2E 9/9, targeted type-aware lint clean, git diff --check clean, and fresh Codex autoreview clean with no actionable findings (confidence 0.97). The exact local full type/package setup is blocked before the changed surfaces by the unrelated sibling-checkout baseline at packages/terminal-core/src/ansi.ts:194; the remote changed-gate router was unavailable because no Crabbox provider passed readiness. Hosted exact-head CI remains the authoritative static/package proof.

Repair delta: production +11/-14 (net -3); tests +68/-157 (net -89).

Targetless Protocol Compatibility Disposition

Head b8dd16baefb resolves the remaining ClawSweeper P1 without a protocol bump. expectedRunId remains the preferred modern/durable retry contract, and Control UI plus session suggestions continue to send it. Older targetless wire queueMode: "steer" requests now pass normalization only to enter a leaf-bound compatibility path: Gateway requires a supplied immutable expectedLeafEntryId (including deliberate null), resolves one running/fresh injectable operation, captures that opaque operation, and revalidates it before invoking the backend. Missing/mismatched ownership returns typed active-leaf-changed; queue-time ABA replacement rejects before ACK, never dispatches normally, and never reaches the successor. Internal current-operation injection remains separate because it already holds the opaque owner.

Direct upstream verification used openai/codex@57f42a81131ccf5933e7ec5dc659c381eeb5d72b: codex-rs/app-server-protocol/src/protocol/v2/turn.rs:175-196 requires expectedTurnId; codex-rs/app-server/src/request_processors/turn_processor.rs:910-1017 forwards and maps the exact-turn precondition; codex-rs/core/src/session/mod.rs:3983-4066 atomically checks the active turn and appends pending input under the active-turn lock. OpenClaw legacy compatibility therefore resolves to one exact operation before it reaches that backend contract.

Exact-head proof: Gateway 204/204; reply registry 60/60; modern Control UI exact-ID E2E 25/25; protocol schema 64/64; full docs formatting/lint/MDX/link checks; targeted type-aware lint and git diff --check; fresh Codex autoreview clean with no actionable findings (confidence 0.98). Delta: production +57/-31 (net +26), justified by the public compatibility identity and restart-safe pre-ACK rejection owner; tests +262/-9; docs +1/-1.

Exact Targets Through Reply Hydration

Head d46a8f36cd2 resolves both exact-head ClawSweeper P1s. /steer now requires exactly one authoritative activeRunId, always sends it as expectedRunId, and treats activeLeafEntryId as optional context; zero or multiple run IDs still refuse visibly. For replyToId steering, Gateway carries the admission-captured opaque target through asynchronous reply hydration, adds the hydrated quote to the direct-injection prompt, begins injection only against that captured operation, and marks the attempt so the runner cannot rediscover a successor. If A ends and B replaces it during hydration, the accepted Gateway claim terminalizes as typed active-run-changed; neither backend queue nor normal/followup dispatch reaches B. UI terminal handling retires the rejected steer chip.

Exact-head proof: focused reply/command Gateway+UI 416/416; broad Gateway 124/124, registry 60/60, UI chat-send 272/272, exact-ID UI E2E 25/25, and agent-runner dispatch E2E 142/142; final focused Gateway/UI 405/405; targeted type-aware lint plus git diff --check; Codex autoreview clean with no actionable findings (confidence 0.98). Production delta +111/-48 (net +63), justified by the exact-target reply-hydration owner and typed terminal projection; tests +243/-2. No live rerun was performed: this authorized follow-up explicitly excluded live work, and it changes only deterministic replyToId plus client /steer paths while the previously live-proven ordinary steering path remains unchanged.

@steipete steipete self-assigned this Aug 7, 2026
@steipete
steipete marked this pull request as ready for review August 7, 2026 15:59
@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui gateway Gateway runtime agents Agent runtime and tooling extensions: codex extensions: copilot size: XL maintainer Maintainer-authored PR labels Aug 7, 2026
@clawsweeper clawsweeper Bot added 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. P1 High-priority user-facing bug, regression, or broken workflow. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. labels Aug 7, 2026
@clawsweeper

clawsweeper Bot commented Aug 7, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 7, 2026, 7:46 PM ET / 23:46 UTC.

ClawSweeper review

What this changes

This PR makes Control UI steering select an exact active run and inject user input into that operation before normal reply hydration and dispatch.

Regression provenance

Possible regression — probable (reviewed change; failure trace). No predecessor PR is attributed.

Merge readiness

⚠️ Ready for maintainer review - 3 items remain

Keep open for maintainer review. Current main confirms the leaf-only admission and delayed-dispatch gap, and the proposed exact operation/run boundary is well-directed, but exact-head core blobs and the required sibling Codex checkout could not be materialized in this environment.

Priority: P1
Reviewed head: 4f981267073b3b43a951588d5a3b630647325bab
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The design and available provider evidence are promising, but exact-head core and upstream-contract review remain unavailable in this environment.
Proof confidence 🌊 off-meta tidepool Not applicable: This maintainer-owned PR is not subject to the external-contributor proof gate; its reported older live trace is supportive but does not replace final-head source verification.
Patch quality 🦐 gold shrimp (3/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This maintainer-owned PR is not subject to the external-contributor proof gate; its reported older live trace is supportive but does not replace final-head source verification.
Evidence reviewed 6 items Current-main admission gap: Current Gateway steering admission is fenced by transcript leaf and injectability, without an exact run-id precondition.
Current-main timing gap: Gateway sends the started acknowledgement before asynchronous reply hydration and detached dispatch, so a selected native owner can end before deferred injection.
Current UI lacks durable exact-run targeting: The current UI permits steering from an active session row and sends no expected run identity, matching the reported successor-run ambiguity.
Findings None None.
Security None None.

How this fits together

Control UI sends chat and steering requests to Gateway, which either injects them into a live provider run or starts normal reply dispatch. Gateway reports terminal status back to the UI so durable queued steering can be resolved safely.

flowchart LR
  UI[Control UI steer request] --> Admission[Gateway admission]
  Admission --> Target[Exact active operation and run]
  Target --> Inject[Provider message injection]
  Inject --> Terminal[Terminal outcome]
  Terminal --> UIState[Durable UI queue state]
  Admission --> Fallback[Normal dispatch after definite rejection]
Loading

Decision needed

Question Recommendation
Can the final PR head be confirmed to preserve its captured operation and run identity through reply hydration, while matching the directly inspected upstream Codex exact-turn contract? Perform exact-head contract review: Inspect the final Gateway/UI blobs and sibling Codex source, then retain the PR if the captured-target invariant is intact.

Why: The current environment cannot materialize the final core blobs or inspect the mandatory sibling Codex source, so this cannot safely be decided from the available partial evidence.

Before merge

  • Resolve merge risk (P1) - The additive expected-run protocol field and durable retry identity affect compatibility, session association, and whether a steer reaches the intended native turn; the inaccessible final core blobs prevent independent upgrade-path confirmation.
  • Resolve merge risk (P1) - The available live trace predates the final reply-hydration commit, and direct upstream Codex contract inspection is blocked by the missing sibling checkout.
Agent review details

Security

None.

PR surface

Source +526, Tests +1290, Docs 0, Other +6. Total +1822 across 65 files.

View PR surface stats
Area Files Added Removed Net
Source 39 1041 515 +526
Tests 24 1574 284 +1290
Docs 1 1 1 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 6 0 +6
Total 65 2622 800 +1822

Review metrics

None.

Stored data model

Persistent data-model change detected: serialized state: src/gateway/server-methods/sessions-suggestions.test.ts, serialized state: src/gateway/server-methods/sessions-suggestions.ts, unknown-data-model-change: src/gateway/server-methods/sessions-suggestions.test.ts, unknown-data-model-change: src/gateway/server-methods/sessions-suggestions.ts. Confirm migration or upgrade compatibility proof before merge.

Root-cause cluster

Relationship: canonical
Canonical: #120285
Summary: This PR is the remaining exact-run and reply-hydration follow-up to the earlier merged steering reliability repair.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge-risk options

Maintainer options:

  1. Verify the final exact-target path (recommended)
    Before merge, inspect the final head and prove that a hydrated reply cannot inject into a successor run or replay accepted input.
  2. Pause until contract evidence is accessible
    Keep this maintainer PR open if the final source or sibling Codex contract cannot be inspected on the intended merge environment.

Technical review

Best possible solution:

Have a maintainer with the exact branch and sibling Codex checkout verify the final hydration-to-injection path and its native turn contract before merging.

Do we have a high-confidence way to reproduce the issue?

Yes, from source: current main admits steering by leaf identity and performs reply hydration after acknowledgement, while the UI has no exact-run precondition. No independent live reproduction was run in this read-only environment.

Is this the best way to solve the issue?

Unclear: capturing an opaque operation and exact run before delayed work is the best owner-boundary direction, but the final implementation and upstream Codex contract could not be independently inspected here.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 621efa4f5fe4.

Labels

Label justifications:

  • P1: The PR changes an active agent steering workflow in Gateway and the Control UI.
  • merge-risk: 🚨 compatibility: It adds expected-run steering semantics while retaining a legacy targetless compatibility path.
  • merge-risk: 🚨 session-state: The UI persists an immutable active-run identity for retries and Gateway associates it with live reply state.
  • merge-risk: 🚨 message-delivery: The change determines whether accepted user input is injected into the intended active native turn or dispatched separately.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🌊 off-meta tidepool and patch quality is 🦐 gold shrimp.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This maintainer-owned PR is not subject to the external-contributor proof gate; its reported older live trace is supportive but does not replace final-head source verification.

Evidence

What I checked:

  • Current-main admission gap: Current Gateway steering admission is fenced by transcript leaf and injectability, without an exact run-id precondition. (src/gateway/server-methods/chat-send-admission.ts:205, 621efa4f5fe4)
  • Current-main timing gap: Gateway sends the started acknowledgement before asynchronous reply hydration and detached dispatch, so a selected native owner can end before deferred injection. (src/gateway/server-methods/chat-send-handler.ts:254, 621efa4f5fe4)
  • Current UI lacks durable exact-run targeting: The current UI permits steering from an active session row and sends no expected run identity, matching the reported successor-run ambiguity. (ui/src/pages/chat/chat-command-executor.ts:821, 621efa4f5fe4)
  • Prior related fix: Merged PR fix(ui): make active-run steering reliable #120083 repaired the earlier steering reliability issue and explicitly left exact active-run terminal evidence as follow-up work. (48ea08918e3f)
  • Exact-head review limitation: The final head exists locally, but required core blobs are promisor-missing and GitHub DNS was unavailable; the final reply-hydration implementation could not be independently read. (4f981267073b)
  • Codex dependency gate blocked: A review worker inspected the available exact-head Codex provider path, but ../codex and the requested upstream revision were unavailable and could not be fetched, so the required direct upstream contract inspection cannot support a merge or proof-sufficiency verdict.

Likely related people:

  • steipete: Authored this PR and the merged preceding steering repair, and has recent history across the Gateway and Control UI steering surfaces. (role: recent area contributor; confidence: high; commits: 443baebcd545, 48ea08918e3f; files: src/gateway/server-methods/chat-send-handler.ts, ui/src/pages/chat/steer-lifecycle.ts)
  • fuller-stack-dev: Authored the earlier active-run steering foundation that this PR refines. (role: adjacent feature contributor; confidence: medium; commits: 6d2ba0d5622f; files: src/agents/embedded-agent-runner/runs.ts)
  • Vincent Koc: History on the current Gateway admission predicate connects this person to the leaf-based behavior being replaced. (role: recent Gateway contributor; confidence: medium; commits: 8c68f74; files: src/gateway/server-methods/chat-send-admission.ts)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Inspect the final Gateway/UI blobs and sibling Codex contract in a checkout where both are available.

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 (4 earlier review cycles)
  • reviewed 2026-08-07T16:28:56.076Z sha 27805a2 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-07T17:41:04.543Z sha f5e8d07 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-07T18:40:16.473Z sha 7e73f1a7345795910f26217807b0510614d9a63c :: needs changes before merge. :: [P1] Preserve suggestion sends without an active-run target
  • reviewed 2026-08-07T21:47:41.737Z sha d46a8f3 :: needs maintainer review before merge. :: none

@steipete

steipete commented Aug 7, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Exact-head review requested for 451128b175bba81f841ad7a758312c9c9a2320b2. The new commit moves backend injection before the started ACK and removes accepted steering from reply dispatch/context/hooks. The PR body now records the second live failure, root cause, focused proof, static baseline, LOC, and the pending corrected-head live rerun.

@clawsweeper

clawsweeper Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Command router queued. I will update this comment with the next step.

@steipete

steipete commented Aug 7, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Exact-head review requested for 7e73f1a7345795910f26217807b0510614d9a63c. Live-3 proved the Codex replacement backend dropped the negotiated task-suggestion injection mode, causing typed prevalidation rejection before turn/steer. Codex and Copilot now preserve that mode, explicit targetless wire steering fails closed, and the PR body includes the causal trace and exact-head proof. Corrected-head live rerun remains pending in the separate live lane.

@clawsweeper

clawsweeper Bot commented Aug 7, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Aug 7, 2026
@steipete

steipete commented Aug 7, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Exact-head review requested for 9e1a4a62b2a5d3e17eef94a74826d9b47c9d0d33. The P1 session-suggestion compatibility finding is resolved at its owner: send-now uses an exact sole active run, sends normally when idle, and fails visibly without dispatch when active identity is missing or ambiguous. Targetless explicit wire steer remains rejected. Focused suggestion proof is 22/22 and autoreview is clean.

@clawsweeper

clawsweeper Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Command router queued. I will update this comment with the next step.

@steipete

steipete commented Aug 7, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Exact-head review requested for 9e1a4a62b2a5d3e17eef94a74826d9b47c9d0d33.

The prior P1 is repaired at the session-suggestion owner: send now targets the sole active Gateway run with expectedRunId, sends normally when idle, and fails visibly while leaving the suggestion pending when active identity is zero or ambiguous. Focused exact-head proof is 22/22. The final commit changes only sessions-suggestions.ts and its test; the core steering path is patch-identical to live-6, which proved one outer run, one native turn, one turn/start, one turn/steer, STEER_ACCEPTED, and no successor run. Full-branch autoreview is clean at confidence 0.96. Please refresh the exact-head finding and Rank-up moves.

@clawsweeper

clawsweeper Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Command router queued. I will update this comment with the next step.

@steipete

steipete commented Aug 7, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 7, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@steipete
steipete force-pushed the codex/refactor-steer-admission branch from ac99c24 to 8c65684 Compare August 7, 2026 19:48
@steipete

steipete commented Aug 7, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Exact-head review requested for 8c65684dc2f20c6d9eaf3346d99737d51e99135c.

The branch was rebased only after GitHub reported a real merge conflict. The sole conflict was test-only in the Gateway queue-mode fixture: the resolution preserves latest main's compressed makeChatSendParams fixture while retaining the reviewed PR contract (followup, not forbidden targetless steer). Production behavior and final LOC are unchanged from the reviewed repair: production +869/-449, tests +1080/-284, generated Swift +6/-0.

The modern Control UI/Codex pre-ACK injection path remains patch-identical to live-6: one outer run, one native turn, one turn/start, one turn/steer, STEER_ACCEPTED, and no successor. Final connected repair proof is agent/session 88/88, Gateway 286/286, UI mocked E2E 9/9, targeted type-aware lint and diff clean. Fresh rewritten-head full-branch autoreview is clean on Codex Sol/high (confidence 0.94). Please replace the stale verdict and refresh every Rank-up move for this exact head.

@steipete
steipete force-pushed the codex/refactor-steer-admission branch from d46a8f3 to 4f98126 Compare August 7, 2026 22:44
@steipete

steipete commented Aug 7, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 7, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@steipete

steipete commented Aug 7, 2026

Copy link
Copy Markdown
Contributor Author

Exact-head ClawSweeper disposition for 4f981267073b3b43a951588d5a3b630647325bab:

  • The durable review reports no actionable findings. Its sole Rank-up move is to inspect the exact final Gateway/UI blobs and sibling Codex contract in a capable checkout.
  • That move is complete. The full exact head was inspected locally, its nine steering commits are patch-identical to the previously reviewed stack by git range-diff, and the final full-branch Codex autoreview against origin/main is clean (gpt-5.6-sol, high, confidence 0.98).
  • The required sibling openai/codex checkout was inspected directly at 57f42a81131ccf5933e7ec5dc659c381eeb5d72b: codex-rs/app-server-protocol/src/protocol/v2/turn.rs:175-196, codex-rs/app-server/src/request_processors/turn_processor.rs:910-1017, codex-rs/core/src/session/mod.rs:3983-4066, and the token-stream-independent pending-input drain in codex-rs/core/src/session/turn.rs:237-402.
  • Exact-head focused proof includes the full cron config (2,075/2,075), protocol/Gateway/UI overlap tests (284/284), clean production audit, clean diff check, and exact CI run https://github.com/openclaw/openclaw/actions/runs/31224870308 with security-fast, the formerly stalled compact shard, and openclaw/ci-gate all green.
  • Source-blind live-6 on the patch-identical steering code proved one outer run, one native turn, one turn/start, one turn/steer, STEER_ACCEPTED, and zero successor; exact-run identity remains carried through the final reply-hydration commit and its focused regressions.

No ClawSweeper Rank-up move is being skipped. Native review artifacts and prepare gates are complete on this exact head.

@steipete
steipete merged commit fa9626c into main Aug 7, 2026
123 checks passed
@steipete
steipete deleted the codex/refactor-steer-admission branch August 7, 2026 23:58
steipete added a commit that referenced this pull request Aug 8, 2026
Unblocks the check-lint gate broken by #120285's max-lines overflow.
steipete added a commit that referenced this pull request Aug 8, 2026
…x symlinked state-dir lock blindness (#120362)

* fix(agents): canonicalize managed worktree paths

* test(qa): cover managed worktree owner lifecycles

* test(agents): split worktree canonical-path regression into focused file

* fix(doctor): canonicalize persisted managed-worktree paths for symlinked state dirs

* fix(doctor): keep worktree path migration detection read-only

* test(doctor): bound managed-worktree migration product proof

* fix(doctor): keep worktree path detection from creating state dirs

* test(doctor): allow state migration detection under CI load

* test(agents): split embedded-runner steering runs into focused file

Unblocks the check-lint gate broken by #120285's max-lines overflow.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 8, 2026
…law#120285)

* refactor(steering): make admission exact and atomic

* fix(steering): bind targets by run identity

* fix(steering): inject before reply dispatch

* fix(steering): preserve backend injection modes

* fix(steering): target session suggestions

* fix(steering): preserve sibling delivery contracts

* style(steering): satisfy exact-head lint

* fix(steering): preserve targetless protocol compatibility

* fix(steering): preserve exact targets through replies
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 8, 2026
…x symlinked state-dir lock blindness (openclaw#120362)

* fix(agents): canonicalize managed worktree paths

* test(qa): cover managed worktree owner lifecycles

* test(agents): split worktree canonical-path regression into focused file

* fix(doctor): canonicalize persisted managed-worktree paths for symlinked state dirs

* fix(doctor): keep worktree path migration detection read-only

* test(doctor): bound managed-worktree migration product proof

* fix(doctor): keep worktree path detection from creating state dirs

* test(doctor): allow state migration detection under CI load

* test(agents): split embedded-runner steering runs into focused file

Unblocks the check-lint gate broken by openclaw#120285's max-lines overflow.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling app: web-ui App: web-ui docs Improvements or additions to documentation extensions: codex extensions: copilot gateway Gateway runtime maintainer Maintainer-authored PR merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. P1 High-priority user-facing bug, regression, or broken workflow. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: XL 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.

1 participant