Skip to content

fix: stop stale page_type from permanently killing event collection - #578

Merged
fatherlinux merged 1 commit into
masterfrom
fix/event-collection-stale-page-type
Aug 18, 2026
Merged

fix: stop stale page_type from permanently killing event collection#578
fatherlinux merged 1 commit into
masterfrom
fix/event-collection-stale-page-type

Conversation

@fatherlinux

Copy link
Copy Markdown
Member

Summary

  • Remove COALESCE from renderPage.js that preserved stale page_type classifications forever
  • When page content is re-rendered, page_type now resets to NULL, forcing the AI classifier to re-evaluate
  • This fixes 7 of 16 event sources that were permanently dead due to being misclassified as neither (some since May 2026)
  • Production cache already cleared for the 7 affected entries — next collection run will reclassify them

Context

Event collection has been returning 0 events since Aug 3. Root cause: the COALESCE(EXCLUDED.page_type, rendered_page_cache.page_type) on line 57 meant that once a listing page was classified as neither, it stayed neither forever — even after re-rendering fresh content. The classifier never got a chance to re-evaluate because newsService.js skips classification when pageType is already set.

Test plan

  • Build succeeds
  • Unit tests pass (integration test failures are pre-existing CI-red)
  • Verified one-line diff only touches renderPage.js
  • After deploy: monitor next daily collection run for events_found > 0
  • Verify no news collection regression (news uses same render cache path)

🤖 Generated with Claude Code

https://claude.ai/code/session_01Tp5oiFXGQ9M4wTzTJBCQds

The COALESCE in renderPage.js preserved old page_type classifications
forever, even after re-rendering fresh content. Event listing pages
misclassified as 'neither' could never self-heal, silently killing
event collection for 7 of 16 sources (some since May 2026).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Tp5oiFXGQ9M4wTzTJBCQds
@fatherlinux
fatherlinux merged commit 17a547c into master Aug 18, 2026
5 checks passed

@github-actions github-actions 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.

Gatehouse found no issues.

@fatherlinux
fatherlinux deleted the fix/event-collection-stale-page-type branch August 18, 2026 14:24
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