Skip to content

git_seed export: keep the Mac's base record while newer exports replace refs/cmux-back - #31029

Merged
teamleaderleo merged 2 commits into
feat-cmux-nextfrom
seed-back-base
Nov 1, 2026
Merged

teamleaderleo merged 2 commits into
feat-cmux-nextfrom
seed-back-base

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Nov 1, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes #31014, a review follow-up from #30923.

Leo's words, for the Cloud project seed this belongs to:

Your project folder is copied up.
we'll want to deal with the edge cases for this too

The problem

git.seed.export records refs/cmux-back/* before the Mac has merged anything. When the pull then conflicts, the Mac stays on its older base, but on the machine that base was referenced only by the refs/cmux-back/* the export just replaced. That causes three problems:

  • gc could prune the old base's INDEX and WORK commits, which a retried bundle needs as prerequisites;
  • the stash comparison no longer found the old base's record;
  • a delta seed from the old base no longer matched any record.

The fix

When an export replaces the back record the Mac is on (its since), that record moves to refs/cmux-base/*. The machine keeps only the Mac's base and the newest export:

  • a since that is already refs/cmux-base leaves it alone;
  • a since that is the seed itself clears refs/cmux-base.

git.seed.export's stash comparison and git.seed.start's delta check both now accept refs/cmux-back, refs/cmux-base and refs/cmux-seed, newest first. The bundle's refs, and so the Mac side, are unchanged.

Tests

a_retry_after_a_conflict_still_has_the_macs_base:

  1. Merge one export, then make two exports the Mac could not merge.
  2. refs/cmux-base/work is still the Mac's base.
  3. Run reflog expire and gc --prune=now; the base's commits are still there.
  4. An export from the base, with the files back as they were, is unchanged against that record.

On cmux-ci: git_seed 38 passed, cargo fmt is clean and clippy reports nothing in git_seed.

Risk: small and limited to the machine-side record refs. Nothing on the wire changes.

Agent session: agent session

🤖 Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.


Summary by cubic

Fixes #31014: git.seed.export now keeps the Mac's base record (refs/cmux-base/*) when a newer export replaces the refs/cmux-back record that a conflicted Mac is still on, so gc no longer prunes that base's commits and retries still find it.

Bug Fixes

  • When an export replaces the back record the Mac hasn't merged, that record moves to refs/cmux-base/*; only the Mac's base and the newest export are kept.
  • The stash comparison and delta seed now accept refs/cmux-back, refs/cmux-base, and refs/cmux-seed.
  • Nothing on the wire changes; the bundle's refs are unaffected.

Written for commit 9c78869. Summary will update on new commits.

View guided diff Turn on auto-fix

teamleaderleo and others added 2 commits November 1, 2026 06:23
…ce refs/cmux-back

An export records refs/cmux-back before the Mac has merged it; after a
conflict the Mac stays on its older base, which nothing referenced any more
(gc could drop its INDEX and WORK) and which the stash comparison and a
delta seed no longer found. The record the Mac is on moves to
refs/cmux-base/* when an export replaces it; only that base and the newest
export are kept. Fixes #31014.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Owned by an agent session · session

@github-actions

github-actions Bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

cmux status (one comment, edited in place; each line is updated by the job that owns it)

Review 9c78869: HQ feed card · gallery before/after runs · checks

App of this head (app.zip, kept 1 day)

gh workflow run reload-build.yml -R manaflow-ai/cmux --ref feat-cmux-next -f tag=pr31029 -f ref=seed-back-base -f platform=macos -f backend_mode=local

red: cmux-next checks (god files, concurrency, crash safety, l10n); NEW: red check: Script tests (pin-cmux-tui, embed-cef, ensure-cef store) (+1 more) is not red on the base 941531c; do not merge until green; see lane-rules

Shipped in:

@blacksmith-sh

blacksmith-sh Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

Found 7 test failures on Blacksmith runners:

Failures

Test View Logs
/tmp/tmpcj9v4bgf/summary-fail.json (live):/summary-fail.json (live): View Logs
/tmp/tmpob88p9hl/summary-missing.json (live):/summary-missing.json (live): View Logs
[new_workspaces] debug.new_workspace timed 0 of 50 new workspace rows/
[new_workspaces] debug.new_workspace timed 0 of 50 new workspace rows
View Logs
[new_workspaces] the window draws no frames/[new_workspaces] the window draws no frames View Logs
[tabs] debug.tab_switch timed 0 of 40 switches/
[tabs] debug.tab_switch timed 0 of 40 switches
View Logs
[tabs] the window draws no frames/[tabs] the window draws no frames View Logs
test_the_repository_highlights_validate (main.DigestTests.test_the_repository_highl
ights_validate)/
test_the_repository_highlights_validate (main.DigestTests.test_the_repository_highl
ights_validate)
View Logs

Fix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (codex, router-review): SHIP at 9c78869

Reviewer: codex gpt-6-astra high, fast tier.

SHIP at 9c78869

Visual verdict: no images; Leo tries the build

No correctness findings.

Follow-ups: none

@teamleaderleo
teamleaderleo merged commit 593b25f into feat-cmux-next Nov 1, 2026
164 of 180 checks passed
@teamleaderleo
teamleaderleo deleted the seed-back-base branch November 1, 2026 14:52

This branch was previously deployed

3 inactive deployments
artifacts — 9c788696 Deployed Nov 1, 2026 by teamleaderleo via add the Windows daemon to the tree #96581
sentry-dsyms — 9c788696 Deployed Nov 1, 2026 by teamleaderleo via upload cmux-tui dSYMs to Sentry #96581
ci-routing-agent — 9c788696 Deployed Nov 1, 2026 by teamleaderleo via cmux-tui tree preflight #96581
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk:normal Risk tier (docs/ci/risk-tiers.md)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant