← Home
content-addressing metadata provenance cdn schema-first

cdn.stackdump.com Is a Polydocument Host

When we launched shareable tracks on beats.bitwrap.io, every render got a content-addressed URL — a CIDv1 that is the track, so the same bytes always resolve to the same address. That worked well enough that the renderfarm started producing more artifacts than any single app wanted to own: mixes, stems, provenance envelopes, arrangement writeups.

cdn.stackdump.com is where they landed. It's a content-addressed file host — cdn.stackdump.com/ipfs/<CID>/<path> — but the interesting part is that every entry is a small markdown document whose YAML frontmatter is the metadata of record, and the whole site reads and presents that frontmatter as a first-class feature. A polydocument host: one storage contract, many content types, no per-type code.

The directory is the URL

An entry is a directory named after its CID, sitting under data/blobs/<CID>/. Whatever files you put inside become public paths — audio.webm shows up at cdn.stackdump.com/ipfs/<CID>/audio.webm. Every file under a CID goes out with Cache-Control: public, max-age=31536000, immutable (the backend sets it, and nginx sets it again at the edge for media and JSON), on the theory that the address can't drift, so the cache never has to expire. That theory is the producer's promise, not the host's: nothing hashes the bytes and compares them to the directory name, and the host's own code already hedges it — audio URLs on the landing page and in the search cards carry a ?v= cache-buster because audio can be re-attached under a stable CID.

The scanner holds the corpus to two rules. An entry needs an index.md; without one the directory isn't indexed and has no landing page — though its files are still served by path, because the file handler reads straight from blobs/<CID>/ without asking the index. And a cid: field in that frontmatter has to match the directory name; a mismatch is a loud error at scan time rather than a silent 404 later (leave cid: out and the indexer fills it in from the directory).

The index.md markdown body becomes the rendered landing page. The frontmatter becomes everything else.

Schema before content

Every entry declares what it is before it says anything else. By convention that's four fields up front — the indexer itself enforces only the cid match:

title: "Cohesion v2 · trance · seed 14"
cid: z4EBG9j1EeuXVzM6TSfgWdiTLkhV4srzufQwJvMyMnPJcmZGtD4
source: beats-bitwrap-io
schema: BeatsShare/v1

source is the producing project — the repo directory name, so you can always trace an artifact back to the thing that made it. schema is a versioned type name, <TypeName>/v<int>, describing what's inside the CID rather than which app emitted it. BeatsShare/v1 is a beats render envelope; BeatsRemix/v1 is a renderfarm arrangement; BlogPost/v1, PetriNet/v1, and Dataset/v1 are all shapes a producer could add tomorrow without touching the host.

The versioning is the point. Bump BeatsShare/v1 to v2 when the shape changes and every old v1 entry keeps resolving exactly as it did. Two projects emitting the same logical thing share a schema; the same project evolving its output forks a version. This is the same discipline we run on Petri-net models — pin the specification, let the implementations move — applied to stored artifacts.

Frontmatter is the interface

Beyond the four required fields, frontmatter is open. A beats render carries genre, seed, tempo, cohesion, provenance, farm, renderedAt, and a tags list. A Petri-net entry could carry metamodel, net, place and transition counts. The host doesn't have a column for any of these, and it doesn't need one.

The indexer keeps a generic key-value table over every scalar frontmatter field — and every element of a scalar array — so any field you write is queryable the moment it's indexed. Exact match is ?meta.<key>=<value>; anything that parses as a number gets a range filter, ?meta.<key>.min= and ?meta.<key>.max=. Add bpm: 140 to your frontmatter and ?meta.bpm.min=120 works immediately, with no migration and no code.

Frontmatter flows into a generic key-value index, which builds the search facets and the CID landing page

That table is what makes the frontend build itself. On load the search page hits /api/facets, which reports the distinct source, schema, genre, and tag values that actually exist plus the list of metadata keys present across the corpus — then builds its filter lists from that, each value with its count, recomputed against whatever filters are already set. The advanced panel exposes a raw key/value pair that folds straight into a meta.<key>=<value> filter. A field you invented for your own producer becomes a live query control the same day, with zero UI code written for it.

The CID landing page does the mirror image. The server renders a definition list of the well-known fields, then iterates every remaining producer-defined scalar and renders it generically underneath. An entry from another producer surfaces its own vocabulary — metamodel: petri-arrangement, net: petri-cycle — without the template knowing those keys exist. Result cards lead with source and schema as type badges, then pick a preview by content: an audio player for a mix, a thumbnail grid for images, a file list for everything else. Any object type is at least navigable.

Lineage as a DAG

Content addressing gives you deduplication for free, provided the producer's CIDs really are hashes of content. It also gives you provenance, if you write it down. Entries carry an optional parents: list — the CIDs they were derived from. This is the frontmatter of the seed-7 petri-cycle remix:

source: beats-builder
schema: BeatsRemix/v1
metamodel: petri-arrangement
net: petri-cycle
parents:
  - bafyreie841526edd53002a8e54cfb31326b61e
  - bafyrei47dd48f108dae83db7d543ceb5f0786e

