Skip to content

Fix check-required-ci silently accepting malformed --run-* flags - #498

Open
Akhil Gupta (akhil9tiet) wants to merge 10 commits into
microsoft:devfrom
akhil9tiet:fix/496-check-required-ci-flag-validation
Open

Akhil Gupta (akhil9tiet) wants to merge 10 commits into
microsoft:devfrom
akhil9tiet:fix/496-check-required-ci-flag-validation

Conversation

@akhil9tiet

Copy link
Copy Markdown

Fixes #496

command_check_required_ci compared each --run-* flag with == "true", so any malformed value (empty string, "tru", "TRUE", "1", "yes") was silently treated as false — letting required-status checking pass with required jobs skipped. The flags now declare choices=("false", "true") so argparse rejects malformed values with a clear error. Also adds a unit test covering malformed and valid values for all four flags.

Copilot AI balanced review requested due to automatic review settings October 11, 2026 21:20

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Both changed files require Ruff formatting before the mandatory quality gate can pass.

2 open findings
What changed in this PR

Strictly validates required-CI scheduling flags to prevent malformed values from being treated as false.

Changes:

  • Restricts all four --run-* flags to false or true.
  • Adds parser regression coverage for valid and malformed values.
File Description
scripts/​nvx.py Adds strict argparse choices.
scripts/​test_nvx_tools.py Tests flag validation.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread scripts/nvx.py Outdated
Comment thread scripts/test_nvx_tools.py
Copilot AI balanced review requested due to automatic review settings October 11, 2026 22:15

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The required formatting check will fail, and the accidental duplicate CLI file must be removed.

1 open finding
1 resolved since last review

🧠 Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings October 11, 2026 22:17

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The changes target unused copies rather than the canonical CLI and test files, leaving the reported vulnerability unresolved.

0 open findings

1 resolved since last review

🧠 Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings October 11, 2026 22:19

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The validation closes the fail-open behavior and is comprehensively covered by focused tests.

0 open findings

🧠 Review effort: Balanced

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.

Track CI required-status bugs: missing flags pass with skipped tests

2 participants