Skip to content

fix(plugins): keep captured dependency manifests independently readable - #160519

Merged
vincentkoc merged 3 commits into
mainfrom
fix/plugins-copy-captured-package-manifests-20260927
Sep 28, 2026
Merged

vincentkoc merged 3 commits into
mainfrom
fix/plugins-copy-captured-package-manifests-20260927

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Sep 28, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

Capturing a native dependency tree hardlinks ordinary package.json files into the retained namespace. The increased link count then makes strict peer audit/relink reject those manifests.

User Impact

New native dependency captures remain independently readable during peer repair and host succession. Native payloads retain hardlink sharing; strict readers and ownership checks are unchanged.

Why This Change Was Made

The existing capture classifier now copies every ordinary package manifest. Persisted-capture, reload, and host-succession tests cover the resulting independent files. The complete change is three files: production +2/-0, tests +66/-1.

This prevents new bad captures. Pre-fix unreleased preview receipts retain their previous classification on reuse and host succession; this PR does not migrate them. Named follow-up: reclassify/rebuild pre-existing native namespace receipts before peer repair. Stable 2026.9.4 predates native namespace receipts, so its upgrade proof cannot cover that preview-only repair. No schema or persisted record shape changes.

Evidence

Exact candidate: dff8edaf444e5cace7ddd6ce8e6469a45709144e.

  • Focused remote proof: 26 tests across the two affected files passed with the candidate's own frozen dependencies. Reported file/project durations were 2.70s (16 tests) and 44.22s (10 tests); the complete test wrapper took 49.31s. These reported durations are not separately isolated wall or per-file CI costs; no timing-only rerun was added. Final candidate head/tree and clean tracked source verified; native lease stopped normally.
  • Required CI: openclaw/ci-gate passed on the exact head. Actual test merge 80ba5571a4bb2b0205383eff4b160ff0456cf035 contains the candidate and canonical main fixes.
  • Published 9.4 upgrade acceptance: exact candidate packaged and installed through the real updater as 2026.9.6. Original updater exited successfully without recovery. Automatic migration, standalone Doctor, post-Doctor config, state survival, dependency cleanup, Gateway startup/probes/status all passed. One 839s lane, cleanup joined; manual Gateway startup 88s, health/ready probes 1s each, status 2s.
  • Package source dff8edaf444e5cace7ddd6ce8e6469a45709144e; trusted tooling ce27cdb74759e4cf7c17cf828d49ac6c62f2f832; tarball SHA-256 be3b2f1368238401506790bd38cd4b4610aa7f8df7bc7013d9272e3808ae0b41.
  • Independent source review and exact-head review found no actionable defect. The review's support-boundary, acceptance, and timing requests are addressed above.

The separate first-hop post-core child exit snapshot was unavailable; the successful overall updater outcome remains proven. An earlier predecessor packaging run hit process-group cleanup failure after UI build; a scoped strict-closure diagnostic and subsequent packaging succeeded, but the original transient cause remains unresolved. This current candidate's packaging and acceptance passed without a retry.

@vincentkoc vincentkoc self-assigned this Sep 28, 2026
@clawsweeper

clawsweeper Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review in progress

ClawSweeper is reviewing this revision. This supersedes any previous blocked status.

View the workflow run.

@vincentkoc
vincentkoc marked this pull request as ready for review September 28, 2026 15:29
@clawsweeper

clawsweeper Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 28, 2026, 1:30 PM ET / 17:30 UTC (Revision 7).

ClawSweeper review

What this changes

The branch copies dependency package manifests into retained plugin runtimes while keeping native payloads linked, and adds capture and updater regression coverage.

Merge readiness

⛔ Blocked before merge - 4 items remain

Current main still has the reported manifest hardlink behavior, so this focused PR remains useful. The remaining merge question is whether installations with earlier persisted native receipts must recover before the fresh-capture fix ships.

Priority: P2
Reviewed head: dff8edaf444e5cace7ddd6ce8e6469a45709144e
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The small owner-level patch has focused coverage, while the earlier-receipt boundary and integrated-head upgrade evidence limit merge confidence.
Proof confidence 🦐 gold shrimp (3/6) Not applicable: The member-authored contributor-proof gate is exempt. Prior-head filesystem tests cover new capture, and a published 9.4 updater installed that candidate; neither establishes current integrated-head acceptance or compatibility with a pre-fix persisted native receipt, so stored-state compatibility remains insufficient.
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 contributor-proof gate is exempt. Prior-head filesystem tests cover new capture, and a published 9.4 updater installed that candidate; neither establishes current integrated-head acceptance or compatibility with a pre-fix persisted native receipt, so stored-state compatibility remains insufficient.
Evidence reviewed 10 items Introduced capture rule: The PR adds package.json to the files that require independent copies.
Current main still needs the fix: The fetched main classifier lacks the package.json clause.
Capture consumers: Both native namespace capture and retained update-tree construction consume this classifier to choose copying over linking.
Findings None None.
Security None None.

