Harden hosted siftd runtime and deployment baseline#1
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 23eae9f8e3
ℹ️ 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 opts.RetentionWindow > 0 { | ||
| cutoff := now().Add(-opts.RetentionWindow) | ||
| if err := store.ApplyRetention(ctx, cutoff); err != nil { | ||
| return Summary{}, err | ||
| } |
There was a problem hiding this comment.
Make retention and event rebuild atomic
Applying retention in a separate committed transaction before rebuilding events can leave canonical state inconsistent when any later step fails (for example ListArticlesForClustering/ReplaceEvents returning an error). In that case, old articles/event_articles are already deleted but events is still the previous snapshot, so hosted reads can continue serving out-of-retention events and event payloads whose supporting article rows no longer exist until a later successful sync. This regression was introduced by the new store.ApplyRetention call path and is likely to violate the intended retention/provenance guarantees under transient DB failures.
Useful? React with 👍 / 👎.
Summary
siftdwith a 30-day defaultsiftd: systemd unit, environment template, and operator runbookIssue ID
Test Plan