Skip to content

seed prefetch: keep the seed adopt would pick, of any seeded width - #14944

Merged
teamleaderleo merged 1 commit into
manaflow-ai:mainfrom
teamleaderleo:seed-prefetch-width-fallback
Sep 27, 2026
Merged

teamleaderleo merged 1 commit into
manaflow-ai:mainfrom
teamleaderleo:seed-prefetch-width-fallback

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Sep 27, 2026 •

Copy link
Copy Markdown
Collaborator

Problem. seed_derived_data.py prefetch only looked for seeds of the Mac's own swift-driver width (scoped(prefix)). locate, which start and adopt use, falls back to SEEDED_JOB_WIDTHS (12, 6, 14). The two 10-core light minis (cmux-austin-mini-0/1) have no seeds of width 10, so glaeda-seed-prefetch fetched nothing there. Every run in ~/Library/Logs/glaeda-seed-prefetch.jsonl on austin-0 today says no seed of this width in REVISION's history. Meanwhile their jobs adopt j12 seeds: ci/seeds on austin-0 holds five j12 seeds and nothing else, the newest from 2026-09-25. Every job there downloads its seed instead of cloning a kept one.

Fix. A new nearest_of_any_width(prefix, revisions) holds the fallback loop from locate, and both locate and prefetch call it. prefetch now keeps the same key that adopt later clones: its own width when there is one, however far, and otherwise the first seeded width that has one. The no-seed reason is now no seed of any seeded width in REVISION's history. glaeda-seed-prefetch passes that string through and does not match on it.

Tests. tests/test_seed_derived_data.py covers a 10-core Mac that fetches j12 over j14 and j6, returns the same key locate gives, and switches to a j10 seed once one exists. The other 60 tests pass locally.

The other choice was to publish seeds at width 10. No trusted seeder has 10 cores, and a wrong-width seed still beats a cold build, which is what locate already assumes.

🤖 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 seed prefetch on 10-core machines so it fetches the same seed that adopt later clones, instead of only seeds of the Mac's own width.

  • Adds nearest_of_any_width(), shared by locate and prefetch, which falls back to SEEDED_JOB_WIDTHS (12, 6, 14) when no seed of the Mac's own width exists.
  • prefetch now picks its own width's nearest seed if one exists, however far, and otherwise the first seeded width that has one.
  • Changes the no-seed reason string to no seed of any seeded width in REVISION's history.
  • Adds a test covering the 10-core case: fetches j12 over j6 and j14, returns the same key locate gives, and switches to a j10 seed once one exists.

Written for commit 1450c6f. Summary will update on new commits.

Review in cubic

Summary by CodeRabbit

  • Bug Fixes
    • CI seed prefetch now falls back to the nearest available seed from another configured Swift job width when no seed exists for the current width. When an exact-width seed is available, it remains preferred.
    • The no-seed message now reflects whether any configured width has a seed, rather than checking only the current width.

`prefetch` looked only for seeds of the Mac's own swift-driver width, while
`locate` (what `start` and `adopt` restore) falls back to SEEDED_JOB_WIDTHS.
The 10-core light minis (cmux-austin-mini-0/1) have no seed of width 10,
so glaeda-seed-prefetch fetched nothing there ("no seed of this width in
REVISION's history" on every run) and their jobs downloaded a j12 seed
each time. Both now share nearest_of_any_width, so prefetch keeps the same
key adopt then clones.

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

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

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

Review profile: ASSERTIVE

Plan: Advanced

Run ID: d010ecec-caa3-4c81-b117-6c98aff2adda

📥 Commits

Reviewing files that changed from the base of the PR and between 75caaa5 and 1450c6f.

📒 Files selected for processing (2)
  • scripts/ci/seed_derived_data.py
  • tests/test_seed_derived_data.py

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

Seed lookup now checks the current Swift-job width before other configured seeded widths. prefetch uses the same selection rule as locate. Tests cover fallback-width selection, current-width selection, and the updated no-seed message.

Changes

Seed width selection

Layer / File(s) Summary
Shared seed lookup
scripts/ci/seed_derived_data.py
locate delegates seed selection to a helper that checks the current width first, then other configured seeded widths. It retains the current-width revision key fallback when no seed matches.
Prefetch selection and validation
scripts/ci/seed_derived_data.py, tests/test_seed_derived_data.py
prefetch uses the same width selection rule and updates its no-seed message. Tests cover fallback-width selection when no current-width seed exists, selection of a current-width seed when available, and the updated miss message.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to 1450c

The seed-selection change has no identified issue requiring resolution before merge.

Security Architecture Review

Security architecture risk: 🔵 Low · up to 1450c

Prefetch now downloads the seed that adoption would already choose. The review found no new public access path or verified security weakness, but could not fully verify the surrounding cache and deployment controls.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The newly populated entries are fallback-width seeds that locate already selects for adoption. The visible change increases local prefetch coverage, not the configured seed namespace or production entrypoints.

Trust Boundaries and Controls

  • observed — The recorded source supplies the prefix and optional environment defaults for the existing restore subprocess. Prefetch checks the prefix namespace and requires a manifest before placing a fetched seed in the local cache; the available evidence does not establish remote authorization or content-integrity guarantees.

Resilience and Maintainability Implications

  • inferred — The existing staging and cleanup sequence limits incomplete-download exposure. The supplied tests and source evidence do not establish behavior for concurrent prefetch calls within one process.
🚥 Pre-merge checks | ✅ 24 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 55.56% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 9 functions across 2 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (24 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: making seed prefetch retain the seed selected by adopt across seeded widths.
Description check ✅ Passed The description explains the problem, resulting behavior, implementation, alternative considered, and test coverage. It omits the template checklist and demo-video section, but those omissions are non…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Cmux Cloud Persistent Session And Early Input ✅ Passed PASS. The pull request changes only seed-width selection and related tests in scripts/ci/seed_derived_data.py and tests/test_seed_derived_data.py. The authoritative patch introduces no Cloud termi…
Cmux Swift Actor Isolation ✅ Passed PASS: The review range changes only scripts/ci/seed_derived_data.py and tests/test_seed_derived_data.py. No production Swift files change, so the Swift actor-isolation check is not applicable.
Cmux Swift Blocking Runtime ✅ Passed The pull request changes only scripts/ci/seed_derived_data.py and its Python tests. It introduces no production Swift changes, so the Swift blocking-runtime check is not applicable.
Cmux Browser Automation Off-Main ✅ Passed PASS: The authoritative PR diff changes only scripts/ci/seed_derived_data.py and tests/test_seed_derived_data.py. It adds seed-width selection and tests, with no browser.* commands or changes to…
Cmux Expensive Synchronous Load ✅ Passed PASS: The pull request changes only scripts/ci/seed_derived_data.py and tests/test_seed_derived_data.py. The review-scoped diff contains no Swift files and adds no production Swift synchronous loa…
Cmux Cache Substitution Correctness ✅ Passed PASS: The pull request changes only scripts/ci/seed_derived_data.py and tests/test_seed_derived_data.py. These are Python files, not production Swift, TypeScript, or JavaScript changes. Therefore …
Cmux No Hacky Sleeps ✅ Passed PASS. The production change only adds seed-width selection and updates the no-seed message. The added lines contain no sleep, timer, polling, retry delay, or wall-clock synchronization. Existing `time…
Cmux Algorithmic Complexity ✅ Passed The change does not violate the algorithmic-complexity rule. nearest_of_any_width scans a bounded revision list for at most four fixed widths: the local width plus SEEDED_JOB_WIDTHS = (12, 6, 14).…
Cmux Swift Concurrency ✅ Passed PASS. The pull request changes only scripts/ci/seed_derived_data.py and tests/test_seed_derived_data.py, both Python files. The diff contains no cmux-owned Swift code and introduces none of the Sw…
Cmux Swift @Concurrent ✅ Passed PASS: The review-scoped diff changes only scripts/ci/seed_derived_data.py and tests/test_seed_derived_data.py. It adds no Swift files, Swift declarations, nonisolated async work, @concurrent a…
Cmux Swift Package Boundaries ✅ Passed The pull request changes only scripts/ci/seed_derived_data.py and tests/test_seed_derived_data.py. It introduces no production Swift code, app-target feature logic, or SwiftPM package changes. The…
Cmux Swiftpm Lockfiles ✅ Passed PASS. The PR changes only scripts/ci/seed_derived_data.py and tests/test_seed_derived_data.py. The diff contains no SwiftPM package, Xcode project, .gitignore, workflow, dependency, or `Package.…
Cmux Swift Logging ✅ Passed The pull request changes only scripts/ci/seed_derived_data.py and tests/test_seed_derived_data.py. It adds no production Swift code and adds or materially changes no logging statements. The existi…
Cmux User-Facing Error Privacy ✅ Passed The diff changes only scripts/ci/seed_derived_data.py and its tests. The changed output is an internal CI prefetch result, and the repository shows no path to a cmux app UI, product CLI, or product …
Cmux Full Internationalization ✅ Passed The PR changes only scripts/ci/seed_derived_data.py and its tests. The changed text is CI seed-prefetch status output and developer comments, not Swift UI, web UI, API copy, rendered markdown, or lo…
Cmux Swiftui State Layout ✅ Passed PASS: The pull request changes only scripts/ci/seed_derived_data.py and tests/test_seed_derived_data.py. Both files are Python. The diff contains no Swift files or SwiftUI state/layout changes, so…
Cmux Architecture Rethink ✅ Passed PASS: The PR changes only two Python files: scripts/ci/seed_derived_data.py and its Python tests. The diff contains no Swift, AppKit, or SwiftUI changes and introduces none of the architectural anti…
Cmux Swift Auxiliary Window Close Shortcuts ✅ Passed The pull request changes only scripts/ci/seed_derived_data.py and tests/test_seed_derived_data.py. The authoritative diff contains no Swift, NSWindow, NSPanel, SwiftUI Window, or WindowGroup chang…
Cmux Source Artifacts ✅ Passed The PR changes only scripts/ci/seed_derived_data.py and tests/test_seed_derived_data.py. The diff contains hand-written seed-selection code and durable test coverage. It adds no artifact directori…
Cmux No Test Or Debug Seam In Production Source ✅ Passed PASS: The pull request changes only scripts/ci/seed_derived_data.py and tests/test_seed_derived_data.py. It changes no Swift file under a production Sources/ path, so it cannot introduce a test …
  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR

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
teamleaderleo merged commit 14a6909 into manaflow-ai:main Sep 27, 2026
55 of 56 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

Merge receipt for 1450c6fe7b: every check was green at merge (15 verified; 15 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
f5c179f iOS: fix the test failures that keep iOS CI red on main (manaflow-ai#14803)
8685bf5 Hold update relaunch while agents are mid-turn (manaflow-ai#14969)
dc90332 Keep CLI socket-discovery tests off the host's real cmux (manaflow-ai#14919)
dd3c91b docs: shorten root agent instructions and link existing procedures (manaflow-ai#14998)
8c744df Rename edits inline or in the palette, never in an alert (manaflow-ai#14986)
9ae4383 Calmer chrome motion: appear instantly, fade out only, no overshoot (manaflow-ai#14984)
6510f56 Write opencode config JSON without escaping slashes (cmux 7140) (manaflow-ai#14805)
ab5e7da ci: stop catch-up merges from failing the CLA check (manaflow-ai#14913)
52c8f41 Add cmux session move for Claude sessions (manaflow-ai#14959)
36785b1 Hide decorative Settings sidebar icons from VoiceOver (manaflow-ai#14989)
4c7158c Label the sound preview button and fix mistranslated action verbs (manaflow-ai#14983)
e704a77 Bound untracked paths stored in last-turn diff baselines (manaflow-ai#14980)
f073df1 Fix remote Files sidebar for names that change under NFD (manaflow-ai#14978)
5c68499 Bump bonsplit: mouse wheel scrolls the overflowed tab strip (manaflow-ai#14985)
9466dcb Keep agent resume bindings through the update-relaunch save (manaflow-ai#14971)
ef8b037 docs: take release notes from a Changelog section in each PR instead of CHANGELOG.md edits (manaflow-ai#14934)
6eddfd7 ci: skip the delta diff when main moved further than the pull request (manaflow-ai#14987)
fefcec7 ci: attribute red PR runs to the machine or the code, re-run machine failures once (manaflow-ai#14977)
c185deb Accept file drops on remote tmux mirror panes (manaflow-ai#14981)
90773c7 test: make CmuxSidebarGit probe waits event-driven (manaflow-ai#14973)
1f2dbfe ci: skip the scheduled Blacksmith cache warmers while owned pools serve PRs (manaflow-ai#14827)
2850651 docs: add a guide to customizing cmux's look (manaflow-ai#14850)
b66e365 Resolve a separate sidebar's content against its own backdrop (manaflow-ai#14841)
88a9360 UI tests: one labelled frame per action, built in CI; scripts/ui-test (manaflow-ai#14966)
20cfa78 fix(omo): resolve relative file refs in the shadow config without double-loading OpenCode config (manaflow-ai#14935)
f0e964c ci: make the aggregate app-host product the default, layers opt-in (manaflow-ai#14975)
52dce98 ci: run and register the machine-failure test (manaflow-ai#14972)
7bf48bc ci: route compile admission by kept-build distance across minis (manaflow-ai#14949)
44fa3f5 Offer cmux in Open With for Markdown, source, and text files (manaflow-ai#14968)
45c2d66 Replay the Claude session id of agents in cmux ssh (cmux-tui) panes (manaflow-ai#14906)
b4c1b31 Label icon-only chrome buttons and localize project panel text (manaflow-ai#14926)
14a6909 seed prefetch: keep the seed adopt would pick, of any seeded width (manaflow-ai#14944)
19e73d2 ci: self-calibrating warm-distance compile estimates (manaflow-ai#14932)
fa98d86 ci: redispatch focused runs the Mac failed before any test started (manaflow-ai#14963)
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