Skip to content

feat(renderer): collections stage 3 in the renderer (RFC-0042 step 3) - #105

Merged
Madraka merged 2 commits into
mainfrom
feat/stage3-renderer
Oct 23, 2026
Merged

Madraka merged 2 commits into
mainfrom
feat/stage3-renderer

Conversation

@Madraka

@Madraka Madraka commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

Step 3 of RFC-0042's rollout (ADR-0044), built on #103 and #104.

Derived gates (min(availability.until, expiry))

Surface unlist past the gate hide past the gate
Entry URL 200 404
Listings, archives, contentList, related left out left out
RSS, sitemap, llms.txt, search left out left out
Menus, hreflang kept gone
  • The gate index caps the edge cache at each derived instant, and at the date values of list fields used with now.
  • A date ends at the start of the next day in the site's zone.
  • Previews show "Ended on …" or "Expired on …".

Guards

  • The site Worker reports gates: 2. Until it does, the store refuses a new or changed expiry with gates_unsupported (409); removing one is always allowed. The API, MCP and imports go through this check.
  • In auto mode, a publish or release that adds a live entry's derived gate, or moves it earlier, waits for a person (new check code expires).

Theme API (additive)

  • ./queries: queryEntries, contentListEntries and friends. GraphSource.queryEntries? / routableEntries?.
  • withStructuredData / entryStructuredData: the preset JSON-LD in place of BlogPosting. entryHead is unchanged.
  • ContentList supports where and orderBy. Old themes that pass a source's list through get field listings too; the compat test checks this for v0.3.10, v0.4.0 and v0.5.0.

Starter: uses contentListEntries and withStructuredData. Output is unchanged for sites without the new settings.

Benchmark (10,000 entries, median of 10 runs, bench:lists, opt-in)

Path SQLite CPU Rows D1 CPU D1 rows
Today's scan, no where 53 ms 10,000 100 ms 10,002
Store / API queryContentEntries 124 ms 10,001 176 ms 10,003
Snapshot, per request (published site) 22 ms 0 21 ms 0

The published site is well under the 50 ms threshold. The store, API and MCP path reads the whole collection by construction and is over it. Under RFC-0042 open question 10 that argues for an entry_list_values side table on that path, a separate decision.

Not done

  • The workerd route sweep doesn't cover derived gates yet; only the renderer sweep does.
  • Studio has no wording for the expires reason yet (step 5).
  • renderSectionHtml previews ignore where, as they already ignore filter.

Tests

  • astro-renderer: 283/283.
  • cloudflare: 54/54.
  • agent-runtime: 72/72.
  • api and mcp-server pass.
  • core-ts: sqlite and D1 pass. Locally the DO tail fails with EADDRNOTAVAIL.
  • cli: e2e and the compat test with three themes pass; the full run otherwise passed.

Changeset: minor.

🤖 Generated with Claude Code

Madraka and others added 2 commits October 23, 2026 13:47
- Derived expiry gates: unlist keeps the entry URL and leaves
  listings, feeds, sitemap, llms.txt, archives and search; hide is a
  404. The gate index caps the edge cache at derived instants and at
  list-field dates used with `now`. Previews show "Ended on" /
  "Expired on".
- Site Worker features report gates: 2; the store refuses a new or
  changed expiry (gates_unsupported, 409) until then.
- Auto mode holds a publish or release that adds or advances a live
  derived gate (`expires`).
- queryEntries on live and snapshot sources, ContentList where/orderBy
  (old themes passing source lists through get them too),
  withStructuredData for the Event, JobPosting, Product and Recipe
  presets.
- Starter uses both; output unchanged without the new settings.
- Compat test with frozen v0.3.10, v0.4.0 and v0.5.0 themes; opt-in
  10k-entry benchmark (bench:lists).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Madraka <8898640+Madraka@users.noreply.github.com>
…field lists

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Madraka <8898640+Madraka@users.noreply.github.com>
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