feat(revisions): judge pending pairs and select actionable findings (#1014) - #1065
Merged
Merged
Conversation
…revisions service (#1014) Adds judge_revisions (judges plan.to_judge through the Phase A judge_pairs leaf, persisting only non-malformed verdicts, surfacing judge_pairs' own partial-batch failure/failed_index contract) and actionable_revision_findings (the strict-freshness, actionable-only read reconcile --from-findings will drive its walk from). Enforces design.md Decision B2's "the flag releases only the judge's chat send, never an embed" rule at this layer via _load_doc, a module-local copy of contradiction._load_doc's walk-independent sensitivity re-check.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PR 10 of the
decision-revision-detectorchain, which is Phase B slice P6 (stacked-to-main). It adds the judging half ofsrc/openkos/application/revisions.py:judge_revisionsjudges only P5b'sto_judgepairs with the Phase Ajudge_pairsleaf, through an injectedLLMBackend, and persists the results through P3'srecord_revision_findingskeyed by the input digests.judge_pairsreturns the completed prefix when a later call fails, so those verdicts are kept and the failure is reported onRevisionOutcome.failure.actionable_revision_findingsselects the fresh, actionable findings (REVERSES/REFINES at or above the confidence bar, with quotes) thatreconcile --from-findingswill walk in P8b._load_docre-checks sensitivity before any chat send, independently ofload_decisions's upstream exclusion. This is defense in depth, the same pattern ascontradiction._load_doc.--include-confidentialreleases only the judge's chat send, never an embed call (owner decision B2).The direction still never comes from the model (ADR-0025).
Size exception
size:exception. About 514 authored lines. The owner authorized finishing Phase B autonomously, taking the recommended option; this is the same call as #1059, #1061 and #1063.Related issue
Refs #1014
Type of change
feat— new featureHow was this tested?
AttributeError) for both functions. The send-rule test was proven falsifiable by mutation, because it was written in the same pass as_load_doc.actionable_revision_findings; theshould_blockgate disabled.test_layering.pycaught a real layering defect before commit:RevisionOutcome.failurewas first typed with the concreteopenkos.llm.ollama.OllamaError. It is nowBackendErrorfromopenkos.llm.base(ADR-0018 D1).ruff check .,ruff format --check .andmypy .are clean;pytest --cov6861 passed (96.99%);evals/run_self_tests.py43 of 43.Checklist
ruff,mypy,pytest).