Skip to content

Reject unknown release arguments - #102

Merged
NghiaTranUIT merged 1 commit into
ProxymanApp:mainfrom
rksharma-owg:codex/reject-unknown-release-flags
Sep 2, 2026
Merged

Reject unknown release arguments#102
NghiaTranUIT merged 1 commit into
ProxymanApp:mainfrom
rksharma-owg:codex/reject-unknown-release-flags

Conversation

@rksharma-owg

Copy link
Copy Markdown
Contributor

Summary

  • reject unsupported arguments in both release entry points before loading release configuration or performing side effects
  • report only the option name for --flag=value inputs so accidental values are not copied into diagnostics
  • add regression coverage for the direct release script and compatibility launcher

Problem

Both release argument parsers silently ignored unknown options. A misspelled release flag could therefore change the requested behavior without a clear error; for example, a typo in --bump-homebrew during a non-interactive run would be discarded and the Homebrew update would be skipped.

Root cause

Each parser handled recognized arguments but had no final rejection branch. Unmatched arguments fell through the loop.

Fix

Fail immediately when an argument does not match the supported option set. For options written as --name=value, the error includes --name but omits the value. Valid release options and defaults are unchanged.

Security considerations

Release commands run with signing, publishing, and repository credentials. Failing before configuration loading and external operations keeps malformed invocations on a side-effect-free path. Redacting the value portion of unknown options avoids reflecting a potentially sensitive accidental value into logs.

Validation

  • node --test tests/release-args.test.mjs (3 passed)
  • npm test (24 passed)
  • npm --prefix scripts/nodejs test (passed)
  • node --check scripts/release.mjs (passed)
  • node --check tests/release-args.test.mjs (passed)
  • git diff --check upstream/main...HEAD (passed)

The macOS application build and Xcode test suites were not run because this change only affects the Node release entry points and their tests.

Compatibility

Recognized command-line options retain their existing behavior. Previously ignored invalid options now exit with status 1 and an actionable error. There are no application, SDK, capture-format, or persisted-state changes.

AI assistance

OpenAI Codex assisted with repository inspection, implementation, and test preparation. I reviewed the diff and test results and take responsibility for the change.

@rksharma-owg
rksharma-owg marked this pull request as ready for review September 1, 2026 14:07
@NghiaTranUIT
NghiaTranUIT merged commit 9486be4 into ProxymanApp:main Sep 2, 2026
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