werkrevisor 0.20.5: the result comment holds the findings until the line comments exist #36

Merged
ai-reviewer merged 4 commits from claude-code/result-comment-full-first into main 2026-10-06 19:20:59 +02:00
Collaborator

See the PR doc.

🤖 Generated with Claude Code

See [the PR doc](docs/prs/2026-10-06-PR%2336-result-comment-holds-the-findings-first.md). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
claude-code added 1 commit 2026-10-06 19:13:32 +02:00
docs: PR#36 doc, the result comment holds the findings until the line comments exist
werkator build succeeded after 00:43
werkator/werkrevisor-statistics build succeeded after 00:32
153990ecae
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude-code marked the pull request as ready for review 2026-10-06 19:15:55 +02:00
mi added 1 commit 2026-10-06 19:15:57 +02:00
werkrevisor 0.20.5: the result comment holds the findings until the line comments exist
werkator build succeeded after 00:13
ai-review/assessment AI findings; a developer approval after checking them unlocks the merge; review requested from mi; merge scheduled for when the checks succeed
ai-review/gate build succeeded after 00:20
werkator/werkrevisor-statistics build succeeded after 00:35
6a4d136e8e
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Collaborator
🟠 werkrevisor ORANGE for 6a4d136, superseded by the result for 408d97c

🟠 werkrevisor: ORANGE / FINDINGS

Change kind: mixed.

Reasons

  • ORANGE 1 finding(s) that Jev rates as probably real and severe: werkrevisor/cli.py:743-752
  • hint 1 build change(s) of low risk according to Jev: statistics/build.gradle.kts (weakens checks 0.02, risk 0.00)
  • hint 1 finding(s) of low severity or rated minor by Jev: tests/test_line_comments.py:109-118
  • hint model recommends merge with caution

Findings

  1. [medium] Failed review leaves a stale "announced" state and the hold-note edit can drop findings at werkrevisor/cli.py:743-752, ORANGE, as a line comment

  2. [medium] Test does not cover the held-merge edit after a failed shortening at tests/test_line_comments.py:109-118, hint, as a line comment

Classifier

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

Usage: model `openrouter/anthropic/claude-sonnet-5.5`, LLM done, tokens counted before the call 58608, calls 1, tokens in 57225 / out 552 (reasoning included in out), duration 17.2 s, cost 0.1200 USD (reported), classifier `jev-1.13.0` calls 8, tokens in 6280, cost 0.0003 USD, finding judge `jev-1.13.0` calls 2, tokens in 3510, cost 0.0001 USD, build file judge `jev-1.13.0` calls 1, tokens in 560, cost 0.0000 USD, config: defaults + host + repository (.werkrevisor.toml at base 93b3979).
Reviewed head `6a4d136e8ee9da17dcb3c00aa3aa35a8ba66fb06` against base `93b3979350ce0b3887b4480367a46c7fdc2f26a1`, werkrevisor 0.20.4.
<!-- werkrevisor:6a4d136e8ee9da17dcb3c00aa3aa35a8ba66fb06 --> <!-- werkrevisor-verdict:ORANGE --> <!-- werkrevisor-folded --> <details><summary>🟠 werkrevisor ORANGE for <code>6a4d136</code>, superseded by <a href="http://git.javagil.de/mi/werkrevisor/pulls/36#issuecomment-1566">the result for <code>408d97c</code></a></summary> ## 🟠 werkrevisor: ORANGE / FINDINGS Change kind: `mixed`. ### Reasons - **ORANGE** 1 finding(s) that Jev rates as probably real and severe: werkrevisor/cli.py:743-752 - **hint** 1 build change(s) of low risk according to Jev: statistics/build.gradle.kts (weakens checks 0.02, risk 0.00) - **hint** 1 finding(s) of low severity or rated minor by Jev: tests/test_line_comments.py:109-118 - **hint** model recommends merge with caution ### Findings 1. **[medium] Failed review leaves a stale "announced" state and the hold-note edit can drop findings** at `werkrevisor/cli.py:743-752`, ORANGE, as a line comment 2. **[medium] Test does not cover the held-merge edit after a failed shortening** at `tests/test_line_comments.py:109-118`, hint, as a line comment ### Classifier 8 of 8 units passed all questions (1 PR document(s)). 4 answers 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 58608, calls 1, tokens in 57225 / out 552 (reasoning included in out), duration 17.2 s, cost 0.1200 USD (reported), classifier `jev-1.13.0` calls 8, tokens in 6280, cost 0.0003 USD, finding judge `jev-1.13.0` calls 2, tokens in 3510, cost 0.0001 USD, build file judge `jev-1.13.0` calls 1, tokens in 560, cost 0.0000 USD, config: defaults + host + repository (.werkrevisor.toml at base 93b3979).<br> Reviewed head `6a4d136e8ee9da17dcb3c00aa3aa35a8ba66fb06` against base `93b3979350ce0b3887b4480367a46c7fdc2f26a1`, werkrevisor 0.20.4. </sub> </details>
ai-reviewer left a comment
Collaborator

