Commit graph

55 commits

Author SHA1 Message Date
RoboClaw
6fd646e86c
fix: restore npm plugins when core updates roll back (#188978)
Restore the compatible npm plugin cohort and its settings when an update rolls core back after replacing plugins. Preserve later independent plugin/config changes and keep recovery under the existing update owner.

Validation: all 21 PR-caused errors fixed; fresh independent canonical Codex P0-P2 review clean; focused rollback, authority, candidate, lease, Windows, terminal and consumer checks pass. Parent runtime GREEN covers registered rollback, restored Gateway, foreground update.run, published-2026.10.9 upgrade, container death/reopen and 16,826-file payload matches. The older-released-parent gap remains documented.

Landing ruling, 2026-10-31 10:53Z: seven remaining CI failures are inherited and admitted through the native inherited-failure route. Root-help timeout and service-authority each PASSED one exact-head rerun; no main match was found. They are one-off flakes: not PR-caused, and not waived as inherited. The failed broad CI result is retained.

Root-help rerun: https://github.com/openclaw/openclaw/actions/runs/41189435747/job/124509785351
Service-authority rerun: https://github.com/openclaw/openclaw/actions/runs/41189435747/job/124512997230
Full attribution: https://github.com/openclaw/openclaw/pull/188978

Work sessions:
- Implementation and verification: https://team.openclaw.ai/chat/roboclaw/~key/dashboard/78580230-7d1b-4329-a7dd-72554eb66323

Co-authored-by: steipete <58493+steipete@users.noreply.github.com>
2026-10-31 10:57:34 +00:00
Dallin Romney
8ec6c76b5c
fix(test): initialize unchanged plugin update state (#189242)
Initialize the canonical state schema before the unchanged-update fixture writes its plugin install record.

Co-authored-by: roboclaw-bot <309084314+roboclaw-bot@users.noreply.github.com>
Co-authored-by: RomneyDa <6581799+RomneyDa@users.noreply.github.com>
2026-10-31 09:21:19 +00:00
Dallin Romney
9df0ada6fc
fix(release): repair extended-stable validation harness for 2026.9.33 (#172158)
* fix(e2e): switch extended-stable first-hop and plugin-update tag updates to stable

* fix(release): omit waived live files for extended-stable 2026.9.33

* test(e2e): seed the consent scenario host manifest and cover extended-stable hosts
2026-10-14 07:26:58 -07:00
Peter Steinberger
dd1c135435
refactor(scripts): deslop scripts (#166083)
* refactor(scripts): deslop scripts

* fix(scripts): preserve existing timing and restart contracts
2026-10-06 14:51:35 -07:00
Peter Steinberger
3cb68020b6
refactor(scripts): deslop shared tooling
## What Problem This Solves

Repository scripts retain private copies of shared tooling helpers and an unused translation subprocess runner, increasing maintenance work across sibling scripts.

## User Impact

Internal tooling cleanup: existing flags, diagnostics, generated bytes, JSON formats, exit codes, and cleanup policies stay the same. The build wrapper additionally detects forbidden dynamic-import warnings when compiler output splits the warning marker across chunks.

## Why This Change Was Made

- Remove the retired i18n process runner. Its final production caller moved to the shared formatter in #95534; retain real CLI/privacy/provider tests and run their subprocesses with the existing dependency.
- Share Docker resource, signal-trap, platform, workspace-staging, and plugin-selection helpers while retaining each caller's environment precedence and lifecycle decisions.
- Reuse existing E2E fixture JSON/assertion and package-path helpers; retain distinct write modes, recovery ordering, and mounted/frozen harness contracts.
- Share macOS guest desktop-user/home resolution through its existing owner while preserving per-caller timeout policy.
- Route release/mobile flags through the existing version flag specifications, preserving split-only values, duplicate/mode rules, help timing, and error text. Reuse existing retry sleep and comparator owners and remove an unreachable iOS output branch.
- Reuse existing guard entrypoint, failure-trailer, diagnostic-line, and metadata-normalization owners.

Measured reduction: **732 net production lines**, with test changes counted separately. PR tooling and its protected import closure, CI planners/shards, baselines, and generated artifacts are unchanged.

## Fixes Found Along the Way

The tsdown scanner checked each raw output chunk for its warning marker. It now checks the existing combined-line buffer. The regression exercises every split inside the marker and fails on the original source for the intended missing-warning assertion.

## Evidence

- Blacksmith Testbox `tbx_01m3tp4sabwd0807kj9jkqqmbr`: frozen dependency install and candidate source-byte verification; all nine changed test files and 59 selected sibling files passed, including real CLI, package fixture, recovery, Docker harness, and Parallels transport contracts.
- Generated channel metadata is byte-identical; differential metadata normalization cases passed.
- SDK surface check passed. Independent isolated Codex review completed with no P0–P2 findings.
- Initial changed checks caught an invalid direct source import in a proposed snapshot-distance consolidation; that independent change was withdrawn. No boundary exception was added. The final changed checks pass, including script/test lint and Docker shell/scheduler checks; madge reports 0 cycles and the runtime import check reports 0 cycles.
- Per-file single-worker wall time for changed suites: translation 9.92s; Docker helper 38.88s; live Docker auth 1.71s; mobile ref 2.36s; mobile release 6.23s; release preparation 2.42s; version 2.04s; installer 15.01s; tsdown 2.70s. The existing Docker helper suite executes shell/process cleanup and container-command boundary fixtures; new assertions reuse those fixtures. New parser/scanner cases use no sleeps or polling.

Hosted CI will be verified against this PR's exact pushed head. No live deployment or release was performed.
2026-10-01 05:14:07 +00:00
Peter Steinberger
dfd4cc8a5d
fix(e2e): recognize delegated post-core update workers (#160384) 2026-09-28 05:06:29 -07:00
Peter Steinberger
db566b0939
fix(e2e): release lanes misread web search, consent timeouts, Windows temp paths and session status (#160346)
Fixes four release-lane harness bugs that failed 2026.9.7 Full Release Validation independently of the product:

- openai-web-search-minimal selects the agent request by model and exact success prompt instead of the first request quoting the marker (Activity recaps quote it since #147441).
- plugin-update consent package updates use the existing 900 s update-lane budget; timeouts are reported as timeouts with stdout/stderr/ledger paths before JSON parsing.
- Windows packaged upgrade lanes pass the long spelling of the inherited TEMP/TMP/TMPDIR to published updaters (the immutable 2026.9.5 driver mis-compares 8.3 short paths; fixed on main by #151157).
- The QA mock calls session_status through dispatcher-aware capability detection, so the Telegram current-session scenario works under default Tool Search.

Each regression fails on the original harness code and passes with the fix (Testbox).
2026-09-28 03:09:36 -07:00
Dallin Romney
ea3c488f4f
fix(release): qualify frozen candidates with current tooling (#159505) 2026-09-27 00:49:03 -07:00
Peter Steinberger
3e4ab6bed8
refactor: retire pre-June import and verification compatibility (#156285)
* refactor: retire pre-June import and verification compatibility

Remove pre-June task, flow, and plugin-state sidecar imports, obsolete
runtime chunks, package/installer validation exceptions, the old MCP
attachment fallback, and the April self-upgrade lane with its orphan helpers.

Leave retired data files untouched and document migration through 2026.6.1.
Preserve June-and-later contracts and September delivery recovery receipts.

Refs #156190

* docs: route legacy upgrades through 2026.9.5

* test: await Telegram fixture lifecycle events

Replace the setup stopwatch with the actual stop event or terminal run outcome. Keep cancellation assertions and outer execution bounds, and prove early terminal outcomes fail promptly.
2026-09-23 02:22:22 -07:00
Peter Steinberger
eeb450c9cf
fix(update): retain the running updater by hard link instead of copying the package (#155977)
## Summary

`openclaw update` retains the running updater's package tree so its workers survive the installer's replacement (#153764). That retention byte-copied the entire package root (`package.json`, `dist/`, `node_modules/`, 37,309 files / 625 MB for 2026.9.6) with three full `lstat` passes plus a per-file copy and verify. On the release Docker host this ran at ~12 files/s, so every in-place global update stalled in the `validating` phase for well over the E2E harness's 300 s command budget. `Plugin Prerelease` lane `plugin-update` (Full Release Validation 35775979903 → run 35779065106) then reported `update-denied did not return JSON: Unexpected end of JSON input` because `timeout` killed the command before any output.

This keeps the retention semantics and makes it cheap:

- Files are hard-linked into the private runtime directory (`fs.link`), so the inventoried inodes outlive npm's rename/unlink without copying bytes. Bytes are copied only when the filesystem refuses the link (`EXDEV`, `EPERM`, `ENOTSUP`, ...) or when relocation must rewrite the member in place (`.modules.yaml`, `.bin` launchers), so the live package is never edited through a shared inode.
- One walk performs the inventory check, publication, relocation and escape check per entry (was: pre-check pass, directory pass, file pass with two checks, symlink pass, post-check pass, relocation pass, full verify walk).
- After each link the private name is checked to reference the inventoried `dev:ino`; entries sharing an already linked inode (pnpm store hard links) keep every fingerprint field except the change time that the link itself bumps.
- The IO budget watchdog around retention is unchanged.
- `node_modules` stays in the retained tree: retained workers (`dist/**` entrypoints) resolve their dependencies from it.
- The shared copy path used for candidate rehearsal snapshots is unchanged in behavior; its plan rebasing, host-link/alias publication and verification moved to `update-candidate-plugin-tree-links.ts` so both materializers share them.
- Harness: the consent scenario's "did not return JSON" assertion now includes the command's exit code so a `timeout` kill (124) is visible in CI.

## Evidence

- Root cause repro on the exact CI candidate bytes (artifacts `docker-e2e-package-35777886894-1` + `docker-e2e-prepublish-plugin-registry-35777886894-1`): `update --tag core-denied-future.tgz --yes --json` finished `npm i` in 2 min, then sat in `validating` copying `openclaw-update-runtime-*` at 5,264 → 5,513 files in 20 s (~12 files/s); 6,402 files / 102 MB after 9 min; SQLite `update_runs` row `failed/interrupted` when the harness killed it.
- With this change: the same repro (same host, load average ~34) returns the denial payload on stdout with exit 0 (`status: ok`, `postUpdate.plugins.status: warning`, `PLUGIN_CAPABILITY_CONSENT_REQUIRED`, `after.version: 2026.9.99-first-hop.0`) and the whole `update --tag` command completes in 3.5 min end to end (npm install 28 s, canary validation, activation, Doctor). Retention alone, measured directly on the installed 38,678-file package with `withRetainedUpdateRuntime`: 33.9 s to retain (about 1,140 files/s, roughly 95x faster than the copy) and 4.6 s to release.
- Unit tests: `src/infra/update-retained-runtime-tree.test.ts` (link path shares inodes and survives source replacement, `EXDEV` fallback copies bytes with the inventoried mode, changed entries are refused before any link, relocated launcher is copied so the live file is untouched); existing `update-retained-runtime.test.ts` layouts (npm/pnpm/pnpm-workspace/git/git-linked) and `update-candidate-plugin-tree.test.ts` pass.
- `OPENCLAW_TESTBOX=1 pnpm check:changed` and the `plugin-update` Docker lane on the packed candidate: results in the PR comments.
2026-09-22 15:59:40 -07:00
Dallin Romney
021d0d2ae8
fix(e2e): retain candidate registry during plugin repair (#151158) 2026-09-17 15:05:15 -07:00
Peter Steinberger
729ef2a0af
fix(tests): retain pinned selectors in unchanged plugin updates (#145991) 2026-09-12 07:24:30 -07:00
RoboClaw
ebf48672da
fix(e2e): align release fixture contracts (#145946)
* fix(e2e): align release fixture contracts

Preserve consent refusal and diagnostic boundaries, model the stopped Doctor fixture through real read contracts, and handle the explicit single-agent onboarding menu without changing legacy flow or timeout budgets.

Co-authored-by: steipete <58493+steipete@users.noreply.github.com>
Co-authored-by: RomneyDa <6581799+RomneyDa@users.noreply.github.com>

* test(e2e): handle absent consent fixture tag lookup

Keep an absent tag on the existing unprepared-update rejection path while satisfying the strict indexed-access typecheck.

Co-authored-by: steipete <58493+steipete@users.noreply.github.com>
Co-authored-by: RomneyDa <6581799+RomneyDa@users.noreply.github.com>

---------

Co-authored-by: steipete <58493+steipete@users.noreply.github.com>
Co-authored-by: RomneyDa <6581799+RomneyDa@users.noreply.github.com>
2026-09-12 05:48:23 -07:00
Finn763
b6073553b7
fix: recover managed plugin release pins during updates (#133884)
Recover eligible managed plugin release pins and keep individual plugin retry notices separate from successful OpenClaw updates.

Refs #133810, #135776.
Reviewed-by: @shakkernerd
Co-authored-by: Shakker <165377636+shakkernerd@users.noreply.github.com>
2026-09-12 02:46:16 +01:00
Peter Steinberger
9059a46075
test(update): separate unavailable and corrupt plugin recovery (#141624)
Keep an explicit unavailable-target refusal case with unchanged core, config, install records and corrupt payload. Then serve the original plugin archive from an owned registry and retain the successful corrupt-recovery and policy assertions. This preserves the documented plugin availability gate instead of accepting unknown target metadata or bypassing admission.
2026-09-07 15:43:31 -07:00
Peter Steinberger
0d0e2852b2
fix(release): restore verification inputs and supported upgrade proof (#140981)
* fix(qa): verify leased Telegram tester group access

Check tester membership and effective text permission in the leased user driver before group readiness. Reuse the check in doctor and select trusted skill scripts for frozen release candidate QA. Preserve supported private DM turns and leave credential repair to the pool owner.

* ci: install Chromium for native live browser tests

The native-live-test shard includes the real Gateway widget restart proof,
which launches Playwright after restoring the interrupted session. Chromium
was installed only in separate Repo E2E jobs, leaving the live shard without
its required executable.

Install the candidate UI's pinned Chromium and system dependencies only for
the selected native-live-test row. Preserve profile selection and all test
gates. Verified the unchanged dc420 widget restart test with real OpenAI,
Gateway process replacement, and interactive Chromium dashboard assertions
on Blacksmith Testbox; canonical workflow checks and formatting also pass.

* test(release): prove supported cross-OS 9.2 transition

Select the explicitly supported external package-manager and fresh Doctor
transition only for 2026.9.2 to 2026.9.3. Preserve the old updater's safe
schema-15 refusal as negative evidence and never report self-update passed.
Verify backup, exact package identity, schema migration, retained settings
and session history, candidate serving version, and a fresh persisted turn.
Keep credential-bearing backup archives out of CI evidence and remove them
on both successful and failed runs. Other release pairs retain existing
updater and Windows fallback behavior.

Validation: 13 cross-OS upgrade lane tests, two pre-fix regression failures,
full changed checks, and independent review. Real packaged cross-OS/live
qualification remains required against the aggregate candidate.

* test(installer): prove supported historical package transitions

* test(release): exercise same-schema updater boundaries

Keep updater-specific plugin repair and consent checks on the prepared
candidate, then target explicit synthetic later versions with the same
runtime and storage schema. Retain installed-version and plugin-policy
assertions, and remove the obsolete legacy post-update fallback.

Add versioned future-tarball generation to the existing first-hop fixture
owner, with immutable input and source/target digest receipts. Restore the
reserved runtime-promotion staging ignore in package-derived Git fixtures
so the updater's unchanged-source check stays meaningful.

Validation: 26 focused tests, a pre-fix Git staging regression, full changed
checks, exact candidate tarball fixture generation, and P2 review. Actual
Docker update/consent/channel qualification remains required in aggregate CI.

* test(release): verify channel update staging cleanup

Assert the real channel flow refuses ordinary untracked user files without changing source, then require successful channel updates to remove every reserved runtime staging entry. Preserve recovery data when the assertion detects leftovers. No ignore or production cleanup policy is broadened.

* test(onboard): select configured model through explicit picker

* ci: pin release performance checks to reviewed Kova accounting

Select the reviewed Linux process-lifetime CPU accounting and bounded worker-watchdog implementation from Kova PR #110 for canonical, legacy-list, and trusted live fixtures. Keep existing trust classification, timeout values, and performance thresholds.

* fix(ci): distinguish bundle build modes in job names

* test(release): build matching future runtime fixtures

Derive a synthetic Codex runtime cohort from its verified candidate package by changing only package.version and openclaw.build.openclawVersion. Require matching source metadata and preserve payload, constraints, immutable input, and source/target digest receipts. Reuse the existing private tarball lifecycle and sequence validation. Validated 11 focused tests, pre-change CLI failures, full changed checks, and P2 review.

* docs(release): prepare private QA before local E2E

* fix(release): admit package metadata before validation dispatch

Port the reviewed early source admission into trusted Tooling, preserving the current selected REST transport. Reject invalid version notes and misaligned core packages before any Git push, non-GET API write, or workflow dispatch; retain explicitly allowed substantive draft notes.

* test(release): qualify supported historical upgrade transitions

Prove the published 2026.8.2/2026.9.2 to 2026.9.3 external package-manager and fresh Doctor contract through one shared helper. Preserve the old in-process updater refusal and schema 15, require owner-stopped migration with a verified private backup, and verify schema 16 plus retained Gateway history afterward.

Keep current-runtime update coverage distinct: managed restart uses separately identified future core and matching runtime fixtures, with real updater, canary, service replacement, authentication, and serving checks. Fix fixture-only channel environment pollution and mock serving nonce responses.

Sealed Docker journey, historical first-hop, current-candidate survivor, root-managed VPS, and onboarding pass. Managed-auth historical preservation passes; its future canary exposes an independent existing plugin projection blocker, retained as failing proof for the candidate repair owner. No product schema or refusal guard changes.

* test(release): narrow recorded update command before indexing

* fix(ci): align historical upgrade fixture ownership

Keep all seven external transition assertion cases with the first-hop package fixtures: both own the historical upgrade boundary and now share its temporary-state lifecycle. Preserve helper test selection and all assertions while avoiding an additional standalone tooling group.

Provide the new inference and future-package preparation boundaries in isolated service, mobile, and cron bootstrap probes, and verify each updater argument without changing readiness or migration assertions. Register the path-launched assertion CLI as a Knip entry.

Validation: 67 related tests; 70 exact-merge planner and combined-suite tests; five 80-job stress plans; full Knip unused-file scans; scoped checks and P2 review.

* fix(ci): model upgrade preparation in isolated probes

Complete the companion fixture and Knip repairs for the preceding transition-test consolidation. Model the independent inference and future-package preparation producers, verify exact updater argument boundaries, and retain service-readiness, authored-state, and cron migration assertions. Declare the path-launched transition assertion CLI in the existing Knip entrypoint list.

* test(release): preserve fixture registry on managed restart

Capture the fake service manager registry alongside its endpoint paths, then refresh that owned context after preparing the future cohort. Projected native service callers cannot drop or replace it; transient update state still stays outside the managed child.

The executable service regression fails on the original shim and passes with missing and conflicting caller registries. Four focused tests, the changed gate, and P2 review pass. Reuse the existing d928 package for the final managed-upgrade replay.

* test(release): preserve prepared UI identity in future fixtures

Advance synthetic package versions while retaining the opaque build ID already embedded in unchanged Control UI assets. The canonical asset-health regression fails the prior builder as stale, then verifies readiness and unchanged UI bytes for both future fixture sequences. Package-version update admission and managed-restart proof remain unchanged.

* test(release): retain manager-owned fixture policy

Capture the existing automation and offline-channel policy with registry identity when generating the manager shim. Native service clients project these values away; losing them activated retained synthetic channel credentials and correctly failed readiness. Restore only this explicit manager allowlist and keep transient update/compatibility state excluded.

The executable service regression fails on missing manager flags and passes across projected or conflicting caller environments. Four focused tests, the full changed gate, and fresh P2 review pass. Actual corrected managed Docker proof remains pending.

* docs(ci): keep bundle identity with routing guidance

* fix(release): retry transient GraphQL EOF failures

Classify the observed gh unexpected EOF transport failure within the existing five-attempt retry budget. Preserve authentication, invalid-response, inventory and snapshot handling. Exercise recovery, exhaustion and fail-fast errors through the real verifier CLI with a fake gh transport; also modernize the existing disposable-array sort required by touched-test lint.

* test(release): align survivor fixtures with manager preparation

Supply manager environment JSON to directly launched supervisors, and model the independent manager preparation phase in config-parking and companion fixtures. Preserve service readiness, restart, diagnostics, and strict phase-order assertions without changing production behavior or test limits.

* test(release): align upgrades with deferred schema publication

Restore installed-updater survivor and first-hop coverage after shared migration ownership moved into the durable update ledger. Record applied schema content separately from published schema version, retain the genuine missing-chunk negative control, and label external installation as an alternate with no self-update attempt. Preserve production-owned unsupported migration refusals.

* test(release): restore supported packaged upgrade coverage

Restore real 2026.9.2 to 2026.9.3 self-update after ledger-driven schema migration support. Keep retained conversations, private backup, settings, candidate identity, and serving inference proof. Require migrated content independently of publication grace and remove obsolete external-install diversion from cross-OS and installer update smoke. Shared external helper remains separately owned.

* test(release): refresh legacy manager before updater restart

Bind the service manager to the candidate registry before the published baseline updater starts its managed service. Preserve restart verification for successful and recoverable outcomes alongside explicit future targets. Exercise stale registry capture, replacement failures, pre-update identity, and attribution without changing timeouts or caps.
2026-09-07 11:47:27 -07:00
Vincent Koc
56b264d5df
fix(ci): bind release baselines to immutable candidates (#136914)
* fix(ci): bind release baselines to package candidates

* fix(ci): preserve release candidate provenance

* test(ci): complete candidate provenance fixtures

* fix(release): preserve corrupt plugin allow membership

* fix(release): keep corrupt plugin fixture off Codex

* test(release): refresh candidate provenance fixtures

* test(release): normalize package candidate rejection
2026-09-03 10:59:43 -06:00
Peter Steinberger
e1d43c3006
fix(e2e): unblock stable Docker upgrade survivor validation (#136796)
* fix(docker): install workspace dependencies for binding smoke

The binding source-test image installed only the root project. With pnpm's
isolated linker, private packages reached through source aliases had no
package-local dependency links, so all three suites failed to import
mdast-util-from-markdown from markdown-core.

Remove the root-only install filter in the owning E2E Dockerfile so pnpm
creates the complete workspace graph. Keep the frozen lockfile, isolated
linker, and disabled lifecycle scripts. Update the existing helper guard.

Proof: the unmodified Docker lane and native Markdown import reproduced
ERR_MODULE_NOT_FOUND. Rebuilding the corrected image passes the import,
workspace/plugin symlink probes, and all three focused binding tests.
pnpm test test/scripts/docker-build-helper.test.ts passes 273 tests with
two existing skips; pnpm check:changed and fresh Codex autoreview pass.
Other sampled release Docker failures have independent plugin/update
causes and are not covered by this image repair.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
(cherry picked from commit 1fa94d95b190b30f1b9b4f33235c31b2d8026680)

* fix(e2e): resolve prepared stable plugins during upgrade

Prepared registry merging kept upstream latest tags during candidate upgrade,
so the survivor installed 2026.8.2 plugins despite serving 2026.9.1 artifacts.
The registry helper now distinguishes published baseline tags from candidate
package tags while retaining older dependency versions and fixture identities.

Owner: prepared npm registry harness. Product runtime is unchanged; this
repairs false stable-release upgrade failures for WhatsApp and Matrix.
Proof: stable registry regression failed twice before the repair; all 15
registry helper and 37 plugin selection tests pass. The original 2026.9.1
candidate now passes the published 2026.8.2 survivor in local Docker.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* fix(e2e): preserve the candidate registry across corrupt plugin setup

The nested synthetic registry replaced only one npm environment spelling,
then setup discarded both instead of restoring the parent prepared registry.
This caused a synthetic-package 404 and, once repaired, an unpublished core
dependency ETARGET. Set both spellings and scope fixture setup to a subshell
whose cleanup owns only the temporary server; preserve parent artifact state.

Owner: npm fixture lifecycle and corrupt-plugin scenario. Product runtime is
unchanged; release validation now exercises real corrupt-plugin tolerance.
Proof: real npm regression fails before the repair and passes afterward.
Docker reproduces both failures, then passes the full 2026.8.2 to unchanged
2026.9.1 candidate upgrade while preserving the plugin policy assertions.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* fix(e2e): inspect survivor plugins before restoring legacy config

Companion provenance inspection ran after the harness restored deliberately
invalid legacy Discord configuration, so validation aborted before update.
Keep inspection within the existing parked-config lifetime and restore the
exact authored bytes after success or failure. Existing Doctor migrations
remain responsible for the actual upgrade.

Owner: upgrade-survivor fixture preparation. Product runtime is unchanged;
release validation can reach the migration it is intended to exercise.
Proof: the original candidate reproduces the pre-update Docker failure;
two new lifecycle cases fail before the repair and all three pass afterward,
with the existing registry-order helper case also passing. Full Docker
survivor now passes migration, state survival, and Gateway readiness/RPC
against the same original release candidate.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-02 18:51:12 -07:00
Peter Steinberger
a162944f54
improve(release): prepare publication artifacts during validation (#135639)
* perf(release): prepare publication artifacts during validation

* fix(release): scope npm registry environment restoration

* test(ci): align release artifact verification fixtures

Account for newly tracked artifact tests and internal workflow-only inputs. Keep synthetic runner timing checks independent of unrelated suite budgets. Reuse the catalog-row selector fix already landed in #135597.

* fix(release): preserve correction identity across prepared artifacts
2026-09-01 18:41:09 -07:00
Peter Steinberger
e92766e421
test: preserve update fixture plugin and temporary-file ownership (#135141) 2026-09-01 04:24:38 -07:00
Peter Steinberger
f2646be7a9
docs: clarify disabled plugin reinstall behavior (#134875)
* docs: clarify disabled plugin reinstall behavior

* docs: distinguish update consent from plugin activation
2026-09-01 02:42:47 -07:00
Ayaan Zaidi
e296fa5656
fix(update): block restart while plugin consent is pending
Closes #134156

## What Problem This Solves

Fixes an issue where a core update could report success and restart the Gateway after a managed plugin refused an unreviewed capability change. The update retained the older plugin payload but started the newer host, which created a mixed host/plugin state.

## Why This Change Was Made

The post-core result owner now treats the existing typed `PLUGIN_CAPABILITY_CONSENT_REQUIRED` outcome as an unresolved convergence error. It keeps other recoverable plugin failures as warnings, preserves the previous plugin, and does not bypass capability review or change inbound dispatch lifecycle checks.

The JSON and terminal paths now return one shared plugin result object.

## User Impact

`openclaw update` now exits non-zero and blocks a requested Gateway restart until the operator reviews the plugin capabilities and runs `openclaw update repair`. The result still names the affected plugin and preserves the exact retry guidance.

## Evidence

- Exact current-main baseline `9ac61cdbab` and release `v2026.8.1` (`ea806575e6`) both accepted the existing consent-deferral fixture while the outer core update stayed successful.
- The new owner-boundary regression failed before the production repair because the outer status was `ok`, not `error`.
- `node scripts/run-vitest.mjs src/cli/update-cli.test.ts`: 286 passed.
- `node scripts/run-vitest.mjs test/scripts/docker-build-helper.test.ts -t 'capability consent|upgrade survivor'`: 14 passed.
- Core Oxlint, script Oxlint, Oxfmt, script syntax, and `git diff --check`: passed.
- Autoreview: no P0 findings, 0.98 confidence.
- Exact built production bytes came from green CI run [33403041210](https://github.com/openclaw/openclaw/actions/runs/33403041210) at `6a89535b5a85cd57504b07af0a2f74692e60cd88`; the next commit changes only the proof fixture.
- The isolated installed-package fixture requested the default restart and passed. The denied update exited 1 with `status: "error"`, `reason: "post-update-plugins"`, and `PLUGIN_CAPABILITY_CONSENT_REQUIRED`; it spawned the fresh post-core child but no `gateway restart` child, and the old plugin payload and record remained at version 1.0.0.
- The same fixture then accepted reviewed consent, updated to version 2.0.0, proved consent did not apply to a later widening, accepted a fresh review for version 3.0.0, and repaired a missing payload only after explicit consent.

Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-08-31 20:45:19 +05:30
Peter Steinberger
f346846aa8
perf(update): reduce preflight work and unattended prompts (#133801) 2026-08-30 22:14:31 -07:00
Peter Steinberger
e6696bea2c
fix(e2e): retain readable plugin update handoff evidence (#132268)
Continue scanning readable descendants when an individual procfs read is unavailable, retain proven positive observations, and join unexpected observer errors with command exit. Keep the complete consent scenario and positive fresh-child assertions unchanged.
2026-08-28 19:03:02 -07:00
Dallin Romney
b7d1e2c71e
fix(test): tolerate inaccessible transient proc entries (#132214) 2026-08-28 17:48:12 -07:00
Vincent Koc
dfe93b936e
fix(ci): accept quarantined corrupt plugin recovery (#131864) 2026-08-29 00:40:47 +08:00
Dallin Romney
3ab172649f
fix(update): preserve explicit plugin capability consent (#131301)
* fix(update): preserve explicit plugin capability consent

* fix(update): bind plugin consent to staged artifacts

Use the canonical artifact consent adapter for channel migrations and preserve
explicit consent through the update wizard. Keep prior usable payloads on denial
and record the exact accepted surface through the existing install-record owner.

Cover parser boundaries, staged artifact changes, and packaged update/repair
handoffs without treating --yes as consent or granting future permission.

Co-authored-by: Dallin Romney <dallinromney@gmail.com>

* test(update): register consent scenario with probe

Route the packaged consent scenario through the existing plugin-update probe
so Knip discovers the implementation through its normal entry graph. Initialize
scenario state only when the consent command runs, preserving other probe modes.

Co-authored-by: Dallin Romney <dallinromney@gmail.com>

* fix(update): retain consent with compatible finalizers

Inspect the installed update command before forwarding explicit consent so
older and same-version target CLIs keep finalization in the existing parent
path when they lack the option. Preserve the installed compatibility host
through plugin convergence and reuse the update step timeout for inspection.

Use built-in streaming SHA256 for the packaged proof rather than requiring
an undeclared checksum binary.

Co-authored-by: Dallin Romney <dallinromney@gmail.com>

* fix(update): keep convergence code loaded across replacement

Link the mandatory registry repair before the core package swap removes the
old updater's chunks. This keeps current-process finalization runnable when
the installed target cannot receive explicit capability consent, without
retaining old runtime files or changing plugin policy.

Co-authored-by: Dallin Romney <dallinromney@gmail.com>

* test(cli): await MCP Doctor batch readiness

Synchronize the concurrency test at the fourth credential check instead of
polling command startup with a wall-clock deadline. Release blocked checks
and await Doctor in finally, including early command or assertion failures.
Keep the exact concurrency, total-check and sorted-result assertions.

Co-authored-by: Dallin Romney <dallinromney@gmail.com>

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
Co-authored-by: Dallin Romney <dallinromney@gmail.com>
2026-08-28 08:25:06 -07:00
Peter Steinberger
0f6034bc3c
test(release): seed plugin ownership for the installed schema (#131685) 2026-08-28 02:24:31 -07:00
Vincent Koc
bccb649077
fix(release): support frozen plugin harness contracts (#131596) 2026-08-28 14:57:17 +08:00
Vincent Koc
2e1199363c
fix(ci): seed plugin update ownership metadata (#122752) 2026-08-13 02:39:32 +08:00
Peter Steinberger
7a398fe6f8
fix(update): preserve plugin policy on failures (#108661) 2026-07-16 00:38:44 -07:00
Jesse Merhi
00364ee777
improve: warn before non-ClawHub plugin installs (#102197)
Merged via squash.

Prepared head SHA: e08d9e737d03f7bde665caa34ecf1c841aea97ba
Co-authored-by: jesse-merhi <79823012+jesse-merhi@users.noreply.github.com>
Co-authored-by: jesse-merhi <79823012+jesse-merhi@users.noreply.github.com>
Reviewed-by: @jesse-merhi
2026-07-15 03:25:36 +10:00
Vincent Koc
b9a3db13f1
test(e2e): parse corrupt plugin timeouts as decimal 2026-07-07 12:03:11 +02:00
Vincent Koc
a9c0592831
test(e2e): align corrupt plugin update timeout 2026-07-07 12:03:10 +02:00
Vincent Koc
f484bf9985
fix(qa): avoid plugin update registry port collisions 2026-06-23 12:01:34 +02:00
Vincent Koc
61b116d597
fix(e2e): validate plugin update timeout seconds 2026-06-18 22:23:23 +02:00
Vincent Koc
e6b0a22f36
test(update): align corrupt plugin repair guidance 2026-06-11 04:33:25 +09:00
Vincent Koc
8dff529587
fix(e2e): bound corrupt update logs 2026-06-07 11:52:39 +02:00
Vincent Koc
9fb8d87f91
fix(e2e): bound plugin update logs 2026-06-07 10:26:59 +02:00
Peter Steinberger
cb5bb9b936 docs: document e2e helpers 2026-06-05 00:04:03 -04:00
Vincent Koc
66f797b22c
fix(e2e): wait for plugin update registry cleanup 2026-06-01 21:01:26 +02:00
Peter Steinberger
5443baa852
Persist plugin install index in SQLite (#88794)
* refactor: persist plugin install index in sqlite

* fix: merge legacy plugin index records into sqlite

* test: update plugin index sqlite fixtures

* fix: migrate custom plugin install indexes

* test: update plugin index sentinel

* fix: exclude migrated plugin index archives

* fix: read post-upgrade plugin index from sqlite

* fix: migrate legacy plugin index before agent runs

* fix: respect disabled persisted plugin registry reads

* test: type plugin install record fixtures

* fix: simplify plugin index record reader type

* test: fix sqlite plugin index CI fallout

* test: mock provider normalization in agent command tests

# Conflicts:
#	src/commands/agent-command.test-mocks.ts

* build: remove unused ui three dependency
2026-05-31 20:51:33 -04:00
Peter Steinberger
22cb7fb6b7
chore(lint): enable no-promise-executor-return 2026-05-31 23:06:13 +01:00
Vincent Koc
2b63eb2825
fix(e2e): bound corrupt plugin update runs 2026-05-26 19:54:05 +02:00
Vincent Koc
e8f584e400
fix(e2e): route plugin update through timeout helper 2026-05-26 19:11:09 +02:00
Vincent Koc
9777526eaa
fix(e2e): bound docker npm install phases 2026-05-26 14:46:05 +02:00
Vincent Koc
419178b9bc
fix(e2e): reject corrupt plugin update false greens 2026-05-26 13:49:02 +02:00
Peter Steinberger
694ca50e97
Revert "refactor: move runtime state to SQLite"
This reverts commit f91de52f0d.
2026-05-13 13:33:38 +01:00
Peter Steinberger
f91de52f0d
refactor: move runtime state to SQLite
* refactor: remove stale file-backed shims

* fix: harden sqlite state ci boundaries

* refactor: store matrix idb snapshots in sqlite

* fix: satisfy rebased CI guardrails

* refactor: store current conversation bindings in sqlite table

* refactor: store tui last sessions in sqlite table

* refactor: reset sqlite schema history

* refactor: drop unshipped sqlite table migration

* refactor: remove plugin index file rollback

* refactor: drop unshipped sqlite sidecar migrations

* refactor: remove runtime commitments kv migration

* refactor: preserve kysely sync result types

* refactor: drop unshipped sqlite schema migration table

* test: keep session usage coverage sqlite-backed

* refactor: keep sqlite migration doctor-only

* refactor: isolate device legacy imports

* refactor: isolate push voicewake legacy imports

* refactor: isolate remaining runtime legacy imports

* refactor: tighten sqlite migration guardrails

* test: cover sqlite persisted enum parsing

* refactor: isolate legacy update and tui imports

* refactor: tighten sqlite state ownership

* refactor: move legacy imports behind doctor

* refactor: remove legacy session row lookup

* refactor: canonicalize memory transcript locators

* refactor: drop transcript path scope fallbacks

* refactor: drop runtime legacy session delivery pruning

* refactor: store tts prefs only in sqlite

* refactor: remove cron store path runtime

* refactor: use cron sqlite store keys

* refactor: rename telegram message cache scope

* refactor: read memory dreaming status from sqlite

* refactor: rename cron status store key

* refactor: stop remembering transcript file paths

* test: use sqlite locators in agent fixtures

* refactor: remove file-shaped commitments and cron store surfaces

* refactor: keep compaction transcript handles out of session rows

* refactor: derive transcript handles from session identity

* refactor: derive runtime transcript handles

* refactor: remove gateway session locator reads

* refactor: remove transcript locator from session rows

* refactor: store raw stream diagnostics in sqlite

* refactor: remove file-shaped transcript rotation

* refactor: hide legacy trajectory paths from runtime

* refactor: remove runtime transcript file bridges

* refactor: repair database-first rebase fallout

* refactor: align tests with database-first state

* refactor: remove transcript file handoffs

* refactor: sync post-compaction memory by transcript scope

* refactor: run codex app-server sessions by id

* refactor: bind codex runtime state by session id

* refactor: pass memory transcripts by sqlite scope

* refactor: remove transcript locator cleanup leftovers

* test: remove stale transcript file fixtures

* refactor: remove transcript locator test helper

* test: make cron sqlite keys explicit

* test: remove cron runtime store paths

* test: remove stale session file fixtures

* test: use sqlite cron keys in diagnostics

* refactor: remove runtime delivery queue backfill

* test: drop fake export session file mocks

* refactor: rename acp session read failure flag

* refactor: rename acp row session key

* refactor: remove session store test seams

* refactor: move legacy session parser tests to doctor

* refactor: reindex managed memory in place

* refactor: drop stale session store wording

* refactor: rename session row helpers

* refactor: rename sqlite session entry modules

* refactor: remove transcript locator leftovers

* refactor: trim file-era audit wording

* refactor: clean managed media through sqlite

* fix: prefer explicit agent for exports

* fix: use prepared agent for session resets

* fix: canonicalize legacy codex binding import

* test: rename state cleanup helper

* docs: align backup docs with sqlite state

* refactor: drop legacy Pi usage auth fallback

* refactor: move legacy auth profile imports to doctor

* refactor: keep Pi model discovery auth in memory

* refactor: remove MSTeams legacy learning key fallback

* refactor: store model catalog config in sqlite

* refactor: use sqlite model catalog at runtime

* refactor: remove model json compatibility aliases

* refactor: store auth profiles in sqlite

* refactor: seed copied auth profiles in sqlite

* refactor: make auth profile runtime sqlite-addressed

* refactor: migrate hermes secrets into sqlite auth store

* refactor: move plugin install config migration to doctor

* refactor: rename plugin index audit checks

* test: drop auth file assumptions

* test: remove legacy transcript file assertions

* refactor: drop legacy cli session aliases

* refactor: store skill uploads in sqlite

* refactor: keep subagent attachments in sqlite vfs

* refactor: drop subagent attachment cleanup state

* refactor: move legacy session aliases to doctor

* refactor: require node 24 for sqlite state runtime

* refactor: move provider caches into sqlite state

* fix: harden virtual agent filesystem

* refactor: enforce database-first runtime state

* refactor: rename compaction transcript rotation setting

* test: clean sqlite refactor test types

* refactor: consolidate sqlite runtime state

* refactor: model session conversations in sqlite

* refactor: stop deriving cron delivery from session keys

* refactor: stop classifying sessions from key shape

* refactor: hydrate announce targets from typed delivery

* refactor: route heartbeat delivery from typed sqlite context

* refactor: tighten typed sqlite session routing

* refactor: remove session origin routing shadow

* refactor: drop session origin shadow fixtures

* perf: query sqlite vfs paths by prefix

* refactor: use typed conversation metadata for sessions

* refactor: prefer typed session routing metadata

* refactor: require typed session routing metadata

* refactor: resolve group tool policy from typed sessions

* refactor: delete dead session thread info bridge

* Show Codex subscription reset times in channel errors (#80456)

* feat(plugin-sdk): consolidate session workflow APIs

* fix(agents): allow read-only agent mount reads

* [codex] refresh plugin regression fixtures

* fix(agents): restore compaction gateway logs

* test: tighten gateway startup assertions

* Redact persisted secret-shaped payloads [AI] (#79006)

* test: tighten device pair notify assertions

* test: tighten hermes secret assertions

* test: assert matrix client error shapes

* test: assert config compat warnings

* fix(heartbeat): remap cron-run exec events to session keys (#80214)

* fix(codex): route btw through native side threads

* fix(auth): accept friendly OpenAI order for Codex profiles

* fix(codex): rotate auth profiles inside harness

* fix: keep browser status page probe within timeout

* test: assert agents add outputs

* test: pin cron read status

* fix(agents): avoid Pi resource discovery stalls

Co-authored-by: dataCenter430 <titan032000@gmail.com>

* fix: retire timed-out codex app-server clients

* test: tighten qa lab runtime assertions

* test: check security fix outputs

* test: verify extension runtime messages

* feat(wake): expose typed sessionKey on wake protocol + system event CLI

* fix(gateway): await session_end during shutdown drain and track channel + compaction lifecycle paths (#57790)

* test: guard talk consult call helper

* fix(codex): scale context engine projection (#80761)

* fix(codex): scale context engine projection

* fix: document Codex context projection scaling

* fix: document Codex context projection scaling

* fix: document Codex context projection scaling

* fix: document Codex context projection scaling

* chore: align Codex projection changelog

* chore: realign Codex projection changelog

* fix: isolate Codex projection patch

---------

Co-authored-by: Eva (agent) <eva+agent-78055@100yen.org>
Co-authored-by: Josh Lehman <josh@martian.engineering>

* refactor: move agent runtime state toward piless

* refactor: remove cron session reaper

* refactor: move session management to sqlite

* refactor: finish database-first state migration

* chore: refresh generated sqlite db types

* refactor: remove stale file-backed shims

* test: harden kysely type coverage

# Conflicts:
#	.agents/skills/kysely-database-access/SKILL.md
#	src/infra/kysely-sync.types.test.ts
#	src/proxy-capture/store.sqlite.test.ts
#	src/state/openclaw-agent-db.test.ts
#	src/state/openclaw-state-db.test.ts

* refactor: remove cron store path runtime

* refactor: keep compaction transcript handles out of session rows

* refactor: derive embedded transcripts from sqlite identity

* refactor: remove embedded transcript locator handoff

* refactor: remove runtime transcript file bridges

* refactor: remove transcript file handoffs

* refactor: remove MSTeams legacy learning key fallback

* refactor: store model catalog config in sqlite

* refactor: use sqlite model catalog at runtime

# Conflicts:
#	docs/cli/secrets.md
#	docs/gateway/authentication.md
#	docs/gateway/secrets.md

* fix: keep oauth sibling sync sqlite-local

# Conflicts:
#	src/commands/onboard-auth.test.ts

* refactor: remove task session store maintenance

# Conflicts:
#	src/commands/tasks.ts

* refactor: keep diagnostics in state sqlite

* refactor: enforce database-first runtime state

* refactor: consolidate sqlite runtime state

* Show Codex subscription reset times in channel errors (#80456)

* fix(codex): refresh subscription limit resets

* fix(codex): format reset times for channels

* Update CHANGELOG with latest changes and fixes

Updated CHANGELOG with recent fixes and improvements.

* fix(codex): keep command load failures on codex surface

* fix(codex): format account rate limits as rows

* fix(codex): summarize account limits as usage status

* fix(codex): simplify account limit status

* test: tighten subagent announce queue assertion

* test: tighten session delete lifecycle assertions

* test: tighten cron ops assertions

* fix: track cron execution milestones

* test: tighten hermes secret assertions

* test: assert matrix sync store payloads

* test: assert config compat warnings

* fix(codex): align btw side thread semantics

* fix(codex): honor codex fallback blocking

* fix(agents): avoid Pi resource discovery stalls

* test: tighten codex event assertions

* test: tighten cron assertions

* Fix Codex app-server OAuth harness auth

* refactor: move agent runtime state toward piless

* refactor: move device and push state to sqlite

* refactor: move runtime json state imports to doctor

* refactor: finish database-first state migration

* chore: refresh generated sqlite db types

* refactor: clarify cron sqlite store keys

* refactor: remove stale file-backed shims

* refactor: bind codex runtime state by session id

* test: expect sqlite trajectory branch export

* refactor: rename session row helpers

* fix: keep legacy device identity import in doctor

* refactor: enforce database-first runtime state

* refactor: consolidate sqlite runtime state

* build: align pi contract wrappers

* chore: repair database-first rebase

* refactor: remove session file test contracts

* test: update gateway session expectations

* refactor: stop routing from session compatibility shadows

* refactor: stop persisting session route shadows

* refactor: use typed delivery context in clients

* refactor: stop echoing session route shadows

* refactor: repair embedded runner rebase imports

# Conflicts:
#	src/agents/pi-embedded-runner/run/attempt.tool-call-argument-repair.ts

* refactor: align pi contract imports

* refactor: satisfy kysely sync helper guard

* refactor: remove file transcript bridge remnants

* refactor: remove session locator compatibility

* refactor: remove session file test contracts

* refactor: keep rebase database-first clean

* refactor: remove session file assumptions from e2e

* docs: clarify database-first goal state

* test: remove legacy store markers from sqlite runtime tests

* refactor: remove legacy store assumptions from runtime seams

* refactor: align sqlite runtime helper seams

* test: update memory recall sqlite audit mock

* refactor: align database-first runtime type seams

* test: clarify doctor cron legacy store names

* fix: preserve sqlite session route projections

* test: fix copilot token cache test syntax

* docs: update database-first proof status

* test: align database-first test fixtures

* docs: update database-first proof status

* refactor: clean extension database-first drift

* test: align agent session route proof

* test: clarify doctor legacy path fixtures

* chore: clean database-first changed checks

* chore: repair database-first rebase markers

* build: allow baileys git subdependency

* chore: repair exp-vfs rebase drift

* chore: finish exp-vfs rebase cleanup

* chore: satisfy rebase lint drift

* chore: fix qqbot rebase type seam

* chore: fix rebase drift leftovers

* fix: keep auth profile oauth secrets out of sqlite

* fix: repair rebase drift tests

* test: stabilize pairing request ordering

* test: use source manifests in plugin contract checks

* fix: restore gateway session metadata after rebase

* fix: repair database-first rebase drift

* fix: clean up database-first rebase fallout

* test: stabilize line quick reply receipt time

* fix: repair extension rebase drift

* test: keep transcript redaction tests sqlite-backed

* fix: carry injected transcript redaction through sqlite

* chore: clean database branch rebase residue

* fix: repair database branch CI drift

* fix: repair database branch CI guard drift

* fix: stabilize oauth tls preflight test

* test: align database branch fast guards

* test: repair build artifact boundary guards

* chore: clean changelog rebase markers

---------

Co-authored-by: pashpashpash <nik@vault77.ai>
Co-authored-by: Eva <eva@100yen.org>
Co-authored-by: stainlu <stainlu@newtype-ai.org>
Co-authored-by: Jason Zhou <jason.zhou.design@gmail.com>
Co-authored-by: Ruben Cuevas <hi@rubencu.com>
Co-authored-by: Pavan Kumar Gondhi <pavangondhi@gmail.com>
Co-authored-by: Shakker <shakkerdroid@gmail.com>
Co-authored-by: Kaspre <36520309+Kaspre@users.noreply.github.com>
Co-authored-by: dataCenter430 <titan032000@gmail.com>
Co-authored-by: Kaspre <kaspre@gmail.com>
Co-authored-by: pandadev66 <nova.full.stack@outlook.com>
Co-authored-by: Eva <admin@100yen.org>
Co-authored-by: Eva (agent) <eva+agent-78055@100yen.org>
Co-authored-by: Josh Lehman <josh@martian.engineering>
Co-authored-by: jeffjhunter <support@aipersonamethod.com>
2026-05-13 13:15:12 +01:00
Vincent Koc
64ab50e42b
fix(update): preserve plugin warning context 2026-05-06 03:24:56 -07:00