Repository navigation
fix(plugins): preserve exact installed-index mutation receipts - #140328
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 maintainer review before merge. Reviewed September 6, 2026, 1:42 PM ET / 17:42 UTC. ClawSweeper reviewWhat this changesThe plugin installation store now returns exact before-and-after SQLite row values and database identity after successful installation-record commits. Merge readiness✅ Ready for maintainer review Keep open: this is a focused recovery prerequisite that current main does not provide. No blocking correctness or security defect was found, and the maintainer-authored PR is protected from cleanup closure. Priority: P2 Review scores
Verification
How this fits togetherPlugin install, update, and uninstall operations write installation metadata through a shared SQLite owner. Its receipts describe committed changes, while the existing lifecycle lease and revision checks govern rollback. flowchart TD
A[Plugin installation changes] --> B[Lifecycle lease]
B --> C[SQLite transaction]
C --> D[Capture previous and written rows]
D --> E[Settle config or freshness check]
E -->|Success| F[Return mutation receipt]
E -->|Failure| G[Existing guarded rollback]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +27, Tests +216. Total +243 across 5 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep exact mutation facts at the existing SQLite writer while leaving any future checkpoint restoration subject to independently validated live ownership. Do we have a high-confidence way to reproduce the issue? Not applicable as a user-facing bug reproduction: this adds internal recovery evidence, and source inspection confirms main's existing receipt omits the exact row facts. Is this the best way to solve the issue? Yes: extending the canonical writer's result preserves exact facts without adding a second writer, persistence format, or restoration mechanism. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 861804b1654b. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
* origin/main: (25 commits) docs(releases): keep the release-notes nav group to version routes (#140353) fix(ui): hide trust wrappers in imported chat history fix(subagents): subagent list building decodes unrelated saved prompts in large session stores (#139540) test(process): share relay startup fixtures (#140345) refactor(doctor): inline GitHub skill discovery inputs (#140343) refactor(ui): share channel status type definitions (#140331) refactor: simplify queue state and infrastructure dispatch (#140311) fix: require saved agent turns before update verification succeeds (#140274) fix(update): keep the service profile when switching to Git (#140263) fix(ui): prevent image avatars overlapping mobile chat (#140341) fix(test): accept release subpages in docs route shape (#140337) refactor(plugins): share uninstall mutation ownership (#140322) refactor(agents): use canonical tool execution arguments (#140280) perf(cli): keep inference metadata and domain help lazy (#140327) refactor(plugins): simplify self-hosted setup results (#140332) refactor(config): reuse parent lookup for unset operations (#140326) fix(plugins): preserve exact installed-index mutation receipts (#140328) test(agents): simplify MCP and LSP boundary fixtures (#140312) fix(ui): preserve literal source previews and copied whitespace (#140306) fix: OpenCode Go/Zen requests are missing the required x-opencode-session header (#137464) ...
Related: #124396
What Problem This Solves
Atomic update recovery needs to distinguish plugin metadata changed by an update from newer operator or plugin work. The existing installed-index receipt retains a parsed predecessor and revision, but loses the original serialized bytes, row timestamp, absence, and selected database identity.
Why This Change Was Made
Extend the existing leased SQLite writer receipt with exact before/after row facts and the acquired database path, captured in the same transaction. Preserve the existing parsed predecessor and revision used by tentative rollback. Forward the receipt from successful install-record/config commits only after caller settlement; a failed transaction or config commit still rejects and rolls back through the existing owner.
No schema, table, writer, or authority mechanism is added. The receipt is evidence, not permission to replace live state.
User Impact
This supplies the canonical row provenance needed by checkpoint preservation. It does not itself enable checkpoint restore, durable replay, retention selection, or cross-writer exclusion, and is not a claim of completed atomic updates.
Evidence