fix(probe): deactivate dead Caltrans URLs instead of aborting#15
Open
NewCoder3294 wants to merge 2 commits into
Open
fix(probe): deactivate dead Caltrans URLs instead of aborting#15NewCoder3294 wants to merge 2 commits into
NewCoder3294 wants to merge 2 commits into
Conversation
- Remove Supabase auth middleware and (app) layout gate; the dashboard is now reachable without sign-in. - Delete /login route, (auth) layout, and /auth/callback handler. - Replace the business-owner landing's "HLS feed preview" placeholder with a real Caltrans D4 stream rendered via the existing LiveStream component (proxied through /api/hls). Falls back to an offline overlay if the upstream feed is unavailable. Supabase client libs are kept — contributor flows still read from them. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Caltrans D4's CDN routinely 404s 60–80% of the stream URLs it advertises in cctvStatusD04.json. The 0.5 abortThreshold treated that as a transient outage and skipped every write, so dead URLs accumulated indefinitely and /wall went empty in prod. 0.95 still catches a near-total worker egress failure (every probe times out) but lets the daily sync deactivate the actual rot. Cameras that come back online are still revived on the next run via the existing toRevive path, so the change is reversible per-camera. Recommended follow-up: per-camera consecutive-failure tracking instead of a global ratio. Out of scope here. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Raise `probeCameraLiveness` `abortThreshold` from 0.5 to 0.95. Caltrans D4's CDN routinely 404s 60–80% of advertised URLs; the old threshold treated that as a transient outage and skipped every write, so dead URLs accumulated and `/wall` went empty.
Root cause (from /investigate report continuation)
Even `packages/sync/src/sync.ts`'s comment concedes: "many streams CalTrans reports as in-service are 404 at the CDN."
Test plan
Follow-up (not in this PR)
Per-camera consecutive-failure tracking (`failed_probe_count` column) — deactivate after N=2 failed probes instead of relying on a global ratio. Better resilience to genuine 1-day transient outages.
🤖 Generated with Claude Code