test(zip): run the notifier archive gate through bash on Windows - #409
test(zip): run the notifier archive gate through bash on Windows#409i-so-late wants to merge 1 commit into
Conversation
`built archives contain the embedded notifier runtime` still spawned scripts/build-zip.sh directly, so on Windows spawnSync fails with EFTYPE and the assertion reports `null !== 0` with no build output. The test was added by tt-a1i#181 two days before tt-a1i#132 introduced the spawnBuildZip helper for the other build-zip.sh callers in this file, so it never picked it up. Use the existing helper. Non-Windows platforms still execute the script directly, so the gate's behavior there is unchanged. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011b5aCHD8zdVjCjr5FCc6EJ
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 SummaryReviewed base WalkthroughThe canonical ZIP test now calls Priority: ⬇️ Low Estimated code review effort: 1 (Trivial) | ~5 minutes Merge Risk: ⚪ Minimal · up to The test now uses the shared cross-platform build helper, and targeted Windows testing passes. 🚥 Pre-merge checks | ✅ 1 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (1 passed)
Full details: Validation EvidenceExplanation The PR provides the required local evidence for a focused test correction. The description records the base 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. Comment |
Problem and value
Current-main trigger: on Windows,
node --test test/release-package-gates.test.mjsfailsbuilt archives contain the embedded notifier runtimewithnull !== 0and no build output. The test spawnsscripts/build-zip.shdirectly, and Windows cannot execute a.shfile as a process (spawnSyncreturnserror.code === 'EFTYPE',status === null).Why it slipped through: #181 added this test on 2026-08-30; #132 introduced the
spawnBuildZiphelper (bash on Windows, direct execution elsewhere) on 2026-09-01 from a branch that predated #181, so the three olderbuild-zip.shcallers in this file were converted and this one was not.Intended outcome: the gate runs on Windows through the same helper as the other archive gates. With #385 merged, a Windows build is byte-identical to the committed
archify.zip, so the gate's real assertions (the three notifier entries are present in the archive) now hold on Windows instead of failing before the build starts.Approach: replace the direct
spawnSync(...build-zip.sh...)call with the existingspawnBuildZip(archive). No linked issue; this is a focused test-only correction with #132 as the precedent and #385 as the change that made it meaningful.Stability impact
archify/test/release-package-gates.test.mjs(+1/-4). No runtime, schema, renderer, Viewer, package, or generated-artifact change.spawnBuildZipstill executes the script directly with the samecwdand encoding, so the gate is unchanged there. On Windows a failing build still fails the assertion, now with the script's stdout/stderr attached instead of twoundefineds.git diff --statcovers only the one test file.Tests run
Base
a07fa1d-> candidatec159256(one commit). Windows 10 Pro 10.0.19045, Git for Windows 2.32.0, GNU bash 4.4.23 (msys), Node v22.21.1, npm 10.9.4,unzipfrom Git for Windows, clean checkout.archify/:node --test --test-name-pattern="built archives contain the embedded notifier runtime" test/release-package-gates.test.mjs-> base: 1 fail (null !== 0); candidate: 1 pass.node --test test/release-package-gates.test.mjs-> base: 23 tests, 20 pass / 2 fail / 1 skip; candidate: 23 tests, 21 pass / 1 fail / 1 skip. The test that stops failing is this gate. The remaining failure on both isarchive build excludes untracked files and external symlinks from the live working tree, which needs symlink privilege (EPERMfromfs.symlinkSync) and is unrelated. The skip on both isarchive build rejects non-canonical Node versions before publishing output, which requires a Node major other than 22.npm testfromarchify/(afternpm ci) -> base: 1348 tests, 1267 pass / 24 fail / 57 skip; candidate: 1348 tests, 1267 pass / 24 fail / 57 skip. The failing names differ by exactly one swap:built archives contain the embedded notifier runtimefails on base and passes on the candidate;a last-good notice remains acknowledgeable after the refresh commits a new candidate(test/update-notifier.test.mjs, unchanged by this PR) failed in the candidate's full run and passes 3/3 when run in isolation on the candidate. That test and its siblingan empty precheck snapshot cannot start a second concurrent network requestare the same two update-notifier cases test: make clean staging mode checks portable #349 reported as intermittent on Ubuntu; the sibling fails in both full runs here. The other 22 failures are identical on base and candidate and are Windows-environment causes: 16 need symlink privilege (EPERMfromfs.symlinkSync), 3 are thecore.autocrlfcheckout cases (test: make checkout Git isolation portable on Windows #318), and one each are the stager stat-mode assertion (test: make clean staging mode checks portable #349), the installed-preview shutdown (test: exercise preview graceful shutdown on Windows #320), and the workflow-migration preload path (test: load workflow migration preload via a file URL #319).node --checkon the test file andgit diff --check: clean.spawnBuildZip, which is the same directspawnSyncthe test used before, so the ubuntunpm testjob exercises identical behavior.Visual evidence
Not applicable: a test's process-spawning call changes; no rendered output, Viewer, or package content is affected.
Generated artifacts
None regenerated. The changed file lives under the repository-only
archify/test/tree, which the Skill stager excludes, soarchify.zip, the Gallery, and the site outputs remain fresh;zip-freshnesswill confirm.