Skip to content

feat(update): retain run history and share outcome reports - #138690

Merged
steipete merged 11 commits into
mainfrom
steipete/update-run-ledger
Sep 5, 2026
Merged

steipete merged 11 commits into
mainfrom
steipete/update-run-ledger

Conversation

@steipete

@steipete steipete commented Sep 4, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Operators lose a consistent view of an update when the Gateway restarts or the detached updater continues working. Chat, CLI output, and status currently reconstruct different summaries, making a successful maintenance operation hard to distinguish from a failed or abandoned update.

Related: #124396 (transactional update design; this PR supplies its durable history and reporting foundation), #137580 (long detached-update outage with no durable progress view).

Why This Change Was Made

One shared-state update_runs ledger now carries a run ID through Gateway admission, the detached helper, CLI orchestration, the restart sentinel, and boot verification. The first terminal outcome wins, while later observed verification facts can enrich the record. The additive table is lazily ensured at schema version 15; the sentinel keeps ownership of continuation and delivery.

One renderer replaces the separate chat, CLI, and status outcome formatters. The cleanup also shares protocol/ledger vocabulary, preserves useful recovery paths during redaction, bounds JSON without mutating its input, preserves phase timestamps when multibyte diagnostics fill the byte budget, and records Windows cancellation before releasing the process-exit gate. Newer main's verified service-refresh fast path and update-check configuration reload behavior are preserved. CLI validation and ownership checks finish before ledger admission, so rejected invocations preserve existing state and orphaned SQLite journals.

User Impact

Update results include runId; administrators can read update.runs.get and update.runs.list, inspect activeRun/lastRun in status, and receive bounded update.run.changed notifications while a run is active. History survives sentinel consumption. Chat, CLI, and status use the same recorded outcome and recovery guidance. Dry-run previews leave a skipped history entry.

This is the first part of the update-flow campaign. Transactional activation, repair orchestration, and the Control UI flow follow in dependent PRs.

Evidence

Local branch proof:

  • Exact update CLI, ledger, report, Gateway, protocol, helper-lifecycle, startup, and state test selection: 167 files passed, 2,774 tests passed, 3 Windows-native cases skipped on macOS.
  • After the final production cleanup: 396 CLI/recovery tests passed. Against the rebuilt, rebased source: 147 real helper-lifecycle, ledger/WAL-process, and Gateway history-handler tests passed. Final fixture cleanup: 63 post-update/recovery tests passed.
  • pnpm protocol:gen, pnpm protocol:gen:swift, pnpm protocol:gen:kotlin, and the Kysely type generator passed; a post-rebase regeneration produced no additional tracked changes.
  • pnpm build passed twice on earlier candidates; 53 built module/doctor closures and UI budgets passed, with no [INEFFECTIVE_DYNAMIC_IMPORT] warnings. The refreshed final build also passed in seven minutes with no ineffective dynamic-import warnings.
  • Full pnpm check:changed passed on the refreshed head, including all typechecks, architecture/dead-export/lint gates, Android and Swift lint, 1,105 macOS tests across 20 files, schema version 15, and final database/import-cycle/webhook/pairing guards. Earlier attempts exposed a Windows maintenance line limit and obsolete fixtures (fixed), then a missing shared pnpm launcher and disk exhaustion (recovered using the same pinned pnpm 12.1.0).
  • Real isolated CLI smoke with a temporary OPENCLAW_STATE_DIR: pnpm openclaw update --dry-run --json, then pnpm openclaw update status --json. Exactly one terminal skipped / dry-run record; lastRun matched the preview's run ID, and no active run remained. Repeated against the refreshed final production build.
  • Independent Codex review of the refreshed branch and CI repairs: no actionable P0/P1 findings. The current-main refresh changed only a generated Workboard pointer relative to the reviewed patch series; the build regenerates it from the combined sources.
  • CI identified the pre-admission state writes, an outdated protocol owner count, a misplaced DDL exemption comment, and required generated Workboard asset pointers. These are repaired; the rebuilt regression suite passed all 369 tests (358 CLI tests and 11 process tests), including byte-identical pre-existing state on rejection, malformed-config previews, migration markers, and refused handoff journals.
  • Protocol release-train metadata remains pending: the campaign brief specifies 2026.9, while current main requires 2026.8. The current exact-head CI log confirms these two values are its only completed failure; three iOS jobs remain running. No guard was weakened; this blocker awaits campaign-owner direction.

Regression evidence was captured before fixing redaction, phase loss under the multibyte JSON budget, and Windows cancellation during task suspension. Each now passes. Native Windows PowerShell policy, long-path, and reused-PID tests await Windows CI; cancellation assertions cover the Windows owner with mocked native services.

Campaign-branch evidence, not a rerun of this PR: AWS run 9 on September 4, 2026, against campaign commit 8a4db45aff48f6fc7b44add16e5756505450e26f passed all 90 assertions. Across the six update scenarios, run IDs survived the flow, terminal records remained readable through update.runs.get, CLI status returned the matching lastRun, and reports contained the expected outcome.

Campaign scenario Recorded terminal outcome
Successful update succeeded
WebChat-originated update succeeded; completion report in history
Already current skipped / already-current
Poisoned package failed / global-install-failed
Failed candidate canary failed / runtime-verification-failed
Post-activation rollback rolled-back / restart-unhealthy

Those campaign results include later activation and delivery work. They establish cross-process ledger/report integration, not A-only canary, no-op, or rollback guarantees.

Production LOC: +2,545 / -729 (net +1,816); tests and test support: +1,790 / -531 (net +1,259); generated Swift/Kotlin/Kysely and asset pointers: +226; docs: +77. Production growth provides the durable ledger, cross-process identity, history protocol, active-run watcher, and shared reporting. Removed duplicate outcome formatters, JSON traversal and phase vocabularies, redundant cancellation inference, and a one-use Windows recovery wrapper. The legacy restart-sentinel adapter remains for the shipped payload contract.

@clawsweeper

clawsweeper Bot commented Sep 4, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review complete

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

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: android App: android app: web-ui App: web-ui gateway Gateway runtime cli CLI command changes scripts Repository scripts commands Command implementations size: XL maintainer Maintainer-authored PR labels Sep 4, 2026
@steipete
steipete marked this pull request as ready for review September 4, 2026 23:17
@steipete
steipete force-pushed the steipete/update-run-ledger branch from d38217f to 11e6797 Compare September 4, 2026 23:40
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. proof: telegram-e2e This PR needs Telegram Test Server proof with the repository E2E skill. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 4, 2026
@clawsweeper

clawsweeper Bot commented Sep 4, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 4, 2026, 10:57 PM ET / September 5, 2026, 02:57 UTC.

ClawSweeper review

What this changes

Adds persistent update history and shared outcome reports across the CLI, chat, Gateway restarts, and administrator APIs.

Warning

SQLite table change

This PR modifies persisted SQLite tables in src/state/openclaw-state-schema.sql. Prefer a design that avoids changing persisted SQLite tables. If the change is necessary, verify migration and upgrade compatibility against an existing database before merge.

Regression provenance

Possible regression — suspected (reviewed change). No predecessor PR is attributed.

Merge readiness

⛔ Blocked before merge - 10 items remain

Keep open: current main lacks this history foundation, both prior findings remain, and interrupted-run reconciliation is still unresolved.

Priority: P2
Reviewed head: f8e8fd385d75ddabb7c20233caadc330b2992275
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Useful architecture and substantial validation, with three concrete admission and lifecycle defects still blocking readiness.
Proof confidence 🐚 platinum hermit (4/6) Not applicable: The maintainer-authored PR is exempt from the ordinary contributor-proof gate. Its reported CLI smoke exercises ledger admission and status; broader AWS campaign results do not establish this head’s restart-delivery behavior.
Patch quality 🦐 gold shrimp (3/6) 3 actionable review findings remain.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The maintainer-authored PR is exempt from the ordinary contributor-proof gate. Its reported CLI smoke exercises ledger admission and status; broader AWS campaign results do not establish this head’s restart-delivery behavior.
Evidence reviewed 11 items Introduced change and merge identity: Inspected the complete local merge-base-to-head file inventory. The verified test merge records the pinned base first and PR head second; its result retains the problematic CLI metadata assignment.
Prior notice-ownership finding remains: CLI admission spreads nullable control-plane metadata into an object containing runId. A package-target refusal subsequently passes the sentinel writer’s non-null guard; the singleton store replaces session, delivery, and continuation columns.
Prior cross-process discovery finding remains: An empty watcher poll returns without scheduling another read. Wake calls exist in Gateway admission and campaigns, while standalone CLI admission only writes SQLite. The watcher test explicitly invokes the process-local wake function.
Findings 3 actionable findings [P2] Preserve absent control-plane metadata for standalone CLI runs
[P2] Discover standalone CLI admissions after the watcher becomes idle
[P2] Reconcile interrupted executions before reporting them as active
Security None None.

