Repository navigation
fix(update): preserve local package overrides - #94077
zhanxingxin1998 wants to merge 1 commit into
Conversation
|
Thanks for the context here. I swept through the related work, and this is now duplicate or superseded. Close as duplicate/superseded: this PR is an incomplete cherry-pick of the open canonical implementation at #89985, and it lacks the runtime wiring needed to change package-update behavior. Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Canonical path: Continue review and any remaining repair on #89985, then close this partial fork. So I’m closing this here and keeping the remaining discussion on #89985. Review detailsBest possible solution: Continue review and any remaining repair on #89985, then close this partial fork. Do we have a high-confidence way to reproduce the issue? Yes. Source inspection is enough here: current main and this PR head run package install/verify/swap without local override capture or replay, so the claimed package-update preservation behavior is not reachable from this branch. Is this the best way to solve the issue? No. This is not the best way to solve the issue because it cherry-picks only the helper and tests; the maintainable path is the canonical PR that wires the behavior through update steps, runner diagnostics, CLI/docs, inventory checks, and focused proof. Security review: Security review cleared: No workflow, dependency, lockfile, or published package metadata changes were introduced; the filesystem replay helper is not reachable from production in this partial branch. AGENTS.md: found and applied where relevant. What I checked:
Likely related people:
Codex review notes: model internal, reasoning high; reviewed against 366ef93641ad. |
|
ClawSweeper applied the proposed close for this PR.
|
Cherry-picked from #89985
Summary
fix(update): preserve local package overrides
Original PR: #89985 by upstream contributor
Original description:
Summary
distfiles, and reports the recovery bundle when overrides are not reapplied.2026.6.5/2026.6.5-beta.6packages that predatedist/postinstall-content-inventory.json.mainmerge conflict onsrc/cli/update-cli.tsandsrc/infra/update-runner.ts, then refreshes the branch to currentupstream/main.Verification
pnpm install --frozen-lockfilepnpm docs:listPATH=/Users/jason/.nvm/versions/node/v24.14.0/bin:$PATH pnpm check:docsgit diff --check upstream/main...HEAD && git diff --checkPATH=/Users/jason/.nvm/versions/node/v24.14.0/bin:$PATH ./node_modules/.bin/oxfmt --check --threads=1 src/infra/package-local-overrides.ts src/infra/package-update-steps.test.ts src/infra/update-runner.test.ts docs/.i18n/glossary.zh-CN.jsonPATH=/Users/jason/.nvm/versions/node/v24.14.0/bin:$PATH TMPDIR=/tmp node scripts/run-vitest.mjs test/scripts/check-openclaw-package-tarball.test.ts test/scripts/postinstall-bundled-plugins.test.ts test/scripts/openclaw-cross-os-release-checks.test.ts src/infra/package-dist-inventory.test.ts src/infra/package-update-steps.test.ts src/infra/update-runner.test.ts src/cli/update-cli/progress.test.ts src/cli/update-cli.option-collisions.test.tsPATH=/Users/jason/.nvm/versions/node/v24.14.0/bin:$PATH TMPDIR=/tmp node --import tsx --input-type=modulecurrent-head local package override smoke.agents/skills/autoreview/scripts/autoreview --mode branch --base upstream/main --codex-bin /Users/jason/.codex/openclaw-pr-autopilot/bin/codex-persist-sessions --model codex=gpt-5.5 --thinking codex=highclean after the accepted standalone-added-file finding was fixed.Real behavior proof
Behavior addressed: Package self-update preserves local packaged
distoverrides, captures edits through the staged swap boundary, fails closed on unsafe replay topology and package metadata, and verifies content hashes plus executable semantics.Real environment tested: Local macOS source checkout on current PR head
4451b9f3fedf5ea1e327101c768509bb9178d8e1, Nodev24.14.0, plus fresh Linux Blacksmith Testbox runs. The final smoke used real filesystem package roots and the real override capture/replay and content-inventory implementations throughnode --import tsx; the tarball regression creates and checks a real tar archive.Exact steps or command run after this patch:
PATH=/Users/jason/.nvm/versions/node/v24.14.0/bin:$PATH node scripts/run-vitest.mjs src/infra/package-update-steps.test.ts src/infra/package-dist-inventory.test.ts test/scripts/check-openclaw-package-tarball.test.ts test/scripts/openclaw-cross-os-release-checks.test.ts --reporter=dotPATH=/Users/jason/.nvm/versions/node/v24.14.0/bin:$PATH pnpm exec oxfmt --check --threads=1 ...andnode scripts/run-oxlint.mjs ...on the touched update/tarball filesPATH=/Users/jason/.nvm/versions/node/v24.14.0/bin:$PATH pnpm tsgo:prodPATH=/Users/jason/.nvm/versions/node/v24.14.0/bin:$PATH pnpm check:test-typesReal Behavior Proof (Automated)
测试结果
src/cli/update-cli.test.ts: Tests 144 passedsrc/cli/update-cli/progress.test.ts: Tests 6 passed变更文件
验证步骤
git pull— 更新到最新 mainpnpm build— 构建项目pnpm test— 运行关联测试🤖 由 OpenClaw PR 自动化流水线 生成 | 原始 PR: #89985