Skip to content

cmux-tui-core: a new release stamp no longer recompiles cmux-tui-core - #28787

Merged
cmux-bot[bot] merged 4 commits into
feat-cmux-nextfrom
lane/ao-core-distribution-version
Oct 31, 2026
Merged

cmux-bot[bot] merged 4 commits into
feat-cmux-nextfrom
lane/ao-core-distribution-version

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Oct 31, 2026 •

Copy link
Copy Markdown
Collaborator

Follow-up to #28776 (which takes over #22030) and to #21980. A new release stamp no longer recompiles cmux-tui-core.

Why

cmux-tui-core/src/release.rs reads CMUX_TUI_DISTRIBUTION_VERSION with option_env!. rustc records that variable in the crate's dep-info, so Cargo recompiles cmux-tui-core whenever its value changes, and then everything that depends on it. The Linux pool and the package workflows stamp that variable on every build (0.0.0-r2.sha-<stamp> in scripts/ci/macos-cross.sh, the release version in cmux-tui-build-package.yml). #21980 already moved core's other stamps to the binary (install_build_stamp). release.rs landed a day later, on 2026-10-19, with a stamp read of its own, after #21980's and #22030's measurements were taken.

What

  • Core reads release::distribution_version(). It returns the value the binary installs at start, install_distribution_version, called next to install_build_stamp. The filter is the same as before: a 0.0.0-… placeholder is not a release. Until the value is installed (core's own tests), it is the workspace crate version, which is what those tests saw before.
  • The four readers in core (identify, the agent-session proxy, the too-old refusal and its test) call it.
  • The binary keeps the one option_env! read (version_report::DISTRIBUTION_STAMP) and its own DISTRIBUTION_VERSION constant with the same value. Its readers (--version, crash forwarding, the update notice, the skew refusals) are unchanged.

Performance

metric before after delta harness or run link
crates re-checked after a new CMUX_TUI_DISTRIBUTION_VERSION (cargo check -p cmux-tui --lib) 3 (cmux-tui-core, cmux-remote, cmux-tui) 2 (cmux-remote, cmux-tui) -1 crate run 41161867077
wall time of that check, per new stamp (bbb, ccc) 10 s, 10 s 4 s, 4 s -6 s (-60%) same run

Harness: one 32-vCPU Linux job checks the PR head, then the same tree with this PR's diff reverted. Each pass runs cargo check -p cmux-tui --lib with three placeholder stamps in a row. The first stamp of the head pass (46 s) is the cold first check of the tree and is left out. cmux-remote still reads a stamp of its own, so it is still re-checked; that is outside this PR.

Tests

  • cargo test -p cmux-tui-core --lib only_a_release_stamp_is_reported_as_the_release (new): a release stamp is reported as it is, and a placeholder or no stamp reports the workspace version.
  • The existing api_revision_wire_tests compare identify's version with distribution_version(). tests/version_report.rs covers the binary's constant.

Observed / Not run

  • Observed: prepush-gate.py (no new violations) and rustfmt.
  • Observed: in run 41161867077, cargo test -p cmux-tui-core --lib only_a_release_stamp passed (1 passed) at this head, and the re-check counts in the table above.
  • Not run on this VM: cmux-tui-core and cmux-tui don't build here (they need the ghostty submodule). The rest of their suites run in CI on this PR.

Review

Review (Codex gpt-6-astra, high, fast; a different model from the author): SHIP at ee60807

No blockers. Every reader of the old constant is converted, and the value is installed before daemon startup and acpmux dispatch, including the Windows thin-exe path. The value is the same for release, placeholder, empty and absent stamps. No compile-time CMUX_TUI_* read remains in core.

Changelog

none

Agent session: agent session

🤖 Generated with Claude Code

release::DISTRIBUTION_VERSION read CMUX_TUI_DISTRIBUTION_VERSION with option_env!,
and the Linux pool stamps it per build (0.0.0-r2.sha-<stamp>, macos-cross.sh,
cmux-tui-build-package.yml), so every stamp recompiled cmux-tui-core and everything
above it. #21980 moved core's other stamps to the binary (install_build_stamp);
release.rs came a day later with its own.

Core now reads release::distribution_version(): the value the binary installs at
start (install_distribution_version, next to install_build_stamp), the same filter
(a placeholder stamp is not a release), and the workspace crate version until then
(core's tests, which saw the same value before). The binary keeps its own
DISTRIBUTION_VERSION constant and DISTRIBUTION_STAMP, the one option_env! read.

Test: cargo test -p cmux-tui-core --lib only_a_release_stamp_is_reported_as_the_release

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-2f016c499153c1bead46
@teamleaderleo teamleaderleo added the risk:normal Risk tier (docs/ci/risk-tiers.md) label Oct 31, 2026
@github-actions

github-actions Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

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

Review ee60807: 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=pr28787 -f ref=lane/ao-core-distribution-version -f platform=macos -f backend_mode=local

web and size checks: green

Shipped in:

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (Codex gpt-6-astra, high, fast; a different model from the author): SHIP at ee60807

No blockers. Every reader of the old constant is converted, and the value is installed before daemon startup and acpmux dispatch, including the Windows thin-exe path. The value is the same for release, placeholder, empty and absent stamps. No compile-time CMUX_TUI_* read remains in core.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Reds at ee60807, classified before landing:

  • cmux-next checks: its one red is "Tier routing". The same three tests/test_cmux_next_base_tier.py RouteStep tests (test_a_feat_cmux_next_push_defers_the_base_tier, test_a_push_whose_scheme_compile_is_the_dev_landing_build_keeps_it, test_coalescing_off_or_another_branch_runs_the_base_tier_on_the_push) fail the same way on the unrelated cmux-tui: a new build stamp no longer recompiles cmux-remote or acpmux (takes over #22030) #28776. This PR changes no workflow or test script. Base finding.
  • nightly-guards / release-notary: 403/502 from GitHub. Infra.

None is caused by this PR. Review: Codex gpt-6-astra (high, fast), SHIP at this head.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (codex gpt-6.1-sol high fast, router-review): SHIP at e76ada2

No correctness findings.

@cmux-bot
cmux-bot Bot temporarily deployed to ci-routing-agent October 31, 2026 10:05 Inactive
@blacksmith-sh

blacksmith-sh Bot commented Oct 31, 2026

Copy link
Copy Markdown

Found 3 test failures on Blacksmith runners:

Failures

Test View Logs
test_a_picked_signing_label_has_a_rerun_alternative (main.RunsOnFallbackTests.test_
a_picked_signing_label_has_a_rerun_alternative)/
test_a_picked_signing_label_has_a_rerun_alternative (main.RunsOnFallbackTests.test_
a_picked_signing_label_has_a_rerun_alternative)
View Logs
test_every_listed_hook_is_one_glaeda_released_with_the_check (main.SigningHooksInSt
epWithGlaedaTests.test_every_listed_hook_is_one_glaeda_released_with_the_check)/
test_every_listed_hook_is_one_glaeda_released_with_the_check (main.SigningHooksInSt
epWithGlaedaTests.test_every_listed_hook_is_one_glaeda_released_with_the_check)
View Logs
test_no_runs_on_chain_ends_on_the_reserved_side_label (main.RunsOnFallbackTests.tes
t_no_runs_on_chain_ends_on_the_reserved_side_label)/
test_no_runs_on_chain_ends_on_the_reserved_side_label (main.RunsOnFallbackTests.tes
t_no_runs_on_chain_ends_on_the_reserved_side_label)
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

Owned by an agent session · took over from an earlier session · session

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (Codex gpt-6-astra, high, fast; a different model from the author): SHIP at 02c1d2b

Two rounds at this head. The earlier SHIP at e76ada2 didn't carry over: since then the branch only merged feat-cmux-next in, the PR's own diff is byte-identical, and it merges cleanly with today's base without adding any new reader of the removed constant. Round 1 flagged the pre-existing option_env! read in cmux-remote/src/ssh_bootstrap.rs as P1. Round 2 reclassified it as a P2 follow-up: the PR body already puts it out of scope, it has its own unfiltered remote-install semantics, and this diff doesn't touch it. No P0/P1 remains. The value is installed before daemon and client startup, acpmux dispatch, hooks and subcommands, and the Windows DLL entry goes through the same main.

Follow-up (P2): the cmux-remote stamp read still re-checks that crate on every new stamp. Fixing it means passing the raw package stamp into the bootstrap and probe paths while keeping its unfiltered semantics.

@cmux-bot
cmux-bot Bot temporarily deployed to ci-routing-agent October 31, 2026 19:43 Inactive
@cmux-bot
cmux-bot Bot merged commit 2fa0c6d into feat-cmux-next Oct 31, 2026
221 of 222 checks passed
@cmux-bot
cmux-bot Bot deleted the lane/ao-core-distribution-version branch October 31, 2026 20:21
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (codex, router-review): SHIP at 6e511e8

Reviewer: codex gpt-6.1-sol xhigh, fast tier.

SHIP at 6e511e8

Visual verdict: no images; Leo tries the build

No findings. Startup initialization covers the normal and Windows DLL paths; version filtering remains unchanged. Rust tests were not run because the box lacks a Rust toolchain.

Follow-ups: none

This branch was previously deployed

3 inactive deployments
artifacts — 6e511e82 Deployed Oct 31, 2026 by cmux-bot[bot] via add the Windows daemon to the tree #91177
ci-routing-agent — 6e511e82 Deployed Oct 31, 2026 by github-actions[bot] via cmux-next macOS placement #55359
sentry-dsyms — 6e511e82 Deployed Oct 31, 2026 by cmux-bot[bot] via upload cmux-tui dSYMs to Sentry #91177
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