Skip to content

chore: consolidate repeated test fixtures and guards - #198739

Merged
vincentkoc merged 4 commits into
mainfrom
test/reduce-million-lines-20261114
Nov 27, 2026
Merged

vincentkoc merged 4 commits into
mainfrom
test/reduce-million-lines-20261114

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Nov 14, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

Repeated test setup obscures the behavioral branches these suites protect and duplicates fixture lifecycle code.

User Impact

No runtime or product behavior changes. This consolidates test fixtures and case tables while retaining the current-main guards.

Why This Change Was Made

Rebuild the reviewed trim on frozen main a8f3e66b6f998e309385607f76ac2417cc779005 instead of replaying retired workflow policies or already-deleted suites. Shared fixture owners and existing sibling suites retain the actual assertions; four obsolete test files are removed only after their guards move to keepers.

Evidence

  • Prepared signed candidate: 12ff7ac2f9d4c2df675e8b544154cdbb30af8ae2, tree 41185c137ba43c3ccabf779101209862264f50de, rebuilt on frozen main a8f3e66b6f998e309385607f76ac2417cc779005.
  • Test and test-infrastructure delta: +2,088 / -3,322; 1,234 net lines removed across 41 files. Runtime production delta: 0. No scripts/lib production changes.
  • Scoped type-aware oxlint passed on all 36 existing code paths. The subsequent workflow-launcher change also passed fresh oxlint with zero warnings/errors on Blacksmith. oxfmt and whitespace checks passed.
  • All16 selected canonical typecheck graphs passed serially. The affected test-root-scripts graph passed again after the launcher repair on Blacksmith.
  • Combined composer keeper: 27 tests passed. Talk catalog and handler sibling suites: 102 tests passed.
  • Published-candidate CI at 0d0bd212368b3823a9e5a84d9aebafa252cd1181 completed with all required statuses green. Actual job logs confirm24 folded suites plus logs-autofollow (3 tests), including all 30 Linux terminal-observer cases and all 591 package-acceptance cases. This older head is evidence for unchanged inputs, not the final-head gate.
  • Blacksmith Testbox, lease tbx_01m8e64mew2f766sjykqp1ppv4: all 6 private-Gateway UI suites passed at 0d0bd212/tree 74939a20d8702548bd4ce66c74a1174d01cce034. These suites were skipped by ordinary PR CI. Their test/runtime inputs are unchanged by the later single-file launcher repair.
  • The duplicate macOS /bin/bash -c fixture launcher bypassed the existing Linux Bash5 and file-backed Node-stdin owner. It now delegates all 37 compatible callers to runWorkflowShellScript with linuxWorkflow:true, retaining explicit deadlines and normal exit/stdout/stderr contracts. Three read-only source audits checked callers, producer ordering, helper lifecycle and history; assertions and production workflows are unchanged.
  • Before repair, the selected macOS run at 0d0bd212 failed 8 of 15 cases. After repair, the two direct-profile cases and phase-selector case passed on macOS, together with all 6 canonical deadline/stdin helper tests. Generic earlier cat-file messages were not treated as proof of a production defect.
  • The same Blacksmith lease then verified final tree 41185c137ba43c3ccabf779101209862264f50de: fresh oxlint, scripts typecheck, canonical helper suite, selected 15-case release-workflow filter, and private-server ownership guard all completed successfully. The lease was stopped and its terminal state verified; the Actions job's later cancellation is lease cleanup, not a payload failure.
  • Production dependency, all-exports, unused-file and export scans passed; mock-export ratchet passed (6,095 grandfathered factories). The later launcher dedup changes no dependency inputs, exports or import edges requiring these scans to be repeated.
  • Local Codex autoreview initially found one missing composer guard in the index; the 18-by-18 stop-icon assertion was restored and tested. A subsequent scoped review of the launcher change reported no actionable P0-P2 finding; its source-access limitation was covered by direct source inspection and the three caller/owner audits.
  • Final-head required CI and a fresh clean exact-head ClawSweeper review remain mandatory before merge. No skipped, queued, cancelled or inherited run is counted as passing proof.
Blacksmith proof commands

CI=1 OPENCLAW_TESTBOX=1 OPENCLAW_TESTBOX_REMOTE_RUN=1 OPENCLAW_VITEST_MAX_WORKERS=1 was scoped to these commands on the same isolated lease.

