werkrevisor 0.59.0: hs-review --attach posts the checked draft and its diagrams to the PR #130

Merged
ai-reviewer merged 4 commits from claude-code/hs-review-attach into main 2026-10-21 10:59:33 +02:00
Collaborator

See docs/prs for the PR document.

🤖 Generated with Claude Code

See docs/prs for the PR document. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
claude-code added 1 commit 2026-10-21 10:22:56 +02:00
claude-code added 1 commit 2026-10-21 10:22:58 +02:00
PR document gets the number 130
werkator build succeeded after 00:11
werkator/werkrevisor-statistics build succeeded after 00:29
a36b51e378
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude-code added 1 commit 2026-10-21 10:24:50 +02:00
werkrevisor 0.59.0: hs-review --attach posts the checked draft and its diagrams to the PR
werkator build succeeded after 00:11
werkator/werkrevisor-statistics build succeeded after 00:37
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 08:38
ai-review/codex 1 open Codex finding(s); resolve each line comment
153a693727
tools/review-report --attach checks the draft before the first write (head, draft line, same commit,
SVGs present, not posted yet), posts it with the SVGs as attachments and points the images to them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude-code marked the pull request as ready for review 2026-10-21 10:25:50 +02:00
Collaborator
🟠 werkrevisor ORANGE for 153a693, superseded by the result for 855ff55

🟠 werkrevisor: ORANGE / FINDINGS

Change kind: mixed.

Reasons

  • ORANGE 3 finding(s) that Jev rates as probably real and severe: werkrevisor/reviewreport.py:92-98, werkrevisor/reviewreport.py:88-92, werkrevisor/reviewreport.py:80-83
  • hint 3 changed file(s) that neither weaken the checks, touch security nor show a risk category of the repository config according to Jev
  • hint 1 build change(s) of low risk according to Jev: statistics/build.gradle.kts (weakens checks 0.02, risk 0.00, security 0.02)
  • hint 6 changed file(s) agree with the PR document according to Jev
  • hint model recommends changes before merge

Findings

  1. [medium] Partial comment at werkrevisor/reviewreport.py:92-98, ORANGE, as a line comment

  2. [medium] Concurrent duplicates at werkrevisor/reviewreport.py:88-92, ORANGE, as a line comment

  3. [medium] False refusals at werkrevisor/reviewreport.py:80-83, ORANGE, as a line comment

Classifier

6 of 6 units passed all questions (1 PR document(s)).

Usage: model `openrouter/minimax/minimax-m3`, LLM done, tokens counted before the call 16574, calls 1, tokens in 16062 / out 18625 (reasoning included in out), duration 494.5 s, cost 0.0271 USD (reported), classifier `jev-1.13.0` calls 6, tokens in 4732, cost 0.0002 USD, finding judge `jev-1.13.0` calls 3, tokens in 5307, cost 0.0002 USD, PR document check `jev-1.13.0` calls 6, tokens in 13283, cost 0.0006 USD, build file judge `jev-1.13.0` calls 4, tokens in 4200, cost 0.0002 USD, phases: path_judge 0.3 s, classifier 0.4 s, doc_check 0.4 s, context 0.2 s, model_review 492.5 s, finding_judge 0.3 s, config: defaults + host + repository (.werkrevisor.toml at main 0349323).
Reviewed head `153a693727bfc05b76afc6cbbee111d6c35aa764` against base `0349323c850e9ae89e15daf05725a635933bb37a`, werkrevisor 0.57.0.

Diagrams

Drawn by a model from the diff with PR Lens: a view of what the PR touches, not a statement of what it does.

pr-lens-v-containers.svg

pr-lens-v-flow.svg

<!-- werkrevisor:153a693727bfc05b76afc6cbbee111d6c35aa764 --> <!-- werkrevisor-verdict:ORANGE --> <!-- werkrevisor-blocks:a3bc20546070e89e39a2a8a8d3634496,a370cc8589aed9f9078ae873420854ff,24ea556bf73d6271aa2f60c7d0debcdc,85b3362bd3053e6ad9e2a11b1991cfd6,5a43b3ee185b8caf7daa590af95d00f8,afb99431b25e982823a79b22d2903de5,04777359521576bb015507c6c5b5b8c6,695b08e83b21661bb7307fe835652174,d600b31c63de3450cb47bd478021762f,d1d785ddc3e1a73c42d6eae1c9498f4f,88845eee26f0e283f9163a5217205db6,a671efddfef69ea8b6dbbba5048ee540 --> <!-- werkrevisor:diagrams --> <!-- werkrevisor-folded --> <details><summary>🟠 werkrevisor ORANGE for <code>153a693</code>, superseded by <a href="http://git.javagil.de/mi/werkrevisor/pulls/130#issuecomment-7009">the result for <code>855ff55</code></a></summary> ## 🟠 werkrevisor: ORANGE / FINDINGS Change kind: `mixed`. ### Reasons - **ORANGE** 3 finding(s) that Jev rates as probably real and severe: werkrevisor/reviewreport.py:92-98, werkrevisor/reviewreport.py:88-92, werkrevisor/reviewreport.py:80-83 - **hint** 3 changed file(s) that neither weaken the checks, touch security nor show a risk category of the repository config according to Jev - **hint** 1 build change(s) of low risk according to Jev: statistics/build.gradle.kts (weakens checks 0.02, risk 0.00, security 0.02) - **hint** 6 changed file(s) agree with the PR document according to Jev - **hint** model recommends changes before merge ### Findings 1. **[medium] Partial comment** at `werkrevisor/reviewreport.py:92-98`, ORANGE, as a line comment 2. **[medium] Concurrent duplicates** at `werkrevisor/reviewreport.py:88-92`, ORANGE, as a line comment 3. **[medium] False refusals** at `werkrevisor/reviewreport.py:80-83`, ORANGE, as a line comment ### Classifier 6 of 6 units passed all questions (1 PR document(s)). <sub> Usage: model `openrouter/minimax/minimax-m3`, LLM done, tokens counted before the call 16574, calls 1, tokens in 16062 / out 18625 (reasoning included in out), duration 494.5 s, cost 0.0271 USD (reported), classifier `jev-1.13.0` calls 6, tokens in 4732, cost 0.0002 USD, finding judge `jev-1.13.0` calls 3, tokens in 5307, cost 0.0002 USD, PR document check `jev-1.13.0` calls 6, tokens in 13283, cost 0.0006 USD, build file judge `jev-1.13.0` calls 4, tokens in 4200, cost 0.0002 USD, phases: path_judge 0.3 s, classifier 0.4 s, doc_check 0.4 s, context 0.2 s, model_review 492.5 s, finding_judge 0.3 s, config: defaults + host + repository (.werkrevisor.toml at main 0349323).<br> Reviewed head `153a693727bfc05b76afc6cbbee111d6c35aa764` against base `0349323c850e9ae89e15daf05725a635933bb37a`, werkrevisor 0.57.0. </sub> ### Diagrams Drawn by a model from the diff with [PR Lens](https://github.com/coldteadotai/pr-lens): a view of what the PR touches, not a statement of what it does. ![pr-lens-v-containers.svg](https://git.javagil.de/attachments/3e253c9c-04ef-4411-846a-e3215fe7a6a6) ![pr-lens-v-flow.svg](https://git.javagil.de/attachments/c7ac405e-ecde-4d5f-8354-f8d9cce3e416) </details>
ai-reviewer left a comment
Collaborator

werkrevisor: ORANGE / FINDINGS for 153a693727bfc05b76afc6cbbee111d6c35aa764.
The result comment of werkrevisor holds the details.

werkrevisor: ORANGE / FINDINGS for `153a693727bfc05b76afc6cbbee111d6c35aa764`. The result comment of werkrevisor holds the details. <!-- werkrevisor-review:153a693727bfc05b76afc6cbbee111d6c35aa764 -->
@@ -61,0 +77,4 @@
if not reviewed or not head.startswith(reviewed.group(1)):
raise AttachError(f"the draft is for `{reviewed.group(1) if reviewed else '?'}`, the PR is at `{head[:8]}`; "
"run hs-review again")
if DRAFT_LINE in text:
Collaborator

[medium] False refusals (werkrevisor)

ORANGE; Jev: real 0.88, severity 2.9 of 3

DRAFT_LINE and MISMATCH_LINE are searched anywhere in the generated report. Valid review content quoting either exact phrase, such as a finding about text copied from this project, causes attachment refusal even after the actual draft or warning line was removed. Restrict these checks to the corresponding generated lines.

**[medium] False refusals** (werkrevisor) ORANGE; Jev: real 0.88, severity 2.9 of 3 `DRAFT_LINE` and `MISMATCH_LINE` are searched anywhere in the generated report. Valid review content quoting either exact phrase, such as a finding about text copied from this project, causes attachment refusal even after the actual draft or warning line was removed. Restrict these checks to the corresponding generated lines.
Author
Collaborator

Fixed in 855ff55: the draft line and the warning of different commits count only as lines of the header, before the first ###. test_a_finding_that_quotes_the_draft_line_is_no_refusal.

Fixed in `855ff55`: the draft line and the warning of different commits count only as lines of the header, before the first `###`. `test_a_finding_that_quotes_the_draft_line_is_no_refusal`.
claude-code marked this conversation as resolved
@@ -61,0 +85,4 @@
missing = [n for n in names if not os.path.isfile(os.path.join(directory, n))]
if missing:
raise AttachError(f"the draft links SVGs that are not next to it: {', '.join(missing)}")
marker = f"<!-- hs-review:{head} -->"
Collaborator

[medium] Concurrent duplicates (werkrevisor)

ORANGE; Jev: real 0.89, severity 2.8 of 3

The duplicate check and comment creation are separate, unsynchronized requests. If two invocations list comments before either creates its comment, both pass and publish the same draft, contradicting the no-duplicate guarantee. Serialize the operation with a lock or provide equivalent server-side idempotency.

**[medium] Concurrent duplicates** (werkrevisor) ORANGE; Jev: real 0.89, severity 2.8 of 3 The duplicate check and comment creation are separate, unsynchronized requests. If two invocations list comments before either creates its comment, both pass and publish the same draft, contradicting the no-duplicate guarantee. Serialize the operation with a lock or provide equivalent server-side idempotency.
Author
Collaborator

Fixed in 855ff55: attach_draft holds a lock file next to the draft (fcntl.flock), so a second run of --attach for the same PR stops with a message. Two humans on two workstations remain possible, but hs-review posts under the account of one human.

Fixed in `855ff55`: `attach_draft` holds a lock file next to the draft (`fcntl.flock`), so a second run of `--attach` for the same PR stops with a message. Two humans on two workstations remain possible, but `hs-review` posts under the account of one human.
claude-code marked this conversation as resolved
@@ -61,0 +89,4 @@
if any(marker in (c.get("body") or "") for c in gitea.list_issue_comments(number) or ()):
raise AttachError(f"a draft for `{head[:8]}` is posted already")
body = marker + "\n" + text.replace(ATTACH_HINT, "")
comment = gitea.create_issue_comment(number, body) or {}
Collaborator

[medium] Partial comment (werkrevisor)

ORANGE; Jev: real 0.86, severity 2.8 of 3

attach creates the marked comment before opening or uploading any asset. If an asset cannot be read, an upload is rejected, or the final edit fails, the partial comment remains and its marker causes every retry to be refused as a duplicate. Clean up the provisional comment after a failure or defer the completion marker until all assets and links are in place.

**[medium] Partial comment** (werkrevisor) ORANGE; Jev: real 0.86, severity 2.8 of 3 `attach` creates the marked comment before opening or uploading any asset. If an asset cannot be read, an upload is rejected, or the final edit fails, the partial comment remains and its marker causes every retry to be refused as a duplicate. Clean up the provisional comment after a failure or defer the completion marker until all assets and links are in place.
Author
Collaborator

Fixed in 855ff55: the comment starts with a pending marker, and <!-- hs-review:<head> --> comes only with the last edit; a failed upload or edit deletes the comment again. test_a_failed_upload_leaves_no_comment_and_allows_a_retry.

Fixed in `855ff55`: the comment starts with a pending marker, and `<!-- hs-review:<head> -->` comes only with the last edit; a failed upload or edit deletes the comment again. `test_a_failed_upload_leaves_no_comment_and_allows_a_retry`.
claude-code marked this conversation as resolved
ai-reviewer scheduled this pull request to auto merge when all checks succeed 2026-10-21 10:43:22 +02:00
ai-reviewer requested review from mi 2026-10-21 10:43:22 +02:00
claude-code added 1 commit 2026-10-21 10:44:55 +02:00
--attach: no half-finished comment blocks a retry, one run per PR, draft line only in the header
werkator build succeeded after 00:12
werkator/werkrevisor-statistics build succeeded after 00:29
ai-review/assessment AI review passed; approved by werkrevisor; merge already scheduled; review request of mi withdrawn
ai-review/gate build succeeded after 12:08
ai-review/codex Codex review passed
855ff5514f
The marker comes with the last edit, and a failed upload deletes the comment again;
a lock file keeps two runs apart; a finding may quote the draft line.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ai-reviewer left a comment
Collaborator

Codex review of 153a693727bfc05b76afc6cbbee111d6c35aa764

Codex review of `153a693727bfc05b76afc6cbbee111d6c35aa764` <!-- werkrevisor-codex -->
@@ -61,0 +89,4 @@
if missing:
raise AttachError(f"the draft links SVGs that are not next to it: {', '.join(missing)}")
marker = f"<!-- hs-review:{head} -->"
if any(marker in (c.get("body") or "") for c in gitea.list_issue_comments(number) or ()):
Collaborator

[medium] Failed attachment uploads leave an incomplete comment that blocks retries (Codex review)

The comment receives its duplicate-prevention marker before uploads and the final link update succeed. If either operation fails, the comment remains with local SVG links, while every subsequent --attach attempt is rejected as 'posted already'. Reproduced with an upload timeout. Failed attempts need cleanup or a resumable posting path.

Fix it, or reply why it does not hold, and resolve this comment.

**[medium] Failed attachment uploads leave an incomplete comment that blocks retries** (Codex review) The comment receives its duplicate-prevention marker before uploads and the final link update succeed. If either operation fails, the comment remains with local SVG links, while every subsequent --attach attempt is rejected as 'posted already'. Reproduced with an upload timeout. Failed attempts need cleanup or a resumable posting path. Fix it, or reply why it does not hold, and resolve this comment. <!-- werkrevisor-codex -->
Author
Collaborator

Fixed in 855ff55, as in the same finding 6996 of werkrevisor: the marker comes only with the last edit, and a failed upload or edit deletes the comment again, so a retry is not refused. test_a_failed_upload_leaves_no_comment_and_allows_a_retry.

Fixed in `855ff55`, as in the same finding 6996 of werkrevisor: the marker comes only with the last edit, and a failed upload or edit deletes the comment again, so a retry is not refused. `test_a_failed_upload_leaves_no_comment_and_allows_a_retry`.
claude-code marked this conversation as resolved
Collaborator
⚠️ werkrevisor ERROR for ?, superseded by the result for 855ff55

Codex review: not critical

The change posts user-checked drafts and diagrams as editable PR comments. It does not change authentication, authorization, merge gates, or existing data irreversibly.

Findings

  1. [medium] Failed attachment uploads leave an incomplete comment that blocks retries at werkrevisor/reviewreport.py:92, as a line comment

The merge waits for the status ai-review/codex: every line comment resolved, and the approval of a human for a critical PR or for a finding that is only here.

Model `gpt-6-astra`, effort high, tokens in 225598 (cached 183168) / out 1743, 67.8 s, 6 commands; reviewed head `153a693727bfc05b76afc6cbbee111d6c35aa764`.
<!-- werkrevisor-codex:153a693727bfc05b76afc6cbbee111d6c35aa764 --> <!-- werkrevisor-codex-critical:false --> <!-- werkrevisor-codex-unattached:0 --> <!-- werkrevisor-codex --> <!-- werkrevisor-folded --> <details><summary>⚠️ werkrevisor ERROR for <code>?</code>, superseded by <a href="http://git.javagil.de/mi/werkrevisor/pulls/130#issuecomment-7009">the result for <code>855ff55</code></a></summary> ## Codex review: not critical The change posts user-checked drafts and diagrams as editable PR comments. It does not change authentication, authorization, merge gates, or existing data irreversibly. ### Findings 1. **[medium] Failed attachment uploads leave an incomplete comment that blocks retries** at `werkrevisor/reviewreport.py:92`, as a line comment The merge waits for the status `ai-review/codex`: every line comment resolved, and the approval of a human for a critical PR or for a finding that is only here. <sub> Model `gpt-6-astra`, effort high, tokens in 225598 (cached 183168) / out 1743, 67.8 s, 6 commands; reviewed head `153a693727bfc05b76afc6cbbee111d6c35aa764`. </sub> </details>
Collaborator

🟢 werkrevisor: GREEN / PASS

Change kind: mixed.

Reasons

  • hint 5 changed file(s) that neither weaken the checks, touch security nor show a risk category of the repository config according to Jev
  • hint 1 build change(s) of low risk according to Jev: statistics/build.gradle.kts (weakens checks 0.02, risk 0.00, security 0.02)
  • hint 8 changed file(s) agree with the PR document according to Jev
  • hint the model review failed: TimeoutError: review exceeded 720 seconds (advisory: Jev judged every changed file)

Classifier

6 of 6 units passed all questions (1 PR document(s)).

Usage: model `openrouter/minimax/minimax-m3`, LLM failed (TimeoutError), tokens counted before the call 26785, duration 724.5 s, cost unknown, classifier `jev-1.13.0` calls 6, tokens in 4839, cost 0.0002 USD, PR document check `jev-1.13.0` calls 8, tokens in 19012, cost 0.0008 USD, build file judge `jev-1.13.0` calls 6, tokens in 5814, cost 0.0002 USD, phases: path_judge 0.3 s, classifier 0.5 s, doc_check 0.4 s, context 0.3 s, model_review 722.5 s, config: defaults + host + repository (.werkrevisor.toml at main 0349323).
Reviewed head `855ff5514f044562db3b1cf0b4ad8adac82b02c9` against base `0349323c850e9ae89e15daf05725a635933bb37a`, werkrevisor 0.57.0.
<!-- werkrevisor:855ff5514f044562db3b1cf0b4ad8adac82b02c9 --> <!-- werkrevisor-verdict:GREEN --> <!-- werkrevisor-blocks:a3bc20546070e89e39a2a8a8d3634496,7fa7c2334cd2190bdd1011eb63167a04,24ea556bf73d6271aa2f60c7d0debcdc,85b3362bd3053e6ad9e2a11b1991cfd6,61836f862658f7f1a476ac4bd68cc085,5a43b3ee185b8caf7daa590af95d00f8,c1d65c2a911370d170d0aee997c47ede,04777359521576bb015507c6c5b5b8c6,d3b95463dcc729bf7c4d6b8a25abbf8a,b706ba98ecf3dd146e29c2500501c480,695b08e83b21661bb7307fe835652174,ca27d9eb9ee371e9a092a594151d2c1a,069c1c26e2f72ca1e1afcc9eff692e63,88845eee26f0e283f9163a5217205db6,a671efddfef69ea8b6dbbba5048ee540 --> ## 🟢 werkrevisor: GREEN / PASS Change kind: `mixed`. ### Reasons - **hint** 5 changed file(s) that neither weaken the checks, touch security nor show a risk category of the repository config according to Jev - **hint** 1 build change(s) of low risk according to Jev: statistics/build.gradle.kts (weakens checks 0.02, risk 0.00, security 0.02) - **hint** 8 changed file(s) agree with the PR document according to Jev - **hint** the model review failed: TimeoutError: review exceeded 720 seconds (advisory: Jev judged every changed file) ### Classifier 6 of 6 units passed all questions (1 PR document(s)). <sub> Usage: model `openrouter/minimax/minimax-m3`, LLM failed (TimeoutError), tokens counted before the call 26785, duration 724.5 s, cost unknown, classifier `jev-1.13.0` calls 6, tokens in 4839, cost 0.0002 USD, PR document check `jev-1.13.0` calls 8, tokens in 19012, cost 0.0008 USD, build file judge `jev-1.13.0` calls 6, tokens in 5814, cost 0.0002 USD, phases: path_judge 0.3 s, classifier 0.5 s, doc_check 0.4 s, context 0.3 s, model_review 722.5 s, config: defaults + host + repository (.werkrevisor.toml at main 0349323).<br> Reviewed head `855ff5514f044562db3b1cf0b4ad8adac82b02c9` against base `0349323c850e9ae89e15daf05725a635933bb37a`, werkrevisor 0.57.0. </sub>
ai-reviewer left a comment
Collaborator

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

werkrevisor: GREEN / PASS for `855ff5514f044562db3b1cf0b4ad8adac82b02c9`. The result comment of werkrevisor holds the details. <!-- werkrevisor-review:855ff5514f044562db3b1cf0b4ad8adac82b02c9 -->
ai-reviewer removed review request for mi 2026-10-21 10:57:09 +02:00
Collaborator

Codex review: not critical

The change adds explicitly requested posting of a checked draft and diagrams as reversible PR comments and attachments. It does not alter authentication, permissions, merge gates, or existing data.

No findings.

The merge waits for the status ai-review/codex: every line comment resolved, and the approval of a human for a critical PR or for a finding that is only here.

Model `gpt-6-astra`, effort high, tokens in 319143 (cached 263296) / out 1935, 73.2 s, 8 commands; reviewed head `855ff5514f044562db3b1cf0b4ad8adac82b02c9`.
<!-- werkrevisor-codex:855ff5514f044562db3b1cf0b4ad8adac82b02c9 --> <!-- werkrevisor-codex-critical:false --> <!-- werkrevisor-codex-unattached:0 --> <!-- werkrevisor-codex --> ## Codex review: not critical The change adds explicitly requested posting of a checked draft and diagrams as reversible PR comments and attachments. It does not alter authentication, permissions, merge gates, or existing data. No findings. The merge waits for the status `ai-review/codex`: every line comment resolved, and the approval of a human for a critical PR or for a finding that is only here. <sub> Model `gpt-6-astra`, effort high, tokens in 319143 (cached 263296) / out 1935, 73.2 s, 8 commands; reviewed head `855ff5514f044562db3b1cf0b4ad8adac82b02c9`. </sub>
ai-reviewer merged commit b57106773f into main 2026-10-21 10:59:33 +02:00
ai-reviewer deleted branch claude-code/hs-review-attach 2026-10-21 10:59:33 +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#130