Repository navigation
aggregator: clock proposal expiry from proposal.at, not delegation updatedAt (#1623) - #1714
Conversation
|
Warning Review limit reachedYou'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 12 minutes. View limit details
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. Comment |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Fixes #1623 (per triage task 1740 ruling: the governing clock is
proposal.at).Change
pm-stack/aggregator/src/tier-items.ts—proposalExpirednow measures the proposal's age fromd.proposal.atinstead ofd.updatedAt.updatedAtmoves on any delegation write, so clocking from it let churn resurrect an old proposal indefinitely (and read a fresh proposal as expired when the delegation record was old). The doc comment names the clock and the reason. The 48h TTL and the supersede identity triple (item id, runId, updatedAt) are unchanged.Tests
New regression test in
pm-stack/aggregator/test/needs-user.test.tscovering both divergent cases plus the existing equal-timestamp controls:proposal.at(74h) + freshupdatedAt(1h) → expired, and approve with the live triple is refused as expired;proposal.at(1h) + oldupdatedAt→ not expired, approve passes the gate.bun test test/needs-user.test.ts— 36 passed.actions.test.tssnooze-strip test, which fails identically on clean base7248a166(pre-existing, already filed as aggregator: actions.test.ts fails on main — applied snooze never lands in the Snoozed strip ('Snoozed by you (1)' missing) #1682; unrelated to this change).Queue task 1867 · branch
queue/1867-1623-proposal-expiry-clockNeed help on this PR? Tag
@codesmith-botwith what you need.