node scripts/run-vitest.mjs run --config test/vitest/vitest.ui-e2e.config.ts --configLoader runner \
  ui/src/e2e/guest-typing.real-gateway.e2e.test.ts \
  ui/src/e2e/home-readonly.real-gateway.e2e.test.ts \
  ui/src/e2e/model-add-provider-to-chat.real-gateway.e2e.test.ts \
  ui/src/e2e/model-connection-check.real-gateway.e2e.test.ts \
  ui/src/e2e/model-provider-remove-in-use.real-gateway.e2e.test.ts \
  ui/src/e2e/model-setup-provider-errors.real-gateway.e2e.test.ts \
  --maxWorkers=1
node scripts/run-oxlint.mjs test/scripts/package-acceptance-workflow.test.ts
node scripts/run-tsgo-core-test-shards.mjs --ci-graphs-json '["test-root-scripts"]' --concurrency 1
node scripts/run-vitest.mjs run --config test/vitest/vitest.tooling.config.ts test/scripts/ci-workflow.test-support.test.ts --maxWorkers=1
node scripts/run-vitest.mjs run --config test/vitest/vitest.tooling.config.ts test/scripts/package-acceptance-workflow.test.ts --maxWorkers=1 -t '(?:validates (?:direct|umbrella) (?:(?:stable|full) Telegram deferral=(?:true|false)|beta Telegram deferral=true)|routes only the (?:all|independent|candidate) release-check phase|keeps release publish artifacts and release-note ordering wired|keeps release publication ownership and artifact boundaries wired)$'
node scripts/run-vitest.mjs run --config test/vitest/vitest.tooling.config.ts test/scripts/ci-workflow-guards.test.ts --maxWorkers=1 -t 'keeps private Control UI servers and resource-sensitive files under one serial owner'

The UI command used tree 74939a20; the remaining commands used final tree 41185c13. Both payloads exited 0. The only source difference is the package-workflow launcher described above.

Per-file guard, LOC and execution evidence

CI/unchanged-input execution below is bound to published 0d0bd212; final-tree Blacksmith checks are marked explicitly. Final-head CI and hosted review remain separate landing gates.

File Decision LOC Δ Guard / keeper Execution evidence
config/test-mock-exports-baseline.txt DELETE -4 Remove only four obsolete Talk index mock entries; shared catalog fixture owns those mocks. Mock-export ratchet passed; Talk siblings 102 passed.
extensions/copilot/src/replay-shim.test.ts TRIM -67 Tables retain session-error classifications, unrelated negatives, replay flags, tool names and separate async-tool guard. CI
extensions/google/research-gateway.test.ts TRIM -45 Share auth spies; preserve RPC dispatch, revocation/retirement timing, receipts, account binding and handle snapshots. CI
extensions/voice-call/src/response-model.test.ts TRIM -23 Four success cases retain overrides/inheritance; current-main missing-model throw remains separate. CI
packages/ai/src/providers/openai-completions.test.ts TRIM -56 Four continuation cases retain identity/index behavior, finish placement and exact tool names/arguments. CI
src/agents/exec-approval-result.test.ts TRIM -15 Metadata table retains exact kind/raw/body checks; spoof rejection and participant-specific guidance remain. CI
src/agents/execution-contract.test.ts TRIM -57 Five cases retain activation, provider normalization, family refusal, opt-out and strict override behavior. CI
src/agents/model-ref-profile.test.ts TRIM -12 Existing parser table absorbs four quantization suffix cases; version/profile combinations remain. CI
src/agents/path-policy.test.ts TRIM -10 Retain Windows case/prefix normalization, both escape refusals, root identity and sandbox syntax guards. CI
src/agents/sandbox/context.user-fallback.test.ts TRIM -17 Table Docker/mixed-case/Podman fallback; preserve explicit user, zero-ID and failed-stat cases. CI
src/cli/program/action-reparse.test.ts TRIM +20 Retain real primary/alias replacement, sibling preservation and alias dispatch through registration owners. CI
src/cli/program/root-command-descriptions.test.ts TRIM +30 Retain actual root presence/retirement, requested-entry registration and placeholder replacement. CI
src/commands/agents.list.dep-warning.test.ts DELETE -90 Actual agents entrypoint, async-auth marker and both warning checks folded into channels.list.dep-warning.test.ts. CI (agents/channels keeper)
src/commands/channels.list.dep-warning.test.ts TRIM +19 Shared fixture retains both entrypoints, channels exit guard, async-auth marker and both DEP_PLUGIN_SDK warning paths. CI
src/gateway/client.test.ts TRIM -137 EventEmitter/frame helpers retain first-close suppression, second socket, successful hello and repeated-close reporting. CI
src/gateway/talk/handlers/catalog.test-support.ts TRIM +3 Own shared synthesis/provider stubs for catalog.test.ts and index.test.ts; test-only consumers. Talk catalog/index 102 passed; CI
src/gateway/talk/handlers/index.test.ts TRIM -144 Retain current control/consult boundaries, secret projection, readiness, scopes, human authority and authenticated creator isolation. CI
src/infra/executable-path.test.ts TRIM -29 Four PATHEXT rows retain PATH helper, explicit caller env, bare caller PATH and ambient env. CI
src/infra/gateway-lock.unactionable-timeout.test.ts TRIM -50 Share attempts while preserving exact diagnostics, namespace behavior and all three newer schema/offline custody cases. CI
test/e2e/qa-lab/runtime/package-openclaw-for-docker.e2e.test.ts TRIM -51 Share metadata no-ops and process-tree table; retain parent SIGTERM difference, readiness, timeout, descendant-death and cleanup proof. CI
test/scripts/ci-ui-e2e-ownership.test-support.ts TRIM +1 Recognize extracted model fixture as private-server owner; existing CI ownership guard retains exact serial/project inventory. Blacksmith (final-tree ownership guard)
test/scripts/full-release-validation-at-sha.candidate.test.ts TRIM -12 Use existing publicationSelectionFixture for identical inputs; retain failure, dispatch and recovery assertions. CI
test/scripts/full-release-validation-at-sha.test.ts TRIM -96 Six provenance rows retain signatures/web-flow, tags, open-PR rejection, messages and zero/two dispatch outcomes. CI
test/scripts/installed-terminal-observer.test.ts TRIM -57 Native-first/observed-second helper retains environments, deadlines, exit/stdout equality and caller-specific events. CI
test/scripts/package-acceptance-workflow.test.ts TRIM -51 Retain Telegram deferral and nine scheduling outputs; stronger surviving release-owner test proves notes then dispatch then evidence. Reuse the canonical Bash5/file-backed stdin owner for all 37 launcher callers. CI (591 cases); Blacksmith (final-tree selected filter)
ui/src/components/model-picker.browser.test.tsx DELETE -134 All five old contracts folded into the Solid model-picker keeper. CI (Solid keeper)
ui/src/components/solid/model-picker.browser.test.tsx TRIM +116 Retain disabled groups, 300-option ordering, unknown values, tooltips, sentinel isolation, draft/focus and input/change commit modes. CI
ui/src/e2e/gateway-proxy.test-support.ts TRIM +49 Shared fixture retains trusted-proxy identity, approved scopes, ownership, synthetic provider, role policy and origin. Blacksmith (all 6 private-Gateway consumers)
ui/src/e2e/guest-typing.real-gateway.e2e.test.ts TRIM -17 Share config only; retain readiness for each client's own identity and watched peer before typing checks. Blacksmith (6 private-Gateway suites)
ui/src/e2e/home-readonly.real-gateway.e2e.test.ts TRIM -17 Preserve current owner scope constant, read-only reader, denied send/history and draft-hidden Home checks. Blacksmith (6 private-Gateway suites)
ui/src/e2e/logs-autofollow.e2e.test.ts TRIM -53 Fold scenario retaining cursor/limits, row cap, follow/reader position, append, manual re-enable and zero page errors. CI (3 cases)
ui/src/e2e/model-add-provider-to-chat.real-gateway.e2e.test.ts TRIM -74 Keep current catalog/provider selectors, saved default, authenticated inference and working chat. Blacksmith (6 private-Gateway suites)
ui/src/e2e/model-connection-check.real-gateway.e2e.test.ts TRIM -48 Shared server/pairing retains API-family reasoning and broken-provider checks. Blacksmith (6 private-Gateway suites)
ui/src/e2e/model-gateway.test-support.ts TRIM +102 Shared isolated server/config lifecycle strips host keys, cleans upstream and issues fresh per-open dashboard handoff. Blacksmith (all 6 private-Gateway consumers)
ui/src/e2e/model-provider-remove-in-use.real-gateway.e2e.test.ts TRIM -74 Keep current Remove saved access flow, restored Set API key, remaining provider/default, errors and inference checks. Blacksmith (6 private-Gateway suites)
ui/src/e2e/model-setup-provider-errors.real-gateway.e2e.test.ts TRIM -51 Keep current selectors/messages, strict inner failure deadlines and reasoning caps; existing 180-second outer limit unchanged. Blacksmith (6 private-Gateway suites)
ui/src/pages/agents/memory/view.test.ts TRIM -53 Two rows preserve normal/malformed timestamp ordering, independent expected orders and dataset membership. CI
ui/src/pages/chat/chat-composer-height.browser.test.tsx DELETE -311 Height/overflow/anchoring/context/scope/embedded-cap assertions folded into combined layout keeper. CI (combined keeper 27 cases)
ui/src/pages/chat/chat-composer-layout.browser.test.tsx TRIM +662 Combined setup retains both suites, including replacement-banner abort control and 18-by-18 stop icon. CI
ui/src/pages/chat/chat-composer-width.browser.test.tsx DELETE -380 Gestures, cancellation, callbacks, ranges, presets, unmount and replacement-banner guards folded into layout keeper. CI (combined keeper 27 cases)
ui/vitest.config.ts TRIM -1 Remove stale old model-picker filename only; keep current main additions and Chromium/WebKit keeper discovery. CI (keeper discovery); Blacksmith (ownership guard)

