Repository navigation
fix(update): skip --no-lazy-fetch on Git versions without it - #194198
Conversation
Reuse the existing capability probe for update history, checkout preservation, target inspection, diagnostics, and immutable preparation. Keep transfer's existing full-candidate fallback on older Git. 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: needs maintainer review before merge. What this changesThis PR shares Git capability detection so updater commands omit unsupported --no-lazy-fetch options. Example: A Git-source installation runs openclaw update --channel dev --yes with Ubuntu 24.04's Git 2.43.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Regression provenancePossible regression — probable (reviewed change; failure trace). No predecessor PR is attributed. Merge readiness✅ Ready for maintainer review Keep this PR open: it addresses a source-confirmed update regression still present on main, preserves the existing safeguards, and has no identified introduced defect. Priority: P1 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherThe updater resolves Git targets, validates candidates, preserves local commits, and prepares source or immutable installations before activation. flowchart TD
A[Update CLI] --> B[Git target inspection]
B --> C[Candidate preflight]
C --> D[Transfer and checkout preservation]
E[Shared Git capability probe] --> B
E --> C
E --> D
E --> F[Immutable preparation]
Technical reviewBest possible solution: Use the existing shared capability probe throughout updater inspections while preserving local commits, isolated verification, and complete-pack transfer. Do we have a high-confidence way to reproduce the issue? Current-main source makes Git's unsupported-option rejection fatal, matching the reporter's Git 2.43 trace; this read-only review ran no target code or tests. Is this the best way to solve the issue? The patch is the smallest coherent repair: it extracts an existing capability decision, migrates affected callers, and retains their separate safety responsibilities. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 230f05c7ca37. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +53, Tests +51, Docs +5, Other +2. Total +111 across 12 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:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
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, 11:03 AM ET / 16:03 UTC. |
…w#194198) Update steps that read local Git history no longer pass `--no-lazy-fetch` unconditionally. Every update-path use goes through the existing Git support check; on Git older than 2.45 (Ubuntu 24.04 ships 2.43) the same command runs without the flag, so preflight-local-history, branch preservation, fsck and immutable target lookup work there instead of failing the update. Fixes openclaw#194191 (reported by jacobtomlinson-bot). Focused regression tests fail on the old modules and pass with the fix; shared Codex autoreview (P0-P2) scoped-clean; hosted review: no findings; exact-head CI green. A live Ubuntu/Git 2.43 CLI run was not possible (no test machine capacity). Co-authored-by: Peter Steinberger <[email protected]> Co-authored-by: steipete <[email protected]>
Update steps that read local Git history no longer pass `--no-lazy-fetch` unconditionally. Every update-path use goes through the existing Git support check; on Git older than 2.45 (Ubuntu 24.04 ships 2.43) the same command runs without the flag, so preflight-local-history, branch preservation, fsck and immutable target lookup work there instead of failing the update. Fixes #194191 (reported by jacobtomlinson-bot). Focused regression tests fail on the old modules and pass with the fix; shared Codex autoreview (P0-P2) scoped-clean; hosted review: no findings; exact-head CI green. A live Ubuntu/Git 2.43 CLI run was not possible (no test machine capacity). Co-authored-by: Peter Steinberger <[email protected]> Co-authored-by: steipete <[email protected]> (cherry picked from commit 31a65d5) Release adaptation: omit preflight/steps/replay-test hunks because this release baseline lacks disconnected local replay (#188892); no legacy flag exists on those paths. Keep applicable immutable, cached-target, fsck and transfer fixes. Add isolated-environment/probe-count assertions in the existing immutable dry-run regression; adjust allocation from 51 to exact 42 net lines. Preserve release docs context. No tooling or benchmark changes. Companion dispositions: ae31ea3 not-applicable (independent docs/lifecycle/replay/prerequisite diagnostics); 74020ea not-applicable (independent docs/lifecycle/replay/prerequisite diagnostics); 6747b1e not-applicable (independent docs/lifecycle/replay/prerequisite diagnostics); e3f8a67 not-applicable (independent docs/lifecycle/replay/prerequisite diagnostics); 3c512c5 not-applicable (independent docs/lifecycle/replay/prerequisite diagnostics); 181a0ed not-applicable (independent docs/lifecycle/replay/prerequisite diagnostics); ea69fcb not-applicable (independent docs/lifecycle/replay/prerequisite diagnostics); 618bf31 not-applicable (independent docs/lifecycle/replay/prerequisite diagnostics); e4a3093 not-applicable (independent docs/lifecycle/replay/prerequisite diagnostics); 5dbf569 not-applicable (independent docs/lifecycle/replay/prerequisite diagnostics); 764761e not-applicable (independent docs/lifecycle/replay/prerequisite diagnostics); 4c4fef4 not-applicable (independent docs/lifecycle/replay/prerequisite diagnostics); 65cf8cd not-applicable (independent docs/lifecycle/replay/prerequisite diagnostics); 136e1f6 not-applicable (independent docs/lifecycle/replay/prerequisite diagnostics); 3bd03da not-applicable (independent docs/lifecycle/replay/prerequisite diagnostics); 68a839b not-applicable (independent docs/lifecycle/replay/prerequisite diagnostics); 1ec9d7b not-applicable (independent docs/lifecycle/replay/prerequisite diagnostics); d6ded18 not-applicable (independent docs/lifecycle/replay/prerequisite diagnostics); fd6fa47 not-applicable (independent docs/lifecycle/replay/prerequisite diagnostics); 7cf5e75 not-applicable (independent docs/lifecycle/replay/prerequisite diagnostics); 6ff8c86 not-applicable (independent docs/lifecycle/replay/prerequisite diagnostics); 7bf2160 not-applicable (independent docs/lifecycle/replay/prerequisite diagnostics); 930e1f7 not-applicable (independent docs/lifecycle/replay/prerequisite diagnostics); a15f737 not-applicable (independent docs/lifecycle/replay/prerequisite diagnostics); 92798ae not-applicable (independent docs/lifecycle/replay/prerequisite diagnostics); c1e55e2 not-applicable (independent docs/lifecycle/replay/prerequisite diagnostics); 715c610 not-applicable (independent docs/lifecycle/replay/prerequisite diagnostics); 689cfc8 not-applicable (independent docs/lifecycle/replay/prerequisite diagnostics); 86bc89e not-applicable (independent docs/lifecycle/replay/prerequisite diagnostics); 691bc8d not-applicable (independent docs/lifecycle/replay/prerequisite diagnostics); 000542f not-applicable (independent docs/lifecycle/replay/prerequisite diagnostics). No later PR-number mentions. Existing transfer full-inventory fallback retained for unsupported Git. Proof: 3 behavior regressions fail on the baseline, 66 focused tests pass after adaptation; core type-aware lint, format and diff checks pass. Full release qualification remains parent-owned. Co-authored-by: RomneyDa <[email protected]>
…aw#194058) Failed-update triage now captures the operator's environment before managed candidate admission, so a coding agent installed only on the operator's PATH is still offered when the Gateway service's PATH differs. Restores the operator-environment contract from openclaw#134490 and keeps the launch confirmation from openclaw#143139. Proof: shipped CLI on isolated Linux (Crabbox) with a running systemd Gateway: accept launches the operator-only agent, decline starts nothing, base 18bee8e reports no agent found; published 2026.11.1 upgrades to the fix with settings intact. Co-authored-by: TorstenW <[email protected]> Co-authored-by: Peter Steinberger <[email protected]> Co-authored-by: steipete <[email protected]> (cherry picked from commit 7c702c3) Release adaptation: Capture invoking operator env before candidate admission, forward to interactive triage only; preserve latest target selectors, confirmation and lease cleanup ordering. Exact three authorized production paths plus real lifecycle regression. Follow-up dispositions: ad4863d fix: preserve the running installation when an agent updates its Gateway (openclaw#201570); dc73ec0 fix: let updates finish when another tool briefly reads OpenClaw's databases (openclaw#202541); d07b530 fix: clarify PostgreSQL schema upgrades for Git installs (openclaw#202098); e60ea9f test(update): add a Git release upgrade-survivor scenario (openclaw#201956); 2ef6f7b fix(update): build and serve Git releases outside node_modules (openclaw#201917); dbc1aa0 fix: keep the openclaw command and Gateway working after updating a pnpm install (openclaw#201735); f5e7641 fix: Git checkout updates across a schema change no longer end as post-update-failed after the new release starts (openclaw#201600); 2183caf fix: Git checkout updates no longer fail before the new release starts on a schema change or a busy database (openclaw#201463); 47e8649 fix: explain why Doctor cannot restore a scheduled job’s account (openclaw#201550); 8f2cfd4 fix: remove updater-only restrictions from agent maintenance guidance; cb5cfb2 fix: keep a doubtful killed-update recovery on the repair path (openclaw#201361); 24cb734 fix: keep carried-over scheduled jobs running after updates (openclaw#200653); d1276e1 feat(doctor): check OpenClaw ID member roles and honor an optional roles default (openclaw#197785); 0a39956 fix: finish updates when another tool reads OpenClaw's databases during the update (openclaw#201330); ea1c9d5 fix(update): settle remounted package publications before admission (openclaw#201336); 66b5212 fix(update): isolate malformed retained-install markers (openclaw#201199); 7e79c83 fix: let the next update finish a killed source checkout update (openclaw#201009); d905d8a fix: let the next update finish a killed update after the machine restarted (openclaw#200994); fdf0c95 fix: let the next update finish a killed update that had already installed the new version (openclaw#200866); 0c19bcd chore(release): close out 2026.11.5 on main (openclaw#200577); a1940e0 fix(matrix): keep explicit recovery available during deferred migration (openclaw#200805); 18b4776 improve: explain package baseline drift during updates (openclaw#200802); 1ad4cad fix(doctor): reclaim macOS updater runtimes blocked by non-updater processes (openclaw#200732); 427c857 fix: keep one missing archived transcript from blocking every update (openclaw#200733); 802e3f7 fix(update): keep valid cold archives from blocking updates (openclaw#200659); 23fca1a fix: let the next update continue after a killed update when nothing is left to repair (openclaw#200680); 3afe212 fix: let Doctor publish unchanged plugin migrations in any order (openclaw#200658); f65e4db fix(doctor): reclaim runtimes blocked by unrelated Linux processes (openclaw#200657); dab086c fix(update): let candidate Doctor read plugin dependencies from the staged package (openclaw#200595); 3447bee fix(update): keep updates going when the predecessor writes during its stop (openclaw#200569); 0ce9c77 fix: let the next update settle a package publication that a killed update left behind (openclaw#200550); ae31ea3 fix(update): repair handoffs in the journal-pinned lease store (openclaw#200532); 74020ea fix: continue updates when initial SQLite capture is stale (openclaw#200328); 6747b1e feat(update): run Git checkout installs from releases behind the release link (openclaw#199706); e3f8a67 fix(state): keep completed retained agent stores out of startup upgrade (openclaw#200284); 3c512c5 fix(gateway): move managed update lease operations off the main thread (openclaw#200169); ea69fcb chore(release): close out 2026.11.4 on main (openclaw#199956); 618bf31 fix(state): bound startup upgrade copies and pruning to owned state (openclaw#199929); e4a3093 perf(update): replace the candidate canary with a runtime contract check (openclaw#198268); 5dbf569 fix(update): plugin failures never fail an update or Gateway health; 764761e fix(update): refuse missing host prerequisites in one line and record a cause per attempt; 4c4fef4 fix(ui): update dialog claims installation before progress is confirmed (openclaw#199254); 136e1f6 fix(update): retrying an update from a dev checkout is refused after a killed update (openclaw#198673); 3bd03da fix(update): avoid duplicate database copies while the Gateway is stopped (openclaw#198148); 68a839b fix: isolate held agent databases until explicit restoration (openclaw#198180); e333f7e chore(ci): drop retired test-lines allocation records (3/3) (openclaw#197657); fd6fa47 fix: converge Gateway updates with environment-only service overrides (openclaw#196371); 7cf5e75 fix: clarify split-install updates and blocked Doctor repairs (openclaw#196342); 6ff8c86 fix(update): retain lazy sqlite catalog generation (openclaw#197095); 930e1f7 fix: keep stable updates and recovery free of premature migrations (openclaw#196474); a15f737 fix: preserve external plugin data during update rehearsal (openclaw#196301); 92798ae fix: updates survive interrupted heartbeat runs (openclaw#195656); c1e55e2 fix(update): restore LaunchAgent registration after repair contention (openclaw#195406); 715c610 fix(doctor): repair retained ISO session end timestamps (openclaw#194685); 689cfc8 fix(update): reclaim dead closing triage repair leases (openclaw#194503); 86bc89e fix(doctor): keep standing Codex parameter advice out of retirement blockers (openclaw#193650); 691bc8d fix(backup): read the backup engine without copying the live database (openclaw#194234); 000542f fix(backup): backups and updates fail on slow storage when a header probe batch misses its deadline (openclaw#194239); 31a65d5 fix(update): skip --no-lazy-fetch on Git versions without it (openclaw#194198); e45e99d fix(update): preserve dev update sources in tag-only Git clones (openclaw#193109) Validation: Baseline2 intended operator-agent failures/32 controls passed; candidate34/34passed (194058-green.log). Accept launches synthetic operator-only CLI with expected env, decline starts nothing. Isolated updater flow, not live systemd/upgrade qualification. Co-authored-by: RomneyDa <[email protected]> (cherry picked from commit 6689fd575ada8fe40a9593784deac18ec73041cd) (cherry picked from commit 92e7a9fa223b0dc35801f25f70be90b472d9a6b7)
What Problem This Solves
Fixes
openclaw updatefailing atpreflight-local-historyon Git older than 2.45, including Ubuntu 24.04's distro Git 2.43. Reported by @jacobtomlinson-bot.Fixes #194191
User Impact
Git-source and immutable installations can update without upgrading Git solely for
--no-lazy-fetch. Older Git may lazily fetch promised objects in partial clones. This repair must be present in the installed updater; downloading a candidate cannot repair an older updater's preflight. No configuration or migration changes.Why This Change Was Made
At base
3e6a1232b2ee,src/infra/update-runner-git-preflight.ts:522passes the unsupported flag unconditionally. Extract the existing capability probe fromupdate-runner-git-transfer.ts:123intoresolveGitNoLazyFetchArgsinupdate-runner-git-commands.ts:36, and reuse it for history, ref preservation, diagnostics, pinned-target lookup, and immutable preparation. Unsupported Git executes the same commands without the flag; supported Git retains it. Transfer keeps its existing full-candidate fallback.The audit also confirms
git-network-retry.ts:32only recognizes argv options and never executes the flag. No second detection mechanism is needed.Evidence
update-runner-git-replay.test.ts,update-runner-git-admission.test.ts, andupdate-immutable-install.test.tspass (59.07s wall including compiler preparation). Seven selected tests inupdate-runner-git-transfer.test.tspass (5.11s), including existing legacy-Git and supported-Git missing-object transfer cases. Large-pack and unrelated transfer cases remain for CI.git diff --checkpass. Broad typecheck/build/suites and CI seconds remain for PR CI.--engine codex --max-priority P2, local staged snapshot against3e6a1232b2ee6c7c9c4bbc73d0cbcd18818cb1f6, matching commitdf5fd307e851928cf837a040580f78323af420b8:scoped-clean, no actionable P0–P2 findings.issue-194191-git-lazy-fetch.txtgrants exactly 51 net regression-test lines, needed to cover unsupported Git at the affected production boundaries; shared budget unchanged. Simplification replaces inline transfer detection with one owner. Net change: production TypeScript +53, tests +51, docs +5, allocation +2 lines.Missing real proof: Ubuntu 24.04/Git 2.43 release-tag
openclaw update --channel dev --yesRED/GREEN was unavailable. Crabbox/Testbox leasetbx_01m6rracfvrenaayx0vazas6m9remained queued before its first environment probe; it was stopped and is absent from active leases. Provider run. No remote command ran, and no heavy update/container/build proof ran on the production host.