Skip to content

canary: probe what an incremental admission rebuild recompiles (do not merge) - #14235

Closed
teamleaderleo wants to merge 7 commits into
mainfrom
canary/incremental-rebuild-probe
Closed

teamleaderleo wants to merge 7 commits into
mainfrom
canary/incremental-rebuild-probe

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Sep 24, 2026 •

Copy link
Copy Markdown
Collaborator

Measurement canary. Do not merge; I'll close it once the admission job reports.

Why

In all 35 PR compile admissions since 11:00Z on 2026-09-24 that built tests, cmuxTests recompiled all ~1,091 of its files. That includes the runs where the app target cmux recompiled exactly one file, GeneratedAssetSymbols.swift, for example test-only PRs adopting a seed 1 to 3 commits back. On a 12vcpu runner that is about 2.5 min of a ~4.5 min compile, and more on 6vcpu. Main's own admissions (36006890597, 36002620252) show the same.

Two questions the logs cannot answer:

  1. Why does GenerateAssetSymbols rerun on a seeded build? The seed replays file mtimes (e2e_warm_derived_data.replay) but not directory mtimes, and Assets.xcassets is a folder input.
  2. Does re-emitting the cmux_DEV module (even with an unchanged interface) force a full cmuxTests rebuild?

What it does

After the normal admission compile, it rebuilds cmux-unit four times and records the recompiled files per target in the step summary:

  • null rebuild
  • mtime-only touch of one cmuxTests file
  • mtime-only touch of the Assets.xcassets directory
  • mtime-only touch of one app source file

🤖 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

Adds a CI canary to probe why cmuxTests recompiles all ~1,091 files on incremental admission rebuilds even when the app target rebuilds a single file.

  • After the normal admission compile, rebuilds cmux-unit four times — null, mtime-only touch of a test file, of Assets.xcassets, and of an app source file — and records recompiled file counts per target in the step summary.
  • Times xcodebuild -resolvePackageDependencies with a warm manifest cache, no cache, and after a fresh cache rebuild to investigate the ~45 s package graph resolution.
  • Probe logging runs with set +e so a failed build or empty grep does not abort the remaining probes.
  • CMUX_CI_BUILD_SCHEMES now overrides the hardcoded scheme list in compile-app-host-test-product.sh.
  • Do not merge; the PR will be closed once the admission job reports.

Written for commit d1565cd. Summary will update on new commits.

Review in cubic

…t merge)

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

coderabbitai Bot commented Sep 24, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

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.

1 similar comment
@coderabbitai

coderabbitai Bot commented Sep 24, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

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.

@github-actions

Copy link
Copy Markdown
Contributor

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

teamleaderleo and others added 2 commits September 24, 2026 10:41
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
teamleaderleo and others added 3 commits September 24, 2026 11:39
teamleaderleo added a commit that referenced this pull request Sep 24, 2026
* test: seed adoption must restore unchanged directories' times

A folder input such as Assets.xcassets is signed by its directories' times,
and replay restores file times only. Fails on this commit: directories keep
the checkout time.

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

* ci: replay directory times when adopting a DerivedData seed

The seed replays each unchanged file's recorded time, but directories keep
the checkout time. Xcode signs a folder input by every time inside it, so
Assets.xcassets looks changed on every seeded admission: the asset catalog
reruns, GeneratedAssetSymbols.swift regenerates, and all of cmuxTests
recompiles. Canary #14235 on a 6vcpu runner: touching only the
Assets.xcassets directory costs a 241 s rebuild, an app source edit 50 s.

record now also keeps each directory's time beside a digest of its entry
names, and replay restores it only where the names match. Seeds recorded
before this carry no directory keys and behave as before.

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

* ci: count seed directories apart from inputs, and test a same-count rename

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…er-measurement

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

Copy link
Copy Markdown
Collaborator Author

Measurement done; closing as planned. Its probes found the directory-mtime trigger (fixed in #14241), and the XCBuild trace from run 36022099083 led to #14262. Remaining cmuxTests rebuild work continues in #14269.

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