@clawsweeper

clawsweeper Bot commented Nov 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 complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@vincentkoc vincentkoc self-assigned this Nov 14, 2026
@openclaw-barnacle openclaw-barnacle Bot added channel: voice-call Channel integration: voice-call app: web-ui App: web-ui gateway Gateway runtime cli CLI command changes commands Command implementations agents Agent runtime and tooling extensions: google extensions: copilot size: XL labels Nov 14, 2026
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Nov 14, 2026
@clawsweeper

clawsweeper Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: passed.

What this changes

This PR consolidates test fixtures, case tables, and overlapping suites while retaining their behavioral assertions.

Example: A replacement banner hides the chat composer.

  • Before: The width suite separately checks edge retirement and the 18-by-18 stop icon.
  • After: The combined layout suite retains both checks under shared setup and cleanup.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Useful test-only consolidation with preserved contracts, supporting validation, and no blocking finding.
Proof confidence 🐚 platinum hermit (4/6) No user-visible production behavior changes; supplied validation covers the consolidated suites and launcher, with earlier-head evidence distinguished from the pending current-head CI gate.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Test only · Worth it: Yes · Fix scope: Complete
Reason: The maintainer-directed cleanup reduces fixture maintenance without changing runtime contracts or introducing product choices.

Merge readiness

✅ Ready for maintainer review

Keep open: this maintainer-directed consolidation preserves the reviewed guards and removes repeated fixture code without changing production behavior. No blocking defect found; required CI for the pinned head remains in progress.

Reviewed head: 12ff7ac2f9d4c2df675e8b544154cdbb30af8ae2

Before merge

None.

Findings

None.

Tests

  • Suggested test cut ui/src/pages/agents/memory/view.test.ts:908-908: Optionally remove the set-equality assertion: the immediately preceding exact-order assertions already fix membership in both sort modes for every table row.
    • Normal timestamps retain both supplied entries in recent order. Fault: Recent sorting drops memory:older-high-signal while signals sorting remains correct. ui/src/pages/agents/memory/view.test.ts:905: The returned array lacks a key required by the row's independent recent expectation. Input: ui/src/pages/agents/memory/view.test.ts:841-866, ui/src/pages/agents/memory/view.test.ts:893-905
    • Normal timestamps retain both supplied entries in signals order. Fault: Signals sorting drops memory:recent-low-signal while recent sorting remains correct. ui/src/pages/agents/memory/view.test.ts:907: The signals result lacks a key required by the row's independent signals expectation. Input: ui/src/pages/agents/memory/view.test.ts:841-866, ui/src/pages/agents/memory/view.test.ts:893-907
    • Recent sorting retains the entry with a malformed timestamp. Fault: Recent sorting filters memory:malformed-time while signals sorting retains it. ui/src/pages/agents/memory/view.test.ts:905: The malformed-timestamp row explicitly expects both keys in recent order. Input: ui/src/pages/agents/memory/view.test.ts:867-892, ui/src/pages/agents/memory/view.test.ts:893-905
    • Signals sorting retains the entry with a malformed timestamp. Fault: Signals sorting filters memory:malformed-time while recent sorting retains it. ui/src/pages/agents/memory/view.test.ts:907: The malformed-timestamp row explicitly expects both keys in signals order. Input: ui/src/pages/agents/memory/view.test.ts:867-892, ui/src/pages/agents/memory/view.test.ts:893-907
Agent review details

How this fits together

The test infrastructure supplies isolated Gateways, provider fixtures, browser setup, and workflow launchers to suites that exercise existing production owners and check their results.

flowchart LR
  A[Test cases] --> B[Shared fixtures]
  B --> C[Production owners]
  C --> D[Browser and CLI results]
  D --> E[Retained assertions]
  E --> F[CI gate]
Loading

Technical review

Best possible solution:

Retain the consolidation and preserved guards, with the existing required CI gate governing landing.

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

This is test maintenance rather than a reported product failure; the pinned diff establishes the repeated setup being consolidated.

Is this the best way to solve the issue?

Shared fixture owners and case tables fit the authorized scope, and comparison with the original suites found no lost behavioral guard.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 4062efecf7ce.

