Coevolution extension

This commit is contained in:
2026-04-29 01:19:59 +02:00
parent 88afdc09fd
commit 991c34ce52
17 changed files with 764 additions and 4 deletions

View File

@@ -54,6 +54,19 @@ class ReviewDecision:
created_at: str
@dataclass(frozen=True)
class ExpectationGap:
id: int
repository_id: int
analysis_run_id: int | None
expected_type: str
expected_name: str
source: str
notes: str
status: str
created_at: str
@dataclass(frozen=True)
class AnalysisRunDiffItem:
change_type: str

View File

@@ -16,6 +16,7 @@ from repo_registry.core.models import (
CandidateFeature,
CandidateGraph,
ContentChunk,
ExpectationGap,
ObservedFact,
Repository,
RepositoryAbilityMap,
@@ -282,6 +283,39 @@ class RegistryService:
) -> list[ReviewDecision]:
return self.store.list_review_decisions(repository_id, analysis_run_id)
def record_expectation_gap(
self,
repository_id: int,
*,
analysis_run_id: int | None = None,
expected_type: str,
expected_name: str,
source: str,
notes: str = "",
) -> ExpectationGap:
gap = self.store.create_expectation_gap(
repository_id,
analysis_run_id,
expected_type=expected_type,
expected_name=expected_name,
source=source,
notes=notes,
)
self.store.create_review_decision(
repository_id,
analysis_run_id,
action="record_expectation_gap",
notes=f"{source} expected {expected_type}: {expected_name}",
)
return gap
def list_expectation_gaps(
self,
repository_id: int,
analysis_run_id: int | None = None,
) -> list[ExpectationGap]:
return self.store.list_expectation_gaps(repository_id, analysis_run_id)
def list_observed_facts(
self,
repository_id: int,