ci: wire the test-wiring sync guard and register the last two unlisted tests
main is red on guards / workflow-guard-tests / preflight again. The "test exists but has no execution registry entry" check is unconditional, so a single unregistered file fails every pull request regardless of what it touched.
Two files this time, and they are different problems wearing the same error.
tests/test_sync_test_wiring.py had no execution path at all. It arrived with #13216 and covers scripts/sync-test-wiring, scripts/lint-pbxproj-test-wiring.sh and scripts/normalize-pbxproj.py. Its sibling guard tests/test_ci_pbxproj_test_wiring.sh already runs in ci.yml's static-preflight job, so it joins the step directly below that one, on the same Linux runner. It passes (unittest, OK) and needs only stdlib plus in-repo fixtures.
tests/test_cmux_settings_jsonc.py was already being run — by cmux-skill-contract.yml's browser-skill job, which is Linux. It needed only the entry.
Both take linux-guard. Resolved by parsing every workflow's jobs, matching the test path in each job body, and reading that job's runs-on — not by guessing from the filename.
Python test execution registry valid: 223 tests
(legacy=61, linux-guard=101, macos-cli-no-socket=48,
macos-cli-no-socket-post-fish=11, macos-shell=1, macos-shell-fish=1)
Entries go into the manifest's alphabetically sorted tail. The sorted region is now located by scanning for it rather than by a fixed index, which had silently gone stale as the manifest grew and was putting entries in the wrong section.
This is the fourth repair today
#13710 added nine missing entries. #13731 added one that appeared after it merged. This adds two more that appeared after that. Four repairs in about an hour, each one correct and each one obsolete within minutes.
The asymmetry is structural, not anybody's carelessness:
- the rule that a newly added test may not enter the
legacylane needs--base-sha, so it only evaluates on a pull request; - the rule that a test is registered at all evaluates everywhere, and reddens
mainthe moment an unregistered test lands — blocking everyone else.
So the cheapest mistake to make is the one with the widest blast radius, and it lands on people who did not make it.
Worth considering, and deliberately not done here because unbreaking main should not wait on a design change: a linux-guard entry is now valid exactly when some workflow runs the test, which makes it derivable rather than something to assert alongside the workflow. A --write mode that fills in the unambiguous cases — test referenced by at least one job, every referencing job Linux — would close this loop entirely, and refuse the genuinely ambiguous ones so they still get a human. The resolution logic in this pull request is already that analysis, run by hand.
🤖 Generated with Claude Code
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.
Summary by cubic
Fixes the red main preflight guard in workflow-guard-tests by registering the two last unregistered tests.
- Wires
tests/test_sync_test_wiring.pyintoci.yml'sstatic-preflightjob, where its sibling guard already runs on Linux. - Adds
tests/test_cmux_settings_jsonc.pyto thelinux-guardlane; it was already executed by thebrowser-skilljob. - Locates the manifest's sorted tail by scanning for it instead of a fixed index that had gone stale, so entries land in the correct section.