Skip to content

fix(docs): validate runner arguments before dispatch - #3750

Merged
injaneity merged 1 commit into
mainfrom
fix/docs-runner-arguments
Sep 11, 2026
Merged

fix(docs): validate runner arguments before dispatch#3750
injaneity merged 1 commit into
mainfrom
fix/docs-runner-arguments

Conversation

@injaneity

Copy link
Copy Markdown
Collaborator

Summary

  • Problem this solves: unrecognized or empty arguments fell through to “run all,” so even --help could trigger builds and documentation writes.
  • What changed: replace ad hoc argv scanning with Node's built-in parser, return early for help, and distinguish empty selectors from absent ones. Add command-level regressions to docs CI.

Related work

Fixes #3749.

RFC: not required; internal docs tooling, not a published driver API change. #3723's workflow-allocation work is separate.

Compatibility and risk

  • User-visible, API/CLI/MCP, migration, permission, or platform impact: help does not dispatch; unknown options and invalid selectors fail instead of running generators. Existing documented modes remain available. No runtime driver or permission changes.
  • Risk and rollback: scripts relying on ignored arguments now fail intentionally. Revert this commit to restore the old runner behavior. No new dependency or custom parser.

Validation

  • Focused tests and checks: four observed red → green cycles—help, unknown option, empty library, empty changed-files path. 17 tests, routing checks, Prettier, and diff checks pass at bf48d680066c309c461072e100250dbf11207a36.
  • Manual or platform evidence: real runner subprocesses with a harmless configured generator on macOS. A normal invocation proves the fixture can dispatch; invalid/help invocations must not. Compatibility coverage includes both check spellings, listing, and changed-file selection.
  • Known gaps or CI still required: hosted CI pending; Windows/Linux not yet verified. No real documentation builds or historical Windows/Lume failure replay claimed.

Contributor and release checks

  • The PR is focused and the description matches the final diff.
  • This change does not require an RFC, or the accepted RFC is linked above.
  • Tests, documentation, and platform evidence are included or the gap is explained.
  • The PR title is a Conventional Commit describing the production change.
  • External contributor authorship is preserved, or no external contribution is included.
  • If release-tracked files changed but this is intentionally non-releasing, the no-release label is applied.

No external contribution or component release is involved; the conditional release-label requirement does not apply.

(cherry picked from commit db1f86ad27ab4db06685d6ce77b056fe800e933f)
@injaneity
injaneity marked this pull request as ready for review September 11, 2026 19:46
@injaneity
injaneity requested a review from f-trycua as a code owner September 11, 2026 19:46
@injaneity
injaneity merged commit 084f348 into main Sep 11, 2026
12 checks passed
@injaneity
injaneity deleted the fix/docs-runner-arguments branch September 11, 2026 20:02
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.

Docs runner can start generation for help or invalid arguments

1 participant