Skip to content

refactor(plugin-sdk)!: retire beta.5 whole-session-store bridge - #162220

Merged
steipete merged 4 commits into
mainfrom
deslop/l255-session-store-bridge-retirement
Oct 1, 2026
Merged

steipete merged 4 commits into
mainfrom
deslop/l255-session-store-bridge-retirement

Conversation

@steipete

@steipete steipete commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

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-runtime no longer exports loadSessionStore, updateSessionStore, resolveSessionFilePath, resolveSessionStoreEntry, LoadSessionStoreOptions, or UpdateSessionStoreOptions. The package-root loadSessionStore and saveSessionStore aliases are also removed.

Plugins must use getSessionEntry / listSessionEntries, scoped patchSessionEntry / upsertSessionEntry / deleteSessionEntry, and identity-backed transcript APIs. The cutoff excludes v2026.7.1-beta.5 and any still-importing plugin package. The existing session-store-runtime subpath and resolveStorePath remain 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-changed passed 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 (digest d6f70137). 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 build passed 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 published 2026.9.7 packages use modern replacements.

Remote proof: Blacksmith Testbox tbx_01m3t9vrsf1fxbtfzjkmzmp068 passed 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 Crabbox cbx_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 with plugin-sdk:api:diff in #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:

Lines File Coverage
693 src/config/sessions/session-accessor.sqlite-projection.ts READ; deleted whole-store compatibility operation. Modern lifecycle mutations and deleted-agent purge remain required.
651 src/plugins/compat/registry-records.ts READ; retired this record. Other records retain independently named compatibility contracts.
641 src/plugin-sdk/session-store-runtime.ts READ; removed bridge, materialization, and agent-selection map. Remaining row/transcript/lifecycle APIs are active public contracts.
372 src/config/sessions/session-accessor.sqlite-projection-read.ts READ; active-transcript queries and snapshot semantics remain required.
320 src/config/sessions/session-accessor.ts READ; removed bridge export. Remaining storage-neutral core operations have callers.
232 src/config/sessions/session-accessor.sqlite-projection-state.ts READ; shared native/worker lifecycle transaction kernel remains required.
211 src/config/sessions/session-accessor.lifecycle.ts READ; removed bridge export. Batch authorization and plugin cleanup remain required.

Also 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 lifecycle publication / arrivals cases 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-architecture failed check:madge-import-cycles with the two-file cycle src/state/openclaw-state-db-async-lifecycle.ts → src/state/openclaw-state-maintenance-context.ts → lifecycle. Runtime value cycles were zero. This PR job tested merge 8d17b7d2049a0412db43c34178a7db3353aa175f.

The exact same cycle failed on unrelated PR #161773 at its current head 535022363c54e363c85ad61c5427b867388944ad: run 36797534003, architecture job 110164600191, tested merge 22f82bea into main b2d26e4a6191. 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 3e05f6b380cd2d6f68b6205109aacdb5a201d836 and 17b86a823882feee54e9e9d3fdf014cc6edef57e, with duplicate-export cleanup in 56a1ac4b064. 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 1783c5fd6fc5b03d2b376ba7cbbab4461940207e using the approved, exact-head pre-existing-CI exception. All task-owned Testbox and AWS leases were stopped.

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.
@clawsweeper

clawsweeper Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review complete

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

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation scripts Repository scripts agents Agent runtime and tooling plugin: file-transfer size: XL labels Oct 1, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Oct 1, 2026
@clawsweeper

clawsweeper Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 30, 2026, 9:17 PM ET / October 1, 2026, 01:17 UTC (Revision 4).

ClawSweeper review

What this changes

The 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
Reviewed head: 47653d7983bddc9e70cb535c32b62cbcc52f3ed8
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The code cutover is focused, while the unverified upgrade outcome limits confidence in the accelerated public cutoff.
Proof confidence 🌊 off-meta tidepool Not applicable: The provided MEMBER association exempts this PR from the external-contributor proof gate. Reported focused remote checks cover session operations, but no published-updater-to-candidate plugin-load result is supplied. The compatibility record is static metadata, so no stored-data model changes.
Patch quality 🦐 gold shrimp (3/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The provided MEMBER association exempts this PR from the external-contributor proof gate. Reported focused remote checks cover session operations, but no published-updater-to-candidate plugin-load result is supplied. The compatibility record is static metadata, so no stored-data model changes.
Evidence reviewed 9 items Introduced SDK retirement: The introduced patch removes the whole-store exports and leaves resolveStorePath and scoped row APIs in place.
Current main retains the bridge: Fetched main still exports loadSessionStore, updateSessionStore, resolveSessionFilePath, and resolveSessionStoreEntry.
Latest release retains the bridge: The v2026.9.7 release source exports the four deprecated functions.
Findings None None.
Security None None.

How this fits together

Installed 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]
Loading

Decision needed

Question Recommendation
Does the security owner accept ending the documented session SDK compatibility window on September 30 for installed plugins that still import the bridge? Approve the early cutoff: Record security-owner acceptance after reviewing the published-driver upgrade outcome for an old package and a migrated replacement.

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

  • Resolve merge risk (P1) - The September 30 cutoff precedes the announced October 12 window. SDK-owner approval is recorded, but the separate security-owner acceptance required by the scoped SDK policy is not visible.
  • Resolve merge risk (P1) - An installed package that still imports the removed exports may fail to load after a host update. Package inspection and focused checks do not establish the published-updater-to-candidate result for an old package and a migrated replacement.
  • Complete next step (P2) - Record security-owner acceptance of the September 30 cutoff and provide a published-updater-to-candidate result for a still-importing plugin and a migrated replacement.
  • Resolve maintainer decision - Resolve the maintainer decision shown above before merge.
  • Add data-model compatibility proof - Confirm migration or upgrade compatibility proof before merge.
Agent review details

Security

None.

PR surface

Source -429, Tests -562, Docs +35, Other -20. Total -976 across 29 files.

View PR surface stats
Area Files Added Removed Net
Source 9 10 439 -429
Tests 13 155 717 -562
Docs 4 47 12 +35
Config 0 0 0 0
Generated 0 0 0 0
Other 3 7 27 -20
Total 29 219 1195 -976

Review metrics

Metric Value Why it matters
Public SDK names retired 8 named exports Four helpers, two option types, and two package-root aliases leave the supported surface.
Compatibility cutoff 12 days earlier The proposed September 30 retirement precedes the documented October 12 window.

Stored data model

Persistent data-model change detected: migration/backfill/repair: src/plugins/compat/registry-records.ts. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Validate the early cutoff (recommended)
    Record the required security-owner acceptance and show the published updater's candidate-host outcome for a still-importing plugin and a migrated plugin.
  2. Pause the retirement
    Keep the documented bridge until its announced window and supported-package migration conditions are satisfied.

Technical review

Best 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.

Labels

Label changes:

No label changes.

Label justifications:

  • P2: This bounded SDK cleanup has a material but limited plugin upgrade impact requiring owner review.
  • merge-risk: 🚨 compatibility: The SDK owner accepted excluding old imports, but security-owner acceptance and the observed host-upgrade outcome remain unresolved.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🌊 off-meta tidepool and patch quality is 🦐 gold shrimp.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The provided MEMBER association exempts this PR from the external-contributor proof gate. Reported focused remote checks cover session operations, but no published-updater-to-candidate plugin-load result is supplied. The compatibility record is static metadata, so no stored-data model changes.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Josh Lehman: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Vincent Koc: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Record security-owner acceptance of the September 30 cutoff.
  • Show the published-updater-to-candidate loader outcome for a still-importing plugin and a migrated replacement.

Rating scale

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

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

Workflow

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

History

Review history (3 earlier review cycles)
  • reviewed 2026-10-01T00:21:25.333Z sha 064a008 :: blocked before merge. :: none
  • reviewed 2026-10-01T00:33:29.805Z sha 064a008 :: blocked before merge. :: none
  • reviewed 2026-10-01T00:58:12.690Z sha 47653d7 :: blocked before merge. :: none

@steipete
steipete enabled auto-merge (squash) October 1, 2026 00:56
@steipete
steipete merged commit 1783c5f into main Oct 1, 2026
107 of 229 checks passed
@steipete
steipete deleted the deslop/l255-session-store-bridge-retirement branch October 1, 2026 01:18
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 1, 2026
…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling docs Improvements or additions to documentation merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. plugin: file-transfer rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. scripts Repository scripts size: XL status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant