diff options
| author | Anonymous Authors <anonymous@invalid.example> | 2026-07-25 13:42:41 -0500 |
|---|---|---|
| committer | Anonymous Authors <anonymous@invalid.example> | 2026-07-25 13:42:41 -0500 |
| commit | 60e5c8d2ca992e197b640c58a5ba276bb6299bf4 (patch) | |
| tree | dd714f98a535a0682818704f8222fd79e52ad3cb /src | |
| parent | 84fab096b3a2500755fea3f538933dbed0e8c72c (diff) | |
Diffstat (limited to 'src')
| -rw-r--r-- | src/gap_pipeline/kernel_models.py | 18 | ||||
| -rw-r--r-- | src/gap_pipeline/models.py | 18 | ||||
| -rw-r--r-- | src/gap_pipeline/paper_pipeline.py | 3 | ||||
| -rw-r--r-- | src/gap_pipeline/pipeline.py | 2 |
4 files changed, 2 insertions, 39 deletions
diff --git a/src/gap_pipeline/kernel_models.py b/src/gap_pipeline/kernel_models.py index f835473..0840af5 100644 --- a/src/gap_pipeline/kernel_models.py +++ b/src/gap_pipeline/kernel_models.py @@ -309,24 +309,6 @@ class JudgeVerdict(StrictModel): raise ValueError("reject verdict must identify a blocking issue") return self - def validate_coverage( - self, - dag: ProofDAG, - ) -> "JudgeVerdict": - missing_nodes = [ - node_id - for node_id in dag.node_ids() - if re.search( - rf"(?<![A-Za-z0-9_]){re.escape(node_id)}(?![A-Za-z0-9_])", - self.step_by_step_check, - ) - is None - ] - if missing_nodes: - raise ValueError(f"judge coverage incomplete: nodes={missing_nodes}") - return self - - class VerificationIteration(StrictModel): iteration: int bundle_sha256: str diff --git a/src/gap_pipeline/models.py b/src/gap_pipeline/models.py index 9b0f214..51bc49e 100644 --- a/src/gap_pipeline/models.py +++ b/src/gap_pipeline/models.py @@ -3,7 +3,6 @@ from __future__ import annotations import json -import re from datetime import datetime, timezone from typing import Any, Literal @@ -103,7 +102,7 @@ class ProofPlanDAG(StrictModel): return cls(nodes=nodes, terminal_node_id=nodes[-1].node_id) def method_labels_payload(self) -> list[str]: - """Keep the judge input a sequence while making node coverage auditable.""" + """Keep the judge input as an ordered, labeled sequence.""" return [f"{node.node_id}: {node.method_label}" for node in self.nodes] @@ -217,21 +216,6 @@ class JudgeVerdict(StrictModel): raise ValueError("reject verdict must identify a blocking issue") return self - def validate_coverage(self, dag: ProofPlanDAG) -> "JudgeVerdict": - missing = [ - node.node_id - for node in dag.nodes - if re.search( - rf"(?<![A-Za-z0-9_]){re.escape(node.node_id)}(?![A-Za-z0-9_])", - self.step_by_step_check, - ) - is None - ] - if missing: - raise ValueError(f"judge check does not cover DAG nodes: {missing}") - return self - - class IterationRecord(StrictModel): iteration: int candidate_sha256: str diff --git a/src/gap_pipeline/paper_pipeline.py b/src/gap_pipeline/paper_pipeline.py index ffe9f15..6998a17 100644 --- a/src/gap_pipeline/paper_pipeline.py +++ b/src/gap_pipeline/paper_pipeline.py @@ -343,7 +343,6 @@ class PaperKernelPipeline: judge: JsonLLM, *, item: CanonicalItem, - dag: ProofDAG, methods: MethodPlan, bundle: CandidateBundle, iteration: int, @@ -361,7 +360,6 @@ class PaperKernelPipeline: bundle.variant, ), response_model=JudgeVerdict, - validate=lambda value: value.validate_coverage(dag), ) return verdict @@ -398,7 +396,6 @@ class PaperKernelPipeline: self._judge_once( judge, item=item, - dag=dag, methods=methods, bundle=bundle, iteration=iteration, diff --git a/src/gap_pipeline/pipeline.py b/src/gap_pipeline/pipeline.py index 9d03525..7876151 100644 --- a/src/gap_pipeline/pipeline.py +++ b/src/gap_pipeline/pipeline.py @@ -171,7 +171,7 @@ class KernelPipeline: system_prompt=JUDGE_SYSTEM_PROMPT, user_prompt=judge_user(item, plan, dag, candidate), ) - return JudgeVerdict.model_validate(payload).validate_coverage(dag) + return JudgeVerdict.model_validate(payload) async def _repair( self, |
