Skip to content

fix(gateway): retain late update handoff failures - #148159

Open
vincentkoc wants to merge 4863 commits into
fix/update-gateway-failure-evidence-145388from
fix/update-handoff-failure-evidence-145388
Open

vincentkoc wants to merge 4863 commits into
fix/update-gateway-failure-evidence-145388from
fix/update-handoff-failure-evidence-145388

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Sep 14, 2026 •

Copy link
Copy Markdown
Member

Related: #145388, #145499.

Stacked on #148117; this PR targets that parent branch, not main.

Ready for review; not merge-ready until the parent stack, native/no-loss acceptance, and exact-head hosted CI/review finish.

What Problem This Solves

A late restart-notice or ownership-transfer failure can lose its original cause when cancellation or a later history write also fails. The real helper can also publish a first terminal skipped/cancelled history row after the Gateway has already recorded the distinct late failure; a later writer cannot correct that immutable terminal outcome.

User Impact

Update results and durable failure reports retain the initiating cause. An incompletely saved outcome stays visible instead of announcing that the update finished. No new configuration, schema, protocol, or update authority is introduced. The original reported incidents are not claimed reproduced or resolved.

Why This Change Was Made

Record the distinct late failure before joining real cancellation, preserve the cause through secondary failures, and clear the campaign only after observing a terminal outcome. The helper's cancellation write preserves either a failed admission refusal or a failed late finalization. Ordinary cancellation, successful finalization, and unrelated diagnostic failures retain their existing behavior; no early terminal write is introduced.

This successor preserves Vincent Koc's original contribution and branch ancestry, incorporates the reviewed parent, and resolves the qualified current-main overlap. The unmanaged restart-notice cause-detail gap remains outside this change.

Evidence

Signed candidate f355b8403f34fe8f08fd841e2bfa92e625a967d1 follows 0272acc9d7328ff54cb94b114086765155a65b81 without rewriting contributor ancestry.

  • The predecessor's 39 relevant cases remain source-matched evidence for the unchanged Gateway layer: late handoff 10, unexpected errors 10, handoff failure 18, and real-helper IPC projection 1. Removing the cancellation await made its strengthened durable-ordering regression fail; production bytes were restored and the final file passed.
  • New real-generated-helper IPC and real SQLite regression: original helper fails the late-finalization case while four distinct controls pass; repaired helper passes all five. The tests physically verify private handoff/state stores, join exact helper/parent processes, and check lease release. Existing coverage was not pruned.
  • Final five-case run: 90.85 seconds wall time, including cold worker compilation/cleanup; actual cases 15.381 seconds. Earlier formatted five-case run was 32.91 seconds wall / 11.514 seconds cases. These are local measurements; hosted CI timings remain pending. The predecessor late-handoff file took 71.02 seconds wall with one worker; its paired unexpected-error run took 131.78 seconds.
  • The required two-file changed check passed in 840.97 seconds: production types, all planned test-type shards, full type-aware changed-file lint, three unused-export scans, and repository guards. Formatting, whitespace and the focused temp-lifecycle report also pass. The helper fix adds no counted lines to its existing oversized file.
  • Independent API-direct exact-commit code and whole-test-file quality review found no actionable P0–P2 defects. Review is not runtime/CI proof.
  • The earlier installed transfer case exposed the durable skipped defect. With unchanged assertions, the signed candidate now passes all three real installed launchd/RPC cases: transfer failure (98.28s), sentinel failure (41.29s), and secondary cancellation rejection (71.74s). Each remained running while cancellation was held, retained the original failed finalization after settlement, kept the same serving Gateway PID available, and joined the actual helper/executor with the lease absent. The supported package build and tarball integrity checks passed; source/package/installed-file/process identities were bound.
  • The disposable service was stopped and verified absent; helper processes, lease and handles were settled, its port was free, and consumed package/runtime/state/cache/credentials were removed. The diagnostic overlay is not part of this PR.
  • Hosted CI on this exact head is not green: preflight job 107071148904 fails before Node test planning because complete changed-path metadata is unavailable. The current parent base is still b458db5a27c716c4b7a2e4e1564119de315b4701; the local stacked comparison has 22,972 paths. Downstream skipped checks are not passes. Parent publication and legitimate stack reconciliation remain required; no guard bypass or blind retry.
  • Current-receiver/12-signal, original-child/crash/no-loss, parent publication/base reconciliation, and exact-head hosted CI/review remain separate unfinished gates. No live operator Gateway has been updated or restarted.

@clawsweeper

clawsweeper Bot commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review blocked

Automated review did not run, so no review verdict was produced.

Reason: ClawSweeper could not verify the complete source for this revision.

ClawSweeper will not retry this unchanged revision.

Next step: No contributor action is requested. Maintainers should inspect the linked workflow run.

View the workflow run.

@vincentkoc

Copy link
Copy Markdown
Member Author

@fuller-stack-dev Jason, this draft child preserves late managed-update failure details and keeps separate failures from replacing each other in reports. The parent has 111 scoped tests and four type jobs green; this child's 20-case file and types remain unrun. Source reviews are clean, but native/published-driver and before/after proof gaps remain. Not merge-ready.