How this fits together

OpenClaw’s updater accepts requests from the CLI, chat, and automatic campaigns, then coordinates installation and Gateway recovery. The new ledger records that work so status commands and completion notices can report the same outcome.

flowchart TD
  A[CLI or chat request] --> C[Update admission]
  B[Automatic campaign] --> C
  C --> D[Persistent update history]
  C --> E[Updater and service recovery]
  E --> D
  E --> F[Restart notice]
  D --> G[Shared outcome report]
  F --> G
  G --> H[CLI status and chat]
Loading

Decision needed

Question Recommendation
Which execution-ownership and reconciliation contract should govern interrupted update runs before the stack treats persisted running rows as live? Complete run-owned reconciliation: Accept and implement durable ownership transfer across Gateway, helper, and updater so abandoned runs can settle safely before landing the stack.

Why: The dependent PR explicitly leaves this blocked on acceptance of a material persistence design, and helper death alone cannot safely distinguish abandoned work from a surviving updater.

Before merge

  • Preserve absent control-plane metadata for standalone CLI runs (P2) - The prior finding remains: this spread turns null into { runId } for a CLI invocation that owns no handoff. On a package install, openclaw update --tag main --yes --json reaches reportPreMutationUpdateFailure, passes the sentinel writer’s non-null guard, and replaces any unrelated pending notice, including its session and continuation. Attach the run ID only to existing owned metadata and cover refusal with a pre-existing pending notice.
  • Discover standalone CLI admissions after the watcher becomes idle (P2) - The prior finding remains: when startup finds no active row, polling ends here. Later CLI admission writes SQLite in another process without waking the Gateway; the only wake calls are process-local Gateway admission and campaign callbacks. Subscribers therefore receive no progress events for that standalone update until another wake or restart. Add cross-process admission discovery and exercise it after an idle Gateway startup.
  • Reconcile interrupted executions before reporting them as active (P2) - A CLI updater killed after admission but before writing a restart sentinel leaves status: running permanently. This query keeps returning that row, and update status prefers it over even a newer completed run; sentinel-based boot recovery cannot settle a run without its sentinel. Add reconciliation at the execution-ownership boundary, including helper-to-updater transfer, rather than treating age or helper PID alone as proof of abandonment. The dependent PR already identifies this lifecycle gap.
  • Resolve merge risk (P1) - An unrelated CLI refusal can replace another update’s pending completion notice and continuation.
  • Resolve merge risk (P1) - Safe interrupted-run reconciliation needs an accepted ownership-transfer contract; elapsed time or a dead helper alone cannot establish that the updater has stopped.
  • Resolve merge risk (P1) - Dry-run now requires writable shared state, and the supplied schema test does not exercise reopening with an older OpenClaw runtime.
  • Complete next step (P2) - Resolve the three findings, confirm the interrupted-run ownership contract, and document fresh-install and upgrade validation for the ledger.
  • Resolve maintainer decision - Resolve the maintainer decision shown above before merge.
  • Review config compatibility - Confirm compatibility and upgrade impact for the changed config or default surface before merge.
  • Add data-model compatibility proof - Confirm migration or upgrade compatibility proof before merge.

Findings

  • [P2] Preserve absent control-plane metadata for standalone CLI runs — src/cli/update-cli/update-command.ts:96-99
  • [P2] Discover standalone CLI admissions after the watcher becomes idle — src/gateway/update-run-watcher.ts:30-33
  • [P2] Reconcile interrupted executions before reporting them as active — src/infra/update-run-ledger.ts:467-469
Agent review details

Security

None.

PR surface

PR surface statistics unavailable: the file list is incomplete.

Review metrics

Metric Value Why it matters
Interpreted LOC delta Production +1,816; tests/support +1,259 net; generated, docs, and tooling excluded Feature growth supplies persistence, cross-process identity, history APIs, and shared reporting while removing duplicate formatters.
Persistent and protocol surface 1 table, 2 indexes, 2 administrator RPCs, and 1 event added; schema version unchanged These additions create a durable compatibility contract across updater and Gateway versions.
Preview behavior 1 existing mode changed: dry-run now writes history Previously read-only previews now require permission to write shared state.

