Answer stability round 1: 1 🔴, 3 🟡 (0 misread); define SEAT_AGENT once, drop the duplicate prepare-scoring check, restore the worktree assertion
CI / tests (pull_request) Successful in 4m34s
CI / tests (pull_request) Successful in 4m34s
This commit is contained in:
@@ -211,10 +211,6 @@ def run_needs_scoring_run(given: list[str]) -> Failure | None:
|
||||
return with_default_branch(lambda default: needs_scoring_run(default, [int(id_) for id_ in given], pathlib.Path.home()), stale_ok=False)
|
||||
|
||||
|
||||
def fits_prepare_scoring(given: list[str]) -> bool:
|
||||
return not given
|
||||
|
||||
|
||||
def run_record_scoring(given: list[str]) -> Failure | None:
|
||||
return with_default_branch(lambda default: record_scoring(default, pathlib.Path(given[0]), [int(id_) for id_ in given[1:]], pathlib.Path.home(), time.time(), print, warn), stale_ok=False)
|
||||
|
||||
@@ -235,7 +231,7 @@ COMMANDS = {
|
||||
"needs-scoring-run": Command("needs-scoring-run [<item ID>...]", are_ids, run_needs_scoring_run, ids_from=0),
|
||||
"scoring-run-owed": Command("scoring-run-owed", no_arguments, lambda given: with_default_branch(lambda default: owed(default, pathlib.Path.home()), stale_ok=False)),
|
||||
"record-ruling": Command("record-ruling <votes file>", lambda given: len(given) == 1, lambda given: printed(record_ruling(pathlib.Path(given[0]), pathlib.Path.home(), time.time()))),
|
||||
"prepare-scoring": Command("prepare-scoring", fits_prepare_scoring, lambda given: prepared_scoring()),
|
||||
"prepare-scoring": Command("prepare-scoring", no_arguments, lambda given: prepared_scoring()),
|
||||
"record-scoring": Command("record-scoring <scores file> [<item ID>...]", lambda given: bool(given) and are_ids(given[1:]), run_record_scoring, ids_from=1),
|
||||
"places": Command("places", no_arguments, lambda given: printed(read_places(pathlib.Path.home()))),
|
||||
"agreement": Command("agreement", no_arguments, lambda given: printed(read_agreement(pathlib.Path.home()))),
|
||||
|
||||
@@ -10,6 +10,7 @@ from git_cli.git_repo import git
|
||||
from project_config.main import located
|
||||
from review_rules.review_folder import made_review_folder, review_folder
|
||||
from project_config.settings import ProjectConfig
|
||||
from review_rules.review_passes import SEAT_AGENT
|
||||
from record_store.stores import store
|
||||
|
||||
PANEL = pathlib.Path(__file__).resolve().parents[2] / "skills" / "comprehension-panel"
|
||||
@@ -22,8 +23,6 @@ SEATS = (
|
||||
)
|
||||
# The dimensions a seat scores beside the overall, which comes last in DIMENSIONS.
|
||||
PANEL_DIMENSIONS = DIMENSIONS[:-1]
|
||||
# The agent under agents/ that runs each seat.
|
||||
SEAT_AGENT = "comprehension-seat"
|
||||
VALUE_NAMES = ("language", "kind", "domain", "domain docs", "3am question")
|
||||
# The files no seat may open, by the setting that places each, and what each is.
|
||||
FORBIDDEN = (("plan", "the plan"), ("decisions", "the decision log"), ("comprehension-history", "past panels' records"), ("reading-cost", "past chunks' reading cost"))
|
||||
|
||||
@@ -181,7 +181,7 @@ class PrepareScoring(unittest.TestCase):
|
||||
unread = self.prepare()
|
||||
assert isinstance(unread, Failure), unread
|
||||
self.assertTrue(unread.reason.startswith(f"cannot read {self.checkout}/AGENTS.md: "), unread.reason)
|
||||
|
||||
self.assertEqual(len(self.git("worktree", "list").splitlines()), 1)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
@@ -5,9 +5,9 @@ import unittest
|
||||
|
||||
sys.path.insert(0, str(pathlib.Path(__file__).resolve().parents[1]))
|
||||
|
||||
from review_rules.review_passes import PASS_AGENTS, PASSES
|
||||
from review_rules.review_passes import PASS_AGENTS, PASSES, SEAT_AGENT
|
||||
from repo_checks import ROOT
|
||||
from rule_hook.reviewer_rung import SEAT, SEAT_AGENT, SECURITY_OPENER
|
||||
from rule_hook.reviewer_rung import SEAT, SECURITY_OPENER
|
||||
|
||||
OPENING = re.compile(r"^## Opening\n+```\n([^\n]+?\.)(?: |\n)", re.MULTILINE)
|
||||
# An agent's name, as opposed to the skill or plugin that reviews a pass.
|
||||
|
||||
@@ -13,6 +13,8 @@ def _reviewed(name: str) -> typing.TypeGuard[ReviewedPass]:
|
||||
return name in typing.get_args(ReviewedPass)
|
||||
|
||||
|
||||
# The agent under agents/ that every comprehension seat runs as; it reviews no pass, so it is not in `PASS_AGENTS`: skills/larv-review/SKILL.md → "Comprehension check".
|
||||
SEAT_AGENT = "comprehension-seat"
|
||||
# The passes that have an agent. A pass missing from `ReviewedPass` drops out of it, which test_review_passes fails on.
|
||||
REVIEWERS: dict[ReviewedPass, str] = {name: agent for name, agent in PASS_AGENTS.items() if agent and _reviewed(name)}
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ import unittest
|
||||
|
||||
sys.path.insert(0, str(pathlib.Path(__file__).resolve().parents[1]))
|
||||
|
||||
from review_rules.review_passes import PASS_AGENTS, PASSES, prose, ReviewedPass, REVIEWERS
|
||||
from review_rules.review_passes import PASS_AGENTS, PASSES, prose, ReviewedPass, REVIEWERS, SEAT_AGENT
|
||||
|
||||
|
||||
class ReviewPasses(unittest.TestCase):
|
||||
@@ -15,7 +15,7 @@ class ReviewPasses(unittest.TestCase):
|
||||
|
||||
def test_names_each_agent_under_agents_beside_the_comprehension_seat_that_reviews_no_pass(self):
|
||||
agents = pathlib.Path(__file__).resolve().parents[2] / "agents"
|
||||
self.assertEqual(sorted([*REVIEWERS.values(), "comprehension-seat"]), sorted(path.stem for path in agents.glob("*.md")))
|
||||
self.assertEqual(sorted([*REVIEWERS.values(), SEAT_AGENT]), sorted(path.stem for path in agents.glob("*.md")))
|
||||
|
||||
def test_counts_markdown_an_agent_follows_as_config_and_the_rest_as_prose(self):
|
||||
for path in ("README.md", "docs/decisions.md", "todo.md", "workflow-bench/README.md"):
|
||||
|
||||
@@ -10,14 +10,13 @@ from rule_hook.git import guarded_git
|
||||
from model_routing.worker_rungs import handed, hands_rungs
|
||||
from model_routing.ladder import Ladder, ReviewKind, Rung
|
||||
from model_routing.ladder_file import project_ladder
|
||||
from review_rules.review_passes import prose, REVIEWERS
|
||||
from review_rules.review_passes import prose, REVIEWERS, SEAT_AGENT
|
||||
from claude_code.transcript import read_transcript
|
||||
from claude_code.entries import UserText
|
||||
|
||||
# The pass each agent under agents/ reviews.
|
||||
PASS_OF = {agent: kind for kind, agent in REVIEWERS.items()}
|
||||
# The agent under agents/ that every comprehension seat runs as, and the opening of every seat's prompt, which also marks a seat launched as another agent: skills/larv-review/SKILL.md → "Comprehension check", skills/comprehension-panel/seat-prompts.md → "Opening".
|
||||
SEAT_AGENT = "comprehension-seat"
|
||||
# The opening of every seat's prompt, which marks a seat launched as an agent other than SEAT_AGENT: skills/comprehension-panel/seat-prompts.md → "Opening".
|
||||
SEAT = "You are one seat of a comprehension panel."
|
||||
# The opening of the security pass's prompt: skills/larv-review/SKILL.md → "Security".
|
||||
SECURITY_OPENER = "You are the security pass for this chunk."
|
||||
|
||||
Reference in New Issue
Block a user