Task
Close the test-coverage and api-catalog parity gaps left after the feed-discovery work (per-section RSS autodiscovery, OPML subscription list, and sub-feed catalog entries). After this is done: the agent-discovery catalog lists every machine-readable surface the site exposes (including api/mythos.json), and automated tests guard both the catalog contents and the per-section feed autodiscovery <link> tags so they can't silently regress.
Context
A recent change made the RSS "feed of feeds" coherent: /podcast and /mythos now advertise their own feeds via <link rel="alternate"> (so a podcast client autodiscovers the iTunes feed instead of the enclosure-less firehose), and a new /feeds.opml + /feeds page lets readers subscribe to everything at once. Those new surfaces were verified manually (built-HTML grep + browser render) but not covered by automated tests, and one pre-existing inconsistency was found while in there. The api-catalog was introduced in #30.
Motivation
As a maintainer, I want the feed/catalog discovery surfaces under test so that a future refactor (or a dropped feedUrl prop) fails CI instead of shipping a broken-discovery regression — and I want the catalog to actually list every endpoint, so agents and readers can find them.
Three concrete gaps:
- api-catalog test gap — the agent-ready e2e asserts only
blog.json, projects.json, and rss.xml; it does not cover the newly added mythos/rss.xml, podcast/rss.xml, or feeds.opml anchors.
- api/mythos.json catalog gap — the
api/mythos.json endpoint exists but is absent from the api-catalog, even though its siblings api/blog.json and api/projects.json are listed.
- Autodiscovery link test — nothing asserts that
/podcast and /mythos render their section <link rel="alternate"> tag (plus the global /rss.xml).
Pointers
e2e/agent-ready.spec.ts:34 — the linkset anchors assertions to extend (currently lines 35-37).
public/.well-known/api-catalog — add an api/mythos.json entry. Mirror the api/blog.json block (describedby → the text/html page).
src/pages/api/mythos.json.ts — the endpoint being registered; its page is /mythos.
src/pages/api/blog.json.ts, src/pages/api/projects.json.ts — the catalog-entry pattern to follow (blog→/blog, projects→/projects).
src/layouts/Base.astro — the feedUrl/feedTitle props and the rendered <link rel="alternate"> (section feed first, then global /rss.xml).
src/pages/podcast/index.astro, src/pages/mythos/index.astro — the pages that pass feedUrl.
e2e/smoke.spec.ts — example of asserting against rendered pages under astro dev; the autodiscovery test fits best here (the <head> <link> tags are server-rendered HTML, so a Playwright page.locator('link[rel=alternate]') check on /podcast and /mythos is the natural home — a unit test can't render the .astro page).
src/pages/_rss.xml.test.ts — pattern for the feed unit tests (for reference; autodiscovery is HTML, not feed XML).
Constraints
- No new dependencies; use the existing Playwright + Vitest setup.
- Keep
api-catalog valid RFC 9727 (the existing e2e parses data.linkset).
- Don't change feed contents, formats, or the
feedUrl ordering (section feed must stay first, global second) — this is test/catalog work only.
Acceptance criteria
Out of scope
- The podcast cover art (handled separately).
- Merging mythos into the
/rss.xml firehose (deliberately kept a separate spoke).
- Any change to feed XML structure or the OPML format.
Reasoning guidance
Prioritize responding quickly rather than thinking deeply — this is mechanical test/config work with clear patterns to mirror. When in doubt, follow the existing api/blog.json catalog block and the existing e2e assertion style.
Cross-references
Task
Close the test-coverage and api-catalog parity gaps left after the feed-discovery work (per-section RSS autodiscovery, OPML subscription list, and sub-feed catalog entries). After this is done: the agent-discovery catalog lists every machine-readable surface the site exposes (including
api/mythos.json), and automated tests guard both the catalog contents and the per-section feed autodiscovery<link>tags so they can't silently regress.Context
A recent change made the RSS "feed of feeds" coherent:
/podcastand/mythosnow advertise their own feeds via<link rel="alternate">(so a podcast client autodiscovers the iTunes feed instead of the enclosure-less firehose), and a new/feeds.opml+/feedspage lets readers subscribe to everything at once. Those new surfaces were verified manually (built-HTML grep + browser render) but not covered by automated tests, and one pre-existing inconsistency was found while in there. The api-catalog was introduced in #30.Motivation
As a maintainer, I want the feed/catalog discovery surfaces under test so that a future refactor (or a dropped
feedUrlprop) fails CI instead of shipping a broken-discovery regression — and I want the catalog to actually list every endpoint, so agents and readers can find them.Three concrete gaps:
blog.json,projects.json, andrss.xml; it does not cover the newly addedmythos/rss.xml,podcast/rss.xml, orfeeds.opmlanchors.api/mythos.jsonendpoint exists but is absent from the api-catalog, even though its siblingsapi/blog.jsonandapi/projects.jsonare listed./podcastand/mythosrender their section<link rel="alternate">tag (plus the global/rss.xml).Pointers
e2e/agent-ready.spec.ts:34— the linksetanchorsassertions to extend (currently lines 35-37).public/.well-known/api-catalog— add anapi/mythos.jsonentry. Mirror theapi/blog.jsonblock (describedby→ thetext/htmlpage).src/pages/api/mythos.json.ts— the endpoint being registered; its page is/mythos.src/pages/api/blog.json.ts,src/pages/api/projects.json.ts— the catalog-entry pattern to follow (blog→/blog, projects→/projects).src/layouts/Base.astro— thefeedUrl/feedTitleprops and the rendered<link rel="alternate">(section feed first, then global/rss.xml).src/pages/podcast/index.astro,src/pages/mythos/index.astro— the pages that passfeedUrl.e2e/smoke.spec.ts— example of asserting against rendered pages underastro dev; the autodiscovery test fits best here (the<head><link>tags are server-rendered HTML, so a Playwrightpage.locator('link[rel=alternate]')check on/podcastand/mythosis the natural home — a unit test can't render the.astropage).src/pages/_rss.xml.test.ts— pattern for the feed unit tests (for reference; autodiscovery is HTML, not feed XML).Constraints
api-catalogvalid RFC 9727 (the existing e2e parsesdata.linkset).feedUrlordering (section feed must stay first, global second) — this is test/catalog work only.Acceptance criteria
public/.well-known/api-catalogincludes anapi/mythos.jsonentry with adescribedbylink to/mythos.e2e/agent-ready.spec.ts) asserts the catalog contains themythos/rss.xml,podcast/rss.xml,feeds.opml, andapi/mythos.jsonanchors./podcastadvertises/podcast/rss.xmland/mythosadvertises/mythos/rss.xmlvia<link rel="alternate">, alongside the global/rss.xml.npm testandnpm run test:e2eare green locally.Out of scope
/rss.xmlfirehose (deliberately kept a separate spoke).Reasoning guidance
Prioritize responding quickly rather than thinking deeply — this is mechanical test/config work with clear patterns to mirror. When in doubt, follow the existing
api/blog.jsoncatalog block and the existing e2e assertion style.Cross-references