Move workflow.Route/workflow.Run stage loop into archie-agent #590

Closed
opened 2026-10-27 13:36:56 +00:00 by sam · 0 comments
Owner

Final step of archie-core-5zh, depends on the Store/Forge/push RPC proxies existing. Move workflow.Route + workflow.Run's stage-loop execution from internal/daemon/daemon.go's process() into cmd/archie-agent, using the RPC proxies for Store/Forge/push and reimplementing CustomStages discovery (wfeval.Discover) agent-side against the already-mounted worktree. daemon.process() keeps worktree prepare + container acquire/release, then hands off the whole task to archie-agent in one NATS round trip instead of one round trip per stage.

Acceptance Criteria

workflow.Route and workflow.Run execute inside archie-agent, not archied, when agent.mode=nats; archie-agent handles a full task (not a single stage) per invocation; inprocess/subprocess modes keep working unchanged.

Close reason

Stale/duplicate: exact duplicate of already-closed archie-core-1786637491429-62-088b752f (GH #83, created 3 min later, closed within 2s — accidental double-create). Also independently verified complete: internal/daemon/daemon.go:882-893 already hands sandboxed tasks to archie-agent in one NATS round trip via runViaAgent instead of a per-stage loop, and internal/app/agentworker/task_execution.go:85,143,146 calls workflow.Route/workflow.Run with wfeval.Discover agent-side, matching the acceptance criteria verbatim. inprocess/subprocess path (daemon.go:894+) is untouched, as required.


Imported from beads archie-core-1786637491398-61-00fd3006 · GitHub #82 · type task · priority P2 · created 2026-08-08 · closed 2026-08-15

Final step of archie-core-5zh, depends on the Store/Forge/push RPC proxies existing. Move workflow.Route + workflow.Run's stage-loop execution from internal/daemon/daemon.go's process() into cmd/archie-agent, using the RPC proxies for Store/Forge/push and reimplementing CustomStages discovery (wfeval.Discover) agent-side against the already-mounted worktree. daemon.process() keeps worktree prepare + container acquire/release, then hands off the whole task to archie-agent in one NATS round trip instead of one round trip per stage. ### Acceptance Criteria workflow.Route and workflow.Run execute inside archie-agent, not archied, when agent.mode=nats; archie-agent handles a full task (not a single stage) per invocation; inprocess/subprocess modes keep working unchanged. ### Close reason Stale/duplicate: exact duplicate of already-closed archie-core-1786637491429-62-088b752f (GH #83, created 3 min later, closed within 2s — accidental double-create). Also independently verified complete: internal/daemon/daemon.go:882-893 already hands sandboxed tasks to archie-agent in one NATS round trip via runViaAgent instead of a per-stage loop, and internal/app/agentworker/task_execution.go:85,143,146 calls workflow.Route/workflow.Run with wfeval.Discover agent-side, matching the acceptance criteria verbatim. inprocess/subprocess path (daemon.go:894+) is untouched, as required. --- _Imported from beads `archie-core-1786637491398-61-00fd3006` · GitHub #82 · type task · priority P2 · created 2026-08-08 · closed 2026-08-15_
sam added the mediumtask labels 2026-10-27 13:36:56 +00:00
sam self-assigned this 2026-10-27 13:36:56 +00:00
sam closed this issue 2026-10-27 13:36:56 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sam/archie#590