Skip to content

feat(catalog): admit the per-kind entries/<kind>/<slug>/ shelf layout - #472

Merged
genwave-radio merged 1 commit into
mainfrom
feat/catalog-nested-entry-paths
Aug 12, 2026
Merged

feat(catalog): admit the per-kind entries/<kind>/<slug>/ shelf layout#472
genwave-radio merged 1 commit into
mainfrom
feat/catalog-nested-entry-paths

Conversation

@genwave-radio

Copy link
Copy Markdown
Collaborator

🎯 What

Prereq for GenWave-Org/genwave-catalog#33 (split entries/ into per-kind subfolders). CatalogIndexValidator now admits both shelf layouts:

  • 📁 entries/<slug>/… — what the live origin serves today
  • 📂 entries/<kind-plural>/<slug>/… — what it serves after the move (personas/, themes/, fonts/, shows/)

🔒 How it stays strict

  • The kind folder, when present, must name the entry's own kind — a persona manifest under entries/shows/ fails its pattern outright.
  • Slug ownership now reads the second-to-last path segment (the slug in both layouts) instead of Split('/')[1].
  • New one-directory invariant: an entry's manifest, meta, and assets all sit in one directory. Without it the widened patterns would let entries/fonts/x/OFL.txt and entries/x/OFL.txt coexist in one entry — distinct paths, same bare filename, and the asset route looks files up by bare filename.

🧪 Tests

  • Story269: nested happy path (both layouts coexisting mid-migration), wrong-kind-folder reject, nested slug-squat reject, meta-strays-from-manifest reject
  • Story279: fully nested font pack admitted; cross-layout straying asset ⇒ entry skip (index survives)
  • Full Host suite 1661 ✅ · architecture laws 95 ✅ · solution builds clean

🚦 Sequencing

This must be released and deployed before the catalog-side migration PR merges — an old station fetching a migrated index rejects the whole index (fail-closed), so the shelf would go empty until upgraded. Broadcast is unaffected either way.

Prereq for genwave-catalog#33 (entries split into per-kind folders): the
index validator now accepts BOTH the flat entries/<slug>/ layout the live
origin serves today and the nested entries/<kind-plural>/<slug>/ layout it
will serve after the move. The kind folder, when present, must name the
entry's own kind; the slug-ownership check reads the second-to-last path
segment (valid in both layouts); and a new one-directory invariant pins an
entry's manifest/meta/assets to a single directory — which is what keeps
bare filenames unique for the filename-keyed asset route now that the same
slug could otherwise appear under two layouts at once.
@genwave-radio
genwave-radio merged commit 31a9f06 into main Aug 12, 2026
11 checks passed
@genwave-radio
genwave-radio deleted the feat/catalog-nested-entry-paths branch August 12, 2026 10:00
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 12, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant