Context
`~/.sunat/audit/YYYY-MM.jsonl` grows unbounded. After a year of daily emissions, the file gets large and `cpe doctor stale_pendings` scan slows down.
Scope
- Per-month JSONL files (already kind of by date) but explicit rotation
- `sunat audit compact` — move >12 months old to compressed archive
- `sunat audit prune --before YYYY-MM` — delete archived months
- Default policy: compact at 6 months, archive at 24 months, never auto-delete
Success criteria
- `stale_pendings` doctor check stays fast even after years of emissions
- Operator can recover archived months on demand
Why P3
Won't matter for ~2 years of normal use. File system is forgiving.
Context
`~/.sunat/audit/YYYY-MM.jsonl` grows unbounded. After a year of daily emissions, the file gets large and `cpe doctor stale_pendings` scan slows down.
Scope
Success criteria
Why P3
Won't matter for ~2 years of normal use. File system is forgiving.