Skip to content

feat(server): self-host retention policy with in-process sweep - #33

Merged
joris-gallot merged 1 commit into
mainfrom
feat/self-host-retention
Aug 14, 2026
Merged

feat(server): self-host retention policy with in-process sweep#33
joris-gallot merged 1 commit into
mainfrom
feat/self-host-retention

Conversation

@joris-gallot

@joris-gallot joris-gallot commented Aug 14, 2026

Copy link
Copy Markdown
Collaborator

Self-host had no cleanup path: purgeExpiredRuns returned early when KINORA_CLOUD=false, and nothing in the repo schedules a sweep. Traces grow forever.

Three env knobs, all 0 (keep everything) by default:

  • KINORA_ARTIFACT_RETENTION_DAYS - deletes stored trace files past N days but keeps the runs. Screenshots and videos ride inside trace.zip, so this is where the disk actually goes; pass rates, trends and flaky history survive, old runs just lose their trace link.
  • KINORA_RETENTION_DAYS - deletes whole runs past N days.
  • KINORA_KEEP_LAST_RUNS - keeps the N newest runs per project.

The server sweeps at startup and every 24h while at least one is non-zero.

Refs #18 - the retention half. Uploading video/screenshot when trace is off is still open.

@joris-gallot
joris-gallot merged commit ac9a35d into main Aug 14, 2026
8 checks passed
@joris-gallot
joris-gallot deleted the feat/self-host-retention branch August 14, 2026 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant