Skip to content

feat(events-crawler): enable all five Phase-2 sources - #91

Merged
ltanafranca1004 merged 2 commits into
mainfrom
feat/enable-phase2-event-sources
Aug 2, 2026
Merged

feat(events-crawler): enable all five Phase-2 sources#91
ltanafranca1004 merged 2 commits into
mainfrom
feat/enable-phase2-event-sources

Conversation

@ltanafranca1004

@ltanafranca1004 ltanafranca1004 commented Aug 2, 2026

Copy link
Copy Markdown
Collaborator

What & why

Flips westvan-library, vpl, sfu, nvdpl and surrey-libraries to enabled: true on Savar's explicit sign-off. Each landed staged and disabled across #83/#84/#86/#87 so its adapter could be dry-run against the real feed before a single row could reach the shared events table — this is the flip that ends that staging.

Config only: five booleans plus two comments that had gone stale ("staged, disabled" / "NOT crawled until enabled flips"). No adapter, schema, migration or cron change.

🛑 Merging this does NOT go live

main and production are decoupled until the deploy command runs. The deployed function is still v6, which predates all Phase-2 code — it doesn't contain these adapters at all. Merging changes what a future deploy would ship, nothing about what runs today.

Until the deploy, the weekly cron keeps crawling the Phase-1 five exactly as it does now. Deploy is deliberately held for a separate, explicit go-ahead:

supabase functions deploy events-crawler --project-ref wrbauxutkysljmsqojts

Blast radius, once deployed

ACTIVE_SOURCES widens 5 → 10 and the next cron run picks the new sources up. All five carry relevanceFilter: true, and MAX_PER_ORG caps each at 25. The #84/#86 dry runs projected:

source projected rows
westvan-library 5
vpl 25 (of 112 in-window-and-relevant)
sfu 2
nvdpl 16
surrey-libraries 25
total ~73

Against 103 rows live today. Cron is events-crawler-weekly (jobid 18, 0 14 * * 1, active) — next fire Monday 2026-08-03 14:00 UTC.

Pre-change state, verified before editing

main fe59c7b
Phase-2 sources all five enabled: false
live events-crawler v6, updated_at 1785276124141 (2026-07-28)
cron jobid 18 0 14 * * 1, active
crawler:* rows for the five 0 each

Changes

  • supabase/functions/events-crawler/lib/sources.ts — five enabled: falsetrue; registry header and the Phase-2 section comment updated so the file no longer describes these as staged. The instruction to land new sources disabled stays, now with the reason attached (it's what lets dryrun.ts preview a real feed before anything can write).

⚠️ Coordination

Savar has signed off on the deploy. No migration, Vault secret, cron or DB object touched; the function is not deployed by this PR and nothing is manually invoked — the first live run is left to the existing schedule rather than forced ad hoc.

Verification

Check Result
npx tsc --noEmit clean
npm run lint clean — 0 errors (1 warning pre-existing in opengraph-image.tsx)
CI deno check gates this path (supabase/functions/**) — see checks
diff scope 1 file, 5 flags + 2 comment blocks, nothing else
live version unchanged v6 — confirmed after push

Reviewer notes

  • The ACTIVE_SOURCES = SOURCES.filter(s => s.enabled) gate is what made staging real: index.ts (the only Deno.serve entrypoint) iterates ACTIVE_SOURCES exclusively, while the full SOURCES list is read only by dryrun.ts, a CLI harness with no Supabase import and no write path.
  • Burnaby Public Library stays deliberately absent — its BiblioCommons tenant answers "The Events feature is not available", and bpl on BiblioCommons is Boston Public Library. Documented inline; unchanged here.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Enabled event crawling for West Vancouver Memorial Library, Vancouver Public Library, Simon Fraser University, North Vancouver District Public Library, and Surrey Libraries.
    • Updated source documentation to reflect the newly active event sources.

Flips westvan-library, vpl, sfu, nvdpl and surrey-libraries to enabled: true on
Savar's sign-off. Each landed staged and disabled across #83/#84/#86/#87 so its
adapter could be dry-run against the real feed before a single row could reach
the shared events table; this is the flip that ends that staging.

Config only — five booleans plus two comments that had gone stale ("staged,
disabled" / "NOT crawled until `enabled` flips"). No adapter, schema, migration
or cron change. The guidance to land NEW sources disabled stays, and now says why.

This does not go live on merge. The deployed function is still v6, which predates
all Phase-2 code, so main and production are decoupled until
`supabase functions deploy events-crawler` runs. Until then the weekly cron keeps
crawling the Phase-1 five, exactly as it does today.

Once deployed, ACTIVE_SOURCES widens from 5 to 10 and the next cron run picks the
new sources up. All five carry relevanceFilter: true and MAX_PER_ORG caps each at
25; the dry runs in #84/#86 projected westvan 5 · vpl 25 · sfu 2 · nvdpl 16 ·
surrey 25, so expect roughly 73 new rows against the 103 live today.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Aug 2, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
web-app Ready Ready Preview Aug 2, 2026 8:11am

@coderabbitai

coderabbitai Bot commented Aug 2, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 3cd56b9e-e02e-483a-aa3b-50bc802f2b21

📥 Commits

Reviewing files that changed from the base of the PR and between fe59c7b and 069c5ec.

📒 Files selected for processing (1)
  • supabase/functions/events-crawler/lib/sources.ts

Walkthrough

The source registry documents the staged-source policy and enables crawling for five Phase 2 sources while preserving existing relevance filtering.

Changes

Phase 2 source activation

Layer / File(s) Summary
Update Phase 2 source registry
supabase/functions/events-crawler/lib/sources.ts
The registry comments identify enabled Phase 2 sources. West Vancouver Memorial Library, Vancouver Public Library, Simon Fraser University, North Vancouver District Public Library, and Surrey Libraries are enabled. Existing relevance filtering remains unchanged.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: enabling all five Phase-2 event sources.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/enable-phase2-event-sources

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@ltanafranca1004

Copy link
Copy Markdown
Collaborator Author

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Aug 2, 2026

Copy link
Copy Markdown
✅ Action performed

Full review finished.

@coderabbitai coderabbitai Bot 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.

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/functions/events-crawler/lib/sources.ts`:
- Line 57: Update the Phase 2 comment near the sources registry to accurately
describe the current deployment state: indicate that these sources are enabled
in the registry but production remains on v6 until the separate deployment, or
revise the date/status only after that deployment occurs.
🪄 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 Plus

Run ID: 9681df23-17cb-4c40-99c4-0c14aa9c6772

📥 Commits

Reviewing files that changed from the base of the PR and between fe59c7b and 1af1ce0.

📒 Files selected for processing (1)
  • supabase/functions/events-crawler/lib/sources.ts

Comment thread supabase/functions/events-crawler/lib/sources.ts Outdated
Addresses the CodeRabbit finding, which is right: "live since 2026-08-02" would
have been false the moment this merged. Enabling a source in the registry only
changes what a future deploy ships — ACTIVE_SOURCES widens for an actual run when
the function is deployed, and that deploy is a separate, separately-approved step.
Production keeps running the previously deployed bundle until then.

Went slightly past the suggested wording. "Enabled in this registry since <date>"
is accurate but still leaves a reader to infer why that isn't the same as live,
and a date-stamped status line goes stale the moment the deploy does happen. The
comment now states the registry/deployed distinction outright, which stays true
either side of the deploy.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@ltanafranca1004

Copy link
Copy Markdown
Collaborator Author

Applied in 069c5ec — the finding is right, and it caught a real contradiction rather than a nitpick.

live since 2026-08-02 would have been false the moment this merged. Enabling a source in the registry only changes what a future deploy ships: ACTIVE_SOURCES widens for an actual run when the function is deployed, and that deploy is deliberately held as a separate, separately-approved step. Production keeps running the previously deployed bundle (v6, which predates all Phase-2 code) until then — so the comment would have contradicted this PR's own deployment note, which is exactly what was flagged.

Went slightly past the suggested wording, deliberately. enabled in this registry since <date> is accurate, but it still leaves the reader to infer why that isn't the same as live, and a date-stamped status line goes stale the moment the deploy does happen. The comment now states the registry-vs-deployed distinction outright:

// --- Phase 2, enabled in this registry 2026-08-02 ---
// Enabled here is not the same as live: ACTIVE_SOURCES only widens for a run once this
// function is *deployed*, and the deploy is a separate, separately-approved step. Until
// it happens production keeps running the previously deployed bundle and crawls Phase 1
// alone, however this file reads.

That reads correctly on both sides of the deploy, so it doesn't need revisiting afterwards.

Checked the rest of the file for the same overclaim — the header comment says "enabled … on Savar's sign-off", not "live", so it needed no change. tsc --noEmit and lint clean; comment-only change.

@ltanafranca1004

Copy link
Copy Markdown
Collaborator Author

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Aug 2, 2026

Copy link
Copy Markdown
✅ Action performed

Full review finished.


Your included review limit is currently reached under our Fair Usage Limits Policy. This review may still proceed through usage-based billing if eligible. Your next included review will be available in 55 minutes.

@ltanafranca1004

Copy link
Copy Markdown
Collaborator Author

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Aug 2, 2026

Copy link
Copy Markdown
✅ Action performed

Full review finished.

@ltanafranca1004
ltanafranca1004 merged commit 989d4fc into main Aug 2, 2026
4 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.

1 participant