werkrevisor 0.16.0: Jev judges the risk of every changed Liquibase changeset #17

Merged
mi merged 6 commits from claude-code/db-schema-judged-by-jev into main 2026-10-06 07:29:56 +02:00
Collaborator

See docs/prs/2026-10-05-PR#17-db-schema-judged-by-jev.md.

🤖 Generated with Claude Code

See docs/prs/2026-10-05-PR#17-db-schema-judged-by-jev.md. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
claude-code added 1 commit 2026-10-05 22:05:10 +02:00
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mi added 1 commit 2026-10-05 22:09:18 +02:00
[db_schema] judge = "jev" lets the host replace the YELLOW of every DB schema change by Jev's judgment per changeset.
Changed released or removed changesets stay YELLOW; test directories never count as DB schema.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude-code marked the pull request as ready for review 2026-10-05 22:18:45 +02:00
mi added 1 commit 2026-10-05 22:18:45 +02:00
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mi added 1 commit 2026-10-05 22:18:57 +02:00
README: wrap a line of the [db_schema] section
werkator build succeeded after 00:07
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:14
d9ee68fdc3
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Collaborator

🟠 werkrevisor: ORANGE / FINDINGS

Change kind: mixed.

Reasons

  • ORANGE 2 finding(s) that Jev rates as probably real and severe: werkrevisor/dbschema.py:119-125, werkrevisor/dbschema.py:91-103
  • YELLOW risky paths changed: werkrevisor/config.py (werkrevisor/config.py)
  • YELLOW spec: docs/prs/2026-10-05-PR#17-db-schema-judged-by-jev.md Scenario#17.03 hard_to_read (0.51 > yellow_above = 0.5)
  • YELLOW spec: docs/prs/2026-10-05-PR#17-db-schema-judged-by-jev.md Scenario#17.07 implementation_details (0.68 > yellow_above = 0.6)
  • YELLOW spec: docs/prs/2026-10-05-PR#17-db-schema-judged-by-jev.md Scenario#17.09 hard_to_read (0.55 > yellow_above = 0.5)
  • YELLOW 3 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/report.py, werkrevisor/rules.py
  • YELLOW 1 finding(s) possibly severe, but Jev doubts that they are real: werkrevisor/cli.py:214-238
  • hint model recommends changes before merge

Findings

  1. [high] Unreadable base file is silently treated as empty at werkrevisor/dbschema.py:119-125

    ORANGE; Jev: real 0.85, severity 3.0 of 3

    When the base version is not UTF-8, decode_text returns None and base or "" yields an empty string. All changesets of the head then count as new, so a changed released changeset is judged by Jev instead of giving YELLOW db_schema_released_changed. This bypasses the checksum-conflict guard. A base that cannot be decoded should be reported as unreadable or not judged.

  2. [medium] Duplicate changeset ids in one file collapse at werkrevisor/dbschema.py:91-103

    ORANGE; Jev: real 0.82, severity 2.8 of 3

    changesets keys by id only. Two changesets with the same id in one file (Liquibase allows the same id with different authors, but the key here is author:id so it is usually unique; however a copy-paste duplicate is possible) overwrite each other, hiding a changed changeset from the judgment. No test covers this.

  3. [medium] Jev errors in schema judging are not handled for missing client at werkrevisor/cli.py:214-238

    YELLOW; Jev: real 0.58, severity 2.7 of 3

    dbschema.judge is called with deps.jev, which is None when no [classifier] exists. Validation prevents this for judge = "jev". However, _judge_db_schema also calls fetch_base, which re-raises any non-404 GiteaError. A transient Gitea error then fails the whole review with ERROR instead of producing a YELLOW db_schema_not_judged. This is acceptable but unhandled; merge_base falling back to pr.base_sha can also give a wrong base for removed-changeset detection.

Classifier

Unit Question Problem Confidence Verdict
docs/prs/2026-10-05-PR#17-db-schema-judged-by-jev.md Scenario#17.03 hard_to_read 0.51 0.51 YELLOW
docs/prs/2026-10-05-PR#17-db-schema-judged-by-jev.md Scenario#17.07 implementation_details 0.68 – YELLOW
docs/prs/2026-10-05-PR#17-db-schema-judged-by-jev.md Scenario#17.09 hard_to_read 0.55 0.56 YELLOW

12 of 15 units passed all questions (1 PR document(s)).
5 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 79835, calls 1, tokens in 79718 / out 748 (reasoning included in out), duration 13.3 s, cost 0.1669 USD (reported), classifier `jev-1.13.0` calls 15, tokens in 13478, cost 0.0006 USD, finding judge `jev-1.13.0` calls 3, tokens in 5003, cost 0.0002 USD, config: defaults + host + repository (.werkrevisor.toml at base c50ad05).
Reviewed head `d9ee68fdc35e6802c31cbf7b6d9cf9da3c56c8e1` against base `c50ad0587723025d6b62552a74a05e0d19359913`, werkrevisor 0.15.0.
<!-- werkrevisor:d9ee68fdc35e6802c31cbf7b6d9cf9da3c56c8e1 --> <!-- werkrevisor-verdict:ORANGE --> ## 🟠 werkrevisor: ORANGE / FINDINGS Change kind: `mixed`. ### Reasons - **ORANGE** 2 finding(s) that Jev rates as probably real and severe: werkrevisor/dbschema.py:119-125, werkrevisor/dbschema.py:91-103 - **YELLOW** risky paths changed: werkrevisor/config.py (werkrevisor/config.py) - **YELLOW** spec: docs/prs/2026-10-05-PR#17-db-schema-judged-by-jev.md Scenario#17.03 hard_to_read (0.51 > yellow_above = 0.5) - **YELLOW** spec: docs/prs/2026-10-05-PR#17-db-schema-judged-by-jev.md Scenario#17.07 implementation_details (0.68 > yellow_above = 0.6) - **YELLOW** spec: docs/prs/2026-10-05-PR#17-db-schema-judged-by-jev.md Scenario#17.09 hard_to_read (0.55 > yellow_above = 0.5) - **YELLOW** 3 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/report.py, werkrevisor/rules.py - **YELLOW** 1 finding(s) possibly severe, but Jev doubts that they are real: werkrevisor/cli.py:214-238 - **hint** model recommends changes before merge ### Findings 1. **[high] Unreadable base file is silently treated as empty** at `werkrevisor/dbschema.py:119-125` ORANGE; Jev: real 0.85, severity 3.0 of 3 When the base version is not UTF-8, `decode_text` returns `None` and `base or ""` yields an empty string. All changesets of the head then count as new, so a changed released changeset is judged by Jev instead of giving YELLOW `db_schema_released_changed`. This bypasses the checksum-conflict guard. A base that cannot be decoded should be reported as unreadable or not judged. 2. **[medium] Duplicate changeset ids in one file collapse** at `werkrevisor/dbschema.py:91-103` ORANGE; Jev: real 0.82, severity 2.8 of 3 `changesets` keys by id only. Two changesets with the same id in one file (Liquibase allows the same id with different authors, but the key here is `author:id` so it is usually unique; however a copy-paste duplicate is possible) overwrite each other, hiding a changed changeset from the judgment. No test covers this. 3. **[medium] Jev errors in schema judging are not handled for missing client** at `werkrevisor/cli.py:214-238` YELLOW; Jev: real 0.58, severity 2.7 of 3 `dbschema.judge` is called with `deps.jev`, which is `None` when no `[classifier]` exists. Validation prevents this for `judge = "jev"`. However, `_judge_db_schema` also calls `fetch_base`, which re-raises any non-404 `GiteaError`. A transient Gitea error then fails the whole review with ERROR instead of producing a YELLOW `db_schema_not_judged`. This is acceptable but unhandled; `merge_base` falling back to `pr.base_sha` can also give a wrong base for removed-changeset detection. ### Classifier | Unit | Question | Problem | Confidence | Verdict | |---|---|---|---|---| | docs/prs/2026-10-05-PR#17-db-schema-judged-by-jev.md Scenario#17.03 | hard_to_read | 0.51 | 0.51 | YELLOW | | docs/prs/2026-10-05-PR#17-db-schema-judged-by-jev.md Scenario#17.07 | implementation_details | 0.68 | – | YELLOW | | docs/prs/2026-10-05-PR#17-db-schema-judged-by-jev.md Scenario#17.09 | hard_to_read | 0.55 | 0.56 | YELLOW | 12 of 15 units passed all questions (1 PR document(s)). 5 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 79835, calls 1, tokens in 79718 / out 748 (reasoning included in out), duration 13.3 s, cost 0.1669 USD (reported), classifier `jev-1.13.0` calls 15, tokens in 13478, cost 0.0006 USD, finding judge `jev-1.13.0` calls 3, tokens in 5003, cost 0.0002 USD, config: defaults + host + repository (.werkrevisor.toml at base c50ad05).<br> Reviewed head `d9ee68fdc35e6802c31cbf7b6d9cf9da3c56c8e1` against base `c50ad0587723025d6b62552a74a05e0d19359913`, werkrevisor 0.15.0. </sub>
ai-reviewer requested review from mi 2026-10-05 22:19:21 +02:00
mi added 1 commit 2026-10-05 22:20:14 +02:00
review: an unreadable base version or a duplicate changeset id never lets a changed changeset pass as new
ai-review/gate build succeeded after 00:07
ai-review/assessment human review required; a human approval unlocks the merge; a human review request is pending
werkator build succeeded after 00:07
33e8828c5b
Fixes the three findings of the werkrevisor review on PR#17: a base that is not UTF-8 or fails to load,
and duplicate ids, give YELLOW instead of judging every changeset as new or ending with ERROR.

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

