Skip to content

fix: preserve queued settings while a session is being created - #154807

Merged
steipete merged 5 commits into
mainfrom
codex/swarm-settings-materialization-20260921
Sep 26, 2026
Merged

steipete merged 5 commits into
mainfrom
codex/swarm-settings-materialization-20260921

Conversation

@steipete

@steipete steipete commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

Related: #130741, #152375

What Problem This Solves

Reasoning, speed and context-window choices can disappear or be dropped while a new session is being created. A rejected reasoning choice can also lose its error when a later speed edit succeeds.

User Impact

Pickers retain the latest requested choices through session creation. Queued writes target the acknowledged physical session, each setting reports and rolls back its own failure, and late responses cannot overwrite a newer choice or affect a replacement session.

Why This Change Was Made

The existing pending-row owner now carries previews before a physical session exists and binds the acknowledged identity in place. The existing settings queue preserves write order and receipt identity. Field-owned settlement retains a reasoning error when a later speed choice completes. A same-conversation placeholder appearing during refresh does not cancel queued intent. This adds no separate state store or queue.

Evidence

Final reviewed head: 1d1b0c06e2359d7c3212be23725f45bfa82da561. Independent review through P2 is clean. Exact-head CI passed, including all UI shards, eight Control UI E2E lanes, the browser-extension lane, performance, types, lint and the required CI gate.

Focused final proof passed 404 tests across the materialization, composer-controls and chat-view files, with no skips or unhandled errors. Reverting only the placeholder fix makes its mounted-pane regression fail at the intended missing second write; restoring it passes all 15 materialization cases. That test publishes the identity-less placeholder through the real session refresh owner before the first receipt settles.

The current-head Chromium flow passed in 12.225 seconds using a mock Gateway and synthetic data. It observes queued choices before the first acknowledgment, three FIFO patch requests, the acknowledged expectedSessionId on both later writes, and the reasoning error remaining visible after the speed acknowledgment. This browser trace starts with no roster row; the separate mounted-pane control covers the placeholder-refresh race. The mounted-pane control supplies the placeholder-specific evidence requested by review; the browser trace verifies visible choices, receipt targets and error retention.

Before: the rejected reasoning choice loses its error after the speed acknowledgment.

Before: reasoning error disappears

After, on the final head: the reasoning error remains visible while speed succeeds.

After: reasoning error remains visible

Test cost and repaired validation failures

Each focused measurement uses pnpm test <file> --maxWorkers=1. Final-head command wall times: materialization 3.571 s, composer controls 2.461 s, chat view 6.226 s. The unchanged error-ownership, receipt-errors and unmaterialized test files were previously measured at 3.211 s, 3.226 s and 3.607 s on candidate a7b971b; those measurements remain historical.

Current CI's Bun UI partition recorded test durations of 2.648 s (materialization), 0.816 s (error ownership), 1.455 s (receipt errors), 2.124 s (unmaterialized), 0.349 s (composer controls), and 16.698 s (chat view). These are CI test durations, not isolated command wall times. CI recorded 342 chat-view cases in its integration context; the isolated published-head file ran all 365.

Earlier validation exposed incomplete session-capability mocks and malformed patch receipts. The repaired fixtures retain the real capability where ownership matters and return typed receipts; existing cases, assertions, timeouts and skip rules remain intact, with one added dispatch assertion preventing vacuous stale-outcome passes. The original failures remain recorded in runs 36225717471, 36228020401, and 36231486070. A prior browser attempt hit a temporary socket-path limit; the existing capture owner now uses the corrected short path. Final validation above passed.

@clawsweeper

clawsweeper Bot commented Sep 21, 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.

@openclaw-barnacle openclaw-barnacle Bot added the maintainer Maintainer-authored PR label Sep 21, 2026
@steipete
steipete marked this pull request as ready for review September 21, 2026 12:11
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 21, 2026
@clawsweeper

clawsweeper Bot commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 26, 2026, 6:41 AM ET / 10:41 UTC (Revision 12).

ClawSweeper review

What this changes

The Control UI retains reasoning, speed, and context-window choices while a new session forms, sends queued changes to the acknowledged session, and keeps setting failures visible.

Merge readiness

✅ Ready for maintainer review

Current main still has the session-creation gap this PR addresses. The current head has no actionable correctness finding, and its mounted-pane regression plus browser evidence provide adequate coverage of the previously questioned placeholder path. The protected maintainer label keeps the PR open for normal landing.

