Repository navigation
refactor(plugins): deprecate synchronous keyed storage - #145158
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: blocked before merge. Reviewed September 11, 2026, 2:59 PM ET / 18:59 UTC. ClawSweeper reviewWhat this changesThe PR marks synchronous plugin storage as deprecated through editor annotations, compatibility metadata, migration documentation, and a registry test while preserving existing behavior. Merge readiness⛔ Blocked before merge - 1 item remains This remains useful, protected work: current main lacks the explicit deprecation contract, and no blocking correctness defect was found. The existing synchronous API remains supported. Priority: P3 Review scores
Verification
How this fits togetherPlugin keyed storage saves plugin-scoped values in SQLite through synchronous or Promise-returning operations. The compatibility registry and SDK documentation tell plugin authors which interface to adopt and when older contracts may be removed. flowchart TD
A[Plugin storage request] --> B[Runtime trust check]
B --> C[Synchronous interface]
B --> D[Awaited interface]
D --> C
C --> E[Shared SQLite storage]
F[Compatibility registry] --> G[Deprecation and migration guidance]
G --> D
Before merge
Agent review detailsSecurityNone. PR surfaceSource +43, Tests +14, Docs +47. Total +104 across 8 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Technical reviewBest possible solution: Keep one storage implementation, guide plugins toward awaited operations, and retain synchronous compatibility until the documented migration and breaking-release conditions are met. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR formalizes a deprecation rather than repairing a reported runtime failure; source inspection confirms the existing operations remain intact. Is this the best way to solve the issue? Yes. The existing compatibility registry and shared storage implementation provide the narrowest path, and the migration guide preserves atomic callbacks and optional capabilities. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against b7693bf50aa2. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
The synchronous storage deprecation is approved with the documented external-plugin compatibility window. This change names the existing adapter and adds annotations, migration guidance, and compatibility inventory metadata. It does not remove methods, change trust eligibility or transactional callbacks, or add runtime warnings. There is no SQLite schema or stored-format change to migrate. The compiler comparison confirms unchanged runtime/type tokens, and existing native SQLite plus loader/type tests cover sync/async coexistence. Removal remains gated on the next Plugin SDK major, a supported migration, and separate breaking-release approval. The generic data-model checkbox does not identify a remaining compatibility defect. |
|
Merged via squash.
|
What Problem This Solves
Plugin authors need an explicit migration path away from synchronous keyed-state operations without losing existing host compatibility or atomic callback behavior.
Why This Change Was Made
The compatibility registry now names the existing synchronous store factory as the
plugin-state-sync-keyed-storeadapter, with anext-plugin-sdk-majorremoval gate. TypeScript annotations and migration documentation guide callers towardopenKeyedStoreand awaited operations. Removal still requires a supported external-plugin migration and explicit breaking-release approval.User Impact
Existing synchronous methods remain available with their current signatures, errors and trust eligibility. No runtime warnings are added. Both APIs share the existing namespace data; no migration copy is needed. Updater and predicate callbacks remain synchronous within their transaction, and optional capabilities remain optional. Callback-free worker operations are a separate contract.
Evidence
Compiler token comparison confirms runtime code and public types are unchanged while all three deprecation annotations are recognized. Existing real SQLite, runtime trust, CJS/TypeScript loader, SDK type and compatibility tests pass, covering 86 cases with the final metadata recheck. Full changed-file checks and fresh Codex review pass.
Changed pages pass MDX checks. Both new migration links resolve; the global anchor audit's 54 unrelated failures exactly match the untouched baseline. No baseline or runtime behavior was changed to hide those failures.