Repository navigation
fix(plugins): preserve manifest permissions when building plugins - #147393
Conversation
Punchcard-Session: ember-river-timber-wj
Punchcard-Session: ember-river-timber-wj
|
🦞👀 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 13, 2026, 5:04 PM ET / 21:04 UTC (Revision 2). ClawSweeper reviewWhat this changesPlugin builds now use the shared atomic file writer to preserve existing manifest and directory permissions, honor umask for new manifests, and retain publication-failure coverage. Merge readiness⛔ Blocked before merge - 1 item remains This remains a useful fix: current main and the latest release still replace manifest permissions. No actionable patch defects were found, and the updated compatibility explanation resolves the previous migration blocker. Priority: P2 Review scores
Verification
How this fits togetherThe plugin authoring CLI derives metadata from a plugin entry and publishes package metadata and its manifest. The manifest then describes the plugin to OpenClaw’s discovery and loading system. flowchart TD
A[Plugin source and package metadata] --> B[Plugin build command]
B --> C{Check only?}
C -->|Yes| D[Report metadata freshness]
C -->|No| E[Publish package metadata]
E --> F[Atomic manifest writer]
F --> G[Manifest with preserved permissions]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +7, Tests +281. Total +288 across 3 files. View PR surface stats
Review metricsNone. Stored data modelPersistent data-model change detected: Technical reviewBest possible solution: Keep manifest publication with the existing atomic replacement owner while preserving file modes, directory modes, serialized content, and visible failure outcomes. Do we have a high-confidence way to reproduce the issue? Yes, from source: rebuilding a mode-0640 manifest under umask 0022 on current main replaces it with a newly created mode-0644 file. The PR reports a failing-before/passing-after Linux check; this review did not execute code. Is this the best way to solve the issue? Yes. Reusing the package writer’s atomic replacement owner is a focused repair, and unchanged serialization plus existing/new-file coverage resolves the previous migration concern. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against edde862d16b2. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
Merged via squash.
|
…1-prep * commit '912ae8d96e5964dfdcdf419b79613fb941cdf0a8': (350 commits) fix: keep workspace preparation responsive during cleanup (openclaw#147358) docs: alphabetize donors and sponsors and add Red Hat logo (openclaw#147302) fix(plugins): retain update authority through doctor effects (openclaw#144316) refactor(qa): share Multipass mount retry lifecycle (openclaw#147084) fix(memory): emit one JSON result for command failures (openclaw#147366) improve(plugins): speed up cold metadata loading (openclaw#147411) fix(sessions): avoid duplicate work after waited child replies (openclaw#147394) fix(agents): retain outstanding child results in parent context (openclaw#112623) test: preserve native workflow loader selection (openclaw#147403) fix: reduce repeated work while polling session pull requests (openclaw#147373) test(qa): preserve task cancellation across process replacement (openclaw#147382) fix: prevent sidebar refresh storms during session activity (openclaw#147400) refactor: simplify skills CLI formatting (openclaw#147368) fix: prevent Git checkout certificate failures behind egress proxy (openclaw#147410) fix(qa): stop live threads after their process leader exits (openclaw#147386) refactor(release): share agent turn retry lifecycle (openclaw#147076) fix(ui): keep uploaded images aligned with their prompts (openclaw#147389) fix(fs): guard skill reads and bound worker bundle staging (openclaw#147336) fix(ci): restore Linux service ownership fixtures (openclaw#147398) fix(plugins): preserve manifest permissions when building plugins (openclaw#147393) ...
…enclaw#147393) * test(plugins): cover manifest permission preservation Punchcard-Session: ember-river-timber-wj * fix(plugins): preserve manifest permissions when building plugins Punchcard-Session: ember-river-timber-wj
What Problem This Solves
Building a plugin could replace
openclaw.plugin.jsonwith different permissions, including making a previously restricted manifest more permissive.User Impact
Plugin builds preserve existing manifest and package-directory permissions. New manifests honor the process umask, builds through a symlink project root work, and publication or cleanup failures remain visible. No configuration changes or migration are required.
Why This Change Was Made
Use the existing atomic replacement owner already used for
package.json, with explicit file and directory mode preservation. The regression tests cover rewrites, new files, isolated umasks, invalid and symlink roots, and injected write, rename, and cleanup failures. Authoring failure coverage verifies that the earlierpackage.jsonwrite succeeded without claiming whole-project rollback.Evidence
42c71800e713343396a8cd9f9cd4e2ad100d5486.@openclaw/fs-safe0.10.0: the original writer produced three expected failures among 52 tests; all ten controls passed. The repaired signed head passed both focused files, 52/52 tests, including all three repaired cases and ten controls.pnpm buildpassed in 3m 49.9s.Native macOS and Windows execution were not performed. The initial fresh-lease attempt stopped in proof-directory setup before any test child; the corrected setup completed on the same unchanged source.
Data-model compatibility
Response to the exact-head ClawSweeper compatibility item: migration is not applicable. At head
42c71800e713343396a8cd9f9cd4e2ad100d5486, the manifest fields, schema, filename, reader contracts, and serialization remain unchanged: the same input still produces${JSON.stringify(manifest, null, 2)}\n. Only filesystem publication and permission handling change.The accepted Linux 52/52 run includes exact serialized-byte assertions for an existing manifest rewritten with both unchanged and changed values (
src/cli/plugins-control-ui-build.test.ts:53-78), exact new-file bytes under isolated umasks (:82-105), and preservation of the previous manifest after a later publication failure (src/cli/plugins-authoring-command.test.ts:794-865). No migration or source change is needed for this review item.Punchcard-Session: ember-river-timber-wj