openclaw - ✅(Solved) Fix openclaw update: tracked src/canvas-host/a2ui/.bundle.hash breaks preflight bisect walkback [1 pull requests, 1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#64818Fetched 2026-04-12 13:26:36
View on GitHub
Comments
0
Participants
1
Timeline
2
Reactions
0
Author
Participants
Timeline (top)
cross-referenced ×1referenced ×1

When openclaw update runs preflight and the candidate commit fails (e.g. lint), the updater walks backward through earlier commits to find a "good" one. Every one of those fallback checkouts fails with:

error: Your local changes to the following files would be overwritten by checkout:
    src/canvas-host/a2ui/.bundle.hash
Please commit your changes or stash them before you switch branches.
Aborting

The updater then bails with Reason: preflight-no-good-commit, even though there almost certainly is a good commit further back — it just can't reach it.

Related symptom-level issue: #58544 (different root cause — deps install — but same final error).

Error Message

error: Your local changes to the following files would be overwritten by checkout: src/canvas-host/a2ui/.bundle.hash Please commit your changes or stash them before you switch branches. Aborting

Root Cause

Two things combine:

  1. src/canvas-host/a2ui/.bundle.hash is tracked in git again, despite being listed in .gitignore:67 and explicitly untracked by c568142af9 (chore: stop tracking a2ui bundle hash, Jan 27). It was re-introduced accidentally in 74e7b8d47b fix(cycles): bulk extract leaf type surfaces and has been updated several times since (most recently 370efaa4a0 build(canvas): refresh a2ui bundle).

  2. scripts/bundle-a2ui.sh writes to that file as a side effect of the build (line 104: echo "$current_hash" > "$HASH_FILE"). It only skips writing if the previous hash matches AND the output bundle exists — otherwise it always rewrites.

So the preflight worktree sequence is:

  1. preflight checkout <candidate> — file matches tracked blob.
  2. preflight build <candidate>bundle-a2ui.sh rewrites the hash with a different value (e.g. when inputs differ, or when the worktree's build cache doesn't line up with the committed hash).
  3. preflight lint <candidate> — fails (for whatever unrelated reason).
  4. preflight checkout <older-commit>refuses, because the working copy's .bundle.hash differs from the index and the older commit tracks a different blob at that path.
  5. Every subsequent walkback checkout hits the same wall → preflight-no-good-commit.

Fix Action

Fix / Workaround

Option 1 is the minimal upstream patch; option 3 is the most robust since it also protects against similar issues with other generated-but-accidentally-tracked files.

PR fix notes

PR #64822: chore: stop tracking a2ui bundle hash (again)

Description (problem / solution / changelog)

Summary

Re-untracks src/canvas-host/a2ui/.bundle.hash so that scripts/bundle-a2ui.sh can rewrite it freely during preflight without dirtying the worktree. Mirrors c568142af9, which did the same thing in January — the file was accidentally reintroduced in 74e7b8d47b and updated several times since.

Fixes the openclaw update failure path described in #64818, where any transient preflight failure (lint, test, whatever) leaves openclaw update stuck because the bisect walkback can't check out earlier commits:

error: Your local changes to the following files would be overwritten by checkout:
    src/canvas-host/a2ui/.bundle.hash
Please commit your changes or stash them before you switch branches.
Aborting

With the file untracked, bundle-a2ui.sh's side-effect write (line 104) no longer fights git checkout, the preflight walkback works, and transient failures self-heal instead of hard-stalling.

.bundle.hash is already in .gitignore:67, so nothing else needs to change.

Test plan

  • Verify .gitignore:67 still matches .bundle.hash
  • git rm --cached leaves the working copy alone (bundle.hash file remains locally, just untracked)
  • After merge: openclaw update on a transient-failure commit walks back successfully instead of returning preflight-no-good-commit

Refs #64818. Related symptom: #58544.

Changed files

  • src/canvas-host/a2ui/.bundle.hash (removed, +0/-1)

Code Example

error: Your local changes to the following files would be overwritten by checkout:
    src/canvas-host/a2ui/.bundle.hash
Please commit your changes or stash them before you switch branches.
Aborting

---

cd /path/to/openclaw
echo "deadbeef" > src/canvas-host/a2ui/.bundle.hash
git checkout HEAD~1 -- .   # or any older commit that tracks the file
# -> "Your local changes... would be overwritten"

---

git rm --cached src/canvas-host/a2ui/.bundle.hash
   git commit -m "chore: stop tracking a2ui bundle hash (again)"

---

if [[ ! -f "$HASH_FILE" || "$(cat "$HASH_FILE")" != "$current_hash" ]]; then
     echo "$current_hash" > "$HASH_FILE"
   fi
RAW_BUFFERClick to expand / collapse

Bug type

Regression (worked before, now fails)

Summary

When openclaw update runs preflight and the candidate commit fails (e.g. lint), the updater walks backward through earlier commits to find a "good" one. Every one of those fallback checkouts fails with:

error: Your local changes to the following files would be overwritten by checkout:
    src/canvas-host/a2ui/.bundle.hash
Please commit your changes or stash them before you switch branches.
Aborting

The updater then bails with Reason: preflight-no-good-commit, even though there almost certainly is a good commit further back — it just can't reach it.

Related symptom-level issue: #58544 (different root cause — deps install — but same final error).

Root cause

Two things combine:

  1. src/canvas-host/a2ui/.bundle.hash is tracked in git again, despite being listed in .gitignore:67 and explicitly untracked by c568142af9 (chore: stop tracking a2ui bundle hash, Jan 27). It was re-introduced accidentally in 74e7b8d47b fix(cycles): bulk extract leaf type surfaces and has been updated several times since (most recently 370efaa4a0 build(canvas): refresh a2ui bundle).

  2. scripts/bundle-a2ui.sh writes to that file as a side effect of the build (line 104: echo "$current_hash" > "$HASH_FILE"). It only skips writing if the previous hash matches AND the output bundle exists — otherwise it always rewrites.

So the preflight worktree sequence is:

  1. preflight checkout <candidate> — file matches tracked blob.
  2. preflight build <candidate>bundle-a2ui.sh rewrites the hash with a different value (e.g. when inputs differ, or when the worktree's build cache doesn't line up with the committed hash).
  3. preflight lint <candidate> — fails (for whatever unrelated reason).
  4. preflight checkout <older-commit>refuses, because the working copy's .bundle.hash differs from the index and the older commit tracks a different blob at that path.
  5. Every subsequent walkback checkout hits the same wall → preflight-no-good-commit.

Reproduction

Easy to reproduce whenever main has any transient preflight failure. To force it cleanly on a currently-good tree:

cd /path/to/openclaw
echo "deadbeef" > src/canvas-host/a2ui/.bundle.hash
git checkout HEAD~1 -- .   # or any older commit that tracks the file
# -> "Your local changes... would be overwritten"

Real-world repro I hit today: a lint regression around 370efaa4 triggered the bisect walkback, and every fallback checkout (aa092045, 3e013342, 81535d39, 355794c2, 7c5b42e4, 7315914e, 43bd5545, c159d22b, ed356d74) failed with the .bundle.hash conflict. Update bailed with preflight-no-good-commit, leaving the install stuck on an older version until upstream landed a fix.

Fix options

Either (or both) of these would eliminate the class of failure:

  1. Re-untrack the file (mirrors c568142af9):

    git rm --cached src/canvas-host/a2ui/.bundle.hash
    git commit -m "chore: stop tracking a2ui bundle hash (again)"

    This is the cleanest fix and matches the clearly-intended gitignore state. Worth also hunting for whatever tooling keeps re-adding it — 74e7b8d47b looks like an unrelated commit that accidentally staged the file.

  2. Harden scripts/bundle-a2ui.sh to avoid rewriting the hash file when the content would be unchanged:

    if [[ ! -f "$HASH_FILE" || "$(cat "$HASH_FILE")" != "$current_hash" ]]; then
      echo "$current_hash" > "$HASH_FILE"
    fi

    Defense in depth — handles any future re-track of the file.

  3. Make the preflight updater resilient to checkout conflicts — e.g. git reset --hard or git stash inside the preflight worktree before each fallback checkout. The preflight worktree is disposable, so force-resetting it is safe.

Option 1 is the minimal upstream patch; option 3 is the most robust since it also protects against similar issues with other generated-but-accidentally-tracked files.

Environment

  • OpenClaw 2026.4.6 → 2026.4.11 (openclaw update path)
  • macOS (Darwin 25.5.0)
  • Git install

extent analysis

TL;DR

To fix the issue, re-untrack the .bundle.hash file by running git rm --cached src/canvas-host/a2ui/.bundle.hash and committing the change.

Guidance

  • Re-untrack the .bundle.hash file to prevent Git from tracking changes to it, which is causing the checkout conflicts.
  • Harden the scripts/bundle-a2ui.sh script to avoid rewriting the hash file when the content would be unchanged.
  • Consider making the preflight updater resilient to checkout conflicts by using git reset --hard or git stash inside the preflight worktree before each fallback checkout.
  • Verify the fix by reproducing the issue and checking that the preflight updater can successfully walk back to an older commit without encountering the .bundle.hash conflict.

Example

git rm --cached src/canvas-host/a2ui/.bundle.hash
git commit -m "chore: stop tracking a2ui bundle hash (again)"

Notes

The issue is caused by the .bundle.hash file being tracked in Git again, despite being listed in .gitignore. The scripts/bundle-a2ui.sh script is rewriting the hash file, causing conflicts during the preflight checkout process.

Recommendation

Apply the workaround by re-untracking the .bundle.hash file, as it is the minimal upstream patch and matches the clearly-intended Gitignore state. This fix is also the most straightforward to implement and verify.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - ✅(Solved) Fix openclaw update: tracked src/canvas-host/a2ui/.bundle.hash breaks preflight bisect walkback [1 pull requests, 1 participants]