Skip to content

Alert when listing syncs stop - #11

Merged
devag7 merged 1 commit into
mainfrom
claude/jolly-babbage-rbzyej
Nov 4, 2026
Merged

devag7 merged 1 commit into
mainfrom
claude/jolly-babbage-rbzyej

Conversation

@devag7

@devag7 devag7 commented Nov 4, 2026

Copy link
Copy Markdown
Owner

Why

No listings have synced since 31 Oct. Apify rejects the key with a 401 (the key was rotated, but the APIFY_API_TOKEN Edge Function secret still has the old one). Nothing alerted on it: the cron jobs report "succeeded" once the request is sent, and /api/health said ok.

What

  • /api/health adds listings: { last_seen, hours_ago, fresh }, where fresh means the newest listing was seen by a sync within 36h (syncs run every 12h). status stays ok, so liveness checks are unaffected. The lookup never throws.
  • New smoke test "listing syncs are still running" fails when fresh is false. The daily production smoke run turns red when syncs break.

Expect

The smoke run on main will fail after merge until the Apify key is updated in Supabase. That is the intended alert.

Checks

  • lint (0 errors), typecheck, production build
  • Local run against live data: the new test fails with "newest listing last seen 98h ago"; the other 12 pass

Generated by Claude Code

/api/health now reports when the newest listing was last seen by a sync and
whether that is within 36 hours. The daily production smoke test fails when
it isn't, so a broken sync (like the rotated Apify key since 31 Oct) shows
up as a red run instead of going unnoticed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013WE1CRNEjYzBMwwwxsUHiz
Copilot AI balanced review requested due to automatic review settings November 4, 2026 02:56
@vercel

vercel Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
rentwise Ready Ready Preview Nov 4, 2026 2:57am UTC

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@devag7
devag7 merged commit f4ed5c7 into main Nov 4, 2026
7 checks passed
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.

3 participants