agent/tests/cli
Snider 23f4be5b85 feat(agent/pipeline): wire branch cleanup into createPR + cmdComplete success paths (#545)
Per RFC §15.5.1: agent branches (agent/*) must be deleted from Forge
after successful push or merge — stale branches pollute workspace prep
and cause clone confusion.

Lands:
* pkg/agentic/branch_cleanup.go (NEW) — cleanupBranch(ctx, repo, branch)
  helper. Refuses main/dev/master regardless of input (defensive).
  Normalises refs/heads/* prefix. Treats missing-remote-branch as
  harmless cleanup-success (idempotent).
* pkg/agentic/branch_cleanup_test.go (NEW) — AX-10 TestCleanupBranch_
  {Good_DeletesAgentBranch, Bad_RefuseProtected, Ugly_DeleteFailsForge}.
* pkg/agentic/pr.go — createPR success-on-push path now calls cleanupBranch.
* pkg/agentic/commands.go — cmdComplete success path also calls cleanupBranch.
* tests/cli/branch/Taskfile.yaml — end-to-end smoke + AX-10 unit hook.

agentic.branch.delete action was already registered in prep.go; this lane
routes the actual delete behaviour through the new helper instead of
editing the registration site.

Sandbox blocked from go test by outer go.work conflicting replacements;
gofmt clean. Supervisor's clean workspace catches.

Co-authored-by: Codex <noreply@openai.com>
Closes tasks.lthn.sh/view.php?id=545
2026-04-25 23:56:34 +01:00
..
_lib revert fcb9c189e5 2026-04-23 12:32:57 +01:00
agent feat(ax-10): bring agent to v0.8.0-alpha.1 + CLI test scaffold 2026-04-24 23:48:34 +01:00
brain revert fcb9c189e5 2026-04-23 12:32:57 +01:00
branch feat(agent/pipeline): wire branch cleanup into createPR + cmdComplete success paths (#545) 2026-04-25 23:56:34 +01:00
check revert fcb9c189e5 2026-04-23 12:32:57 +01:00
credits revert fcb9c189e5 2026-04-23 12:32:57 +01:00
dispatch revert fcb9c189e5 2026-04-23 12:32:57 +01:00
env revert fcb9c189e5 2026-04-23 12:32:57 +01:00
extract revert fcb9c189e5 2026-04-23 12:32:57 +01:00
fleet revert fcb9c189e5 2026-04-23 12:32:57 +01:00
issue revert fcb9c189e5 2026-04-23 12:32:57 +01:00
lang revert fcb9c189e5 2026-04-23 12:32:57 +01:00
message revert fcb9c189e5 2026-04-23 12:32:57 +01:00
mirror revert fcb9c189e5 2026-04-23 12:32:57 +01:00
pipeline feat(agent/pipeline): add core pipeline command tree (#535) 2026-04-25 23:25:37 +01:00
plan revert fcb9c189e5 2026-04-23 12:32:57 +01:00
pr revert fcb9c189e5 2026-04-23 12:32:57 +01:00
prompt revert fcb9c189e5 2026-04-23 12:32:57 +01:00
repo revert fcb9c189e5 2026-04-23 12:32:57 +01:00
restart revert fcb9c189e5 2026-04-23 12:32:57 +01:00
scan revert fcb9c189e5 2026-04-23 12:32:57 +01:00
session revert fcb9c189e5 2026-04-23 12:32:57 +01:00
sprint revert fcb9c189e5 2026-04-23 12:32:57 +01:00
state revert fcb9c189e5 2026-04-23 12:32:57 +01:00
status revert fcb9c189e5 2026-04-23 12:32:57 +01:00
sync feat(agent/sync): WorkspacePushed IPC → go-scm local repo sync (#546) 2026-04-25 23:33:38 +01:00
version revert fcb9c189e5 2026-04-23 12:32:57 +01:00
workspace revert fcb9c189e5 2026-04-23 12:32:57 +01:00
.DS_Store revert fcb9c189e5 2026-04-23 12:32:57 +01:00
Taskfile.yaml revert fcb9c189e5 2026-04-23 12:32:57 +01:00