Provenance checked

  • Composer height and width guards keeps the original intent (402e7f4: Preserve desktop and mobile growth caps, embedded limits, short-pane budgeting, and scroll anchoring; e4300a4 adds width gestures and cancellation.)
  • Model picker browser coverage keeps the original intent (2aca375: The picker moved to Solid while preserving native picker behavior; the consolidated keeper retains selection, grouping, tooltip, custom-input, and focus contracts.)
  • First-provider model setup keeps the original intent (04d93fb: Adding the first provider should activate a usable model and lead to a working chat; the extraction preserves configuration, authenticated inference, and saved-model assertions.)
  • Gateway reconnect and release provenance tests keeps the original intent (20964d3: Reconnect tests protect transient pre-hello recovery; release tests from 2e94b09 protect publication-candidate provenance, and both sets retain their distinct outcomes.)
  • Canonical workflow-shell helper keeps the original intent (unknown: The existing helper documents Bash-version, heredoc, deadline, and descendant-cleanup responsibilities; local git log -S could not complete introduction tracing because historical blobs were unavailable.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

PR surface

Source -1, Tests -1229, Other -4. Total -1234 across 41 files. Added test files: 2.

View PR surface stats
Area Files Added Removed Net
Source 1 0 1 -1
Tests 39 2088 3317 -1229
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 0 4 -4
Total 41 2088 3322 -1234

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Review metrics

Metric Value Why it matters
Production versus test changes Production +0/-0; tests and test infrastructure +2,088/-3,322 The shared fixtures and keepers remove 1,234 net lines while preserving the reviewed contracts.

Labels

Label changes:

  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (1 earlier review cycle)
  • reviewed 2026-11-14T08:30:53.851Z sha 299b36e :: needs changes before merge. :: none

Reviewed November 27, 2026, 5:49 AM ET / 10:49 UTC (Revision 2).

@vincentkoc
vincentkoc force-pushed the test/reduce-million-lines-20261114 branch from 5c489a3 to 8c67ab5 Compare November 16, 2026 18:58
@clawsweeper clawsweeper Bot removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Nov 19, 2026
@vincentkoc vincentkoc changed the title test: consolidate repeated fixtures and behavior matrices chore: consolidate repeated test fixtures and guards Nov 27, 2026
@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

Exact candidate: 12ff7ac2f9d4c2df675e8b544154cdbb30af8ae2. Per-file guard/LOC evidence and scoped proof are in the PR body.

@clawsweeper

clawsweeper Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Nov 27, 2026
@vincentkoc
vincentkoc merged commit c2cfab0 into main Nov 27, 2026
119 checks passed
@vincentkoc
vincentkoc deleted the test/reduce-million-lines-20261114 branch November 27, 2026 11:01
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 28, 2026
* test: preserve CLI contracts while refreshing consolidation

* chore: retain composer replacement abort guard

* test(scripts): reuse the canonical workflow shell runner
tideclaw-bot pushed a commit that referenced this pull request Nov 29, 2026
…205987)

## Class: completion is published before required maintenance finishes

Fleet run `4de610c8-e63d-4336-8e85-a76379cfd934` committed and served the new core, but its completion notice preceded the failed plugin result. The bug is ordering, not the core's status.

The modern Gateway-ready owner now settles once **after** required plugin work and sends one final notice afterward. A failed plugin remains a failed step, not a failed core update or a rollback trigger. Existing CLI following and capability-consent behavior remain; the failed-status/early-exit/backoff experiment is removed.

CLI completion, status, Doctor history and the Control UI reuse the existing `renderUpdateRunSummary` over recorded facts. Running results keep their phase; succeeded results name the installed after-version; skipped results keep their existing reason headline, never a guessed serving state. Failed work names its step and exact recovery command. Startup refusal diagnostics, structured failure facts, rollback compensation reasons, recorded signal output and profile-specific recovery commands remain visible. Existing discriminators distinguish repair and reconciled-history records from core updates. Background completion never rewrites the shared trial, preserving a newer pending trial and restart resumption.

## What this deletes

- `renderUpdateRunReport`, its private recovery hints and cause module.
- Routine Markdown completion publication/refresh, automatic `reportPath` output, and artifact-only admission/options plumbing.
- Obsolete completion-export tests and renderer-only assertions. Ledger, recovery, authority, privacy and step-detail assertions remain on their retained data owners.
- The abandoned failed-status classifier, campaign/retry exceptions, early-return CLI path and associated UI/test allocation.

**Kept deliberately:** explicit consent-gated **Report update failure** GitHub preview/submission, its reservation/receipt authority and sanitized issue artifacts. The remaining `update-failure-report*` code serves that user feature and triage, not routine completion. Identity/recovery and legacy result/sentinel projections remain because those manual-report and sentinel consumers still use them.

