Skip to content

docs(backlog): record relevance.ts left-word-boundary false positives - #99

Merged
ltanafranca1004 merged 1 commit into
mainfrom
docs/relevance-word-boundary-finding
Aug 9, 2026
Merged

docs(backlog): record relevance.ts left-word-boundary false positives#99
ltanafranca1004 merged 1 commit into
mainfrom
docs/relevance-word-boundary-finding

Conversation

@ltanafranca1004

@ltanafranca1004 ltanafranca1004 commented Aug 9, 2026

Copy link
Copy Markdown
Collaborator

What & why

Records a real defect found during a manual review of #96/#97, both of which merged under an explicit no-CodeRabbit-review exception when the free-tier review quota ran out.

Worth stating up front: a retroactive CodeRabbit review of those two PRs is not obtainable. I tested it — @coderabbitai review returns ⚠️ Already reviewed on #96 (its incremental system considers the earlier commit reviewed) and ⚠️ Pull request is closed on #97. Not rate limits; the quota had cleared. So a manual pass was the substitute, and this entry is what it produced.

Docs only. No code change.

The finding

Same bug class CodeRabbit itself caught on #96tech\btech, which was matching the tail of "Biotech Help" — but in terms that predate that PR. A sweep of all 67 terms in RELEVANCE_RE found 60 lack a leading \b. Most are harmless (no English word ends in "newcomer"). Four are substrings of common words:

term swallowed by real-looking title that wrongly passes
lease\b lease Please Note: Library Closed Monday
rental Pa·rental Parental Controls: Keeping Kids Safe Online
tenant Lieu·tenant Lieutenant Governor Reading Award Ceremony
resume resume·d Presumed Innocent: Film Screening

Each verified against the live filter, not reasoned about on paper.

Status: latent, zero live incidence

please, parental, lieutenant, presum and resumed each return 0 matches across:

  • the 395-title captured corpus (all seven filtered sources' full 4-month windows), and
  • all 206 rows currently in public.events

Nothing is being wrongly ingested today. Parental … is the likeliest to fire eventually since it's ordinary library programming — so worth fixing before it does, but not urgent.

Why recorded rather than fixed here

Adding \b narrows the regex. The monotonicity argument that makes term additions safe ("a union alternative can only add keeps") does not apply — a narrowing edit can drop an existing keep. It needs the same corpus re-verification the \btech fix got, plus DROP fixtures in lib/relevance_test.ts.

Best folded into whichever PR next touches relevance.ts — e.g. the near-misses already recorded directly above this entry — rather than shipped as its own change.

Placement

Deliberately a separate entry rather than folded into the existing relevance.ts near-misses section. That section is about terms the filter wrongly drops (false negatives); this is the opposite direction — titles it wrongly keeps. Different failure mode, different fix shape. Placed adjacent so they read together.

Verification

  • npx tsc --noEmit — clean
  • deno test supabase/functions/events-crawler/lib/relevance_test.ts — 2/2 pass
  • git statusBACKLOG.md is the only file touched

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation
    • Added a backlog finding documenting potential false-positive matches in event relevance detection.
    • Recorded that current corpus and live-event checks found no affected incidents.
    • Proposed tighter matching rules and regression coverage for future validation.

Found during a manual review of #96/#97, which merged under an explicit
no-CodeRabbit-review exception. CodeRabbit cannot review a merged PR —
`@coderabbitai review` answers "Already reviewed" on #96 and "Pull
request is closed" on #97 — so the manual pass was the substitute, and
this is what it produced.

Same bug class CodeRabbit caught on #96 (`tech` -> `\btech`, "Biotech
Help"), but in terms predating that PR. 60 of 67 terms lack a leading
`\b`; four are substrings of common words:

  lease\b  <- P-lease     "Please Note: Library Closed Monday"
  rental   <- Pa-rental   "Parental Controls: Keeping Kids Safe Online"
  tenant   <- Lieu-tenant "Lieutenant Governor Reading Award Ceremony"
  resume   <- P-resume-d  "Presumed Innocent: Film Screening"

Latent, not firing: please / parental / lieutenant / presum / resumed all
return 0 matches across both the 395-title captured corpus and all 206
rows in public.events. Recorded rather than fixed because adding `\b`
NARROWS the regex, so it needs the same corpus re-verification the
`\btech` fix got — best folded into whichever PR next touches
relevance.ts.

Docs only. No code change.

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

vercel Bot commented Aug 9, 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 9, 2026 6:21am

@coderabbitai

coderabbitai Bot commented Aug 9, 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: d064d1c3-4277-4d8b-91d8-43bf2d0177b6

📥 Commits

Reviewing files that changed from the base of the PR and between 94d9c24 and 3bbebbf.

📒 Files selected for processing (1)
  • BACKLOG.md

Walkthrough

The change adds a backlog finding for four events-crawler relevance terms that can match substrings within unrelated words. It records zero observed incidents and specifies regex, regression-test, and corpus-validation follow-up work.

Changes

Events crawler relevance audit

Layer / File(s) Summary
Relevance term audit
BACKLOG.md
Documents four relevance terms without leading word boundaries, affected examples, verified zero incidence, proposed regex updates, regression fixtures, and corpus validation requirements.

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

Possibly related PRs

  • UnifyCN/web-app#96: Addresses related events-crawler relevance regex boundaries and regression coverage.
🚥 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 documentation change and identifies the recorded relevance false positives.
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 unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/relevance-word-boundary-finding

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 review

@coderabbitai

coderabbitai Bot commented Aug 9, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@ltanafranca1004
ltanafranca1004 merged commit 451fc7a into main Aug 9, 2026
3 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