dispatch: foreground/in-place CI execution mode #141

Closed
opened 2026-06-15 14:33:31 +00:00 by coilysiren · 1 comment
Owner

Summary

Add a foreground / in-place execution mode to the dispatch subsystem so it can run inside a Forgejo Actions runner, not only on a workstation.

This is piece 1 of 4 for the "@claude in a Forgejo issue summons a containerized implementer" capability (the @codex-style integration). The other three live in infrastructure.

Context

ward dispatch headless <ref> today assumes workstation execution:

  • spawns a detached claude -p and returns immediately
  • creates a per-issue worktree under ~/projects/coilysiren/.dispatch-worktrees
  • logs to ~/.dispatch-logs

None of that fits CI, where the job process is the agent lifecycle and the checkout already exists in the runner workspace.

Ask

Add a sibling execution mode in cli-guard/cli/dispatch (e.g. ward dispatch ci <ref>, or dispatch headless --foreground --in-place) that:

  • runs claude -p in the foreground, blocking until the agent exits (so the Actions job tracks it)
  • operates in place in the current checkout, no ~/projects worktree, no ~/.dispatch-logs
  • reuses the existing brain: ref resolution (Forgejo client + SSM token), prompt seeding, the audit row, and land-on-green
  • on validation failure, files an autonomous-block: issue and surfaces the failure, same as workstation dispatch

Out of scope

  • The runner image (infra ticket)
  • The SSM key + ExternalSecret wiring (infra ticket)
  • The .forgejo/workflows/claude-issue.yml trigger (infra ticket)

Design reference

Forgejo Actions trigger + reuse-dispatch-brain was the chosen path. Trigger surface is canonical Forgejo (not the PR-gated GitHub mirror); execution reuses this package rather than a fresh CI-native claude -p.

## Summary Add a foreground / in-place execution mode to the dispatch subsystem so it can run inside a Forgejo Actions runner, not only on a workstation. This is piece 1 of 4 for the "@claude in a Forgejo issue summons a containerized implementer" capability (the @codex-style integration). The other three live in `infrastructure`. ## Context `ward dispatch headless <ref>` today assumes workstation execution: - spawns a **detached** `claude -p` and returns immediately - creates a per-issue worktree under `~/projects/coilysiren/.dispatch-worktrees` - logs to `~/.dispatch-logs` None of that fits CI, where the **job process *is* the agent lifecycle** and the checkout already exists in the runner workspace. ## Ask Add a sibling execution mode in `cli-guard/cli/dispatch` (e.g. `ward dispatch ci <ref>`, or `dispatch headless --foreground --in-place`) that: - runs `claude -p` in the **foreground**, blocking until the agent exits (so the Actions job tracks it) - operates **in place** in the current checkout, no `~/projects` worktree, no `~/.dispatch-logs` - **reuses** the existing brain: ref resolution (Forgejo client + SSM token), prompt seeding, the audit row, and land-on-green - on validation failure, files an `autonomous-block:` issue and surfaces the failure, same as workstation dispatch ## Out of scope - The runner image (infra ticket) - The SSM key + ExternalSecret wiring (infra ticket) - The `.forgejo/workflows/claude-issue.yml` trigger (infra ticket) ## Design reference Forgejo Actions trigger + reuse-dispatch-brain was the chosen path. Trigger surface is canonical Forgejo (not the PR-gated GitHub mirror); execution reuses this package rather than a fresh CI-native `claude -p`.
coilysiren added
P3
and removed
P2
labels 2026-06-17 08:39:17 +00:00
Member

🔒 Reserved by ward agent claude — container ward-cli-guard-issue-141-claude-2e610c24 on host kais-macbook-pro-2.local is carrying this issue (reserved 2026-06-24T04:36:16Z). Concurrent ward agent runs are blocked until it finishes or the reservation goes stale (2h0m0s TTL); --force overrides.

— Claude (she/her), via ward agent

<!-- ward-agent-reservation --> 🔒 Reserved by `ward agent claude` — container `ward-cli-guard-issue-141-claude-2e610c24` on host `kais-macbook-pro-2.local` is carrying this issue (reserved 2026-06-24T04:36:16Z). Concurrent `ward agent` runs are blocked until it finishes or the reservation goes stale (2h0m0s TTL); `--force` overrides. <!-- ward-agent-signature --> — Claude (she/her), via `ward agent`
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
coilyco-flight-deck/cli-guard#141
No description provided.