A file that only moved is not mutated by a branch #90

Merged
ai-reviewer merged 3 commits from claude-code/moved-only into main 2026-10-15 08:59:13 +02:00
Collaborator

pitestPartial leaves out a Kotlin file that the branch only moved, with nothing but new package and import lines; it prepares the move to de.javagil.werkregie.

See doc/prs/2026-10-15-PR#90-moved-only.md.

🤖 Generated with Claude Code

pitestPartial leaves out a Kotlin file that the branch only moved, with nothing but new package and import lines; it prepares the move to de.javagil.werkregie. See doc/prs/2026-10-15-PR#90-moved-only.md. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
claude-code added 1 commit 2026-10-15 08:45:04 +02:00
PR document: a file that only moved is not mutated by a branch
werkator build succeeded after 00:53
werkator/dependencies build succeeded after 00:16
4d0846f4a1
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude-code added 1 commit 2026-10-15 08:45:53 +02:00
A file that only moved is not mutated by a branch
werkator build succeeded after 00:59
werkator/dependencies build succeeded after 00:14
ai-review/assessment human review required; a human approval unlocks the merge; review requested from mi; merge scheduled for when the checks succeed
ai-review/gate build succeeded after 03:47
108d7442b2
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude-code marked the pull request as ready for review 2026-10-15 08:48:08 +02:00
Collaborator
🟡 werkrevisor YELLOW for 108d744, superseded by the result for 5ef41a8

🟡 werkrevisor: YELLOW / HUMAN_REVIEW

Change kind: mixed.

Reasons

  • YELLOW spec: doc/prs/2026-10-15-PR#90-moved-only.md Scenario#90.01 hard_to_read (0.53 > yellow_above = 0.5)
  • YELLOW spec: doc/prs/2026-10-15-PR#90-moved-only.md Scenario#90.01 implementation_details (0.61 > yellow_above = 0.6)
  • YELLOW spec: doc/prs/2026-10-15-PR#90-moved-only.md Scenario#90.02 implementation_details (0.62 > yellow_above = 0.6)
  • hint 1 build change(s) of low risk according to Jev: dashboard/build.gradle.kts (weakens checks 0.17, risk 1.50, security 0.02)
  • hint 1 finding(s) of low severity or rated minor by Jev: doc/prs/2026-10-15-PR#90-moved-only.md:56

Findings

  1. Doc contradicts implementation at doc/prs/2026-10-15-PR#90-moved-only.md:56, severity unknown, counted as medium, hint, as a line comment

Classifier

Unit Question Problem Confidence Verdict
doc/prs/2026-10-15-PR#90-moved-only.md Scenario#90.01 hard_to_read 0.53 0.56 YELLOW
doc/prs/2026-10-15-PR#90-moved-only.md Scenario#90.01 implementation_details 0.61 – YELLOW
doc/prs/2026-10-15-PR#90-moved-only.md Scenario#90.02 implementation_details 0.62 – YELLOW

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

Usage: model `openrouter/minimax/minimax-m3`, LLM done, tokens counted before the call 15374, calls 1, tokens in 14869 / out 17740 (reasoning included in out), duration 224.8 s, cost 0.0257 USD (reported), classifier `jev-1.13.0` calls 7, tokens in 5247, cost 0.0002 USD, finding judge `jev-1.13.0` calls 1, tokens in 1791, cost 0.0001 USD, build file judge `jev-1.13.0` calls 1, tokens in 1402, cost 0.0001 USD, phases: path_judge 0.2 s, classifier 0.5 s, context 0.2 s, model_review 223.4 s, finding_judge 0.2 s, config: defaults + host + repository (.werkrevisor.toml at main 815e766).
Reviewed head `108d7442b2c471be1c97011cef20031839e304d9` against base `815e766d633fbede5b504ca182e9eda73fa51d4c`, werkrevisor 0.43.0.
<!-- werkrevisor:108d7442b2c471be1c97011cef20031839e304d9 --> <!-- werkrevisor-verdict:YELLOW --> <!-- werkrevisor-blocks:f687232b8d2f171c1491e8c795682aeb,e736da62347c611a77364f83753be8fe,e4c369f297b5c4801c3a25c70b7e561c,8272205c589fa979033f5792d8b2b55b --> <!-- werkrevisor-folded --> <details><summary>🟡 werkrevisor YELLOW for <code>108d744</code>, superseded by <a href="http://git.javagil.de/mi/werkregie/pulls/90#issuecomment-6048">the result for <code>5ef41a8</code></a></summary> ## 🟡 werkrevisor: YELLOW / HUMAN_REVIEW Change kind: `mixed`. ### Reasons - **YELLOW** spec: doc/prs/2026-10-15-PR#90-moved-only.md Scenario#90.01 hard_to_read (0.53 > yellow_above = 0.5) - **YELLOW** spec: doc/prs/2026-10-15-PR#90-moved-only.md Scenario#90.01 implementation_details (0.61 > yellow_above = 0.6) - **YELLOW** spec: doc/prs/2026-10-15-PR#90-moved-only.md Scenario#90.02 implementation_details (0.62 > yellow_above = 0.6) - **hint** 1 build change(s) of low risk according to Jev: dashboard/build.gradle.kts (weakens checks 0.17, risk 1.50, security 0.02) - **hint** 1 finding(s) of low severity or rated minor by Jev: doc/prs/2026-10-15-PR#90-moved-only.md:56 ### Findings 1. **Doc contradicts implementation** at `doc/prs/2026-10-15-PR#90-moved-only.md:56`, severity unknown, counted as medium, hint, as a line comment ### Classifier | Unit | Question | Problem | Confidence | Verdict | |---|---|---|---|---| | doc/prs/2026-10-15-PR#90-moved-only.md Scenario#90.01 | hard_to_read | 0.53 | 0.56 | YELLOW | | doc/prs/2026-10-15-PR#90-moved-only.md Scenario#90.01 | implementation_details | 0.61 | – | YELLOW | | doc/prs/2026-10-15-PR#90-moved-only.md Scenario#90.02 | implementation_details | 0.62 | – | YELLOW | 5 of 7 units passed all questions (1 PR document(s)). 1 answer ignored because of a confidence below [classifier] min_confidence. <sub> Usage: model `openrouter/minimax/minimax-m3`, LLM done, tokens counted before the call 15374, calls 1, tokens in 14869 / out 17740 (reasoning included in out), duration 224.8 s, cost 0.0257 USD (reported), classifier `jev-1.13.0` calls 7, tokens in 5247, cost 0.0002 USD, finding judge `jev-1.13.0` calls 1, tokens in 1791, cost 0.0001 USD, build file judge `jev-1.13.0` calls 1, tokens in 1402, cost 0.0001 USD, phases: path_judge 0.2 s, classifier 0.5 s, context 0.2 s, model_review 223.4 s, finding_judge 0.2 s, config: defaults + host + repository (.werkrevisor.toml at main 815e766).<br> Reviewed head `108d7442b2c471be1c97011cef20031839e304d9` against base `815e766d633fbede5b504ca182e9eda73fa51d4c`, werkrevisor 0.43.0. </sub> </details>
ai-reviewer left a comment
Collaborator

werkrevisor: YELLOW / HUMAN_REVIEW for 108d7442b2c471be1c97011cef20031839e304d9.
The result comment of werkrevisor holds the details.

werkrevisor: YELLOW / HUMAN_REVIEW for `108d7442b2c471be1c97011cef20031839e304d9`. The result comment of werkrevisor holds the details. <!-- werkrevisor-review:108d7442b2c471be1c97011cef20031839e304d9 -->
@@ -0,0 +53,4 @@
## Solution
- `changedClasses` asks `git diff --name-status -M` for the renames and compares each moved file with its old version.
- `movedOnly` ignores `package` and `import` lines and blank lines; any other difference counts as a change.
Collaborator

Doc contradicts implementation, severity unknown, counted as medium (werkrevisor)

hint; Jev: real 0.70, severity 1.8 of 3

The Solution section states that movedOnly ignores package and import lines and blank lines and that "any other difference counts as a change." The implementation in dashboard/build.gradle.kts also calls .map { it.trim() } on every line before filtering, so a whitespace-only difference in a code line (e.g., a re-indentation of val x = 1 vs. unchanged code) is silently treated as no change rather than as a change. While this is unlikely to mask a real code change during a package move, the document's claim is technically inaccurate.

**Doc contradicts implementation**, severity unknown, counted as medium (werkrevisor) hint; Jev: real 0.70, severity 1.8 of 3 The Solution section states that `movedOnly` ignores `package` and `import` lines and blank lines and that "any other difference counts as a change." The implementation in `dashboard/build.gradle.kts` also calls `.map { it.trim() }` on every line before filtering, so a whitespace-only difference in a code line (e.g., a re-indentation of `val x = 1` vs. unchanged code) is silently treated as no change rather than as a change. While this is unlikely to mask a real code change during a package move, the document's claim is technically inaccurate.
claude-code marked this conversation as resolved
ai-reviewer scheduled this pull request to auto merge when all checks succeed 2026-10-15 08:51:59 +02:00
ai-reviewer requested review from mi 2026-10-15 08:51:59 +02:00
@@ -0,0 +53,4 @@
## Solution
- `changedClasses` asks `git diff --name-status -M` for the renames and compares each moved file with its old version.
- `movedOnly` ignores `package` and `import` lines, blank lines and the indentation of a line;
Author
Collaborator

Fixed in 5ef41a8: the Solution and the comment of movedOnly name the indentation too; a move does not re-indent a line, and a different indentation changes no code.

Fixed in `5ef41a8`: the Solution and the comment of `movedOnly` name the indentation too; a move does not re-indent a line, and a different indentation changes no code.
claude-code added 1 commit 2026-10-15 08:52:40 +02:00
The scenarios describe behaviour; the indentation is named
werkator build succeeded after 01:01
werkator/dependencies build succeeded after 00:16
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 03:09
5ef41a825b
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Collaborator

🟠 werkrevisor: ORANGE / FINDINGS

Change kind: mixed.

Reasons

  • ORANGE 1 finding(s) that Jev rates as probably real and severe: dashboard/build.gradle.kts:501
  • hint 1 build change(s) of low risk according to Jev: dashboard/build.gradle.kts (weakens checks 0.16, risk 1.42, security 0.02)
  • hint model recommends changes before merge
  • hint model rates the risk as high (advisory: Jev judged every changed file)

Findings

  1. Wrong path for git show at dashboard/build.gradle.kts:501, severity unknown, counted as medium, ORANGE, as a line comment

Classifier

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

Usage: model `openrouter/minimax/minimax-m3`, LLM done, tokens counted before the call 15234, calls 1, tokens in 14740 / out 17656 (reasoning included in out), duration 187.6 s, cost 0.0256 USD (reported), classifier `jev-1.13.0` calls 7, tokens in 5205, cost 0.0002 USD, finding judge `jev-1.13.0` calls 1, tokens in 2646, cost 0.0001 USD, build file judge `jev-1.13.0` calls 1, tokens in 1404, cost 0.0001 USD, phases: path_judge 0.2 s, classifier 0.5 s, context 0.2 s, model_review 186.0 s, finding_judge 0.2 s, config: defaults + host + repository (.werkrevisor.toml at main 815e766).
Reviewed head `5ef41a825b425322c6a3630cf7dafec0f449df98` against base `815e766d633fbede5b504ca182e9eda73fa51d4c`, werkrevisor 0.43.0.
<!-- werkrevisor:5ef41a825b425322c6a3630cf7dafec0f449df98 --> <!-- werkrevisor-verdict:ORANGE --> <!-- werkrevisor-blocks:1b078ce4bb0544bd8fbb7355d332296a,e736da62347c611a77364f83753be8fe,e4c369f297b5c4801c3a25c70b7e561c,02e8a59dcc342f73b29f9cd7d1270e65 --> ## 🟠 werkrevisor: ORANGE / FINDINGS Change kind: `mixed`. ### Reasons - **ORANGE** 1 finding(s) that Jev rates as probably real and severe: dashboard/build.gradle.kts:501 - **hint** 1 build change(s) of low risk according to Jev: dashboard/build.gradle.kts (weakens checks 0.16, risk 1.42, security 0.02) - **hint** model recommends changes before merge - **hint** model rates the risk as high (advisory: Jev judged every changed file) ### Findings 1. **Wrong path for git show** at `dashboard/build.gradle.kts:501`, severity unknown, counted as medium, ORANGE, as a line comment ### Classifier 7 of 7 units passed all questions (1 PR document(s)). 1 answer ignored because of a confidence below [classifier] min_confidence. <sub> Usage: model `openrouter/minimax/minimax-m3`, LLM done, tokens counted before the call 15234, calls 1, tokens in 14740 / out 17656 (reasoning included in out), duration 187.6 s, cost 0.0256 USD (reported), classifier `jev-1.13.0` calls 7, tokens in 5205, cost 0.0002 USD, finding judge `jev-1.13.0` calls 1, tokens in 2646, cost 0.0001 USD, build file judge `jev-1.13.0` calls 1, tokens in 1404, cost 0.0001 USD, phases: path_judge 0.2 s, classifier 0.5 s, context 0.2 s, model_review 186.0 s, finding_judge 0.2 s, config: defaults + host + repository (.werkrevisor.toml at main 815e766).<br> Reviewed head `5ef41a825b425322c6a3630cf7dafec0f449df98` against base `815e766d633fbede5b504ca182e9eda73fa51d4c`, werkrevisor 0.43.0. </sub>
ai-reviewer left a comment
Collaborator

