Repository navigation
test(ui): follow current cloud startup recovery guidance - #170436
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. What this changesThis PR updates cloud-startup browser tests to check the offline outbox count and recovery guidance on the disabled Send button. Example: A failed cloud startup disconnects, and the user queues “later ordinary turn.”
Review scores
ProductKind: Test only · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this maintainer-authored PR corrects obsolete browser-test expectations without changing production behavior, and no actionable introduced defect was found. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherThe Control UI browser suite injects Gateway failures and recovery delays, then checks rendered controls, retained prompts, attachments, and outgoing requests. flowchart TD
A[Cloud startup scenario] --> B[Mock Gateway responses]
B --> C[Control UI recovery owners]
C --> D[Composer and Send button]
C --> E[Retained prompt and outbox]
D --> F[Browser assertions]
E --> F
Technical reviewBest possible solution: Land the test-only expectation update while preserving the existing recovery and delivery assertions. Do we have a high-confidence way to reproduce the issue? Current source shows that the old status-band expectations conflict with intentional rendering behavior; this read-only review ran no target code. Is this the best way to solve the issue? Updating the browser assertions is appropriate because the production presentation was deliberately changed, and the patch preserves the substantive recovery contracts. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 09e616f9babe. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceTests +4. Total +4 across 1 file. Added test files: 0. View PR surface stats
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed October 12, 2026, 8:22 PM ET / October 13, 2026, 00:22 UTC. |
…170309) ## What Problem This Solves Database registration could fail when an unrelated agent deletion changed the journal after claim preparation. The claim compared the whole prepared journal with current rows, rejecting harmless progress even when the claimed identity and paths did not overlap. Check current deletion ownership inside the existing claim transaction. Remove the preparatory journal read, whole-journal equality check and tests that only pinned that check. Lease and registration owners pass their claimed path into state initialization. Current identity, canonical database/WAL paths, cleanup authority, recreation and draining-settlement protections remain. Accepted edge: another deletion may begin or advance after preparation; it blocks the claim only when its current identity or paths overlap. The initialization fixture expects the existing deleted-agent identity error while still requiring refusal before mutation, zero registrations, unchanged schema/version and byte-identical external data. The readiness fixture recognizes the existing five-second competing-deletion wait. Exactly one deletion must succeed; the loser must receive either the target's missing-agent `INVALID_REQUEST` or a typed `UNAVAILABLE` with that target's lease diagnostic and `OPENCLAW_STATE_LEASE_HELD`. The target must disappear from published config after settlement. Accepted edge: the loser can exhaust that existing wait while the winner finishes cleanup. No production deadline changes. The journal refusal originated in `8a5b4af660748aef0c95c47e21be52375b00482c`; the duplicate-deletion fixture in `b1cadeefe0b6fb2f6157ddcfedcb2447041e7fbe`; the bounded-wait contract in `a620ab692463e0ade44db3745ea3da9ab01e0f90`. ## Evidence Integrated HEAD: `72ac96fc119e4a2d1c31514b057ad892427058df`. Integrated MAIN: `4ca02f6c720e6346a0d57b158cc38484fdf5c8da`. The integration was conflict-free. Verified residual: **six files, +93/−111**. Five postimages match reviewed deletion head `ce94ba3922324e3c6169b0472fe6021503cd0cf1`. The lease combines its original one-line initialization-path change with main's independent `a8f00d61f689ef68e7254b1df0e6c7d01a31ac3a` cleanup optimization; verified blob `71b3c9900f2870420b7b43ed8c97a956a948d7d8`. That optimization and its updated quarantine API are preserved. Dependency #170308 landed as `e4f463159d0ae54c4858bf2ab22ba79600fe23cb`; its five files leave this PR's diff. The three source patches (`84104fda0d9aaca059be54d8b6194ed1ef105759`, `1d1fa686923031f262d3597c6f17bcc6493d6477`, `58bd5ad19620164a5732ab3cd6b732dbd7ad998a`) each passed focused formatting/lint, normal hooks and isolated Codex review. Source qualification is separate from execution: the results below belong to logical head `8058068d6c308a9ceae9de52c5eae8d509a65522`, not the new integration. [Ordinary CI](https://github.com/openclaw/openclaw/actions/runs/38321551491) completed **51 successful / 26 skipped jobs**, testing merge checkout `7a7da8312795381bd8f08c024ca090ba574d96de` against main `6315f8adc18ab275a4c933c497113a65bc3f783b`. All six then-changed test files passed, **75 cases**: readiness 1, initialization 13, fence 10, usage admission 18, creation witness 29 and environment capture 4. Readiness took 25.362 seconds; its Vitest invocation took 40.14 seconds. [Agents-delete integration](https://github.com/openclaw/openclaw/actions/runs/38321551491/job/115050900729) passed **3/3**, covering active deletion and both recovery paths, in a 65.90-second invocation. These combined-input passes do not isolate either repair's contribution or explain every historical timeout. [Full-tier graph CI](https://github.com/openclaw/openclaw/actions/runs/38322093813) completed **78 successful / 7 failed / 18 skipped jobs**: six failed leaves plus aggregate. All selected statics completed. Build, production/test types, lint, contracts, boundaries, ratchets and architecture passed; Madge found zero cycles and Kysely guardrails passed. The only failed static was Knip: the same UI rules/files and identical named source/config/scanner blobs failed [scheduled main](https://github.com/openclaw/openclaw/actions/runs/38322669274/job/115054342044). That inherited failure was separately fixed on main in `61edf`; it is not a retroactive Knip pass for 8058068. Runtime dispositions remain explicit: - Registry recovery failed with SQLite BUSY at `BEGIN IMMEDIATE`. The fixture omitted shared-owner shutdown before offline registry mutation. #170427 corrects that lifecycle; its [target](https://github.com/openclaw/openclaw/actions/runs/38325835343/job/115064541796) passed **14/14**, including durable-lineage re-registration, in 33.01 seconds. It landed as `9c3cd35208b2abe21da17f04c4f1afc6fdddc749`; the original lock holder remains unproven. - Recreation cleanup masked an earlier failure with `worker task pool closed`. #170435 preserves the initiating error and landed as `5da455d1ca0f102a68812dfa7a11174e6a3890c8` after both cases passed. The historical initiating failure remains unresolved. - Three cloud-startup assertions matched scheduled main with identical test source. #170436 addresses that separate failure and landed as `bac32528c89133383bcd8c31a397ae76c00b3953` after all eight changed-file cases passed. - Collaborator-scroll failed its initial bottom poll, distinct from scheduled main's later assertion. Three QA-lab cases timed out at 180 seconds: PowerPoint replay, delegation approval and host-command state. Their scheduled counterpart passed; uploaded summaries omit initiating Gateway logs. These remain unclassified. Both config-patch large-shrink cases remain a candidate execution gap. Pre-repair scheduled main `96db2f6dfa4f47fd579a6d8408011950b8af53e1` failed both through request/cleanup timeouts and lingering plugin shutdown. That proves earlier main failure, not a repaired-head pass or cause. Under relaxed landing v4, investigated unknowns remain explicit follow-ups unless evidence establishes a product regression; they are not relabeled inherited or infrastructure. Final integrated-head qualification is recorded below. No aggregate-green, measured SQL/request/T1 savings or new SQL/T1 path is claimed. No schema, durability, retention, permission or public API change. The published-driver update cell is not triggered: this changes bookkeeping within an existing claim transaction, not update, Doctor, migrations/schema, plugin loading or service-manager lifecycle. ### Current integrated-head qualification [CI 38326701752](https://github.com/openclaw/openclaw/actions/runs/38326701752) passed at logical head `72ac96fc119e4a2d1c31514b057ad892427058df`: 47 successful and 26 skipped jobs. Its actual merge checkout was `10ce3566fd8c4ea2d625443a117c187ee73e7c6b`, integrating main `f68922d432000e0907d7788aa586948d9329d1c7`. All three edited test files passed: readiness 1/1 (29.971 seconds), deletion fence 10/10, and initialization 13/13; the real agents-delete integration also passed 3/3. Build, selected production/test types, type-aware lint, source contracts, boundaries and baseline ratchets passed. This run is green; the older combined-run limitations above remain historical evidence. Static qualification for logical head `72ac96fc119e4a2d1c31514b057ad892427058df`: [ordinary CI 38326701752](https://github.com/openclaw/openclaw/actions/runs/38326701752) completed **47 successful / 26 skipped jobs**, including build, production/test types, lint, contracts and boundaries. Its [baseline-ratchet job](https://github.com/openclaw/openclaw/actions/runs/38326701752/job/115067248326) passed; that job unconditionally runs both `check:database-worker-ratchet` and `check:database-dialect-ratchet` under `set -euo pipefail`, so both gates apply and have current-head CI evidence. No numeric T1 or warmed-turn savings are claimed. Madge and Knip were not selected in this ordinary run. Prior [full-tier architecture proof](https://github.com/openclaw/openclaw/actions/runs/38322093813/job/115052830964) found zero Madge cycles. Source comparison supports reusing that proof for this deletion change: its six-file import/export changes are identical to the tested 8058068 candidate, and the sole changed postimage preserves main's independent lease cleanup without changing imports or exports. This is scoped proof reuse, not a fresh whole-repository Madge pass. Prior Knip failed only on source-qualified inherited UI findings; their separate fix `61edf206c15d201e857e6bf8419b30ff4dd1673f` is included in final ancestry. No fresh or retroactive Knip pass is claimed. These static qualifications do not erase the recorded prior runtime failures, remaining config-patch candidate gap, or unclassified QA/collaborator-scroll observations; exact new-head target extraction is recorded separately.
…0436) Align cloud startup assertions with recovery guidance on the disabled Send action and the retained offline outbox count. Preserve attachment custody, queued followers, retry and draft assertions. All eight changed-file cases and selected CI checks pass.
…penclaw#170309) ## What Problem This Solves Database registration could fail when an unrelated agent deletion changed the journal after claim preparation. The claim compared the whole prepared journal with current rows, rejecting harmless progress even when the claimed identity and paths did not overlap. Check current deletion ownership inside the existing claim transaction. Remove the preparatory journal read, whole-journal equality check and tests that only pinned that check. Lease and registration owners pass their claimed path into state initialization. Current identity, canonical database/WAL paths, cleanup authority, recreation and draining-settlement protections remain. Accepted edge: another deletion may begin or advance after preparation; it blocks the claim only when its current identity or paths overlap. The initialization fixture expects the existing deleted-agent identity error while still requiring refusal before mutation, zero registrations, unchanged schema/version and byte-identical external data. The readiness fixture recognizes the existing five-second competing-deletion wait. Exactly one deletion must succeed; the loser must receive either the target's missing-agent `INVALID_REQUEST` or a typed `UNAVAILABLE` with that target's lease diagnostic and `OPENCLAW_STATE_LEASE_HELD`. The target must disappear from published config after settlement. Accepted edge: the loser can exhaust that existing wait while the winner finishes cleanup. No production deadline changes. The journal refusal originated in `ef196de2fc32663008893b38877ac9672abde03e`; the duplicate-deletion fixture in `4e16a5ba99bbc9666f8c879405db065c1279835b`; the bounded-wait contract in `b24ecd1ba02f5f9611d318821fba8e5b4278a6f3`. ## Evidence Integrated HEAD: `72ac96fc119e4a2d1c31514b057ad892427058df`. Integrated MAIN: `a4bd85e2ec974228d49631e98ddf22113e58ed1e`. The integration was conflict-free. Verified residual: **six files, +93/−111**. Five postimages match reviewed deletion head `ce94ba3922324e3c6169b0472fe6021503cd0cf1`. The lease combines its original one-line initialization-path change with main's independent `dda87805565a1f6a8863961c49b0fd84a29679f0` cleanup optimization; verified blob `71b3c9900f2870420b7b43ed8c97a956a948d7d8`. That optimization and its updated quarantine API are preserved. Dependency openclaw#170308 landed as `22d374c75814dcce24a5e6e9ef61aca992900ccf`; its five files leave this PR's diff. The three source patches (`84104fda0d9aaca059be54d8b6194ed1ef105759`, `1d1fa686923031f262d3597c6f17bcc6493d6477`, `58bd5ad19620164a5732ab3cd6b732dbd7ad998a`) each passed focused formatting/lint, normal hooks and isolated Codex review. Source qualification is separate from execution: the results below belong to logical head `8058068d6c308a9ceae9de52c5eae8d509a65522`, not the new integration. [Ordinary CI](https://github.com/openclaw/openclaw/actions/runs/38321551491) completed **51 successful / 26 skipped jobs**, testing merge checkout `7a7da8312795381bd8f08c024ca090ba574d96de` against main `feb893ca13908081c27230530cc88c59ac7c0158`. All six then-changed test files passed, **75 cases**: readiness 1, initialization 13, fence 10, usage admission 18, creation witness 29 and environment capture 4. Readiness took 25.362 seconds; its Vitest invocation took 40.14 seconds. [Agents-delete integration](https://github.com/openclaw/openclaw/actions/runs/38321551491/job/115050900729) passed **3/3**, covering active deletion and both recovery paths, in a 65.90-second invocation. These combined-input passes do not isolate either repair's contribution or explain every historical timeout. [Full-tier graph CI](https://github.com/openclaw/openclaw/actions/runs/38322093813) completed **78 successful / 7 failed / 18 skipped jobs**: six failed leaves plus aggregate. All selected statics completed. Build, production/test types, lint, contracts, boundaries, ratchets and architecture passed; Madge found zero cycles and Kysely guardrails passed. The only failed static was Knip: the same UI rules/files and identical named source/config/scanner blobs failed [scheduled main](https://github.com/openclaw/openclaw/actions/runs/38322669274/job/115054342044). That inherited failure was separately fixed on main in `61edf`; it is not a retroactive Knip pass for 8058068. Runtime dispositions remain explicit: - Registry recovery failed with SQLite BUSY at `BEGIN IMMEDIATE`. The fixture omitted shared-owner shutdown before offline registry mutation. openclaw#170427 corrects that lifecycle; its [target](https://github.com/openclaw/openclaw/actions/runs/38325835343/job/115064541796) passed **14/14**, including durable-lineage re-registration, in 33.01 seconds. It landed as `63201335d1d8ed0b382d9d8c956c7220de680295`; the original lock holder remains unproven. - Recreation cleanup masked an earlier failure with `worker task pool closed`. openclaw#170435 preserves the initiating error and landed as `5c5c206636177d005f11744b1ac037988cb08279` after both cases passed. The historical initiating failure remains unresolved. - Three cloud-startup assertions matched scheduled main with identical test source. openclaw#170436 addresses that separate failure and landed as `9678fba25e0a3ca4d41456a16fa6469b85008070` after all eight changed-file cases passed. - Collaborator-scroll failed its initial bottom poll, distinct from scheduled main's later assertion. Three QA-lab cases timed out at 180 seconds: PowerPoint replay, delegation approval and host-command state. Their scheduled counterpart passed; uploaded summaries omit initiating Gateway logs. These remain unclassified. Both config-patch large-shrink cases remain a candidate execution gap. Pre-repair scheduled main `3272d64317f9c3020301f0a9718b92a5f038f054` failed both through request/cleanup timeouts and lingering plugin shutdown. That proves earlier main failure, not a repaired-head pass or cause. Under relaxed landing v4, investigated unknowns remain explicit follow-ups unless evidence establishes a product regression; they are not relabeled inherited or infrastructure. Final integrated-head qualification is recorded below. No aggregate-green, measured SQL/request/T1 savings or new SQL/T1 path is claimed. No schema, durability, retention, permission or public API change. The published-driver update cell is not triggered: this changes bookkeeping within an existing claim transaction, not update, Doctor, migrations/schema, plugin loading or service-manager lifecycle. ### Current integrated-head qualification [CI 38326701752](https://github.com/openclaw/openclaw/actions/runs/38326701752) passed at logical head `72ac96fc119e4a2d1c31514b057ad892427058df`: 47 successful and 26 skipped jobs. Its actual merge checkout was `10ce3566fd8c4ea2d625443a117c187ee73e7c6b`, integrating main `85fa0260f57b97bcebba146f724455f1e5aff03b`. All three edited test files passed: readiness 1/1 (29.971 seconds), deletion fence 10/10, and initialization 13/13; the real agents-delete integration also passed 3/3. Build, selected production/test types, type-aware lint, source contracts, boundaries and baseline ratchets passed. This run is green; the older combined-run limitations above remain historical evidence. Static qualification for logical head `72ac96fc119e4a2d1c31514b057ad892427058df`: [ordinary CI 38326701752](https://github.com/openclaw/openclaw/actions/runs/38326701752) completed **47 successful / 26 skipped jobs**, including build, production/test types, lint, contracts and boundaries. Its [baseline-ratchet job](https://github.com/openclaw/openclaw/actions/runs/38326701752/job/115067248326) passed; that job unconditionally runs both `check:database-worker-ratchet` and `check:database-dialect-ratchet` under `set -euo pipefail`, so both gates apply and have current-head CI evidence. No numeric T1 or warmed-turn savings are claimed. Madge and Knip were not selected in this ordinary run. Prior [full-tier architecture proof](https://github.com/openclaw/openclaw/actions/runs/38322093813/job/115052830964) found zero Madge cycles. Source comparison supports reusing that proof for this deletion change: its six-file import/export changes are identical to the tested 8058068 candidate, and the sole changed postimage preserves main's independent lease cleanup without changing imports or exports. This is scoped proof reuse, not a fresh whole-repository Madge pass. Prior Knip failed only on source-qualified inherited UI findings; their separate fix `ab7c19fc6d8f2945864812de80b1b70ecee11fa4` is included in final ancestry. No fresh or retroactive Knip pass is claimed. These static qualifications do not erase the recorded prior runtime failures, remaining config-patch candidate gap, or unclassified QA/collaborator-scroll observations; exact new-head target extraction is recorded separately.
After a cloud startup failure, a disconnected chat no longer said that the initial message was unresolved or what to do next. 7661ce5 (#170052) dropped the composer band's pending-send fallback so that connection recovery is explained only on the busy Send button. That is right while connected, where Send is held. Offline, Send stays enabled so later turns can enter the outbox, so the unresolved-initial-turn guidance had no remaining surface. Restore the band for the disconnected state only. Connection-recovery notices stay on Send, as #170052 intended. The cloud startup failure e2e assertion returns to the unresolved-initial-message copy. #170436, #170352 and #170477 had retargeted it at the outbox band and then at band absence. A jsdom regression beside the recovery test covers the offline band without the e2e shard.
After a cloud startup failure, a disconnected chat no longer said that the initial message was unresolved or what to do next. 7661ce5 (#170052) dropped the composer band's pending-send fallback so that connection recovery is explained only on the busy Send button. That is right while connected, where Send is held. Offline, Send stays enabled so later turns can enter the outbox, so the unresolved-initial-turn guidance had no remaining surface. Restore the band for the disconnected state only. Connection-recovery notices stay on Send, as #170052 intended. The cloud startup failure e2e assertion returns to the unresolved-initial-message copy. #170436, #170352 and #170477 had retargeted it at the outbox band and then at band absence. A jsdom regression beside the recovery test covers the offline band without the e2e shard.
…aw#170515) After a cloud startup failure, a disconnected chat no longer said that the initial message was unresolved or what to do next. 90ecb48 (openclaw#170052) dropped the composer band's pending-send fallback so that connection recovery is explained only on the busy Send button. That is right while connected, where Send is held. Offline, Send stays enabled so later turns can enter the outbox, so the unresolved-initial-turn guidance had no remaining surface. Restore the band for the disconnected state only. Connection-recovery notices stay on Send, as openclaw#170052 intended. The cloud startup failure e2e assertion returns to the unresolved-initial-message copy. openclaw#170436, openclaw#170352 and openclaw#170477 had retargeted it at the outbox band and then at band absence. A jsdom regression beside the recovery test covers the offline band without the e2e shard.
What Problem This Solves
The cloud-startup E2E suite still expected the old composer banners after #170052 (7661ce5) intentionally moved recovery guidance to the disabled Send button and retained the outbox count for queued offline input. Scheduled main run 38322669274, job 115054341573, fails three cases on those obsolete expectations.
Assert the current outbox count and the disabled, busy Send action with its complete recovery label. Preserve first-message attachment custody, queued followers, no premature send, retry dispatch, and draft preservation. This is a test-only correction: no visual implementation, SQL/T1 path, schema, SDK, or update behavior changes. LOC: +8/-4 in one file.
Evidence
Focused formatting, basic lint and git diff --check pass. Isolated Codex review found no actionable P0–P2 issues. CI 38326310870 executes head
66c1a442355258208bae4b34093be2891a372eb6at synthetic merge69e77a1310f8e408a5e16f0ff56540500dd497abwith main4ca02f6c. The changed E2E file passes 8/8 in 25.869 seconds, including all three previously failing variants; its selected UI shard passes 20/20 across six files.The complete selected CI run passed, including its aggregate, type, lint, source-contract, architecture, boundary and baseline-ratchet checks. Production source, imports, exports, graph, SQL, worker inventory and dialect inputs are unchanged; broad build, SDK and published-driver proof is outside this fixture-only delta. No skipped job is claimed as a pass.