Repository navigation
feat(core-ts,api,renderer): collection invariants, registry API, feed/sitemap (RFC-0040 step 2) - #85
Merged
Merged
Conversation
…/sitemap (RFC-0040 step 2) Store: the first entry of a new collection (or an entry moved into one) claims its default prefix and is refused with path_conflict or reserved_path when it overlaps a configured permalink, a taxonomy archive, /search or a locale prefix, with SQL race guards in the entry's batch; this closes RFC-0038's gap. A site update that declares a collection runs the same check, and a declared collection with entries or named by a taxonomy cannot be undeclared (collection_in_use). API: GET/PUT/DELETE /api/sites/:id/collections (content:read, site:settings), PUT with ?dryRun=1; entries in a collection outside the registry are refused (collection_undeclared, 422). Allowed in the playground. Renderer: feed:false and sitemap:false keep a collection out of feeds and sitemap.xml; collectionLabel/collectionSettings re-exported. Permalink reset (MCP set_collection_permalink, Studio) keeps the collection declared. Refs #71 (RFC-0040, ADR-0042) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Madraka <8898640+Madraka@users.noreply.github.com>
Madraka
force-pushed
the
feat/collections-store
branch
from
October 22, 2026 19:38
2d14fcc to
3c4453e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
RFC-0040 / ADR-0042, step 2 of 4. Stacked on #84; GitHub retargets it to
mainonce #84 merges.Store (
store/collection-paths.ts, new):New collection: the first entry of a new collection, or an entry moved into one, claims its default prefix
/<collection>. It is refused when that prefix overlaps:path_conflict);path_conflict);/search, media or a locale prefix (reserved_path).The SQL race guards (
configuredPrefixFree,noArchiveOverlapping) join the entry's batch. This closes RFC-0038's gap.Site update:
collection_in_use), with aNOT EXISTSguard on the CAS.Not enforced here: the store does not require a declaration, so push, import and seed keep working.
API:
GET /api/sites/:id/collections(content:read)PUT /:key { settings, rev }(site:settings,?dryRun=1)DELETE /:key?rev=(site:settings)POST entriesinto an unregistered collection fails with 422collection_undeclared.Renderer:
feed: false, and the sitemap leaves out those withsitemap: false. The defaults are unchanged.collectionLabelandcollectionSettingsare re-exported from./routing(additive only).Permalink reset keeps the declaration:
set_collection_permalink'snextSiteand Studio'swithPrefixeskeep{};Tests, one package at a time:
EADDRNOTAVAIL(machine port exhaustion, as in feat(contracts,core-ts): collection registry (RFC-0040 step 1) #84).Also: biome errors clean,
size:checkok, changeset added.Refs #71
🤖 Generated with Claude Code