Skip to content

Content refresh scheduler — scheduled incremental re-crawl#20

Merged
hendrikebbers merged 4 commits into
mainfrom
feat/010-content-refresh-scheduler
Jul 12, 2026
Merged

Content refresh scheduler — scheduled incremental re-crawl#20
hendrikebbers merged 4 commits into
mainfrom
feat/010-content-refresh-scheduler

Conversation

@herbie-bot

Copy link
Copy Markdown
Collaborator

Summary

ContentRefreshScheduler periodically re-runs incremental ingestion over all enabled sources via ContentIndexer.indexSource, on the configurable refresh-cron (default hourly, using @EnableScheduling from spec 001). It skips while the pipeline is disabled or Meilisearch is bootstrapping, never overlaps runs, and isolates per-source failures. Relies on the indexer's lastmod/304 diff, so a no-change refresh is cheap.

Spec

  • docs/specs/010-content-refresh-scheduler/{design,behaviors,steps}.md

Test coverage

  • 9 scenarios: per-source / disabled-skip / bootstrapping & global-disabled guards / non-overlap (deterministic re-entrancy, no threads) / fault isolation / cron externalization / new & deleted propagation — with a real ContentIndexer + stub strategy + in-memory store (no mocks). 103 tests total; spec-review and quality-review clean.

Closes #19

🤖 Generated with Claude Code

- ContentRefreshScheduler (@component, gated on meilisearch.enabled):
  @scheduled(cron ${open-elements.content.refresh-cron:0 0 * * * *}) reruns
  ContentIndexer.indexSource over enabled sources. Guards: skip when globally
  disabled, skip while SearchReadinessState.isBootstrapping(), non-overlap via
  AtomicBoolean. Per-source try/catch isolates failures.
- ContentRefreshSchedulerTest (real ContentIndexer + stub strategy + in-memory
  store + real SearchReadinessState): per-source/disabled/guards/non-overlap
  (re-entrancy, no threads)/fault isolation/cron externalization/new+deleted
  propagation. 103 tests green.
- steps.md; refresh CLAUDE.md.

Refs #19
…urce

CI (Linux) failed with 'Schema "OE_SPRING_SERVICES" not found': Hibernate
ddl-auto=update issued CREATE TABLE in the library's schema without creating
the schema first (passed locally by luck of the shared in-memory DB / order).
Fix deterministically:
- hibernate.hbm2ddl.create_namespaces=true so Hibernate creates entity schemas
- H2 INIT=CREATE SCHEMA IF NOT EXISTS OE_SPRING_SERVICES as a hard guarantee

Refs #19
@hendrikebbers hendrikebbers merged commit 7639990 into main Jul 12, 2026
1 check 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.

Content refresh scheduler — @Scheduled incremental re-crawl

2 participants