Read and write each record through the store its config names, and open one for agents with project-record
CI / tests (pull_request) Successful in 2m14s

This commit is contained in:
2026-11-13 23:54:04 +01:00
parent 854eb63407
commit 084bc74b1c
40 changed files with 624 additions and 161 deletions
+4 -8
View File
@@ -104,6 +104,7 @@ from release_plan.named_code import named_files
from project_config.main import project
from transcript_archive.location import project_archive
from score_outcomes.reversals import reversal_lines
from record_store.stores import store
# The scores score-outcomes takes, in order.
GIVEN = ("L", "E", "I", "S")
@@ -167,17 +168,12 @@ def failed(failure: Failure) -> int:
def read_anchors() -> Anchors | Failure:
"""The project's anchors as they stand where its config puts them, so a branch that edits them shows its edit; none where it has no such file."""
"""The project's anchors as they stand in the store its config names, so a branch that edits them shows its edit; none where it keeps none."""
config = project()
if isinstance(config, Failure):
return config
anchors = config.paths["score-anchors"]
try:
return parse_anchors(anchors.read_text(encoding="utf-8"))
except FileNotFoundError:
return []
except (OSError, UnicodeDecodeError) as failure:
return Failure(f"cannot read {anchors}: {failure}")
text = store(config, "score-anchors").read()
return text if isinstance(text, Failure) else parse_anchors(text)
def read_reversals() -> list[str] | Failure: