Repository navigation
fix(usage): gate rollup reads on the late-end scan and marked cells, count dead passes - #10205
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
[Medium impact] This PR appears safe to merge; no blocking issues were found. SummaryThis PR tightens when activity reports can use stored hourly totals and counts workers that die while holding a lease.
The previous marked-cell scan finding is fixed: Reviews (3) · Last reviewed commit: "fix(usage): bound the marked-cell count'..." · Reviewed by Greptile |
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
There was a problem hiding this comment.
All reported issues were addressed across 5 files
Reply with feedback, questions, or to request a fix.
Turn on auto-fix | Re-trigger cubic
…unt, count dead passes Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ell fallback at info Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…n counting a failed pass Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
477472b to
2791a50
Compare
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
Summary
Three hardening items from the final audit of the activity rollup (#10200, #10201, #10203), to land before rollup reads are enabled anywhere. Both rollup flags remain off, so this changes nothing at runtime until they are turned on.
failed_passesonly counted passes that threw, so a pass killed outright (out of memory, a container stop) never tripped the deferred-hour guard, and a deferred heavy hour was paged again every few minutes with no backoff. Every pass releases its lease on the way out, soacquireLeasenow counts a lease taken over after it expired as a failed pass, in the same update.fresh_throughandcorrections_atbut notlast_end_scan, so a scan that kept failing left late-ending runs' cells stale for up to the 6-hour freshness bound. Reads now fall back to the legacy path once the scan is 30 minutes behind; it normally trails by its 5-minute margin plus the time between passes.No migration: the only schema change is a doc comment on
failed_passes.Test plan
organization-activity-rollup.integration.tsagainst real Postgres: 35/35 pass, including three new cases (a pass killed holding the lease backs off a deferred hour; a stale late-end scan falls back; marked cells over the bound fall back for both the summary and the breakdown).🤖 Generated with Claude Code