werkrevisor: ORANGE / FINDINGS for 5ef41a825b425322c6a3630cf7dafec0f449df98.
The result comment of werkrevisor holds the details.

werkrevisor: ORANGE / FINDINGS for `5ef41a825b425322c6a3630cf7dafec0f449df98`. The result comment of werkrevisor holds the details. <!-- werkrevisor-review:5ef41a825b425322c6a3630cf7dafec0f449df98 -->
@@ -478,0 +498,4 @@
// a rename line reads "R<score>\t<old>\t<new>"; a file that only moved keeps its code (werkregie PR#90)
val changed = git("diff", "--name-status", "-M", "--diff-filter=d", "--relative", base, "--", "src/main/kotlin").orEmpty().lines()
.map { it.split('\t') }
.filterNot { it.size == 3 && it[0].startsWith("R") && movedOnly(git("show", "$base:./${it[1]}").orEmpty(), file(it[2]).readText()) }
Collaborator

Wrong path for git show, severity unknown, counted as medium (werkrevisor)

ORANGE; Jev: real 0.90, severity 2.9 of 3

The git show "$base:./${it[1]}" call uses a path from git diff --name-status -M --relative, which git diff --relative makes relative to the current directory (here dashboard/, as the build is run from dashboard/ per AGENTS.md). But git show <rev>:<path> always resolves the path against the repository root, so for a rename the lookup misses and the call returns null. Then movedOnly("", file(it[2]).readText()) compares an empty before against the new content and returns false, so the rename is never filtered out and the file stays in changedClasses. The whole point of this PR — letting pitest skip a file that only moved — therefore does not work in the build as it is run today. The checkMovedOnly task cannot catch this because it only exercises movedOnly with hard-coded strings and never invokes git show or git diff.

**Wrong path for git show**, severity unknown, counted as medium (werkrevisor) ORANGE; Jev: real 0.90, severity 2.9 of 3 The `git show "$base:./${it[1]}"` call uses a path from `git diff --name-status -M --relative`, which `git diff --relative` makes relative to the current directory (here `dashboard/`, as the build is run from `dashboard/` per AGENTS.md). But `git show <rev>:<path>` always resolves the path against the repository root, so for a rename the lookup misses and the call returns null. Then `movedOnly("", file(it[2]).readText())` compares an empty before against the new content and returns false, so the rename is never filtered out and the file stays in `changedClasses`. The whole point of this PR — letting `pitest` skip a file that only moved — therefore does not work in the build as it is run today. The `checkMovedOnly` task cannot catch this because it only exercises `movedOnly` with hard-coded strings and never invokes `git show` or `git diff`.
claude-code marked this conversation as resolved
@@ -478,0 +498,4 @@
// a rename line reads "R<score>\t<old>\t<new>"; a file that only moved keeps its code (werkregie PR#90)
val changed = git("diff", "--name-status", "-M", "--diff-filter=d", "--relative", base, "--", "src/main/kotlin").orEmpty().lines()
.map { it.split('\t') }
.filterNot { it.size == 3 && it[0].startsWith("R") && movedOnly(git("show", "$base:./${it[1]}").orEmpty(), file(it[2]).readText()) }
Author
Collaborator

Not a real case: in <rev>:<path>, a path that starts with ./ is relative to the current directory (gitrevisions, <rev>:<path>); only a path without ./ is relative to the root.
In dashboard/, git show HEAD:./build.gradle.kts prints the first line of dashboard/build.gradle.kts.
Evidence end to end: on a trial branch on top of this one, I moved all 68 Kotlin files to de.javagil.werkregie; ./gradlew pitestPartial then reported Task :pitest SKIPPED, so each rename was found as moved only.

Not a real case: in `<rev>:<path>`, a path that starts with `./` is relative to the current directory (gitrevisions, `<rev>:<path>`); only a path without `./` is relative to the root. In `dashboard/`, `git show HEAD:./build.gradle.kts` prints the first line of `dashboard/build.gradle.kts`. Evidence end to end: on a trial branch on top of this one, I moved all 68 Kotlin files to `de.javagil.werkregie`; `./gradlew pitestPartial` then reported `Task :pitest SKIPPED`, so each rename was found as moved only.
mi approved these changes 2026-10-15 08:59:12 +02:00
ai-reviewer merged commit 8930f5a755 into main 2026-10-15 08:59:13 +02:00
ai-reviewer deleted branch claude-code/moved-only 2026-10-15 08:59:14 +02:00
Sign in to join this conversation.
No labels
3 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mi/werkregie#90