Skip to content

fix(plugins): preserve install index state across failures - #119228

Merged
vincentkoc merged 14 commits into
mainfrom
fix/plugin-install-policy-config-20260804
Aug 4, 2026
Merged

vincentkoc merged 14 commits into
mainfrom
fix/plugin-install-policy-config-20260804

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Aug 4, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

Records-only plugin updates persisted the installed-plugin index without the
effective plugin config. With non-default plugin policy, the stored policy hash
could immediately disagree with the config that produced the write, causing a
persisted-registry-stale-policy diagnostic and an avoidable registry rebuild.

The same ownership invariant was incomplete on failure paths:

  • rollback rebuilt only install records and discarded the complete previous
    index policy, metadata, and prior absence;
  • fresh-process downgrade preparation could leave a tentative index behind
    when the child handoff failed;
  • generic plugin/config commits restored snapshots unconditionally and could
    overwrite a newer concurrent plugin mutation;
  • the generic commit released its lifecycle lease before the paired config
    write, so two failing direct commits could leave the first operation's
    unmatched install records persisted.

This is a correctness follow-up to
#119051.

Root Cause And Owner

The persisted-index store owns plugin index revisions and rollback identity.
Callers were bypassing that owner by writing partial state or restoring a stale
snapshot without proving that their tentative write was still current.

The store now exposes one canonical tentative-write protocol:

  • every write receives a strictly monotonic revision in updated_at_ms;
  • leased writes atomically capture the predecessor and new revision;
  • one lifecycle lease now spans the tentative index write, paired config commit,
    and conditional rollback;
  • rollback restores only when that exact tentative revision is still current;
  • a successor write always wins, including multiple writes in one millisecond.

The generic install-record commit now uses the same receipt and conditional
restore. Retained-install marker compensation runs only when the tentative
index revision was actually restored, so a successor keeps its marker state.
Config mutation paths acquire the plugin lifecycle lease before the config
lock; nested lifecycle work reuses that exact database lease. The lease
heartbeat remains active across long config writes.

This is the best fix because the persistence owner serializes the complete
index/config commit boundary while revision comparison and restore remain one
SQLite transaction. Suppressing stale diagnostics, reconstructing partial state
downstream, or adding another fallback path would leave the violated ownership
boundary in place.

User Impact

Plugin updates that only change install records now preserve the actual plugin
policy in the persisted index. Failed plugin, channel, setup, and post-core
updates restore complete prior state. Concurrent direct failures serialize
instead of leaving unmatched install records behind.

No config/default or SQLite schema changes.

Production LOC: +351/-124, net +227. Tests: +964/-119. The production increase
implements a single persistence and lifecycle ownership boundary: canonical row
parsing, revision assignment, atomic predecessor capture, conditional restore,
and consistent plugin-before-config lock ordering. It removes the obsolete
unconditional restore API and adds no parallel storage path.

ClawSweeper Resolution

  • Fence the generic install-index rollback (P1): generic commits use
    the leased write receipt and restore only while their revision is current.
  • Hold the lifecycle lease through the paired config commit (P1): the
    tentative index write, config commit, and rollback now execute under one
    heartbeat-backed lifecycle lease.
  • Resolve merge risk (P1): two failing direct commits serialize and
    restore the original index; a successor plugin-index commit also survives a
    failed generic config write and a failed post-core child handoff.
  • Improve patch quality: all tentative index writes and restores route
    through the persistence owner's receipt protocol under the lifecycle lease.
  • Add the two-failure ordering regression: a coordinated cross-process
    SQLite test proves writer two cannot enter its config commit while writer one
    owns the lifecycle lease and that both failures restore the original index.
  • Harden sibling rollback tests: CLI and shared commit mocks now use the
    real receipt and conditional-restore signatures, reject stale revisions, and
    no longer invent or assert the removed unconditional restore API. Install
    persistence tests assert the leased writer instead of the retired API.
  • Refresh reviewed baseline: exact head
    751ed7cf61563b231f28da8fde0add0687ae457f contains base
    d06fc25a0c580bb1854fd890e0d849270fbec487. Current main
    1cf1af4aed3dedb010a885fcc9dc652f6d6d93d2 adds six unrelated commits
    with zero touched-file overlap.
  • Refresh review: P0/P1 autoreview reports no findings at 0.93
    correctness confidence on the production-equivalent head
    da86bfcc5cd7bc1a1d2aeeb419708c59d278a3e7; the only later delta makes an
    unused test-helper mock file-local.

Evidence

  • Existing exact-head focused proof before the generic follow-up: 293 tests
    passed across update CLI, persisted-index, records, install-commit, and
    lifecycle-lease suites.
  • Generic follow-up proof: the real cross-process SQLite successor regression
    and lifecycle-lease suite passed; the final install-record suite passed 18/18;
    CLI uninstall/update and agent-add caller suites passed 76/76.
  • Test-contract hardening proof: 272 tests passed across plugin install, update,
    uninstall, shared commit, and the real SQLite successor suites.
  • Final lifecycle-scope proof: the new two-failure regression fails on pre-fix
    head 4b21c4aaed468b4fdcb96da5c9af0683f3fe912a because writer two enters during
    writer one's config commit, then passes on the repaired head and restores the
    original index.
  • Final focused packet: 551 tests passed across install-record, persisted-index,
    lifecycle-lease, plugin CLI, update CLI, post-core, and agent-add callers.
  • Post-CI test-helper cleanup: 253 plugin install, update, and uninstall tests
    passed after making the retired writer mock file-local.
  • install-persistence.test.ts returned to current-main parity after replacing
    retired-writer assertions: 15/18 pass on both heads; the same three unrelated
    metadata fixture failures reproduce on current main
    47bd1bb19412a762ba337aa3b7a618986b007392.
  • The SQLite regressions fix Date.now() where needed and prove successor
    revisions remain greater, survive stale rollback, and preserve the effective
    policy hash.
  • Targeted oxfmt --check: clean.
  • Direct oxlint: clean.
  • git diff --check: clean.
  • Exact-head P0/P1 autoreview: clean at 0.93 confidence.
  • Independent architecture review: no blocking findings; plugin-before-config
    ordering, nested lease reuse, heartbeat lifetime, and the two-failure test all
    match the owner contract.
  • The accidental public export discovered by the first AWS dead-export scan
    was removed; the focused lifecycle suite then passed 5/5.
  • A direct AWS core-test typecheck no longer reported the branch diagnostics;
    its raw sparse checkout stopped on five missing current-main UI config files.
  • The full-checkout changed gate reached repository checks; its dead-export lane
    listed only untouched current-main src/config/** inventory. The exact AWS
    rerun skipped only that noisy lane and passed all remaining checks as
    run_6df1f5d5c5e9.
  • Exact-head TruffleHog preflight: clean.
  • The changed-gate remote router was unavailable before dispatch
    (admin_required on the Azure fallback); local fallback then stopped at the
    linked-worktree no-TTY dependency guard. No dependency reconciliation was
    attempted. Hosted exact-head CI remains the authoritative broad gate.
  • Hosted CI and the latest durable ClawSweeper review remain required before
    merge.

No changelog entry: this repairs internal persistence ownership without adding
or changing a user-facing contract.

* origin/main:
  test(qa): cover Canvas agent and node controls (#119047)
  fix(cli): avoid repeated migration scans during local agent turns (#119051)
  fix(gateway): keep agents list on prepared model facts (#119208)

# Conflicts:
#	src/plugins/installed-plugin-index-store.test.ts
@vincentkoc vincentkoc self-assigned this Aug 4, 2026
@openclaw-barnacle openclaw-barnacle Bot added cli CLI command changes size: S maintainer Maintainer-authored PR labels Aug 4, 2026
@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 4, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. labels Aug 4, 2026
@clawsweeper

clawsweeper Bot commented Aug 4, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 4, 2026, 12:34 PM ET / 16:34 UTC.

ClawSweeper review

What this changes

The PR revisions persisted plugin-index writes and scopes them under the plugin lifecycle lease so failed plugin/configuration operations can conditionally restore the complete previous index state.

Regression provenance

Possible regression — suspected (reviewed change). No predecessor PR is attributed.

Merge readiness

⚠️ Ready for maintainer review - 4 items remain

Keep this maintainer-authored PR open for explicit owner review. Its proposed persistence boundary is credible and addresses the prior P1, but the local read-only sandbox failed before source, history, and caller inspection could run.

Priority: P1
Reviewed head: 751ed7cf61563b231f28da8fde0add0687ae457f
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The patch presents a coherent repair and focused regression claims, but independent whole-path validation was blocked by the local inspection sandbox.
Proof confidence 🌊 off-meta tidepool Not applicable: This is a maintainer-member PR, so the external-contributor real-behavior-proof gate does not apply; its supplied focused regression evidence still needs owner verification.
Patch quality 🦐 gold shrimp (3/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This is a maintainer-member PR, so the external-contributor real-behavior-proof gate does not apply; its supplied focused regression evidence still needs owner verification.
Evidence reviewed 4 items Current PR scope: The provided exact-head diff changes the plugin-index store, its install-record writer, lifecycle lease, and command callers to use revisioned conditional restoration.
Prior blocking finding addressed in context: The latest review context identified lease scope ending before the paired config commit; the current PR body and follow-up commit da86bfc state that one lease now spans the tentative write, commit, and conditional rollback.
Local inspection infrastructure failure: The read-only command sandbox failed at startup with “bwrap: loopback: Failed RTM_NEWADDR: Operation not permitted”, so this review could not independently inspect current source, git history, scoped instructions, or maintainer notes from the checkout.
Findings None None.
Security None None.

How this fits together

Plugin commands persist an SQLite plugin index that later registry loading and migration checks consume. This change coordinates that durable index with paired configuration writes, retaining a rollback receipt only while the failed operation still owns its tentative revision.

flowchart LR
  A[Plugin or config command] --> B[Lifecycle lease]
  B --> C[Tentative plugin index write]
  C --> D[Paired config commit]
  D --> E{Commit succeeds?}
  E -->|Yes| F[Keep new index]
  E -->|No| G[Conditional index restore]
  G --> H[Registry reads current index]
Loading

Decision needed

Question Recommendation
Does a plugin-persistence owner approve the exact head after verifying that every index/config commit path uses the lease-held, revision-conditional rollback protocol? Complete persistence-owner review: Verify the exact head’s store, caller, and cross-process regression coverage, then accept the shared lease-and-receipt protocol if no bypass remains.

Why: This is a maintainer-member PR that changes durable rollback and concurrency behavior, and the review environment could not independently inspect all callers or history.

Before merge

  • Resolve merge risk (P1) - Direct source and caller review could not be completed because the read-only sandbox failed before command execution; a persistence owner should verify that no remaining write path bypasses the lease-and-receipt protocol.
  • Resolve merge risk (P1) - This changes rollback semantics for durable plugin index state, so exact-head CI and the cross-process failure-ordering regression remain important before merge.
  • Complete next step (P2) - This active maintainer-member PR already owns the repair; the remaining requirement is exact-head persistence-owner review rather than a separate automated fix branch.
Agent review details

Security

None.

PR surface

Source +316, Tests +756. Total +1072 across 17 files.

View PR surface stats
Area Files Added Removed Net
Source 8 449 133 +316
Tests 9 865 109 +756
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 17 1314 242 +1072

Review metrics

Metric Value Why it matters
Production versus test delta production +227 net; tests +845 net The PR body attributes the substantial shared persistence-boundary growth to revision assignment, receipt capture, conditional restore, and lifecycle ordering; owner review should confirm that scope.

Stored data model

Persistent data-model change detected: serialized state: src/plugins/installed-plugin-index-store.test.ts, serialized state: src/plugins/installed-plugin-index-store.ts. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Verify all durable-state callers before merge (recommended)
    Complete exact-head owner review and retain the cross-process rollback regression before merging changes to persisted plugin-index rollback behavior.
  2. Pause if a bypass remains
    Pause this PR if any config or plugin command can still restore or write the index outside the shared lifecycle lease and conditional receipt protocol.

Technical review

Best possible solution:

Retain one store-owned receipt protocol for every tentative plugin-index write, and merge only after a persistence owner confirms all relevant callers hold the lifecycle lease through the paired configuration outcome.

Do we have a high-confidence way to reproduce the issue?

No high-confidence independent reproduction was established: the PR describes a focused cross-process SQLite regression, but the local sandbox failed before this review could inspect or run its current-main path.

Is this the best way to solve the issue?

Unclear: centralizing tentative-write identity and conditional rollback at the persistence owner is the right shape, but this review could not independently verify the complete caller and lifecycle surface.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 1cf1af4aed3d.

Labels

Label justifications:

  • P1: Failed plugin update paths can otherwise leave durable index state inconsistent with paired configuration and affect registry behavior for existing installations.
  • merge-risk: 🚨 compatibility: The PR changes persisted plugin-index rollback semantics used by existing plugin update and configuration flows.
  • 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: This is a maintainer-member PR, so the external-contributor real-behavior-proof gate does not apply; its supplied focused regression evidence still needs owner verification.

Evidence

What I checked:

  • Current PR scope: The provided exact-head diff changes the plugin-index store, its install-record writer, lifecycle lease, and command callers to use revisioned conditional restoration. (src/plugins/installed-plugin-index-store.ts, 751ed7cf6156)
  • Prior blocking finding addressed in context: The latest review context identified lease scope ending before the paired config commit; the current PR body and follow-up commit da86bfc state that one lease now spans the tentative write, commit, and conditional rollback. (src/plugins/install-record-commit.ts, da86bfcc5cd7)
  • Local inspection infrastructure failure: The read-only command sandbox failed at startup with “bwrap: loopback: Failed RTM_NEWADDR: Operation not permitted”, so this review could not independently inspect current source, git history, scoped instructions, or maintainer notes from the checkout.
  • Related merged work: The PR body identifies the merged persistence work as related but distinct; its context records merge commit e4aab26 for fix(cli): avoid repeated migration scans during local agent turns #119051. (e4aab26d017e)

Likely related people:

  • vincentkoc: Authored this PR and the related merged plugin-index persistence work, providing the strongest available history signal for this owner boundary. (role: recent area contributor; confidence: medium; commits: da86bfcc5cd7, e4aab26d017e; files: src/plugins/installed-plugin-index-store.ts, src/plugins/install-record-commit.ts, src/plugins/plugin-lifecycle-lease.ts)

Rank-up moves

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

  • Have a plugin-persistence owner inspect the exact head’s store and every changed caller.
  • Confirm exact-head CI and the cross-process failure-ordering regression before merge.

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 (6 earlier review cycles)
  • reviewed 2026-08-04T13:03:16.585Z sha fa6243b :: found issues before merge. :: [P2] Restore the previous index policy on commit rollback
  • reviewed 2026-08-04T13:16:55.078Z sha 230ec3f :: needs changes before merge. :: [P1] Fence rollback from newer plugin-index writes
  • reviewed 2026-08-04T14:05:25.100Z sha 2fb5f53 :: found issues before merge. :: [P1] Fence the generic install-index rollback
  • reviewed 2026-08-04T14:11:08.039Z sha 2fb5f53 :: found issues before merge. :: [P1] Fence the generic install-index rollback
  • reviewed 2026-08-04T15:03:41.928Z sha 747bab6 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-04T16:06:38.967Z sha 4b21c4a :: found issues before merge. :: [P1] Hold the lifecycle lease through the paired config commit

@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 4, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added P1 High-priority user-facing bug, regression, or broken workflow. and removed P2 Normal backlog priority with limited blast radius. labels Aug 4, 2026
* origin/main:
  chore(tui): add Gateway boundary PTY coverage (#119191)
  fix(telegram): route reactions to their originating forum topics
  test(gateway): isolate scheduled service timers (#119218)
@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

Exact head: 2fb5f538503f09966f45f06ffc67e3acec1c30e5.

The prior P1 and both rank-up moves are resolved:

  • tentative predecessor plus revision are captured atomically under the plugin
    lifecycle lease;
  • rollback reacquires the lease and conditionally restores in one SQLite
    transaction only while that revision remains current;
  • same-millisecond successor and post-core SIGTERM regressions prove a newer
    mutation survives;
  • the branch contains current main and exact-head focused tests plus autoreview
    are clean.

@clawsweeper

clawsweeper Bot commented Aug 4, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Aug 4, 2026
…licy-config-20260804

* origin/main:
  fix(memory): load configured providers for CLI search (#119186)
@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. and removed 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 Aug 4, 2026
@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

Exact head: da86bfcc5cd7bc1a1d2aeeb419708c59d278a3e7.

Resolved the prior P1 and every listed rank-up move:

  • one plugin lifecycle lease now spans the tentative index write, paired config commit, and conditional rollback;
  • a coordinated two-process regression proves writer two stays outside its config commit until writer one rolls back, and both failed commits restore the original index;
  • the regression fails on pre-fix head 4b21c4aaed468b4fdcb96da5c9af0683f3fe912a and passes on this head;
  • nested callers preserve plugin-before-config lock order and the lease heartbeat covers long config writes.

Please refresh the durable exact-head review against current main.

@clawsweeper

clawsweeper Bot commented Aug 4, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot removed the status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. label Aug 4, 2026
@clawsweeper clawsweeper Bot added the status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. label Aug 4, 2026
@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

Exact head: 751ed7cf61563b231f28da8fde0add0687ae457f.

The prior P1 and both rank-up moves remain resolved: one lifecycle lease spans
the tentative index write, paired config commit, and conditional rollback, and
the coordinated two-failure regression restores the original index. The only
delta after the reviewed production fix makes the retired test-helper writer
mock file-local after hosted dead-code CI identified its unused export; 253
plugin install, update, and uninstall tests pass.

@clawsweeper

clawsweeper Bot commented Aug 4, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@vincentkoc

Copy link
Copy Markdown
Member Author

Persistence-owner review for exact head 751ed7cf61563b231f28da8fde0add0687ae457f: approved.

  • The canonical owner boundary is commitPluginInstallRecordsWithWriter in src/plugins/install-record-commit.ts:280. One plugin lifecycle lease covers record preparation, the tentative revisioned index write, managed-install marker changes, the paired config commit, and revision-conditional rollback.
  • commitPluginInstallRecordsWithConfig, commitPluginInstallRecordsOnly, and commitConfigWriteWithPendingPluginInstalls all funnel through that writer. transformConfigWithPendingPluginInstalls acquires the lifecycle lease before the config transform lock, preserving the shared lock order.
  • I audited the production paired-write callers in plugin update/install/uninstall, the management service, wizard/system-agent setup, and agent add. They all route through those canonical helpers.
  • The doctor/migration writes are repair owners rather than paired user config commits. The post-core fresh-process updater is intentionally separate because the lease cannot span a child process; it takes the lease for the tentative write and for rollback, and rollback is fenced by the exact tentative revision.
  • src/plugins/install-record-commit.sqlite.test.ts:69 coordinates two failing direct config commits, proves the second cannot enter until the first rollback completes, and verifies that the original index is restored.
  • Exact-head GitHub CI is green: 128 checks passed with no attention items. Current main moved only in unrelated UI files after the review baseline, with no overlap in the audited persistence surface.

Verdict: the shared lease plus revision-receipt protocol is the correct persistence-owner fix, and no paired index/config commit bypass remains.

@vincentkoc
vincentkoc merged commit ef11eae into main Aug 4, 2026
128 checks passed
@vincentkoc
vincentkoc deleted the fix/plugin-install-policy-config-20260804 branch August 4, 2026 17:04
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Aug 4, 2026
* origin/main: (40 commits)
  fix(telegram): correlate deliveries to explicit topics
  fix(plugins): preserve install index state across failures (#119228)
  test: trim redundant control ui coverage (#119286)
  test: cover missing config method in memory settings
  fix: gate curated config controls by method
  test: cover read-only admin method gates
  fix: keep config drafts on their gateway
  fix: reset agent skill filters with config patch
  refactor: reuse chat error state helper
  test: avoid unbound identity request assertion
  refactor: isolate clawhub skill search
  fix: guard delayed config actions across reconnects
  fix: preserve workshop revisions across session navigation
  refactor: isolate workshop revision handoff
  test: advertise skill action methods in ui e2e
  fix: fail stale workshop revision sends
  fix: bind revision handoffs to gateway snapshots
  fix: recheck queued agent and skill access
  fix: recheck config access after parsing
  test: advertise config writes in ui e2e
  ...
vincentkoc added a commit that referenced this pull request Aug 4, 2026
Punchcard-Session: crisp-lantern-orchard-nv

* origin/main: (46 commits)
  perf(agents): reuse provider policy manifest registry (#119305)
  fix(media): roll back partial generated batches (#119292)
  fix(gateway): steer matching embedded turns (#119287)
  fix(telegram): correlate deliveries to explicit topics
  fix(plugins): preserve install index state across failures (#119228)
  test: trim redundant control ui coverage (#119286)
  test: cover missing config method in memory settings
  fix: gate curated config controls by method
  test: cover read-only admin method gates
  fix: keep config drafts on their gateway
  fix: reset agent skill filters with config patch
  refactor: reuse chat error state helper
  test: avoid unbound identity request assertion
  refactor: isolate clawhub skill search
  fix: guard delayed config actions across reconnects
  fix: preserve workshop revisions across session navigation
  refactor: isolate workshop revision handoff
  test: advertise skill action methods in ui e2e
  fix: fail stale workshop revision sends
  fix: bind revision handoffs to gateway snapshots
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 5, 2026
…119228)

* fix(plugins): preserve install index policy config

* fix(plugins): restore complete install index state

* fix(plugins): fence install index rollback

* fix(plugins): fence generic install index rollback

* fix(plugins): keep lifecycle lease context private

* test(cli): align plugin index rollback mocks

* test(plugins): enforce index rollback receipts

* fix(plugins): serialize install rollback with config commit

* test(plugins): keep legacy index writer mock private
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 6, 2026
* origin/main: (40 commits)
  fix(telegram): correlate deliveries to explicit topics
  fix(plugins): preserve install index state across failures (openclaw#119228)
  test: trim redundant control ui coverage (openclaw#119286)
  test: cover missing config method in memory settings
  fix: gate curated config controls by method
  test: cover read-only admin method gates
  fix: keep config drafts on their gateway
  fix: reset agent skill filters with config patch
  refactor: reuse chat error state helper
  test: avoid unbound identity request assertion
  refactor: isolate clawhub skill search
  fix: guard delayed config actions across reconnects
  fix: preserve workshop revisions across session navigation
  refactor: isolate workshop revision handoff
  test: advertise skill action methods in ui e2e
  fix: fail stale workshop revision sends
  fix: bind revision handoffs to gateway snapshots
  fix: recheck queued agent and skill access
  fix: recheck config access after parsing
  test: advertise config writes in ui e2e
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli CLI command changes commands Command implementations maintainer Maintainer-authored PR merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P1 High-priority user-facing bug, regression, or broken workflow. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. 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