Priority: P2
Reviewed head: 1d1b0c06e2359d7c3212be23725f45bfa82da561

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The patch follows the existing ownership boundaries and has useful browser, visual, and focused regression evidence, with the placeholder browser sequence covered at the mounted-pane boundary.
Proof confidence 🐚 platinum hermit (4/6) ✨ media proof bonus Sufficient (screenshot): The PR describes a current-head Chromium chat flow using a synthetic mock Gateway that observes ordered writes, acknowledged targets, and an error retained after a later success; inspected before/after images show that error change. A mounted-pane test exercises the placeholder refresh through the production session owner and checks the next request's target. The placeholder variant has no separate Chromium trace. No stored-data contract changes.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (screenshot): The PR describes a current-head Chromium chat flow using a synthetic mock Gateway that observes ordered writes, acknowledged targets, and an error retained after a later success; inspected before/after images show that error change. A mounted-pane test exercises the placeholder refresh through the production session owner and checks the next request's target. The placeholder variant has no separate Chromium trace. No stored-data contract changes.
Evidence reviewed 9 items Current main still lacks the preview: On fetched main, optimistic thinking, speed, and context claims start only when a physical pending target exists.
Introduced pending-choice owner: The PR head starts setting claims before a physical row exists and binds queued claims when a predecessor receipt identifies that row.
Acknowledged write target: A queued settings write carries the acknowledged physical session ID as expectedSessionId.
Findings None None.
Security None None.

How this fits together

Chat pickers send session-setting changes through the Control UI's session owner to the Gateway. The session owner combines pending choices, roster updates, and write receipts before updating the visible controls.

flowchart LR
  A[Chat setting pickers] --> B[Pending setting choices]
  C[Session roster refresh] --> B
  B --> D[Ordered settings writes]
  D --> E[Gateway session patch]
  E --> F[Session receipt]
  F --> G[Visible choices and errors]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source +294, Tests +1072. Total +1366 across 15 files.

View PR surface stats
Area Files Added Removed Net
Source 8 545 251 +294
Tests 7 1123 51 +1072
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 15 1668 302 +1366

Review metrics

Metric Value Why it matters
Production and test growth production +294 net lines; tests/support +1,072 net lines Production growth extends the existing pending-row and settings-queue owners; the larger test delta covers their observable ordering and ownership cases.

Technical review

Best possible solution:

Land the existing session-owner repair with its identity-bound queue and field-specific rollback behavior after normal maintainer gates.

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

Yes, current-main source gives a high-confidence path: without a physical row, the pending target is null and optimistic setting claims do not start. I did not execute a current-main reproduction in this read-only review.

Is this the best way to solve the issue?

Yes. The patch extends the existing pending-row and ordered-write owners, carries the acknowledged session ID forward, and retains the Gateway's target checks.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add proof: sufficient: Contributor real behavior proof is sufficient. The PR describes a current-head Chromium chat flow using a synthetic mock Gateway that observes ordered writes, acknowledged targets, and an error retained after a later success; inspected before/after images show that error change. A mounted-pane test exercises the placeholder refresh through the production session owner and checks the next request's target. The placeholder variant has no separate Chromium trace. No stored-data contract changes.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.
  • remove merge-risk: 🚨 session-state: Current PR review selected no merge-risk labels.

Label justifications:

  • P2: Queued chat settings can be lost during session creation, but the affected workflow has a limited blast radius.
  • 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. Sufficient (screenshot): The PR describes a current-head Chromium chat flow using a synthetic mock Gateway that observes ordered writes, acknowledged targets, and an error retained after a later success; inspected before/after images show that error change. A mounted-pane test exercises the placeholder refresh through the production session owner and checks the next request's target. The placeholder variant has no separate Chromium trace. No stored-data contract changes.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR describes a current-head Chromium chat flow using a synthetic mock Gateway that observes ordered writes, acknowledged targets, and an error retained after a later success; inspected before/after images show that error change. A mounted-pane test exercises the placeholder refresh through the production session owner and checks the next request's target. The placeholder variant has no separate Chromium trace. No stored-data contract changes.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. The PR describes a current-head Chromium chat flow using a synthetic mock Gateway that observes ordered writes, acknowledged targets, and an error retained after a later success; inspected before/after images show that error change. A mounted-pane test exercises the placeholder refresh through the production session owner and checks the next request's target. The placeholder variant has no separate Chromium trace. No stored-data contract changes.

Evidence

What I checked:

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Ayaan Zaidi: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Josh Lehman: 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 (11 earlier review cycles; latest 8 shown)
  • reviewed 2026-09-22T06:48:04.242Z sha 9d7f1101c8714833de5924566d6c7e20d2eadb12 :: needs changes before merge. :: [P2] Suppress failures only when the same setting is superseded
  • reviewed 2026-09-22T09:12:47.708Z sha 532ba21 :: needs changes before merge. :: [P2] Suppress failures only when the same setting is superseded
  • reviewed 2026-09-26T06:14:47.023Z sha a7b971b :: blocked before merge. :: none
  • reviewed 2026-09-26T07:13:53.771Z sha b636b7f :: blocked before merge. :: none
  • reviewed 2026-09-26T08:01:52.857Z sha b61206e :: blocked before merge. :: none
  • reviewed 2026-09-26T09:08:38.333Z sha 0bf8792 :: blocked before merge. :: none
  • reviewed 2026-09-26T09:37:30.227Z sha 1d1b0c0 :: blocked before merge. :: none
  • reviewed 2026-09-26T10:04:24.204Z sha 1d1b0c0 :: blocked before merge. :: none

@steipete
steipete force-pushed the codex/swarm-settings-materialization-20260921 branch from 11c61ca to 12b7031 Compare September 21, 2026 17:33
@steipete steipete self-assigned this Sep 21, 2026
@steipete
steipete force-pushed the codex/swarm-settings-materialization-20260921 branch from 12b7031 to 9d7f110 Compare September 22, 2026 06:04
@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 22, 2026
@steipete
steipete force-pushed the codex/swarm-settings-materialization-20260921 branch from 9d7f110 to 532ba21 Compare September 22, 2026 09:05
Keep pending reasoning, speed and context choices attached to their field
owners while creation receipts adopt the physical session identity. Preserve
FIFO dispatch and each field's visible failure when later writes settle.

Validated with 125 focused and sibling cases, a failing preview regression
control, changed-source checks, the unchanged UI performance budget, and
a Chromium comparison that reproduces the missing error on the incoming
PR and retains it on this candidate. Independent review through P2 is clean.

Related: #154807, #130741, #152375
@steipete
steipete force-pushed the codex/swarm-settings-materialization-20260921 branch from 532ba21 to a7b971b Compare September 26, 2026 06:06
@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 26, 2026
Integrate current main while preserving created-thinking claim suspension
and rollback. Treat a same-conversation placeholder without a physical
session ID as the existing unmaterialized target, so it cannot silently
cancel queued choices. Add this transition to the existing regression table.

Fresh independent review through P2 is clean. Current integration runtime
proof remains pending; prior 125-case and browser proof applies to a7b971b.

Related: #154807
@clawsweeper clawsweeper Bot added merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. and removed proof: sufficient ClawSweeper judged the real behavior proof convincing. labels Sep 26, 2026
Keep existing composer and identity fixtures aligned with the session
capability contract. An undefined preview represents no pending settings;
existing overrides and rendering assertions stay unchanged.

Independent review through P2 and pinned formatter checks pass. This fixes
the missing-method failures observed on both Node and Bun; test replay is
pending on the updated candidate.

Related: #154807
@clawsweeper clawsweeper Bot added the rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. label Sep 26, 2026
@clawsweeper clawsweeper Bot removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. labels Sep 26, 2026
@clawsweeper clawsweeper Bot added the proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. label Sep 26, 2026
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. 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. merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. labels Sep 26, 2026
@steipete
steipete merged commit 0805a9d into main Sep 26, 2026
147 checks passed
@steipete
steipete deleted the codex/swarm-settings-materialization-20260921 branch September 26, 2026 11:10
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 27, 2026
…law#154807)

* fix(ui): preserve queued settings across session creation

Keep pending reasoning, speed and context choices attached to their field
owners while creation receipts adopt the physical session identity. Preserve
FIFO dispatch and each field's visible failure when later writes settle.

Validated with 125 focused and sibling cases, a failing preview regression
control, changed-source checks, the unchanged UI performance budget, and
a Chromium comparison that reproduces the missing error on the incoming
PR and retains it on this candidate. Independent review through P2 is clean.

Related: openclaw#154807, openclaw#130741, openclaw#152375

* test(ui): provide preview capability in chat fixtures

Keep existing composer and identity fixtures aligned with the session
capability contract. An undefined preview represents no pending settings;
existing overrides and rendering assertions stay unchanged.

Independent review through P2 and pinned formatter checks pass. This fixes
the missing-method failures observed on both Node and Bun; test replay is
pending on the updated candidate.

Related: openclaw#154807

* test(ui): return complete chat header patch receipts

* test(ui): preserve real session capabilities in permission controls
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. 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