Skip to content

[3498 by Claude Opus 5.5] Add a category to review findings, an unrequested-complexity lens, and stop Ultrafix on style-only findings - #3502

Merged
integry merged 1 commit into
3498-epic-trust-the-arvfrom
3498/claude-opus-5-5-add-a-category-to-review--20261112-1719-gyi
Nov 12, 2026
Merged

integry merged 1 commit into
3498-epic-trust-the-arvfrom
3498/claude-opus-5-5-add-a-category-to-review--20261112-1719-gyi

Conversation

@propr-dev

@propr-dev propr-dev Bot commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

AI Implementation Summary

Closes #3498

Branch: 3498/claude-opus-5-5-add-a-category-to-review--20261112-1719-gyi
Commits: ✅ Changes committed (015aacc)


AI Processing Completed

Execution Details:

Summary:
Review blockers now carry a category, the review prompt checks for unrequested complexity and placeholder work, and Ultrafix stops when the only blockers left are stylistic. Typecheck passes for the root, packages/api, packages/core and propr-ui. eslint --max-warnings 0 is clean for root src/, packages/api, packages/core and packages/shared; the one propr-ui file I touched (a type) was skipped by its lint config, so it was only typechecked. 63 review/Ultrafix/PR-comment test files and 12 API test files pass, all run through run-test-suite.mjs.

Categories

  • ActionableFinding has a category field: correctness, requirement, security, tests, complexity or style. The vocabulary and helpers are in a new file, src/jobs/reviewFindingCategory.ts.
  • The parser accepts the old field sets and the new ones with category. A missing category is read as correctness. Case and backticks are ignored.
  • Decision for you: a category outside the list makes the review invalid rather than being quietly changed to another category. In Ultrafix, that triggers a retry review. If you'd rather map unknown values to correctness, it's a one-line change in parseReviewFindingCategory.
  • The public comment shows - **Category:** … as the first field of each F#. The /fix input and the /fix agent context also include it.

Review prompt

  • DEFAULT_REVIEW_GUIDANCE now asks the reviewer to:
    • flag unrequested complexity as complexity.
    • flag reduced or placeholder work reported as done as requirement.
    • put purely stylistic points in Suggestions, using style only for a blocker that breaks an explicit repository rule.
  • The fixed (non-overridable) part of the prompt lists the category field and defines each category. For requirement, tests, complexity and style blockers, the evidence is the gap between what was asked for and the changed code, not a runtime failure sequence.
  • A new "Change size" section gives the whole diff's file count and +/- lines, and the word count of the effective objective. Both are measured before any budget trimming. The wording stays neutral.

Ultrafix

  • determineNextAction now takes the categories of the remaining blockers. If every one is style, the loop stops with the reason "Only stylistic findings remain; no further fix was scheduled", schedules no fix, and posts a stop comment saying so.
  • This uses a new outcome, style_findings_only. It is added to UltrafixOutcome, the operation summary (the receipt shows as completed), the UI type, and docs/mcp.md.
  • Score rules are unchanged: blockers still cap the score at 6, so the goal is not reached and jobReachedGoal stays false. A test checks both stay consistent.

Storage

  • A new migration, 20261112000000_add_review_score_blocker_categories.js, adds a nullable JSON column review_scores.blocker_categories. It is safe to re-run in either direction, and existing rows stay null. New rows store a count for every category.

Other changes

  • reviewOutputParser.ts was over the 400-line lint limit, so I moved the unused-in-production getNext*Number helpers to src/jobs/reviewRecordNumbering.ts.
  • I updated the existing tests that pin the field list or the rendered output.
  • New tests are in test/reviewFindingCategory.test.ts, plus cases in the Ultrafix entry-point, MCP progress and review-score stats suites. They cover old and new comment parsing, rendering, the stop rule, goal consistency, the prompt text and the migration.

I made no visual previews: the only visible change is one extra line in a markdown bot comment, and the project has no tool for rendering those.

Detailed Logs:

  • Conversation: 243 messages
  • Session: 6857c0a0-be7c-4d22-a57a-cdacfd43efdf

Log files stored at:

  • conversation: /usr/src/app/logs/executions/issue-3498-2026-11-12T17-46-56-039Z-conversation.json
  • output: /usr/src/app/logs/executions/issue-3498-2026-11-12T17-46-56-039Z-output.txt
Latest Conversation Messages
ASSISTANT: [content unavailable]

ASSISTANT: Review blockers now carry a category, the review prompt checks for unrequested complexity and placeholder work, and Ultrafix stops when the only blockers left are stylistic. Typecheck passes for the r...


This PR was created automatically by ProPR after processing issue #3498.


💡 Need changes?

Comment on this PR to request refinements — the AI agent monitors comments and will update the implementation based on your feedback. Keep iterating until you're satisfied!

…requested complexity and placeholder work, and Ultrafix stops when the only blockers left are stylistic. Typecheck passes for the root, `packages/api`, `packages/core` and `propr-ui`. `eslint --max-warnings 0` is clean for root `src/`, `packages/api`, `packages/core` and `packages/shared`; the one `propr-ui` file I touched (a type) was skipped by its lint config, so it was only typechecked. 63 review/Ultrafix/PR-comment test files and 12 API test files pass, all run through `run-test-suite.mjs`.

