Repository navigation
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed September 2, 2026, 6:15 AM ET / 10:15 UTC. ClawSweeper reviewWhat this changesThe PR makes Control UI New session bind a pending start to the authenticated Gateway hello immediately, rather than treating later browser recovery hydration as a Gateway identity change. Regression provenancePossible regression — probable (reproduction; reviewed change). No predecessor PR is attributed. Merge readinessKeep open: current main and v2026.8.2 do not contain this repair, and the maintainer-owned PR remains a coherent fix. No introduced correctness finding was found; its stated integration into the open lifecycle PR still needs a maintainer landing decision before this standalone branch can be retired. Priority: P1 Review scores
Verification
How this fits togetherControl UI New session observes the Gateway connection snapshot to select a destination and start a session. The authenticated hello supplies the recovery owner, while asynchronous browser recovery later restores saved work under that owner. flowchart TD
A[Gateway hello] --> B[Control UI connection snapshot]
C[Browser recovery hydration] --> D[Saved recovery restoration]
B --> E[New session draft owner]
E --> F[Session creation]
E --> G[Gateway-change fence]
D --> E
F --> H[Running chat]
Decision needed
Why: The author explicitly asks not to land this branch independently, while the claimed replacement remains open and its exact current patch could not be verified from the local checkout. Before merge
Agent review detailsSecurityNone. PR surfaceSource -33, Tests +104. Total +71 across 10 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep one verified implementation path: compare the integrated branch against this owner-boundary fix before landing it, then retire this standalone proof PR only after that branch merges. Do we have a high-confidence way to reproduce the issue? Yes—source provides a high-confidence controlled browser reproduction that delays recovery hydration at both relevant startup points and checks the false warning plus duplicate-create fence; it was not executed in this read-only review. Is this the best way to solve the issue? Yes—the patch reads the Gateway-authenticated hello at the ownership boundary and leaves browser recovery readiness as the restoration gate, instead of adding a competing timing wait. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 3a6881df3172. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (6 earlier review cycles)
|
934a1e7 to
2a0ab2b
Compare
Real Control UI proof completedThe rebuilt Control UI at exact head Before: the false warning was captured after an accepted start during the earlier synthetic Swarm probe. That earlier probe later failed its separate completion observer; this image proves the warning, not successful Swarm completion. After: the fresh startup reached its original chat, displayed the exact requested reply, and returned to an idle composer without the warning. Complete recording: task41-startup-complete.webmThe recorded run (
The browser/context closed, selected work was verified idle, and the parent stopped the isolated Gateway. No operator Gateway/state was touched. The earlier independent Runtime metadata, UI-announced build, Gateway hello, and the passively observed served UI asset matched All 472 frames of the 18.88-second recording were inspected (455 exact distinct pixel states, all 29 contact sheets, plus full-resolution before/after and masked-token frames). Only synthetic data and already-public campaign references were visible. Video SHA256: Executed private task-owned harness: python3 .artifacts/task41/run-ui.py startup-live-02 --execute-ui=parent-authorizedThe code is unchanged from the green exact-head CI run, 361-unit/35-browser-E2E proof, full changed gate, and fresh runtime/UI builds already recorded in the PR. The live/media gap is closed; this is not a claim that the PR has merged or that native landing gates have run. |
|
I’m taking this through the native landing gates as the prerequisite for the Control UI startup-performance follow-up. The source check confirms that the authenticated hello owns the recovery identity; browser recovery readiness owns migration/restoration, not the lifetime of an admitted first turn. I’m retaining the URL, client, authenticated-scope, and process-boot fences rather than introducing a competing discovery-readiness wait. Fresh owner/browser regression runs, an isolated build, and independent autoreview are in progress. The existing exact-head live recording and controlled delayed-hydration evidence remain linked in the PR; the new performance measurements will be reported separately and are not proof for this PR yet. @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Superseded by the landed lifecycle/startup integration #133747, merged as b057266d78d0 on September 2, 2026 at 12:38:32 UTC. Closing this standalone startup PR; its original reproduction and proof remain preserved here. Verified against this PR's current head The canonical fix binds draft ownership to authenticated hello rather than late browser recovery hydration. Saved recovery still waits for readiness, and genuine process changes or changed/missing owners still prevent replay. Current exact-head proof, commands, and recordings cover the RED/GREEN hydration regressions, 429 UI tests, real same-owner recovery, real device-token rotation, and the explicitly disclosed missing-scope transport fault. Exact-head CI passed. The startup-warning issue #133785 is already closed by the canonical merge. No independent landing of this branch is needed. This replaces the earlier pending-integration pointer after verifying the actual merge, not merely assuming it from a green test run. |
Fresh maintainer verificationAccept the authenticated hello as the canonical pending-start owner, with the existing Gateway URL, client, authenticated-scope, and process-boot fences intact. Browser recovery readiness remains the migration/restoration boundary. This is the existing repair the startup-performance follow-up will build on, rather than adding a competing readiness wait. The complete prerequisite was composed onto inspected main baseline Fresh local proof passed:
node scripts/run-vitest.mjs ui/src/pages/new-session ui/src/api/gateway.node.test.ts ui/src/app/gateway-store.test.tsnode scripts/run-vitest.mjs run --config test/vitest/vitest.ui-e2e.config.ts --configLoader runner ui/src/e2e/new-session-page.workspace-validation.e2e.test.ts ui/src/e2e/new-session-page.transition.e2e.test.ts ui/src/e2e/new-session-page.projects-places.e2e.test.ts ui/src/e2e/new-session-page.device-dispatch.e2e.test.tspnpm buildThe attached 14.08-second recording uses a real isolated Gateway, real PTY, and local synthetic OpenAI-compatible provider. It verifies first-open terminal and reload restoration, keeps the focused terminal shortcut out of PTY input, creates one session, shows partial streaming, waits for the turn to settle, and reloads the completed history. A DOM observer recorded no false Gateway-change warning. Initial discovery now sends one This live replay uses ordinary recovery timing. Delayed hydration and changed-owner/process timing are covered by the controlled browser E2Es, not claimed as live fault injection. The direct real-profile DevTools transport became unavailable after baseline inspection; this fresh replay is Playwright against a real Gateway, without a mocked Gateway protocol. The refreshed ClawSweeper review at 2026-09-02 08:24 UTC has no actionable findings; its remaining maintainer decision is resolved by the ownership judgment above. Exact-head GitHub checks were 174 green/skipped, attachment-2743159005.webm |
Bind draft ownership to authenticated hello before browser recovery hydration. Keep real owner and Gateway-process replay fences, and avoid redundant catalog discovery after hydration. Fixes #133785.
2a0ab2b to
5885cbc
Compare
Refreshed startup proof; integrated landing retainedI found the canonical integration handoff in the latest review and have stopped the independent landing path. This PR remains open as the focused proof record for the integrated lifecycle repair; I will not merge or close it independently of that integration decision. The standalone source has now been refreshed to Final local proof on the refresh: all 38 startup browser tests, three terminal lifecycle tests, and the complete changed-file checks passed. The focused backend integration lane passed 1,250 tests. Two initially over-broad draft-retention assertions were corrected from the persistence owner: a same-owner process restart keeps its draft, while a changed or missing principal must clear the previous owner's prompt. The final startup run passed all cases. Independent autoreview was scoped-clean at P0, not an all-priority certification. A fresh I also fetched integrated head The previous inspected real-Gateway recording and source-qualified proof remain available. They cover initial discovery, real PTY restoration and shortcut handling, accepted creation, streaming through explicit idle settlement, absence of the false owner warning, and history reload; they are not relabeled as a whole-tree live build of this refreshed commit. This is a handoff of additional verified evidence, not approval of the integrated PR's entire lifecycle patch or a claim that either PR has merged. The separate startup-performance follow-up will preserve this authenticated-hello boundary and the newer pending-start presentation. |
Keep phone formatting and transcript-only styles out of New Session startup. Bind token-free presentation preferences to the mounted Gateway, carry them through composer renders, and suppress unchanged agent publications. Reuse the canonical authenticated-hello recovery owner from #133789 and retire stale discovery tasks synchronously. Proof: isolated full build and changed-file checks, focused preference/discovery tests, 93-state CSS parity, real Gateway PTY/create/stream/settle/history flow, and independent P0-scoped autoreview. The final broad suites and matched timing measurements remain in progress before publication.
Keep phone formatting and transcript-only styles out of New Session startup. Bind token-free presentation preferences to the mounted Gateway, carry them through composer renders, and suppress unchanged agent publications. Reuse the canonical authenticated-hello recovery owner from #133789 and retire stale discovery tasks synchronously. Proof: isolated full build and changed-file checks, focused preference/discovery tests, 93-state CSS parity, real Gateway PTY/create/stream/settle/history flow, and independent P0-scoped autoreview. The final broad suites and matched timing measurements remain in progress before publication.
…6362) * perf(ui): streamline startup runtime ownership Keep phone formatting and transcript-only styles out of New Session startup. Bind token-free presentation preferences to the mounted Gateway, carry them through composer renders, and suppress unchanged agent publications. Reuse the canonical authenticated-hello recovery owner from #133789 and retire stale discovery tasks synchronously. Proof: isolated full build and changed-file checks, focused preference/discovery tests, 93-state CSS parity, real Gateway PTY/create/stream/settle/history flow, and independent P0-scoped autoreview. The final broad suites and matched timing measurements remain in progress before publication. * test(ui): preserve pending session titlebar insets Assert that the pending Chat classes preserve New Session scroll padding across the existing viewport, theme, and motion matrix. Browser CSSOM checks on the reviewed build and baseline confirm the shared stylesheet precedes New Session overrides; no production cascade change is needed. * test(gateway): publish RPC fixture config before yielding Keep mutable testState agent entries in the pinned snapshot before real-IO readers or admitted runs can observe an RPC refresh. Extend the managed-worktree case with the observed interleaving, preserving agent validation and initial/follow-up cwd assertions. Controlled original-order proof fails before the helper repair and passes all 314 cases afterward.
…nclaw#136362) * perf(ui): streamline startup runtime ownership Keep phone formatting and transcript-only styles out of New Session startup. Bind token-free presentation preferences to the mounted Gateway, carry them through composer renders, and suppress unchanged agent publications. Reuse the canonical authenticated-hello recovery owner from openclaw#133789 and retire stale discovery tasks synchronously. Proof: isolated full build and changed-file checks, focused preference/discovery tests, 93-state CSS parity, real Gateway PTY/create/stream/settle/history flow, and independent P0-scoped autoreview. The final broad suites and matched timing measurements remain in progress before publication. * test(ui): preserve pending session titlebar insets Assert that the pending Chat classes preserve New Session scroll padding across the existing viewport, theme, and motion matrix. Browser CSSOM checks on the reviewed build and baseline confirm the shared stylesheet precedes New Session overrides; no production cascade change is needed. * test(gateway): publish RPC fixture config before yielding Keep mutable testState agent entries in the pinned snapshot before real-IO readers or admitted runs can observe an RPC refresh. Extend the managed-worktree case with the observed interleaving, preserving agent validation and initial/follow-up cwd assertions. Controlled original-order proof fails before the helper repair and passes all 314 cases afterward.



