Skip to content

fix(update): skip --no-lazy-fetch on Git versions without it - #194198

Merged
roboclaw-bot merged 1 commit into
mainfrom
roboclaw/nq-194191-lazy-fetch
Nov 6, 2026
Merged

roboclaw-bot merged 1 commit into
mainfrom
roboclaw/nq-194191-lazy-fetch

Conversation

@roboclaw-bot

Copy link
Copy Markdown
Collaborator

What Problem This Solves

Fixes openclaw update failing at preflight-local-history on 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:522 passes the unsupported flag unconditionally. Extract the existing capability probe from update-runner-git-transfer.ts:123 into resolveGitNoLazyFetchArgs in update-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:32 only recognizes argv options and never executes the flag. No second detection mechanism is needed.

Evidence

  • RED on unchanged production modules: regressions reproduce failed history inspection, detached preservation fallback, missed fsck evidence, failed immutable lookup, and unnecessary cached-target fetching.
  • GREEN: all 66 tests in update-runner-git-replay.test.ts, update-runner-git-admission.test.ts, and update-immutable-install.test.ts pass (59.07s wall including compiler preparation). Seven selected tests in update-runner-git-transfer.test.ts pass (5.11s), including existing legacy-Git and supported-Git missing-object transfer cases. Large-pack and unrelated transfer cases remain for CI.
  • Touched-file type-aware oxlint, scoped formatting, and git diff --check pass. Broad typecheck/build/suites and CI seconds remain for PR CI.
  • Shared autoreview --engine codex --max-priority P2, local staged snapshot against 3e6a1232b2ee6c7c9c4bbc73d0cbcd18818cb1f6, matching commit df5fd307e851928cf837a040580f78323af420b8: scoped-clean, no actionable P0–P2 findings.
  • Scoped allocation issue-194191-git-lazy-fetch.txt grants 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 --yes RED/GREEN was unavailable. Crabbox/Testbox lease tbx_01m6rracfvrenaayx0vazas6m9 remained 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.

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]>
@clawsweeper

clawsweeper Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation size: M labels Nov 6, 2026
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P1 High-priority user-facing bug, regression, or broken workflow. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 6, 2026
@clawsweeper

clawsweeper Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This 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.

  • Before: The local-history preflight fails with unknown option: --no-lazy-fetch.
  • After: The updater probes support and performs the history check without the unsupported option.

Review scores

Measure Result What it means
Overall readiness 🧂 unranked krab (1/6) The source repair is focused and has meaningful regression coverage, but required real-update evidence is absent.
Proof confidence 🧂 unranked krab (1/6) Real behavior proof is not required for maintainer- or bot-authored pull requests.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Users with Git 2.43 cannot complete a dev update because validation passes an unsupported Git option.
Reason: The maintainer-authored repair restores compatibility and follows the collaborator's recorded direction without adding configuration or changing persisted formats.

Regression provenance

Possible 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
Reviewed head: df5fd307e851928cf837a040580f78323af420b8

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: Show the real Git 2.43 CLI update with the corrected installed updater, plus the repository-required latest-stable upgrade with settings and data intact; supplied red/green results currently cover fixtures only.
Agent review details

How this fits together

The 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]
Loading

Technical review

Best 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

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit ec2c1fa adds src/infra/update-immutable-install.ts:388 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: ec2c1fa02cd6; files: src/infra/update-immutable-install.ts)
  • RoboClaw: Raw commit f833e07 adds src/infra/update-runner-git-preflight.ts:527 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: f833e0723294; files: src/infra/update-runner-git-preflight.ts)
  • Dallin Romney: Raw commit a9ff794 adds src/infra/update-runner-git-transfer.ts:117 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: a9ff79407881; files: src/infra/update-runner-git-transfer.ts)

PR surface

Source +53, Tests +51, Docs +5, Other +2. Total +111 across 12 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 6 97 44 +53
Tests 4 92 41 +51
Docs 1 5 0 +5
Config 0 0 0 0
Generated 0 0 0 0
Other 1 2 0 +2
Total 12 196 85 +111

Preflight source

Source 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

Metric Value Why it matters
Production versus regression coverage Production TypeScript +97/-44; tests +92/-41 Net growth is justified by sharing capability detection across existing callers and extending distinct regression boundaries.

Labels

Label changes:

  • add P1: A current compatibility regression blocks the reported Git-source update workflow on Git 2.43, although the previous Gateway keeps serving.
  • add rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P1: A current compatibility regression blocks the reported Git-source update workflow on Git 2.43, although the previous Gateway keeps serving.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Provide the Git 2.43 CLI update and stable-upgrade evidence described in the proof assessment.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed November 6, 2026, 11:03 AM ET / 16:03 UTC.

@roboclaw-bot
roboclaw-bot merged commit 31a65d5 into main Nov 6, 2026
142 checks passed
@roboclaw-bot
roboclaw-bot deleted the roboclaw/nq-194191-lazy-fetch branch November 6, 2026 16:18
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 7, 2026
…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]>
RomneyDa added a commit that referenced this pull request Nov 17, 2026
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]>
maplel pushed a commit to maplel/openclaw that referenced this pull request Nov 24, 2026
…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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation P1 High-priority user-facing bug, regression, or broken workflow. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. size: M status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: openclaw update fails on Git < 2.45: preflight-local-history passes --no-lazy-fetch without checking support

1 participant