That is the design: if parents are named by content hashes, the lineage is a DAG by construction — you can't rewrite an ancestor without changing its address, and a cycle would need a parent whose hash already contains its child's. A remix that claims two parents would be claiming two exact prior states, byte for byte, and the audit trail would be the artifact's own addresses all the way down — the past-tense witnessing we keep coming back to.

The entries in the store today don't meet it, and the example above is one of them. Those identifiers come from make_cid in beats-builder's scripts/recording/publish_petri.py, which takes sha256 of the session name, net and seed and prints bafyrei plus the first 32 hex digits. That hashes a name, not the bytes, and it isn't a valid base32 CID — the digits 0, 1, 8 and 9 aren't in that alphabet. The same script sets each remix's parents: to every other remix in the batch, so seed 0 lists seeds 1 and 7, seed 1 lists 0 and 7, and seed 7 lists 0 and 1: a sibling cycle, not a lineage. None of the three names the Crimson Colimit render they were actually cut from, which is the parent edge that would matter. The beats shares do better: the Broken Adjoint render names that same Crimson Colimit share as its one parent, by the envelope CID beats.bitwrap.io computed, and nothing points back. Nothing in the host told the two cases apart. parents: is ordinary frontmatter; the indexer stores it and checks it against nothing, so the DAG holds exactly as far as the producers hold it.

The petri-cycle entries were meant to be the showpiece, and their markdown bodies are Petri-net writeups: song sections are places, section moves are transitions, inhibitor arcs cap how often the track revisits a section. The writeup is template prose, though, and the walk logged under it disagrees. The seed-0 entry says "no second BRIDGE; CHORUS revisited up to three times" and then lists a walk with two BRIDGEs and five CHORUSes. Reading the walker (petri_arrangement.py, same directory; read, not re-run) explains both: the inhibitors are visit-count guards that zero a transition's weight only once the count exceeds the cap, so chorus_to_bridge with cap 1 still fires a second time, and the CHORUS cap sits only on the chorus_to_verse edge, so the bridge path keeps returning to the chorus. The document explains its own structure in the ecosystem's abstraction, and that's exactly what lets you catch it contradicting itself.

One master, one mirror

The same binary runs in two modes. The master lives on the local valoper workstation, bound to loopback, and is the only thing that accepts writes. The mirror runs on the pflow.dev host, read-only, and serves the public cdn.stackdump.com vhost.

Publishing writes a CID directory on the master, pings its /admin/reload?cid=<CID> to index that one directory, then rsyncs only the blobs to the mirror and pings the mirror's reload to rebuild its index in place. The SQLite index file itself is never copied — a running WAL-mode process that finds its database swapped out from under it fails with database disk image is malformed, so the mirror rebuilds through its own healthy connection instead of ever receiving a foreign file. Blobs move; indexes are always local.

Not just for machines

Most of what's in the corpus today was written by Claude — renderfarm output, generated arrangements, envelopes with stego provenance baked in. That's a fine way to fill a content-addressed store quickly, but it's not what the store is for.

The four-field contract — title, CID, source, schema — is exactly as useful for a human dropping in a dataset, a model export, a snapshot of a blog post, or a set of field notes. Write the frontmatter, and the search facets, the range filters, the type badges, and the auto-rendered metadata list all come for free. The lineage fields are there when you want a remix or a revision to point at what it came from. draft: true keeps a work-in-progress out of the feed and search while still reachable by its direct URL, so you can stage before you publish.

The premise is the same one we apply to everything here: pin a small, explicit schema, and let the tooling read it. The producer can be a renderfarm or a person, and the host doesn't care which. It also doesn't check what the producer claims — a CID, a parent, an inhibitor cap — so the schema is a contract the producer keeps, and the lineage section above is what it looks like when one doesn't.

Browse it at cdn.stackdump.com.

What Changed

Revised 2026-11-19 against the cdn-stackdump-com source (indexer, server, mirror script), the stored entries cited above and beats-builder's two publish scripts. Nothing was re-run.

  1. Lineage. The post said the parents: lineage is a real DAG because parents are named by immutable CIDs. Its own example came from remixes whose identifiers hash a session name rather than content and which name each other as parents in a cycle. The DAG is now stated as the design, with what the store actually holds.
  2. The petri-cycle showpiece. Its stated inhibitor caps don't match the walk it records; the walker's off-by-one guard is why.
  3. Missing index.md. Such a directory isn't indexed and has no landing page, but its files are still served by path. The post had said it isn't served.
  4. Smaller corrections. The cache header comes from the backend as well as nginx, and audio is cache-busted because it can be re-attached under a stable CID; cid: may be omitted and is filled in from the directory; facets are checkbox lists with counts, not dropdowns.

Related: beats.bitwrap.io is a Jambox Now · JSON-LD as Declarative Infrastructure · Brouwer Ordinals and the Shape of a Witness · A browser music sequencer where every note is a Petri-net transition firing

×

Follow on Mastodon