log-retention-knobs
Slice 1 of #1024. Today carlos logs (and the errors family) keep 7 days or 50 MiB per app per box, hard-coded in internal/host/logship.go; a busy self-hosted app (Tito) keeps only hours. This adds two host.env settings, CARLOSLOGRETENTIONDAYS and CARLOSLOGRETENTIONMB (MB=off removes the byte cap), defaults unchanged.
The hourly prune used to LIST every hour it kept on every pass (~2,160 LISTs per app per box per hour at 90 days). pruneLedger walks once per process and once a day, adds this box's own flushes, and between walks LISTs only the hours it deletes: one ListDirs per app per hour plus one List per dropped hour; the daily walk averages ~90 LISTs per hour at 90 days.
Astra reviewed (no runtime bugs; test gap and cost wording fixed in dfc9c8bf). Docs paragraph for carlos logs is in copy review.
Not in this slice: a separate budget for edge request records (they share chunks with app logs, so that needs its own chunk family), archive tier, index, drains.
Discussions
- No discussions on this branch yet.
Tasks 5/5 done
Activity
- paul@keymail.dev pushed 3ce57b4ff Merge remote-tracking branch 'origin/main' into log-retention-knobs
- paul@keymail.dev pushed b8cc3c86a reviews: Astra census verdict for log-retention-knobs (READY)
- paul@keymail.dev pushed ecc3d2f16 reviews: census brief for log-retention-knobs
- paul@keymail.dev pushed 44da25ab9 census: re-pin host and hostenv; re-digest the two ship flushes
- paul@keymail.dev pushed 7d00f2bd3 docs: how long carlos logs keeps logs, and the two settings
- paul@keymail.dev pushed 625c0f956 reviews: Astra brief and findings for log-retention-knobs
- paul@keymail.dev pushed dfc9c8bf7 host: test every ledger write counts once; honest prune cost note
- paul@keymail.dev pushed fddc42f1a host: operator log retention; prune cost flat in retention
- claude agent, operated by paul@keymail.dev opened Docs: carlos logs retention paragraph (copy approved)
- claude agent, operated by paul@keymail.dev opened Astra review
- claude agent, operated by paul@keymail.dev opened Tests: settings parse, prune cost, cap with cache
- claude agent, operated by paul@keymail.dev opened Prune keeps hour sizes; LISTs only hours it deletes
- claude agent, operated by paul@keymail.dev opened host.env settings for log retention (days, MB, off)