werkrevisor: ORANGE / FINDINGS for 6a4d136e8ee9da17dcb3c00aa3aa35a8ba66fb06.
The result comment of werkrevisor holds the details.

werkrevisor: ORANGE / FINDINGS for `6a4d136e8ee9da17dcb3c00aa3aa35a8ba66fb06`. The result comment of werkrevisor holds the details. <!-- werkrevisor-review:6a4d136e8ee9da17dcb3c00aa3aa35a8ba66fb06 -->
@@ -93,6 +106,17 @@ class FailureTest(unittest.TestCase):
finding_run([APP], header="[low] Naming", gitea=gitea)
self.assertEqual([r[0] for r in gitea.created_reviews], ["APPROVED"])
def test_the_result_comment_keeps_the_findings_if_gitea_fails_twice(self):
Collaborator

[medium] Test does not cover the held-merge edit after a failed shortening (werkrevisor)

hint; Jev: real 0.77, severity 2.0 of 3

No test covers _note_hold re-rendering the result comment after _shorten_to_line_comments failed. The new tests cover failure of both the review and the edit, but not the case where the review succeeds, the shortening fails and a later edit happens.

**[medium] Test does not cover the held-merge edit after a failed shortening** (werkrevisor) hint; Jev: real 0.77, severity 2.0 of 3 No test covers `_note_hold` re-rendering the result comment after `_shorten_to_line_comments` failed. The new tests cover failure of both the review and the edit, but not the case where the review succeeds, the shortening fails and a later edit happens.
Author
Collaborator

Test added in 408d97c: test_a_later_edit_shortens_the_result_once_the_line_comments_exist lets the shortening fail and checks that the hold note then shortens the comment while the line comment exists.

Test added in 408d97c: `test_a_later_edit_shortens_the_result_once_the_line_comments_exist` lets the shortening fail and checks that the hold note then shortens the comment while the line comment exists.
claude-code marked this conversation as resolved
@@ -740,2 +740,4 @@
fresh = existing is None and result.verdict is not Verdict.ERROR
comments = _plan_line_comments(gitea, pr, result, bot_login, redactor) if fresh else []
# Until Gitea has accepted the line comments, the result comment is the only place of their findings.
attached, result.attached = result.attached, set()
Collaborator

[medium] Failed review leaves a stale "announced" state and the hold-note edit can drop findings (werkrevisor)

ORANGE; Jev: real 0.66, severity 2.8 of 3

_publish clears result.attached before posting. If _publish_review raises, result.attached stays empty, which is intended. But _note_hold in execute later re-renders the comment with result.attached restored to the full set when the review was accepted. If the "shortening" edit failed in _shorten_to_line_comments, _note_hold re-renders with result.attached set and overwrites the full-text comment with the short version. The line comments exist, so the findings are not lost, but the stated guarantee "a failed edit leaves the full text" no longer holds when a held merge is noted afterwards.

**[medium] Failed review leaves a stale "announced" state and the hold-note edit can drop findings** (werkrevisor) ORANGE; Jev: real 0.66, severity 2.8 of 3 `_publish` clears `result.attached` before posting. If `_publish_review` raises, `result.attached` stays empty, which is intended. But `_note_hold` in `execute` later re-renders the comment with `result.attached` restored to the full set when the review was accepted. If the "shortening" edit failed in `_shorten_to_line_comments`, `_note_hold` re-renders with `result.attached` set and overwrites the full-text comment with the short version. The line comments exist, so the findings are not lost, but the stated guarantee "a failed edit leaves the full text" no longer holds when a held merge is noted afterwards.
Author
Collaborator

