Commit Graph

14 Commits

Author SHA1 Message Date
q792602257 e97541030a feat(app): wire ACP AgentKindService + handler 2026-05-07 11:41:14 +08:00
q792602257 a2b6d5382e feat(workspace,jobs): emit sync_aborted_on_restart audit + enrich worktree.pruned metadata
- workspace.ResetStuckSyncStatuses now returns affected IDs so app.New can record one workspace.sync_aborted_on_restart audit per reset row
- worktree_prune audit metadata gains workspace_id and path alongside existing branch
- updated fakeRepo + integration test for new ResetStuckSyncStatuses signature
- add TestWorktreePrune_AuditMetadataContainsWorkspaceIDAndPath
2026-05-07 10:14:46 +08:00
q792602257 b1ccce567e feat(jobs): emit job.enqueue + worktree.pruned audit rows
Deferred audit retrofits from Plan #5 self-review:
- WebhookNotifier now records a job.enqueue audit row after each
  successful repo.Enqueue (best-effort: failures are warn-logged, not
  propagated). Added optional audit.Recorder + *slog.Logger params to
  NewWebhookNotifier.
- WorktreePrune.executionPhase now records a worktree.pruned audit row
  after each successful FinishPruneSuccess. Added optional audit.Recorder
  param to NewWorktreePrune.
- app.go wires the existing auditRec into both constructors.
- integration_test.go: drop the _ = auditRec suppression and pass
  auditRec into the webhook notifier so the closed-loop test exercises
  the audit emit path.
2026-05-06 13:35:45 +08:00
q792602257 cf1ec7b1c6 fix(app): give dispatcher.Shutdown its own ctx in ctx.Done branch
Final cross-cutting review finding: shutCtx was shared between
server.Shutdown and dispatcher.Shutdown, with jobs.Stop's wall-clock
time burning the budget in between. Under load, dispatcher.Shutdown
could receive an already-dead ctx and skip draining in-flight async
notify dispatches (including webhook enqueues). Mirror the errCh
branch by creating a fresh 10s drainCtx for dispatcher.Shutdown.
2026-05-06 11:40:34 +08:00
q792602257 69c5831783 fix(app): respect cfg.Jobs.ShutdownGrace and skip jobs.Stop when disabled
Code review fixes for T16:
- Pass cfg.Jobs.ShutdownGrace+5s to jobs.Stop call-site context (was
  hard-coded 30s, would mask configured longer grace).
- Guard jobs.Stop block on cfg.Jobs.Enabled so disabled jobs don't
  spin up the no-op shutdown goroutine + timer.
- Use clock.Real().Now() in deadLetterFn for consistency with the rest
  of the jobs wiring.
2026-05-06 11:10:29 +08:00
q792602257 c7db7a9604 feat(app): wire jobs.Module + WebhookNotifier + integration test for webhook closed loop 2026-05-06 09:25:19 +08:00
q792602257 8effeee063 feat(app): wire chat module + LocalFS storage + LLM registry into app.New 2026-05-04 19:37:14 +08:00
q792602257 7429a817bc feat(app): wire workspace module + integration test for ws closed loop 2026-05-02 12:32:05 +08:00
q792602257 a0087d2c25 feat(app): wire project module and integration test for pm closed loop 2026-05-01 10:36:37 +08:00
q792602257 7377c2135f fix(notify): waitgroup-based dispatcher shutdown, withoutcancel persist 2026-04-29 11:55:18 +08:00
q792602257 0f9c7fa657 fix(server): propagate shutdown error, http timeouts, ctx-aware migrate 2026-04-29 11:52:27 +08:00
q792602257 78989a42ac feat(server): embed SPA dist with fallback handler; single-binary deploy 2026-04-29 10:43:42 +08:00
q792602257 b72de98f15 test(app): integration test for login -> dispatch -> list flow 2026-04-28 23:18:27 +08:00
q792602257 d0f34e4e5e feat(app): composition root with migrate, pool, modules, router, bootstrap 2026-04-28 23:08:38 +08:00