Repository navigation
fix(update): continue after baseline fingerprint timeouts - #144758
Conversation
Keep the full package scan bounded, but record a recoverable warning when it times out. Verify retained and restored package identity/version and launchers when the baseline fingerprint is unavailable. Stop hashing at the observed file size while preserving before/after metadata checks, removing one redundant EOF read per file. Release-note context: npm updates continue after baseline fingerprint scan timeouts and report the reduced rollback verification as a warning. Refs #143767.
Let shared completion persist result steps before recording the terminal rolled-back outcome. Keep the original failure reason and downtime. Release-note context: rollback fingerprint advisories remain visible in update status and reports after the update process exits. Refs #143767.
|
🦞👀 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. Reviewed September 11, 2026, 5:27 AM ET / 09:27 UTC (Revision 3). ClawSweeper reviewWhat this changesThe updater continues after baseline fingerprint timeouts, verifies retained package identity and launchers during rollback, and preserves rollback warnings in update history. Merge readiness✅ Ready for maintainer review This remains a useful repair, with no actionable patch findings. The recorded maintainer acceptance resolves the previous review’s reduced-verification concern; no additional fixup is required. Priority: P2 Review scores
Verification
How this fits togetherThe package updater validates a staged installation before replacing the installed package and its launchers. If activation fails, the rollback owner restores the retained package, while CLI completion records the outcome and warnings. flowchart TD
A[Staged package] --> B[Baseline package scan]
B --> C{Scan completed?}
C -->|Yes| D[Full fingerprint]
C -->|Timeout| E[Directory identity and version]
D --> F[Package and launcher swap]
E --> F
F --> G[Activation or verified rollback]
G --> H[Outcome and warning history]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +61, Tests +163, Docs +7. Total +231 across 8 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Retain the approved best-effort timeout policy, with explicit reduced-verification warnings and the existing strict ownership, compatibility, launcher, and readiness checks. Do we have a high-confidence way to reproduce the issue? Yes: current-main source aborts when the baseline scan exceeds its deadline, and the supplied installed-CLI evidence exercises that trigger. This reviewer did not execute a reproduction. Is this the best way to solve the issue? Yes: the patch handles the timeout at the existing package-swap owner and fixes warning ordering at shared completion, matching the explicitly accepted policy without a competing implementation. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against b43dfe93743d. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
|
Cycling the PR to obtain a fresh merge ref: reruns test the original merge commit, which predates #144761 (the memory-core lane repair). Reopening immediately. |
|
Merged via squash.
|
…he excerpt tail (#144729) Preserve the triggering error in failed-update diagnostic records and triage prompts by using the shared sanitizer's existing 384-byte head-and-tail stderr excerpt. The previous 160-byte tail-only excerpt could erase the initiating error behind rollback details. The saved-artifact regression covers both the leading diagnostic and final recovery verdict. Redaction still precedes truncation, and the diagnostic JSON and triage prompt retain their existing 4 KiB and 8 KiB bounds. Update execution, rollback decisions, and ledger summaries are unchanged. Related: #144712. This repairs its diagnostic-loss symptom; #144758 addresses the triggering update failure. Validation: exact-head CI run 34579194228 succeeded, including build, lint, types, and test shards. ClawSweeper found no blocking defect; independent maintainer review was clean at P0/P1. Contributor-recorded isolated update output retains the leading timeout and final recovery verdict. Contributor code was not executed locally during landing. Thanks @Richard355168. Co-authored-by: Richard355168 <[email protected]>
…stalls The package integrity scan used a fixed 30 s ceiling for its budget, so the callers step timeout could never raise it. Installations whose tree needs longer than that to hash (37k entries / 426 MiB here, within the documented tree bounds) never completed a baseline fingerprint, so rollback verification always degraded to the identity + version fallback, and before openclaw#144758 the update failed outright. The reader now keeps a 30 s default and accepts a caller budget up to a 5 minute ceiling.
) The global-install-failed reason-code entry still claimed no published release contained both openclaw#145282 and openclaw#144758. Both landed in v2026.9.5 (f19a973, cdb8e14), so users stuck on the 2026.9.3/2026.9.4 updater need the manual hop only once. Co-authored-by: Peter Steinberger <[email protected]>
Additional instructions
Same-repository maintainer branch; maintainers retain repository write access. The campaign lead owns landing.
What Problem This Solves
Fixes an issue where
openclaw updatefails before activation on a busy host or slow disk because fingerprinting the existing npm package exceeds 30 seconds. The absent fingerprint could then be misreported as a changed retained package and failed rollback. L38 reproduced this in the published 2026.9.3 → 2026.9.4 matrix on Linux ARM64.Refs #143767. This implements the maintainer's explicit best-effort fingerprint decision; no external contributor patch was imported.
Why This Change Was Made
Only the full baseline scan timeout becomes recoverable. Before mutation, the swap captures the retained directory identity and package version, and backs up launchers on an independent budget. Without a complete fingerprint, rollback verifies those facts before and after restoring the same directory. Completed fingerprints and detected integrity changes remain strict.
The reader retains its 30-second cap and 64 KiB chunks. It stops at the observed file size, rejects premature EOF, and retains the before/after metadata checks. This removes one redundant read per file without changing the fingerprint format. Package byte count does not predict filesystem latency, so the time cap does not scale with package size.
Shared completion now writes result steps before closing a rolled-back run. This preserves the fingerprint advisories in durable history while retaining the original failure reason and downtime.
Warning classification extension to #143767
Warnings use the existing
recoverable-maintenancekind. No new configuration, dependency, protocol version, SQLite schema, retention rule, or fingerprint format.User Impact
A slow baseline scan no longer prevents an otherwise viable npm update. Verified rollback remains successful when only the full fingerprint is unavailable, and the warning remains visible after the update process exits.
Release-note context: npm updates continue with recorded advisories after baseline fingerprint timeouts; retained-copy rollback verifies identity and launchers, and package scans avoid redundant EOF reads.
Evidence
All three final regressions were exercised against the original production owners, with the fixes restored byte-for-byte afterward:
Focused suites cover 175 distinct cases across package swap/integrity/ownership, rollback, terminal publication, recovery, and the run ledger. Commands included:
Checks, the full build, canonical package integrity validation, and Codex autoreview at P0/P1 passed. Tests retain changed-file, identity, launcher, authority, size, inventory, and late-I/O controls. The final warning regression also asserts the original reason, rolled-back status, and downtime.
A real installed 2026.9.4 package contained 35,648 files and 460,589,795 content bytes. Sequential profiling measured 16.907 → 12.620 seconds, with identical fingerprints: 75,730 → 40,082 file reads. This is a single sampled comparison. Larger buffers were slower. A separate controlled stalled-read probe reproduced the original timeout at 30.008 seconds.
Final installed CLI matrix, using the L19/L38 fixture on Linux ARM64 / Node 24.19.0:
succeeded; exact baseline advisory persisted.doctor-failed; 101.116s total; rollback exit 0 in 1.357s; exact directory identity/version/build restored; Gateway HTTP 200/live. Statusrolled-backretains both fingerprint advisories.The rollback result reports
packageRollbackVerified: trueandserviceRestartSafe: true; neitherruntime-verification-failednorrollback-state-unverifiedis introduced by the missing fingerprint. Minimum observed free space was 21.727 GiB on the host and 20.262 GiB in the container. The owned container was removed and its absence verified.Candidate SHA-256:
4b097003087472baff2d3fc64294c80db3def8b8bc355fc93887130bcc212a59. It was built before the final commit, so its build metadata names8426b8e51c4; the source receipt matches all eight changed files at final head8afc3a16996d09c2a3c5947d3139a1db784d1249.Known proof constraints: main still declares 2026.9.3. The synthetic fixture used the existing explicit downgrade acknowledgment to test the newer source without changing version metadata. The initial version-guard refusal is preserved. A zero-deadline fixture health probe was corrected to make a bounded HTTP request. Published 9.4's driver cannot gain this repair retroactively: the first hop runs normally, then the installed candidate owns the forced-timeout tests. Native systemd, x64, and Windows live behavior are not claimed.
Exact-head CI run 34581175774 completed successfully on
8afc3a16996d09c2a3c5947d3139a1db784d1249. The repository watcher reportsGREEN, with zero pending checks and 261 superseded check results reconciled. This fresh run used the reopened PR merge ref including #144761. Earlier runs encountered the now-repaired memory-core test issue and infrastructure failures; no additional code changes or retries were needed for this green run.Maintainer review decision: retain the documented best-effort timeout policy, as explicitly approved for this repair. ClawSweeper's latest review (2026-09-11 08:57 UTC, exact head above) found no actionable patch defects. Its remaining merge-risk note is accepted: content changes that preserve retained directory identity and package version can escape full fingerprint comparison after a baseline timeout. Ownership, version, launcher, compatibility, and runtime-readiness checks remain mandatory, and both reduced-verification advisories remain visible. No fixup is needed for this accepted tradeoff.