test(git_seed): the registry-token secret test runs on APFS (macOS base red)
Summary
Base red on macOS: cmux-tui-core git_seed::secrets::tests::registry_files_with_tokens_are_secrets panics on every macOS run before it checks anything. Its fixture makes a folder named b"bad-\xff" to prove that a path that is not UTF-8 is read by its raw bytes. APFS refuses a name that is not UTF-8 (EILSEQ, os error 92, "Illegal byte sequence").
The fix is test-only. It keeps the test's intent, a secret file found by its content:
- A subfolder case with a valid name runs on every filesystem:
pkg/.npmrcwith a token,pkg/.pypircwithout, and the root.pypircrewritten with a password. Reading the wrong file gives a different answer. - Each
.npmrccase now expects the exact reason "package registry credentials file with a token", so an unreadable or lossy-path read (which gets "could not be read") fails. - The non-UTF-8 case runs where the filesystem takes raw bytes. It is skipped only on macOS and only for
EILSEQ, because no APFS seed can hold such a name. Every other error still fails. The Linux runs of the cmux-tui tests (scripts/ci/cmux-tui-rust-check.sh test --os linux, cmux-tui.ymltest (linux)) still run that case.
No product code changes.
Testing
Command (fleet): cmux-ci run --class isolated --os macos --script scripts/ci/cmux-tui-rust-check.sh --ref SHA --arg test --arg git_seed::secrets
- Red on macOS at the base, feat-cmux-next b143debe27f: step
5fb7dd8d93ace8e2d40b4c1d(aws-m4pro-3), panic "Illegal byte sequence". The same failure is at ba78061374811177 (stepc92c3254b609eeacf5ca6df1). - Green on macOS at ea1e0d2edd4a669c0c852e140c3a5c2d92260a0a, 5 of 5:
05fd3ba626a21e5d5c63ae9f,864a5fc61fdb49f4e859b2b3,48afcae0dcb1a57bf1ea78a5,171f66400643bc0ebaabcfbf,46b6acc54be151851e10c15f. - Green on Linux at the head (the non-UTF-8 case runs there):
50815d3bdf2d381cb8309f24.
Observed / Not run
- Observed: the fleet steps above.
- Not run: the full cmux-tui suite. Only this module's tests ran.
Changelog
none
Proof
No capture: test-only change.
![View with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/view-with-codesmith-dark-v3-3x.png)
![Autofix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark-3x.png)
Need help on this PR? Tag @codesmith-bot with what you need.
Summary by cubic
Fixes the git_seed registry-token secret test so it runs on macOS (APFS), where creating the fixture's non-UTF-8 directory name (bad-\xff) fails with EILSEQ and panicked before any assertion.
- Adds a subfolder case with valid UTF-8 names (
pkg/.npmrcwith a token,pkg/.pypircwithout) that runs on every filesystem. - Skips the non-UTF-8 fixture only on macOS and only for
EILSEQ; all other errors still fail, and the Linux test lane still covers that case. - Each
.npmrccase now asserts the exact reason "package registry credentials file with a token", so reading an unreadable or wrong-path file fails instead of passing. - Test-only change; no product code.