Skip to content

fix(aggregator): sanitize stored quiet prefs on read - #5169

Merged
dezren39 merged 2 commits into
mainfrom
queue/8593-4978-sanitize-quiet-read
Nov 4, 2026
Merged

dezren39 merged 2 commits into
mainfrom
queue/8593-4978-sanitize-quiet-read

Conversation

@dezren39

@dezren39 dezren39 commented Nov 3, 2026 •

Copy link
Copy Markdown
Member

Closes #4978

Changes

  • Normalize each subscription's stored quiet fields with the existing mergeQuiet() validator when listSubscriptions() reads rows. This defaults malformed clock values and invalid timezones in memory without rewriting the database row.
  • Add a store-read regression covering 99:99, 24:60, an unknown timezone, valid stored preferences, and the no-write behavior.
  • Record the production disposition on Design: delivered means delivered — one truth contract for the aggregator alert throat #3702: the read-only muse-dev2 check found 1 subscription and no bad quiet fields; no rows were rewritten.

Validation

  • cd pm-stack/aggregator && bun test test/alerts.test.ts — 37 passed.
  • bun run typecheck remains blocked by existing unrelated errors in src/item-history.ts (GhKind) and test/overview.test.ts (HealthView.conflicts).

Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

@dezren39
dezren39 requested a review from a team as a code owner November 3, 2026 21:44
@coderabbitai

coderabbitai Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 42 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: f77cb493-7f1e-4865-bd4b-2fdf40b3a134
Commits

Reviewing files that changed from the base of the PR and between 864ed8a and 3e6fea0.

Files selected for processing: 2
  • pm-stack/aggregator/src/alerts.ts
  • pm-stack/aggregator/test/alerts.test.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-04T14:39:24.668427Z 3e6fea0 New commits
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@dezren39

dezren39 commented Nov 4, 2026

Copy link
Copy Markdown
Member Author

Revalidation on current main (queue worker)

  • Merged origin/main (864ed8a4a) into the branch: no conflicts, head is now 3e6fea0f6.
  • cd pm-stack/aggregator && bun test test/alerts.test.ts — 37 pass, 0 fail (125 expect calls) after the merge.
  • Diff is still only src/alerts.ts (read-side mergeQuiet in listSubscriptions) plus the regression test; stored rows are untouched.
  • Design: delivered means delivered — one truth contract for the aggregator alert throat #3702 already carries the production-row disposition (1 subscription on muse-dev2, no invalid quiet fields, no rows rewritten).
  • No PR-tier checks are expected here: workflow PR triggers are dispatch-only since ci: remove push/pull_request workflow triggers #5501, so the merge-group basic: proxy port fallbacks check is the gate.

@dezren39
dezren39 merged commit d153d51 into main Nov 4, 2026
1 check passed
@dezren39
dezren39 deleted the queue/8593-4978-sanitize-quiet-read branch November 4, 2026 14:38
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.

aggregator(alerts): sanitize stored out-of-range quiet prefs at read time (#3702 disposition 1)

1 participant