Repository navigation
refactor(plugin-sdk)!: retire beta.5 whole-session-store bridge - #162220
Conversation
Remove the approved whole-store SDK and package-root compatibility surface. Plugins use scoped row mutations and identity-backed transcript APIs; preserve ordinary legacy-state migrations. Record the September 30 supported-plugin cutoff and retire compatibility-only projection and materialization code.
Evict the native handle without disposing the lifecycle execution owner. Retain cold integrity admission, FIFO, revocation, and commit assertions. Document verified migrated Codex and Feishu 2026.9.7 package artifacts.
|
🦞👀 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: blocked before merge. Reviewed September 30, 2026, 9:17 PM ET / October 1, 2026, 01:17 UTC (Revision 4). ClawSweeper reviewWhat this changesThe branch removes whole-session-store Plugin SDK exports and their SQLite compatibility bridge, updates migration guidance and boundary checks, and moves affected tests to scoped session operations. Merge readiness⛔ Blocked before merge - 5 items remain Keep open. Current main and the latest release still provide the bridge, so this is distinct work. No concrete patch defect was found, but the accelerated public SDK cutoff still needs security-owner acceptance and observed host-upgrade behavior. Priority: P2 Review scores
Verification
How this fits togetherInstalled plugins import OpenClaw's session SDK through the plugin loader. The SDK reads and changes SQLite-backed session entries and transcripts; an unavailable import can prevent an older plugin from loading. flowchart TD
A[Installed plugin] --> B[Plugin loader]
B --> C{Session SDK import available?}
C -->|Yes| D[Scoped session operations]
D --> E[SQLite sessions and transcripts]
E --> F[Plugin behavior]
C -->|No| G[Plugin load error]
Decision needed
Why: The SDK-owner decision is recorded, but the scoped policy requires security-owner acceptance too; source inspection cannot supply that human decision. Before merge
Agent review detailsSecurityNone. PR surfaceSource -429, Tests -562, Docs +35, Other -20. Total -976 across 29 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep the scoped session SDK and retire the bridge under an accepted support cutoff, with a verified update path that makes obsolete plugin failures clear and loads migrated packages while preserving existing SQLite and Doctor migrations. Do we have a high-confidence way to reproduce the issue? Not applicable: this is an intentional SDK retirement, not a bug report. Current main and the latest release establish the pre-change exports. Is this the best way to solve the issue? Unclear: removing the bridge after migration is a coherent cutover, but the earlier public cutoff still needs the required acceptance and observed upgrade behavior. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against b3b34beebe08. LabelsLabel changes: No label changes. Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
…claw#162220) Retire the beta.5 whole-session-store bridge under the approved September 30 SDK cutoff. Remove loadSessionStore, updateSessionStore, resolveSessionFilePath, resolveSessionStoreEntry, LoadSessionStoreOptions, and UpdateSessionStoreOptions from session-store-runtime, plus package-root loadSessionStore/saveSessionStore aliases. Plugins use getSessionEntry/listSessionEntries, scoped patch/upsert/delete operations, and identity-backed transcript APIs. Preserve the session-store-runtime subpath, resolveStorePath, canonical SQLite storage, and ordinary legacy-state/Doctor migrations. Published Codex and Feishu 2026.9.7 packages use the replacements. Remove exclusive projection/reconciliation/materialization code, migrate surviving tests, and shrink SDK export and assertion budgets. Focused remote tests, plugin contracts, import boundaries, changed-file checks, build, both zero-cycle checks, exact API-removal audit, and independent review passed.
What Problem This Solves
Retires the beta.5 whole-session-store SDK bridge under the SDK owner's September 30 cutoff decision, removing detached-store reconciliation and compatibility JSONL materialization.
User Impact
Breaking SDK change:
openclaw/plugin-sdk/session-store-runtimeno longer exportsloadSessionStore,updateSessionStore,resolveSessionFilePath,resolveSessionStoreEntry,LoadSessionStoreOptions, orUpdateSessionStoreOptions. The package-rootloadSessionStoreandsaveSessionStorealiases are also removed.Plugins must use
getSessionEntry/listSessionEntries, scopedpatchSessionEntry/upsertSessionEntry/deleteSessionEntry, and identity-backed transcript APIs. The cutoff excludesv2026.7.1-beta.5and any still-importing plugin package. The existingsession-store-runtimesubpath andresolveStorePathremain available; pass the agent explicitly to row operations.Why This Change Was Made
All bundled production callers already use the focused replacement APIs. This removes the exclusive core whole-store projection operation, SDK projection/reconciliation helpers, transcript-file materialization, and legacy agent-selection map. Surviving test callers now use row or lifecycle operations; compatibility-only tests are removed while private-state, authority, rollback, and FIFO coverage remains.
The compatibility registry and migration docs record the accepted cutoff. Existing package exports and SDK entrypoint lists remain correct because no subpath is removed or added. Canonical SQLite schemas, persisted state, and ordinary legacy-state/Doctor migrations are unchanged. No changelog edit: the breaking-change paragraph above is the release-note context.
Evidence
Final published head:
47653d7983bddc9e70cb535c32b62cbcc52f3ed8. The first hosted run was https://github.com/openclaw/openclaw/actions/runs/36795270165; see the failure/fix notes below. Final-head run https://github.com/openclaw/openclaw/actions/runs/36798162330 was fail-fast cancelled for the inherited main import cycle documented below; cancelled shards remain unrun.check-changedpassed all selected gates on AWS, including core/extensions/tests/scripts typechecks, lint, export/dependency guards, and Knip. Both independent cycle checks reported zero. API diff against the lane base reports exactly the six intended SDK removals, no added exports, no entrypoint changes, and no changes to retained direct signatures (digestd6f70137). Its 14 reachable declaration changes were inspected and only reflect the removed helper/barrel declarations, retired writer label, and compatibility tombstone. The final ratchet-only commit does not change API inputs.pnpm buildpassed on AWS in 8m 22.3s, including package/SDK declarations, 53 native control-plane module checks, and Doctor closures. The remote validated tracked source was verified byte-identical to the published head before the later surface-budget correction.Independent Codex autoreview: scoped-clean through P2 for the retirement, fixture correction, and exact shrink-only assertion-ratchet update; the SDK surface-budget correction is also scoped-clean through P2.
Integrity-checked npm tarballs confirm the retired imports in
@openclaw/[email protected]and@openclaw/[email protected]; both published2026.9.7packages use modern replacements.Remote proof: Blacksmith Testbox
tbx_01m3t9vrsf1fxbtfzjkmzmp068passed both cycle checks (zero), SDK export synchronization, session-accessor boundary, all plugin contracts, import-boundary tests, Feishu Doctor, and the focused SDK/consumer suites. Source sync later timed out twice; the remaining checks moved to sanitized AWS Crabboxcbx_8cdf669b2cc0.The first native cold-admission replay exposed a fixture error: disposing a database path revokes the execution owner now captured by lifecycle removal. The fixture now evicts only the cached handle while forcing cold validation; all revocation, FIFO, and persisted-row assertions remain. Its full 24-test suite then passed on AWS (57.88 s cold wall, including compilation). The successful seven-shard contract/consumer selection took 80.68 s on Testbox.
Current main deliberately replaced
plugin-sdk:api:gen/ committed API baselines withplugin-sdk:api:diffin #123036. Validation uses that canonical exact-revision tool. No SDK subpath was added or removed.Measured diff: 429 production lines removed, 19 tooling lines removed, 562 test lines removed, 35 documentation lines added, and one ratchet line removed (976 net tracked lines removed).
Coverage of the scoped session-store bridge and projection owners
Original production files over 200 lines, sorted by size:
src/config/sessions/session-accessor.sqlite-projection.tssrc/plugins/compat/registry-records.tssrc/plugin-sdk/session-store-runtime.tssrc/config/sessions/session-accessor.sqlite-projection-read.tssrc/config/sessions/session-accessor.tssrc/config/sessions/session-accessor.sqlite-projection-state.tssrc/config/sessions/session-accessor.lifecycle.tsAlso read the complete 149-line SDK internal projection module and package-root facade; deleted exclusive helpers and aliases. Repository-wide caller search covered src, extensions, packages, UI, apps, scripts, tests, and docs.
Maintainer decision and review resolution
Peter Steinberger explicitly approved this early retirement on September 30, 2026, including satisfaction of the SDK-owner cutoff-acceptance gates. The instruction for this lane was: “this retirement is APPROVED now; that approval satisfies the ‘needs its owner's accepted decision’ / cutoff-approval gates.” This is the accepted decision to exclude beta.5 and other still-importing plugin versions, rather than a decision delegated to code review.
ClawSweeper reports no code or security findings. Its request to retain the old deadline is resolved by that explicit maintainer direction and the verified published replacements above. The compatibility registry is SDK-support metadata; this diff changes no database schema, persisted-state format, Doctor transform, retention, or migration. Existing legacy-state migration and Feishu Doctor tests pass. Old packages must be upgraded before the host; loader failure warnings and plugin synchronization remain owned by the unchanged updater. No full published-driver host-upgrade run is claimed.
First hosted CI failures
checks-node-compact-small-15: the surface-budget tests caught this PR's missing budget shrink. Default public exports are corrected from 4594 to 4588 and callables from 2698 to 2694; all 11 canonical graph/growth-negative-control tests pass remotely (13.62 s suite wall). No assertions were weakened.checks-node-changed-compact-small-11: plugin-generation lifecyclepublication/arrivalscases reported “Reported plugin cleanup faults must not poison process close.” The owning repair already landed on main as cf78e6443477, with reproduction and validation recorded there. This lane changes none of those disposal owners. The next CI merge revision includes that main fix; no claim that a passing unrelated hourly-main run proves this failure is made.Final-head inherited failure and approved landing exception
check-additional-runtime-topology-architecturefailedcheck:madge-import-cycleswith the two-file cyclesrc/state/openclaw-state-db-async-lifecycle.ts→src/state/openclaw-state-maintenance-context.ts→ lifecycle. Runtime value cycles were zero. This PR job tested merge8d17b7d2049a0412db43c34178a7db3353aa175f.The exact same cycle failed on unrelated PR #161773 at its current head
535022363c54e363c85ad61c5427b867388944ad: run 36797534003, architecture job 110164600191, tested merge22f82beainto mainb2d26e4a6191. This lane changes neither cycle file. Its candidate passed both cycle checks before each push.The coordinator has already repaired the inherited cycle on main in
3e05f6b380cd2d6f68b6205109aacdb5a201d836and17b86a823882feee54e9e9d3fdf014cc6edef57e, with duplicate-export cleanup in56a1ac4b064. The second repair records zero cycles, core/typecheck proof, 95 focused tests, and independent review. The failed architecture job and derivative CI gate are the only final-head failures; remaining fail-fast cancellations are not claimed as passing tests.Landing uses the maintainer's explicitly approved pre-existing-failure exception, pinned to
47653d7983bddc9e70cb535c32b62cbcc52f3ed8, with the passing remote scoped checks and inspected API diff above. No CI rerun or empty refresh push is requested.Landing outcome
Merged as
1783c5fd6fc5b03d2b376ba7cbbab4461940207eusing the approved, exact-head pre-existing-CI exception. All task-owned Testbox and AWS leases were stopped.