Skip to content

fix(docs): documented npx command broken on Windows — cmd owns 'verify' - #7

Merged
dkitchell merged 1 commit into
mainfrom
fix/windows-bin-collision
Aug 21, 2026
Merged

dkitchell merged 1 commit into
mainfrom
fix/windows-bin-collision

Conversation

@dkitchell

Copy link
Copy Markdown
Contributor

See commit message. Key facts:

  • verify is a cmd.exe built-in; bare-name invocation through the shell (which is what npx does) is swallowed by it on Windows — silent exit 1
  • Reproduced in PowerShell on the affected machine; npx cowsay control passed; shim-by-path passed; only bare-name failed
  • CI missed it because all bin tests spawn by path — built-ins only shadow bare names. New test invokes cd-verify as a bare shell name, pinning the documented command
  • Cross-platform command everywhere: npx --package github:certifieddata/verify cd-verify <id> --type receipt — verified VALID/exit 0 in Windows PowerShell

71 tests pass.

🤖 Generated with Claude Code

…s 'verify'

npx invokes the selected bin as a bare name through the platform shell. On
Windows, cmd.exe built-ins shadow bare names before PATH is consulted — and
'verify' IS a cmd.exe built-in. So the short form

  npx github:certifieddata/verify <id> --type receipt

silently died on every Windows machine: cmd's built-in swallowed the name and
exited 1 with no output. Reproduced in the user's own PowerShell; the control
(npx cowsay) worked, the cached package was complete and correct, and invoking
the shim by full path worked — only the bare name failed.

Why six green CI legs, two of them Windows, shipped this: every bin test spawns
the shim by PATH, and built-ins only shadow BARE names. The new test does what
npx does — bare name, through the shell — and pins the bin the docs now rely on.

The 'verify' alias itself is unfixable on Windows (nothing beats a cmd
built-in) and stays for POSIX convenience. The documented cross-platform
command is now:

  npx --package github:certifieddata/verify cd-verify <id> --type receipt

verified working in Windows PowerShell (VALID, exit 0). Windows note added to
the spec explaining the mechanism.

71 tests pass, up from 70.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@dkitchell
dkitchell merged commit 5526308 into main Aug 21, 2026
6 checks passed
@dkitchell
dkitchell deleted the fix/windows-bin-collision branch August 21, 2026 13:21
dkitchell added a commit that referenced this pull request Sep 15, 2026
…he hero command actually run (#10)

0.1.0 is on npm now, so the docs no longer need the pre-publish workaround.

Every install instruction pointed at `github:certifieddata/verify` — five in
RECEIPT-VERIFICATION.md and the receipt example in the README. That form still
works, but it clones and builds rather than fetching 35 kB from the registry,
and it is not the command anyone would paste into a terminal on a call.

The bigger problem was the hero. It read:

  npm install -g @certifieddata/verify
  certifieddata-verify ce_01HXYZ123abc... --dataset path/to/data.csv

`ce_01HXYZ123abc...` is not a certificate. Anyone following the README
literally — which is the stated bar for this repo — got a failure on the first
command they ran, after installing globally to get there.

The hero now leads with the zero-install path and two REAL production
artifacts, both confirmed working against the published package before being
written down:

  npx --package @certifieddata/verify cd-verify d6da041f-… --type certificate
  → VALID, signed by ed25519-prod-2025-02

  npx --package @certifieddata/verify cd-verify 2492a060-… --type receipt
  → VALID, settlement succeeded_live

Global install is kept, demoted below it, and now shows `cd-verify` with an
explicit Windows warning: `verify` is a cmd.exe built-in that shadows the bin
and fails silently with exit 1. That is the same trap #7 fixed for the npx
form, and the global-install line still had it.

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant