werkrevisor 0.13.2: no error in the log for the missing version of an added, deleted or renamed file #13

Merged
mi merged 6 commits from claude-code/quiet-expected-404 into main 2026-10-05 20:34:36 +02:00
Collaborator

PR-Agent logs a 404 as ERROR when it asks for the base version of an added file or the head version of a deleted one; werkrevisor now filters exactly that line.

Details: the PR document under docs/prs/.

🤖 Generated with Claude Code

PR-Agent logs a 404 as ERROR when it asks for the base version of an added file or the head version of a deleted one; werkrevisor now filters exactly that line. Details: the PR document under `docs/prs/`. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
claude-code added 2 commits 2026-10-05 19:45:26 +02:00
claude-code marked the pull request as ready for review 2026-10-05 20:07:23 +02:00
claude-code added 2 commits 2026-10-05 20:07:24 +02:00
werkrevisor 0.13.2
ai-review/assessment AI findings; a developer approval after checking them unlocks the merge; review requested from mi
ai-review/gate build succeeded after 00:30
werkator build succeeded after 00:09
007dcbf151
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Collaborator

🟠 werkrevisor: ORANGE / FINDINGS

Change kind: feature_with_tests.

Reasons

  • ORANGE model reports 2 key issues ([review] red_min_findings = 2)
  • YELLOW model recommends merge with caution

Findings

  1. Filter can swallow real errors at werkrevisor/review.py:163-165

    The filter drops every 404 Error getting file line whose path is in the added/deleted set, including a 404 for the head version of an added file or the base version of a deleted one. Because PR-Agent's message does not say which version failed, a genuine 404 on the head version of an added file (e.g. a race or a wrong SHA) is hidden as well. The impact is small, since the review would then surface other failures, but the PR document claims "exactly" this line is filtered.

  2. Test-only global state and missing coverage at werkrevisor/cli.py:85-86

    note_added_and_deleted_files is called from _review and fills a module-level set. No test checks that _review actually passes the added and deleted files to it, so removing or breaking that call would not fail any test. The added tests call note_added_and_deleted_files directly. The ChangedFile.added property is also not tested. Renamed files are not covered either: PR-Agent may ask for the base version of the new path of a renamed file, which would still log a 404 and stay visible.

Classifier

5 of 5 units passed all questions (1 PR document(s)).
1 answer ignored because of a confidence below [classifier] min_confidence.

Usage: model `openrouter/anthropic/claude-sonnet-5.5`, LLM done, tokens counted before the call 35223, calls 1, tokens in 35399 / out 536 (reasoning included in out), duration 27.4 s, cost 0.0762 USD (reported), classifier `jev-1.13.0` calls 5, tokens in 3952, cost 0.0002 USD, config: defaults + host + repository (.werkrevisor.toml at base 4515895).
Reviewed head `007dcbf151032820fd322929a625d15e6491d85c` against base `4515895c6879f00071c73c1c1746aea63cd5941d`, werkrevisor 0.13.1.
<!-- werkrevisor:007dcbf151032820fd322929a625d15e6491d85c --> <!-- werkrevisor-verdict:ORANGE --> ## 🟠 werkrevisor: ORANGE / FINDINGS Change kind: `feature_with_tests`. ### Reasons - **ORANGE** model reports 2 key issues ([review] red_min_findings = 2) - **YELLOW** model recommends merge with caution ### Findings 1. **Filter can swallow real errors** at `werkrevisor/review.py:163-165` The filter drops every 404 `Error getting file` line whose path is in the added/deleted set, including a 404 for the head version of an added file or the base version of a deleted one. Because PR-Agent's message does not say which version failed, a genuine 404 on the head version of an added file (e.g. a race or a wrong SHA) is hidden as well. The impact is small, since the review would then surface other failures, but the PR document claims "exactly" this line is filtered. 2. **Test-only global state and missing coverage** at `werkrevisor/cli.py:85-86` `note_added_and_deleted_files` is called from `_review` and fills a module-level set. No test checks that `_review` actually passes the added and deleted files to it, so removing or breaking that call would not fail any test. The added tests call `note_added_and_deleted_files` directly. The `ChangedFile.added` property is also not tested. Renamed files are not covered either: PR-Agent may ask for the base version of the new path of a renamed file, which would still log a 404 and stay visible. ### Classifier 5 of 5 units passed all questions (1 PR document(s)). 1 answer ignored because of a confidence below [classifier] min_confidence. <sub> Usage: model `openrouter/anthropic/claude-sonnet-5.5`, LLM done, tokens counted before the call 35223, calls 1, tokens in 35399 / out 536 (reasoning included in out), duration 27.4 s, cost 0.0762 USD (reported), classifier `jev-1.13.0` calls 5, tokens in 3952, cost 0.0002 USD, config: defaults + host + repository (.werkrevisor.toml at base 4515895).<br> Reviewed head `007dcbf151032820fd322929a625d15e6491d85c` against base `4515895c6879f00071c73c1c1746aea63cd5941d`, werkrevisor 0.13.1. </sub>
ai-reviewer requested review from mi 2026-10-05 20:07:57 +02:00
claude-code added 1 commit 2026-10-05 20:09:21 +02:00
Renamed files count too; the review wiring and ChangedFile.added are tested; the PR doc names the accepted risk
werkator build succeeded after 00:10
ai-review/assessment AI findings; a developer approval after checking them unlocks the merge; a human review request is pending
ai-review/gate build succeeded after 00:15
73938d481e
Fixes the two findings of the self-review.

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

🟠 werkrevisor: ORANGE / FINDINGS

Change kind: feature_with_tests.

Reasons

  • ORANGE model reports 2 key issues ([review] red_min_findings = 2)
  • YELLOW model recommends merge with caution

Findings

  1. Filter Hides Real 404 at werkrevisor/review.py:152-166

    The filter matches only the path, so a 404 for the version that should exist is hidden as well. For a renamed file, a 404 for the head version of n.py is dropped. The base version is requested under the old path, and _files_without_one_version holds only the new path. The document claims the coverage check catches this, but a 404 on the head version may leave the file's diff intact, so the check may not notice.

  2. Doc Inconsistent With Code at docs/prs/2026-10-05-PR#13-quiet-expected-404.md:23-29

    Scenario#13.01 and the problem text say a renamed file has no base version under its path. The test only checks that the path is stored. The scenario's claim that renamed files are filtered is real in code, but Scenario#13.02 and the tests do not cover a 404 for the old path of a renamed file. The title and the PR description name only added and deleted files, while the code also filters renamed ones.

Classifier

5 of 5 units passed all questions (1 PR document(s)).
1 answer ignored because of a confidence below [classifier] min_confidence.

Usage: model `openrouter/anthropic/claude-sonnet-5.5`, LLM done, tokens counted before the call 37010, calls 1, tokens in 37117 / out 497 (reasoning included in out), duration 13.4 s, cost 0.0792 USD (reported), classifier `jev-1.13.0` calls 5, tokens in 4049, cost 0.0002 USD, config: defaults + host + repository (.werkrevisor.toml at base 4515895).
Reviewed head `73938d481eb7c152f7af1ea0c19eaed851702d1b` against base `4515895c6879f00071c73c1c1746aea63cd5941d`, werkrevisor 0.13.1.
<!-- werkrevisor:73938d481eb7c152f7af1ea0c19eaed851702d1b --> <!-- werkrevisor-verdict:ORANGE --> ## 🟠 werkrevisor: ORANGE / FINDINGS Change kind: `feature_with_tests`. ### Reasons - **ORANGE** model reports 2 key issues ([review] red_min_findings = 2) - **YELLOW** model recommends merge with caution ### Findings 1. **Filter Hides Real 404** at `werkrevisor/review.py:152-166` The filter matches only the path, so a 404 for the version that should exist is hidden as well. For a renamed file, a 404 for the head version of `n.py` is dropped. The base version is requested under the old path, and `_files_without_one_version` holds only the new path. The document claims the coverage check catches this, but a 404 on the head version may leave the file's diff intact, so the check may not notice. 2. **Doc Inconsistent With Code** at `docs/prs/2026-10-05-PR#13-quiet-expected-404.md:23-29` Scenario#13.01 and the problem text say a renamed file has no base version under its path. The test only checks that the path is stored. The scenario's claim that renamed files are filtered is real in code, but Scenario#13.02 and the tests do not cover a 404 for the old path of a renamed file. The title and the PR description name only added and deleted files, while the code also filters renamed ones. ### Classifier 5 of 5 units passed all questions (1 PR document(s)). 1 answer ignored because of a confidence below [classifier] min_confidence. <sub> Usage: model `openrouter/anthropic/claude-sonnet-5.5`, LLM done, tokens counted before the call 37010, calls 1, tokens in 37117 / out 497 (reasoning included in out), duration 13.4 s, cost 0.0792 USD (reported), classifier `jev-1.13.0` calls 5, tokens in 4049, cost 0.0002 USD, config: defaults + host + repository (.werkrevisor.toml at base 4515895).<br> Reviewed head `73938d481eb7c152f7af1ea0c19eaed851702d1b` against base `4515895c6879f00071c73c1c1746aea63cd5941d`, werkrevisor 0.13.1. </sub>
claude-code changed title from werkrevisor 0.13.2: no error in the log for the missing version of an added or deleted file to werkrevisor 0.13.2: no error in the log for the missing version of an added, deleted or renamed file 2026-10-05 20:26:30 +02:00
claude-code added 1 commit 2026-10-05 20:26:32 +02:00
PR#13 names renamed files in its title, tests their log line, and says PR-Agent asks under the new path
werkator build succeeded after 00:08
ai-review/assessment AI findings; a developer approval after checking them unlocks the merge; a human review request is pending
ai-review/gate build succeeded after 00:15
dbbf7fbfe6
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Collaborator

🟠 werkrevisor: ORANGE / FINDINGS

Change kind: feature_with_tests.

Reasons

  • ORANGE model reports 2 key issues ([review] red_min_findings = 2)
  • YELLOW model recommends merge with caution

Findings

  1. Filter Never Applies at werkrevisor/review.py:164-166

    configure_logging is called in main before _review, and the filter reads the module-level set at log time, so the ordering works. But _expected_missing_version requires record["name"].endswith("gitea_provider"). In PR-Agent the logger name is the module path, so this matches only if PR-Agent logs through loguru under that module name. The tests fake this name with logger.patch, so they do not show that the real provider logs under it. Uncertain: not verifiable from the diff.

  2. Doc Contradicts Code at docs/prs/2026-10-05-PR#13-quiet-expected-404.md:53

    The document says PR-Agent asks for both versions under the new path for a renamed file, so the old path never gives a 404. It also lists a renamed file as one with a missing version. The code and the test treat n.py (the new path) as the 404 path, which implies the new path has a missing base version. The two statements are unclear together; the document should state which version is missing for a rename.

Classifier

5 of 5 units passed all questions (1 PR document(s)).
1 answer ignored because of a confidence below [classifier] min_confidence.

Usage: model `openrouter/anthropic/claude-sonnet-5.5`, LLM done, tokens counted before the call 37103, calls 1, tokens in 37202 / out 521 (reasoning included in out), duration 12.7 s, cost 0.0796 USD (reported), classifier `jev-1.13.0` calls 5, tokens in 4089, cost 0.0002 USD, config: defaults + host + repository (.werkrevisor.toml at base 4515895).
Reviewed head `dbbf7fbfe6e7625b0fa0a256525a2d7081baf3d2` against base `4515895c6879f00071c73c1c1746aea63cd5941d`, werkrevisor 0.13.1.
<!-- werkrevisor:dbbf7fbfe6e7625b0fa0a256525a2d7081baf3d2 --> <!-- werkrevisor-verdict:ORANGE --> ## 🟠 werkrevisor: ORANGE / FINDINGS Change kind: `feature_with_tests`. ### Reasons - **ORANGE** model reports 2 key issues ([review] red_min_findings = 2) - **YELLOW** model recommends merge with caution ### Findings 1. **Filter Never Applies** at `werkrevisor/review.py:164-166` `configure_logging` is called in `main` before `_review`, and the filter reads the module-level set at log time, so the ordering works. But `_expected_missing_version` requires `record["name"].endswith("gitea_provider")`. In PR-Agent the logger name is the module path, so this matches only if PR-Agent logs through loguru under that module name. The tests fake this name with `logger.patch`, so they do not show that the real provider logs under it. Uncertain: not verifiable from the diff. 2. **Doc Contradicts Code** at `docs/prs/2026-10-05-PR#13-quiet-expected-404.md:53` The document says PR-Agent asks for both versions under the new path for a renamed file, so the old path never gives a 404. It also lists a renamed file as one with a missing version. The code and the test treat `n.py` (the new path) as the 404 path, which implies the new path has a missing base version. The two statements are unclear together; the document should state which version is missing for a rename. ### Classifier 5 of 5 units passed all questions (1 PR document(s)). 1 answer ignored because of a confidence below [classifier] min_confidence. <sub> Usage: model `openrouter/anthropic/claude-sonnet-5.5`, LLM done, tokens counted before the call 37103, calls 1, tokens in 37202 / out 521 (reasoning included in out), duration 12.7 s, cost 0.0796 USD (reported), classifier `jev-1.13.0` calls 5, tokens in 4089, cost 0.0002 USD, config: defaults + host + repository (.werkrevisor.toml at base 4515895).<br> Reviewed head `dbbf7fbfe6e7625b0fa0a256525a2d7081baf3d2` against base `4515895c6879f00071c73c1c1746aea63cd5941d`, werkrevisor 0.13.1. </sub>
mi merged commit ecad961fe0 into main 2026-10-05 20:34:36 +02:00
mi deleted branch claude-code/quiet-expected-404 2026-10-05 20:34:36 +02:00
Sign in to join this conversation.
No Reviewers
No labels
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mi/werkrevisor#13