🟡 werkrevisor: YELLOW / HUMAN_REVIEW

Change kind: mixed.

Reasons

  • YELLOW risky paths changed: werkrevisor/config.py (werkrevisor/config.py)
  • YELLOW spec: docs/prs/2026-10-05-PR#17-db-schema-judged-by-jev.md Scenario#17.03 hard_to_read (0.51 > yellow_above = 0.5)
  • YELLOW spec: docs/prs/2026-10-05-PR#17-db-schema-judged-by-jev.md Scenario#17.07 implementation_details (0.63 > yellow_above = 0.6)
  • YELLOW spec: docs/prs/2026-10-05-PR#17-db-schema-judged-by-jev.md Scenario#17.09 hard_to_read (0.53 > yellow_above = 0.5)
  • YELLOW 3 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/report.py, werkrevisor/rules.py
  • YELLOW no AI review: the PR needs 81468 input tokens (52560 counted with o200k_base × [model] token_count_factor = 1.55), more than the limit of 80000 derived from [budget] max_usd_per_review = 0.40

Classifier

Unit Question Problem Confidence Verdict
docs/prs/2026-10-05-PR#17-db-schema-judged-by-jev.md Scenario#17.03 hard_to_read 0.51 0.50 YELLOW
docs/prs/2026-10-05-PR#17-db-schema-judged-by-jev.md Scenario#17.07 implementation_details 0.63 – YELLOW
docs/prs/2026-10-05-PR#17-db-schema-judged-by-jev.md Scenario#17.09 hard_to_read 0.53 0.52 YELLOW

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

