Repository navigation
Only conflicts involving the changed rules fail the consistency check - #236
Conversation
The consistency judge reviews a whole owner directory and so reports every conflict in it. The gate failed the change for any of them, including conflicts between rules the change never touched. Refining cannot fix those, so every change in such a directory was blocked for good and spent two paid refine rounds on it. The first live run hit exactly this. On main (48e8b4a), CONF-1a..4a are duplicated across two configuration pages, and DIFF-2s/2t and SERV-4o/4r5 already conflict. Both intake batches ended refine_exhausted. - check_consistency(changed=...) now takes the rule IDs the change adds, edits, retires or supersedes. - A conflict naming one of them is the change's. - A conflict between untouched rules is kept as "preexisting" and does not fail the change; the directory then counts as consistent. - The changed IDs include the ### rules nested inside a changed rule. - A conflict that names no rule, has null or non-string IDs, or is malformed still counts against the change (fail closed). - The judge's prompt now carries changed_rule_ids. - Calibration passes no `changed`, so it keeps the strict whole-directory verdict. Tests: a conflict already on main passes; one involving the new rule fails; an unnamed or null-ID conflict fails; a conflict naming a nested rule of the new rule fails; the judge is told the changed IDs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7bd797917f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| ids = conflict[:2] | ||
| if not all(isinstance(i, str) and i.strip() for i in ids): | ||
| return True | ||
| return any(i.strip() in changed for i in ids) |
There was a problem hiding this comment.
Fail closed on unrecognized rule IDs
If the consistency model reports a changed-rule conflict with a typo or decoration in the ID—for example DEMO-2 instead of changed rule DEMO-2a—both IDs remain nonempty strings, so _names_changed returns false and lines 212–217 promote the overall conflict verdict to consistent. This can allow contradictory rules to be signed and auto-merged. Only classify a conflict as preexisting when both reported IDs resolve to known unchanged rules in the judged tree; unrecognized IDs should remain fail-closed.
Useful? React with 👍 / 👎.
The consistency judge reviews a whole owner directory, and the gate failed a change for ANY conflict in it, including conflicts between rules the change never touched. Those are unfixable by refining, so every change in such a directory was blocked forever after two paid refine rounds.
First live run (service on the GPU box, shadow): both intake batches ended
refine_exhaustedon conflicts already on main at 48e8b4a — CONF-1a..4a duplicated across two configuration pages, DIFF-2s/2t and SERV-4o/4r5.###rules nested inside them) fails the change; others are kept aspreexistingand the directory counts as consistent.changed_rule_ids; calibration keeps the strict whole-directory verdict.Tests in
test_kb_intake_gate.py: pre-existing conflict passes; conflict with the new rule fails; unnamed/null conflict fails; nested rule counts; judge sees the changed IDs. Commit hook (gpt-6-astra-high) APPROVE at iteration 2 (iteration 1 found the nested-ID and null-ID bypasses, fixed and tested).🤖 Generated with Claude Code