Behaviour unchanged, doc made precise in 408d97c: _note_hold runs only after Gitea accepted the review, so the line comments exist and the short form loses nothing. The guarantee is about findings, not about the full text: the full text stays as long as no line comment holds it.

Behaviour unchanged, doc made precise in 408d97c: `_note_hold` runs only after Gitea accepted the review, so the line comments exist and the short form loses nothing. The guarantee is about findings, not about the full text: the full text stays as long as no line comment holds it.
claude-code marked this conversation as resolved
ai-reviewer scheduled this pull request to auto merge when all checks succeed 2026-10-06 19:16:18 +02:00
ai-reviewer requested review from mi 2026-10-06 19:16:18 +02:00
Author
Collaborator

Answer to the review of 6a4d136 (ORANGE):

  • ORANGE werkrevisor/cli.py:743-752 (hold note shortens after a failed shortening): intended, since the line comments exist then; the doc states it precisely in 408d97c, thread resolved.
  • hint missing test of that case: added in 408d97c, thread resolved.
  • hint build change statistics/build.gradle.kts: only the version bump.
Answer to the review of `6a4d136` (ORANGE): - ORANGE `werkrevisor/cli.py:743-752` (hold note shortens after a failed shortening): intended, since the line comments exist then; the doc states it precisely in 408d97c, thread resolved. - hint missing test of that case: added in 408d97c, thread resolved. - hint build change `statistics/build.gradle.kts`: only the version bump.
mi added 1 commit 2026-10-06 19:17:56 +02:00
review: a later edit of the same run shortens the result once the line comments exist, tested and documented
werkator build succeeded after 00:09
ai-review/assessment AI findings; a developer approval after checking them unlocks the merge; a human review request is pending; merge already scheduled
ai-review/gate build succeeded after 00:15
werkator/werkrevisor-statistics build succeeded after 00:25
408d97c7a6
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Collaborator
🟠 werkrevisor ORANGE for 408d97c, superseded by the result for b8ea578

🟠 werkrevisor: ORANGE / FINDINGS

Change kind: mixed.

Reasons

  • ORANGE 1 finding(s) that Jev rates as probably real and severe: werkrevisor/cli.py:745-752
  • hint 1 build change(s) of low risk according to Jev: statistics/build.gradle.kts (weakens checks 0.02, risk 0.00)
  • hint 1 finding(s) of low severity or rated minor by Jev: tests/test_line_comments.py:225-226
  • hint model recommends merge with caution

Findings

  1. [medium] Failed shortening edit is never retried on a rerun at werkrevisor/cli.py:745-752, ORANGE, as a line comment

  2. [medium] Fold test weakened to a set comparison at tests/test_line_comments.py:225-226, hint, as a line comment

Classifier

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