@openclaw-barnacle openclaw-barnacle Bot added the gateway Gateway runtime label Sep 14, 2026
@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. P2 Normal backlog priority with limited blast radius. labels Sep 18, 2026
@clawsweeper

clawsweeper Bot commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 18, 2026, 2:48 AM ET / 06:48 UTC.

ClawSweeper review

What this changes

Preserves late managed-update errors in Gateway responses and reports, using a separate diagnostic step to retain earlier failures.

Merge readiness

⛔ Blocked before merge - 4 items remain

Keep open: this member-authored PR retains useful work beyond current main, but its new diagnostic write can silently do nothing after real cancellation finalizes the run.

Priority: P2
Reviewed head: 45f88a3a7abcc18727f2d065f4d51a6506c6af2f

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The scoped diagnostic improvement is useful, but its durable-write ordering fails against the real helper lifecycle.
Proof confidence 🌊 off-meta tidepool Not applicable: The external-contributor proof gate does not apply to this MEMBER-authored diagnostic change, and no authority contract changes. The captured evidence nevertheless leaves the changed Gateway path unexecuted on the child head; parent tests mock cancellation and do not establish native settlement or published-driver compatibility.
Patch quality 🦐 gold shrimp (3/6) 1 actionable review finding remain.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The external-contributor proof gate does not apply to this MEMBER-authored diagnostic change, and no authority contract changes. The captured evidence nevertheless leaves the changed Gateway path unexecuted on the child head; parent tests mock cancellation and do not establish native settlement or published-driver compatibility.
Evidence reviewed 8 items Verified introduced change: The pinned parent-to-head diff adds failure construction and ledger projection after awaited cancellation; cancellation itself already existed.
Cancellation closes the durable run: Before transfer, the helper handles cancel by recording managed-service-handoff-cancelled, then finishes the run in its finally block. The caller awaits child exit, so terminalization can precede the newly added diagnostic write.
Terminal ledger writes are ignored: recordUpdateRunStep only updates running records. finishUpdateRunRecord also preserves the first terminal outcome, so the later finish call cannot repair the missing diagnostic or replace cancellation's outcome.
Findings 1 actionable finding [P2] Persist the late cause before cancellation closes the ledger
Security None None.

How this fits together

The Gateway accepts update requests and hands managed installations to an updater helper. Its restart notice and durable update ledger supply status, lifecycle notifications, and failure reports.

flowchart TD
  A[Update request] --> B[Gateway update handler]
  B --> C[Managed updater helper]
  B --> D[Persist restart notice]
  D --> E{Transfer succeeds?}
  E -->|Yes| C
  E -->|No| F[Cancel helper and retain error]
  F --> G[Update ledger and reports]
Loading

Before merge

  • Persist the late cause before cancellation closes the ledger (P2) - When restart-notice persistence fails after helper admission, real cancellation sends cancel and waits for helper exit. The helper records its cancellation outcome and calls finishUpdateRun before exiting. This newly added recordUpdateRunStep therefore runs on a terminal record and silently does nothing, because the ledger only accepts step writes while running. The RPC contains the cause, but durable reports still lose it. The new cancellation mock never terminalizes the run, hiding this failure. Coordinate diagnostic persistence with helper settlement and cover cancellation that actually finishes the ledger.
  • Resolve merge risk (P1) - The parent branch has advanced and the captured child is conflicted; its integration with the parent's newer recording owner remains unreviewed.
  • Resolve merge risk (P1) - Child-head runtime/type validation and the repository-required published-driver-to-candidate update qualification remain outstanding.
  • Complete next step (P2) - Repair persistence across helper cancellation, refresh the conflicted child against its parent, and validate the resulting head with settlement-aware regression coverage and required update-transition evidence.

Findings

  • [P2] Persist the late cause before cancellation closes the ledger — src/gateway/server-methods/update.ts:710-716
Agent review details

Security

None.

PR surface

Source +20, Tests +196. Total +216 across 4 files.

View PR surface stats
Area Files Added Removed Net
Source 1 29 9 +20
Tests 3 268 72 +196
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 4 297 81 +216

Review metrics

Metric Value Why it matters
Production versus regression coverage Production net +20 lines; tests/support net +196 lines The stated growth supports durable diagnostics, but the cancellation fixture omits the production settlement that determines whether those diagnostics persist.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Retain distinct sanitized failure facts through the existing reporting owner before helper settlement makes the ledger immutable, while guaranteeing cancellation and preserving terminal-outcome ownership.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Retain distinct sanitized failure facts through the existing reporting owner before helper settlement makes the ledger immutable, while guaranteeing cancellation and preserving terminal-outcome ownership.

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

Yes, from source: fail restart-notice persistence after helper admission, then let real cancellation finish the run before the new step write. Execution was not performed.

Is this the best way to solve the issue?

No, not as written: a distinct step preserves separate causes only while the ledger accepts writes; the implementation must account for cancellation terminalizing that ledger.

