Skip to content

Persist minimal detection metadata in SQLite - #12

Merged
theMobiusStrip merged 3 commits into
mainfrom
docs/sync-readme-monitoring-ux
Jul 23, 2026
Merged

Persist minimal detection metadata in SQLite#12
theMobiusStrip merged 3 commits into
mainfrom
docs/sync-readme-monitoring-ux

Conversation

@theMobiusStrip

Copy link
Copy Markdown
Owner

Summary

  • persist deduplicated caution and danger detections in local SQLite using minimal metadata
  • restore rolling posture, enforce retention and file permissions, and expose a stable read-only export view
  • document the future Crowsnest pull boundary without adding transport or acknowledgement state

Testing

  • make test
  • make fitness

Generated with Codex.

theMobiusStrip and others added 2 commits July 23, 2026 08:57
Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Codex <noreply@openai.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +412 to +414
if lastPruneAt.map({ now.timeIntervalSince($0) >= 24 * 60 * 60 }) ?? true {
_ = try pruneOnQueue(now: now)
lastPruneAt = now

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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>
@theMobiusStrip
theMobiusStrip merged commit df6d915 into main Jul 23, 2026
1 check passed
@theMobiusStrip
theMobiusStrip deleted the docs/sync-readme-monitoring-ux branch July 23, 2026 17:22
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