Skip to content

[finding] unverified: does pnpm dev -- --fresh -p PORT reach oclif, or does the separator swallow the flags the port rule depends on? #11669

Description

@claude

Unverified risk, surfaced while building the lint half of #10166 (PR #11667). ⛔ Recording it unassigned; not measured here, and deliberately not folded into that PR.

The 2026-08-21 PM ruling on #10166 left this open and asked for it as its own card with a real measurement. It was never filed. Filing it now because the lint that just landed deliberately clears these spellings, so the question is now load-bearing rather than idle.

What is measured, and what is not

Measured (this tree, pnpm 10.33.0 / node v22.22.2, isolated argv fixture, with controls):

pnpm run test -- --maxWorkers=2 pat -> ARGV=["--","--maxWorkers=2","pat"] pnpm FORWARDS the separator
npm run test -- --maxWorkers=2 pat -> ARGV=["--maxWorkers=2","pat"] npm strips
npx echo-argv -- --maxWorkers=2 pat -> ARGV=["--","--maxWorkers=2","pat"] npx FORWARDS
control, no separator (pnpm) -> ARGV=["--maxWorkers=2","pat"]

So layer 1 is settled: a bare separator reaches the child process intact.

NOT measured: what oclif does with it. AGENTS.md teaches this spelling in three places —

pnpm dev -- --fresh -p PORT
pnpm dev:crm -- --fresh -p 38421

— and the root dev script chains to pnpm --filter @objectstack/example-showcase dev, then to objectstack dev, which is oclif-based. A leading -- lands in oclif's argv rather than its flag parser. If oclif drops the rest silently (the way vitest's cac parser was measured to), then --fresh and -p PORT never arrive.

Why it matters more than a flag typo

The rule those flags enforce is "never run two backends on port 3000" and "pick a random port and tear it down". If -p PORT is silently dropped, the server comes up on the default port and the rule is being enforced by a flag that never arrives — on a box where several agents run backends concurrently. The blast radius is larger than the vitest case, which only wasted lock time.

It also decides one line of the new gate. scripts/check-agent-test-spelling.mjs clears pnpm dev -- because dev is not a vitest-backed script — correct for that gate's rule, and the right scope for it. But if oclif swallows too, the instruction those three lines teach is wrong, and this is where that gets caught or not.

The measurement this card wants

Build packages/cli, then run a strict oclif command with a bogus flag on both sides of the separator — the same control pair that settled the vitest half:

objectstack dev --this-flag-does-not-exist # loud parse error? -> fine
objectstack dev -- --this-flag-does-not-exist # silent? -> real finding

Loud in both positions ⇒ close this as a non-issue and record the control. Silent after the separator ⇒ the AGENTS.md spelling needs the same correction #11425 made for the test commands, which is a governed edit.

Not measured here because packages/cli was unbuilt in this worktree and booting a dev server is disproportionate to the card that found it — and a guess dressed as a finding would be worse than the open question.

Related to #10166 (the vitest half, where the same separator was measured to be swallowed silently). Distinct mechanism downstream: different receiving CLI, different parser, unknown behaviour.

Generated by Claude Code


Generated by Claude Code

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions