fix(trigger): fix polling trigger config defaults, row count, clock-skew, and stale config clearing#4101
Conversation
…kew, and stale config clearing
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryMedium Risk Overview Improves webhook deploy validation by clearing stale Hardens Google polling triggers: Calendar seeds/advances timestamps with clock-skew overlap and removes an incompatible Reviewed by Cursor Bugbot for commit 9b13e7e. Configure here. |
…sing required-field validation Use a dedicated `filledSubBlockIds` Set populated during the first pass so the second-pass skip guard is based solely on live `getConfigValue` results, not on stale entries spread from `baseConfig` (`triggerConfig`).
Greptile SummaryThis PR is a focused bug-fix batch for polling trigger infrastructure: it corrects Confidence Score: 5/5Safe to merge — all fixes are targeted and correct; no new bugs introduced. Every fix in the PR has been traced through its logic: the Calendar Math.max regression guard is sound, the Drive single-page resume token correctly uses the API-guaranteed newStartPageToken, the Sheets row-count expansion to A:Z is a clear improvement (with the AA+ limitation already acknowledged by the team), buildProviderConfig stale-entry deletion is safe, and triggerSave correctly joins SYSTEM_SUBBLOCK_IDS. No P0/P1 issues found. No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Poll cycle starts] --> B{First poll?}
B -- yes --> C[Seed cursor / pageToken\nnow - 30s for Calendar\nstartPageToken for Drive\nrowCount for Sheets]
C --> Z[Mark success, return]
B -- no --> D[Fetch events / changes / rows]
D --> E{Any results?}
E -- none --> F[Update cursor / pageToken\nMark success, return]
E -- some --> G[Filter client-side]
G --> H[Process each item\nwith idempotency]
H --> I{failedCount > 0?}
I -- all failed --> J[Keep cursor,\nMark failure]
I -- some/none failed --> K[Advance cursor safely]
K -- Calendar --> L[max latestUpdated - 5s,\nlastCheckedTimestamp]
K -- Drive --> M[newStartPageToken if last page\nlastNextPageToken if mid-list]
K -- Sheets --> N[lastKnownRowCount\n+ rowsToFetch]
L --> Z2[Mark success, return]
M --> Z2
N --> Z2
Reviews (2): Last reviewed commit: "fix(trigger): prevent calendar cursor re..." | Re-trigger Greptile |
…filtered client-side
|
Addressed the Greptile P2 for the Calendar cursor regression (lines 138–144): fixed in 9b13e7e. When all returned events are filtered client-side, Fix: cursor now uses |
|
@greptile |
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 9b13e7e. Configure here.
Summary
Type of Change
Testing
Tested manually
Checklist