Repository navigation
fix(update): retain local package errors and preserve public report privacy - #194160
Conversation
Retain sanitized exception facts through package-update reports and status. Require a reported path inside the install root before offering permission repair advice. Co-authored-by: Peter Steinberger <[email protected]> Co-authored-by: steipete <[email protected]>
|
🦞👀 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. What this changesThis PR preserves package-update exceptions and limits directory permission advice to failures with a known path inside the install root. Example: Candidate validation throws EACCES without a path while updating an npm installation under /opt/homebrew/lib/node_modules.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Blocked before merge - 3 items remain Keep this PR open: it addresses a source-confirmed diagnostic defect, but its public-report change exposes arbitrary exception text and needs correction before merge. Priority: P2 Before merge
Findings
Provenance
Tests
Agent review detailsHow this fits togetherThe package updater classifies staging and validation failures, records diagnostic facts for update status, and projects selected facts into a user-reviewed GitHub report. flowchart LR
A[Package staging and validation] --> B[Exception classification]
B --> C[Bounded failure facts]
C --> D[Update status and ledger]
D --> E[Public report projection]
E --> F[Report preview and submission]
Technical reviewBest possible solution: Retain bounded original exceptions locally while publishing only explicitly safe diagnostic fields and recognized causes through the existing public projection. Do we have a high-confidence way to reproduce the issue? Current-main source establishes loss and misattribution of pathless permission exceptions; the reported macOS failure itself was not reproduced, and no target code ran during this review. Is this the best way to solve the issue? Capturing exceptions before classification and removing fallback directory attribution are focused repairs, but local sanitization cannot replace the existing public diagnostic allowlist. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against ed3c5dadbdbb. Provenance checked
TestingProof path: in-process harness. SecurityNeeds attention: Public package-error reports can disclose private exception prose despite pattern-based sanitization. EvidenceSecurity concerns:
What I checked:
Likely related people:
PR surfaceSource +56, Tests +141, Other +2. Total +199 across 5 files. Added test files: 0. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. Review metrics
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 Reviewed November 6, 2026, 9:17 AM ET / 14:17 UTC. |
Restore the existing public diagnostic projection for every exception fact. Keep bounded original evidence local and point operators to local status for omitted details. Co-authored-by: Peter Steinberger <[email protected]> Co-authored-by: steipete <[email protected]>
…rivacy (openclaw#194160) Package-update failures now keep a bounded, sanitized record of the original exception (name, code, errno, syscall, path, truncated message, first OpenClaw frame, two nested causes) in local update status and diagnostics. Public generated reports keep the existing public diagnostic projection, so arbitrary exception prose stays local. Install-root ownership/chmod advice is given only when the failing path is known and lies under the install root. Refs openclaw#194143 openclaw#194016 openclaw#194035 openclaw#194104 Co-authored-by: Peter Steinberger <[email protected]> Co-authored-by: steipete <[email protected]>
What Problem This Solves
Package-update failures can discard the original exception and recommend changing install-root permissions without identifying the denied path.
User Impact
openclaw update status --jsonand retained local diagnostics keep bounded exception evidence: name, code, errno, syscall, path/dest, truncated message, first OpenClaw source frame, and two nested causes. Existing local redaction and bounds remain in force.Public GitHub reports retain only recognized codes/causes, admitted source locations, and privacy-safe guidance through the existing public projection. Arbitrary customer names, business context, and other exception prose stay local. A static notice points to local status when message details are omitted.
Unknown/outside-path EACCES/EPERM no longer produces install-root chmod/ownership advice; known install-root permission failures retain their advice.
Why This Change Was Made
The package/staging catches pass their original exception to
src/infra/package-update-manager-preflight.ts:311. Previously classification replaced stderr and substituted the global root when no denied path was available. Capture bounded facts before classification usingsrc/infra/update-failure-facts.ts:206, preserve original stderr, and require a reported path inside the install root for permission repair advice.All exception facts use
redactPublicSupportDiagnosticLineinsrc/infra/update-failure-report-prepare.ts:322. This preserves the public diagnostic admission intent of f642756: pattern-based local sanitization does not authorize publishing arbitrary prose. There is no errorName/check exception to the public projection.The installed updater must contain this repair to retain future evidence. This does not identify or fix the reporter's underlying macOS EACCES, and cannot recover exceptions discarded by older updaters. No schema/protocol bump or CHANGELOG changes.
Refs #194143 #194016 #194035 #194104
Evidence
1892a862. Ten package-boundary cases failed there because public reports contained local exception text, including synthetic customer/business prose without tokens or home paths in both direct facts and recorded-step reconstruction. The generic report test also failed its missing-local-guidance assertion.timeout 120s node scripts/run-vitest.mjs src/infra/package-update-permissions.test.ts src/infra/update-failure-report-prepare.test.ts --maxWorkers=1: 89 passed (13 package-boundary + 76 public-report tests), 44.88 seconds wall time including cold worker preparation. File durations: 2.57 seconds and 39.23 seconds respectively; actual tests under one second per file. Per-file CI timings not yet collected.timeout 120s node scripts/run-oxlint.mjs --tsconfig config/tsconfig/oxlint.core.json --threads=1 --type-check <three repair-touched TypeScript files>: passed. Touched-file oxfmt andgit diff --check: passed.5c3103434832: only an INDEX-only finding that the index still held the old renderer. Resolved by staging the reviewed working-tree correction and verifying byte equality for every repair-touched file. No additional P0–P2 working-tree findings were reported. No hosted re-review requested; parent handles that review.7b5c1ffa39b9is running; no current-head failures observed at handoff. Prior-head CI is not claimed as proof for this revision.