Closes #133785 (false Gateway-change warning during New session startup).
Additional instructions
MUST: Keep Allow edits from maintainers enabled for this PR so maintainers can help update the branch when needed.
What Problem This Solves
Fixes an issue where users starting a task from Control UI New session would see “The Gateway changed while this session was starting” when browser recovery initialization finished, even though the same connection had already accepted the task. The recorded flow later opened that same running chat, leaving the warning at odds with the task's actual state.
The same ownership timing also allowed a reconnect to replay a pending create before the replacement principal's recovery scope had been adopted.
Why This Change Was Made
The draft Gateway owner now binds its scope directly from the authenticated hello, while browser recovery readiness continues to gate saved-recovery restoration. Catalog eligibility reads that same canonical identity, so finishing browser migration neither invalidates a current start nor restarts authenticated catalog discovery; the redundant scope/profile projection helpers are removed.
This changes only Control UI ownership projection. It does not change server authentication, authorization, the idempotency ledger, configuration, protocol, persistence formats, or migration behavior. Existing Gateway URL, client, boot, and scope fences remain in place.
User Impact
Normal first-message startup stays busy and opens the admitted session without a false Gateway-change warning. Same-owner reconnects retain the frozen idempotent request; changed principals or Gateway processes remain fail-closed rather than replaying uncertain work. Folder, runner, model, and recovery behavior remain covered by the existing sibling tests. No new operator configuration is required.
Production LOC: +15/−48 (net −33). Tests and test support: +139/−37 (net +102).
Evidence
Refreshed source after the canonical CSS repair
Published refreshed source head:
2a0ab2b09a40bb36bbf6664e6f89c14e820246e1, based onf7f38bcc88a329a0b050a1ffa221496803ccf1ff. That main commit contains #133791 (rewind confirmation and CSS-selector repair), merged as0ee6e0575a90f8c3fce8cd54e173d6b31b0923ef. Its final head wase3c93f8dd99130916e01252d748c371c9bf123ba; comparison with the previously inspected84b2e4c99a296a519b4026bce87d4cd2db4420ecshows only deletion of one changelog line. The canonical three-file UI diff was inspected directly, and the CSS budget remains 54,784 B.The refresh was a conflict-free standard rebase, with no source edits or hook suppression.
git range-diffmarks the Task41 commit equal, and stable patch-id remainsd7fd0cb0163c147de9927311512ebd35365af242. The complete refreshed diff SHA256 is7e4e43ce5c0ed917000d61cc4a3145d5bef555fe3f161310401fe97b74eae9d3; its different blob/header identity reflects the new base, not new repair logic. The ten-file scope and production/test LOC are unchanged. No additional managed review was run for this patch-identical mechanical refresh; the original review and explicit adjudication below remain preserved.The same unit and four-file E2E commands below were rerun on this head: 361 unit tests across 33 files and 35 browser E2E tests across 4 files passed. The complete ten-file changed gate and diff check also passed:
git diff --name-only -z f7f38bcc88a329a0b050a1ffa221496803ccf1ff HEAD | xargs -0 node scripts/check-changed.mjs --The original commit, proof ledger, runtime metadata, and complete original UI bundle were preserved; all 1,191 original UI asset entries were reverified. The fresh canonical full build and subsequent standalone UI rebuild both completed with exit 0. The full build took 41m 57.3s, principally nine serialized runtime/declaration invocations; the final UI bundle built in 1m 33s. No declaration skip, budget increase, timeout override, or retry was used.
Fresh
dist/build-info.json, AST-parsed UI metadata, and the service worker all match commit2a0ab2b09a40bb36bbf6664e6f89c14e820246e1and build ID2026.8.1-2a0ab2b09a40-2026-08-31T05-49-40.341Z. All 1,188 new asset-manifest entries match their actual sizes and SHA256 digests; 792 precompressed sidecars verified. The largest CSS asset is 54,583 B gzip, under the unchanged 54,784 B limit; the complete performance report has no violations.The UI's advisory dirty field is
null, not a claim of dirty or clean source: its bounded Git reader explicitly permits unknown metadata (ui/vite.config.ts:153-159,225-233). Clean source and the unchanged complete patch were verified independently before and after building. The artifact verifier initially overrequireddirty=false; that unsupported assumption was corrected against the producer contract without relaxing commit/version/timestamp/build-ID or asset-hash checks. No product code or build bytes were changed to alter this metadata. These are fresh artifacts of the new commit, not restamped copies of the original build; the build-verification step alone was not live proof; the real-flow evidence below uses the refreshed build.Replacement CI run 33365031747 completed successfully, attempt 1, on exact head
2a0ab2b09a40bb36bbf6664e6f89c14e820246e1. Its recorded main base is9e444a9ea517f2a4004e7caae74a5f4284acdc52; GitHub computed merge9ca35c9ab570981847177baff4f2d83bbc38e3eb. The single watcher exited 0 withSUCCESS, zero pending checks, andGREEN; structured run readback and the current PR head match. No watcher remains active, and the old failed watcher was not restarted. This is CI proof, not real repaired-flow or media proof.Real rebuilt-Control-UI proof
The complete live-proof report now includes inspected before/after media and a continuous recording from the refreshed exact-head build. A fresh Chrome profile on an isolated Gateway completed one Start and one accepted create, opened the original session, displayed the exact requested synthetic reply, and returned to an idle composer without the false warning. No tools or children were produced.
The primary qualified run,
startup-live-02, exited 0 in 36.47 seconds including setup/checks/cleanup. Its sole console error was the selected session's optional workspace-icon 404, paired with actualno-storeand a visible fallback SVG; no unclassified console/HTTP errors or page exceptions remained. All 472 frames of the 18.88-second video were inspected. The browser/context and isolated Gateway were stopped; operator state was untouched.Hydration was already ready at Start: this is normal real-flow proof, not a live delayed-hydration reproduction. Existing controlled browser regressions cover delayed hydration and changed-owner/process fencing. No timing manipulation or recovery-feature override was used. The visible repository badge references the separate public Swarm guidance checkout; runtime/UI identity was independently verified against this PR's
2a0ab2b09a40build.Before — observed false warning after an accepted start:
After — original chat, exact reply, idle composer:
Complete recording:
task41-startup-complete.webm
Original reproduction and focused proof
The inspected before recording contains one accepted UI
sessions.createrequest followed by the exact warning and later navigation to the running chat. That recording subsequently hit an independent completion-observer failure; it is not successful Swarm-completion evidence.The new tests reproduce both warning timings by holding browser recovery hydration: before create acceptance, and after acceptance during chat preparation. No reconnect is injected into either case. On exact original production at
c29f34dc5312530761529e7133afa083911e7959, all 6 targeted regressions failed for their intended reasons; after restoring the byte-identical repair, all 6 passed. Those cases also pin changed/missing handshake-owner replay fences and eliminate redundant hydration-triggered catalog fetches. Missing-owner hello injection is defensive wire-boundary coverage, not a claim that the current supported Control UI producer emits that state.Full focused UI E2E: 35 passed across 4 files:
New-session units: 351 passed across 33 files:
Existing admission/browser identity contracts: 10 passed across 2 shards:
Existing build-admission, browser-client, and application-Gateway contracts: 139 passed across 3 files / 2 shards, including retained build identity on older-schema rejection:
Before committing, the full changed-file gate and diff check passed for the ten-file candidate:
git diff --name-only -z | xargs -0 node scripts/check-changed.mjs --Original completed build checkpoint
The original canonical full build followed by the final standalone UI rebuild completed with exit 0:
The canonical full build's phase total was 5m 47.8s; the final UI bundle built in 4.38s, followed by successful precompression and performance checks (794 finalized sidecars verified).
After all runtime writers completed, the final UI rebuild reused the runtime identity.
dist/build-info.json, the compiled UI metadata, andsw.jsall contain build ID2026.8.1-c29f34dc5312-2026-08-31T03-36-37.786Z. All 1,191 UI asset-manifest entries were verified against their actual sizes and SHA256 digests. The source patch hash remained unchanged before and after building. This is build/artifact proof, not a running-Gateway or live-provider result.Review disposition
Fresh managed Codex review at P0 completed cleanly. The explicitly broader P2 pass returned one finding about an unbound device-placement hello. That finding was rejected after reading the complete producer chain: ordinary Control UI admission requires a device, and its sole device-less exception is trusted-proxy authentication with a required nonempty user principal already attached before hello (
src/gateway/server/ws-connection/connect-policy.ts:81-92,src/gateway/auth.ts:239-253,src/gateway/server/ws-connection/connect-session.ts:418-432). The backend self-pairing exception is a different client id/mode and does not apply to Control UI. Insecure origins and blocked browser storage still mint a device identity.The historical older-v4 promise in #121671 (trusted-proxy cloud recovery) was explicitly superseded by #124971 (one-install/one-version UI coupling) and clarified by #125108 (deliberate admission exemptions). All are included in stable
v2026.8.1; the current and tagged admission sources match. The actual app always sends its build identity, and the olderv2026.6.34closed connect schema rejects that field before hello. The current browser no longer retries without it. Cross-origin, custom-root, and development version mismatch are explicitly unsupported, not hidden compatibility paths (ui/AGENTS.md:39-43). The lower-level legacy-scope test injects hello into a client without the application's build identity; it does not establish supported cross-version admission.The raw P2 report remains
findings/exit 1, not relabeled clean. Effective accepted/actionable findings: 0. No speculative hardening or authentication-policy changes were added. Separate cleanup follow-up: remove the obsolete older-v4 scope fallback/test under Gateway Coupling while preserving credential hashing required by current recovery migration.Related history and source identity
Archive-first discovery and live checks found no open duplicate. #120953 (cloud-draft interruption/dead-end cleanup), fixed by #120970 (accurate interrupted-setup outcomes), concerned tab interruption and worker cleanup rather than this initial-hydration race. #106372 (stale New session discovery after reconnect) is also closed and covers a different trigger.
Original published source head:
934a1e72ea1b5d272e5b18f35d4d68d5967c31ab. The normal-hook commit contains exactly the tested ten-file patch overc29f34dc5312530761529e7133afa083911e7959: SHA2561005400c3ee1c638d51e807e38cad0e9d98cb51aa970b87e8c9df596c50dd143(stable patch-idd7fd0cb0163c147de9927311512ebd35365af242). The local build ran before that commit. Its artifacts were not restamped and intentionally retain the original base commit and dirty-build identity; source equivalence is established by the unchanged complete patch, not by pretending the build ran at the new commit.Current-main comparison at
8249fd61a9183a14063278741093645f8f3b238ffound the three production owners, startup/submission path, and relevant handshake/authentication producers unchanged. Neighboring preference/persistence refactors do not implement this repair; the only overlap among the ten touched files is a non-overlapping test change indraft-place-browser.test.ts. The earlier ten-path byte-identity comparison at9f6d8c5a60b4ce251157e354b459d29037179f57remains historical evidence, not a claim that every neighbor is unchanged today.Remaining landing gates and prior CI history
Real repaired-flow and inspected before/after media proof are complete on the exact refreshed head. Exact-head CI is green; repository-native prepare/merge gates remain outstanding. Marking this PR ready after merge-ref computation was only the native CI attachment procedure, not a landing attestation.
Completed: inspected real-flow before/after media and video are linked above. The live startup proof is separate from controlled timing E2E and does not claim Swarm-completion or changed-owner live replay proof.
Replacement exact-head CI is green as recorded above; the original failed run 33357188954 is historical evidence, not reusable success. It tested merge
3f6ab7556c1bf3d786274fdaf9fad6f8185b68d5: Task41 head934a1e72ea1b5d272e5b18f35d4d68d5967c31abinto main10f5ef53cdc1619d9a8271c66c71ad6e83892934, not the bare locally built source. Four completed jobs stopped at the same largest-CSS gzip gate: 54,809 B versus 54,784 B (+25 B) — real-Gateway UI, build-artifacts, compact-small-29, and compact-small-27. Their tests never ran. Missing Discord proof files are consequential to the aborted build. The single watcher exited 15 while other jobs were still running; no retry or budget change was made.fix(ui): keep rewind confirmation controls accessible #133791 (rewind confirmation and theme-selector repair) has now merged as
0ee6e0575a90f8c3fce8cd54e173d6b31b0923ef, and the refreshed base above includes it. Its actual final head and canonical source were verified rather than assuming that earlier head84b2e4c99a296a519b4026bce87d4cd2db4420ecwas what landed. The earlier owner CI run 33357237325, including its passing build-artifacts and real-Gateway UI jobs against the same original main base, remains historical owner evidence only. It is not green CI for this PR. No competing CSS patch or budget increase was added; the demonstrated red-base failure is the reason for the mechanical refresh.Complete the repository-native review/prepare/merge gates. The current execution environment cannot write the required native review artifacts; no alternative writer or landing bypass was used. This PR remains open and unmerged. CI and live proof belonging to another source candidate are not claimed here.