How this fits together

OpenClaw captures installed plugin files into retained runtimes so plugins can survive updates and host changes. Capture chooses which files share an inode; plugin loading and peer-link repair later read those files.

flowchart LR
A[Installed plugin] --> B[Dependency inventory]
B --> C{File classification}
C -->|Package manifest| D[Independent copy]
C -->|Native payload| E[Retained link]
D --> F[Retained runtime]
E --> F
F --> G[Plugin loading and peer repair]
Loading

Decision needed

Question Recommendation
Must installations with native namespace receipts persisted before this classifier change recover before this PR ships? Repair earlier receipts: Reclassify or rebuild eligible old captures without weakening admission, then prove successor capture and strict peer repair before merge.

Why: Source proves that those receipts retain the old classification, while the latest identified stable release predates native namespaces; deciding whether preview-state recovery is required is a maintainer support boundary.

Before merge

  • Resolve merge risk (P1) - An installation with a pre-fix persisted native receipt can reuse its old classification, retain a hardlinked dependency manifest, and fail strict peer repair. The supported-state boundary has not been explicitly accepted.
  • Resolve merge risk (P1) - Published-driver upgrade acceptance for the integrated head is pending; the successful 9.4/base run installed the preceding candidate.
  • Complete next step (P2) - Decide the earlier-receipt support boundary, record integrated-head published-driver acceptance, and provide separate costs for both changed test files.
  • Resolve maintainer decision - Resolve the maintainer decision shown above before merge.
Agent review details

Security

None.

PR surface

Source +2, Tests +65. Total +67 across 3 files.

View PR surface stats
Area Files Added Removed Net
Source 1 2 0 +2
Tests 2 66 1 +65
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 3 68 1 +67

Review metrics

Metric Value Why it matters
Changed-test cost 2 files; 49.09 s combined wrapper time Separate file costs and CI seconds are needed to assess the repository's per-file test budget.

Merge-risk options

Maintainer options:

  1. Recover old captures (recommended)
    Add a bounded old-receipt recovery path and prove the upgraded manifest reaches peer repair.
  2. Own fresh-only support
    A maintainer can accept the remaining preview-state limitation after defining which earlier receipts are supported.

Technical review

Best possible solution:

Keep the shared capture classifier, establish the supported receipt boundary, repair earlier receipts if they are supported, and verify the integrated candidate through the published updater.

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

Yes, from source: capture a managed native plugin dependency, then have peer repair read its installed manifest while a retained capture exists. This read-only review did not execute that path.

Is this the best way to solve the issue?

Yes for new captures: the shared classifier gives manifests independent inodes without weakening strict readers or copying native payloads. Existing receipt handling still needs a support decision.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 7e6dd89766ce.

Labels

Label changes:

No label changes.

Label justifications:

  • P2: This is a bounded plugin capture bug with limited blast radius and a defined upgrade question.
  • merge-risk: 🚨 compatibility: New captures and earlier persisted receipts can retain different manifest inode behavior after upgrade.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp 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 contributor-proof gate is exempt. Prior-head filesystem tests cover new capture, and a published 9.4 updater installed that candidate; neither establishes current integrated-head acceptance or compatibility with a pre-fix persisted native receipt, so stored-state compatibility remains insufficient.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 9faa93d adds src/plugins/plugin-safety-inspected-files.ts:126 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 9faa93d44c85; files: src/plugins/plugin-safety-inspected-files.ts)
  • Ayaan Zaidi: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Vincent Koc: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rank-up moves

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

  • Replay a pre-fix persisted receipt through successor capture and strict peer repair, or record an explicit supported-state boundary.
  • Record published-driver acceptance for the integrated candidate.
  • Report measured wall and CI costs separately for both changed test files.

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-09-28T15:28:30.665Z sha 2f7040a :: blocked before merge. :: none
  • reviewed 2026-09-28T15:36:43.197Z sha 2f7040a :: blocked before merge. :: none
  • reviewed 2026-09-28T15:59:33.036Z sha 2f7040a :: blocked before merge. :: none
  • reviewed 2026-09-28T16:20:17.469Z sha 2f7040a :: blocked before merge. :: none
  • reviewed 2026-09-28T16:30:25.607Z sha 2f7040a :: blocked before merge. :: none
  • reviewed 2026-09-28T16:48:23.640Z sha 2f7040a :: blocked before merge. :: none

@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 28, 2026
@vincentkoc vincentkoc closed this Sep 28, 2026
@vincentkoc vincentkoc reopened this Sep 28, 2026
@vincentkoc vincentkoc closed this Sep 28, 2026
@vincentkoc vincentkoc reopened this Sep 28, 2026
@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@vincentkoc
vincentkoc merged commit 5117d94 into main Sep 28, 2026
250 checks passed
@vincentkoc
vincentkoc deleted the fix/plugins-copy-captured-package-manifests-20260927 branch September 28, 2026 18:19
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: S 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