Stored data model

Persistent data-model change detected: database schema: packages/gateway-protocol/src/schema/update-runs.ts, database schema: src/state/openclaw-state-schema.sql, migration/backfill/repair: apps/shared/OpenClawKit/Sources/OpenClawProtocol/GatewayModels.swift, migration/backfill/repair: src/cli/update-cli/progress.ts, migration/backfill/repair: src/cli/update-cli/update-command-service-recovery.ts, migration/backfill/repair: src/infra/update-run-ledger.ts, and 4 more. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Complete ownership and upgrade safeguards (recommended)
    Repair notice custody and discovery, settle the interrupted-run design, and verify writable-state previews plus older-runtime reopen behavior.
  2. Hold the dependent stack
    Keep the reporting stack unlanded until its durable execution lifecycle and compatibility expectations are agreed.

Technical review

Best possible solution:

Keep one ledger and renderer, with preserved notice ownership, cross-process discovery, safe interrupted-run reconciliation, and verified fresh-install and upgrade behavior.

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

Yes, from the pinned PR source: a package-target refusal overwrites absent notice metadata, an idle watcher misses separate-process admission, and a killed updater leaves an active row. These paths were not executed during this read-only review.

Is this the best way to solve the issue?

The shared ledger and renderer are the appropriate owners, but the implementation is incomplete at admission and lifecycle boundaries; extending the singleton sentinel would not provide retained history.

Full review comments:

  • [P2] Preserve absent control-plane metadata for standalone CLI runs — src/cli/update-cli/update-command.ts:96-99
    The prior finding remains: this spread turns null into { runId } for a CLI invocation that owns no handoff. On a package install, openclaw update --tag main --yes --json reaches reportPreMutationUpdateFailure, passes the sentinel writer’s non-null guard, and replaces any unrelated pending notice, including its session and continuation. Attach the run ID only to existing owned metadata and cover refusal with a pre-existing pending notice.
    Confidence: 0.99
  • [P2] Discover standalone CLI admissions after the watcher becomes idle — src/gateway/update-run-watcher.ts:30-33
    The prior finding remains: when startup finds no active row, polling ends here. Later CLI admission writes SQLite in another process without waking the Gateway; the only wake calls are process-local Gateway admission and campaign callbacks. Subscribers therefore receive no progress events for that standalone update until another wake or restart. Add cross-process admission discovery and exercise it after an idle Gateway startup.
    Confidence: 0.99
  • [P2] Reconcile interrupted executions before reporting them as active — src/infra/update-run-ledger.ts:467-469
    A CLI updater killed after admission but before writing a restart sentinel leaves status: running permanently. This query keeps returning that row, and update status prefers it over even a newer completed run; sentinel-based boot recovery cannot settle a run without its sentinel. Add reconciliation at the execution-ownership boundary, including helper-to-updater transfer, rather than treating age or helper PID alone as proof of abandonment. The dependent PR already identifies this lifecycle gap.
    Confidence: 0.97

Overall correctness: patch is incorrect
Overall confidence: 0.97

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P2: This is a useful update-observability improvement with bounded correctness and lifecycle blockers.
  • merge-risk: 🚨 message-delivery: Standalone CLI admission can overwrite an unrelated pending restart notice and its continuation route.
  • merge-risk: 🚨 compatibility: The same-version persistent table and newly writable dry-run path require explicit upgrade and operator-behavior validation.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🐚 platinum hermit 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 maintainer-authored PR is exempt from the ordinary contributor-proof gate. Its reported CLI smoke exercises ledger admission and status; broader AWS campaign results do not establish this head’s restart-delivery behavior.
  • proof: telegram-e2e: This PR needs Telegram Test Server proof with the repository E2E skill. The shared renderer changes Telegram /update replies and post-restart completion reports, which Telegram Test Server can observe.

Evidence

