fix(cli): reject invalid arguments in remaining commands - #307
Conversation
tt-a1i
left a comment
There was a problem hiding this comment.
Thanks for the focused fix and the public-CLI regression coverage. The argument guards address #305 directly, and I did not find a blocker in the source changes. I ran the CLI suite at eeb40be on macOS with Node 26.3.0: 46 passed, 0 failed, 0 skipped.
There is one packaging blocker to fix before merging:
[P1] Restore the CLI executable bit in archify.zip. The committed archive records archify/bin/archify.mjs as mode 100644, while both the Git index and the base archive record 100755. After extraction with unzip, directly invoking the entry point fails with Permission denied; invoking it through node still succeeds, so a Node-prefixed smoke test does not detect this regression.
I rebuilt the exact PR head with Node 22.19.0 using scripts/build-zip.sh /tmp/archify-pr307-review.zip. The rebuilt archive has mode 100755, and cmp fails against the committed ZIP. Comparing all 77 entries found identical file contents; the differing entry metadata is the executable mode of archify/bin/archify.mjs. The Node 22 release-package suite independently confirms the issue: 17 passed, 1 failed, 1 skipped, with the failure in archive build is byte-for-byte reproducible across caller time zones without system zip.
Please regenerate and commit the canonical ZIP with the executable bit preserved, verify byte-for-byte freshness, and test direct execution of the extracted entry point on a Unix host. Then rerun the relevant checks and full suite and obtain green CI on the updated head. The current CI run is action_required, so there are no passing remote checks yet. Please update the PR validation evidence accordingly.
My full local suite was stopped after confirming the packaging blocker; I am not claiming a full-suite pass. This should be a small packaging follow-up; the CLI fix itself looks good.
eeb40be to
0c6bb63
Compare
0c6bb63 to
003bec2
Compare
|
Fixed the packaging blocker and force-pushed the rebased head ( Validation on macOS (
The PR description now contains the updated evidence. GitHub has not started checks on the new head yet, so maintainer approval may still be needed for the workflow run. Please re-review when convenient. |
|
Thanks for the update. I reviewed One packaging blocker remains: the committed
The extracted file contents and permissions are correct, and package smoke passes. The remaining difference is in compression bytes; the exact build-environment cause is not yet confirmed. Please rebuild and commit the archive using the CI-matching Node 22 environment, verify byte-for-byte freshness, and rerun the relevant checks. Remote CI is still |
|
Thanks for the independent reproduction — you were right that the earlier freshness pass was not sufficient. Pushed 489fa10, changing only Using that official distribution and the unchanged repository builder:
Final ZIP SHA-256: I corrected the PR body’s toolchain/proof claims. CI run 33977895246 is |
Problem and value
Closes #305.
The strict argument boundary added to
renderin #303 was missing from four sibling commands. Malformed invocations could report success;archify demo --typocould treat the mistyped option as a directory and write an HTML artifact there.Scope
check,examples,doctor, anddemocheck,examples, anddoctordemo --typocreates no outputarchify.zipartifact with the repository builder and an official Node 22 distributionarchify.zip; the PR remains three files, +52/-5 textual lines.Stability impact
Tests run
Final artifact built and tested on macOS x64 with the official Node.js v22.23.1 distribution, bundled zlib 1.3.1-e00f703. The downloaded distribution was checked against its official SHA-256 manifest.
scripts/build-zip.sh <base-rebuilt.zip>at based8e4daf, followed bycmpagainst its committed ZIP: exact byte match.scripts/build-zip.sh <candidate.zip>at the unchanged PR source, repeated withTZ=Pacific/Honolulu: exact byte match between builds.node --test test/cli.test.mjs: 46 passed, 0 failed, 0 skipped.node --test test/release-package-gates.test.mjs: 18 passed, 0 failed, 1 expected skip, including the canonical archive byte-for-byte freshness test. The skipped case requires a non-Node-22 runtime.npm test: 1,035 total: 1,007 passed, 1 failed, 27 skipped. The failure wasan empty precheck snapshot cannot start a second concurrent network requestintest/update-notifier.test.mjs:1951(silentinstead ofupdate_available). An immediate isolated rerun passed 1/1, as did the same isolated test on based8e4daf. The test and its imported notifier/contract implementation are unchanged from base and do not call the modified CLI. This is consistent with an existing timing-sensitive test, not a demonstrated CLI regression; the full-suite failure is disclosed, not counted as green. No notifier changes are included.755, and directly invokedarchify/bin/archify.mjs --helpwithout anodeprefix: passed.node scripts/package-smoke.mjs <extracted-archive>/archify: passed on the exact candidate.--typo: each exited 2, reported its unknown option, and left the working directory empty.d8e4daf...489fa10; no further code changes were requested.489fa10: run 33977895246 reportsaction_required, pending maintainer approval to run the fork workflow. Local results are not reported as remote CI success.Visual evidence
Not applicable: rejected CLI commands produce no visual output and renderer behavior is unchanged.
Generated artifacts
archify.zip, using the unmodified official repository script.9ec29e5a4e7f9cc44ae8e835ed0f1f38f9687f586b3c40925ea5078154995bff.100755in the archive and755after Unix extraction.Checklist
npm testinarchify/; exact outcomes are recorded above.