Repository navigation
ci(install-test): make the npm jobs test npm's ant, not Apache Ant's - #228
Nic-dorman wants to merge 2 commits into
Conversation
Two npm jobs could never pass, for reasons in the tests themselves: - test npm install (Linux) failed after uninstall if any `ant` was still on PATH. GitHub's ubuntu image ships Apache Ant, also called `ant`, at /usr/bin/ant. The check now asserts that npm's own ant is gone, and the macOS and Windows uninstall steps gain the same check. - test npm install --ignore-scripts grepped for "embedded bootstrap peer", but the binary logs "No bootstrap config file; using N bundled bootstrap seed(s)" (ant-core/src/config.rs). Both strings arrived in the same commit, so the job had never been able to pass. Every "verify binary" step also ran `ant --help`, which Apache Ant answers as well. Each one now checks first that `ant` resolves to npm's install. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
656bbee to
16749cc
Compare
MaidSafe-Hermes
left a comment
There was a problem hiding this comment.
REQUEST_CHANGES — 1 confirmed P2 finding. Coverage: 2/2 seats reviewed (sol-1 gpt-6.1-sol xhigh; glm-1 z-ai/glm-5.3). The seats disagreed on whether the Windows uninstall gap blocks; I verified the gap against npm RFC 0032: npm creates a .ps1 shim as well as .cmd, and PowerShell prioritizes .ps1. This workflow is workflow_dispatch-only, so the reported green PR checks do not exercise these changes; the install-test workflow itself was not run on this head.
| run: | | ||
| npm uninstall -g @withautonomi/ant | ||
| $npmPrefix = (npm prefix -g).Trim() | ||
| if (Test-Path (Join-Path $npmPrefix "ant.cmd")) { |
There was a problem hiding this comment.
ant.cmd. npm also installs ant.ps1, and PowerShell prioritizes that wrapper. If uninstall leaves ant.ps1 but removes ant.cmd, this test passes although the npm-installed ant command remains callable. Check that ant.ps1 is absent too (and any other shims produced by the supported npm version) before reporting the npm binary removed.
npm writes three shims on Windows: `ant` (for sh), `ant.cmd` and `ant.ps1`, and PowerShell runs `ant.ps1` in preference to `ant.cmd`. The uninstall check only looked for `ant.cmd`, so a leftover `ant.ps1` would pass while `ant` stayed callable. It now fails on any file named `ant` in npm's global prefix, whatever its extension. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Addressed in 41da35d. P2: the Windows uninstall check misses the PowerShell shim. You're right. npm writes three shims on Windows: Before pushing, I ran the check on its own under Windows PowerShell 5.1, with the
The install-test workflow wasn't run on this head. Also right. The run in the PR body (38378605487) was on The PR body is updated with this evidence and the Windows shim detail. CI on 41da35d: all jobs pass except Security Audit. It fails only on RUSTSEC-2026-0387 (crypto-bigint 0.5.5), which is inherited from |
MaidSafe-Hermes
left a comment
There was a problem hiding this comment.
Code-scoped APPROVE at 41da35dd8f5862deac1d62895dfe7a0f6145ded9. Coverage: 2/2 seats reviewed (sol-1 gpt-6.1-sol xhigh; glm-1 z-ai/glm-5.3). The prior P2 is fixed: the Windows uninstall check now detects the npm ant shims by basename, including .cmd and .ps1. No new code-level issue was found.
Merge condition: This approval does not waive the failing Security Audit. Resolve RUSTSEC-2026-0387 (crypto-bigint 0.5.5; advisory fix says upgrade to >=0.7.6) before merge. The dispatch-only install-test workflow was not run on this head; this review is based on source inspection and the reported PR checks.
Two of
install-test.yml's npm jobs could never pass. Both failures were bugs in the tests, not in the package. Found while verifying #223.antwas still on PATH. GitHub's ubuntu image ships Apache Ant, which is also calledant, at/usr/bin/ant. The check now asserts that npm's ownant($(npm prefix -g)/bin/ant) is gone. The macOS and Windows uninstall steps, which didn't check removal before, gain the same check. On Windows that means every shim npm writes:ant(for sh),ant.cmdandant.ps1. PowerShell runsant.ps1in preference toant.cmd, so the step fails if any file namedantis left in npm's global prefix, whatever its extension.No bootstrap config file; using N bundled bootstrap seed(s)(ant-core/src/config.rs). Both strings arrived in the same commit (b70d808), so the job had never been able to pass. The run before this fix shows the binary using the bundled seeds; only the grep was wrong.Every "verify binary" step also ran
ant --help, which Apache Ant answers too, so a broken npm install could still pass. Each one now checks first thatantresolves to npm's install.Linear issue
Closes V2-1525
Risk tier
Workflow-only change to a
workflow_dispatchjob.Compatibility
Semver impact
Test evidence
Review fix
41da35d(2026-10-27): the Windows uninstall check covers all of npm's shims. Dispatchedinstall-test.ymlon this head against npm@withautonomi/ant@0.3.12: run 40503434356. All 7 jobs passed. Windows npm's uninstall step ends withBinary removed, config preserved, and so does Linux npm's, afterremoved 2 packages. The--ignore-scriptsjob reportsBootstrap peers resolved from the bundled seeds, with no config file present.Before pushing, I ran the new check on its own under Windows PowerShell 5.1, with
$ErrorActionPreference = 'stop'as GitHub'spwshsteps set it, against temp folders:ant+ant.cmd+ant.ps1left behind: fails and names all three.ant.ps1alone left behind: fails and names it. So doesantalone.gemini*,antd.cmd,ant-ui.ps1) plus anantdirectory: passes.actionlintis clean.Original evidence follows. It was run on
656bbee, before the 10-23 rebase to16749cc. The rebase didn't change this PR's patch.Dispatched
install-test.ymlon this branch against npm@withautonomi/ant@0.3.10(run 38378605487). All 7 jobs passed:/usr/bin/ant.The earlier run (38253772727, for #223) had the two Linux npm jobs failing for the reasons above. Its
--ignore-scriptslog shows the binary printingNo bootstrap config file; using 7 bundled bootstrap seed(s).New dependency
none
ADR
n/a
Mitigation / rollback
Revert the commit. It only touches
.github/workflows/install-test.yml, which runs only when dispatched.🤖 Generated with Claude Code