Commit graph

31 commits

Author SHA1 Message Date
Virgil
780b22a3f7 feat(runner): clear queued workspaces on hard shutdown
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-01 16:20:06 +00:00
Virgil
6bda31345a feat(runner): emit queue drained events
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-01 14:44:53 +00:00
Virgil
7c8542d730 fix(ax): tighten remaining source examples
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-31 06:20:14 +00:00
Virgil
aee6452688 fix(ax): remove leftover narrative comments
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-31 05:49:11 +00:00
Virgil
f0c903d8c3 fix(ax): replace typed service lookups with Core.Service
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-31 05:43:14 +00:00
Virgil
06ae13d92b fix(ax): align remaining comments with AX principles
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-31 04:33:36 +00:00
Virgil
326c046d4e fix(ax): align remaining comments and names
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-30 23:01:42 +00:00
Virgil
bd12c0a31a fix(ax): align code comments with AX principles
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-30 22:54:19 +00:00
Virgil
40a26ca28c fix(ax): continue AX comment cleanup
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-30 22:30:05 +00:00
Virgil
ce7c81a15b fix(ax): align orchestration comments with usage examples
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-30 22:04:36 +00:00
Virgil
3aa9760ead fix(ax): continue AX comment cleanup
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-30 21:52:40 +00:00
Virgil
32c2a33284 fix(ax): align service comments with AX examples
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-30 21:47:44 +00:00
Virgil
e82112024c fix(ax): refine workspace naming cleanup
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-30 21:17:33 +00:00
Virgil
f11d1d47a1 fix(ax): continue AX naming cleanup
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-30 21:11:06 +00:00
Virgil
83703e1d99 fix(ax): continue AX naming cleanup
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-30 20:58:12 +00:00
Virgil
f9eca5e395 fix(ax): align runtime names with AX principles
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-30 20:53:36 +00:00
Virgil
e9db636552 fix(ax): make runner status reads Result-native
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-30 20:23:31 +01:00
Virgil
e826d672b0 fix(ax): return structured errors from Result failures
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-30 20:08:28 +01:00
Virgil
be3e68ec0f fix(ax): make status projections explicit
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-30 16:24:06 +00:00
Virgil
6d239d5b95 fix(ax): remove pid syscall wrappers
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-30 16:01:32 +00:00
Virgil
eae4d3f904 fix(ax): centralise pid lifecycle checks
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-30 00:28:11 +00:00
Virgil
f8cd0ff11a fix(ax): align runner and monitor usage examples
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-29 22:53:38 +00:00
Virgil
2f7ca89d80 fix(ax): name handlers and align process coverage
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-29 21:56:45 +00:00
Virgil
e8a46c2f95 fix(ax): align runner helper layer and examples
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-29 21:27:32 +00:00
Virgil
4cc763176f fix(ax): share workspace path helpers across services
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-29 21:19:37 +00:00
Virgil
6ac195c2e6 fix(agentic): align workspace flow with AX design
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-29 20:15:58 +00:00
Snider
6bb4fb8d57 fix(dispatch): concurrency, queue runner, and path improvements
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-29 20:40:20 +01:00
Snider
a174227a62 feat(flow): add v0.8.0 upgrade flow YAMLs + fix runner queue drain
- flow/upgrade/v080-plan.yaml: structured audit for banned imports, tests, comments
- flow/upgrade/v080-implement.yaml: step-by-step implementation with per-step commits
- fix(runner): update workspace Registry on AgentCompleted so concurrency count drops and queue drains

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-26 13:21:59 +00:00
Snider
3b038032af feat(runner): push channel notifications for AgentStarted + AgentCompleted
Runner HandleIPCEvents now catches AgentStarted in addition to
AgentCompleted, sending ChannelPush to MCP for both lifecycle events.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-26 11:55:44 +00:00
Snider
53db749738 fix(runner): reserve slot on approval to prevent TOCTOU race
Runner now creates a reservation entry (PID=-1) in the workspace Registry
immediately when approving a dispatch. This prevents parallel requests
from all seeing count < limit before any spawn completes.

Reservations are counted by countRunningByAgent/ByModel (PID < 0 = always
count). Agentic overwrites with real PID via TrackWorkspace after spawn.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-26 11:23:04 +00:00
Snider
0fc6eeb4cc feat(runner): extract dispatch runner into independent Core service
Moves concurrency, queue drain, workspace lifecycle, and frozen state
from agentic/prep into pkg/runner/ — a standalone Core service that
communicates via IPC Actions only.

- runner.Register wires Actions: dispatch, status, start, stop, kill, poke
- runner.HandleIPCEvents catches AgentCompleted → ChannelPush + queue poke
- Agentic dispatch asks runner for permission via c.Action("runner.dispatch")
- Dispatch mutex moved to struct-level sync.Mutex (fixes core.Lock init race)
- Registry-based concurrency counting replaces disk scanning
- TrackWorkspace called on both queued and running status writes
- SpawnQueued message added for runner→agentic spawn requests
- ChannelPush message in core/mcp enables any service to push channel events
- 51 new tests covering runner service, queue, and config parsing

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-26 11:00:47 +00:00