Categories
- `ActionableFinding` has a `category` field: `correctness`, `requirement`, `security`, `tests`, `complexity` or `style`. The vocabulary and helpers are in a new file, `src/jobs/reviewFindingCategory.ts`.
- The parser accepts the old field sets and the new ones with `category`. A missing category is read as `correctness`. Case and backticks are ignored.
- Decision for you: a category outside the list makes the review invalid rather than being quietly changed to another category. In Ultrafix, that triggers a retry review. If you'd rather map unknown values to `correctness`, it's a one-line change in `parseReviewFindingCategory`.
- The public comment shows `- Category: …` as the first field of each F#. The `/fix` input and the `/fix` agent context also include it.

Review prompt
- `DEFAULT_REVIEW_GUIDANCE` now asks the reviewer to:
  - flag unrequested complexity as `complexity`.
  - flag reduced or placeholder work reported as done as `requirement`.
  - put purely stylistic points in Suggestions, using `style` only for a blocker that breaks an explicit repository rule.
- The fixed (non-overridable) part of the prompt lists the category field and defines each category. For `requirement`, `tests`, `complexity` and `style` blockers, the evidence is the gap between what was asked for and the changed code, not a runtime failure sequence.
- A new "Change size" section gives the whole diff's file count and +/- lines, and the word count of the effective objective. Both are measured before any budget trimming. The wording stays neutral.

Ultrafix
- `determineNextAction` now takes the categories of the remaining blockers. If every one is `style`, the loop stops with the reason "Only stylistic findings remain; no further fix was scheduled", schedules no fix, and posts a stop comment saying so.
- This uses a new outcome, `style_findings_only`. It is added to `UltrafixOutcome`, the operation summary (the receipt shows as completed), the UI type, and `docs/mcp.md`.
- Score rules are unchanged: blockers still cap the score at 6, so the goal is not reached and `jobReachedGoal` stays false. A test checks both stay consistent.

Storage
- A new migration, `20261112000000_add_review_score_blocker_categories.js`, adds a nullable JSON column `review_scores.blocker_categories`. It is safe to re-run in either direction, and existing rows stay null. New rows store a count for every category.

Other changes
- `reviewOutputParser.ts` was over the 400-line lint limit, so I moved the unused-in-production `getNext*Number` helpers to `src/jobs/reviewRecordNumbering.ts`.
- I updated the existing tests that pin the field list or the rendered output.
- New tests are in `test/reviewFindingCategory.test.ts`, plus cases in the Ultrafix entry-point, MCP progress and review-score stats suites. They cover old and new comment parsing, rendering, the stop rule, goal consistency, the prompt text and the migration.

I made no visual previews: the only visible change is one extra line in a markdown bot comment, and the project has no tool for rendering those.
@propr-dev

propr-dev Bot commented Nov 12, 2026

Copy link
Copy Markdown
Contributor Author

/ultrafix goal=8 max=10
Triggered automatically by the requested execution settings.

@propr-dev

propr-dev Bot commented Nov 12, 2026

Copy link
Copy Markdown
Contributor Author

🔄 Ultrafix loop started (goal: 8/10, max cycles: 10)

First action: /review

💡 Tip: Remove the ultrafix label from this PR to stop further ultrafix cycles.

@propr-dev

propr-dev Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ AI Code Review Complete requested by @propr-ultrafix

Posted 1 review:

View Task Details

@propr-dev

propr-dev Bot commented Nov 12, 2026

Copy link
Copy Markdown
Contributor Author

🔍 AI Code Review — codex:gpt-6-astra

Overall Evaluation

The PR consistently carries finding categories through parsing, public comments, fix inputs, persistence, and Ultrafix termination. It appears merge-ready within scope, conditional on the five pending checks completing successfully. This review used static analysis of the supplied code; no commands or tests were run.

✅ Backward compatibility — Both machine and public findings accept an omitted category as correctness, while unknown categories invalidate the review.

✅ Accurate goal semantics — Style-only findings stop automatic fixes without removing the blocker score cap or treating the review as having reached its goal.

✅ Compatible storage change — The nullable category-count column preserves existing rows, with tests covering repeated migration and rollback.

Merge blockers

No merge blockers.

Suggestions

These are optional follow-ups and are not sent to /fix.

S1: 🟢 Align category-specific evidence instructions

In src/jobs/reviewPromptBuilder.ts, the new category guidance permits concrete requirement gaps without a runtime failure sequence, but the subsequent “Demonstrated failure” paragraph still universally requires a trigger and ordered failure sequence. Explicitly applying that paragraph only where relevant would make the prompt clearer. This is optional because the preceding category-specific exception already explains the intended behavior; the supplied code does not demonstrate a resulting review failure.

Score

The implementation covers the requested behavior with compatibility and integration tests, and no merge-blocking defect was verified. Current checks report no failures, with five still pending.

Score: 8/10


🤖 Review Details

  • Model: GPT-6 Astra
  • Time: 21s
  • Tokens: 67,601 (67,166 in / 435 out)
  • Cost: $0.58

View Task


💡 Next step: Comment /fix to address every F# merge blocker, /fix all for every pending blocker and suggestion, or name records explicitly, as in /fix F3 S5.
F# and S# IDs increment across review comments and remain permanent, so selectors such as /fix F3 F5 stay unambiguous across cycles. S# suggestions stay optional: they are implemented only when you name them or request /fix all, and they never relax a merge blocker.

Copy and edit to choose records from this review:

/fix S1

🤖 Review by ProPR

@propr-dev propr-dev Bot removed the ultrafix label Nov 12, 2026
@integry
integry merged commit 6a94d61 into 3498-epic-trust-the-arv Nov 12, 2026
66 checks passed
@integry
integry deleted the 3498/claude-opus-5-5-add-a-category-to-review--20261112-1719-gyi branch November 12, 2026 18:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant