agent/tests/cli
Snider c6415aa53a feat(agent/state): OnStartup queue+registry restore from .core/db.duckdb (#537)
Per RFC §15.3: restart was losing in-flight queue + workspace registry.
"Ghost agents" and "lost queue" pain now fixed.

Lands:
* pkg/agentic/persist.go (NEW):
  - OnStartup(ctx, c): opens .core/db.duckdb via go-store, restores
    registry/queue/concurrency groups
  - Dead-PID detection: registry entries with status=running but
    !pidAlive(PID) → marked failed with question="dead worker on
    restart"; status.json files re-written to disk
  - Orphaned workspace cleanup: walk .core/workspace/, dir-exists +
    registry-says-completed → delete
  - OnShutdown(ctx): flushes in-memory registry + queue back to store
    before close
* pkg/agentic/prep.go — PrepSubsystem.OnStartup/OnShutdown wired
* pkg/agentic/persist_test.go — AX-10 covering queue restore,
  dead-worker reaping, shutdown persistence, invalid-store-payload,
  orphan cleanup
* tests/cli/restart/Taskfile.yaml — extended smoke seeds DuckDB state
  for queued workspace + dead running worker, asserts status.json
  reflects restore correctly

Sandbox blocked from go test by go.work conflicting dappco.re/go/api
replacements (pre-existing); gofmt clean. Supervisor's clean workspace
catches.

Co-authored-by: Codex <noreply@openai.com>
Closes tasks.lthn.sh/view.php?id=537
2026-04-26 00:04:56 +01:00
..
_lib revert fcb9c189e5 2026-04-23 12:32:57 +01:00
agent feat(ax-10): bring agent to v0.8.0-alpha.1 + CLI test scaffold 2026-04-24 23:48:34 +01:00
brain revert fcb9c189e5 2026-04-23 12:32:57 +01:00
branch feat(agent/pipeline): wire branch cleanup into createPR + cmdComplete success paths (#545) 2026-04-25 23:56:34 +01:00
check revert fcb9c189e5 2026-04-23 12:32:57 +01:00
credits revert fcb9c189e5 2026-04-23 12:32:57 +01:00
dispatch revert fcb9c189e5 2026-04-23 12:32:57 +01:00
env revert fcb9c189e5 2026-04-23 12:32:57 +01:00
extract revert fcb9c189e5 2026-04-23 12:32:57 +01:00
fleet revert fcb9c189e5 2026-04-23 12:32:57 +01:00
issue revert fcb9c189e5 2026-04-23 12:32:57 +01:00
lang revert fcb9c189e5 2026-04-23 12:32:57 +01:00
message revert fcb9c189e5 2026-04-23 12:32:57 +01:00
mirror revert fcb9c189e5 2026-04-23 12:32:57 +01:00
pipeline feat(agent/pipeline): implement pipeline/budget + pipeline/training (#536) 2026-04-25 23:57:27 +01:00
plan revert fcb9c189e5 2026-04-23 12:32:57 +01:00
pr revert fcb9c189e5 2026-04-23 12:32:57 +01:00
prompt revert fcb9c189e5 2026-04-23 12:32:57 +01:00
repo revert fcb9c189e5 2026-04-23 12:32:57 +01:00
restart feat(agent/state): OnStartup queue+registry restore from .core/db.duckdb (#537) 2026-04-26 00:04:56 +01:00
scan revert fcb9c189e5 2026-04-23 12:32:57 +01:00
session revert fcb9c189e5 2026-04-23 12:32:57 +01:00
sprint revert fcb9c189e5 2026-04-23 12:32:57 +01:00
state revert fcb9c189e5 2026-04-23 12:32:57 +01:00
status revert fcb9c189e5 2026-04-23 12:32:57 +01:00
sync feat(agent/sync): WorkspacePushed IPC → go-scm local repo sync (#546) 2026-04-25 23:33:38 +01:00
version revert fcb9c189e5 2026-04-23 12:32:57 +01:00
workspace revert fcb9c189e5 2026-04-23 12:32:57 +01:00
.DS_Store revert fcb9c189e5 2026-04-23 12:32:57 +01:00
Taskfile.yaml revert fcb9c189e5 2026-04-23 12:32:57 +01:00