agent/pkg/agentic
Snider d47946ff82 feat(agent/process): add Timeout + GracePeriod + KillGroup to dispatch (#540)
Per RFC.pipeline.md "go-process Improvements Needed": hung agent
processes blocked dispatch slots forever. Now killed after configured
timeout, with SIGTERM-then-SIGKILL grace period and process-group kill
to prevent orphaned subprocesses.

Lands:
* pkg/agentic/dispatch.go — every c.Process().Run() that spawns an
  agent now passes Timeout (DispatchConfig.TimeoutMinutes, default 60),
  GracePeriod: 30s, KillGroup: true. Watchdog writes timeout-specific
  failure reason into workspace status.
* pkg/agentic/queue.go — DispatchConfig adds TimeoutMinutes int (YAML:
  timeout_minutes, default 60) so operators can tune per-deployment.
* dispatch_test.go — TestDispatch_Run_Bad_Timeout asserts slow process
  transitions to failed state with timeout reason
* queue_test.go — TestQueue_Config_Good_TimeoutDefault asserts default 60

Verified go-process exposes timeout/gracePeriod/killGroup option keys
in the local checkout — no BLOCKED sibling needed.

Plain go build blocked by unrelated go.work conflict + sibling go-ws
coreerr.Warn missing (out of allowlist); supervisor's clean workspace
build will catch any remaining compile.

Co-authored-by: Codex <noreply@openai.com>
Closes tasks.lthn.sh/view.php?id=540
2026-04-25 23:08:19 +01:00
..
actions.go fix(agent/agentic): nil-guard PrepSubsystem.Core() in handleComplete 2026-04-25 20:49:57 +01:00
actions_example_test.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
actions_test.go fix(agent/agentic): nil-guard PrepSubsystem.Core() in handleComplete 2026-04-25 20:49:57 +01:00
alias_test.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
auth.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
auth_example_test.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
auth_test.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
auto_pr.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
auto_pr_example_test.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
auto_pr_test.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
brain_client.go feat(agent/brain): non-Laravel callers route through shared OpenBrain client (#121) 2026-04-25 20:33:33 +01:00
brain_seed_memory.go feat(agent/brain): non-Laravel callers route through shared OpenBrain client (#121) 2026-04-25 20:33:33 +01:00
brain_seed_memory_test.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
commands.go feat(agent/agentic): scaffold core pipeline command tree per RFC-AGENT-PIPELINE.md 2026-04-25 20:24:21 +01:00
commands_commit.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
commands_commit_test.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
commands_core.go feat(agent/agentic): scaffold core pipeline command tree per RFC-AGENT-PIPELINE.md 2026-04-25 20:24:21 +01:00
commands_core_test.go feat(agent/agentic): scaffold core pipeline command tree per RFC-AGENT-PIPELINE.md 2026-04-25 20:24:21 +01:00
commands_example_test.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
commands_flow_test.go feat(agent/agentic): run/flow now executes sequential YAML steps 2026-04-25 20:09:52 +01:00
commands_forge.go feat(ax-10): bring agent to v0.8.0-alpha.1 + CLI test scaffold 2026-04-24 23:48:34 +01:00
commands_forge_example_test.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
commands_forge_test.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
commands_message.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
commands_phase.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
commands_phase_test.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
commands_plan.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
commands_plan_test.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
commands_platform.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
commands_platform_example_test.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
commands_platform_test.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
commands_resume_test.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
commands_session.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
commands_session_test.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
commands_setup.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
commands_setup_test.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
commands_sprint.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
commands_sprint_test.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
commands_state.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
commands_state_test.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
commands_task.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
commands_task_test.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
commands_test.go feat(ax-10): bring agent to v0.8.0-alpha.1 + CLI test scaffold 2026-04-24 23:48:34 +01:00
commands_workspace.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
commands_workspace_example_test.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
commands_workspace_test.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
commit.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
commit_test.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
content.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
content_example_test.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
content_test.go test(agent): add AX-10 unit tests for dispatch/session/sync/tools/content (#169) 2026-04-25 07:57:30 +01:00
deps.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
deps_example_test.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
deps_test.go feat(ax-10): bring agent to v0.8.0-alpha.1 + CLI test scaffold 2026-04-24 23:48:34 +01:00
dispatch.go feat(agent/process): add Timeout + GracePeriod + KillGroup to dispatch (#540) 2026-04-25 23:08:19 +01:00
dispatch_example_test.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
dispatch_runtime_test.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
dispatch_sync.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
dispatch_sync_example_test.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
dispatch_sync_test.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
dispatch_test.go feat(agent/process): add Timeout + GracePeriod + KillGroup to dispatch (#540) 2026-04-25 23:08:19 +01:00
epic.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
epic_example_test.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
epic_test.go feat(ax-10): bring agent to v0.8.0-alpha.1 + CLI test scaffold 2026-04-24 23:48:34 +01:00
events.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
events_example_test.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
events_test.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
fetch_loop.go feat(agent/agentic): 5-min background git fetch loop for registered repos 2026-04-25 20:24:21 +01:00
fetch_loop_test.go feat(agent/agentic): 5-min background git fetch loop for registered repos 2026-04-25 20:24:21 +01:00
flow.go feat(agent/agentic): run/flow now executes sequential YAML steps 2026-04-25 20:09:52 +01:00
handlers.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
handlers_example_test.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
handlers_test.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
helpers_test.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
ingest.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
ingest_example_test.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
ingest_test.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
issue.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
issue_test.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
lang.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
lang_test.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
logic_test.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
message.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
message_test.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
mirror.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
mirror_example_test.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
mirror_test.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
paths.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
paths_example_test.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
paths_test.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
phase.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
phase_test.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
pid.go feat(ax-10): bring agent to v0.8.0-alpha.1 + CLI test scaffold 2026-04-24 23:48:34 +01:00
pid_example_test.go feat(ax-10): bring agent to v0.8.0-alpha.1 + CLI test scaffold 2026-04-24 23:48:34 +01:00
pid_test.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
plan.go fix(agent): replace sync/atomic plan ID generator with core.ID() (#863) 2026-04-25 09:53:09 +01:00
plan_compat.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
plan_compat_test.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
plan_crud_test.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
plan_dependencies_test.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
plan_example_test.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
plan_from_issue.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
plan_from_issue_test.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
plan_logic_test.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
plan_retention.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
plan_retention_test.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
plan_test.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
platform.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
platform_example_test.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
platform_test.go test(agentic): add HTTPS cert regression tests + fleet sync audit 2026-04-23 18:40:02 +01:00
platform_tools.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
pr.go feat(ax-10): bring agent to v0.8.0-alpha.1 + CLI test scaffold 2026-04-24 23:48:34 +01:00
pr_example_test.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
pr_test.go feat(ax-10): bring agent to v0.8.0-alpha.1 + CLI test scaffold 2026-04-24 23:48:34 +01:00
prep.go feat(agent/brain): non-Laravel callers route through shared OpenBrain client (#121) 2026-04-25 20:33:33 +01:00
prep_example_test.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
prep_extra_test.go feat(ax-10): bring agent to v0.8.0-alpha.1 + CLI test scaffold 2026-04-24 23:48:34 +01:00
prep_test.go feat(agent): batch — sprint MCP tools + cmd cleanup (#142 #225 #226 #227) 2026-04-25 14:55:23 +01:00
process_register.go feat(ax-10): bring agent to v0.8.0-alpha.1 + CLI test scaffold 2026-04-24 23:48:34 +01:00
process_register_example_test.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
process_register_test.go feat(ax-10): bring agent to v0.8.0-alpha.1 + CLI test scaffold 2026-04-24 23:48:34 +01:00
prompt_version.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
prompt_version_test.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
provider_manager.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
provider_manager_test.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
qa.go feat(agent/agentic): Poindexter KD-tree clustering replaces exact-key bucketing in runQAWithReport 2026-04-25 20:25:05 +01:00
qa_cluster.go feat(agent/agentic): Poindexter KD-tree clustering replaces exact-key bucketing in runQAWithReport 2026-04-25 20:25:05 +01:00
qa_test.go feat(agent/agentic): Poindexter KD-tree clustering replaces exact-key bucketing in runQAWithReport 2026-04-25 20:25:05 +01:00
queue.go feat(agent/process): add Timeout + GracePeriod + KillGroup to dispatch (#540) 2026-04-25 23:08:19 +01:00
queue_example_test.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
queue_extra_test.go feat(ax-10): bring agent to v0.8.0-alpha.1 + CLI test scaffold 2026-04-24 23:48:34 +01:00
queue_logic_test.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
queue_test.go feat(agent/process): add Timeout + GracePeriod + KillGroup to dispatch (#540) 2026-04-25 23:08:19 +01:00
register.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
register_example_test.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
register_test.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
remote.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
remote_client.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
remote_client_example_test.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
remote_client_test.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
remote_dispatch_test.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
remote_example_test.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
remote_status.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
remote_status_example_test.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
remote_status_test.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
remote_sync_queue.go feat(agent/agentic): RFC §16.5 offline sync queue with exponential backoff 2026-04-25 20:57:12 +01:00
remote_sync_queue_test.go feat(agent/agentic): RFC §16.5 offline sync queue with exponential backoff 2026-04-25 20:57:12 +01:00
remote_test.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
render_plan_test.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
resume.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
resume_example_test.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
resume_test.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
review_queue.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
review_queue_example_test.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
review_queue_extra_test.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
review_queue_test.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
runner.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
runner_example_test.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
runner_test.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
runtime_state.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
runtime_state_test.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
sanitise.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
sanitise_example_test.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
sanitise_test.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
scan.go fix(agent/agentic): AX-6 sweep on scan.go — net/url → core.URLEncode 2026-04-25 13:30:27 +01:00
scan_example_test.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
scan_test.go feat(ax-10): bring agent to v0.8.0-alpha.1 + CLI test scaffold 2026-04-24 23:48:34 +01:00
session.go feat(agent/brain): non-Laravel callers route through shared OpenBrain client (#121) 2026-04-25 20:33:33 +01:00
session_example_test.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
session_test.go test(agent): add AX-10 unit tests for dispatch/session/sync/tools/content (#169) 2026-04-25 07:57:30 +01:00
shutdown.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
shutdown_example_test.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
shutdown_test.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
sprint.go feat(agent): batch — sprint MCP tools + cmd cleanup (#142 #225 #226 #227) 2026-04-25 14:55:23 +01:00
sprint_test.go feat(agent): batch — sprint MCP tools + cmd cleanup (#142 #225 #226 #227) 2026-04-25 14:55:23 +01:00
state.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
state_example_test.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
state_test.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
statestore.go fix(agent): purge sync.Once from pkg/agentic via core.Once (§14A) 2026-04-25 00:58:49 +01:00
statestore_test.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
status.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
status_example_test.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
status_extra_test.go feat(ax-10): bring agent to v0.8.0-alpha.1 + CLI test scaffold 2026-04-24 23:48:34 +01:00
status_logic_test.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
status_test.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
sync.go feat(agent/agentic): RFC §16.5 offline sync queue with exponential backoff 2026-04-25 20:57:12 +01:00
sync_example_test.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
sync_test.go test(agent): add AX-10 unit tests for dispatch/session/sync/tools/content (#169) 2026-04-25 07:57:30 +01:00
task.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
task_test.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
template.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
template_example_test.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
template_test.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
transport.go fix(agent/agentic): annotate net/http as AX-6 structural exception 2026-04-25 19:52:38 +01:00
transport_example_test.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
transport_test.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
verify.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
verify_example_test.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
verify_extra_test.go feat(ax-10): bring agent to v0.8.0-alpha.1 + CLI test scaffold 2026-04-24 23:48:34 +01:00
verify_test.go feat(ax-10): bring agent to v0.8.0-alpha.1 + CLI test scaffold 2026-04-24 23:48:34 +01:00
watch.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
watch_example_test.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
watch_test.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00
workspace_stats.go fix(agent): purge sync.Once from pkg/agentic via core.Once (§14A) 2026-04-25 00:58:49 +01:00
workspace_stats_test.go revert fcb9c189e5 2026-04-23 12:32:57 +01:00