Repository navigation
perf(relay): skip aggregate serialization on cheaply-decided updates - #12029
Adamulek123 wants to merge 1 commit into
Conversation
|
Important Review skippedReview was skipped as selected files did not have any reviewable changes. ⚙️ Run configurationConfiguration used: Repository: pingdotgg/t3code/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📥 CommitsReviewing files that changed from the base of the PR and between 3072e4e28faab52f188b95c6b9b6d214fc4683ae and 8014a19. You can disable this status message by setting the Use the checkbox below for a quick retry:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📥 CommitsReviewing files that changed from the base of the PR and between 0f5a151 and 3072e4e28faab52f188b95c6b9b6d214fc4683ae. 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 2 remain after this review. 📝 WalkthroughWalkthroughChangesLive activity update evaluation
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Refactor Suggested reviewers: Merge Risk: ⚪ Minimal · up to The optimization preserves live activity update decisions, with no remaining merge-blocking risk identified. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This is an isolated relay performance optimization that reorders existing checks to avoid unnecessary aggregate serialization. The live-activity delivery decisions and downstream behavior remain effectively unchanged, with no product-default, schema, security, or infrastructure impact. No code changes detected at You can add or adjust custom eligibility rules. Learn more. |
3072e4e to
8014a19
Compare
|
Reviving this one after a staleness re-check against current Everything about this one still holds up:
I also re-verified the reorder is behavior-identical, since that's the whole risk in a predicate reshuffle. Moving
And the checks moved below the guard keep their original relative order, so the "identical aggregates with attention rows are still suppressed" case is preserved. The explanatory comment at One gap I want to close before this goes back into a review queue: the PR body currently cites a passing test count and "behavior-identical (verified case-by-case in the diff)", but CONTRIBUTING asks for evidence matched to the change, and this is a perf claim. Could you add a measured before/after to the body — even a rough microbenchmark on For context on why this is worth a maintainer's attention now: I triaged nine long-stuck PRs from this queue and withdrew four. This is the smallest and cleanest of what remained — independent file, no behavioral change, no product-default or schema impact, already approved once. Happy to rebase or re-run anything if that's easier than editing the body. |
|
Note Written by Hi! We are cleaning up open PRs, and this one does not say which model created it and was opened more than two weeks ago. If this change is still important, please rebuild it on current main with a newer model and note the model in the PR description. |
Summary
shouldUpdateLiveActivityserialized both aggregates to JSON before checking the cheap field walks, paying two full serializations on every update path.What changed
activeCountand terminal transitions first; serialize only when they cannot decide. Ordering is behavior-identical (verified case-by-case in the diff): identical aggregates, attention included, are still suppressed and throttled exactly as before. Deliberately not changed: the health-check double stringify (already ordered cheapest-last; hashing would be a protocol change) and log-pipeline redaction (literal search is already optimal; regex would add overhead).Validation
vp test run infra/relay/src/agentActivity/ApnsDeliveries.test.ts— 50/50 pass.Summary by CodeRabbit