Skip to content

Fix proofs (py3.11) crash harness CLI parsing for empty positional args - #1

Draft
Antrikshgwal with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-failing-github-actions-job
Draft

Fix proofs (py3.11) crash harness CLI parsing for empty positional args#1
Antrikshgwal with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-failing-github-actions-job

Conversation

Copilot AI commented Aug 27, 2026

Copy link
Copy Markdown

proofs (py3.11) was failing before executing crash proofs because tests/crashtest.py rejected the default no-argument invocation (python tests/crashtest.py) during argparse validation.
This change makes argument handling Python 3.11-compatible while preserving strict validation for explicitly provided crash points.

  • Root cause

    • argparse positional POINT was defined with nargs="*" and choices=POINTS.
    • On Python 3.11, empty positional input was treated as an invalid choice path for this configuration.
  • Change

    • Removed choices=POINTS from the variadic positional argument definition.
    • Added explicit post-parse validation for user-provided points and surfaced the same invalid-choice style error message.
  • Behavioral impact

    • python tests/crashtest.py now correctly runs all crash points by default.
    • Invalid point names still fail fast with a clear CLI error.
parser.add_argument("points", nargs="*", metavar="POINT", ...)

invalid = [point for point in args.points if point not in POINTS]
if invalid:
    parser.error(
        "argument POINT: invalid choice: "
        f"{invalid[0]!r} (choose from {', '.join(repr(point) for point in POINTS)})"
    )

Co-authored-by: Antrikshgwal <153820464+Antrikshgwal@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix the failing GitHub Actions job "proofs (py3.11)" Fix proofs (py3.11) crash harness CLI parsing for empty positional args Aug 27, 2026
Copilot AI requested a review from Antrikshgwal August 27, 2026 18:13

@Antrikshgwal Antrikshgwal left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

LGTM

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