fix: sibling bugs from v1.54.3 triage (#231, #232, #233)#234
Merged
Conversation
`subdomains claim` and `subdomains delete` accept `--project <id>`, but `subdomains list` previously only accepted a positional `[<id>]` arg. Running `run402 subdomains list --project prj_xxx` parsed `--project` itself as the positional id and emitted the misleading "Project --project not found in local registry." error — the same shape GH-209 fixed for `domains list`. Mirrors the GH-209 fix (commit 2080d8e, option #1 — pure extension): the `list` subcommand now parses `--project` via a `parseProjectFlag` helper, while keeping the legacy `subdomains list <id>` and zero-arg (active-project) forms working. Updates the HELP Subcommands line to record the new form. Adds three CLI e2e tests covering each of the three forms. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The legacy `run402 deploy --manifest` was hardened in GH-185, but the v2 unified primitive (`run402 deploy apply --manifest`/`--spec`) had no client-side empty-spec guard — empty specs went straight to /deploy/v2/plans. Mirrors the GH-185 pattern with the v2-only key set (database, site, functions, secrets, subdomains, domains). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…xpose (#233) Three call sites that read --file flags through readFileSync without a pre-flight existsSync + statSync guard would crash with raw fs stack traces (ENOENT/EISDIR) and leak the V8 source pointer to stderr -- the same crash class as #195, just on different commands. Extract the GH-195 inline pattern into validateRegularFile() in argparse.mjs. Call it from functions deploy (replaces the duplicated inline guard), secrets set, projects sql, and projects apply-expose. In projects.mjs, sqlCmd and applyExpose previously ran findProject() before the --file path check, which meant a missing keystore entry won the race against an obviously-bad file path. Reorder so validateRegularFile runs first -- bad CLI input fails fast, regardless of keystore state. Adds 6 e2e tests (FILE_NOT_FOUND + NOT_A_FILE per command) that assert no node:fs / readFileUtf8 / ENOENT / EISDIR substrings escape to stderr, mirroring the GH-195 contract. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Sibling bugs surfaced during the v1.54.3 triage batch. All three were spotted by the agents that fixed the original bugs and noted in their commit messages as out-of-scope follow-ups.
subdomains listflag/positional buge3c54e6deploy apply(v2 primitive) lacks empty-manifest guard1cedcc3--fileflags share #195's crash class (secrets set,projects sql,projects apply-expose)bb09885#233 also extracted
validateRegularFile()intocli/lib/argparse.mjsand refactoredfunctions deploy --fileto call the shared helper — one place to update if the envelope shape evolves.Verification
npm test: 714 unit + 375 e2e + 22 doc snippets, 0 failures.npm run build: clean.npx tsc --noEmit(root + core + sdk): clean.Test plan
main/publishfor apatchbump (1.54.3 → 1.54.4) shipping all 3 fixes🤖 Generated with Claude Code