Skip to content

docs(dor-cli): describe argv-over-protocol; drop dead type decls#137

Merged
nedtwigg merged 1 commit into
mainfrom
fix/dor-cli-argv-spec-cleanup
Jun 16, 2026
Merged

docs(dor-cli): describe argv-over-protocol; drop dead type decls#137
nedtwigg merged 1 commit into
mainfrom
fix/dor-cli-argv-spec-cleanup

Conversation

@dormouse-bot

Copy link
Copy Markdown
Collaborator

Nightly sweep finding from reviewing PRs #121 and #136 (the dor CLI expansion + argv-over-protocol change). PR #136 inverted command quoting — dor now forwards raw argv and the host quotes — but a couple of leftovers from the old parent-process-shell-detection path were missed.

docs/specs/dor-cli.md — stale quoting description

The spec still described the pre-#136 behavior: "Command tails ... are quoted by dor ... dor detects the invoking shell from its parent process when possible." That's no longer true. command is now a raw string[] (see EnsureSurfaceRequest/SplitSurfaceRequest in dor/src/commands/types.ts), and the host does the quoting in lib/src/components/Wall.tsx (dorCommandStringbuildShellCommandForKind(shellCommandKind(...))). Rewrote the paragraph to describe argv-over-protocol with host-side quoting and pointed the source-of-truth at dor/src/commands/shell-quote.ts.

dor/src/node-runtime.d.ts — dead ambient declarations

The declare module 'node:child_process' (execFileSync) block and process.ppid existed only for the deleted parentProcessName() helper. Nothing under dor/src imports child_process or reads ppid anymore (verified by grep; tsc -p tsconfig.json still passes after removal). generate-dor-version.mjs uses execFileSync but it's a .mjs script that doesn't consume this .d.ts.

Verification

Docs-only + dead-type-declaration removal, so no new test. Confirmed dor still builds and all tests pass:

corepack pnpm run build   # tsc + esbuild — OK
node --test test/*.test.mjs  # 48 pass, 0 fail

PR #136 moved command quoting from `dor` to the host, but the dor-cli
spec still described `dor` quoting + parent-process shell detection, and
node-runtime.d.ts kept the `child_process`/`process.ppid` declarations
that only the deleted `parentProcessName()` used.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jun 16, 2026

Copy link
Copy Markdown

Deploying mouseterm with  Cloudflare Pages  Cloudflare Pages

Latest commit: f3726d4
Status: ✅  Deploy successful!
Preview URL: https://accbce9d.mouseterm.pages.dev
Branch Preview URL: https://fix-dor-cli-argv-spec-cleanu.mouseterm.pages.dev

View logs

@nedtwigg nedtwigg merged commit bf82e08 into main Jun 16, 2026
4 checks passed
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.

2 participants