refactor: route plugin SDK session entries through seam#89204
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed June 1, 2026, 3:42 PM ET / 19:42 UTC. Summary PR surface: Source +291, Tests +136, Generated 0. Total +427 across 8 files. Reproducibility: not applicable. this is a refactor slice, not a bug report with a failing user scenario. Source inspection and the new focused tests show the intended compatibility paths, but I did not run tests in this read-only review. Review metrics: 1 noteworthy metric.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Review and land this only in the planned stack order after the base seam PR is accepted, with focused plugin SDK compatibility validation as part of the broader #88838 migration. Do we have a high-confidence way to reproduce the issue? Not applicable: this is a refactor slice, not a bug report with a failing user scenario. Source inspection and the new focused tests show the intended compatibility paths, but I did not run tests in this read-only review. Is this the best way to solve the issue? Acceptable, but not independently merge-ready. The linked migration plan explicitly calls for plugin runtime/SDK caller adoption before the SQLite flip, and this PR keeps the public object-parameter helper shape while moving the implementation behind the seam; the safer path is stack-level maintainer review after the base seam is settled. AGENTS.md: found and applied where relevant. Codex review notes: model gpt-5.5, reasoning high; reviewed against 193988bc5ba4. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +291, Tests +136, Generated 0. Total +427 across 8 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
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. How this review workflow works
|
What
Routes the Plugin SDK and plugin runtime session entry helpers through the 3.1a session accessor seam for entry-level read/list/patch/update/upsert behavior, while preserving the existing public object-parameter API shape.
Refs #88838. Depends on #88840.
Why
This is one Path 3 3.1b caller-adoption slice: plugin-facing session entry APIs need to stop depending directly on file-backed store helpers before the session storage implementation can be validated and later flipped behind the seam.
Changes
preserveActivityScope
Included: entry-level SDK/runtime
getSessionEntry,listSessionEntries,patchSessionEntry,updateSessionStoreEntry, andupsertSessionEntry, plus 3.1a seam support forpreserveActivity.Excluded: transcript identity,
sessionFileidentity, public whole-store compatibility modernization, SQLite validation branch wiring, storage flip, doctor migration, and runtime dual-read/fallback behavior.Testing
node scripts/run-vitest.mjs src/plugin-sdk/session-store-runtime.test.ts src/plugins/runtime/index.test.ts extensions/discord/src/monitor/native-command.plugin-dispatch.test.ts extensions/voice-call/src/response-generator.test.tsnode scripts/run-vitest.mjs src/config/sessions/session-accessor.test.ts src/plugin-sdk/session-store-runtime.test.ts src/plugins/runtime/index.test.ts extensions/discord/src/monitor/native-command.plugin-dispatch.test.ts extensions/voice-call/src/response-generator.test.tsnode scripts/run-vitest.mjs src/plugin-sdk/session-store-runtime.test.ts src/plugins/runtime/index.test.tsnode scripts/run-oxlint.mjs src/config/sessions/session-accessor.ts src/config/sessions/session-accessor.test.ts src/plugin-sdk/config-runtime.ts src/plugin-sdk/session-store-runtime.ts src/plugin-sdk/session-store-runtime.test.ts src/plugins/runtime/runtime-agent.ts src/plugins/runtime/types-core.ts src/plugins/runtime/index.test.tspnpm tsgo:corepnpm tsgo:core:testpnpm plugin-sdk:api:checkgit diff --check upstream/clawdbot-9c3/session-accessor-seam...HEAD