fix(governance): restore advertised worktree helpers

This commit is contained in:
rcourtman
2026-08-08 04:08:35 +01:00
parent 7fd33dd6fa
commit ebff6f9946
6 changed files with 125 additions and 2 deletions
+3
View File
@@ -278,6 +278,9 @@ scripts/release_control/*
!scripts/release_control/ssh_host_key_policy_test.py
!scripts/release_control/work_claim.py
!scripts/release_control/work_claim_test.py
!scripts/release_control/worktree_base.py
!scripts/release_control/worktree_claim.py
!scripts/release_control/worktree_finish.py
.agent/
# Pulse Pro landing page (private)
+15 -1
View File
@@ -9118,7 +9118,21 @@
],
"coverage_gaps": [],
"candidate_lanes": [],
"work_claims": [],
"work_claims": [
{
"id": "codex-v6-control-plane-lane-followup-architecture-post-rc-canonicalization",
"agent_id": "codex-v6-control-plane",
"summary": "Restore the canonical control-plane worktree helper public entrypoints and executable regression coverage for the advertised isolated-worktree workflow.",
"target_id": "v6-product-lane-expansion",
"claimed_at": "2026-08-08T03:02:17Z",
"heartbeat_at": "2026-08-08T03:02:17Z",
"expires_at": "2026-08-08T05:02:17Z",
"work_item": {
"kind": "lane-followup",
"id": "architecture-post-rc-canonicalization"
}
}
],
"open_decisions": [
{
"id": "self-hosted-commercial-surfaces-owner-approval",
@@ -1,6 +1,14 @@
import shlex
import subprocess
import sys
import unittest
from control_plane import agent_entrypoint, parse_args as control_plane_parse_args, release_branch_for_version
from control_plane import (
REPO_ROOT,
agent_entrypoint,
parse_args as control_plane_parse_args,
release_branch_for_version,
)
from control_plane_audit import audit_control_plane_payload, parse_args
@@ -162,6 +170,38 @@ class ControlPlaneAuditTest(unittest.TestCase):
self.assertEqual(entrypoint["worktree_claim"], "scripts/release_control/worktree_claim.py")
self.assertEqual(entrypoint["worktree_finish"], "scripts/release_control/worktree_finish.py")
def test_every_advertised_helper_entrypoint_executes(self) -> None:
entrypoint = agent_entrypoint()
commands = entrypoint["startup_commands"] + entrypoint["targeted_lookup_commands"]
helper_paths = {
tokens[1]
for command in commands
if len(tokens := shlex.split(command)) >= 2 and tokens[0] == "python3"
}
helper_paths.update(
value
for value in entrypoint.values()
if isinstance(value, str) and value.endswith(".py")
)
for helper_rel in sorted(helper_paths):
with self.subTest(helper=helper_rel):
helper_path = REPO_ROOT / helper_rel
self.assertTrue(helper_path.is_file(), f"advertised helper is missing: {helper_rel}")
result = subprocess.run(
[sys.executable, str(helper_path), "--help"],
cwd=REPO_ROOT,
capture_output=True,
text=True,
check=False,
)
self.assertEqual(
result.returncode,
0,
f"advertised helper failed to execute: {helper_rel}\n{result.stderr}",
)
self.assertIn("usage:", result.stdout)
def test_audit_accepts_valid_payload(self) -> None:
report = audit_control_plane_payload(
VALID_PAYLOAD,
+22
View File
@@ -0,0 +1,22 @@
#!/usr/bin/env python3
"""Public entrypoint for the canonical landing-worktree helper."""
from __future__ import annotations
from pathlib import Path
import runpy
import sys
def main(argv: list[str] | None = None) -> int:
internal_dir = Path(__file__).resolve().parent / "internal"
sys.path.insert(0, str(internal_dir))
try:
namespace = runpy.run_path(str(internal_dir / "worktree_base.py"))
return namespace["main"](list(sys.argv[1:] if argv is None else argv))
finally:
sys.path.pop(0)
if __name__ == "__main__":
raise SystemExit(main())
+22
View File
@@ -0,0 +1,22 @@
#!/usr/bin/env python3
"""Public entrypoint for governed isolated-worktree claims."""
from __future__ import annotations
from pathlib import Path
import runpy
import sys
def main(argv: list[str] | None = None) -> int:
internal_dir = Path(__file__).resolve().parent / "internal"
sys.path.insert(0, str(internal_dir))
try:
namespace = runpy.run_path(str(internal_dir / "worktree_claim.py"))
return namespace["main"](list(sys.argv[1:] if argv is None else argv))
finally:
sys.path.pop(0)
if __name__ == "__main__":
raise SystemExit(main())
@@ -0,0 +1,22 @@
#!/usr/bin/env python3
"""Public entrypoint for landing an isolated worktree slice."""
from __future__ import annotations
from pathlib import Path
import runpy
import sys
def main(argv: list[str] | None = None) -> int:
internal_dir = Path(__file__).resolve().parent / "internal"
sys.path.insert(0, str(internal_dir))
try:
namespace = runpy.run_path(str(internal_dir / "worktree_finish.py"))
return namespace["main"](list(sys.argv[1:] if argv is None else argv))
finally:
sys.path.pop(0)
if __name__ == "__main__":
raise SystemExit(main())