Skip to content

fix(rank-tracking): finalize stuck runs after DFS snapshots - #326

Open
Kroma86 wants to merge 1 commit into
every-app:mainfrom
Kroma86:fix/rank-check-finalize-hang-slim
Open

fix(rank-tracking): finalize stuck runs after DFS snapshots#326
Kroma86 wants to merge 1 commit into
every-app:mainfrom
Kroma86:fix/rank-check-finalize-hang-slim

Conversation

@Kroma86

@Kroma86 Kroma86 commented Sep 12, 2026

Copy link
Copy Markdown

Summary

  • Slim cherry-pick of the rank-check finalize hang fix onto current `main` tip (`7b9ee0e`).
  • Source tip: `7b0eb18` on the agency WIP branch; this PR is 1 commit / 7 files only (no agency platform ancestry).
  • Behavior: flip DB status before awaiting PostHog shutdown, reclaim snapshot-complete blockers as completed, cron watchdog via `reconcileStuckRankCheckRuns`.

Files

  • `rankCheckFinalize.ts` + test
  • `rankCheckReconciler.ts`
  • `RankCheckWorkflow.ts`
  • `rankCheckRunGuards.ts`
  • `posthog.ts` (bounded shutdown)
  • `server.ts` (watchdog call only)

Test plan

  • Diff vs `main` is exactly these 7 files
  • Do not merge/deploy without NiceSEO operator yes
  • After deploy: no stuck `running` rank checks + positions visible in tracker API

Related fat fork PR (do not trust-merge): Kroma86#4

Made with Cursor

Awaiting PostHog shutdown in the finalize step could wedge the workflow
after snapshots were already written, leaving status=running so the API
hid positions. Flip DB status first without awaiting telemetry, reclaim
snapshot-complete blockers as completed, and add a cron watchdog.

Co-authored-by: Cursor <cursoragent@cursor.com>
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

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.

1 participant