Full review comments:

  • [P2] Persist the late cause before cancellation closes the ledger — src/gateway/server-methods/update.ts:710-716
    When restart-notice persistence fails after helper admission, real cancellation sends cancel and waits for helper exit. The helper records its cancellation outcome and calls finishUpdateRun before exiting. This newly added recordUpdateRunStep therefore runs on a terminal record and silently does nothing, because the ledger only accepts step writes while running. The RPC contains the cause, but durable reports still lose it. The new cancellation mock never terminalizes the run, hiding this failure. Coordinate diagnostic persistence with helper settlement and cover cancellation that actually finishes the ledger.
    Confidence: 0.98

Overall correctness: patch is incorrect
Overall confidence: 0.97

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 7bc487d39dc9.

Labels

Label changes:

  • add P2: This is a bounded update-diagnostics repair; it does not establish a fix for the related update outages.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🌊 off-meta tidepool and patch quality is 🦐 gold shrimp.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Not applicable: The external-contributor proof gate does not apply to this MEMBER-authored diagnostic change, and no authority contract changes. The captured evidence nevertheless leaves the changed Gateway path unexecuted on the child head; parent tests mock cancellation and do not establish native settlement or published-driver compatibility.

Label justifications:

  • P2: This is a bounded update-diagnostics repair; it does not establish a fix for the related update outages.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🌊 off-meta tidepool and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Not applicable: The external-contributor proof gate does not apply to this MEMBER-authored diagnostic change, and no authority contract changes. The captured evidence nevertheless leaves the changed Gateway path unexecuted on the child head; parent tests mock cancellation and do not establish native settlement or published-driver compatibility.

Evidence

Acceptance criteria:

  • [P1] node scripts/run-vitest.mjs run --config test/vitest/vitest.gateway.config.ts src/gateway/server-methods/update-failure-evidence.test.ts src/gateway/server-methods/update.test.ts src/gateway/server-methods/update-report-run.test.ts.
  • [P1] pnpm tsgo:core.
  • [P1] pnpm tsgo:core:test.
  • [P1] git diff --check.
  • [P1] Demonstrate the cancellation-terminalization regression failing before and passing after the repair; retain published-driver-to-candidate qualification required by AGENTS.md.

What I checked:

  • Verified introduced change: The pinned parent-to-head diff adds failure construction and ledger projection after awaited cancellation; cancellation itself already existed. (src/gateway/server-methods/update.ts:702, 45f88a3a7abc)
  • Cancellation closes the durable run: Before transfer, the helper handles cancel by recording managed-service-handoff-cancelled, then finishes the run in its finally block. The caller awaits child exit, so terminalization can precede the newly added diagnostic write. (src/infra/update-managed-service-handoff.ts:1746, 45f88a3a7abc)
  • Terminal ledger writes are ignored: recordUpdateRunStep only updates running records. finishUpdateRunRecord also preserves the first terminal outcome, so the later finish call cannot repair the missing diagnostic or replace cancellation's outcome. (src/infra/update-run-ledger.ts:548, 45f88a3a7abc)
  • Regression coverage omits helper settlement: The new cancellation mock checks that the run is running and resolves without finalizing it. This allows post-cancellation ledger assertions to pass without modeling the production helper's terminal write. (src/gateway/server-methods/update-failure-evidence.test.ts:433, 45f88a3a7abc)
  • Current main only partially overlaps: Current main records handoff failures before cancellation, but still replaces a managed restart-notice persistence exception with a generic ownership-transfer error. The child's precise cause retention therefore remains useful; source overlap does not establish supersession. (src/gateway/server-methods/update.ts, 7bc487d39dc9)
  • Captured discussion and validation scope: The supplied complete PR body and author comment explicitly identify this as a draft child of fix(gateway): preserve failure details during updates #148117, disclaim resolution of the linked incidents, and say child runtime/type tests and native/published-driver qualification remain outstanding. Parent-only test results do not validate this child. Captured context sourceRevision: 1f3879eea8aa1424c2ef733f6f48b0d7ce0154fcb719d2595b23380c16a20d6b. (45f88a3a7abc)

Likely related people:

  • Peter Steinberger: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rank-up moves

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

  • Repair diagnostic persistence around cancellation and demonstrate a failing-before/passing-after case where cancellation terminalizes the real ledger.
  • Refresh the child against the advanced parent and validate the resulting child head, including the required published-driver transition.

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.

holny and others added 16 commits September 22, 2026 18:36
…able (#155354)

Closes #155298

## What Problem This Solves

Fixes: Matrix progress and tool-activity updates disappear when an asynchronous draft callback cannot access the plugin runtime, even though the final reply still arrives.

## User Impact

User impact: Matrix progress streaming can send and edit previews using its retained account settings and client. Final delivery, encryption, mention handling, and oversized-preview fallback keep their existing behavior; no configuration or migration is needed.

## Why This Change Was Made

Single-event text preparation now calls the existing SDK table-mode and chunk-limit resolvers directly instead of reaching those same functions through the plugin runtime. The account, configuration, native-table setting, and Matrix event-size cap are unchanged. Multi-message chunking remains outside this repair.

The existing partial-preview test now exercises the actual draft send/edit path with the runtime unavailable. Its shared client fixtures move unchanged into test support so the oversized send suite does not grow further.

## Evidence

- [The reporter's normal Gateway before/after logs](#155298) show `Matrix runtime not initialized` before the two helper substitutions, then successful encrypted assistant/tool progress sends afterward on OpenClaw 2026.9.5. These are retained reporter observations, not a newly repeated live Matrix run. The SDK exports and runtime facade select the same resolver implementations.
- On baseline `80b9608a25e191a17e1466d750c2f76a38a38507`, the strengthened consumer regression fails at the real draft callback with `Matrix runtime not initialized`. With the repair, it sends and edits the same threaded draft with retained account limits, keeps mention-looking tool text inert, and stops an oversized preview without another event.
- Focused validation: 106 send tests, 20 draft-stream tests, and the narrow SDK import guard passed (127 total; 42.36s wall). The strengthened consumer case took 17ms. Extension production/test typechecks, scoped type-aware lint, source-size/assertion ratchets, and whitespace checks passed.
- The first hosted run exposed six failures in the per-wire authority fixture: it still supplied a five-character limit through the removed runtime lookup. The fixture now sets the existing Matrix chunk-limit configuration instead. All ten real HTTP authority/redirect cases pass, including revocation between chunks, with durable delivery both enabled and disabled (27.65s wall). Its test-type lane and scoped lint/format checks also pass; production code is unchanged.
- No new live credentials or encrypted transport replay was used. The retained Gateway evidence establishes the reported transport outcome; the local regression covers the consumer boundary with a client fixture. Hosted test timing is not yet available for this revision.

Co-authored-by: Ayaan Zaidi <[email protected]>
* fix(files): keep skill and worker downloads inside staging

* refactor(skills): use fs-safe for bounded download staging

Delegate skill download staging to the released fs-safe Root.create API while retaining the 256 MiB limit, checksum-before-publication ordering, ordinary file mode and pinned destination root. The fetch guard remains the response cancellation owner.

* chore(skills): integrate the main inspection lint fix

Merge the observed main revision containing the fix for the plugin inspection lint failures found by PR CI. Preserve the reviewed Skills-only change and published branch ancestry while refreshing the PR base through a conventional merge.

* chore(skills): incorporate the compile-cache fixture repair

Merge current main with the landed compile-cache fixture cache-isolation repair. Preserve the reviewed three-file Skills download cleanup and the existing branch ancestry. The fixture keeps its timeout and policy assertions unchanged.

* chore: incorporate verified shared main repairs

* chore(skills): incorporate the clock-jump fixture preparation

Co-authored-by: Peter Steinberger <[email protected]>
The isolated stream fixture paid for the shared native worker graph, then
transformed the Gateway and reply runtime again inside its 240-second case.
PR #155606 run 35717163540, job 106711837964 timed out without a completed
scenario. A two-CPU, CI-memory-class replay with the recorded caches and CPU
contention reproduced the deadline: the server import consumed 104.6 seconds
and reply-runtime startup was still pending at timeout.

Host the full Gateway through the existing prepared native fixture and its
managed process/state lifetime. Keep the real HTTP provider, WebSocket RPCs,
all seven scenarios and assertions, per-PR routing, and every existing test
and RPC timeout. Explicitly disable the helper's minimal-Gateway shortcut.

Validation: 20 standalone passes, three full 23-file/297-test shard passes,
and 26 fixture-owner/sibling tests. The same high-contention probe passes in
72.1 seconds instead of timing out at 240 seconds. Removing the original
terminal-event guard makes the native fixture fail its four compatible-text
assertions; restoring it passes all seven scenarios. One-worker cost is
27.63 seconds wall and 6.19 seconds test time. P2 review and scoped static
checks pass, including the type-aware lint canary.
* fix(plugins): preserve retirement failure attribution

Keep host hook failures attributed to their hooks when instance and cache
retirement observers report the same underlying error. Preserve physical
settlement failures and retain distinct error objects with identical messages.

Align catalog and web provider lifetime proofs with the existing forced
retirement and structured provider-error contracts. Verify retained publication
custody, captured-file reads, physical cleanup, and rejection after release.

Validation: 192 lifecycle sibling tests, full changed checks, individual test
cost measurements, and independent P2 review.

* test(plugins): verify retirement identities and capture reads

Preserve every cleanup row and its original error reference when distinct
failures share a message. Prove each retained web search call reads and
parses its captured file even when retirement revokes the final result.

Retain the shared production owner already landed in #154823 and omit
native-catalog assertions covered by current retained-consumer tests.

The two existing test files pass all nine cases. Fault-injection controls
confirm the strengthened assertions catch three prior blind spots, and
selected changed checks plus independent review pass.

Co-authored-by: Peter Steinberger <[email protected]>
* fix(skills): move upload staging and install leases into workers

* test(state): discriminate retired lease cleanup commands

* fix(skills): check upload expiry after worker admission
…hanges (#155648)

Closes #155647

## What Problem This Solves

Fixes meeting-browser elapsed-time budgets changing when the system wall clock moves forward or backward.

## User Impact

Queued browser actions no longer lose their opportunity to run after a forward clock adjustment, and a rollback no longer grants extra time to downstream browser requests. Existing configured limits, tab ownership and permissions remain unchanged.

## Why This Change Was Made

Use `performance.now()` consistently in the existing browser-operation queue and its deadline-producing callers: join, recovery, leave, transcript collection, audio control and runtime probes. Keep request budgets in whole milliseconds and leave epoch timestamps unchanged. No new timer owner, SDK export, configuration option, persisted state or permission is introduced.

## Evidence

The published `openclaw/plugin-sdk/meeting-runtime` entry point drove a built, normal Gateway's authenticated `browser.request` method and an isolated managed Chromium profile against a task-owned local page. The browser transport was real, not a mocked lock callback. Only the SDK driver's `Date.now()` changed; Gateway, CLI, Chromium and host clocks did not.

All three cells used the same 4,000 ms operation budget:

| Case | Baseline `0ed077d` | Candidate `f6f2232` |
| --- | --- | --- |
| Ordinary clock | Both real browser actions completed | Both completed |
| Forward step, +60 s while queued | The first action finished 380 ms after the step, but the queued second action never reached the browser; the caller eventually reported a timeout | Both actions completed; queued completion took 1.373 s |
| Backward step, −60 s while queued | The browser request received 63,725 ms and incorrectly succeeded after 5.297 s of page execution | The request received 3,713 ms and returned the real Gateway `UNAVAILABLE` / `browser request timed out` error; no second completion was shown on the page |

The complete candidate proof took 50.9 s. Gateway and browser processes settled and their ports closed. CLI startup and return overhead are included in recorded elapsed times: this is not a claim that the entire SDK call finishes within exactly four seconds. The proof covers the shared SDK/browser path, not a Google Meet, Teams, audio-device or other vendor-native meeting session.

Two existing join/recovery consumer regressions failed before the repair (one evaluation instead of two; a rollback expanding a 500 ms recovery budget to 60,250 ms). Afterward, all 24 focused tests across five existing files passed in 24.59 s; the two changed cases took 3 ms and 2 ms. The affected `core-test-other` type project, scoped type-aware lint, formatting, whitespace and both ratchets passed. The exact candidate build passed in 286.74 s.

Hosted CI also exposed a test-clock mismatch in the Google Meet caption transport's zero-elapsed fixture. That existing fixture now controls `performance.now()` rather than `Date.now()`, preserving all caption-finalization, state, pinned-route, scope, minimum/maximum-budget and exact 5,000 ms grace assertions. Its 17 tests passed in 39.86 s, and the actual extension test-type project passed in 18.74 s. Production code and all recorded runtime inputs remain byte-identical to the `f6f2232` browser proof above; no new browser execution or rebuild is claimed for this test-only correction.

Co-authored-by: Ayaan Zaidi <[email protected]>
…152057)

* feat(browser): unify local Chrome setup across desktop and terminal

Co-authored-by: fuller-stack-dev <[email protected]>

* feat(browser): unify local Chrome setup across desktop and terminal

OpenClaw-Publication: d19e865e-b5a0-4c70-8876-c1662f6e7ef2

Co-authored-by: fuller-stack-dev <[email protected]>

* chore(linux): format Chrome setup fixture

Co-authored-by: fuller-stack-dev <[email protected]>

* feat(browser): keep desktop Chrome setup local and preserve pairing

Delegate Windows registration to the shared native management owner, preserve
released native bridge compatibility and saved launcher profiles, and integrate
serialized desktop setup through isolated local runtimes.

Co-authored-by: fuller-stack-dev <[email protected]>
Co-authored-by: steipete <[email protected]>

* fix(browser): repair native setup CI contracts

Keep Windows installer dependencies acyclic, validate Unicode within the
package library target, and remove unused private exports. Require all
eight packaged native-host proof cases and update lazy CLI inventory.
Apply native Swift formatter diagnostics without changing behavior.

Co-authored-by: fuller-stack-dev <[email protected]>
Co-authored-by: steipete <[email protected]>

* test(cli): account for plugin-owned browser extension catalog

Keep the core-only registration invariant aligned with the Browser plugin
owner already exercised by its lazy registration tests.

Co-authored-by: fuller-stack-dev <[email protected]>
Co-authored-by: steipete <[email protected]>

* test(macos): retain released Chrome bridge request expectation

Align the native bridge test with the shipped contract1 request retained
by the canonical setup owner, and reject extra legacy payload fields.

Co-authored-by: fuller-stack-dev <[email protected]>
Co-authored-by: steipete <[email protected]>

* test(tui): give command handler harness a unique export

Rename the shared TUI test helper and both consumers to avoid the
Gateway placement harness export collision. No alias or guard waiver.

Co-authored-by: fuller-stack-dev <[email protected]>
Co-authored-by: steipete <[email protected]>

* chore(sdk): allow canonical browser config path resolver

Apply the approved single public-export and callable allowance for
resolveConfigPath. Preserve canonical pre-config path ownership and
all other SDK surface checks.

Co-authored-by: fuller-stack-dev <[email protected]>
Co-authored-by: steipete <[email protected]>

* fix(browser): preserve desktop setup selection and supported actions

Keep native automatic setup selector-free and resolve saved local browser
selection through the canonical setup owner before installation. Respect
Mac action advertisements and the released legacy install projection in
the Apps card, and document the public config-path resolver contract.

Co-authored-by: fuller-stack-dev <[email protected]>
Co-authored-by: steipete <[email protected]>

* fix(auth): retry model selection after concurrent credential refresh

Adopt upstream PR #152426, commit 32298b1, without changing its five source files.

Co-authored-by: fuller-stack-dev <[email protected]>
Co-authored-by: steipete <[email protected]>

* test: preserve native setup selection and await dashboard document

Match the selector-free native CLI arguments exactly and preserve a saved work-profile result. Wait through the existing document-readiness owner only at the quota test browser-proof boundary, after auth assertions.

Co-authored-by: fuller-stack-dev <[email protected]>
Co-authored-by: steipete <[email protected]>

* fix(ui): avoid preloading already imported modules

Remove exact direct static JavaScript imports from lazy preload tables using the emitted build graph. Preserve HTML, lazy-only JavaScript, CSS, and locale hints. Source-exact CI merge reproduction drops startup gzip from 363283 to 362968 bytes without changing budgets. Add a real emitted-bundle regression.

Apply rustfmt layout to the native Chrome selector-free expected arguments.

Co-authored-by: fuller-stack-dev <[email protected]>
Co-authored-by: steipete <[email protected]>

* fix: preserve Chrome profiles and attachment follow-up branch binding

Let the TUI canonical setup controller retain its saved browser profile and project only a bounded returned name. Align both native first-run fixture expectations with selector-free setup.

Join pending chat history before the composer task handoff can expose an admitted attachment to restored-outbox delivery. Preserve idempotency, attachment custody, restored delivery semantics, and all existing assertions and timeouts. Add a deterministic regression reproduced on the exact failed CI merge and its main parent.

Co-authored-by: fuller-stack-dev <[email protected]>
Co-authored-by: steipete <[email protected]>

* test(state): adopt canonical worker-custody fixture repair

Adopt src/plugin-state/plugin-state-worker.test.ts byte-for-byte from upstream bfec65a (#152456).

The former fixture held its late competing owner until after awaiting off-thread acquisition. Preserve that overlap, assert continued host authority checks and noncompletion, release custody, then assert the original result and persisted state. No production locking, guard, deadline or outcome assertion is relaxed.

Both prior failures reproduced on the exact CI main parent with independently installed frozen dependencies and Node 24.19.0. All 12 repaired file tests, selected state-logging types, scoped typed lint and fresh P0-P2 review passed.

Co-authored-by: fuller-stack-dev <[email protected]>
Co-authored-by: steipete <[email protected]>

* fix(browser): retain saved Windows setup profiles

Recover configured extension profiles through bounded serial read-only C# inspection. Select only independently validated current matching descriptors, confirm the selected generation before effects, and leave the single mutation under the existing C# owner. Preserve POSIX behavior, existing manual relay verification and explicit same-profile repair.

Missing descriptors, runtime/origin drift and unknown or changing observations fail closed without automatic mutation. Keep raw management facts private and populate the existing browserProfile field only from validated binding metadata. No ABI, schema, SDK, configuration flag or registry/activation owner change.

29 actual CLI/controller/Windows-adapter boundary cases plus sibling coverage: 94 tests pass. Canonical changed checks, full production build and fresh independent P0-P2 review passed. Actual C# native proof remains separately coordinated.

Co-authored-by: fuller-stack-dev <[email protected]>
Co-authored-by: steipete <[email protected]>

* fix(browser): preserve saved profiles after POSIX bundle relocation

Separate validated native registration ownership from supported origin-migration readiness. Recover the profile only after full private manifest and exact launcher validation; preserve the existing one-slot migration rule and all unsupported-origin, ACL and foreign-host refusals. Fail closed before selector-free installation when the saved selection cannot be proved.

Extract the unchanged shared origin helpers into a cohesive sibling to satisfy the existing line-cap guard without waivers. Windows admission, ABI and selector behavior remain unchanged.

Actual Linux/Darwin CLI-to-filesystem relocation regressions: 18 failures on original production, all 22 cases repaired. Preserve the private relay key and inode, config, Chrome preferences, work relay19444 and explicit-profile intent. 137 focused tests, eight real POSIX native-host E2E cases, canonical changed checks, full production build and fresh P0-P2 review passed.

Co-authored-by: fuller-stack-dev <[email protected]>
Co-authored-by: steipete <[email protected]>

* fix(ui): retain input handoff through the shared outbox owner

Remove the superseded pending-history no-yield workaround after main introduced foreground submission custody in the shared outbox owner. Restore chat-submit-guard.ts exactly to pinned main cc7 rather than retaining competing timing policies. Keep passive drains fenced while the input task yields.

Preserve the retained history regression with explicit MessageChannel admission, no passive send before resume, and the same terminal leaf, idempotency key, attachment bytes and exactly-once assertions after completion. Original composed source fails all five focused cases; the repair passes 67 handoff/attachment cases and 20 real Chromium cases in the canonical secretless network-none runner. Canonical checks, UI build/performance and fresh P0-P2 review pass. No assertion, timeout, origin or proxy-policy weakening.

Browser POSIX/Windows repairs remain byte-identical to accepted255f. The failed e40e CI receipts remain preserved; fresh exact-head CI and parent handoff are still required.

Co-authored-by: fuller-stack-dev <[email protected]>
Co-authored-by: steipete <[email protected]>

* fix(tasks): preserve reads across native event finalization

Hand joined event publication to its exact native successor after the native
flow and observer publication frame completes. Keep worker settlement and
cleanup, reversible claim transfer, current-authority and ABA checks, and
post-commit delivery in their existing owners without replaying writes.

Cover pre-result and readback finalization, native and reentrant successor
chains, rollback, failed publication, delivery, and terminal activity cleanup.

Co-authored-by: fuller-stack-dev <[email protected]>
Co-authored-by: steipete <[email protected]>

* test(ui): retain rail baseline geometry on readiness failure

Keep the exact existing readiness predicate, fixtures, case inventory, assertion and timeout. When the predicate is false, retain synthetic marker identity and numeric geometry so hosted CI can distinguish scroll, visibility and viewport failures.

This is diagnostic evidence, not a repair or waiver of the unresolved rail failure. Local rootless browser infrastructure is unavailable; the existing hosted CI lane will verify the reviewed task-publication repair and collect meaningful rail evidence. Canonical changed checks and P0-P2 diagnostic review pass.

Co-authored-by: fuller-stack-dev <[email protected]>
Co-authored-by: steipete <[email protected]>

* docs(linux): describe saved-profile Chrome setup selection

Match the selector-free adapter argument vector and its regression test. Address the fresh P3 review finding without changing runtime behavior. Markdown syntax and diff checks pass; the generic formatter excludes this subtree.

Co-authored-by: fuller-stack-dev <[email protected]>
Co-authored-by: steipete <[email protected]>

* test(transcripts): join configured startup before cleanup faults

Observe and await the real startTranscripts promise through a narrow call-through spy while retaining the configured service entry point and real SQLite/provider work. Bind the await to the existing test lifetime instead of charging startup to the subsequent short active-map poll.

Gate provider return after persisted utterance to prove readiness does not settle early; retain both missing/unreadable row injections and all cleanup, private-source, lifecycle-token and summary assertions. Cover real startup rejection explicitly. No production change, timeout increase, retries or broad module/storage mocks.

The deterministic ordering boundary fails with the old fire-and-forget readiness and passes with the real promise join. Final 39 tests across 3 files, canonical changed checks and full-owner P0-P2 review pass. This does not recover whether the historical CI startup was late or rejected.

Co-authored-by: fuller-stack-dev <[email protected]>
Co-authored-by: steipete <[email protected]>

* fix(browser): preserve automatic desktop status inspection

Restore read-only Device-page inspection for current and released Mac bridges while keeping installation and verification explicit. Preserve the native filesystem prerequisite proof, split installer repair tests within the existing line cap, and remove the superseded constant export.

* fix(browser): preserve registered setup configuration

Require canonical setup to match an owned launcher's effective state and
config selection before installation or relay access. Preserve equivalent
implicit/explicit default selections and the saved launch context. Recheck
automatic profile selection before effects and the current manifest before
publication through the existing registration owner. Keep manual install
and relocation repair contracts unchanged.

Cover mismatched configs, legacy selectors, equivalent defaults, selection
drift, and actual bootstrap after refused setup. Restore the missing Command
import in the existing Unix-only companion CLI test.

Focused tests, types, lint, fresh review, clean package build and sealed Mac
ARM64 runtime proof pass. The separate historical clock-jump CI failure has
bounded replay evidence and remains documented without a speculative fix.

Co-authored-by: fuller-stack-dev <[email protected]>

* fix(browser): keep setup registration types acyclic

Move the private registration status contract beside its context policy and
point both consumers at that owner. Remove the publication-module back-edge
without keeping an unused compatibility export.

The full architecture gate, extension production/test types, typed lint and
fresh independent review pass. Node's transformed JavaScript is byte-identical
for all three affected modules, so the existing runtime proof remains valid.

Co-authored-by: fuller-stack-dev <[email protected]>

* test(linux): handle Chrome setup in desktop sharing fixture

Recognize the exact automatic Chrome setup invocation and require its native
no-respawn flag. Keep unknown-command rejection, selected-auth validation,
process-group ownership and joined teardown assertions unchanged.

The original fixture reproduces the CI rejection against the real Linux app.
The repaired fixture passes all nine checks against that same binary, with
five Chrome setup calls and five node starts and joined stops. Fresh review
is clean; production app behavior is unchanged.

Co-authored-by: fuller-stack-dev <[email protected]>

---------

Co-authored-by: fuller-stack-dev <[email protected]>
Co-authored-by: steipete <[email protected]>
Co-authored-by: Peter Steinberger <[email protected]>
)

* fix(android): isolate camera captures and preview staged photos

Serialize camera captures at their process-wide owner, revalidate access
after asynchronous work, and release request-owned CameraX resources.

Preview admitted composer images through the bounded local-image path
without relaxing incoming inline limits or replacing the image viewer.

Co-authored-by: IWhatsskill <[email protected]>
Co-authored-by: VACInc <[email protected]>

* test(android): cover camera cancellation and recovery

Exercise the public camera handlers across contention, lifecycle stop, cancellation and subsequent capture admission. Assert request-owned CameraX bindings and temporary files are released. Production behavior is unchanged.

Co-authored-by: IWhatsskill <[email protected]>

* fix(android): size forked Robolectric test workers explicitly

Give Android application test workers a bounded 1 GiB heap rather than inheriting Gradle’s implicit 512 MiB default. The Gradle daemon heap is separate. Full-suite heap analysis reproduced the playout allocation failure and traced dominant retained memory to framework SDK resources and instrumentation. Preserve test order, assertions, PCM fixture, SDKs and application runtime limits.

Co-authored-by: IWhatsskill <[email protected]>

---------

Co-authored-by: IWhatsskill <[email protected]>
Co-authored-by: VACInc <[email protected]>
* perf(ui): reduce automatic session list refetches

Batch session event invalidations over fixed five-second windows and preserve explicit navigation refreshes. Keep cached selected-session lineage from invalidating managed child lists while retaining fresh-read and Gateway-event invalidation.

* perf(ui): align browser and gateway refresh proof

Advance controlled test clocks through the five-second refresh boundary, preserve pre-boundary no-request assertions, and await decoded attachment readiness before opening the recovery account picker.

* perf(ui): cover paced refreshes in gateway event tests

* perf(ui): keep undo available during queued refresh proof
Keep healthy automatically selected auth profiles across conversation compaction for both explicit orders and implicit pools. Remove compaction-only auth-state writes while preserving failure-driven failover, preferred-profile recovery, route isolation, and user/person-linked pins.

The universal behavior change and security-sensitive revision were explicitly approved by Josh. Exact-head hosted CI and required security gates passed.

Co-authored-by: Jason O'Neal <[email protected]>
Co-authored-by: jalehman <[email protected]>
Keep the Gateway's failed finalization reason in the helper's first
terminal ledger write. Retain requested-step refusal handling and leave
ordinary cancellation unchanged.

Exercise real generated helper IPC and source SQLite ledger across five
distinct failure and cancellation controls.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: android App: android app: ios App: ios app: linux app: macos App: macos app: wearos App: wearos app: web-ui App: web-ui channel: a2a channel: buzz channel: discord Channel integration: discord channel: feishu Channel integration: feishu channel: irc channel: matrix Channel integration: matrix channel: mattermost Channel integration: mattermost channel: msteams Channel integration: msteams channel: qqbot channel: signal Channel integration: signal channel: slack Channel integration: slack channel: telegram Channel integration: telegram channel: zalo Channel integration: zalo channel: zalouser Channel integration: zalouser docker Docker and sandbox tooling docs Improvements or additions to documentation extensions: acpx extensions: active-memory extensions: admin-http-rpc extensions: agentsapi extensions: alibaba extensions: amazon-bedrock extensions: amazon-bedrock-mantle extensions: anthropic extensions: anthropic-vertex extensions: apple-fm extensions: arcee extensions: baseten Extension: baseten extensions: brave extensions: browser extensions: byteplus extensions: canvas extensions: cerebras extensions: chutes extensions: clawrouter Extension: clawrouter extensions: clickclack extensions: cloudflare-ai-gateway extensions: codex extensions: cohere extensions: comfy extensions: copilot extensions: copilot-proxy Extension: copilot-proxy extensions: crabbox extensions: deepgram extensions: deepinfra extensions: deepseek extensions: device-pair extensions: diagnostics-otel Extension: diagnostics-otel extensions: diagnostics-prometheus extensions: diffs extensions: github GitHub plugin: link previews and reader extensions: litellm extensions: qa-lab extensions: qwen fleet gateway Gateway runtime maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. plugin: azure-speech Azure Speech plugin plugin: beam Beam session sharing plugin plugin: bonjour Plugin integration: bonjour plugin: code-mode-quickjs plugin: cua-computer plugin: facetime FaceTime plugin plugin: file-transfer plugin: geolocation Geolocation plugin (IP to coarse city) plugin: google-meet plugin: linux-node plugin: migrate-claude plugin: migrate-hermes plugin: onnx plugin: session-share plugin: team-reports plugin: typesafe plugin: workboard rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. security Security documentation size: XL status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.