werkrevisor 0.10.0: change kind "feature with tests", harmless files, built-in DB schema paths, config version skew.
- Main code with purely additive tests (new test methods or asserts) is AI-approvable; any changed or removed test line stays YELLOW.
- `[categories] harmless` lists files that do not count as "other files".
- DB schema paths are built in and always give at least YELLOW.
- Settings unknown to the installed werkrevisor in a changed `.werkrevisor.toml` give YELLOW instead of RED.
Details: the PR document under `docs/prs/`.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
- feature_with_tests: main code with purely additive tests is AI-approvable.
- Every changed or removed test line breaks purely additive; more skip markers count.
- [categories] harmless keeps a change kind AI-approvable; harmless_only is a kind of its own.
- DB schema paths are built-in hard-YELLOW paths that no config layer removes.
- A changed .werkrevisor.toml with settings unknown to the installed version is YELLOW, not RED.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
YELLOW test changes are not purely additive: tests/test_change_kinds.py:117 disables a test, tests/test_change_kinds.py:118 disables a test
YELLOW change kind 'mixed' (main code, tests, other files, docs); AI-approvable are only: docs only, tests only added, docs and tests, refactoring with unchanged tests
YELLOW 2 changed files were given to the AI only as diff, not in full, so it could not check them against the rest of their file (all full files together would exceed [review] max_full_files_chars = 120000): werkrevisor/config.py, werkrevisor/rules.py
ORANGE model reports 2 key issues ([review] red_min_findings = 2)
YELLOW model recommends merge with caution
Findings
Possible Bug at werkrevisor/rules.py:120-130
The moved-line exemption in find_test_weakening lets a removed line be offset by an identical added line anywhere in the file. A changed non-assert line can therefore go undetected. Example: removing var a = new A(1); while adding the same text elsewhere, as the new value of a different setup, passes as purely additive. This is narrow, but it contradicts the "any changed line stays YELLOW" claim.
Possible Bug at werkrevisor/rules.py:14-15
BUILTIN_DB_SCHEMA_PATHS contains **/*.sql, **/migration/** and **/migrations/**. If first_match requires at least one directory for **/, root-level paths such as schema.sql or migrations/0001.py are not flagged. This cannot be confirmed from the diff, because first_match is not shown. The tests only cover nested paths, so the root-level case is untested.
Usage: model `openrouter/anthropic/claude-sonnet-5.5`, LLM done, calls 1, tokens in 87212 / out 507 (reasoning included in out), duration 10.7 s, cost 0.1795 USD (reported), config: defaults + host + repository (.werkrevisor.toml at base 2c41b91).
Reviewed head `c0ec0e478d4d8258a5b9d85dc204d10cca951d99` against base `2c41b912f4cac9bab652006d45c3bd634e718a77`, werkrevisor 0.9.0.
<!-- werkrevisor:c0ec0e478d4d8258a5b9d85dc204d10cca951d99 -->
<!-- werkrevisor-verdict:ORANGE -->
## 🟠 werkrevisor: ORANGE / FINDINGS
Change kind: `mixed`.
### Reasons
- **YELLOW** test changes are not purely additive: tests/test_change_kinds.py:117 disables a test, tests/test_change_kinds.py:118 disables a test
- **YELLOW** change kind 'mixed' (main code, tests, other files, docs); AI-approvable are only: docs only, tests only added, docs and tests, refactoring with unchanged tests
- **YELLOW** risky paths changed: config/hsadmin-ng.toml (config/**), config/werkprobe.toml (config/**), werkrevisor/config.py (werkrevisor/config.py)
- **YELLOW** 2 changed files were given to the AI only as diff, not in full, so it could not check them against the rest of their file (all full files together would exceed [review] max_full_files_chars = 120000): werkrevisor/config.py, werkrevisor/rules.py
- **ORANGE** model reports 2 key issues ([review] red_min_findings = 2)
- **YELLOW** model recommends merge with caution
### Findings
1. **Possible Bug** at `werkrevisor/rules.py:120-130`
The moved-line exemption in `find_test_weakening` lets a removed line be offset by an identical added line anywhere in the file. A changed non-assert line can therefore go undetected. Example: removing `var a = new A(1);` while adding the same text elsewhere, as the new value of a different setup, passes as purely additive. This is narrow, but it contradicts the "any changed line stays YELLOW" claim.
2. **Possible Bug** at `werkrevisor/rules.py:14-15`
`BUILTIN_DB_SCHEMA_PATHS` contains `**/*.sql`, `**/migration/**` and `**/migrations/**`. If `first_match` requires at least one directory for `**/`, root-level paths such as `schema.sql` or `migrations/0001.py` are not flagged. This cannot be confirmed from the diff, because `first_match` is not shown. The tests only cover nested paths, so the root-level case is untested.
<sub>
Usage: model `openrouter/anthropic/claude-sonnet-5.5`, LLM done, calls 1, tokens in 87212 / out 507 (reasoning included in out), duration 10.7 s, cost 0.1795 USD (reported), config: defaults + host + repository (.werkrevisor.toml at base 2c41b91).<br>
Reviewed head `c0ec0e478d4d8258a5b9d85dc204d10cca951d99` against base `2c41b912f4cac9bab652006d45c3bd634e718a77`, werkrevisor 0.9.0.
</sub>
ai-reviewer
requested review from mi 2026-10-05 16:50:27 +02:00
Fixes the two rule findings of the self-review: a re-added line with content passed as additive,
and the skip markers in the test data of test_change_kinds.py counted as disabled tests.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
YELLOW test changes are not purely additive: tests/test_change_kinds.py:119 disables a test, tests/test_change_kinds.py:127 disables a test, tests/test_change_kinds.py:128 disables a test
YELLOW change kind 'mixed' (main code, tests, other files, docs); AI-approvable are only: docs only, tests only added, docs and tests, refactoring with unchanged tests
YELLOW 2 changed files were given to the AI only as diff, not in full, so it could not check them against the rest of their file (all full files together would exceed [review] max_full_files_chars = 120000): werkrevisor/config.py, werkrevisor/rules.py
ORANGE model reports 3 key issues ([review] red_min_findings = 2)
YELLOW model recommends merge with caution
Findings
Possible Bug at werkrevisor/rules.py:124-133
The STRUCTURAL_LINE re-add exemption counts removed } lines against added } lines by stripped text. A PR can remove a closing brace of an existing test and add an unrelated } elsewhere without any finding, so a restructured test passes as purely additive. The risk is limited, since only content-free lines are exempt.
Possible Bug at werkrevisor/rules.py:143-156
categorize checks harmless last, but change_kind drops it from cats before the checks. A PR that changes only harmless files and docs gives {"docs"} and becomes docs_only, so harmless_only and the docs rules mix. This is probably intended. However, harmless_only is checked only for cats == {"harmless"}, and a harmless file combined with a deleted-test or weakened-test PR is not checked against weakening at all unless tests are present.
Config Validation at werkrevisor/config.py:536-551
_split_unknown keeps a section as known[section] = values when values is not a dict, and drops a section whose keys are all unknown. Validation then runs on a reduced config. A section that mixes a host-only key with unknown keys is still checked, but an unknown section name that would otherwise carry a type error is hidden. The PR doc claims that invalid settings stay RED, and this holds only for the known part of the file.
Usage: model `openrouter/anthropic/claude-sonnet-5.5`, LLM done, calls 1, tokens in 88369 / out 699 (reasoning included in out), duration 23.5 s, cost 0.1837 USD (reported), config: defaults + host + repository (.werkrevisor.toml at base 2c41b91).
Reviewed head `857990c59a3f6bea93e5bc683ad2e310ec1cdffe` against base `2c41b912f4cac9bab652006d45c3bd634e718a77`, werkrevisor 0.9.0.
<!-- werkrevisor:857990c59a3f6bea93e5bc683ad2e310ec1cdffe -->
<!-- werkrevisor-verdict:ORANGE -->
## 🟠 werkrevisor: ORANGE / FINDINGS
Change kind: `mixed`.
### Reasons
- **YELLOW** test changes are not purely additive: tests/test_change_kinds.py:119 disables a test, tests/test_change_kinds.py:127 disables a test, tests/test_change_kinds.py:128 disables a test
- **YELLOW** change kind 'mixed' (main code, tests, other files, docs); AI-approvable are only: docs only, tests only added, docs and tests, refactoring with unchanged tests
- **YELLOW** risky paths changed: config/hsadmin-ng.toml (config/**), config/werkprobe.toml (config/**), werkrevisor/config.py (werkrevisor/config.py)
- **YELLOW** 2 changed files were given to the AI only as diff, not in full, so it could not check them against the rest of their file (all full files together would exceed [review] max_full_files_chars = 120000): werkrevisor/config.py, werkrevisor/rules.py
- **ORANGE** model reports 3 key issues ([review] red_min_findings = 2)
- **YELLOW** model recommends merge with caution
### Findings
1. **Possible Bug** at `werkrevisor/rules.py:124-133`
The `STRUCTURAL_LINE` re-add exemption counts removed `}` lines against added `}` lines by stripped text. A PR can remove a closing brace of an existing test and add an unrelated `}` elsewhere without any finding, so a restructured test passes as purely additive. The risk is limited, since only content-free lines are exempt.
2. **Possible Bug** at `werkrevisor/rules.py:143-156`
`categorize` checks `harmless` last, but `change_kind` drops it from `cats` before the checks. A PR that changes only harmless files and docs gives `{"docs"}` and becomes `docs_only`, so `harmless_only` and the docs rules mix. This is probably intended. However, `harmless_only` is checked only for `cats == {"harmless"}`, and a harmless file combined with a deleted-test or weakened-test PR is not checked against `weakening` at all unless tests are present.
3. **Config Validation** at `werkrevisor/config.py:536-551`
`_split_unknown` keeps a section as `known[section] = values` when `values` is not a dict, and drops a section whose keys are all unknown. Validation then runs on a reduced config. A section that mixes a host-only key with unknown keys is still checked, but an unknown section name that would otherwise carry a type error is hidden. The PR doc claims that invalid settings stay RED, and this holds only for the known part of the file.
<sub>
Usage: model `openrouter/anthropic/claude-sonnet-5.5`, LLM done, calls 1, tokens in 88369 / out 699 (reasoning included in out), duration 23.5 s, cost 0.1837 USD (reported), config: defaults + host + repository (.werkrevisor.toml at base 2c41b91).<br>
Reviewed head `857990c59a3f6bea93e5bc683ad2e310ec1cdffe` against base `2c41b912f4cac9bab652006d45c3bd634e718a77`, werkrevisor 0.9.0.
</sub>
mi
merged commit 94f059c1e1 into main2026-10-05 17:02:52 +02:00
mi
deleted branch claude-code/change-kinds-feature-with-tests2026-10-05 17:02:52 +02:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
werkrevisor 0.10.0: change kind "feature with tests", harmless files, built-in DB schema paths, config version skew.
[categories] harmlesslists files that do not count as "other files"..werkrevisor.tomlgive YELLOW instead of RED.Details: the PR document under
docs/prs/.🤖 Generated with Claude Code
🟠 werkrevisor: ORANGE / FINDINGS
Change kind:
mixed.Reasons
Findings
-
-
Usage: model `openrouter/anthropic/claude-sonnet-5.5`, LLM done, calls 1, tokens in 87212 / out 507 (reasoning included in out), duration 10.7 s, cost 0.1795 USD (reported), config: defaults + host + repository (.werkrevisor.toml at basePossible Bug at
werkrevisor/rules.py:120-130The moved-line exemption in
find_test_weakeninglets a removed line be offset by an identical added line anywhere in the file. A changed non-assert line can therefore go undetected. Example: removingvar a = new A(1);while adding the same text elsewhere, as the new value of a different setup, passes as purely additive. This is narrow, but it contradicts the "any changed line stays YELLOW" claim.Possible Bug at
werkrevisor/rules.py:14-15BUILTIN_DB_SCHEMA_PATHScontains**/*.sql,**/migration/**and**/migrations/**. Iffirst_matchrequires at least one directory for**/, root-level paths such asschema.sqlormigrations/0001.pyare not flagged. This cannot be confirmed from the diff, becausefirst_matchis not shown. The tests only cover nested paths, so the root-level case is untested.2c41b91).Reviewed head `c0ec0e478d4d8258a5b9d85dc204d10cca951d99` against base `2c41b912f4cac9bab652006d45c3bd634e718a77`, werkrevisor 0.9.0.
🟠 werkrevisor: ORANGE / FINDINGS
Change kind:
mixed.Reasons
Findings
-
-
-
Usage: model `openrouter/anthropic/claude-sonnet-5.5`, LLM done, calls 1, tokens in 88369 / out 699 (reasoning included in out), duration 23.5 s, cost 0.1837 USD (reported), config: defaults + host + repository (.werkrevisor.toml at basePossible Bug at
werkrevisor/rules.py:124-133The
STRUCTURAL_LINEre-add exemption counts removed}lines against added}lines by stripped text. A PR can remove a closing brace of an existing test and add an unrelated}elsewhere without any finding, so a restructured test passes as purely additive. The risk is limited, since only content-free lines are exempt.Possible Bug at
werkrevisor/rules.py:143-156categorizechecksharmlesslast, butchange_kinddrops it fromcatsbefore the checks. A PR that changes only harmless files and docs gives{"docs"}and becomesdocs_only, soharmless_onlyand the docs rules mix. This is probably intended. However,harmless_onlyis checked only forcats == {"harmless"}, and a harmless file combined with a deleted-test or weakened-test PR is not checked againstweakeningat all unless tests are present.Config Validation at
werkrevisor/config.py:536-551_split_unknownkeeps a section asknown[section] = valueswhenvaluesis not a dict, and drops a section whose keys are all unknown. Validation then runs on a reduced config. A section that mixes a host-only key with unknown keys is still checked, but an unknown section name that would otherwise carry a type error is hidden. The PR doc claims that invalid settings stay RED, and this holds only for the known part of the file.2c41b91).Reviewed head `857990c59a3f6bea93e5bc683ad2e310ec1cdffe` against base `2c41b912f4cac9bab652006d45c3bd634e718a77`, werkrevisor 0.9.0.