chore(backend): remove cron healthcheck_url for /queue_health - #2793
Conversation
Drop Hyperping cron ping wiring now that queue health is covered by the dedicated queue healthcheck endpoint. Co-authored-by: Cursor <cursoragent@cursor.com>
Merging this PR will not alter performance
Comparing Footnotes
|
📝 WalkthroughWalkthroughRemoves the Hyperping cron healthcheck mechanism, including its database column, queue-consumer pings, script, tests, and RPC typings. Adds advisory-lock guarded cron execution through ChangesCron healthcheck removal
Estimated code review effort: 4 (Complex) | ~45 minutes Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
Comment |
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_17161da3-52de-4a99-a7cf-5cbe60a9852b) |
Co-authored-by: Cursor <cursoragent@cursor.com>
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_e2b90ddd-2b0a-4955-bdae-60824f084dbf) |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@supabase/migrations/20260730204645_remove_cron_healthcheck_url.sql`:
- Around line 3-24: Add the required documentation alongside the
public.process_all_cron_tasks definition, covering its cron execution frequency,
invoking roles, expected task cardinalities, relevant indexes, and worst-case
EXPLAIN (ANALYZE, BUFFERS) validation. Document the advisory-lock gating and
second_interval hot-path behavior without changing the function’s
implementation.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: f10edf2d-d93d-4be9-aa60-453f44c871c1
📒 Files selected for processing (11)
cli/src/types/supabase.types.tsscripts/create_hyperping_cron_healthchecks.tssrc/types/supabase.types.tssupabase/functions/_backend/plugin_runtime/utils/supabase.types.tssupabase/functions/_backend/triggers/queue_consumer.tssupabase/functions/_backend/utils/supabase.types.tssupabase/migrations/20260730204645_remove_cron_healthcheck_url.sqltests/create-hyperping-cron-healthchecks.unit.test.tstests/cron-healthchecks.test.tstests/queue-consumer-message-shape.unit.test.tstests/security-definer-execute-hardening.test.ts
🔗 Linked repositories identified
CodeRabbit considers these linked repositories for cross-repo context during reviews:
Cap-go/capacitor-updater(manual)
💤 Files with no reviewable changes (8)
- tests/create-hyperping-cron-healthchecks.unit.test.ts
- tests/cron-healthchecks.test.ts
- tests/security-definer-execute-hardening.test.ts
- scripts/create_hyperping_cron_healthchecks.ts
- supabase/functions/_backend/utils/supabase.types.ts
- src/types/supabase.types.ts
- supabase/functions/_backend/plugin_runtime/utils/supabase.types.ts
- cli/src/types/supabase.types.ts
|
There was a problem hiding this comment.
1 issue found and verified against the latest diff
Confidence score: 5/5
- In
supabase/migrations/20260730204645_remove_cron_healthcheck_url.sql, droppinghealthcheck_urlandprocess_queue_with_healthcheckwithout Postgres-level regression coverage risks a migration that removes more than intended or misses the expected replacement path, which could cause queue-processing/runtime failures after deploy — add a DB migration test that applies this change and asserts those objects are gone whilefunctions.process_queueremains callable.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="supabase/migrations/20260730204645_remove_cron_healthcheck_url.sql">
<violation number="1" location="supabase/migrations/20260730204645_remove_cron_healthcheck_url.sql:111">
P3: The destructive schema/function removal has no Postgres-level regression coverage. Add a DB test that applies the migration and verifies `healthcheck_url` plus `process_queue_with_healthcheck` are absent while a `function_queue` cron task still dispatches through `process_function_queue`.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
|
|
||
| DROP FUNCTION IF EXISTS "public"."process_queue_with_healthcheck"("text"[], integer, "text"); | ||
|
|
||
| ALTER TABLE "public"."cron_tasks" DROP COLUMN IF EXISTS "healthcheck_url"; |
There was a problem hiding this comment.
P3: The destructive schema/function removal has no Postgres-level regression coverage. Add a DB test that applies the migration and verifies healthcheck_url plus process_queue_with_healthcheck are absent while a function_queue cron task still dispatches through process_function_queue.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At supabase/migrations/20260730204645_remove_cron_healthcheck_url.sql, line 111:
<comment>The destructive schema/function removal has no Postgres-level regression coverage. Add a DB test that applies the migration and verifies `healthcheck_url` plus `process_queue_with_healthcheck` are absent while a `function_queue` cron task still dispatches through `process_function_queue`.</comment>
<file context>
@@ -0,0 +1,111 @@
+
+DROP FUNCTION IF EXISTS "public"."process_queue_with_healthcheck"("text"[], integer, "text");
+
+ALTER TABLE "public"."cron_tasks" DROP COLUMN IF EXISTS "healthcheck_url";
</file context>



Summary (AI generated)
cron_tasks.healthcheck_urlandprocess_queue_with_healthcheck/queue_healthinsteadMotivation (AI generated)
Cron per-task Hyperping URLs are redundant now that Capgo has a dedicated queue healthcheck endpoint. Keeping both adds noise, failed pings, and extra request fan-out on every queue sync.
Business Impact (AI generated)
Simplifies ops monitoring around queues, reduces unnecessary outbound healthcheck traffic, and concentrates alerting on
/queue_healthso queue problems are detected consistently.Test Plan (AI generated)
remove_cron_healthcheck_urlon a local Supabase resetcron_tasksno longer hashealthcheck_urlprocess_queue_with_healthcheckis droppedfunction_queuecron tasks still dispatch viaprocess_function_queue/queue_healthstill reports healthy/unhealthy queuesbunx vitest run tests/queue-consumer-message-shape.unit.test.ts tests/queue-health.unit.test.tsGenerated with AI
Made with Cursor
Summary by CodeRabbit
Breaking Changes
New Features