Repository navigation
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs real behavior proof before merge. What this changesThe branch adds shared Memory Core document indexes for compatible agents, changes cross-agent retained SQLite reads, and carries 2026.9.6 release-base updates. Review scores
Merge readiness⛔ Blocked before merge - 14 items remain Keep open: this remains a distinct implementation candidate for shared indexing, but both previous blockers persist and a further provider-identity defect needs repair. Current main does not establish an equivalent fix. Priority: P2 Decision needed
Before merge
Findings
Agent review detailsHow this fits togetherMemory Core indexes workspace documents for agent memory searches. Its database selection determines which agents share indexed documents, embedding results, and publication writes. flowchart TD
A[Agent configuration] --> B[Workspace and index compatibility]
C[Workspace documents] --> D[Memory indexing]
B --> E[Shared or per-agent database]
D --> E
E --> F[Search workers]
F --> G[Agent memory results]
Technical reviewBest possible solution: Keep sharing inside Memory Core with compatibility-keyed storage and live scoped authority, preserve generic agent isolation, and enable it through an explicitly accepted upgrade contract. Do we have a high-confidence way to reproduce the issue? Yes, the patch defects have clear source-based triggers: overlapping incompatible leases, cross-agent borrowing of a retained generic database, and differing remote header values. Runtime reproduction was not executed during this read-only review. Is this the best way to solve the issue? No, the current patch does not yet maintain its claimed compatibility and isolation boundaries; a Memory Core-owned sharing path remains a reasonable direction after those contracts are repaired. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against cbe3ff13b844. Merge-risk optionsMaintainer options:
SecurityNeeds attention: The retained-reader change weakens agent database isolation through pathname-based authorization. EvidenceSecurity concerns:
What I checked:
PR surfacePR surface statistics unavailable: the file list is incomplete. Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. LabelsLabel changes: No label changes. Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (9 earlier review cycles; latest 8 shown)
Reviewed October 5, 2026, 12:23 AM ET / 04:23 UTC (Revision 10). |
bb8f8f9 to
e81fe1f
Compare
…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`.
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
|
@clawsweeper re-review Updated the shared-memory branch with the retained read-only scope fix from the 2026.9.8 runtime issue:
Verification: |
|
🦞👀 Re-review progress:
|
What Problem This Solves
Agents configured on the same workspace currently build separate document indexes, so the same files are embedded and stored repeatedly and agents in that workspace can receive different search results.
This change lets compatible agents share one Memory Core document index while keeping agent-local state and session memory isolated.
User Impact
When
agents.defaults.systemAgent.agentIdis explicitly configured, configured agents that resolve to the same canonical workspace and have the same complete index identity share one document-index database and can search documents indexed through it.The change is intentionally bounded:
sessionsin its memory sources.No configuration migration is required. Existing installations only enter shared mode when the existing system-agent configuration and compatibility checks permit it.
Why This Change Was Made
The new Memory Core-owned scope resolver validates configured membership, canonical workspace equality, and full index compatibility before any shared database I/O. Compatibility covers the provider/model identity, vector settings, chunking, tokenizer, multimodal settings, extra paths, remote identity, input types, and source scope.
Shared databases use a process-wide reference-counted owner with serialized writes and the existing publication worker lifecycle. Status/search reads use a dedicated read-only connection. This keeps the sharing decision inside Memory Core instead of weakening the generic OpenClaw agent database ownership guard with a filename substring exception.
This revision is rebased onto OpenClaw
v2026.9.6(eb377ac59e6c) and replaces the earlier path-rewrite implementation.Evidence
Tested on OpenClaw
v2026.9.6at commiteb377ac59e6c:pnpm tsgopassed.pnpm tsgo:extensionspassed.pnpm tsgo:extensions:testpassed.manager-shared-database.test.tspassed:15/15.oxfmt --checkpassed for all 14 changed files.oxlintpassed for the changed memory-core and SDK surfaces.The integration test exercises the real
getMemorySearchManagerand database entry points. Coverage verifies:Repository-wide checks remain delegated to CI for the pushed head. The local verification intentionally uses focused files and tests.
Closes #95724
Related: #140042, #136767