Repository navigation
Host: durable delegated execution ownership guard - #166243
yaoxiaoyang448 wants to merge 42 commits into
Conversation
…dation (openclaw#155892) ## Problem Full Release Validation run 35760444831 for 2026.9.6 fails two release-only lanes that regular PR CI never runs: 1. `checks-node-agentic-plugins` (Plugin Prerelease, `test/vitest/vitest.plugins.config.ts`): 12 files / 40 tests in `src/plugins/` fail with symptoms such as `Plugin fixture-speech capabilityCatalogEntry failed: Unexpected token 'export'`, `expected { values: [ undefined, 'javascript' ] } to match object { values: [ 'typescript', ... ] }`, and `expected undefined to be 'overloaded'`, alongside Node warnings `Failed to load the ES module: .../capability-catalog.js`. 2. `extensions shard 8`: `extensions/facetime/tests/package-manifest.test.ts` fails once the release version controller bumps the package to 2026.9.6 (`minHostVersion` expected `>=2026.9.6`, received `>=2026.9.4`). ## Root causes **Plugins shard.** openclaw#153508 added a `--import tsx/esm` `execArgv` preload to every Node Vitest fork worker (`test/vitest/vitest.shared.config.ts`). The `src/plugins` suites exercise the plugin loader's own native `require()`/`import()` of `.ts`/`.js` fixtures (TS/JS peers, CJS/ESM interop, built capability catalogs, public surfaces). With the tsx hooks installed in the worker, Node's own module semantics under test change: a `.ts` peer in a `commonjs` package requires as an empty namespace, ESM `.js` catalogs in fixture packages fall through the CJS path, and loader ownership assertions fail. The shard is `RELEASE_ONLY_PLUGIN_SHARDS`, so the breakage surfaced only in Full Release Validation. A standalone probe (`createRequire(...)("./native.cjs")` requiring `peer.ts` + `peer.js`) returns `["typescript","javascript"]` on plain Node 24 and 26 and `[null,"javascript"]` with `--import scripts/tsx.mjs`. **FaceTime manifest.** openclaw#155818 derived every host-contract field from `package.json#version`, but `scripts/sync-plugin-versions.ts` deliberately leaves `openclaw.install.minHostVersion` alone ("a compatibility floor, not release alignment metadata") while rewriting `peerDependencies.openclaw`, `compat.pluginApi`, and `build.openclawVersion`. The derived expectation therefore breaks on every release bump. ## Solution - `test/vitest/vitest.scoped-config.ts`: accept an `execArgv` override. - `test/vitest/vitest.plugins.config.ts`: split the shard into two inline projects (same pattern as `vitest.gateway-server.config.ts`): `plugins` keeps the shared preload (its suites load bundled plugins from source and need tsx's `.js` to `.ts` SDK resolution), and `plugins-native-loader` runs the eight loader-semantics suites (`plugin-module-generation*`, `capability-provider-runtime.generation`, `bundled-plugin-metadata.public-surfaces`, `manifest-registry`, `public-surface-loader`, `plugin-runtime-artifact-resolution`, `stage-bundled-plugin-runtime`) with `execArgv: []`. The root config keeps the complete inventory so planner discovery and `--project` routing are unchanged. - `extensions/facetime/tests/package-manifest.test.ts`: expect the literal `>=2026.9.4` floor for `install.minHostVersion`; the controller-synced fields stay derived from the package version. ## Impact Release-only validation lanes match what the runtime does in production for the loader suites (no tsx hooks in a Gateway process). No product code changes. Regular CI shards are unaffected; only the eight native-loader suites drop the preload. ## Evidence - Baseline, exact job command (`pnpm test -- test/vitest/vitest.plugins.config.ts --`, Node 24.21.0, `OPENCLAW_VITEST_MAX_WORKERS=2`): 13 failed files / 41 failed tests (CI's 12 plus `plugin-graceful-init-failure`), matching FRV run 35760444831 job `checks-node-agentic-plugins` (also red in runs 35743778013 and 35761282770). - Planner/routing owners with the split config: `test/scripts/ci-node-test-plan.test.ts`, `test-projects.test.ts`, `test-projects-routing.test.ts`, `plugin-prerelease-test-plan.test.ts`: 1811/1811 pass. - Fixed, same command and Node: 5 failed files / 10 failed tests, 375 passed files / 6101 passed tests. All eight loader-semantics files are green. Dropping the preload for the whole shard instead (probe run) fixes the same eight files but breaks 11 other files on `Cannot find module '.../src/agents/defaults.js' imported from .../src/plugin-sdk/provider-model-metadata.ts`, which is why the shard is split rather than de-preloaded. - Remaining red files are independent of the preload (identical failures with and without it, and with `providers.runtime-core.ts`, `provider-hook-runtime-core.ts`, `plugin-instance*.ts`, `host-hook-state.ts` reverted to their pre-openclaw#155711/openclaw#155250/openclaw#154625/openclaw#155714 versions): `provider-runtime.test.ts` (6: `resolveProviderPluginsForHooks`/`classifyProviderFailoverSignalWithPlugin` no longer read the `withPluginRuntimeRegistryScope` registry), `native-session-catalog-registration.test.ts` (1: abort surfaces `PluginInstanceUnavailableError` instead of the caller's retirement error), `plugin-instance-invocation.test.ts` (1), `provider-public-artifacts.test.ts` (1: listener count after bundled policy load), `plugin-graceful-init-failure.test.ts` (1: `Maximum call stack size exceeded`, local only). These are product/test contract drift from the plugin runtime refactors and need their owners; they are called out in the landing report. - `extensions/facetime/tests/package-manifest.test.ts`: 2/2 pass at 2026.9.4 and 2/2 pass after a local `pnpm release:prepare -- --version 2026.9.6 --write` (bump reverted, not committed). - `OPENCLAW_TESTBOX=1 pnpm check:changed`: in progress at PR creation; result recorded in the landing report. Co-authored-by: Peter Steinberger <[email protected]>
Re-cut on main 814a7e7 plus the pending control UI locale refresh (openclaw#155912) and the plugin shard / FaceTime manifest repairs (openclaw#155892).
The advisory-shard refactor in 4a93b5e removed the last external use of TSGO_CORE_TEST_MAX_ROOTS but left its export behind. Both script and full-tree unused-export checks then failed on main. Keep the limit private to its existing helper, preserving its value and advisory behavior. The existing 25 owner tests and all three unused-export scans pass; independent P2 review found no actionable issues.
openclaw#155931) The npm pack, offline install, and CLI probes in the bundled browser MCP tarball test use a 30 s spawn timeout. On Windows CI runners the offline install of the ~90 MiB package regularly exceeds that, so spawnSync returns a null exit status and the test fails (Full Release Validation 35775979903, checks-windows-node-test-5). Raise the four spawn timeouts to 180 s; the assertions are unchanged.
…penclaw#155940) release-check runs scripts/test-built-bundled-channel-entry-smoke.mts under node --import tsx against the npm-installed package. For an installed-looking package root the smoke imported the channel entries in-process, so the plugin loader's require(esm) of the packaged plugin graph went through tsx's CJS hook, which resolves execa -> npm-run-path -> unicorn-magic with the require condition and dies with ERR_PACKAGE_PATH_NOT_EXPORTED (unicorn-magic exports only import targets). The source layout already re-ran the probe in a plain Node child, which is why only the packed lane failed. Always run the packaged probe in a plain Node child, like a real install.
…dule graphs (openclaw#155925) ## Summary Repairs the four residual red files in the release-only `checks-node-agentic-plugins` lane for 2026.9.6 (after openclaw#155892 split the native-loader project). **Product regression (7 tests in 3 files):** openclaw#153508 turned `PluginRuntimeExecutionFrame` (`src/plugins/runtime/execution-frame.ts`) into a plain class while the plugin execution frame store stayed a process-wide `resolveGlobalSingleton`. Any second module instance of that file (a reloaded test graph, a duplicated chunk) fails the `instanceof` narrowing in `getPluginRuntimeExecutionFrame` and silently drops the Gateway request scope: `withPluginRuntimeRegistryScope` registries stopped reaching `resolveProviderPluginsForHooks` / `classifyProviderFailoverSignalWithPlugin`, and the reload-identity contract in `plugin-instance-invocation.test.ts` (added with the singleton in openclaw#146219) broke. This restores the shared constructor next to the shared store. **Test fixture (1 test):** the `provider-public-artifacts` bundled scenario loads an ESM `provider-policy-api.js` from a fixture package with no module type through the bundled owners' native `require()` path. Under the tsx/esm worker preload the ambiguous file is compiled as CommonJS (`Unexpected token 'export'`), which the test's `finally` assertion masked as a listener-count mismatch. Shipped bundled artifacts (`dist/extensions/*`) are ESM under a `"type": "module"` package, so the fixture now declares that. Files: `src/plugins/provider-runtime.test.ts` (6), `src/plugins/plugin-instance-invocation.test.ts` (1), `src/plugins/native-session-catalog-registration.test.ts` (green in the fixed run), `src/plugins/provider-public-artifacts.test.ts` (1). `plugin-graceful-init-failure.test.ts` ("Maximum call stack size exceeded") reproduces locally with and without the preload and is a host stack-size artifact, not part of the CI residual; unchanged here. ## Validation - Baseline on main tip (Node 24, `scripts/run-vitest.mjs run --config test/vitest/vitest.plugins.config.ts <files>`): 8 failed across the 4 files (plus the local-only stack-limit case). - After the fix: the 4 files pass (`provider-runtime` 6/6, invocation 1/1, catalog 1/1, artifacts 33/33; 148/148 tests). - Full `pnpm test -- test/vitest/vitest.plugins.config.ts --` shard on Node 24, run as four file chunks under the local 10-minute command cap: 105 + 88 + 94 + 91 test files green, 6109 tests passed; the only failure is the host-local `plugin-graceful-init-failure` stack-limit case (fails with and without the preload, not in the CI residual). - `OPENCLAW_TESTBOX=1 pnpm check:changed`: all lanes pass except the dead-export scan, which flags `scripts/lib/tsgo-core-test-shards.mts: TSGO_CORE_TEST_MAX_ROOTS`; that export is untouched by this PR and was already made internal on main by `1619aff4781` after this branch's base. - Hosted CI on the exact head `cea3da31abcb`: 143 checks passed, 0 pending. Co-authored-by: Peter Steinberger <[email protected]>
The concurrent lifecycle proof deliberately deletes its second send's session. Deletion can settle agent.wait with a cached terminal snapshot carrying status=timeout, error=aborted, stopReason=delete, and endedAt. The fixture accepted the admission/runtime cancellation reasons but omitted the lifecycle owner's delete reason, reporting a settled run as a failure. Accept delete under the existing terminal-status and endedAt checks. A real wait expiry has no endedAt and still fails. Preserve the wait budgets and all SQLite, reset, history, deletion, and recovery assertions. This proof never supplies a history cursor, so it does not exercise the incremental visibility path suspected in the original report. Sighting: main run 35768598982, build-artifacts job 106887378746, sqlite-session-lifecycle, head 065eb1f. Blacksmith Testbox tbx_01m358srmwptm2nj7913wbgg2z: https://github.com/openclaw/openclaw/actions/runs/35772791270 Built with pnpm build:ci-artifacts at 814a7e7; the same built Gateway and verified before/after helper hashes were used for the comparison. The original fixture failed 3/3 ordinary replays and 3/3 pressure replays, all with the recorded terminal delete outcome. The correction passed 20/20 standalone pressure replays and 3/3 exact CI replays. Pressure used two CPU burners on four available CPUs, OPENCLAW_VITEST_MAX_WORKERS=8, and the existing one-worker e2e policy. Pressure wall time was 86.09-163.63s (mean 108.77s); exact CI replay wall time was 88.23-103.17s (mean 95.94s). No new tests or per-run work were added. CI replay command: OPENCLAW_E2E_USE_PREBUILT_DIST=1 OPENCLAW_VITEST_NO_OUTPUT_TIMEOUT_MS=660000 \ node scripts/run-vitest.mjs run --config test/vitest/vitest.e2e.config.ts \ test/scripts/sqlite-sessions-transcripts-flip-proof.built-cli.e2e.test.ts The agent-job execution-settlement, timeout-fallback, and chat-abort-lifecycle-internal suites passed all 66 tests. Separate validation gap: the companion flip-proof.e2e.test.ts failed at its initial legacy-startup-refusal assertion: expected refusal, got a ready Gateway after automatic migration. This occurs before the first chat.send and before the changed helper can run. The built variant runs plugins inspect before seeding legacy files; the companion omits that initialization. Source inspection points to migration-checkpoint preparation, but the checkpoint itself was not captured. No migration behavior or expectation was changed in this repair. This companion failure accounts for the final comparison command's nonzero exit after the 23 required passing replays. Validation: node scripts/check-changed.mjs passed after incorporating the upstream unused-export repair in 1619aff. Focused type-aware oxlint passed with a failing no-floating-promises canary. oxfmt --check and git diff --check passed. Pre-commit autoreview was P2 scoped-clean.
…claw#155960) ## Summary Full Release Validation 35775979903 (CI child 35776854264, candidate `release/2026.9.6` = main `814a7e752afc` + locale refresh + openclaw#155892) failed `subagent-registry.persistence.test.ts`, `subagent-spawn.authority.test.ts`, `chat.abort-errors.test.ts` and `chat.abort-incarnation.test.ts` in `settleSubagentRegistryPersistenceWork` with `residual registry roots: tasks:delivery (2|4|6): expected N to be +0`. All were green in the two previous validation runs. Bisected to openclaw#151917 (`68b724b355e`, move terminal notification writes off the Gateway thread): `subagent-registry.persistence.test.ts` passes 30/30 at `68b724b355e^` and fails at `68b724b355e` with the exact CI signature; on current main it fails 5/5 locally. The `tasks:delivery` roots are not leaked: with a 20 s fence the same test passes (3.3 s), i.e. uncaptured deliveries settle 1–2 s after the test body, while the shared helper used `vi.waitFor`'s 1 s default. openclaw#155910 and openclaw#155888 already fixed individual fixtures by capturing deliveries; this widens the shared fence so the remaining callers (persistence, timing, resume, task-replacement, chat.abort-*) stop racing it. Test contract change only; no product change. The related `build-artifacts` failure (`sqlite-sessions-transcripts-flip-proof` rejecting the delete-drain `stopReason`) was fixed on main in parallel by `8ba18cf19ad`; this branch merged that and carries no change of its own for it. ## Change - `src/agents/subagents/registry/subagent-registry.persistence.test-support.ts`: `vi.waitFor(..., { timeout: 10_000 })` in `settleSubagentRegistryPersistenceWork`. ## Proof - The four affected files green in one local vitest run with the change (`Tests 26 passed`, `Tests 36 passed`). - `oxfmt --check` / `oxlint` clean on the changed file; exact-head hosted gates via `scripts/pr`.
Join the existing registry settlement boundary before resetting announcement mocks and registry state. The real requester-wake imports otherwise retain Gateway roots across fixture teardown and can fail the following suite. A direct ownership trace changed from eight unfinished wake imports and 22 cleanup boundaries with active roots to all imports joined and zero remaining roots. Production scheduling and cancellation are unchanged.
…openclaw#155955) ## What Problem This Solves Full Release Validation for 2026.9.6 (run 35775979903 → Plugin Prerelease 35776854018, job `checks-node-extensions-telegram-shard-2`) failed on ``` extensions/telegram/src/bot.create-telegram-bot.test.ts > createTelegramBot > retries a deferred spooled update after its queued turn is abandoned AssertionError: expected undefined to deeply equal Any<Function> ``` The test waits for the first `getReply` call with `vi.waitFor` at its default 1 s timeout. That first dispatch pays the per-test message-cache hydration on a fresh state dir (`messageCache.record` → `hydrateMessageCacheBucket`, ~1.1 s locally) before `getReply` runs, so the poll races real I/O. In the two prior passing validation runs the same test took 1657 ms and 1603 ms; the failing run's neighbouring dispatch test took 2239 ms, and this one timed out at 1559 ms. Locally the reply lands 1.5–1.9 s after dispatch, so the test fails deterministically here (3/3), and it fails identically at the parent of openclaw#155842, so that change is not the cause. ## User Impact None at runtime; test-only. ## Why This Change Was Made Replace the polling wait with a deferred that the first `getReply` mock resolves once the turn-adoption lifecycle is in hand. The assertion that `onAbandoned` is a function, the abandonment call, the `failed-retryable` result, the un-persisted offset, the retry that completes, and the duplicate suppression are unchanged, so the retry guarantee the test protects is intact. Only the vitest test timeout bounds the wait now. ## Evidence - Before: `node scripts/run-vitest.mjs run --config test/vitest/vitest.extension-database-workers.config.ts extensions/telegram/src/bot.create-telegram-bot.test.ts -t "retries a deferred spooled update after its queued turn is abandoned"` fails 3/3 on `origin/main` (1778 ms, 2131 ms, 1812 ms) and 1/1 at `2ea391a120c6^`. - Timestamped probes (removed) placed the gap between `claimMessageDispatchDedupe` and `processInboundMessage`, i.e. inside `recordMessageForReplyChain`; everything after it, including core admission up to `getReply`, is ~0.3–0.5 s. - After: the same command passes 3/3 (5297 ms, 4645 ms, 3316 ms on a loaded host; the wait is now bounded by the vitest test timeout, not a 1 s poll). - Full `bot.create-telegram-bot.test.ts` file and `OPENCLAW_TESTBOX=1 pnpm check:changed`: see the landing notes on this PR. Related: 2026.9.6 release validation. Co-authored-by: Peter Steinberger <[email protected]>
Add API and embedded ChatGPT routing, capability metadata, reasoning levels, and tiered pricing for the two public GPT-6 models. Preserve account-specific native Codex capabilities and Azure sampling. Related: openclaw#155937.
* feat(anthropic): support Claude Opus 5.5 Add explicit API and Claude CLI catalog entries with published limits and pricing. Reuse the mandatory adaptive-thinking and prefix-preserving replay contracts, default to medium effort, and account for serving-model prices after fallback. Preserve Opus 5 defaults and aliases. * fix(anthropic): normalize Opus 5.5 before plugin discovery Keep cold model parsing aligned with the Anthropic manifest aliases and include Opus 5.5 in the existing live-priority and Claude CLI allowlist expectations.
…ence (openclaw#155976) ## Summary Unblocks the 2026.9.6 Full Release Validation runtime-pair core lane: `runtime-tool-{web-fetch,web-search,session-status,sessions-spawn}` failed in the OpenClaw cell with `timed out after 5000ms waiting for persisted <tool> transcript evidence` (runs 35742760135, 35760444831, 35775979903, and locally). ## Root cause Not a product regression; transcripts are persisted. openclaw#155614 made an absent `tools.codeMode` behave as `"auto"`, so `openai/gpt-5.6-luna` (catalog `codeMode: "preferred"`) now runs these fixtures through Code Mode in the OpenClaw runtime. The mock provider correctly wraps the planned `web_fetch` call in a guest `exec` (`qa-code-mode-target:` marker), the product executes it, and the session transcript records: - the assistant `exec` tool call and its `toolResult` (`{"status":"completed", "value": {...web_fetch result...}}`), and - a `custom` row `openclaw.nested-tool.v1` whose `details` name the nested `web_fetch` call (`toolCallId`, `toolName`, `input`, `result`, `isError`). `summarizeSessionTranscriptEvents` (qa-lab) only counted `toolResult` rows correlated with assistant tool calls by name, so `completedToolCallCounts.web_fetch` stayed 0 and `waitForPersistedTranscriptToolEvidence` timed out even though the product had done the work. The Codex cell still calls `web_fetch` directly and passed, which is why the scenario read as "OpenClaw lost the transcript". Same family as openclaw#155811 (compaction-retry terminal evidence keyed on the exec surface). ## Fix - `extensions/qa-lab/src/suite-runtime-agent-session.ts`: Code Mode nested tool activity rows feed the same planned/completed/successful accounting as direct tool results, keyed on the nested `toolCallId`/`toolName`/`isError`/`timestamp`. - Unit test: nested `web_fetch` activity under an `exec` call counts one completed success and one completed failure, alongside the `exec` result itself. ## Proof - Repro on origin/main (`8e185919954`): `qa suite --provider-mode mock-openai --runtime-pair openclaw,codex --scenario runtime-tool-web-fetch` fails the openclaw cell with the 5s transcript-evidence timeout; the preserved agent DB shows 11 persisted transcript rows for the happy session including the nested `web_fetch` activity with a 200 result. - With this change: `qa suite --provider-mode mock-openai --concurrency 1 --model openai/gpt-5.6-luna --alt-model openai/gpt-5.6-luna-alt --runtime-pair openclaw,codex --scenario runtime-tool-web-fetch --scenario runtime-tool-web-search --scenario runtime-tool-session-status --scenario runtime-tool-sessions-spawn` passes 4/4 (openclaw cells: toolCalls=4/4/4/6, codex cells: toolCalls=2; drift step pass). - Unit: `suite-runtime-agent-session.test.ts` (new nested-tool case + existing), `suite-runtime-agent-process.test.ts` + `runtime-tool-fixture.test.ts` (100 passed).
Adds the Opus 5.5 and GPT-6 Sol/Luna backports to Highlights and Changes and regenerates the contribution record for the cherry-picked fixes.
…ng the package (openclaw#155977) ## Summary `openclaw update` retains the running updater's package tree so its workers survive the installer's replacement (openclaw#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.
* fix(codex): discover GPT-6 models with runtime 0.155.1 Keep the managed runtime, ACP adapter, and subscription catalog client version on the same exact release. Refresh the native model discovery snapshot from an authenticated 0.154.0 to 0.155.1 cache reuse probe. Related: openclaw#155937; follow-up to openclaw#155967. * test(codex): sync runtime fixtures with 0.155.1
…odex 0.155.1 backport
…wrap sandbox (openclaw#156132) ## Summary `extensions/codex/src/app-server/event-projector.output-fidelity.native.test.ts` fails in every Linux Full Release Validation run for 2026.9.6 (runs 35743778013, 35761282770, 35776854018, 35802235259 attempts 1 and 2) with `Error: Expected native command execution` from `requireRecord`, while passing on macOS. ## Root cause (environment, not a runtime contract change) The proof dials `codex app-server` directly with `sandbox_mode="read-only"`. Since Codex 0.154 bubblewrap is the only Linux sandbox (`use_linux_sandbox_bwrap` is `Stage::Removed`, `use_legacy_landlock` deprecated) and a read-only exec needs a user plus network namespace. The GitHub-hosted `ubuntu-24.04` shard (`checks-node-extensions-shard-1`, image 20260907.300.1) cannot configure loopback inside that namespace. The diagnostics from openclaw#154919 captured the real exec output on Linux CI (run 35612418856): ``` Process exited with code 1 Output: bwrap: loopback: Failed RTM_NEWADDR: Operation not permitted ``` `cat source.txt` never runs, app-server emits a `function_call_output` with the bwrap error but no `item/completed` with `type: "commandExecution"` for the call id, and the harness throws. The same symptom is already documented in `docs/plugins/codex-harness-reference/approval-and-sandbox.md` and probed by `openclaw doctor` for namespace-restricted Ubuntu/AppArmor hosts. It became deterministic on the 09-22 runner rotation; Codex 0.155.1 did not change the Linux sandbox path (`git diff rust-v0.154.0 rust-v0.155.1 -- codex-rs/linux-sandbox codex-rs/sandboxing` only adds WSL interop masking). `settled-turn-finalizer.native.test.ts` passes on the same shard because it runs through the product path, which launches app-server with `--sandbox` from the resolved exec policy and therefore never enters bwrap. ## Fix - Use `sandbox_mode="danger-full-access"` for this proof. It covers exec output fidelity (history truncation vs the provider-visible result), not sandboxing, and mirrors how product launches configure app-server. Every assertion stays in place. - When the `commandExecution` item is missing, the failure message now lists the observed notifications (method, item type, id, status) and the first 500 chars of the exec output, so a future regression is self-describing. This folds in the diagnostics from openclaw#154919. ## Proof - Local macOS, Node 24, `vitest.extension-database-workers.config.ts`: 5/5 runs green while the whole `extensions/codex/src/app-server` batch ran concurrently as load. - Docker `ubuntu:24.04` with the 0.155.1 linux-arm64 binary: `codex sandbox -c sandbox_mode=read-only -- cat` fails with bwrap namespace errors under default confinement and succeeds only when the container may create namespaces; `danger-full-access` runs in both. - `OPENCLAW_TESTBOX=1 pnpm check:changed`: see the landing log. Related: openclaw#154919 (diagnostics-only PR, superseded by this change), openclaw#155989 (0.155.1 pin).
…ers (openclaw#156134) ## Summary `QuickChatCatalogPresentationTests` › "rendered Quick Chat preserves catalog disclosure and shortcut behavior in order" fails intermittently in the hosted `macos-swift (tests)` job (Full Release Validation runs 35761278329 and 35802234377 for 2026.9.6; passes locally). The uploaded `macos-native-test-logs` artifacts show two failure shapes, both environmental: 1. `QuickChatPresentationTests.swift:304` `Expectation failed: condition()` with the diagnostic `Quick Chat presented: visible=true, active=true, key=true, editorReady=true`. The only wait that can fail with that state is `waitUntil { !application.isActive }` after `application.deactivate()`: the hosted runner never hands activation to another app, so the *precondition* for "presents without foreground ownership" is unattainable there, while the behavior itself (panel visible, editor focused, reopen, disable) is proven. 2. On frozen release targets (`HISTORICAL_TARGET=true`) the rendered suite still runs in the parallel default lane. Parallel suites open key windows, Quick Chat dismisses on focus loss by design, and the test then reports `windowVisible=false windowKey=false` plus a reset `model.speed` (the 5-issue attempt). Current targets already isolate the suite into the `default-rendered` lane; frozen targets did not. ## Changes - `apps/macos/Tests/OpenClawIPCTests/QuickChatPresentationTests.swift`: the activation hand-off before firing the shortcut is a bounded, non-asserting `poll` that prints whether the host yielded activation; every behavioral assertion after it is unchanged. `waitUntil` now delegates to `poll`. - `.github/workflows/ci.yml`: run the isolated `default-rendered` lane for frozen targets too whenever the suite exists in the checked-out tree; older tags without the suite keep the single default lane. ## Proof - Local `swift test --disable-sandbox --filter QuickChatCatalogPresentationTests` (apps/macos): 5/5 passes. - One extra run with another application in the foreground (app deliberately not active) passes. - `swiftformat --lint` clean on the changed file.
…rship is unverifiable
… Doctor entrypoint
…store it under --no-restart, and admit activation past an unverifiable system probe
…redecessor-stop fix
|
|
Codex review: needs real behavior proof before merge. Reviewed October 7, 2026, 1:32 AM ET / 05:32 UTC (Revision 6). ClawSweeper reviewWhat this changesThe branch adds persistent delegated-task reservations, human fallback controls, execution guards, restart recovery, and child-run lineage propagation, alongside inherited release and dependency changes. Merge readiness⛔ Blocked before merge - 20 items remain Keep open: this PR contains distinct, useful work, but the latest ingress-evidence change leaves the previous enforcement and compatibility blockers unresolved. No verified replacement or merged fix supersedes it. Priority: P2 Review scores
Verification
How this fits togetherOpenClaw routes incoming requests to an agent or delegated owner, then admits model work and tool execution. This change adds a shared SQLite reservation that should prevent ordinary execution while a delegate owns the task. flowchart TD
A[Incoming request] --> B[Host delegation decision]
B --> C[Durable task reservation]
C --> D[Delegate handoff]
C --> E[Agent and tool admission]
F[Current human authority] --> E
E --> G[Model or tool effect]
D --> H[Authorized terminal release]
H --> C
Decision needed
Why: The branch introduces durable execution policy and a schema bump without recorded acceptance; source review cannot choose the permanent ownership and persistence contract. Before merge
Findings
Agent review detailsSecurityNeeds attention: Ingress capability minting is stronger, but terminal release and delayed tool execution still bypass the new live-authority boundary. PR surfacePR surface statistics unavailable: the file list is incomplete. Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Give one approved Host execution owner responsibility for reservation creation, live authorization, terminal settlement, worker-backed persistence, and compatible upgrades. Do we have a high-confidence way to reproduce the issue? Yes for the candidate defects at source level: unpopulated delegation intent, authority-free terminal release, revocation during awaited tool policy, and schema-reader mismatch provide concrete triggers. No failing current-main runtime was executed. Is this the best way to solve the issue? No. The proposal needs complete producer-to-effect integration and live mutation authority under one lifecycle owner; helper-established reservations do not establish that invariant. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 6041559b4eb1. LabelsLabel changes:
Label justifications:
EvidenceSecurity concerns:
What I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (5 earlier review cycles)
|
PR-1 follow-up. The ownership guard was Host-owned code but was not yet invoked by the runtime, so the invariant was not enforced on the live dispatch path. - resolvePreparedRunAdmission() — the admission every embedded/CLI/worker agent run passes through before model work — now asserts agent execution admission first, so a delegated locked lineage is denied before any model call. - runBeforeToolCallHook() — the before_tool_call policy chain — now vetoes a protected tool for a delegated locked lineage before the capability executes, with deniedReason 'delegated-execution-ownership'. - Host-only lineage binding (module-private Symbol) marks the exact execution lineage a delegated task owns; unrelated runs sharing user, agent, workspace, Gateway, or session are unaffected. - The live trusted-human fallback authority is carried on the run context, so FALLBACK_AUTHORIZED admits ordinary execution only for the exact authorized run; an authorized lineage with no carried authority is still denied. - Both gates are Host code: a missing plugin, missing handler, or crashed delegate cannot remove enforcement, and neither can a restart. Real-path integration tests enter through resolvePreparedRunAdmission() and runBeforeToolCallHook() rather than calling the guard functions directly.
tsgo:core flagged src/delegation/delegated-execution-ownership-guard.ts(50,10) TS6133 for the leftover isLive helper after the fail-closed refactor. The registry read now runs on every decision, so the helper and its import are dead.
|
Superseded by the clean mainline forward-port in #166475. |
Host: durable delegated execution ownership guard (PR-1)
Invariant: OPENCLAW_MUST_NOT_EXECUTE_DELEGATED_TASK_DIRECTLY
What this adds
delegated_execution_ownership+delegated_execution_ownership_eventsin the shared state database ($OPENCLAW_STATE_DIR/state/openclaw.sqlite). The shared-state schema moves 18 → 19; a pre-v19 build refuses to open a database that may carry live reservations.DIRECT | DELEGATED_LOCKED | FALLBACK_AUTHORIZED | RELEASED. DIRECT is the implicit absence of a live row, so a missing registry can never read as a grant. Closed events only; no vague transition reasons.DELEGATED_LOCKEDrow commits before the delegate handoff is attempted, so there is no unguarded interval. Hostdelegation_refand delegatedelegate_goal_refare distinct identities.CommandOwnerAuthoritycapability (module-private Symbol, private brand, live assertion), bound to the exactdelegation_ref. Model-forged, tool-argument-derived, plugin-self-authorized, and stale authority are all refused.DELEGATED_LOCKED. A database that published schema v19 without the registry, or a reservation naming a higher enforcement floor, is refused.What may never release a lock
timeout · plugin unload · plugin crash · missing handler · Gateway restart · model decision · ordinary MUSE approval · tool failure · planner refusal
Tests
src/delegation/delegated-execution-ownership.test.ts— 35 passing cases covering acquisition-before-handoff, plugin/handler absence, plugin throw, agent and tool denial while locked, restart rehydration, owner-unavailable-stays-locked, wrongdelegation_ref, model- and plugin-forged fallback, stale authority, exact fallback and revoke, timeout and MUSE-approval non-release, duplicate acquisition, CAS conflicts, all three terminal events, fallback/handback race, unrelated execution unaffected, and lineage inheritance.RED evidence at base
eb377ac: the suite fails withERR_MODULE_NOT_FOUNDforsrc/delegation/delegated-execution-ownership.ts— the Host has no delegated execution ownership enforcement at all.Deferred to PR-2 (known gaps)
CLI
openclaw agent execisolated-state path · cron edge cases · A2A edge paths · exotic background routes.Not touched
No production Gateway, no MUSE Runtime Core, no deploy, no merge, no rebase. PR-1 only.