No new status, state store, flag, stored-record shape or launcher format.

## Size

`tokei` on this PR's **20 production files**, excluding tests/support/harnesses, against integrated main `6ac896f4cbb8bc29940c625cb1e2b19990e87284`:

| | Before | After | Net |
| --- | ---: | ---: | ---: |
| Production code lines | 7,758 | 7,148 | **−610** |
| Test/support lines | | | **−1,257** |

## Verification

- The earlier base Gateway-owner regression exposed the premature terminal write before plugin settlement. Final owner tests pin delayed settlement, unchanged successful core status, exact plugin recovery, one acknowledged final notice, newer-trial preservation and restart resumption.
- **Earlier focused AWS replay GREEN:** nine observed prepare/status/progress regression cases passed in99s; core and CLI-update types, scoped lint (zero warnings/errors) and format passed. https://crabbox.openclaw.ai/portal/runs/run_e5a8682ccf98bb7765b9d075be801705 . Exact qualified source was `5c6686ad20f50377f6affdec0d948f362dc37851`, tree `5ed1cb6e544fbd93604eea566b550f0c722842c8`, normal carrier `d2821086c00e55c8de35d00d7a4418168ca25a2d`; lease released with `--wait`. This is not claimed as an exact-head run after the later shared-summary/UI refinements.
- **Final pushed head:** `79182af301a6166914840dab9a705f4fa5c72fbd`. Restores the existing installed-runtime admission receipt before stop-and-repair advice, keeps historical summaries informational, and types the captured handoff notice without weakening assertions. Three requested files passed once: guidance32/32, handoff19/19, UI view15/15 (**66/66**). https://crabbox.openclaw.ai/portal/runs/run_ea4006e0b21e09bfbd763abe6e25929a . Qualified source was `985dd796d1` plus those two frozen restores, tree `45fe9f49c964b39806b431cde018432ed6e472fc`, normal carrier `81d874a77bb7de2f72307cca91f827db71ec7850`. Exact AWS lease released with `--wait`, exit0. Final-head CI remains the landing gate.
- **Repair candidate:** `1f223e15a20a04a27a4f745af81fb11b106d9d40`. Plain integrated main `6ac896f4cbb8bc29940c625cb1e2b19990e87284` passed all39 CLI tests on hydrated AWS4CPU/7730MiB, including the #205898 restart-wire case in31ms: https://crabbox.openclaw.ai/portal/runs/run_97637e77b460fbb7176bd261693cabd1 . B's timeout came from its local ledger fixture using a remote run ID; the fixture is corrected without changing main's captured connection contract.
- **Node regression batch:** nineteen files on repair predecessor `eede`, 481passed/4failed/1skipped; core types, scoped lint and format passed. https://crabbox.openclaw.ai/portal/runs/run_fbcf26ce68d5a5a539f63f6ee793237a . The four residuals were an early-return saved-notice recognition bug, two assertions pinning retired reconciled wording, and a native-refusal assertion reading a clipped excerpt instead of its retained structured cause. All are corrected without changing generic ledger storage.
- **Final-head residual proof:** summary18/18, abandoned-repair rows2/2 and native-start refusal1/1 passed; core and CLI-update types plus scoped format passed. https://crabbox.openclaw.ai/portal/runs/run_f4e633ac557bce484d1939c03cf88b3f . Source tree `9112e46c2b3081aab02b3dc9a0dfc1e0c06da55f`, normal carrier `82470c4669b7cc502049fa978dc5ed37defb6c6a`, AWS4CPU/7730MiB. Scoped lint did **not** run: its normal SDK declaration preparation failed first with TypeScript/vscode-jsonrpc `ERR_STREAM_DESTROYED`. No retry or bypass; current-head CI remains the lint gate.
- Historical failed-status screenshots, broad partial qualification and prior reviews describe the superseded design, **not** this head.
- No new upgrade source, death proof, harness test or Linux product campaign is added. Superseded remote proof jobs were cancelled and all their leases released with `--wait`.
- The ready-time settlement owner tests passed on integrated `9aba`: `gateway-trial.test.ts`18/18. Later output refinements do not change that settlement policy. Frozen `01b` UI reproduction observed unit14pass/1fail and E2E8pass/2fail. On repair predecessor `eede`, unit15/15, UI/pages/E2E types and scoped lint/format passed. Final `f087` passed both changed E2E cases (standalone repair history; warning advice and keyboard-accessible output), UI/pages/E2E types, scoped lint and format: https://crabbox.openclaw.ai/portal/runs/run_13701071e15057d5ac5c4ac5e927c65d . Source tree `3c734ef709a186303996517ecad54c5e5d4a0e9c`; exact lease released with `--wait`. The other8 E2E cases passed on `eede` and were intentionally not repeated.
- **Accepted budget cost:** exact `1f223` CI measures chat boot gzip **1,336,500→1,337,028 (+528 B)**, requests21→21; startup+1 B. Base already exceeds its cap, so normal tolerance is64 B (464 B excess). https://github.com/openclaw/openclaw/actions/runs/45885636780/job/140136424955 . Cause: `update-run-projection.ts` synchronously imports the shared summary for the existing card/view projection; the existing async result boundary already imports it dynamically. Ayaan accepted this cost for this PR through Main; no new async plumbing or budget config. Main applies the performance-only override at merge; every other gate remains required.
- **Final-head budget receipt (`79182`):** chat boot gzip **1,336,744→1,337,247 (+503 B)**, requests21→21; startup+1 B, normal tolerance64 B. https://github.com/openclaw/openclaw/actions/runs/45895112042/job/140167696819 . This is below the accepted predecessor's +528 B cost; same synchronous-summary cause, no new plumbing/config. Remaining CI gates are still pending.
- **Latest pushed head: `be86da0464892c10cbe7207ff98228eb1e81758a` (test-only delta).** The shared notice mock uses its production signature; no cast or weakened notice assertion remains. Healthy final recovery without an installed-runtime admission receipt explicitly expects update-again/no-stop advice. Two affected files passed once (**81/81**: handoff19, post-update62), focused Gateway/CLI-update types and lint passed: https://crabbox.openclaw.ai/portal/runs/run_c8784e2fe001772ae88bae53af8d9747 . Qualified source was `79182` plus the frozen test edits; only generic-type wrapping changed mechanically afterward, normal commit hooks passed. No production/budget change.
- The prior ratchet failure is infrastructure: its GitHub annotation says the hosted runner lost communication, leaving the baseline-ratchet step without a verdict. Its log fetch returned BlobNotFound/404. No old-head rerun was accepted or needed; this head's normal CI runs the ratchet again.
- **Latest pushed head: `bf3ab61efbb9dba856bfc4d651c7fc77f44549f2` (one exact-copy test assertion).** Requested same-guest owner-file comparison: plain main `993d0b77`13/13 passed ([run](https://crabbox.openclaw.ai/portal/runs/run_4983803c6c82c64295d7d513ac8b52cd)); `be86`12/13 passed ([run](https://crabbox.openclaw.ai/portal/runs/run_51b38ba2049d66bdf6437b89731bf787)), failing only the expected generic details tail. The actual last notice correctly preserves `commands.restart=false` and its app/operator remedy. This commit changes only the exact expected string, retaining acknowledgement, no-update and last-call/context assertions; no mock runtime or production change. No extra local rerun: new-head CI verifies the migrated expectation.

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

(cherry picked from commit ed8b883)

Release adaptation: Port Gateway run/notice timing and the existing maintenance result contract only; retain beta.2 CLI, Doctor and UI summary surfaces and explicit failure reports. Fold in #208074 abort/grace follow-up where applicable.

Later same-path commits from the pinned scan (separate behavior unless named as folded/selected below): 974d792 fix: keep update status quiet and app-managed updates honest (#208359); 186e941 fix: restore the dependency check on main (#207741); dae01a9 fix: keep other agents running when one store is refused (#208364); c9f7a98 fix: keep container Gateway commands from rolling back host updates (#208271); edb6820 fix: let the Gateway restart while boot plugin maintenance is running (#208074); bb37856 fix: keep Windows WebChat connected during config reloads (#208109); 516166c fix: exit once when gateway run rejects an argument after an update (#208068); 07e96dc fix: restart the Gateway after real plugin repairs (#208207); bd48ff6 fix: avoid restarting the Gateway for plugin timestamp changes (#208119); 259f71c fix: stop Linux service starts from copying the whole agent database (#207969); 7cb8975 fix: keep forked Claude chats separate after a Gateway crash (#208048); 6d300d3 fix: restart launcher-managed Gateways after exit 78 (#207972); 90ff668 fix: stop treating limited access as an Inbox alert (#207737); ec39a90 fix(whatsapp): retain sender for explicit current-message reactions (#190121); 86ca412 fix: show the saved quota reset when chat skips its only model (#207210); c4a675f fix: avoid reloading unchanged plugins after Gateway boot (#207949); 13c67a1 fix: let updates back up deeply nested databases (#207756); e2fcd4d fix: acknowledge updates when the Gateway first becomes ready (#207819); 8933edd fix: name safe recovery when agent schema markers disagree (#207705); 19e9dd6 fix(gateway): keep Linux legacy lock recovery explicit (#207340); 54b5989 test(update): move startup diagnostics to the live CLI (#207589); fbf1aae fix: give safe update ownership guidance and restore legacy result delivery (#207640); 0cbe433 test(gateway): move update admission tests to the current handler (#207545); a922203 refactor(update): remove native post-activation Doctor subprocess (#207585); c72bd9a fix(anthropic): show Claude CLI quota usage from the native login (#207543); 7ac87ad fix: avoid taking service-account ownership during updates (#207563); b3902a2 fix(update): allow in-place updates without a full state copy (#207448); 9fa8d14 refactor: trim redundant gateway test journeys (#207311); 2cf1cb6 test(cli): remove unused private fixture state (#207431); ece7a74 improve(workboard): apply the Control UI glossary and style to Workboard copy; 1c89587 fix: update system service packages without root state changes (#207304); dfd17d0 fix(docker): avoid pre-boot Doctor delays on container recreation (#207200); b616036 refactor(subagents): simplify ACP spawn relay ownership (#207023); 93ca762 improve: reduce allocations when preparing session rows (#207109); adb3716 fix(update): surface boot plugin repair advisories (#207163); f79ef8c fix: finish updates of 2026-11-17 main checkouts automatically on Linux and macOS (#207062); 3c4362b fix(update): preserve exception causes in failure history (#207085); 20c92a4 fix: converge plugins after every Gateway boot (#206926); 3078862 fix(update): clean up rejected Git update worktrees (#207040); 9993328 refactor(subagents): simplify kill claim and ownership handling (#207025); 97815bd refactor(subagents): consolidate registry cleanup and publication guards (#207064); e94f799 refactor(subagents): centralize requester turn matching (#206584); 819935f refactor(test): trim unused plugin fixture setup (#206982); 8ae0874 improve(gateway): avoid redundant cleanup for empty legacy auth stores (#206867); 4849bb7 fix(browser): report crashed tabs as tab-scoped failures (#194682); ea77ca3 refactor: report update failures from recorded runs (#206700); b19387e fix(test): cover SIGBREAK during pending update recovery (#206860); 18e53d8 fix: finish Linux upgrades after a legacy Gateway crashes (#206530); 8bd1863 chore(test): remove unused plugin contract fixture setup (#206812); f1841bc fix: stop repeating unchanged session state in every chat turn (#206766); f9a8f18 fix: clear the update warning after a retired model is repaired (#204778); 4d7e00b fix: let started participant runs and requests finish after an access change (#206747); 35cd392 improve: use less memory when waiting for an agent reply (#206733); 9845bf5 fix(test): keep readiness abort fixtures alive until stopped (#206660); 461f650 fix(ci): keep startup helpers internal (#206649); f89ae43 refactor(subagents): use cleanup and terminal owners in sweeps (#206533); a882e0f fix(agents): preserve task answers when sessions are reused (#126263); ccb6d81 fix: finish core updates when the Gateway is ready (#206560); 74f02b4 fix: refuse root updates of a system service that runs as another account (#206343); 01032b1 fix(update): keep acknowledged run IDs when status is unavailable (#206562); 3ce0582 refactor(subagents): centralize collector replay decisions (#206471); c2cfab0 chore: consolidate repeated test fixtures and guards (#198739); 219b6b0 perf(agents): render the system prompt from one manifest and halve it (#206537); 360e306 refactor(test): remove mocked outbound staging fixtures (#184863); cbdd907 fix: finish release updates after a slow launcher response (#206503); 81fc833 refactor(subagents): own dormant child Stop decisions (#206479); 91d4912 fix(update): stop using foreign recovery records as admission (#206295); 6feeb50 fix: stop 2026-11-17 main Git checkouts from half-switching on a schema update (#206341); be3c73e fix(subagents): finish claimed stops after session rotation (#206405); 5e5bb6e fix(update): round status inspection timeouts (#206250); 41afc0f fix(update): keep successful plugin reload warnings advisory (#206372); 6d86389 fix: finish healthy Git updates after an older verifier exits; da6ec1a fix(update): bound release CLI Gateway waits (#206252); d9a36b3 improve: skip unrelated harness discovery for isolated model calls (#206323); bcdb2ef improve(cli): skip channel and web discovery for model credentials (#206240).
Later PR-number mentions: none Later commit-SHA mentions: none
Pinned PR grep: ed8b883 fix(update): settle after plugins and share one completion summary (#205987)

Co-authored-by: RomneyDa <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling app: web-ui App: web-ui channel: voice-call Channel integration: voice-call cli CLI command changes commands Command implementations extensions: copilot extensions: google gateway Gateway runtime P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XL status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant