5 Commits

Author SHA1 Message Date
q792602257 dbb87823e8 bugfix 2026-06-20 19:16:44 +08:00
q792602257 f6089ac5fb chore(jobs): align log keys + add prune no-op test + down-migration comment
Cross-cutting review polish:
- worker.go: id/type → job_id/job_type; one stray attempts → attempt for
  consistency with the other 4 sites in the same file.
- runners/workspace_fetch.go: ws_id → workspace_id (matches the dispatched
  notify.Message metadata key).
- runners/worktree_prune.go: id → worktree_id (same reason).
- runners/worktree_prune_test.go: add TestWorktreePrune_NoRowsIsNoOp for
  symmetry with the no-op tests in the other 4 runner test files.
- migrations/0005_jobs.down.sql: comment that DROP TABLE jobs cascades to
  drop the three idx_jobs_* indexes automatically.
2026-05-06 11:52:17 +08:00
q792602257 895a816221 feat(jobs): Module wiring + WorkerOptions.OnDeadLetter hook 2026-05-06 08:31:24 +08:00
q792602257 3aa19c8f7e fix(jobs): log repo write errors in worker.execute
Previously, write-back errors from Complete/DeadLetter/FailWithRetry
were silently dropped via underscore assignment. A transient DB
failure here would leave a job stuck (still 'running' with active
lease) until the reaper resets it, with zero observability into why.

Log each write-back error at Error level so operators can correlate
stuck jobs with DB symptoms. Code quality review of T8.
2026-05-05 23:12:43 +08:00
q792602257 1a83a5b1cf feat(jobs): worker pool with retry/dead-letter/panic-recovery 2026-05-05 19:57:23 +08:00