Usage: model `openrouter/anthropic/claude-sonnet-5.5`, LLM done, tokens counted before the call 63874, calls 1, tokens in 62425 / out 660 (reasoning included in out), duration 14.0 s, cost 0.1315 USD (reported), classifier `jev-1.13.0` calls 8, tokens in 6311, cost 0.0003 USD, finding judge `jev-1.13.0` calls 2, tokens in 3473, cost 0.0001 USD, build file judge `jev-1.13.0` calls 1, tokens in 560, cost 0.0000 USD, config: defaults + host + repository (.werkrevisor.toml at base 93b3979).
Reviewed head `408d97c7a6f4cbac63c80e9211854881e2c985e1` against base `93b3979350ce0b3887b4480367a46c7fdc2f26a1`, werkrevisor 0.20.4.
<!-- werkrevisor:408d97c7a6f4cbac63c80e9211854881e2c985e1 --> <!-- werkrevisor-verdict:ORANGE --> <!-- werkrevisor-folded --> <details><summary>🟠 werkrevisor ORANGE for <code>408d97c</code>, superseded by <a href="http://git.javagil.de/mi/werkrevisor/pulls/36#issuecomment-1574">the result for <code>b8ea578</code></a></summary> ## 🟠 werkrevisor: ORANGE / FINDINGS Change kind: `mixed`. ### Reasons - **ORANGE** 1 finding(s) that Jev rates as probably real and severe: werkrevisor/cli.py:745-752 - **hint** 1 build change(s) of low risk according to Jev: statistics/build.gradle.kts (weakens checks 0.02, risk 0.00) - **hint** 1 finding(s) of low severity or rated minor by Jev: tests/test_line_comments.py:225-226 - **hint** model recommends merge with caution ### Findings 1. **[medium] Failed shortening edit is never retried on a rerun** at `werkrevisor/cli.py:745-752`, ORANGE, as a line comment 2. **[medium] Fold test weakened to a set comparison** at `tests/test_line_comments.py:225-226`, hint, as a line comment ### Classifier 8 of 8 units passed all questions (1 PR document(s)). 4 answers 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 63874, calls 1, tokens in 62425 / out 660 (reasoning included in out), duration 14.0 s, cost 0.1315 USD (reported), classifier `jev-1.13.0` calls 8, tokens in 6311, cost 0.0003 USD, finding judge `jev-1.13.0` calls 2, tokens in 3473, cost 0.0001 USD, build file judge `jev-1.13.0` calls 1, tokens in 560, cost 0.0000 USD, config: defaults + host + repository (.werkrevisor.toml at base 93b3979).<br> Reviewed head `408d97c7a6f4cbac63c80e9211854881e2c985e1` against base `93b3979350ce0b3887b4480367a46c7fdc2f26a1`, werkrevisor 0.20.4. </sub> </details>
ai-reviewer left a comment
Collaborator

werkrevisor: ORANGE / FINDINGS for 408d97c7a6f4cbac63c80e9211854881e2c985e1.
The result comment of werkrevisor holds the details.

werkrevisor: ORANGE / FINDINGS for `408d97c7a6f4cbac63c80e9211854881e2c985e1`. The result comment of werkrevisor holds the details. <!-- werkrevisor-review:408d97c7a6f4cbac63c80e9211854881e2c985e1 -->
@@ -200,3 +224,2 @@
finding_run([APP], gitea=gitea)
[(comment_id, body)] = gitea.edited_comments
self.assertEqual(comment_id, 3)
[body] = [body for comment_id, body in gitea.edited_comments if comment_id == 3]
Collaborator

[medium] Fold test weakened to a set comparison (werkrevisor)

hint; Jev: real 0.64, severity 1.9 of 3

test_new_result_folds_the_earlier_ones was [(comment_id, body)] = gitea.edited_comments, which required exactly one edit. It now accepts any edits whose ids are in {3, 5} and picks the body by id. Likewise test_a_mention_of_the_head_... changed from an exact list [3] to a sorted [3, 4]. These asserts are justified by the new shortening edit but no longer ensure the earlier comment is edited only once (duplicate fold edits would pass the set check). Consider asserting the exact edit list in order.

**[medium] Fold test weakened to a set comparison** (werkrevisor) hint; Jev: real 0.64, severity 1.9 of 3 `test_new_result_folds_the_earlier_ones` was `[(comment_id, body)] = gitea.edited_comments`, which required exactly one edit. It now accepts any edits whose ids are in {3, 5} and picks the body by id. Likewise `test_a_mention_of_the_head_...` changed from an exact list `[3]` to a sorted `[3, 4]`. These asserts are justified by the new shortening edit but no longer ensure the earlier comment is edited only once (duplicate fold edits would pass the set check). Consider asserting the exact edit list in order.
Author
Collaborator

Fixed in b8ea578: both fold tests assert the exact list of edits in order, [5, 3] and [4, 3].

Fixed in b8ea578: both fold tests assert the exact list of edits in order, `[5, 3]` and `[4, 3]`.
claude-code marked this conversation as resolved
@@ -742,2 +742,4 @@
# Until Gitea has accepted the line comments, the result comment is the only place of their findings.
attached, result.attached = result.attached, set()
created = _post_comment(config, pr, gitea, result, existing, bot_login, redactor, gate_note)
if result.verdict is not Verdict.ERROR:
Collaborator

[medium] Failed shortening edit is never retried on a rerun (werkrevisor)

ORANGE; Jev: real 0.78, severity 2.8 of 3

If _shorten_to_line_comments fails and no later edit happens, the result comment keeps the full findings text even though the line comments exist, duplicating the text. A rerun of the same head reuses the existing comment (existing is not None) and _publish skips line-comment planning, so result.attached stays empty and the comment is never shortened. The code comment says this loses nothing, but the duplicate stays permanently. Also, the README states the comment lists such findings in one line; this breaks it after a transient 502. This is a trade-off, but the PR doc should state that the duplicate is permanent, and no test covers the permanent case on rerun beyond the fold test comment.

**[medium] Failed shortening edit is never retried on a rerun** (werkrevisor) ORANGE; Jev: real 0.78, severity 2.8 of 3 If `_shorten_to_line_comments` fails and no later edit happens, the result comment keeps the full findings text even though the line comments exist, duplicating the text. A rerun of the same head reuses the existing comment (`existing is not None`) and `_publish` skips line-comment planning, so `result.attached` stays empty and the comment is never shortened. The code comment says this loses nothing, but the duplicate stays permanently. Also, the README states the comment lists such findings in one line; this breaks it after a transient 502. This is a trade-off, but the PR doc should state that the duplicate is permanent, and no test covers the permanent case on rerun beyond the fold test comment.
Author
Collaborator

Documented in b8ea578: without a later edit in the same run, the repetition stays, since a rerun reuses the result comment as it is. That is the chosen trade-off: a repeated finding after a rare failed edit, instead of a lost one. test_a_failed_fold_is_retried_by_a_rerun shows the rerun keeping the comment.

Documented in b8ea578: without a later edit in the same run, the repetition stays, since a rerun reuses the result comment as it is. That is the chosen trade-off: a repeated finding after a rare failed edit, instead of a lost one. `test_a_failed_fold_is_retried_by_a_rerun` shows the rerun keeping the comment.
claude-code marked this conversation as resolved
mi added 1 commit 2026-10-06 19:19:29 +02:00
review: the fold tests assert the exact order of edits; the PR#36 doc states that a failed shortening stays
werkator build succeeded after 00:08
werkator/werkrevisor-statistics build succeeded after 00:28
ai-review/assessment AI review passed; approved by werkrevisor; merge scheduled for when the checks succeed; review request of mi withdrawn
ai-review/gate build succeeded after 00:01
b8ea578210
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Author
Collaborator

Answer to the review of 408d97c (ORANGE):

  • ORANGE werkrevisor/cli.py:745-752 (failed shortening is never retried): intended trade-off, now stated in the PR doc in b8ea578; thread resolved.
  • hint fold tests weakened: exact order of edits asserted in b8ea578, thread resolved.
  • hint build change statistics/build.gradle.kts: only the version bump.
Answer to the review of `408d97c` (ORANGE): - ORANGE `werkrevisor/cli.py:745-752` (failed shortening is never retried): intended trade-off, now stated in the PR doc in b8ea578; thread resolved. - hint fold tests weakened: exact order of edits asserted in b8ea578, thread resolved. - hint build change `statistics/build.gradle.kts`: only the version bump.
Collaborator

🟢 werkrevisor: GREEN / PASS

Gate: approved by werkrevisor; merge waits for 2 open hint(s): reply to each line comment and resolve it, then restart the review or push a commit.

Change kind: mixed.

Reasons

  • hint 1 build change(s) of low risk according to Jev: statistics/build.gradle.kts (weakens checks 0.02, risk 0.00)
  • hint 2 finding(s) of low severity or rated minor by Jev: werkrevisor/cli.py:745-752, docs/prs/2026-10-06-PR#36-result-comment-holds-the-findings-first.md:52-72
  • hint model recommends merge with caution

Findings

  1. [medium] Exception in review leaves the result comment with full findings, but _publish_review failure is no longer handled at werkrevisor/cli.py:745-752, hint, as a line comment

  2. [low] Scenario#36.03 mixes unrelated change at docs/prs/2026-10-06-PR#36-result-comment-holds-the-findings-first.md:52-72, hint, as a line comment

Classifier

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

Usage: model `openrouter/anthropic/claude-sonnet-5.5`, LLM done, tokens counted before the call 63912, calls 1, tokens in 62453 / out 525 (reasoning included in out), duration 11.7 s, cost 0.1302 USD (reported), classifier `jev-1.13.0` calls 8, tokens in 6333, cost 0.0003 USD, finding judge `jev-1.13.0` calls 1, tokens in 1638, cost 0.0001 USD, build file judge `jev-1.13.0` calls 1, tokens in 560, cost 0.0000 USD, config: defaults + host + repository (.werkrevisor.toml at base 93b3979).
Reviewed head `b8ea578210cd7b1346b5d7a73b9e4e2a15addda9` against base `93b3979350ce0b3887b4480367a46c7fdc2f26a1`, werkrevisor 0.20.4.
<!-- werkrevisor:b8ea578210cd7b1346b5d7a73b9e4e2a15addda9 --> <!-- werkrevisor-verdict:GREEN --> ## 🟢 werkrevisor: GREEN / PASS Gate: approved by werkrevisor; merge waits for 2 open hint(s): reply to each line comment and resolve it, then restart the review or push a commit. Change kind: `mixed`. ### Reasons - **hint** 1 build change(s) of low risk according to Jev: statistics/build.gradle.kts (weakens checks 0.02, risk 0.00) - **hint** 2 finding(s) of low severity or rated minor by Jev: werkrevisor/cli.py:745-752, docs/prs/2026-10-06-PR#36-result-comment-holds-the-findings-first.md:52-72 - **hint** model recommends merge with caution ### Findings 1. **[medium] Exception in review leaves the result comment with full findings, but `_publish_review` failure is no longer handled** at `werkrevisor/cli.py:745-752`, hint, as a line comment 2. **[low] Scenario#36.03 mixes unrelated change** at `docs/prs/2026-10-06-PR#36-result-comment-holds-the-findings-first.md:52-72`, hint, as a line comment ### Classifier 8 of 8 units passed all questions (1 PR document(s)). 3 answers 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 63912, calls 1, tokens in 62453 / out 525 (reasoning included in out), duration 11.7 s, cost 0.1302 USD (reported), classifier `jev-1.13.0` calls 8, tokens in 6333, cost 0.0003 USD, finding judge `jev-1.13.0` calls 1, tokens in 1638, cost 0.0001 USD, build file judge `jev-1.13.0` calls 1, tokens in 560, cost 0.0000 USD, config: defaults + host + repository (.werkrevisor.toml at base 93b3979).<br> Reviewed head `b8ea578210cd7b1346b5d7a73b9e4e2a15addda9` against base `93b3979350ce0b3887b4480367a46c7fdc2f26a1`, werkrevisor 0.20.4. </sub>
ai-reviewer left a comment
Collaborator

werkrevisor: GREEN / PASS for b8ea578210cd7b1346b5d7a73b9e4e2a15addda9.
The result comment of werkrevisor holds the details.

werkrevisor: GREEN / PASS for `b8ea578210cd7b1346b5d7a73b9e4e2a15addda9`. The result comment of werkrevisor holds the details. <!-- werkrevisor-review:b8ea578210cd7b1346b5d7a73b9e4e2a15addda9 -->
@@ -0,0 +49,4 @@
- [test_line_comments: test_finding_with_a_line_becomes_a_line_comment](../../tests/test_line_comments.py)
- [test_hints_hold_merge: test_a_later_edit_shortens_the_result_once_the_line_comments_exist](../../tests/test_hints_hold_merge.py)
### Feature: the kind of the bot review follows the gate
Collaborator

[low] Scenario#36.03 mixes unrelated change (werkrevisor)

hint

Scenario#36.03 documents only a missing test, not a behavior change of this PR. The Problem section mentions it in one line, but the PR title and the Solution do not. This blurs the scope of the PR document.

**[low] Scenario#36.03 mixes unrelated change** (werkrevisor) hint Scenario#36.03 documents only a missing test, not a behavior change of this PR. The Problem section mentions it in one line, but the PR title and the Solution do not. This blurs the scope of the PR document.
Author
Collaborator

Not changed: the Problem names the missing test as the second follow-up of PR#20, and the user decided to put both into one PR; Scenario#36.03 is the place where the doc says what that test shows.

Not changed: the Problem names the missing test as the second follow-up of PR#20, and the user decided to put both into one PR; Scenario#36.03 is the place where the doc says what that test shows.
claude-code marked this conversation as resolved
@@ -742,2 +742,4 @@
# Until Gitea has accepted the line comments, the result comment is the only place of their findings.
attached, result.attached = result.attached, set()
created = _post_comment(config, pr, gitea, result, existing, bot_login, redactor, gate_note)
if result.verdict is not Verdict.ERROR:
Collaborator

[medium] Exception in review leaves the result comment with full findings, but _publish_review failure is no longer handled (werkrevisor)

hint; Jev: real 0.51, severity 2.0 of 3

The removed try/except around _publish_review used to move the findings into the comment when the review call raised. Now the comment keeps the full text from the start, which covers the loss. However, result.attached stays empty after an exception, and reused findings and the later render_comment calls (for example _note_hold) then render the findings in full. This is acceptable, but the exception path has no test that checks the comment is not shortened when the review fails and a later edit succeeds. Only the "fails twice" case is tested.

**[medium] Exception in review leaves the result comment with full findings, but `_publish_review` failure is no longer handled** (werkrevisor) hint; Jev: real 0.51, severity 2.0 of 3 The removed `try/except` around `_publish_review` used to move the findings into the comment when the review call raised. Now the comment keeps the full text from the start, which covers the loss. However, `result.attached` stays empty after an exception, and `reused` findings and the later `render_comment` calls (for example `_note_hold`) then render the findings in full. This is acceptable, but the exception path has no test that checks the comment is not shortened when the review fails and a later edit succeeds. Only the "fails twice" case is tested.
Author
Collaborator

Not changed: if _publish_review raises, the exception ends the run with ERROR, so no later edit of the run follows, and the comment keeps the full text. test_failed_review_moves_the_findings_into_the_comment_and_a_rerun_submits_it covers a failing review with working edits and checks the full text in the comment.

Not changed: if `_publish_review` raises, the exception ends the run with ERROR, so no later edit of the run follows, and the comment keeps the full text. `test_failed_review_moves_the_findings_into_the_comment_and_a_rerun_submits_it` covers a failing review with working edits and checks the full text in the comment.
claude-code marked this conversation as resolved
ai-reviewer canceled auto merging this pull request when all checks succeed 2026-10-06 19:19:52 +02:00
Author
Collaborator

Answer to the review of b8ea578 (GREEN, merge held for 2 hints):

  • hint werkrevisor/cli.py:745-752 (exception path): the run ends with ERROR, no later edit follows; covered by an existing test. Resolved.
  • hint Scenario#36.03 mixes scope: both follow-ups of PR#20 belong to this PR by decision; resolved.

Restarting the review to release the merge.

Answer to the review of `b8ea578` (GREEN, merge held for 2 hints): - hint `werkrevisor/cli.py:745-752` (exception path): the run ends with ERROR, no later edit follows; covered by an existing test. Resolved. - hint Scenario#36.03 mixes scope: both follow-ups of PR#20 belong to this PR by decision; resolved. Restarting the review to release the merge.
ai-reviewer scheduled this pull request to auto merge when all checks succeed 2026-10-06 19:20:58 +02:00
ai-reviewer removed review request for mi 2026-10-06 19:20:58 +02:00
Collaborator

werkrevisor, review restarted for b8ea578210cd7b1346b5d7a73b9e4e2a15addda9: approved by werkrevisor; merge scheduled for when the checks succeed; review request of mi withdrawn.

werkrevisor, review restarted for `b8ea578210cd7b1346b5d7a73b9e4e2a15addda9`: approved by werkrevisor; merge scheduled for when the checks succeed; review request of mi withdrawn.
ai-reviewer merged commit 227e5d8928 into main 2026-10-06 19:20:59 +02:00
ai-reviewer deleted branch claude-code/result-comment-full-first 2026-10-06 19:20:59 +02:00
Sign in to join this conversation.
No Reviewers
No labels
3 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mi/werkrevisor#36