Merge main (Coordinator recovery and manual packages) into ISSUE-24
Resolve the package contract's Tester/Coordinator adoption passage by keeping v0.15.0 recorded as published and main's full list of in-source v0.17.0 Coordinator packages. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
commit
2f57b2aed7
11 files changed
+473
-16
No files matched your search
@@ -134,8 +134,36 @@ class OverrideGuideTests(unittest.TestCase):
|
||||
text = section(self.text, "Customize the Technical Coordinator").lower()
|
||||
for phrase in ("wave aggressiveness", "contention heuristics", "reporting tone",
|
||||
"`coordinator-dispatch`", "`wave-selection.md`", "`coordinator-communication`",
|
||||
"`portfolio_conflict`", "`unique_resource_needed`", "leases"):
|
||||
self.assertIn(phrase.lower(), text)
|
||||
"`portfolio_conflict`", "`unique_resource_needed`", "leases",
|
||||
"`coordinator-wave-audit`", "`coordinator-tracker-hygiene`",
|
||||
"`/skill:<name>`", "invocationmode: manual",
|
||||
"fork `coordinator-wave-audit` too",
|
||||
"applies any tracker change the coordinator proposes",
|
||||
"records stale edges as resolved"):
|
||||
self.assertIn(phrase.lower(), " ".join(text.split()))
|
||||
self.assertNotIn("once relayview admits the pair", " ".join(text.split()))
|
||||
boundary = [row for row in table_rows(section(self.text, "What a skill controls and what the owner enforces"))
|
||||
if row[0] == "Coordination"]
|
||||
self.assertEqual(len(boundary), 1)
|
||||
self.assertIn("wave audit", boundary[0][1])
|
||||
self.assertIn("tracker changes", boundary[0][2])
|
||||
ledger_seam = [row for row in table_rows(text) if row[0] == "what goes in the working ledger"]
|
||||
self.assertEqual(len(ledger_seam), 1)
|
||||
self.assertIn("`coordinator-tracker-hygiene`", ledger_seam[0][1])
|
||||
|
||||
def test_coordinator_recovery_is_overridable_without_dispatch(self):
|
||||
text = section(self.text, "Customize the Technical Coordinator")
|
||||
for phrase in ("`coordinator-recovery`", "nudge", "reorientation", "Working Ledger",
|
||||
"named set", "Settings → Skills", "nudge budgets and cooldowns"):
|
||||
self.assertIn(phrase.lower(), text.lower())
|
||||
members = re.search(r"members: \[(.*?)\]", text).group(1).split(", ")
|
||||
self.assertIn("coordinator-dispatch", members)
|
||||
self.assertIn("coordinator-communication", members)
|
||||
self.assertNotIn("coordinator-recovery", members)
|
||||
fork = [name for name in members if name.endswith("-coordinator-recovery")]
|
||||
self.assertEqual(len(fork), 1, members)
|
||||
self.assertIn("role: coordinator", text)
|
||||
self.assertIn("step: coordination", text)
|
||||
|
||||
def test_layer_four_template_is_a_valid_user_package(self):
|
||||
template = section(self.text, "Layer-4 authoring template")
|
||||
|
||||
@@ -37,6 +37,7 @@ class PackageTests(unittest.TestCase):
|
||||
|
||||
def test_coordinator_packages_are_automatic_v0_17_0_coordination_guidance(self):
|
||||
expected = {"coordinator-dispatch": (1, ["SKILL.md", "wave-selection.md"]),
|
||||
"coordinator-recovery": (1, ["SKILL.md"]),
|
||||
"coordinator-communication": (3, ["SKILL.md"])}
|
||||
for name, (schema, files) in expected.items():
|
||||
with self.subTest(package=name):
|
||||
@@ -68,6 +69,58 @@ class PackageTests(unittest.TestCase):
|
||||
for phrase in ("nudge", "reorient", "Working Ledger"):
|
||||
self.assertNotIn(phrase, text)
|
||||
|
||||
def test_coordinator_recovery_triages_blockers_before_a_bounded_nudge(self):
|
||||
text = (ROOT / "packages/coordinator-recovery/SKILL.md").read_text()
|
||||
for phrase in ("Portfolio Read Model", "Lease Registry", "waiting reason",
|
||||
"Operator input", "external gate", "held or queued lease",
|
||||
"Never nudge a task that is waiting",
|
||||
"resume it", "please keep going", "current stage",
|
||||
"nudge budget", "cooldown", "the owner refuses a nudge",
|
||||
"stop nudging", "park", "diagnostic summary"):
|
||||
self.assertIn(phrase, text)
|
||||
# A second stall after a nudge, at any stage, ends nudging for the task.
|
||||
self.assertIn("When the task stalls again after a nudge, at any stage,", text)
|
||||
self.assertNotIn("at the same stage after a nudge", text)
|
||||
# Blocker triage comes before any nudge.
|
||||
self.assertLess(text.index("## Triage before nudging"), text.index("## Nudge a stalled task"))
|
||||
|
||||
def test_coordinator_recovery_reorients_from_owner_state_not_chat_memory(self):
|
||||
text = (ROOT / "packages/coordinator-recovery/SKILL.md").read_text()
|
||||
for phrase in ("fresh session", "context refresh", "Portfolio Read Model", "Working Ledger",
|
||||
"active waves", "held leases", "contention edges", "nudge counts",
|
||||
"pending Review Packets", "closed issues",
|
||||
"not a record of the portfolio", "the owner's state wins"):
|
||||
self.assertIn(phrase, text)
|
||||
# Durable state is read from the owner, never recalled from the conversation.
|
||||
lowered = text.lower()
|
||||
for phrase in ("remember", "recall", "from memory", "earlier in the conversation"):
|
||||
self.assertNotIn(phrase, lowered)
|
||||
|
||||
def test_coordinator_recovery_follows_autopilot_and_yields_to_the_operator(self):
|
||||
text = (ROOT / "packages/coordinator-recovery/SKILL.md").read_text()
|
||||
autopilot = text[text.index("## Autopilot"):text.index("## Reorient after a context refresh")]
|
||||
for phrase in ("When Autopilot is `Off`", "propose", "the Operator approves",
|
||||
"When Autopilot is `On`", "pauses Autopilot or starts a conversation",
|
||||
"safe turn boundary", "the Autopilot setting the owner then reports"):
|
||||
self.assertIn(phrase, autopilot)
|
||||
# Every mention of the ledger uses one name.
|
||||
self.assertNotIn("Coordinator Working Ledger", text)
|
||||
|
||||
def test_coordinator_recovery_keeps_the_working_ledger_concise_and_current(self):
|
||||
text = (ROOT / "packages/coordinator-recovery/SKILL.md").read_text()
|
||||
for phrase in ("## Keep the Working Ledger", "when you discover it", "one line",
|
||||
"the evidence", "resolved", "never changes the issue tracker"):
|
||||
self.assertIn(phrase, text)
|
||||
|
||||
def test_coordinator_recovery_stays_independent_of_dispatch(self):
|
||||
text = (ROOT / "packages/coordinator-recovery/SKILL.md").read_text()
|
||||
# Wave selection and its typed escalations belong to coordinator-dispatch,
|
||||
# so an Operator can replace either package without the other.
|
||||
for phrase in ("wave-selection", "coordinator-dispatch", "`portfolio_conflict`", "`unique_resource_needed`"):
|
||||
self.assertNotIn(phrase, text)
|
||||
self.assertNotIn("{", text)
|
||||
self.assertNotIn("```", text)
|
||||
|
||||
def test_coordinator_communication_reports_the_control_tower(self):
|
||||
text = (ROOT / "packages/coordinator-communication/SKILL.md").read_text()
|
||||
for phrase in ("running wave", "lease", "ml-server", "held", "contention",
|
||||
@@ -75,6 +128,58 @@ class PackageTests(unittest.TestCase):
|
||||
"Review Packet inbox", "Autopilot"):
|
||||
self.assertIn(phrase, text)
|
||||
|
||||
def test_coordinator_manual_methods_are_v0_17_0_manual_coordination_guidance(self):
|
||||
for name in ("coordinator-wave-audit", "coordinator-tracker-hygiene"):
|
||||
with self.subTest(package=name):
|
||||
package = ROOT / "packages" / name
|
||||
check_package(package)
|
||||
manifest = json.loads((package / "relayview-skill.json").read_text())
|
||||
self.assertEqual(manifest["schemaVersion"], 1)
|
||||
self.assertEqual((manifest["role"], manifest["step"]), ("coordinator", "coordination"))
|
||||
self.assertEqual(manifest["source"], {"kind": "first-party", "reference": "v0.17.0"})
|
||||
self.assertEqual([item["path"] for item in manifest["files"]], ["SKILL.md"])
|
||||
frontmatter = (package / "SKILL.md").read_text().split("---", 2)[1]
|
||||
self.assertRegex(frontmatter, r"(?m)^disable-model-invocation: true$")
|
||||
self.assertIn("relayview-version: 0.17.0", frontmatter)
|
||||
size = sum((package / path).stat().st_size for path in ("SKILL.md", "relayview-skill.json"))
|
||||
self.assertLess(size, 16 * 1024, "well under the 128 KiB package cap")
|
||||
|
||||
def test_coordinator_wave_audit_returns_a_structured_wave_plan_without_dispatching(self):
|
||||
text = (ROOT / "packages/coordinator-wave-audit/SKILL.md").read_text()
|
||||
for phrase in ("/skill:coordinator-wave-audit", "entire Ready queue",
|
||||
"branch and pull-request footprints", "Lease Registry",
|
||||
"Safe Parallel Wave 1", "Contention Pairs", "Resource-Affinity Batches",
|
||||
"Blocked/Stale", "schema migration", "ml-server",
|
||||
"Dispatch nothing", "an open prerequisite keeps it out",
|
||||
"leave repository code and shell commands to the roles that own them",
|
||||
"Check before finishing", "free GPU workers", "GPU-bound",
|
||||
"unrelated functions in one large file",
|
||||
"smaller wave whose members are clearly independent"):
|
||||
self.assertIn(phrase, text)
|
||||
# Ties follow the dispatch guide: a free or loaded resource can beat Ready order.
|
||||
self.assertIn("free or already loaded", text)
|
||||
# The four sections appear in the order the Operator reads them.
|
||||
order = [text.index(f"### {heading}") for heading in (
|
||||
"Safe Parallel Wave 1", "Contention Pairs", "Resource-Affinity Batches", "Blocked/Stale")]
|
||||
self.assertEqual(order, sorted(order))
|
||||
|
||||
def test_coordinator_tracker_hygiene_drafts_proposals_and_never_mutates_silently(self):
|
||||
text = (ROOT / "packages/coordinator-tracker-hygiene/SKILL.md").read_text()
|
||||
for phrase in ("/skill:coordinator-tracker-hygiene", "Working Ledger",
|
||||
"implicit contention edges", "prerequisite edge", "issue comment",
|
||||
"Operator approval", "Never change the tracker silently",
|
||||
"cycle", "Already recorded", "Stale",
|
||||
"missing, unreadable, or empty", "not from this conversation",
|
||||
"Check before finishing", "Make no tracker change yourself"):
|
||||
self.assertIn(phrase, text)
|
||||
# Like coordinator-recovery, the Operator applies tracker changes.
|
||||
self.assertNotIn("Apply an approved proposal", text)
|
||||
# One ledger, named and resolved as coordinator-recovery names and resolves it.
|
||||
self.assertNotIn("Coordinator Working Ledger", text)
|
||||
for phrase in ("Doubtful", "the shared change has landed",
|
||||
"Skip edges the Working Ledger already records as resolved"):
|
||||
self.assertIn(phrase, text)
|
||||
|
||||
def test_tester_release_sidecars_and_building_inspector_method(self):
|
||||
expected = {
|
||||
"tester-inspection": (1, None, (
|
||||
|
||||
Reference in new issue
Block a user