Skip to content

fix: chipstream-cli --recursive silently did nothing when PATH_IN is a file - #15

Merged
paulmueller merged 1 commit into
DC-analysis:mainfrom
paulmueller-agent:fix-cli-recursive-file
Nov 23, 2026
Merged

paulmueller merged 1 commit into
DC-analysis:mainfrom
paulmueller-agent:fix-cli-recursive-file

Conversation

@paulmueller-agent

Copy link
Copy Markdown

Bug

With --recursive, a single file as PATH_IN is silently ignored: path_in.rglob("*.rtdc") yields nothing for a file, so nothing is processed and the CLI exits with 0.

$ chipstream-cli -r data.rtdc; echo $?
0

Fix

In recursive mode, PATH_IN must be a directory. For a file, the CLI now prints an error and exits with 1, mirroring the existing error for a directory without --recursive:

$ chipstream-cli -r data.rtdc; echo $?
PATH_IN must be a directory in recursive mode, but '.../data.rtdc' is a file. Omit the `--recursive` flag to process a single file.
Encountered problems during processing
1

I chose an error over processing the file, because in recursive mode PATH_OUT is a target directory, while for a single file it is a file path; silently switching modes would make PATH_OUT ambiguous.

Tests

test_cli_recursive_with_file checks the exit code, the message, and that no output file is written. It fails on main and passes with the fix. flake8 is clean; ruff shows no new errors.

🤖 Generated with Claude Code

…s a file

In recursive mode, `path_in.rglob("*.rtdc")` yields nothing for a file,
so the CLI processed nothing and exited with 0. Now it prints an error
and exits with 1, like it does for a directory without `--recursive`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov

codecov Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.73%. Comparing base (3738bdb) to head (70217ba).

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #15      +/-   ##
==========================================
+ Coverage   74.60%   74.73%   +0.13%     
==========================================
  Files          19       19              
  Lines        1327     1330       +3     
==========================================
+ Hits          990      994       +4     
+ Misses        337      336       -1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@paulmueller
paulmueller merged commit e5709a5 into DC-analysis:main Nov 23, 2026
8 checks passed
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