Repository navigation
test(git_seed): the registry-token secret test runs on APFS (macOS base red) - #32091
Conversation
… on macOS) registry_files_with_tokens_are_secrets made a folder named b"bad-\xff" to prove a non-UTF-8 path is read by its raw bytes. APFS refuses a name that is not UTF-8 (EILSEQ, "Illegal byte sequence"), so the test panicked on every macOS run before it checked anything. - A subfolder case with a valid name (pkg/.npmrc with a token, pkg/.pypirc without) keeps the intent, a secret file found by its content, on every filesystem. - The non-UTF-8 case runs where the filesystem takes raw bytes; on macOS, and only for EILSEQ, it is skipped: no APFS seed can hold such a name, and the Linux cmux-tui lane runs the case.
…y or wrong-path read fails Review follow-up: an unreadable registry file also counts as a secret, so is_some() passed when the wrong path was read. Each .npmrc case now expects 'with a token', and the root .pypirc holds a password while pkg/.pypirc does not, so reading one for the other gives another answer.
|
Review (subagent, correctness first): SHIP at ea1e0d2 Independent review subagent (read only), in two passes. The skip is narrow: |
|
cmux status (one comment, edited in place; each line is updated by the job that owns it) Review App of this head (app.zip, kept 1 day)
Shipped in:
|
… APFS (macOS base red) (#35889) a_secret_with_a_non_utf8_name_is_left_out (#30923) and a_secret_with_a_non_utf8_name_never_goes (#30633) create a file named b".env-\xff". APFS refuses a name that is not UTF-8 (EILSEQ, 'Illegal byte sequence'), so both panicked at setup on every macOS run since they landed; no folder on macOS can hold such a secret, so the product path they check cannot meet one there. They now accept EILSEQ on macOS only, as git_seed/secrets.rs does since #32091; on Linux (ext4 takes raw bytes) the assertions run unchanged.
Summary
Base red on macOS:
cmux-tui-core git_seed::secrets::tests::registry_files_with_tokens_are_secretspanics on every macOS run before it checks anything. Its fixture makes a folder namedb"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:
pkg/.npmrcwith a token,pkg/.pypircwithout, and the root.pypircrewritten with a password. Reading the wrong file gives a different answer..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.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::secrets5fb7dd8d93ace8e2d40b4c1d(aws-m4pro-3), panic "Illegal byte sequence". The same failure is at ba78061 (stepc92c3254b609eeacf5ca6df1).05fd3ba626a21e5d5c63ae9f,864a5fc61fdb49f4e859b2b3,48afcae0dcb1a57bf1ea78a5,171f66400643bc0ebaabcfbf,46b6acc54be151851e10c15f.50815d3bdf2d381cb8309f24.Observed / Not run
Changelog
none
Proof
No capture: test-only change.
Need help on this PR? Tag
@codesmith-botwith what you need.Summary by cubic
Fixes the
git_seedregistry-token secret test so it runs on macOS (APFS), where creating the fixture's non-UTF-8 directory name (bad-\xff) fails withEILSEQand panicked before any assertion.pkg/.npmrcwith a token,pkg/.pypircwithout) that runs on every filesystem.EILSEQ; all other errors still fail, and the Linux test lane still covers that case..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.Written for commit ea1e0d2. Summary will update on new commits.