Migrate action-agent.sh to SDK + shared libraries #5

Closed
opened 2026-03-28 09:43:36 +00:00 by dev-bot · 1 comment
Collaborator

Rewrite action-agent to use agent-sdk.sh and shared libraries.

Mirrors codeberg.org/johba/disinto#803

Prior art: action/action-agent.sh on main branch, plus branch fix/rebase-before-push for SDK patterns

Design

Flow

  1. Preflight: issue_check_deps(), memory guard, concurrency lock
  2. Parse model from YAML front matter in issue body (custom model selection)
  3. Worktree: worktree_create() for action isolation
  4. Load formula from issue body
  5. Build prompt: formula + prior non-bot comments (resume context)
  6. agent_run(worktree, prompt) → Claude executes action, may push
  7. If pushed: pr_walk_to_merge() from lib/pr-lifecycle.sh
  8. Cleanup: worktree_cleanup(), issue_close()

Action-specific (stays in runner)

  • YAML front matter parsing (model selection)
  • Bot username filtering for prior comments
  • Lifetime watchdog (MAX_LIFETIME=8h wall-clock cap)
  • Child process cleanup (docker compose, background jobs)

From shared libraries

  • Issue lifecycle: lib/issue-lifecycle.sh
  • Worktree: lib/worktree.sh
  • PR lifecycle: lib/pr-lifecycle.sh

Affected files

  • Rewrite: action/action-agent.sh
Rewrite action-agent to use `agent-sdk.sh` and shared libraries. Mirrors codeberg.org/johba/disinto#803 Prior art: `action/action-agent.sh` on `main` branch, plus branch `fix/rebase-before-push` for SDK patterns ## Design ### Flow 1. Preflight: `issue_check_deps()`, memory guard, concurrency lock 2. Parse model from YAML front matter in issue body (custom model selection) 3. Worktree: `worktree_create()` for action isolation 4. Load formula from issue body 5. Build prompt: formula + prior non-bot comments (resume context) 6. `agent_run(worktree, prompt)` → Claude executes action, may push 7. If pushed: `pr_walk_to_merge()` from `lib/pr-lifecycle.sh` 8. Cleanup: `worktree_cleanup()`, `issue_close()` ### Action-specific (stays in runner) - YAML front matter parsing (model selection) - Bot username filtering for prior comments - Lifetime watchdog (MAX_LIFETIME=8h wall-clock cap) - Child process cleanup (docker compose, background jobs) ### From shared libraries - Issue lifecycle: `lib/issue-lifecycle.sh` - Worktree: `lib/worktree.sh` - PR lifecycle: `lib/pr-lifecycle.sh` ## Affected files - Rewrite: `action/action-agent.sh`
dev-bot added the
in-progress
label 2026-03-28 09:43:36 +00:00
Author
Collaborator

Blocked — issue #5

Field Value
Exit reason ci_timeout
Timestamp 2026-03-28T10:34:48Z
### Blocked — issue #5 | Field | Value | |---|---| | Exit reason | `ci_timeout` | | Timestamp | `2026-03-28T10:34:48Z` |
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
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: johba/disinto#5
No description provided.