Skip to content

feat(catalog): last_result and meta.starters on configs v2 - #1113

Merged
gildesmarais merged 4 commits into
mainfrom
feat/catalog-last-result
Aug 29, 2026
Merged

feat(catalog): last_result and meta.starters on configs v2#1113
gildesmarais merged 4 commits into
mainfrom
feat/catalog-last-result

Conversation

@gildesmarais

Copy link
Copy Markdown
Member

What changed

  • Bump catalog API to catalog_version 2 with required last_result on entries and meta.starters (replaces frontend lockstep STARTER_FEED_IDS).
  • Add process-local Feeds::LastResults / LastResult; record on Service#build_result only for directory-defaults scrapes.
  • Join last results into typed Catalog::Entry via merge; Catalog::Starters owns the starter list server-side.
  • Frontend parses v2 (parseCatalog, ranking demotion for empty/error rows) and consumes meta.starters.
  • OpenAPI / generated types: widen last_result.code / at to string|null (assure fix 7f0aa8f8).

Why

Clients need scrape outcome signals and a single source of truth for Create-page starters without hardcoding feed IDs in the frontend. Directory defaults scrapes are the only path that should populate process-local last_result.

Risk

  • Compat: catalog_version 2 is a breaking wire shape for clients still expecting v1 (no last_result / meta.starters). html2rss.github.io is out of scope for this PR.
  • Process-local store: last_result resets on process restart; multi-instance deployments will not share outcomes.
  • Recording scope: only directory-defaults scrapes are recorded — custom/user feeds do not update catalog last_result.

Review map

  1. app/web/feeds/last_results.rb + app/web/feeds/service.rb — process-local store and record-on-build gate
  2. app/web/catalog/starters.rb + app/web/catalog/merge.rb / entry.rb — starters + last_result join into catalog rows
  3. app/web/api/v1/configs.rb + public/openapi.yaml — v2 contract and nullability of code/at
  4. frontend/src/catalog/parseCatalog.ts + findCatalogEntries.ts — consume meta.starters / demote empty|error
  5. Specs under spec/html2rss/web/feeds/ and spec/html2rss/web/catalog/ — recording, merge, starters

Validation

  • make ready — exit 0 (Dev Container)
  • make ci-ready — exit 0 (Dev Container)

Record process-local scrape outcomes on directory-defaults static feeds and
join them into typed catalog entries so clients can demote failing rows and
consume server-owned meta.starters instead of lockstep starter ID lists.
Parse catalog_version 2 last_result and meta.starters, delete the lockstep
STARTER_FEED_IDS list, and demote empty/error rows in catalog find ranking.
Seed warm last_result rows in the configs OpenAPI example so code/at
infer as string|null, and cover empty/error LastResults recording.
Spectral validates OAS 3.0 schemas; emit nullable: true instead of
3.1+ type unions, and register the Catalog operation tag globally.
@gildesmarais
gildesmarais enabled auto-merge (squash) August 29, 2026 12:34
@gildesmarais
gildesmarais merged commit efe66f1 into main Aug 29, 2026
15 checks passed
@gildesmarais
gildesmarais deleted the feat/catalog-last-result branch August 29, 2026 12:37
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