Repository navigation
fix(update): stop warning about a package manager database that is not installed - #173118
wangmiao0668000666 wants to merge 1 commit into
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: needs maintainer review before merge. What this changesThis PR names a missing package-manager executable instead of advising operators to restore its database. Example: Run openclaw update --dry-run on Linux without pacman.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this PR corrects a real updater diagnostic without changing ownership protection or continuation behavior, and the revised CLI evidence resolves the earlier proof concern. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherCLI and Gateway update paths use the shared system-package ownership inspector to check installation paths; it returns normally with warnings for unavailable inspection and refuses replacement for confirmed ownership. flowchart TD
A[Update request] --> B[Ownership inspector]
B --> C[Native package query]
C --> D[Missing executable]
D --> E[Corrected warning and continuation]
C --> F[Confirmed package ownership]
F --> G[Replacement refused]
Technical reviewBest possible solution: Land the focused diagnostic correction in the existing inspector while retaining warning-and-continue and confirmed-owner refusal. Do we have a high-confidence way to reproduce the issue? Current-main source deterministically produces the reported warning for Linux launch ENOENT, matching the reporter's Debian update transcript; this review executed no target code. Is this the best way to solve the issue? Correcting the existing diagnostic is proportionate and preserves the documented ownership policy without distribution detection, new options, or competing inspection paths. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 9e3514ae247c. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +7, Tests +24. Total +31 across 2 files. Added test files: 0. View PR surface stats
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (1 earlier review cycle)
Reviewed October 15, 2026, 9:16 AM ET / 13:16 UTC (Revision 2). |
…atabase to restore
b8a8291 to
a51912d
Compare
|
@clawsweeper re-review Revision a51912d adopts the recommended diagnostic policy (warn-and-continue preserved, missing executable named) and adds shipped-CLI dry-run proof for both revisions; the PR body is updated. |
|
🦞👀 Re-review progress:
|
…abase-restore advice (#173293) A Debian npm update told the operator to restore the pacman database: when a system package manager's executable is absent (ENOENT), the ownership inspector reused its database-restoration advice. It now says the executable was not found and that ownership could not be verified; confirmed-owner refusal and continuation are unchanged. Supersedes #173118, #173122, #173144, thanks @wangmiao0668000666, @sunlit-deng, @DonnieFi. Fixes #173084 Co-authored-by: wangmiao0668000666 <[email protected]> Co-authored-by: sunlit-deng <[email protected]> Co-authored-by: Donnie Fiander <[email protected]>
…abase-restore advice (openclaw#173293) A Debian npm update told the operator to restore the pacman database: when a system package manager's executable is absent (ENOENT), the ownership inspector reused its database-restoration advice. It now says the executable was not found and that ownership could not be verified; confirmed-owner refusal and continuation are unchanged. Supersedes openclaw#173118, openclaw#173122, openclaw#173144, thanks @wangmiao0668000666, @sunlit-deng, @DonnieFi. Fixes openclaw#173084 Co-authored-by: wangmiao0668000666 <[email protected]> Co-authored-by: sunlit-deng <[email protected]> Co-authored-by: Donnie Fiander <[email protected]>
…abase-restore advice (#173293) A Debian npm update told the operator to restore the pacman database: when a system package manager's executable is absent (ENOENT), the ownership inspector reused its database-restoration advice. It now says the executable was not found and that ownership could not be verified; confirmed-owner refusal and continuation are unchanged. Supersedes #173118, #173122, #173144, thanks @wangmiao0668000666, @sunlit-deng, @DonnieFi. Fixes #173084 Co-authored-by: wangmiao0668000666 <[email protected]> Co-authored-by: sunlit-deng <[email protected]> Co-authored-by: Donnie Fiander <[email protected]> (cherry picked from commit 92280e2) Co-authored-by: RomneyDa <[email protected]>
…abase-restore advice (#173293) A Debian npm update told the operator to restore the pacman database: when a system package manager's executable is absent (ENOENT), the ownership inspector reused its database-restoration advice. It now says the executable was not found and that ownership could not be verified; confirmed-owner refusal and continuation are unchanged. Supersedes #173118, #173122, #173144, thanks @wangmiao0668000666, @sunlit-deng, @DonnieFi. Fixes #173084 Co-authored-by: wangmiao0668000666 <[email protected]> Co-authored-by: sunlit-deng <[email protected]> Co-authored-by: Donnie Fiander <[email protected]> (cherry picked from commit 92280e2)
Fixes #173084
What Problem This Solves
An update that cannot find the platform's package-manager executable tells the operator to restore that manager's database. On a Debian npm-global install (no
pacman), the run prints:User Impact
Operators on distributions without the platform's package manager no longer receive Arch-specific database recovery instructions for a manager that is not installed. The inspection still warns and continues, and the warning now names the absent executable; confirmed package ownership still refuses replacement.
Why This Change Was Made
readPackageFilesreports every non-authoritative query outcome as an unavailable ownership database, so a launchENOENTproduced database-recovery guidance. The unavailable diagnostic is now split: a missing executable reports that the executable was not found and asks for manual ownership verification, while timeouts, non-zero exits, malformed inventories, and permission failures keep the existing database-restoration wording. Warn-and-continue and the pre-mutation refusal for confirmed ownership are unchanged; classification: behavior-preserving for every path except the misleading sentence.This revision adopts the reviewer's recommendation and the recorded warn-and-continue policy from #169055: a launch
ENOENTdoes not establish that no package database or owned files exist, so the inspection is not silenced — only its recovery guidance is corrected.Impact surface:
src/infra/update-system-package-ownership.ts:64ENOENTnames the missing executablesrc/infra/update-freebsd-pkg-ownership.test.ts:158Evidence
Shipped CLI, base
45f894640→ candidatea51912da7, same command on this host (command -v pacman→ empty), isolated state directory, builtdistfrom each revision:Both runs printed the diagnostic for each inspection call site, produced the same dry-run plan (
Update dry-run / No changes were applied / Install kind: git / …), and exited 0 without applying anything.Regression, existing suite, red before / green after (the added case asserts the warning still fires, names the missing executable, and carries no database-restoration instruction):
Controls: the retained cases for timeout, denied and malformed manifests, budget exhaustion, alias and root-symlink ownership, and the positive
pacman-owned-installrefusal all still pass.tsc -p tsconfig.json --noEmitexits 0;oxlintreports 0 warnings and 0 errors on both files.Not tested: an actual npm-global install upgrade (no install was performed); the shipped CLI was run in dry-run, which is the path that emits the warning. Only the unavailable-ownership message changes.
Merge Danger
Two-way door: reverting restores the previous diagnostic sentence and requires no migration. Warn-and-continue, the inspection budget, and the confirmed-ownership refusal are untouched.