Skip to content

feat(classifications, iid): bring the catalogue, ladders and helpers to parity with the reference implementation and derive one podcast GUID per feed (P16d) - #39

Merged
kamescg merged 7 commits into
update/v1.1.0-alphafrom
codex/p16d-classifications-parity
Oct 20, 2026
Merged

kamescg merged 7 commits into
update/v1.1.0-alphafrom
codex/p16d-classifications-parity

Conversation

@jonathanprozzi

@jonathanprozzi jonathanprozzi commented Oct 19, 2026 •

Copy link
Copy Markdown
Member

Important

@kamescg — review ready. Base is #36; retarget to update/v1.1.0-alpha once #36 lands. This is the biggest ledger movement in the series; read the conformance/known-divergences.ts diff first.

To ratify here: (1) the declarative spec shape stays canonical, extended only by optional commonName and atomCategory; (2) the four schema-context values (three Ethereum classifications → https://schemas.intuition.systems/v1, social-media-account → https://schema.org/); (3) podcast feed normalization lives in the IID interpreter's podcast-guid source, so every entry point derives one GUID per feed.

Receipt: 28 ledger entries retired because both sides now agree (book, company, music-album, person ladders plus the two podcast cases); harness 1027 pass / 0 fail.

Child PR of the v1.1.0-alpha umbrella (#15). Part of the parity series: each PR in the series makes a train package behave exactly as the reference implementation's in-tree copy does today, so the published packages can replace those copies without a behaviour change.

Current (train)

@0xintuition/classifications carried an older catalogue than the reference implementation: identity ladders differed for several classifications (Wikidata subtype slugs, rung order, the podcast feed recipe), four schema contexts pointed at a Pages-hosted schema or the wrong vocabulary, the person spec required a family name, and consumer helpers the reference exports (lookups by type, label and derived-identifier helpers, search text, visibility presets, native types, aliases, discover groups) were missing. The podcast feed GUID was also derived from the raw feed URL when a ladder was passed straight to the IID engine, but from the normalized URL through the classification helper, so one feed could get two identities.

Need

The catalogue, the identity data and the helpers equal to the reference's, one derivation path for podcast feeds, and the conformance ledger moved to match.

Reconciliation

  • Catalogue and identity data (src/generated/specs/*, src/classifications.ts and the ported helpers): every ladder, schema type and context equals the reference. The four context changes: ethereum-account, ethereum-erc20, ethereum-smart-contract → https://schemas.intuition.systems/v1; social-media-account → https://schema.org/. ClassificationSpec gains optional commonName and atomCategory; creation profiles regenerated.
  • Six Wikidata ladders stay slugless (brand, local-business, location, event, thing, music-group), as in the reference; the ladder already refuses a bare Wikidata value unless explicitly allowed, so no refusal change was needed.
  • packages/primitives tests: eight expectations follow the data (contexts, person mononym, the polymorphic example moved from movie to brand).
  • packages/iid derive.ts: the podcast-guid value source normalizes scheme and host case before hashing, so identityLadderFor('podcast-series') passed to the engine, the classification helper and the primitives anchor builder derive the same GUID. The adapter-side normalization is removed. Regressions in iid and classifications pin the exported-ladder path.
  • Conformance ledger: 28 entries retired in conformance/known-divergences.ts because the public side now equals the reference: the two podcast feed-host entries (anchor and ladder) and 26 ladder cases across book (wd:written-work, 6), company (wd:organization, 8), music-album (wd:album, 6), person (olid and the OpenLibrary author case, 5) and the person ladder structure. No actualHash re-pinned, no expectedHash or vector touched; the README enumeration moves to 33/25 for the anchor proof and 410/44 for the ladder proof (765 agreements, 70 divergences overall).

Parity

Matches the reference implementation's classifications package at its current development tip (catalogue, identity ladders, helpers) and its podcast feed normalization. Remaining differences are the ones the ledger still carries after this PR, each with its reason.

Held out

  • No version bump; the release PR freezes versions for the whole family at once.

Evidence

  • packages/classifications: typecheck, lint, build green; 257 tests (catalogue, label and ladder parity oracles inlined from the reference; helper equivalence; the exported-ladder podcast regression). classifications:check-creation-profiles up to date.
  • packages/iid 275 tests, packages/primitives 140, packages/iid-ladder 139, packages/iid-registry 49; root registry:check (14 packages), guard:supply-chain, pack:dry-run pass.
  • Conformance harness on top of test(integration): reconcile merged conformance gates and enforce them in CI #36: 1027 pass, 23 todo, 0 fail.
  • Independent review: the conformance pass and the adversarial pass each found the same single finding, the podcast interpreter gap, now fixed; the adversarial pass confirmed the parity oracles go red under mutation, helper equivalence on edge inputs, consumer builds for every classification, context bytes and the person mononym rule.

Review notes

Base fix/pr15-integration-gates (#36) so the conformance gate runs on this diff; retarget to the train branch once #36 lands. Read the ledger diff first (it is the parity receipt), then src/generated/specs/ for the data, then packages/iid/src/derive.ts for the podcast change.

… to parity with the reference implementation (P16d)

Application code imports helpers and data from the classifications
package that the train lacked, and the train's spec data had drifted from
the reference since August. This ports all of it onto the train's
declarative spec shape.

- Helpers: getClassificationLabel, getClassificationByType,
  getClassificationByReference (plus the reference resolver tiers),
  deriveClassificationIdentifier, buildClassificationSearchText,
  visibility presets incl. PRIMARY_ITEM_CATALOGUE_PRESET, native atom
  types, identity field aliases, DISCOVER_ACTIVITY_GROUPS; all exported
  from the package root.
- Spec shape: optional typed commonName and atomCategory fields (the
  reference's label and engine category); every spec populates
  atomCategory. schema, metadataPredicates, inline identity and the
  creation-profile shape stay canonical.
- Identity data: every rung order, wdSlug, recipe and identifies value
  audited against the reference for all 37 classifications; podcast GUID
  derived through normalizePodcastFeedUrl; person accepts a mononym
  (familyName optional) as the reference does.
- Schema contexts: four specs move to the reference's context values
  (ethereum-account and ethereum-smart-contract to
  https://schemas.intuition.systems/v1, social-media-account and one more
  to the reference value); no spec references schema.intuition.systems
  any more. Creation profiles regenerated through the repo generator.
- Tests: 256 pass, including inline parity oracles for labels, ladders
  and the catalogue (rung tokens, schema type and context per type) built
  from the reference data at authoring time; all 67 reference test cases
  present.

Six ladders still carry slugless wd rungs (brand, local-business,
location, event, thing, music-group); the ladder already refuses bare wd
minting unless the plain-wd policy allows it, matching the reference.
…ta (P16d)

The classification parity port changed data the primitives tests pinned:
the Ethereum classifications' JSON-LD context is now the reference value,
a person accepts a mononym (familyName optional, givenName required), and
the movie ladder carries an active typed wd binding so it no longer
serves as the polymorphic bare-P0 example (brand does). Eight
expectations updated; 140 tests pass.
…interpreter so every entry point derives one GUID (P16d fix round)
…lassification data resolves (P16d ledger round)
…-skip

fix(iid): skip a Wikidata rung without an active slug in the declarative engine, as the reference does (P16i)
@kamescg
kamescg changed the base branch from fix/pr15-integration-gates to update/v1.1.0-alpha October 20, 2026 16:22
@kamescg
kamescg merged commit bd5f880 into update/v1.1.0-alpha Oct 20, 2026
1 check passed
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.

2 participants