Skip to content

fix-forward #620 (tsk-uapidv): e050_coverage CLI crashes on argparse path= kwarg; make main testable and test it - #629

Open
jaylfc wants to merge 2 commits into
masterfrom
exec/tsk-sbwitd
Open

jaylfc wants to merge 2 commits into
masterfrom
exec/tsk-sbwitd

Conversation

@jaylfc

@jaylfc jaylfc commented Oct 29, 2026 •

Copy link
Copy Markdown
Owner

CARD TITLE (intent, not commit subject): fix-forward #620 (tsk-uapidv): e050_coverage CLI crashes on argparse path= kwarg; make main testable and test it

Autonomous build of board card tsk-sbwitd.

REVISION: built on exec/tsk-uapidv (cut at 44fb558728861ece2eabd5ffe86d66476191e0f2), not on master. That branch's
commits are ancestors of this one. Verified by git merge-base --is-ancestor
before the PR was opened.

fix(e050_coverage): drop unsupported path= kwarg, make main testable

benchmarks/e050_coverage.py main() passed path= to argparse.add_argument,
which argparse rejects with TypeError. Removed the path= line (kept
default=), changed main() to main(argv=None) and parse_args() to
parse_args(argv). Added test_main_writes_out to tests/test_e050_coverage.py.

RED-FIRST: test written first, run against the unfixed script:

FAILED tests/test_e050_coverage.py::test_main_writes_out - TypeError: main() takes 0 positional arguments but 1 was given
1 failed, 1 passed in 0.21s

then fixed; passing run:

2 passed in 0.14s

RED-FIRST proof for tsk-sbwitd: test_main_writes_out written first, run against the unfixed benchmarks/e050_coverage.py.

FAILED tests/test_e050_coverage.py::test_main_writes_out - TypeError: main() takes 0 positional arguments but 1 was given
1 failed, 1 passed in 0.21s

Files:
benchmarks/init.py | 0
benchmarks/e050_coverage.py | 111 ++++++++++++++++++++
changelog.d/tsk-sbwitd-e050-coverage-argparse.md | 5 +
changelog.d/tsk-uapidv-coverage.md | 2 +
tests/test_e050_coverage.py | 126 +++++++++++++++++++++++
5 files changed, 244 insertions(+)

In-house review (pre-PR)

in-house-review: PASS (kilo/nvidia/nemotron-3-ultra-550b-a55b:free)

reviewer output

VERDICT: PASS

  • NIT: changelog.d/tsk-sbwitd-e050-coverage-argparse.md:5 missing trailing newline (run python scripts/check_trailing_newline.py to fix)

In-house-Review: PASS model=kilo/nvidia/nemotron-3-ultra-550b-a55b:free head=ed962291 needs-lead=0


Summary by Gitar

  • New coverage check:
    • Added coverage() in benchmarks/e050_coverage.py to measure evidence turns against the 2000-char extraction cut
  • Tests:
    • Added test_e050_coverage_synthetic covering each coverage category

This will update automatically on new commits.

…action cut

```text
ERROR collecting tests/test_e050_coverage.py
ImportError while importing test module 'tests/test_e050_coverage.py'.
E   ImportError: cannot import name 'e050_coverage' from 'benchmarks' (unknown location)
1 error in 0.23s
```
benchmarks/e050_coverage.py main() passed path= to argparse.add_argument,
which argparse rejects with TypeError. Removed the path= line (kept
default=), changed main() to main(argv=None) and parse_args() to
parse_args(argv). Added test_main_writes_out to tests/test_e050_coverage.py.

RED-FIRST: test written first, run against the unfixed script:

FAILED tests/test_e050_coverage.py::test_main_writes_out - TypeError: main() takes 0 positional arguments but 1 was given
1 failed, 1 passed in 0.21s

then fixed; passing run:

2 passed in 0.14s

RED-FIRST proof for tsk-sbwitd: test_main_writes_out written first, run against the unfixed benchmarks/e050_coverage.py.

```
FAILED tests/test_e050_coverage.py::test_main_writes_out - TypeError: main() takes 0 positional arguments but 1 was given
1 failed, 1 passed in 0.21s
```
@qodo-code-review

Copy link
Copy Markdown

ⓘ Qodo reviews are paused because your trial has ended. Ask your workspace admin to add credits to resume reviews. Manage billing

@coderabbitai

coderabbitai Bot commented Oct 29, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 42 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: fabe91c3-d9f3-4960-9ce8-1231f570cebc
Commits

Reviewing files that changed from the base of the PR and between 6a8fedd and ed96229.

Files selected for processing: 5
  • benchmarks/__init__.py
  • benchmarks/e050_coverage.py
  • changelog.d/tsk-sbwitd-e050-coverage-argparse.md
  • changelog.d/tsk-uapidv-coverage.md
  • tests/test_e050_coverage.py
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@gitar-bot

gitar-bot Bot commented Oct 29, 2026

Copy link
Copy Markdown

Important

You are using the Gitar free plan. Upgrade to unlock code review, CI analysis, auto-apply, custom automations, and more.

Gitar

This branch has not been deployed

No deployments
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.

1 participant