What I checked:

  • Introduced change and merge identity: Inspected the complete local merge-base-to-head file inventory. The verified test merge records the pinned base first and PR head second; its result retains the problematic CLI metadata assignment. (src/cli/update-cli/update-command.ts:96, 587c13fb4075)
  • Prior notice-ownership finding remains: CLI admission spreads nullable control-plane metadata into an object containing runId. A package-target refusal subsequently passes the sentinel writer’s non-null guard; the singleton store replaces session, delivery, and continuation columns. (src/cli/update-cli/update-command.ts:96, f8e8fd385d75)
  • Prior cross-process discovery finding remains: An empty watcher poll returns without scheduling another read. Wake calls exist in Gateway admission and campaigns, while standalone CLI admission only writes SQLite. The watcher test explicitly invokes the process-local wake function. (src/gateway/update-run-watcher.ts:30, f8e8fd385d75)
  • Interrupted-run lifecycle: Active discovery selects persisted status=running without execution-liveness reconciliation. A CLI process killed after admission but before creating its sentinel leaves such a row indefinitely; CLI status prefers it over newer terminal history. The dependent presentation PR explicitly acknowledges the same pre-landing lifecycle problem. (src/infra/update-run-ledger.ts:467, f8e8fd385d75)
  • Storage contract and validation: The ledger uses the shared transaction owner, lazy additive schema creation, bounded diagnostic fields, and first-terminal-wins updates. Tests cover rollback of failed first use, preserved schema metadata, reopening, and concurrent process writes. The older-reader case uses DatabaseSync with the captured prior schema rather than an older OpenClaw runtime. (src/infra/update-run-ledger.test.ts:67, f8e8fd385d75)
  • Current-main and release necessity: Current main’s update status reports installation, channel, and availability without retained run records. Tree inspection found neither the ledger nor watcher on current main or v2026.9.1. No merged replacement is established by the supplied related context. (src/cli/update-cli/status.ts:54, bb147376f771)

Likely related people:

  • steipete: 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.

  • Preserve absent notice metadata and add the competing-notice regression.
  • Verify standalone CLI admission reaches an already-idle Gateway watcher across processes.
  • Complete the accepted interrupted-run ownership design and demonstrate fresh, upgrade, and older-runtime reopen behavior.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (2 earlier review cycles)
  • reviewed 2026-09-04T23:56:44.557Z sha 11e6797 :: blocked before merge. :: [P2] [P2] Preserve absent control-plane metadata for ordinary CLI runs | [P2] [P2] Wake the Gateway watcher for standalone CLI admissions
  • reviewed 2026-09-05T00:56:36.204Z sha 5afa014 :: blocked before merge. :: [P2] [P2] Preserve absent control-plane metadata for ordinary CLI runs | [P2] [P2] Wake the Gateway watcher for standalone CLI admissions

Carry one durable run ID through gateway admission, CLI orchestration,
managed handoff, campaigns, restart sentinels, and boot verification.
Record refusals and native recovery outcomes so every attempt has an
operator-visible result, with bounded redacted metadata in the shared DB.

Add update.runs.get/list and update.run.changed without removing existing
status fields. Use one report renderer for chat, CLI, status, and restart
notices; retain the stable pre-ledger sentinel upgrade adapter.

Keep the existing activation order and detached helper process model.

(cherry picked from commit 13ca668a9d4f788586f03189978fb8fa9b8c651a)
Describe run IDs, history RPCs, report-backed status and restart notices,
and the same-version lazy update_runs table in the shared state DB.

(cherry picked from commit 7e798570f7ddd7f5fcdb5b5684d49da523217c43)
Port precise redaction and immutable JSON bounding, share the run vocabulary,
and regenerate native protocol models. Preserve phase identities and timestamps
when diagnostic details exceed the byte budget.

Record Windows cancellation at the recovery owner before releasing its process
exit gate, including restoration failure. Remove the redundant outer inference.
Cover actual history handlers and retain newer main service-refresh behavior.

Independent Codex P0/P1 review found no actionable findings. Focused ledger,
report, watcher, protocol and history handler proof passed; cancellation tests
failed before the fix and passed afterward. Full validation follows separately.
Admit CLI ledger writes only after validation and ownership checks. Preserve existing history on rejected invocations while verifying valid dry-run records through the built CLI. Align the protocol owner inventory and DDL exemption, and refresh the Workboard asset pointers generated by the additive protocol schemas.
@steipete
steipete merged commit 2bf30ba into main Sep 5, 2026
185 checks passed
@steipete
steipete deleted the steipete/update-run-ledger branch September 5, 2026 03:17
@steipete

steipete commented Sep 5, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 5, 2026
…138690)

* feat(update): persist update runs and share outcome reports

Carry one durable run ID through gateway admission, CLI orchestration,
managed handoff, campaigns, restart sentinels, and boot verification.
Record refusals and native recovery outcomes so every attempt has an
operator-visible result, with bounded redacted metadata in the shared DB.

Add update.runs.get/list and update.run.changed without removing existing
status fields. Use one report renderer for chat, CLI, status, and restart
notices; retain the stable pre-ledger sentinel upgrade adapter.

Keep the existing activation order and detached helper process model.

(cherry picked from commit 13ca668a9d4f788586f03189978fb8fa9b8c651a)

* docs(update): document durable run history and reports

Describe run IDs, history RPCs, report-backed status and restart notices,
and the same-version lazy update_runs table in the shared state DB.

(cherry picked from commit 7e798570f7ddd7f5fcdb5b5684d49da523217c43)

* fix(update): preserve diagnostic paths and terminal run history

Port precise redaction and immutable JSON bounding, share the run vocabulary,
and regenerate native protocol models. Preserve phase identities and timestamps
when diagnostic details exceed the byte budget.

Record Windows cancellation at the recovery owner before releasing its process
exit gate, including restoration failure. Remove the redundant outer inference.
Cover actual history handlers and retain newer main service-refresh behavior.

Independent Codex P0/P1 review found no actionable findings. Focused ledger,
report, watcher, protocol and history handler proof passed; cancellation tests
failed before the fix and passed afterward. Full validation follows separately.

* refactor(update): keep Windows autostart recovery in one owner

* test(update): align fixtures with recovery ownership

* fix(update): preserve state before run admission

Admit CLI ledger writes only after validation and ownership checks. Preserve existing history on rejected invocations while verifying valid dry-run records through the built CLI. Align the protocol owner inventory and DDL exemption, and refresh the Workboard asset pointers generated by the additive protocol schemas.

* fix(gateway): register update.runs methods on the current protocol train

* test(gateway): list update.runs methods on the 2026.8 train

* chore(workboard): refresh built Control UI asset pointer for update run schemas

* fix(gateway): register update.runs methods on the 2026.9 train

* test(gateway): build update run broadcast fixtures with the client registry
vincentkoc added a commit to LiuwqGit/openclaw that referenced this pull request Sep 5, 2026
* refs/remotes/origin/main: (602 commits)
  fix(plugins): trace trust refusals and repair legacy provenance (openclaw#138746)
  perf(sqlite): reuse compiled plugin state point reads (openclaw#138758)
  refactor: type chat prefetch dependencies and clean loading tests (openclaw#138793)
  ci: reduce Doctor test startup and core lint jobs (openclaw#138796)
  feat(update): retain run history and share outcome reports (openclaw#138690)
  chore(deps): update @openclaw/fs-safe to 0.8.1 (openclaw#138500)
  fix: preserve global board ownership from pinning to notifications (openclaw#138675)
  fix(gateway): deliver session catalog updates from slow hosts (openclaw#138674)
  perf(sessions): index pending conversation replies (openclaw#127182)
  perf(auth): reuse ordered provider alias entries (openclaw#138805)
  docs(diagnostics): clarify whole-process CPU metrics (openclaw#138804)
  perf(memory): narrow source reads and stream embedding cache rows (openclaw#138766)
  fix: allow older source on newer Testbox checkouts (openclaw#138782)
  fix(agents): preserve recovered task progress and lifecycle ownership (openclaw#138785)
  perf(codex): reduce rollout tail scan CPU (openclaw#138784)
  perf(gateway): stop projecting history deltas at the byte budget (openclaw#138655)
  fix(build): bound native declaration inputs to checkout (openclaw#138742)
  fix(cli): preserve foreground Gateway argument handling (openclaw#138765)
  fix(ui): align task toolbar with side-panel tabs (openclaw#138769)
  fix(logbook): drain accepted work before closing SQLite (openclaw#138754)
  ...

# Conflicts:
#	src/agents/embedded-agent-runner/compact.queued.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: android App: android app: web-ui App: web-ui cli CLI command changes commands Command implementations docs Improvements or additions to documentation gateway Gateway runtime maintainer Maintainer-authored PR merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. P2 Normal backlog priority with limited blast radius. plugin: workboard proof: telegram-e2e This PR needs Telegram Test Server proof with the repository E2E skill. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. scripts Repository scripts 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.

1 participant