Repository navigation
Refuse an Explicit --run With No Process Log in find_run - #1150
Conversation
parse_log reads a missing log as no findings. So audit_physical.py stamped
full shape coverage, and catalog_corpus.py built a catalog with no detections,
for a --run naming a directory that holds no PlexCleaner_process.log. find_run
now exits naming the missing log path, which covers both ground-truth tools.
parse_log keeps returning {} for a missing log, since reduce_corpus.py relies
on that for a clip run that wrote none.
Fixes #1138
Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
A recorded local strict-review pass covers head |
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Resolve and validate explicit runs RegressionTests/corpus_common.py, RegressionTests/tests/test_corpus_common.py |
find_run checks for PlexCleaner_process.log before returning an explicit run path. Tests cover valid absolute and relative paths, a missing run, and a directory without a process log. |
Estimated code review effort: 2 (Simple) | ~8 minutes
Change: Bug fix · Severity of issue fixed: Medium
Possibly related PRs
- ptr727/PlexCleaner#1135: Changes the
find_runcontract that this PR extends with process-log validation. - ptr727/PlexCleaner#1140: Includes corpus-aware
find_runbehavior that this PR extends with process-log validation.
Merge Risk: 
Minimal · up to 3443c
-
The change rejects explicit runs without a process log and identifies the missing path. No actionable merge-blocking issue remains after normal checks.
Pre-merge checks: 
4 · 
1
-
Failed checks: 1 warning Passed checks: 4 passed-
Full details: Linked Issues check
-
Explanation
Issue
#1138requires standaloneaudit_physical.pyto reject an explicit--runwhen its run directory orPlexCleaner_process.logis missing, and to name the missing path.audit_physical.pycallsfind_runbefore readingcatalog.jsonor writing it. In the reviewed head,find_runresolves relative paths, checksPlexCleaner_process.logwithis_file(), and exits with an error containing the resolved log path. The added tests cover a missing directory and a directory without a log. The behavior also protectscatalog_corpus.py, which uses the same helper.
Full details: Out of Scope Changes check
-
Explanation
The pull request changes the shared run-selection guard and its focused regression tests. These changes directly implement issue
#1138and support the stated standalone-tool behavior. No unrelated source changes are present in the whole-PR diff.
-
Full details: Docstring Coverage
-
Explanation
Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 1 functions across 2 files.
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
-
Finishing Touches
-
Generate docstrings
-
- Commit to this branch
- Create a new PR
Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- 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.
PR Summary by QodoReject explicit runs without a process log
AI Description
Diagram
High-Level Assessment
Files changed (2)
|
Code Review by Qodo🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)
Great, no issues found!Qodo reviewed your code and found no material issues that require reviewTip of the day💡 Did you know, you can show, collapse, or hide each part of a finding: code, evidence, and all |
There was a problem hiding this comment.
🟢 Approval recommended
The reviewed changes address missing-process-log failure modes for explicit runs and include regression coverage for valid and invalid paths.
No open issues 🎉
What changed in this PR
This pull request prevents explicitly selected runs without PlexCleaner_process.log from being treated as valid, avoiding false coverage results and empty catalog data.
Changes:
- Validate the process log for explicit
--runselections. - Report a clear error when the run directory or process log is missing.
- Add regression tests for valid paths and missing-log cases.
- Preserve missing-log handling for per-clip reduction logs.
| File | Description |
|---|---|
RegressionTests/tests/test_corpus_common.py |
Covers valid explicit runs, missing directories, and missing process-log failures. |
RegressionTests/corpus_common.py |
Rejects explicit runs that lack PlexCleaner_process.log. |
Review effort: Lite
Summary
An explicit
--runnaming a directory with noPlexCleaner_process.logwas accepted byfind_run.parse_logreads a missing log as no findings, so:audit_physical.pystamped every reduced entry withshape_coverage1.0 and printed no GAP line, rewriting the reducedcatalog.jsonwith coverage it never measured.catalog_corpus.pybuilt a full catalog with emptydetections,verify_errors,decode_subtypes, andtracks.find_runnow exits on an explicit--runwhose process log is missing, naming the resolved log path. Both ground-truth tools pick their run throughfind_run, and both call it before reading or writing anything else, so the refusal lands before the reduced catalog is touched.parse_logkeeps returning{}for a missing log.reduce_corpus.pycalls it on a per-clipclip_process.logthat a failed clip run may not write, and handles that case from the missing results file.Verification
python3 -m unittest discover -s testsinRegressionTests: 33 tests OK, including new cases for a missing run directory and a directory without a process log.uvx ruff@latest check .,uvx ruff@latest format --check .,uvx mypy@latest: clean.catalog.json,--run 0.0.0-gmissing): bothaudit_physical.pyandcatalog_corpus.pyexit 1 withERROR: --run 0.0.0-gmissing has no process log at <results>/0.0.0-gmissing/PlexCleaner_process.log, and the reducedcatalog.jsonis unchanged.frontiertier) over the full diff againstdevelop: no findings.prose_lint.py --diffreported nothing.Fixes #1138
🤖 Generated with Claude Code
Summary by CodeRabbit