Skip to content

Hook: cost a root's kept build with the model's kept-start cell - #1304

Merged
teamleaderleo merged 1 commit into
mainfrom
hook/warm-kept-cell
Sep 27, 2026
Merged

teamleaderleo merged 1 commit into
mainfrom
hook/warm-kept-cell

Conversation

@teamleaderleo

Copy link
Copy Markdown
Owner

cmux's warm-distance model now keeps the p50 compile per tier and start kind (tiers_by_start, with counts; manaflow-ai/cmux ci/warm-model-selfcal, PR linked below). Every root this hook compares starts from its kept build, and kept starts compile faster than the tier's mix of kept and seed starts. Over 243 owned admissions:

tier tier p50 kept p50 (n) seed p50 (n)
near 105 s 91 s (44) 157 s (54)
far 206 s 121 s (10) 247 s (12)
rebuild 373 s 355 s (76) 442 s (47)
  • read_warm_model adds kept, the seconds per tier from tiers_by_start[tier]["kept"]. A cell counts only once it has ≥5 compiles (WARM_MIN_START_ROWS, the same rule as cmux's predict()) and a positive finite non-bool p50. A sparse or bad cell is skipped on its own, so it does not discard the whole model. A model without tiers_by_start, and the default model, have kept: {} and cost the tier exactly as before.
  • warm_root_costs costs a stamped root at kept.get(tier, tiers[tier]). The unknown and cold costs are unchanged.
  • Parity test in test_warm_root_costs_rank_roots_by_predicted_compile, mirroring cmux's test_predict_uses_a_cell_from_five_rows_and_the_tier_below:
    • a 5-row kept cell is used, and a 4-row one falls back to the tier;
    • p50 of -1, a bool, missing, a string n, a list or null all fall back to the tier, for that tier only;
    • a model with no tiers_by_start falls back to the tier.

python3 scripts/test-glaeda-cmux-runner.py -k warm passes.

Backward compatible in both directions: this hook with an old model, and an old hook with the new model, which only adds a key.

🤖 Generated with Claude Code

cmux's warm-distance model now keeps the p50 compile per tier and start kind
(tiers_by_start, with counts; cmux ci/warm-model-selfcal). Every root the hook
compares starts from its kept build, and a kept start compiles faster than
the tier's mix of kept and seed starts (near: about 91 s against 105 s for the
tier and 157 s from a seed). read_warm_model reads each tier's kept cell once
it has 5 compiles, as cmux's predict() does; a sparse or bad cell, or a model
without tiers_by_start, costs the tier as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@teamleaderleo
teamleaderleo merged commit 2de60f3 into main Sep 27, 2026
13 checks passed
@teamleaderleo
teamleaderleo deleted the hook/warm-kept-cell branch September 27, 2026 11:14
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