Skip to content

fix(plugins): preserve exact installed-index mutation receipts - #140328

Merged
fuller-stack-dev merged 1 commit into
mainfrom
feat/update-plugin-row-receipt-20260906
Sep 6, 2026
Merged

fuller-stack-dev merged 1 commit into
mainfrom
feat/update-plugin-row-receipt-20260906

Conversation

@fuller-stack-dev

@fuller-stack-dev fuller-stack-dev commented Sep 6, 2026 •

Copy link
Copy Markdown
Member

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

  • Exact-row regressions failed before the change for missing receipts; successful caller forwarding failed separately before its fix.
  • 85 writer/rollback controls passed, including exact serialized predecessor bytes/timestamps, absence, invalid-but-present data, selected DB precedence, later-write stability, and an actual deferred SQLite COMMIT failure.
  • Final caller suite: 54 tests passed, including six receipt controls and the real two-process config rollback case.
  • Additional CLI install/update fixture controls: 305 tests passed. Production typechecking passed after updating the typed receipt test double.
  • Full changed-file checks passed, including production/test typechecking, lint, formatting, all dead-export scans, and repository guards. Final independent P0-P2 review and exact-head native review passed with no findings. Hosted CI is running on the published head.

@clawsweeper

clawsweeper Bot commented Sep 6, 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 cli CLI command changes size: M maintainer Maintainer-authored PR labels Sep 6, 2026
@fuller-stack-dev
fuller-stack-dev marked this pull request as ready for review September 6, 2026 17:33
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 6, 2026
@clawsweeper

clawsweeper Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 6, 2026, 1:42 PM ET / 17:42 UTC.

ClawSweeper review

What this changes

The 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
Reviewed head: 70178b9d483db1a2a76c180c17fc992d20d3dee4

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused implementation with useful database-boundary regression coverage and no identified blocking defect.
Proof confidence 🌊 off-meta tidepool Not applicable: The MEMBER-authored PR adds internal receipt data without changing authority. Its supplied validation and inspected SQLite boundary tests are supplemental evidence; the external-contributor proof gate does not apply.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The MEMBER-authored PR adds internal receipt data without changing authority. Its supplied validation and inspected SQLite boundary tests are supplemental evidence; the external-contributor proof gate does not apply.
Evidence reviewed 8 items Pinned scope and current-main comparison: The inspected production differences against fetched main are the receipt extension and its forwarding; main still lacks these changes. Host-verified introduction evidence limits ownership to five files and distinguishes unrelated base-branch changes.
Exact facts captured by the existing writer: The writer reads the predecessor and resulting row within the same transaction, obtains database identity from the acquired handle, and retains the existing parsed predecessor and revision. Serialization, lease enforcement, and restore predicates remain unchanged.
Transaction and caller settlement: The shared database owner returns through the synchronous transaction helper, whose outer transaction commits before returning. Installation commit helpers expose the receipt after the caller completes; failures retain the existing revision-guarded compensation path.
Findings None None.
Security None None.

How this fits together

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

Before merge

None.

Agent review details

Security

None.

PR surface

Source +27, Tests +216. Total +243 across 5 files.

View PR surface stats
Area Files Added Removed Net
Source 2 46 19 +27
Tests 3 226 10 +216
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 5 272 29 +243

Review metrics

Metric Value Why it matters
Production versus regression coverage Production net +27 lines; tests and test support net +216 lines Production growth is justified by transaction-owned receipt capture and forwarding; most growth provides independent database and rollback controls.

Technical review

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

Labels

Label changes:

  • add P2: This is a bounded reliability prerequisite for update recovery, without an established urgent user-facing regression.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The MEMBER-authored PR adds internal receipt data without changing authority. Its supplied validation and inspected SQLite boundary tests are supplemental evidence; the external-contributor proof gate does not apply.

Label justifications:

  • P2: This is a bounded reliability prerequisite for update recovery, without an established urgent user-facing regression.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The MEMBER-authored PR adds internal receipt data without changing authority. Its supplied validation and inspected SQLite boundary tests are supplemental evidence; the external-contributor proof gate does not apply.

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)
  • Ayaan Zaidi: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

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.

@fuller-stack-dev
fuller-stack-dev merged commit 173a1a9 into main Sep 6, 2026
252 checks passed
@fuller-stack-dev
fuller-stack-dev deleted the feat/update-plugin-row-receipt-20260906 branch September 6, 2026 17:44
@fuller-stack-dev

Copy link
Copy Markdown
Member Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Sep 6, 2026
* 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)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli CLI command changes maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: M 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