已关闭
Add lifecycle-aware retention and TTL for daemon job history #102
urandon创建于 8 天前关闭于 7 天前
8 天前 添加了label:admin-uidiagnosticsenhancementservice
7 天前 关联了pull request:Add lifecycle-aware daemon job retention
urandon
7 天前 评论:
7 天前 评论:
Implementation is ready in MR !105 at commit bcdb337.
Delivered:
- 48h success / 14d diagnostic TTL defaults with bounded global service configuration;
- latest significant failure preservation per registration/work stream with a separate hard cohort;
- deterministic pruning on load, updates/completion, and idle reconciliation;
- backward-compatible mode-0600
jobs.jsoncompaction and per-job progress caps; - observation API/Admin UI policy, state counts, oldest retained time, and expiry/truncation evidence;
- explicit expired/not-retained deep-link semantics and unaffected cache/frontier/RAG/audit boundary.
Verification: full Go suite, Vitest, Svelte check, Playwright (11 passed, 1 intentionally skipped), and git diff --check all pass.


urandon
7 天前 评论:
7 天前 评论:
Released in v0.2.2 from merge commit 09718a3. MR !105 and the merged-main CI runs completed successfully; release workflow 32916885259 also succeeded. The patch is now in both GitHub and native GitCode release publication. Closing as delivered.


7 天前 关闭了 issue
Why
Daemon job state is persisted in the service runtime
jobs.jsonsnapshot. The current policy keeps every active job, the latest 128 terminal jobs across all statuses, and the latest 256 progress events per job. There is no age-based TTL or configuration, and succeeded bounded maintenance slices compete for the same retention budget as diagnostically valuable failed/interrupted jobs.Initial head/backfill maintenance can produce a sequence of short terminal jobs for one logical work stream, making count-only retention both noisy in the Admin UI and poorly aligned with diagnostic value.
Goal
Introduce deterministic, lifecycle-aware retention for daemon job history so routine successful slices expire quickly while failures remain available long enough for diagnosis, with an absolute storage bound and clear Admin UI visibility.
Scope
interrupted.jobs.jsonsnapshots after upgrade.Suggested defaults
Exact defaults should be selected with tests and measured snapshot size rather than treated as API constants.
Acceptance criteria
jobs.jsonremains bounded, mode0600, public-safe, and backward compatible.go test ./..., frontend tests, andgit diff --checkpass.Non-goals