feat(events-crawler): stage West Vancouver Memorial Library behind an enabled flag - #83
Merged
Merged
Conversation
… enabled flag West Van Memorial Library runs The Events Calendar (Tribe) on the same REST shape the five Phase-1 orgs use, so it needs no adapter code — only a registry entry and an image allowlist. Verified live against the crawler's exact URL shape (per_page + start_date + end_date over a 4-month window): 456 upcoming events, 25 returned, every one carrying a venue and a real featured image. Adds `Org.enabled` and lands the new org disabled. This matters because the weekly cron is LIVE (20260724120000_events_crawler_cron.sql — pg_cron jobid 18, Mondays 14:00 UTC), which makes deploying this function the act that puts a new org into production: the next run would auto-publish it into the shared events table the mobile app reads. Landing it disabled decouples "the code is merged" from "the source is live", so activation stays a separate one-line change gated on Savar's sign-off, per CLAUDE.md Decision Authority. The fan-out now iterates ACTIVE_ORGS, so a disabled org is genuinely inert rather than merely absent from the response counts. West Van is a public library rather than a settlement agency, so its calendar mixes relevant programming (Device Clinic, English conversation) with toddler storytimes and Pride Bingo. A relevance filter for library sources lands with the Phase-2 adapter work; keeping this org disabled until then means nothing unfiltered can reach the Events tab. The image hosts are allowlisted now rather than at activation, so flipping `enabled` later needs no accompanying web-side change. No migration, cron, or DB object touched. Nothing deployed. Verification: deno check --node-modules-dir=auto supabase/functions/*/index.ts supabase/functions/_shared/*.ts → clean npx tsc --noEmit → clean (0 lines) npx eslint next.config.ts → clean git diff --name-only origin/main | grep -E 'migrations|backfills' → empty Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
WalkthroughThe change stages West Vancouver Memorial Library as a disabled crawler organization. It adds activation filtering to crawler execution and allows images from the library’s domains. ChangesPhase 2 organization staging
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
What & why
West Vancouver Memorial Library runs The Events Calendar (Tribe) on the exact REST shape the five Phase-1 orgs already use, so adding it needs no adapter code — a registry entry and an image allowlist. First of four Phase-2 PRs from the 2026-07-29 source-scoping round.
Verified live against the crawler's own URL shape (
per_page=25+start_date+end_dateacross a 4-month window):Every event carries a venue and a real featured image, so all three cover tiers and the venue→
event_typelogic work unchanged.Decisions baked in
The new org lands
enabled: false. The weekly cron is live —20260724120000_events_crawler_cron.sql, pg_cron jobid 18,events-crawler-weekly, Mondays 14:00 UTC,active = true. That makes deploying this function the act that puts a new org into production: the next run would auto-publish it into the sharedeventstable the mobile app reads. Landing new orgs disabled decouples "merged" from "live", leaving activation as its own one-line reviewable change — which needs Savar's sign-off per CLAUDE.md Decision Authority (Activating anything that writes to shared production tables automatically).The fan-out iterates
ACTIVE_ORGS, so a disabled org is genuinely inert, not merely missing from the response counts.Image hosts are allowlisted now, ahead of activation, so flipping
enabledlater needs no accompanying web-side change.Relevance filtering is deliberately not in this PR. West Van is a public library, not a settlement agency, so its calendar mixes relevant programming (Device Clinic, English conversation) with toddler storytimes and Pride Bingo. A keyword relevance filter for library sources lands with the Phase-2 adapter work; this org stays disabled until then, so nothing unfiltered can reach the Events tab.
Changes
supabase/functions/events-crawler/index.ts— addOrg.enabled(documented against the live cron), mark the five Phase-1 orgsenabled: true, addwestvan-libraryasenabled: false, and deriveACTIVE_ORGSfor the fetch fan-out.next.config.ts— allowlistwestvanlibrary.ca+www.westvanlibrary.cainimages.remotePatterns(apex +www, matching the existing Phase-1 convention).Nothing here changes production. No migration, cron job, Vault secret, or DB object was touched, and the function was not deployed. The new source only goes live when someone both deploys
events-crawlerand flipsenabled— both of which need Savar's sign-off, since they write into shared mobile-facing data.Verification
deno check --node-modules-dir=auto supabase/functions/*/index.ts supabase/functions/_shared/*.tsnpx tsc --noEmitnpx eslint next.config.tsgit diff --name-only origin/main | grep -E 'migrations|backfills'Note:
tscandeslintdo not coversupabase/functions/**(tsconfigexclude, eslintglobalIgnores) — they validate thenext.config.tschange only.deno checkis the gate that sees the crawler, and it is currently weakened by the file's// @ts-nocheck; removing that lands in the next PR alongside the adapter refactor.Reviewer notes
ACTIVE_ORGSis computed once at module scope. That's intentional — the registry is static, and a per-request filter would imply runtime configurability the design doesn't have.wwwandwwwhosts allowlisted separately; West Van follows the same pattern rather than introducing a wildcard.🤖 Generated with Claude Code
Summary by CodeRabbit