Skip to content

ci: the picker fetches kept bases' trees, not just checks their commits - #15053

Merged
teamleaderleo merged 1 commit into
mainfrom
ci/picker-have-tree
Sep 27, 2026
Merged

teamleaderleo merged 1 commit into
mainfrom
ci/picker-have-tree

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Sep 27, 2026 •

Copy link
Copy Markdown
Collaborator

Why

Even after #15040, 77 of 240 distance-picker candidates from 18:16-18:45Z were unknown. The recorded fetch reports show a pattern: bases compared = bases fetched + 1. On #15003's run, 2 of 15 compared with missing: 0, so nothing was fetched. The bases the picker didn't fetch never diffed.

Cause: the changes job's delta_since_green.py fetches main's history with --filter=tree:0. Most kept merge bases are recent main commits, so they are already in the checkout as commits without trees. fetch_bases() checked only have_commit and skipped them, git diff then failed (no lazy fetch), and every such root cost the unknown start.

Change

  • have_tree() checks the commit's root tree.
  • fetch_bases() uses have_tree() and fetches with --refetch, so the server sends the trees of commits the checkout already holds. It's still depth 1 and blobless.

Check

I replayed it on a fresh depth-2 checkout of #15013's merge commit, plus the same tree:0 --deepen history, against the 17:29Z janitor snapshot:

  • before: 1 of 19 bases diffable
  • after: 19 of 19, with a 0.8 s fetch

Tests: test_a_commit_without_its_tree_counts_as_missing, and the fetch test now asserts --refetch. Targeted -k runs pass locally.

🤖 Generated with Claude Code


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


Summary by cubic

Fixes the distance picker marking candidates as unknown when kept merge bases are already present as commits without trees (from --filter=tree:0 fetches). The picker now checks for the commit's root tree and fetches with --refetch, so the server sends the missing trees and all kept bases can be diffed.

Written for commit 8a3f017. Summary will update on new commits.

Review in cubic

The changes job's delta_since_green.py fetches main's history with
--filter=tree:0, so most kept merge bases were already present as commits
without trees. fetch_bases() skipped them (have_commit), their diffs
failed, and the roots cost the unknown start: after #15040, 77 of 240
picker candidates were still unknown, e.g. #15003 compared 2 of 15 bases
with nothing fetched. It now checks the tree (have_tree) and fetches with
--refetch, which sends the trees of commits the checkout already has.
Replayed on a depth-2 checkout plus the tree:0 history: 1 of 19 bases
diffable before, 19 of 19 after, in 0.8 s.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@coderabbitai

coderabbitai Bot commented Sep 27, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 2 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 10 included reviews currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Repository: manaflow-ai/cmux/.coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 6261da6a-625b-4059-9e85-c65a3a287284

📥 Commits

Reviewing files that changed from the base of the PR and between 2570eed and 8a3f017.

📒 Files selected for processing (2)
  • scripts/ci/warm_distance.py
  • tests/test_ci_warm_distance.py

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review note: --refetch --depth=1 on a base whose bare commit is already present adds that base to .git/shallow, which cuts the history behind it. The picker runs after delta_since_green.py, and the later steps in the changes job read only HEAD and HEAD^1 (the job's own base is excluded from the refetch), so nothing reads that history today. A future history walk placed after the picker in that job would have to deepen first.

@teamleaderleo
teamleaderleo merged commit b762a3d into main Sep 27, 2026
54 of 55 checks passed
@teamleaderleo
teamleaderleo deleted the ci/picker-have-tree branch September 27, 2026 18:52
@github-actions

Copy link
Copy Markdown
Contributor

Merge receipt for 8a3f01701f: every check was green at merge (13 verified; 18 skipped by policy). Full suite runs on main after merge.

rustybret pushed a commit to rustybret/bmux that referenced this pull request Sep 27, 2026
a64d59b tools: ui-lab renders view code in seconds; wire-app-sources.py (manaflow-ai#15049)
4e03ed2 fix(events): harden durable replay recovery (manaflow-ai#15054)
ac51546 Settings: native terminal theme gallery (manaflow-ai#14996)
867e7a0 Add native Ghostty option rows to Settings > Terminal (manaflow-ai#15005)
7f97b0d ui-tests: wait for static preflight when a reused compile skips the gate (manaflow-ai#15051)
c708e0c Add a chat view for the terminal's agent session (Claude Code, Codex) (manaflow-ai#14965)
b762a3d ci: the picker fetches kept bases' trees, not just checks their commits (manaflow-ai#15053)
2570eed docs: refresh and trim contributor build guidance (manaflow-ai#15050)
20019d3 ci: re-run by cause: host faults to Blacksmith, code failures back to the minis (manaflow-ai#15045)
36ee3e9 Add Warn Before Closing Workspace setting (manaflow-ai#14979)
4df2317 CI: run changed UI test classes in PRs, keep UI runs off Blacksmith, probe the GUI session (manaflow-ai#14964)
9efe05e Owned-pool sweeper: page the marker listing back to the runs it adopts (manaflow-ai#15033)
6361554 fix(events): restore durable replay across restarts (manaflow-ai#15030)
0bc5145 ci: place side lanes on the light minis one per idle side runner (manaflow-ai#15047)
9d4e92b ci: the E2E rule's queue-round reason names the owned pools the run may take (manaflow-ai#15044)
9e6e216 Dogfood the app from CI with JSON tours (manaflow-ai#14928)
fd3dcf6 ci: retry the picker's kept-base fetch and record how it went (manaflow-ai#15040)
3a64e0e Reload the Ghostty config when its files change, and show config errors (manaflow-ai#14859)
f412b05 test: hit-test the browser portal tab strip with its own click (manaflow-ai#15031)
64d5235 test: route the reopen-last-closed shortcut through the test's own window (manaflow-ai#15036)
7037079 ci: take the gui token in the E2E test job's step, not at job start (manaflow-ai#15037)

# Conflicts:
#	.github/workflows/ci-macos.yml
#	.github/workflows/ci.yml
#	.github/workflows/remote-daemon.yml
#	.github/workflows/test-e2e.yml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant