Repository navigation
fix(update): preserve matching artifact no-op - #145349
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. Reviewed September 12, 2026, 4:13 AM ET / 08:13 UTC (Revision 9). ClawSweeper reviewWhat this changesThe package updater compares build IDs before skipping same-version artifacts, preserves required replacement and staging, and adds regression coverage and documentation. Merge readiness✅ Ready for maintainer review This remains useful work absent from current main. The earlier findings are resolved, the recorded real update proof remains applicable to the unchanged tree, and no new actionable defect was found. Priority: P2 Review scores
Verification
How this fits togetherOpenClaw’s updater stages packages selected through the CLI before validating and activating them. Its no-op decision determines whether the installed package and running Gateway remain untouched or proceed through replacement. flowchart TD
A[CLI update request] --> B[Stage selected package]
B --> C[Verify package structure]
C --> D{Replacement required?}
D -->|Yes| F[Validate and activate candidate]
D -->|No| E{Version and source identity match?}
E -->|Yes| G[Keep installation and Gateway running]
E -->|No| F
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +42, Tests +247, Docs +4. Total +293 across 5 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep artifact equality in the shared package-update owner while preserving registry no-ops, mandatory method conversion, and retained candidate validation. Do we have a high-confidence way to reproduce the issue? Yes, source establishes the trigger: current main forces replacement of matching explicit artifacts, while its lower-level no-op uses version equality alone. This review did not execute a current-main reproduction. Is this the best way to solve the issue? Yes. The patch repairs the existing package owner and carries mandatory replacement through both callers, without adding a competing update path or user setting. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against ca28965b39be. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (8 earlier review cycles)
|
Keep Git-to-package conversions and fresh-profile staging authoritative when an explicit artifact has the same build identity. Preserve npm-valid registry tags on the existing same-version no-op path. Co-authored-by: Nate Motyl <[email protected]>
Refresh the contributor branch with main's state-independent JSON capability probe before repeating artifact update proof. Preserve the original contributor commits and keep the artifact identity change relative to current main. Refs openclaw#145547, openclaw#133884
|
Managed Linux artifact proof passed on Provider: Blacksmith Testbox Both artifacts are version 2026.9.4, built from the same head:
Exact command forms, executed inside the isolated account with its fixture npm prefix and Node runtime: GIT_COMMIT=1f21a4a16124ad98a19873c77fb5af02d996dee6 OPENCLAW_BUILD_TIMESTAMP=2026-09-12T00:00:00Z node scripts/package-openclaw-for-docker.mjs --allow-unreleased-changelog --output-dir /tmp/openclaw-l154/artifacts --output-name build-a.tgz
GIT_COMMIT=1f21a4a16124ad98a19873c77fb5af02d996dee6 OPENCLAW_BUILD_TIMESTAMP=2026-09-12T00:01:00Z node scripts/package-openclaw-for-docker.mjs --allow-unreleased-changelog --output-dir /tmp/openclaw-l154/artifacts --output-name build-b.tgz
npm install -g [email protected] --no-audit --no-fund
openclaw gateway install --port 19554 --json
openclaw update --tag file:/tmp/openclaw-l154/artifacts/build-a.tgz --yes --json
openclaw update status --json
# Repeat A after its first terminal success, then run B after A's terminal no-op.
openclaw update --tag file:/tmp/openclaw-l154/artifacts/build-b.tgz --yes --json
systemctl --user show openclaw-gateway.service -p MainPID -p InvocationID -p ActiveEnterTimestampMonotonic -p NRestartsJSON terminal records, with unrelated fields omitted: [
{
"cell": "published-to-a",
"runId": "83cb9f0d-97b8-4869-843a-1b5754298958",
"status": "succeeded",
"reason": null,
"downtimeMs": 18278,
"verification": {
"runningVersion": "2026.9.4",
"runningBuildId": "2026.9.4-1f21a4a16124-2026-09-12T00-00-00.000Z",
"serviceRunning": true,
"pid": 10605,
"port": 19554,
"versionMatch": true,
"pluginErrors": [],
"channelsReady": true,
"readyz": true,
"settled": true
}
},
{
"cell": "matching-a",
"runId": "098b046f-b4c1-4a4d-838b-3f42c1c73e0e",
"status": "skipped",
"reason": "already-current",
"downtimeMs": 0,
"verification": {}
},
{
"cell": "differing-b",
"runId": "31caa912-5a40-4954-83d6-daa6e10fa0de",
"status": "succeeded",
"reason": null,
"downtimeMs": 19035,
"verification": {
"runningVersion": "2026.9.4",
"runningBuildId": "2026.9.4-1f21a4a16124-2026-09-12T00-01-00.000Z",
"serviceRunning": true,
"pid": 13350,
"port": 19554,
"versionMatch": true,
"pluginErrors": [],
"channelsReady": true,
"readyz": true,
"settled": true
}
}
]The first proof on predecessor An additional service-less fresh-profile live probe was refused before admission with Current integrated validation: 106 focused tests pass, full changed-file checks pass, and independent review is scoped-clean through P2 (0.93). The refreshed head |
Refs #145349 The duplicate-module native hook relay test could invoke a replacement before its HTTP endpoint and SQLite locator finished publication. On a delayed worker, the stale-registration response could then arrive after the existing retry grace and fail unrelated CI. Use the existing owned-registration API and await readiness for both registrations. Preserve shared approval state, stale-handle teardown, and exact HTTP-response assertions. This is a test synchronization repair with no production behavior or timeout change. Source failure: CI run 34679294250, job 103514926194. https://github.com/openclaw/openclaw/actions/runs/34679294250/job/103514926194 Proof: the PR records controlled failing-before/passing-after reproduction, 138 focused passing tests, and an uninstrumented ordered replay passing 147 files / 3,288 tests. The native watcher reverified GREEN on exact head add5bcb in CI run 34681115215. https://github.com/openclaw/openclaw/actions/runs/34681115215 ClawSweeper review: no actionable findings on the exact head; no fixups or skips required. The lead's independent review was scoped-clean at P0/P1.
Prevent healthy Gateway worker preparation from failing a test-only five-second observation deadline on loaded hosts. Await execution completion and credential readiness while preserving early-settlement errors and unjoined-owner cleanup guards. Extend the existing replay case to cross the former deadline without changing its base-leaf or history assertions. Use two concurrent worktrees for stale-retention reconciliation, preserving the upload barrier, real manifests and Git operations, binary result checks, journals, and released claims. Production code is unchanged. CI run 34679294250, job 103514926295 failed six detached-context cases and timed out the 50-turn reconciliation case; #145349 was blocked on this shard. https://github.com/openclaw/openclaw/actions/runs/34679294250/job/103514926295 Recorded proof: controlled regression failed before and passed after; the reduced reconciliation case failed the historical retention mutation; the contention suite passed all 13 tests; the full agentic-gateway-core-2 shard passed 255 files and 5,038 tests. Exact-head CI run 34680987053 is green for b3edad9 and was reverified with the native watcher before preparation. https://github.com/openclaw/openclaw/actions/runs/34680987053 The lead's P1 autoreview is scoped-clean. ClawSweeper found no actionable findings on the approved head; no fixups or skips were needed. Refs #145349, #145379. Follow-up to #145657.
|
Merged via squash.
|
Refs openclaw#145349 The duplicate-module native hook relay test could invoke a replacement before its HTTP endpoint and SQLite locator finished publication. On a delayed worker, the stale-registration response could then arrive after the existing retry grace and fail unrelated CI. Use the existing owned-registration API and await readiness for both registrations. Preserve shared approval state, stale-handle teardown, and exact HTTP-response assertions. This is a test synchronization repair with no production behavior or timeout change. Source failure: CI run 34679294250, job 103514926194. https://github.com/openclaw/openclaw/actions/runs/34679294250/job/103514926194 Proof: the PR records controlled failing-before/passing-after reproduction, 138 focused passing tests, and an uninstrumented ordered replay passing 147 files / 3,288 tests. The native watcher reverified GREEN on exact head add5bcb in CI run 34681115215. https://github.com/openclaw/openclaw/actions/runs/34681115215 ClawSweeper review: no actionable findings on the exact head; no fixups or skips required. The lead's independent review was scoped-clean at P0/P1.
…5770) Prevent healthy Gateway worker preparation from failing a test-only five-second observation deadline on loaded hosts. Await execution completion and credential readiness while preserving early-settlement errors and unjoined-owner cleanup guards. Extend the existing replay case to cross the former deadline without changing its base-leaf or history assertions. Use two concurrent worktrees for stale-retention reconciliation, preserving the upload barrier, real manifests and Git operations, binary result checks, journals, and released claims. Production code is unchanged. CI run 34679294250, job 103514926295 failed six detached-context cases and timed out the 50-turn reconciliation case; openclaw#145349 was blocked on this shard. https://github.com/openclaw/openclaw/actions/runs/34679294250/job/103514926295 Recorded proof: controlled regression failed before and passed after; the reduced reconciliation case failed the historical retention mutation; the contention suite passed all 13 tests; the full agentic-gateway-core-2 shard passed 255 files and 5,038 tests. Exact-head CI run 34680987053 is green for b3edad9 and was reverified with the native watcher before preparation. https://github.com/openclaw/openclaw/actions/runs/34680987053 The lead's P1 autoreview is scoped-clean. ClawSweeper found no actionable findings on the approved head; no fixups or skips were needed. Refs openclaw#145349, openclaw#145379. Follow-up to openclaw#145657.
An explicit package artifact with the same version as the installed package is no longer skipped as a no-op when its build differs; it goes through staged validation and swap. Matching known build identities keep the Gateway untouched when no installation conversion or fresh-profile initialization is required. Registry requests retain their same-version no-op behavior. Preserve mandatory Git-to-package replacement and retained fresh-profile staging before deduplication. Thanks @nmotyl for the build-identity comparison. Co-authored-by: Nate Motyl <[email protected]> Co-authored-by: Peter Steinberger <[email protected]>
What Problem This Solves
Fixes an issue where users selecting an explicit package artifact at the installed semantic version could have different build bytes skipped, while the production CLI unnecessarily replaced a matching build.
Why This Change Was Made
The package-update owner compares known build identities for explicit artifacts and retains version-based no-ops for registry requests. Missing or different artifact identity continues through staged validation. Mandatory Git-to-package replacement and retained fresh-profile staging remain authoritative.
The contributor branch now includes main's already-landed native capability-probe fixes from #145547 and #133884, which are needed for the managed-service proof.
User Impact
A matching explicit artifact can finish
skippedwith reasonalready-currentwithout restarting the Gateway. An explicit package artifact with the same version as the installed package is no longer skipped as a no-op when its build differs; it goes through staged validation and swap. Installation-method switches and fresh-profile initialization still retain and validate their candidate. npm-valid registry tags preserve their existing same-version behavior.Evidence
Current head:
b8a5872b15990caf02aa50fb9f4aba0ee1749994. Its tree is identical to reviewed and live-tested1f21a4a16124ad98a19873c77fb5af02d996dee6(git diffis empty); the existing reviews and proof are adopted.skipped/already-currentwith zero downtime and unchanged service identity; different build B validated, swapped, restarted, and verified healthy. Full commands, artifact hashes, and JSON outcomes are in the comment.b8a5872b15990caf02aa50fb9f4aba0ee1749994. Main fixes fix(test): prevent worker shard timeouts on loaded hosts #145770 and test(hooks): await duplicate-module relay publication #145771 resolve the previously failing worker-environment and native-hook-relay fixtures; both formerly failing shards passed on the fresh merge ref.managed-service-preflight, even after systemd was confirmed running and its Gateway unit absent. Ordinary status and the capability probe work; update admission uses a stricter D-Bus absence proof. Those admission files are unchanged from main. Retained-stage run/cancel regression tests pass; the separate live admission limitation remains recorded.Review follow-ups
canary!,-canary,~canary, and scoped tags follow npm's grammar.needs proof: the integrated-head published-driver, matching-artifact no-op, and differing-artifact staged-swap/healthy-after requirements are satisfied by real Linux proof. The additional fresh-profile admission limitation is recorded above; retained staging has regression coverage.Thanks @nmotyl (Nate Motyl) for the artifact build-identity change.