~bigbes/agents-dev · parade

main · last commit 13 days ago · 7g0stsfu

← Back to the parade

ah-nyl.6 wiring: httpapi + agenthubd + ahub CLIs Past Stand

status: closed P1 task
bd reopen ah-nyl.6
Created byEugene Blikh
Ownerbigbes@gmail.com
Created2026-07-12T23:35:55Z
Started2026-07-13T03:01:57Z
Updated2026-07-13T03:18:09Z
Closed2026-07-13T03:18:09Z
Description
Wire the daemon together per docs/SPEC.md SS3, SS11 (read SPEC fully). All sibling packages now exist — full-tree builds are allowed and expected in THIS task.

Deliverables:
- internal/httpapi: loopback server per SS11 — GET /healthz; POST /internal/v1/run-exit {task_id,attempt,exit_code} validated -> calls a RunExitHook (func injected by main; it pokes the reconciler); GET /api/v1/status -> JSON {tasks:[TaskRecord+latest Run], generated_at}. stdlib net/http + 1.22 mux patterns; graceful shutdown; tests via httptest.
- cmd/agenthubd: flags --config (default ./agenthub.yaml) --log-level; load config, open store, construct vikunja client, runner, no-op notifier (slog), reconciler; start httpapi + reconciler.Run; SIGINT/SIGTERM -> graceful stop (context cancel, http shutdown, store close). slog JSON to stderr.
- cmd/ahub: subcommands (stdlib flag, no cobra): `status` (GET /api/v1/status from --addr default 127.0.0.1:9100, human-readable table + --json raw), `validate-config` (load config, print OK or the collected errors, exit code accordingly), `version` (var set via -ldflags, default "dev").
- justfile: verify `just build` produces bin/agenthubd bin/ahub bin/ahub-run (adjust if needed).
- Smoke check you must run and make pass: `go build ./... && go vet ./... && go test ./...` (whole tree), then `bin/agenthubd --config config.example.yaml` with a fake VIKUNJA_TOKEN env — it must start, log the bucket-resolution failure gracefully (retry next tick, not crash-loop-exit), and /healthz must answer. Note in the bead comment if SPEC/behavior forced any deviation.

Constraints: you own cmd/agenthubd, cmd/ahub, internal/httpapi, plus minimal glue edits elsewhere ONLY if a sibling package has an integration bug you must fix to link (document any such fix in its own commit '<pkg>: fix ...'). No .beads/ changes. Commits: 'httpapi: ...', 'cmd: ...'. Do NOT push.
Notes
CONVENTION UPDATE (see SPEC §13, commit 5ce35c5+): tests use testify (require/assert); errors via auxilia culpa; agenthubd wires scribe handlers (TintHandler for ahub CLI, JSON or Multi for the daemon); steward MAY be used for daemon lifecycle wiring if it stays simple. testify + auxilia already in go.mod.
REVIEW INPUT (data-layer review finding 4): agenthubd startup must PREFLIGHT the board — construct the vikunja client and resolve the configured bucket titles once at startup; a missing title / no-kanban-view error at that point is FATAL with a clear message (SPEC §8 'fatal config error'), while the same error later at runtime stays retryable inside the loop. Wire this into cmd/agenthubd.

Depends on

  • ah-nyl.4 — runner: pi+zellij implementation + ahub-run supervisor blocks closed
  • ah-nyl.2 — store: SQLite implementation of ports.Store blocks closed
  • ah-nyl.5 — reconcile: the control loop blocks closed
  • ah-nyl — Stage 1 MVP: poll-driven happy path parent-child closed
  • ah-nyl.3 — vikunja: Board adapter over the REST API blocks closed

Depended on by

  • ah-nyl.7 — e2e: harness with fake vikunja + stub pi blocks
  • ah-nyl.8 — refactor: adopt go.bigb.es/auxilia (scribe/culpa/steward) where it pays blocks

Prerequisite chain — everything this waits on, transitively

  • ah-nyl.4 — runner: pi+zellij implementation + ahub-run supervisor blocks closed
  • ah-nyl — Stage 1 MVP: poll-driven happy path parent-child closed
  • ah-nyl.1 — foundation: go module, domain, ports, config blocks closed
  • ah-nyl.2 — store: SQLite implementation of ports.Store blocks closed
  • ah-nyl.5 — reconcile: the control loop blocks closed
  • ah-nyl.3 — vikunja: Board adapter over the REST API blocks closed

No comments.

Close reason

landed e116576+ae38c10+254c0f8: httpapi 3 endpoints, agenthubd wiring w/ fatal preflight + graceful shutdown, ahub CLI; scribe JSON/Tint handlers; steward skipped (justified); full happy-path smoke against fake vikunja done
  • Eugene Blikh added dependency on ah-nyl.4 · 2026-07-13T02:35:54Z
  • Eugene Blikh added dependency on ah-nyl.2 · 2026-07-13T02:35:54Z
  • Eugene Blikh added under epic ah-nyl · 2026-07-13T02:35:54Z
  • Eugene Blikh added dependency on ah-nyl.3 · 2026-07-13T02:35:54Z
  • Eugene Blikh created the issue · 2026-07-13T02:35:54Z
  • Eugene Blikh added dependency on ah-nyl.5 · 2026-07-13T02:35:55Z
  • Eugene Blikh ah-nyl.7 now depends on this · 2026-07-13T02:35:56Z
  • Eugene Blikh ah-nyl.8 now depends on this · 2026-07-13T02:35:57Z
  • Eugene Blikh updated notes to CONVENTION UPDATE (see SPEC §13, commit 5ce35c5+): tests use testify (require/assert); errors via auxilia culpa; agenthubd wires scribe handlers (TintHandler for ahub CLI, JSON or Multi for the daemon); steward MAY be used for daemon lifecycle wiring if it stays simple. testify + auxilia already in go.mod. · 2026-07-13T03:09:34Z
  • Eugene Blikh updated notes to CONVENTION UPDATE (see SPEC §13, commit 5ce35c5+): tests use testify (require/assert); errors via auxilia culpa; agenthubd wires scribe handlers (TintHandler for ahub CLI, JSON or Multi for the daemon); steward MAY be used for daemon lifecycle wiring if it stays simple. testify + auxilia already in go.mod. REVIEW INPUT (data-layer review finding 4): agenthubd startup must PREFLIGHT the board — construct the vikunja client and resolve the configured bucket titles once at startup; a missing title / no-kanban-view error at that point is FATAL with a clear message (SPEC §8 'fatal config error'), while the same error later at runtime stays retryable inside the loop. Wire this into cmd/agenthubd. · 2026-07-13T03:41:22Z
  • Eugene Blikh changed status to in_progress · 2026-07-13T06:01:57Z
  • Eugene Blikh closed the issue · 2026-07-13T06:18:09Z
    landed e116576+ae38c10+254c0f8: httpapi 3 endpoints, agenthubd wiring w/ fatal preflight + graceful shutdown, ahub CLI; scribe JSON/Tint handlers; steward skipped (justified); full happy-path smoke against fake vikunja done
  • Eugene Blikh added label milestone:stage-1 · 2026-07-20T03:08:46Z
  • Eugene Blikh removed label milestone:stage-1 · 2026-07-20T03:10:22Z
Stored rows — what this pane was built from, as read
issues 1 row
id ah-nyl.6
content_hash 0f3627c5d82d75a475ee9648fba27c211ab6ca3b93bbb47bbb18b50ec3c92db4
title wiring: httpapi + agenthubd + ahub CLIs
description Wire the daemon together per docs/SPEC.md SS3, SS11 (read SPEC fully). All sibling packages now exist — full-tree builds are allowed and expected in THIS task. Deliverables: - internal/httpapi: loopback server per SS11 — GET /healthz; POST /internal/v1/run-exit {task_id,attempt,exit_code} validated -> calls a RunExitHook (func injected by main; it pokes the reconciler); GET /api/v1/status -> JSON {tasks:[TaskRecord+latest Run], generated_at}. stdlib net/http + 1.22 mux patterns; graceful shutdown; tests via httptest. - cmd/agenthubd: flags --config (default ./agenthub.yaml) --log-level; load config, open store, construct vikunja client, runner, no-op notifier (slog), reconciler; start httpapi + reconciler.Run; SIGINT/SIGTERM -> graceful stop (context cancel, http shutdown, store close). slog JSON to stderr. - cmd/ahub: subcommands (stdlib flag, no cobra): `status` (GET /api/v1/status from --addr default 127.0.0.1:9100, human-readable table + --json raw), `validate-config` (load config, print OK or the collected errors, exit code accordingly), `version` (var set via -ldflags, default "dev"). - justfile: verify `just build` produces bin/agenthubd bin/ahub bin/ahub-run (adjust if needed). - Smoke check you must run and make pass: `go build ./... && go vet ./... && go test ./...` (whole tree), then `bin/agenthubd --config config.example.yaml` with a fake VIKUNJA_TOKEN env — it must start, log the bucket-resolution failure gracefully (retry next tick, not crash-loop-exit), and /healthz must answer. Note in the bead comment if SPEC/behavior forced any deviation. Constraints: you own cmd/agenthubd, cmd/ahub, internal/httpapi, plus minimal glue edits elsewhere ONLY if a sibling package has an integration bug you must fix to link (document any such fix in its own commit '<pkg>: fix ...'). No .beads/ changes. Commits: 'httpapi: ...', 'cmd: ...'. Do NOT push.
design
acceptance_criteria
notes CONVENTION UPDATE (see SPEC §13, commit 5ce35c5+): tests use testify (require/assert); errors via auxilia culpa; agenthubd wires scribe handlers (TintHandler for ahub CLI, JSON or Multi for the daemon); steward MAY be used for daemon lifecycle wiring if it stays simple. testify + auxilia already in go.mod. REVIEW INPUT (data-layer review finding 4): agenthubd startup must PREFLIGHT the board — construct the vikunja client and resolve the configured bucket titles once at startup; a missing title / no-kanban-view error at that point is FATAL with a clear message (SPEC §8 'fatal config error'), while the same error later at runtime stays retryable inside the loop. Wire this into cmd/agenthubd.
status closed
priority 1
issue_type task
assignee NULL
estimated_minutes NULL
created_at 2026-07-12T23:35:55Z
created_by Eugene Blikh
owner bigbes@gmail.com
updated_at 2026-07-13T03:18:09Z
closed_at 2026-07-13T03:18:09Z
closed_by_session
external_ref NULL
spec_id
compaction_level 0
compacted_at NULL
compacted_at_commit NULL
original_size NULL
sender
ephemeral 0
wisp_type
pinned 0
is_template 0
mol_type
work_type
source_system
metadata �{}
source_repo
close_reason landed e116576+ae38c10+254c0f8: httpapi 3 endpoints, agenthubd wiring w/ fatal preflight + graceful shutdown, ahub CLI; scribe JSON/Tint handlers; steward skipped (justified); full happy-path smoke against fake vikunja done
event_kind
actor
target
payload
await_type
await_id
timeout_ns 0
waiters
hook_bead
role_bead
agent_state
last_activity NULL
role_type
rig
due_at NULL
defer_until NULL
no_history 0
started_at 2026-07-13T03:01:57Z
is_blocked 0
dependencies 7 rows
id 3d8e93c3-909c-5d9e-85df-7bc6e0e2b5ab
issue_id ah-nyl.6
type blocks
created_at 2026-07-13T02:35:54Z
created_by Eugene Blikh
metadata �{}
thread_id
depends_on_issue_id ah-nyl.4
depends_on_wisp_id NULL
depends_on_external NULL
id 4e066046-2b9e-537d-aa5b-9ca0217bcc1d
issue_id ah-nyl.7
type blocks
created_at 2026-07-13T02:35:56Z
created_by Eugene Blikh
metadata �{}
thread_id
depends_on_issue_id ah-nyl.6
depends_on_wisp_id NULL
depends_on_external NULL
id 88746210-a4d8-50b8-a409-5b64c0bd8f45
issue_id ah-nyl.6
type blocks
created_at 2026-07-13T02:35:54Z
created_by Eugene Blikh
metadata �{}
thread_id
depends_on_issue_id ah-nyl.2
depends_on_wisp_id NULL
depends_on_external NULL
id 888276da-d042-55a9-a0ff-1942e36d9674
issue_id ah-nyl.6
type blocks
created_at 2026-07-13T02:35:55Z
created_by Eugene Blikh
metadata �{}
thread_id
depends_on_issue_id ah-nyl.5
depends_on_wisp_id NULL
depends_on_external NULL
id d65899f9-66a2-5fad-b998-110e5a705766
issue_id ah-nyl.8
type blocks
created_at 2026-07-13T02:35:57Z
created_by Eugene Blikh
metadata �{}
thread_id
depends_on_issue_id ah-nyl.6
depends_on_wisp_id NULL
depends_on_external NULL
id dc255812-8de0-52a8-b132-b7b7a7c289ca
issue_id ah-nyl.6
type parent-child
created_at 2026-07-13T02:35:54Z
created_by Eugene Blikh
metadata �{}
thread_id
depends_on_issue_id ah-nyl
depends_on_wisp_id NULL
depends_on_external NULL
id f31cc1dc-1257-5f14-a5a1-af72404bacbc
issue_id ah-nyl.6
type blocks
created_at 2026-07-13T02:35:54Z
created_by Eugene Blikh
metadata �{}
thread_id
depends_on_issue_id ah-nyl.3
depends_on_wisp_id NULL
depends_on_external NULL
events 7 rows
id 019f58af-f5f5-7403-90eb-db4c754742f1
issue_id ah-nyl.6
event_type created
actor Eugene Blikh
old_value
new_value
comment NULL
created_at 2026-07-13T02:35:54Z
id 019f58ce-c818-7a21-976c-ef60c7a0e4d5
issue_id ah-nyl.6
event_type updated
actor Eugene Blikh
old_value {"id":"ah-nyl.6","title":"wiring: httpapi + agenthubd + ahub CLIs","description":"Wire the daemon together per docs/SPEC.md SS3, SS11 (read SPEC fully). All sibling packages now exist — full-tree builds are allowed and expected in THIS task.\n\nDeliverables:\n- internal/httpapi: loopback server per SS11 — GET /healthz; POST /internal/v1/run-exit {task_id,attempt,exit_code} validated -\u003e calls a RunExitHook (func injected by main; it pokes the reconciler); GET /api/v1/status -\u003e JSON {tasks:[TaskRecord+latest Run], generated_at}. stdlib net/http + 1.22 mux patterns; graceful shutdown; tests via httptest.\n- cmd/agenthubd: flags --config (default ./agenthub.yaml) --log-level; load config, open store, construct vikunja client, runner, no-op notifier (slog), reconciler; start httpapi + reconciler.Run; SIGINT/SIGTERM -\u003e graceful stop (context cancel, http shutdown, store close). slog JSON to stderr.\n- cmd/ahub: subcommands (stdlib flag, no cobra): `status` (GET /api/v1/status from --addr default 127.0.0.1:9100, human-readable table + --json raw), `validate-config` (load config, print OK or the collected errors, exit code accordingly), `version` (var set via -ldflags, default \"dev\").\n- justfile: verify `just build` produces bin/agenthubd bin/ahub bin/ahub-run (adjust if needed).\n- Smoke check you must run and make pass: `go build ./... \u0026\u0026 go vet ./... \u0026\u0026 go test ./...` (whole tree), then `bin/agenthubd --config config.example.yaml` with a fake VIKUNJA_TOKEN env — it must start, log the bucket-resolution failure gracefully (retry next tick, not crash-loop-exit), and /healthz must answer. Note in the bead comment if SPEC/behavior forced any deviation.\n\nConstraints: you own cmd/agenthubd, cmd/ahub, internal/httpapi, plus minimal glue edits elsewhere ONLY if a sibling package has an integration bug you must fix to link (document any such fix in its own commit '\u003cpkg\u003e: fix ...'). No .beads/ changes. Commits: 'httpapi: ...', 'cmd: ...'. Do NOT push.\n","status":"open","priority":1,"issue_type":"task","owner":"bigbes@gmail.com","created_at":"2026-07-12T23:35:55Z","created_by":"Eugene Blikh","updated_at":"2026-07-12T23:35:55Z"}
new_value {"notes":"CONVENTION UPDATE (see SPEC §13, commit 5ce35c5+): tests use testify (require/assert); errors via auxilia culpa; agenthubd wires scribe handlers (TintHandler for ahub CLI, JSON or Multi for the daemon); steward MAY be used for daemon lifecycle wiring if it stays simple. testify + auxilia already in go.mod."}
comment NULL
created_at 2026-07-13T03:09:34Z
id 019f58eb-e5af-7124-a21b-6c4d9c1d3d20
issue_id ah-nyl.6
event_type updated
actor Eugene Blikh
old_value {"id":"ah-nyl.6","title":"wiring: httpapi + agenthubd + ahub CLIs","description":"Wire the daemon together per docs/SPEC.md SS3, SS11 (read SPEC fully). All sibling packages now exist — full-tree builds are allowed and expected in THIS task.\n\nDeliverables:\n- internal/httpapi: loopback server per SS11 — GET /healthz; POST /internal/v1/run-exit {task_id,attempt,exit_code} validated -\u003e calls a RunExitHook (func injected by main; it pokes the reconciler); GET /api/v1/status -\u003e JSON {tasks:[TaskRecord+latest Run], generated_at}. stdlib net/http + 1.22 mux patterns; graceful shutdown; tests via httptest.\n- cmd/agenthubd: flags --config (default ./agenthub.yaml) --log-level; load config, open store, construct vikunja client, runner, no-op notifier (slog), reconciler; start httpapi + reconciler.Run; SIGINT/SIGTERM -\u003e graceful stop (context cancel, http shutdown, store close). slog JSON to stderr.\n- cmd/ahub: subcommands (stdlib flag, no cobra): `status` (GET /api/v1/status from --addr default 127.0.0.1:9100, human-readable table + --json raw), `validate-config` (load config, print OK or the collected errors, exit code accordingly), `version` (var set via -ldflags, default \"dev\").\n- justfile: verify `just build` produces bin/agenthubd bin/ahub bin/ahub-run (adjust if needed).\n- Smoke check you must run and make pass: `go build ./... \u0026\u0026 go vet ./... \u0026\u0026 go test ./...` (whole tree), then `bin/agenthubd --config config.example.yaml` with a fake VIKUNJA_TOKEN env — it must start, log the bucket-resolution failure gracefully (retry next tick, not crash-loop-exit), and /healthz must answer. Note in the bead comment if SPEC/behavior forced any deviation.\n\nConstraints: you own cmd/agenthubd, cmd/ahub, internal/httpapi, plus minimal glue edits elsewhere ONLY if a sibling package has an integration bug you must fix to link (document any such fix in its own commit '\u003cpkg\u003e: fix ...'). No .beads/ changes. Commits: 'httpapi: ...', 'cmd: ...'. Do NOT push.\n","notes":"CONVENTION UPDATE (see SPEC §13, commit 5ce35c5+): tests use testify (require/assert); errors via auxilia culpa; agenthubd wires scribe handlers (TintHandler for ahub CLI, JSON or Multi for the daemon); steward MAY be used for daemon lifecycle wiring if it stays simple. testify + auxilia already in go.mod.","status":"open","priority":1,"issue_type":"task","owner":"bigbes@gmail.com","created_at":"2026-07-12T23:35:55Z","created_by":"Eugene Blikh","updated_at":"2026-07-13T00:09:34Z"}
new_value {"notes":"CONVENTION UPDATE (see SPEC §13, commit 5ce35c5+): tests use testify (require/assert); errors via auxilia culpa; agenthubd wires scribe handlers (TintHandler for ahub CLI, JSON or Multi for the daemon); steward MAY be used for daemon lifecycle wiring if it stays simple. testify + auxilia already in go.mod.\nREVIEW INPUT (data-layer review finding 4): agenthubd startup must PREFLIGHT the board — construct the vikunja client and resolve the configured bucket titles once at startup; a missing title / no-kanban-view error at that point is FATAL with a clear message (SPEC §8 'fatal config error'), while the same error later at runtime stays retryable inside the loop. Wire this into cmd/agenthubd."}
comment NULL
created_at 2026-07-13T03:41:22Z
id 019f596c-9a51-7952-a9d8-aba6b099642c
issue_id ah-nyl.6
event_type status_changed
actor Eugene Blikh
old_value {"id":"ah-nyl.6","title":"wiring: httpapi + agenthubd + ahub CLIs","description":"Wire the daemon together per docs/SPEC.md SS3, SS11 (read SPEC fully). All sibling packages now exist — full-tree builds are allowed and expected in THIS task.\n\nDeliverables:\n- internal/httpapi: loopback server per SS11 — GET /healthz; POST /internal/v1/run-exit {task_id,attempt,exit_code} validated -\u003e calls a RunExitHook (func injected by main; it pokes the reconciler); GET /api/v1/status -\u003e JSON {tasks:[TaskRecord+latest Run], generated_at}. stdlib net/http + 1.22 mux patterns; graceful shutdown; tests via httptest.\n- cmd/agenthubd: flags --config (default ./agenthub.yaml) --log-level; load config, open store, construct vikunja client, runner, no-op notifier (slog), reconciler; start httpapi + reconciler.Run; SIGINT/SIGTERM -\u003e graceful stop (context cancel, http shutdown, store close). slog JSON to stderr.\n- cmd/ahub: subcommands (stdlib flag, no cobra): `status` (GET /api/v1/status from --addr default 127.0.0.1:9100, human-readable table + --json raw), `validate-config` (load config, print OK or the collected errors, exit code accordingly), `version` (var set via -ldflags, default \"dev\").\n- justfile: verify `just build` produces bin/agenthubd bin/ahub bin/ahub-run (adjust if needed).\n- Smoke check you must run and make pass: `go build ./... \u0026\u0026 go vet ./... \u0026\u0026 go test ./...` (whole tree), then `bin/agenthubd --config config.example.yaml` with a fake VIKUNJA_TOKEN env — it must start, log the bucket-resolution failure gracefully (retry next tick, not crash-loop-exit), and /healthz must answer. Note in the bead comment if SPEC/behavior forced any deviation.\n\nConstraints: you own cmd/agenthubd, cmd/ahub, internal/httpapi, plus minimal glue edits elsewhere ONLY if a sibling package has an integration bug you must fix to link (document any such fix in its own commit '\u003cpkg\u003e: fix ...'). No .beads/ changes. Commits: 'httpapi: ...', 'cmd: ...'. Do NOT push.\n","notes":"CONVENTION UPDATE (see SPEC §13, commit 5ce35c5+): tests use testify (require/assert); errors via auxilia culpa; agenthubd wires scribe handlers (TintHandler for ahub CLI, JSON or Multi for the daemon); steward MAY be used for daemon lifecycle wiring if it stays simple. testify + auxilia already in go.mod.\nREVIEW INPUT (data-layer review finding 4): agenthubd startup must PREFLIGHT the board — construct the vikunja client and resolve the configured bucket titles once at startup; a missing title / no-kanban-view error at that point is FATAL with a clear message (SPEC §8 'fatal config error'), while the same error later at runtime stays retryable inside the loop. Wire this into cmd/agenthubd.","status":"open","priority":1,"issue_type":"task","owner":"bigbes@gmail.com","created_at":"2026-07-12T23:35:55Z","created_by":"Eugene Blikh","updated_at":"2026-07-13T00:41:23Z"}
new_value {"status":"in_progress"}
comment NULL
created_at 2026-07-13T06:01:57Z
id 019f597b-6e19-7278-a328-d93c488d0d8b
issue_id ah-nyl.6
event_type closed
actor Eugene Blikh
old_value
new_value landed e116576+ae38c10+254c0f8: httpapi 3 endpoints, agenthubd wiring w/ fatal preflight + graceful shutdown, ahub CLI; scribe JSON/Tint handlers; steward skipped (justified); full happy-path smoke against fake vikunja done
comment NULL
created_at 2026-07-13T06:18:09Z
id 019f7cda-9086-7b5e-a061-0242d5d6b2b0
issue_id ah-nyl.6
event_type label_added
actor Eugene Blikh
old_value NULL
new_value NULL
comment Added label: milestone:stage-1
created_at 2026-07-20T03:08:46Z
id 019f7cdc-06cb-78d5-beae-87d795753193
issue_id ah-nyl.6
event_type label_removed
actor Eugene Blikh
old_value NULL
new_value NULL
comment Removed label: milestone:stage-1
created_at 2026-07-20T03:10:22Z