ci(cmux-next): the DEV Release product receipt records the resolved Swift mode

TE
8d ago
+94-3

Why

From the DEV whole-module lane (#26999): "The DEV compile reuse key prints swift_mode=auto, so auto-singlefile and auto-wholemodule share one key. Reuse stays correct, but reporting can't tell the two apart. Have the key or receipt record the resolved mode (singlefile or wholemodule) alongside auto."

What changes

Reporting only. The reuse key, the lookup and the product don't change: either resolved mode is a correct product of the same inputs, and splitting the key would only cost reuse hits.

  • dev_release_product_reuse.py record accepts --swift-mode (what compile-dev-release.sh resolved) and --swift-mode-requested (the key's value, usually auto). It writes both into the record's manifest.json as swift_mode and swift_mode_requested. An unknown value is left out with a warning; it never fails the record.
  • lookup outputs swift_mode and swift_mode_requested from the source record (empty for records written before this change). On a hit, the step summary names them, for example "swift_mode auto -> wholemodule".
  • Both record steps in cmux-next.yml (the DEV daily and push compile, and the landing compile) pass the reused source's resolved mode on a hit and the compile step's swift_mode output otherwise. A reuse therefore keeps reporting the mode the bytes were actually compiled with.

The nightly lane shares the module but its workflow doesn't record a Swift mode, so it's unchanged; its tests pass.

Risk

Low. These are optional manifest fields and summary text. The record steps are continue-on-error already, and the new flags can't fail them.

Tests

  • tests/test_dev_release_product_reuse.py: 15 passed, including new tests. The record keeps the resolved and requested modes and leaves the key alone. An unknown value is dropped without failing. A hit carries its source's mode into outputs and the summary, and an old record reads as empty. Both record steps pass the resolved mode.
  • tests/test_nightly_release_product_reuse.py (18) and tests/test_ci_release_product_reuse.py pass.
  • Every test file that reads cmux-next.yml was run (40). The only failures (test_ci_fork_runner_routing, 1 test; test_cmux_next_base_autofix_finishes, 9 tests) fail with the same tests on base.

Changelog

none

🤖 Generated with Claude Code

Agent session: agent session


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


Summary by cubic

DEV Release product receipts now record the resolved Swift mode (singlefile or wholemodule) alongside the requested one (usually auto), so reports can tell auto-singlefile and auto-wholemodule compiles apart even though they share a reuse key.

  • Reporting only: the reuse key, lookup, and product are unchanged, so reuse hits are unaffected.
  • record accepts --swift-mode and --swift-mode-requested and writes both to manifest.json; unknown values are dropped with a warning and never fail the record.
  • lookup outputs both fields (empty for records written before this change), and the step summary names them on a hit, e.g. "swift_mode auto -> wholemodule".
  • On a reuse, the source's resolved mode is carried forward instead of the compile step's.