Usage: model `openrouter/anthropic/claude-sonnet-5.5`, LLM skipped (too large), tokens counted before the call 81468, duration 5.5 s, no model call, cost 0 USD, classifier `jev-1.13.0` calls 15, tokens in 13516, cost 0.0006 USD, config: defaults + host + repository (.werkrevisor.toml at base c50ad05).
Reviewed head `33e8828c5b5536e3e7567deca721b724abc49f32` against base `c50ad0587723025d6b62552a74a05e0d19359913`, werkrevisor 0.15.0.
<!-- werkrevisor:33e8828c5b5536e3e7567deca721b724abc49f32 --> <!-- werkrevisor-verdict:YELLOW --> ## 🟡 werkrevisor: YELLOW / HUMAN_REVIEW Change kind: `mixed`. ### Reasons - **YELLOW** risky paths changed: werkrevisor/config.py (werkrevisor/config.py) - **YELLOW** spec: docs/prs/2026-10-05-PR#17-db-schema-judged-by-jev.md Scenario#17.03 hard_to_read (0.51 > yellow_above = 0.5) - **YELLOW** spec: docs/prs/2026-10-05-PR#17-db-schema-judged-by-jev.md Scenario#17.07 implementation_details (0.63 > yellow_above = 0.6) - **YELLOW** spec: docs/prs/2026-10-05-PR#17-db-schema-judged-by-jev.md Scenario#17.09 hard_to_read (0.53 > yellow_above = 0.5) - **YELLOW** 3 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/report.py, werkrevisor/rules.py - **YELLOW** no AI review: the PR needs 81468 input tokens (52560 counted with o200k_base × [model] token_count_factor = 1.55), more than the limit of 80000 derived from [budget] max_usd_per_review = 0.40 ### Classifier | Unit | Question | Problem | Confidence | Verdict | |---|---|---|---|---| | docs/prs/2026-10-05-PR#17-db-schema-judged-by-jev.md Scenario#17.03 | hard_to_read | 0.51 | 0.50 | YELLOW | | docs/prs/2026-10-05-PR#17-db-schema-judged-by-jev.md Scenario#17.07 | implementation_details | 0.63 | – | YELLOW | | docs/prs/2026-10-05-PR#17-db-schema-judged-by-jev.md Scenario#17.09 | hard_to_read | 0.53 | 0.52 | YELLOW | 12 of 15 units passed all questions (1 PR document(s)). 7 answers ignored because of a confidence below [classifier] min_confidence. <sub> Usage: model `openrouter/anthropic/claude-sonnet-5.5`, LLM skipped (too large), tokens counted before the call 81468, duration 5.5 s, no model call, cost 0 USD, classifier `jev-1.13.0` calls 15, tokens in 13516, cost 0.0006 USD, config: defaults + host + repository (.werkrevisor.toml at base c50ad05).<br> Reviewed head `33e8828c5b5536e3e7567deca721b724abc49f32` against base `c50ad0587723025d6b62552a74a05e0d19359913`, werkrevisor 0.15.0. </sub>
mi added 1 commit 2026-10-05 22:24:47 +02:00
review: PR#17 scenarios 17.03, 17.07 and 17.09 in plain domain language
ai-review/assessment human review required; a human approval unlocks the merge; a human review request is pending
ai-review/gate build succeeded after 00:07
werkator build succeeded after 00:07
f1dbc9fdb8
Resolves the three YELLOW classifier hints of the werkrevisor review (hard_to_read, implementation_details).

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

🟡 werkrevisor: YELLOW / HUMAN_REVIEW

Change kind: mixed.

Reasons

  • YELLOW risky paths changed: werkrevisor/config.py (werkrevisor/config.py)
  • YELLOW 3 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/report.py, werkrevisor/rules.py
  • YELLOW no AI review: the PR needs 81115 input tokens (52332 counted with o200k_base × [model] token_count_factor = 1.55), more than the limit of 80000 derived from [budget] max_usd_per_review = 0.40

Classifier

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

Usage: model `openrouter/anthropic/claude-sonnet-5.5`, LLM skipped (too large), tokens counted before the call 81115, duration 5.3 s, no model call, cost 0 USD, classifier `jev-1.13.0` calls 15, tokens in 13450, cost 0.0006 USD, config: defaults + host + repository (.werkrevisor.toml at base c50ad05).
Reviewed head `f1dbc9fdb85b5a7da2056a4983186f8422ccfca2` against base `c50ad0587723025d6b62552a74a05e0d19359913`, werkrevisor 0.15.0.
<!-- werkrevisor:f1dbc9fdb85b5a7da2056a4983186f8422ccfca2 --> <!-- werkrevisor-verdict:YELLOW --> ## 🟡 werkrevisor: YELLOW / HUMAN_REVIEW Change kind: `mixed`. ### Reasons - **YELLOW** risky paths changed: werkrevisor/config.py (werkrevisor/config.py) - **YELLOW** 3 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/report.py, werkrevisor/rules.py - **YELLOW** no AI review: the PR needs 81115 input tokens (52332 counted with o200k_base × [model] token_count_factor = 1.55), more than the limit of 80000 derived from [budget] max_usd_per_review = 0.40 ### Classifier 15 of 15 units passed all questions (1 PR document(s)). 6 answers ignored because of a confidence below [classifier] min_confidence. <sub> Usage: model `openrouter/anthropic/claude-sonnet-5.5`, LLM skipped (too large), tokens counted before the call 81115, duration 5.3 s, no model call, cost 0 USD, classifier `jev-1.13.0` calls 15, tokens in 13450, cost 0.0006 USD, config: defaults + host + repository (.werkrevisor.toml at base c50ad05).<br> Reviewed head `f1dbc9fdb85b5a7da2056a4983186f8422ccfca2` against base `c50ad0587723025d6b62552a74a05e0d19359913`, werkrevisor 0.15.0. </sub>
mi merged commit 5ce5cba6cb into main 2026-10-06 07:29:56 +02:00
mi deleted branch claude-code/db-schema-judged-by-jev 2026-10-06 07:29:57 +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#17