From 7b68ae2312622ec40db9165b7fb60e3e004d4d95 Mon Sep 17 00:00:00 2001 From: Tristan Simas Date: Wed, 21 Oct 2026 19:52:14 -0400 Subject: [PATCH] Delete dead commander delivery verb; use the holder tool --- src/agent_comms/commander/order.py | 22 ------------------- .../skills/comms-commander/SKILL.md | 2 +- tests/test_order_claims.py | 11 +++++----- 3 files changed, 7 insertions(+), 28 deletions(-) diff --git a/src/agent_comms/commander/order.py b/src/agent_comms/commander/order.py index 01a31afde2..5a04b5b97a 100644 --- a/src/agent_comms/commander/order.py +++ b/src/agent_comms/commander/order.py @@ -94,7 +94,6 @@ CommsChangeProblemTool, CommsFireTool, CommsOrderCheckTool, - CommsOrderDeliverTool, CommsOrderDoneTool, CommsOrderServeTool, CommsOrderTool, @@ -931,27 +930,6 @@ def run(self, ctx: Commander) -> None: ctx.withdraw(self.pid, self.why, self.superseded_by) -@dataclass(frozen=True, kw_only=True) -class DeliverVerb(OrderVerb): - help = "record your delivery claim and answer the commander" - problem: Annotated[str, Argument(flags=("problem",), options={"metavar": "PROBLEM"})] - pull_request: Annotated[int, Argument(flags=("--pr",))] - head: Annotated[str, Argument(flags=("--sha",))] - report_file: Annotated[str, Argument(flags=("--report-file",))] - - def gate(self, ctx: Commander) -> None: - ctx.comms.registry.require(self.who(ctx)).role.require_executable( - ValueError("A delivery claim requires a registered unit.") - ) - - def run(self, ctx: Commander) -> None: - ctx.call(CommsOrderDeliverTool( - problem=self.problem, pull_request=self.pull_request, - head=self.head, report=Path(self.report_file).read_text(), - )) - print(f'{self.problem}: delivery claim recorded') - - @dataclass(frozen=True, kw_only=True) class DoneVerb(OrderVerb): help = "Core checks the delivered commit; late delivery is a strike" diff --git a/src/agent_comms/skills/comms-commander/SKILL.md b/src/agent_comms/skills/comms-commander/SKILL.md index 623af9c57e..89f82b997b 100644 --- a/src/agent_comms/skills/comms-commander/SKILL.md +++ b/src/agent_comms/skills/comms-commander/SKILL.md @@ -83,7 +83,7 @@ Pick the next unit. Read its actual state, not its message: worktree, `git log - One line per unit touched, then the next unit. - **Handling an event is never where the turn ends; the next unit's state is.** Every wait is prep: pre-read the files the next order touches. -- **A unit records its delivery, not just a chat report:** `order deliver PROBLEM --fork UNIT --pr N --sha HEAD_COMMIT --report-file REPORT.txt` (or the native `comms_order_deliver` tool). Core stores Claimed and answers the commander. Only the holder may claim; the commander uses `order done UNIT PROBLEM --sha SHA` to accept it, or sends it back with corrected instructions. Claimed orders are not reissued on restart. +- **A unit records its delivery, not just a chat report:** the unit calls the native `comms_order_deliver` tool as itself. Core stores Claimed and answers the commander. Only the holder may claim; the commander uses `order done UNIT PROBLEM --sha SHA` to accept it, or sends it back with corrected instructions. Claimed orders are not reissued on restart. - **A hunt is `order hunt FILE:LINE --why ... --sent PROBLEM`** (rules/send-backs-and-strikes.md says when). ## Slop is a defined term diff --git a/tests/test_order_claims.py b/tests/test_order_claims.py index 03b9feda12..e308ab30ee 100644 --- a/tests/test_order_claims.py +++ b/tests/test_order_claims.py @@ -1,4 +1,4 @@ -"""A holder claims through the real command/tool boundary on a copied bus.""" +"""A holder claims through the real tool boundary on a copied bus.""" from contextlib import chdir from dataclasses import replace import json @@ -32,6 +32,7 @@ held_commander, pr_commander, ) +from test_proof_build import proof_build_checkouts # noqa: F401 - shared copied-bus fixture from test_todos import order, thread @@ -53,8 +54,7 @@ def test_claim_verdict_family_on_retained_copy(held_commander): ThreadCaller(ctx.commander).invoke(request, comms) assert comms.goals.todos.get("P1") == original - main(["deliver", "P1", "--fork", "worker", "--pr", "1", "--sha", sha, - "--report-file", str(report)], ctx) + ThreadCaller("worker").invoke(request, comms) claimed = comms.goals.todos.get("P1") assert isinstance(claimed.order, ClaimedProblemOrder) assert not claimed.pending @@ -104,8 +104,9 @@ def claimed_by_worker(ctx) -> Todo: sha = ctx.repos[0].git(ctx.repos[0].checkout, "rev-parse", "HEAD").strip() report = ctx.root / "report.txt" report.write_text("The source change is published; inspect its actual diff before accepting it.") - main(["deliver", "P1", "--fork", "worker", "--pr", "1", "--sha", sha, - "--report-file", str(report)], ctx) + ThreadCaller("worker").invoke(CommsOrderDeliverTool( + problem="P1", pull_request=1, head=sha, report=report.read_text(), + ), ctx.comms) claimed = ctx.comms.goals.todos.get("P1") assert isinstance(claimed.order, ClaimedProblemOrder) return claimed