Repository navigation
fix: preserve plugin paths that share a home prefix - #148142
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: blocked before merge. Reviewed September 14, 2026, 7:33 AM ET / 11:33 UTC (Revision 2). ClawSweeper reviewWhat this changesPlugin CLI output now preserves sibling directories that share the home-directory prefix while continuing to shorten actual home paths. Merge readiness⛔ Blocked before merge - 1 item remains This remains a useful fix absent from current main and the latest release. No actionable defects were found, and the added native output satisfies the previous proof request. Priority: P2 Review scores
Verification
How this fits togetherPlugin inspection and diagnostic commands turn registry records into operator-facing text and JSON. The changed formatting determines how plugin source locations appear in that output. flowchart TD
A[Plugin registry records] --> B[Plugin CLI commands]
C[Effective home directory] --> D[Path-aware formatter]
B --> D
D --> E[Human-readable source locations]
D --> F[Doctor JSON source fields]
B --> G[Unchanged raw inventory JSON]
Before merge
Agent review detailsSecurityNone. PR surfaceSource 0, Tests +120. Total +120 across 8 files. View PR surface stats
Review metricsNone. Stored data modelPersistent data-model change detected: Technical reviewBest possible solution: Use the existing path-aware formatter consistently for complete plugin source paths while preserving diagnostic prose and raw machine-readable contracts. Do we have a high-confidence way to reproduce the issue? Yes: current source replaces the home substring inside sibling plugin paths before display, and the supplied native baseline shows that failure. This review did not execute the CLI. Is this the best way to solve the issue? Yes: switching complete-path callers to the existing boundary-aware helper is a narrow repair that avoids changing the shared diagnostic-text contract. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against b22785d9ac32. 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)
|
Use the existing path-aware home formatter for complete plugin source paths across list, inspect, registry, and Doctor output. Keep diagnostic text formatting and existing raw JSON contracts unchanged. Production LOC is net zero; native CLI, focused regressions, changed checks, build, and independent review passed on the frozen candidate.
0fb44da to
e122fa0
Compare
|
Merged via squash.
|
Use the existing path-aware home formatter for complete plugin source paths across list, inspect, registry, and Doctor output. Keep diagnostic text formatting and existing raw JSON contracts unchanged. Production LOC is net zero; native CLI, focused regressions, changed checks, build, and independent review passed on the frozen candidate.
Related: #98872
What Problem This Solves
Fixes plugin commands displaying
/home/alice-other/plugin.tsas~-other/plugin.tswhen the home directory is/home/alice.User Impact
Plugin list, inspect/info, registry differences, and Doctor source fields preserve the real location of sibling directories. Actual home paths still shorten normally. Existing raw list/inspect/registry JSON and diagnostic-message handling stay unchanged; no migration or user action is required.
Why This Change Was Made
Complete source paths now use the existing path-aware home formatter instead of substring replacement intended for diagnostic text. The repair covers the shared table formatter and the command projections; production is +13/−13, net zero.
Evidence
The 60 test passes precede an approved test-only
?? "null"typing correction; corrected formatting/type checks passed. The original failed changed gate remains failed. Native baseline proof is composite, preserving the original failed oracle attempt. These results cover selected source/error projections, not full-output byte equality.Proof is pinned to
c6c9d416plus this patch. Current-main plugin-display and home-formatting preimages are unchanged. Windows was not executed; registry drift and source-shadowing branches are covered by registered-command tests rather than the native matrix.Inspected native output
These are source-field excerpts from the retained real built CLI runs on macOS with Node 24.21.0, using isolated state and synthetic plugins. The baseline is
c6c9d416; the candidate is that revision plus this patch. Only the generated temporary fixture-root prefix is normalized to/tmp/plugin-home-proof, and the checkout prefix in the command is shortened tonode openclaw.mjs. The fixture home is/tmp/plugin-home-proof/h; its sibling is/tmp/plugin-home-proof/h-other. Before/after labels are added for comparison; unrelated output is omitted.With
HOMEset to the fixture home andOPENCLAW_HOMEunset (each command exited 0 in both phases):With explicit
OPENCLAW_HOMEset to the same fixture home (each command exited 0 in both phases):node openclaw.mjs --no-color plugins doctor --jsonalso preserved the actual-home source~/b/a.mjswhile changing the synthetic sibling error'ssourcefrom~-other/b/a.mjsto/tmp/plugin-home-proof/h-other/b/a.mjs. Both phases exited 1 with the sameError: synthetic source-path probe failure, as expected for the deliberately broken fixture.Capture provenance: the default baseline comes from
plugin-source-home-prefix-native-baseline-c6c9-v1/inner/default-home-inspect-{sibling,home}.stdout.rawanddefault-home-doctor-json.stdout.raw, retained and qualified offline by the corrected oracle. The explicit baseline comes fromplugin-source-home-prefix-native-continuation-c6c9-v2/inner/explicit-home-inspect-{sibling,home}.stdout.raw. Candidate captures have those same filenames underplugin-source-home-prefix-native-candidate-c6c9-v3/inner/. Each displayed field was checked against the complete raw stream and its process receipt. These excerpts make selected observed results inspectable here; they do not claim byte equality for whole outputs or a new execution on the refreshed head.Compatibility and current head
This is an output-projection repair. The Doctor/registry formatting changes apply the existing path-aware formatter to report source strings; they do not change database schemas, schema versions, persistence writes, stored data, or migration behavior. The existing diagnostic prose formatter remains in place, and raw list/inspect/registry JSON contracts are unchanged. No data migration is introduced or required by this patch.
The refreshed head
e122fa085f77is onabbdd5287afc. Its full-index patch and all eight resulting file blobs match the reviewed candidate; all 66 mapped proof inputs were unchanged across the final b254→abb refresh, which includes #148129. This source comparison preserves the original c6c9 test/build/native/P2 attribution. Required exact-head CI run 34836703467 is green after one targeted retry of the failed config write-lock shard. The original failure is retained: config/state/lock inputs were unchanged by this display patch, and one local diagnostic run passed all 15 tests. The underlying original exception remains unproven.The review’s generic data-model marker does not apply to this patch: the complete-path formatting calls change no persistence writer, stored representation, schema, authorization, or install behavior. No migration is needed; the review’s own source analysis confirms those boundaries.