Persist minimal detection metadata in SQLite - #12
Conversation
Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Codex <noreply@openai.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8749e736e0
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if lastPruneAt.map({ now.timeIntervalSince($0) >= 24 * 60 * 60 }) ?? true { | ||
| _ = try pruneOnQueue(now: now) | ||
| lastPruneAt = now |
There was a problem hiding this comment.
Schedule retention pruning without new detections
When Perch is left running longer than 30 days and no new accepted detections arrive, this enqueue path is the only post-start place that can run pruneOnQueue, so expired rows remain on disk until another risk event or a restart. That breaks the advertised 30-day retention window for a long-lived menu-bar app; add a timer/background prune that runs independently of inserts.
Useful? React with 👍 / 👎.
Use the local hostname syscall during detection identity construction to keep app startup independent of name resolution. Co-authored-by: Codex <noreply@openai.com>
Summary
Testing
make testmake fitnessGenerated with Codex.