Repository navigation
feat(iid-spec, iid, iid-ladder, iid-registry): register provider-local identifiers as class D with the reference's grammar, typing and P1 floor (P16f) - #40
Merged
Conversation
…the spec amendment and vectors (P16g) The weak form of the acct scheme (<platform>:@<handle>) stays a valid, unambiguously typed identifier but is no longer anchor-eligible: handles are renamed and recycled, so it ranks one rung below the strong form, as the reference implementation already enforces. - iid: isAnchorEligible returns false for the weak form; the inspect result carries a reason for it. Canonical bytes are unchanged. - iid-spec: schemes/acct.md and the representation-profiles section state the rule; recorded as a pre-publication correction in a new "Pre-publication amendments" subsection of the governance section, not as an additive extension, since it changes eligibility of an existing valid form before first publication. - Conformance corpus: strong-form and weak-form acct vectors with explicit eligibility (170 vectors validate). - Tests: weak-account cases in iid (282 tests), corpus validator green; ladder, registry and classifications suites unchanged and green.
…eligibility exactly (P16g fix round) Review found that the standalone corpus validator only checked that a vector declared eligible was valid, outside Class C and unambiguously typed, so a weak account vector declared eligible passed. The rule is now data-driven and enforced both ways: - schema.json: optional anchorIneligibleValuePattern on a scheme entry, a value pattern that is valid but never anchor-eligible; schemes.json sets it on acct to the weak form. - validate-fixtures.mjs: expected eligibility is computed for every validation vector (valid, not Class C, unambiguous typing, value does not match the scheme's ineligible pattern) and must equal the declared flag; a mismatch names the vector. The validator is exported as a function and keeps its CLI behaviour. - validate-fixtures.test.mjs: the shipped corpus passes; the weak vector declared eligible and the strong vector declared ineligible both fail by name. Wired into the package test script.
… codex/p16g-weak-account-floor
…the public packages floor weak handles (P16g)
…l identifiers (podcast-index, letterboxd, apple-podcasts) as class D with the reference's grammar, typing and P1 floor (P16f)
… class D flows through (P16f)
This was referenced Oct 19, 2026
jonathanprozzi
marked this pull request as ready for review
October 19, 2026 20:40
kamescg
changed the base branch from
codex/p16g-weak-account-floor
to
update/v1.1.0-alpha
October 20, 2026 16:22
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.
Important
@kamescg — review ready. Stacked on #35 (
codex/p16g-weak-account-floor); review after #35 and retarget as #35 and #36 land.To ratify here: the new identity class, class D (provider-local identifiers), for
podcast-index,letterboxdandapple-podcasts: byte-exact grammar (no repair), unambiguous typing, valid but never anchor-eligible (P1 floor), category positions as the reference. The reference's ladder already mints these; this makes the spec and registry agree with it.Coordination: the provider-only
apple-podcastsinput follows #37's alias-only filter once this branch rebases after #37; this PR and #41 both touchpackages/primitives/src/types.ts(whichever lands second takesIdentityClass | null).Receipt: corpus 209 vectors across 29 schemes; harness 1068 pass / 0 fail; no ledger entry touched.
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)
The reference implementation's ladder mints three provider-local namespaces,
int:podcast-index:<id>,int:letterboxd:film:<slug>andint:apple-podcasts:<id>, through its provider path (byte-exact row grammars, thehandlerung), while its owniidpackage still rejects them as unknown schemes and its spec never defines them. The train refused them outright: the ladder returnedunregistered-providerand the registry had no rows, so the published packages could not reproduce identifiers the reference already stores.Need
The three namespaces legal in the spec and the registry, with the grammar, typing, rung position and eligibility the reference's ladder gives them, and every pre-existing scheme unchanged.
Reconciliation
@0xintuition/iid-spec: a new identity class, class D, provider-local identifiers (an identifier assigned by one provider, stable within that provider, not governed by any registry outside it); one scheme page per namespace; a dated record under §9.7 (pre-publication amendments); the closed-registry rule is unchanged. Corpus:schemes.jsonrows and 39 vectors (valid, invalid, canonicalization, eligibility); the fixture validator now pins 29 schemes and gains a regression proving the pin still bites.^[1-9]\d*$forpodcast-indexandapple-podcasts,^film:[a-z0-9]+(?:-[a-z0-9]+)*$forletterboxd; zero, leading zeros, uppercase, padding and malformed hyphen runs are invalid and never repaired.@0xintuition/iid: registry rows, typing (podcast feed, podcast feed, film) and eligibility: valid and typed but never anchor-eligible, with the new reasonprovider-local(a P1 floor, the same mechanism as the weak account form in feat(iid, iid-spec): floor weak account handles below anchor eligibility, with the spec amendment and conformance rule (P16g) #35).@0xintuition/iid-ladder: the three namespaces resolve instead of returningunregistered-provider; the reference fixtures come out byte for byte on runghandle; category positions follow the reference (podcast-indexsecond afterpodcastguidfor podcast-series and afterrssitemfor podcast-episode;apple-podcastsmatching-only for podcast-series;letterboxdhas no movie rung).@0xintuition/iid-registry: the typed namespaces classify to podcast-series and movie.@0xintuition/primitives: the anchor'sclassfield is typed from the iid union so class D flows through the builder (one type, no behaviour change).Parity
Matches the reference implementation's ladder for these namespaces (
provider-prefixes.tsrows, category rungs, fixtures) and makes the spec and registry agree with what that ladder ships. One path is deliberately left to #37: a provider-onlyapple-podcastsinput for podcast-series still projects tohandlethrough the generic provider fallback, exactly as the reference does on that path; the alias-only filter that keeps it from ever being primary is the ladder-selection PR's, and this branch picks it up when it rebases after #37 lands.Held out
Evidence
packages/iid-spec: corpus OK, 209 vectors across 29 schemes; 8 validator tests (the 28/30 count regression included).packages/iid345 tests,packages/iid-ladder168,packages/iid-registry52,packages/primitives140,packages/classifications38; typecheck and lint green in each; rootregistry:check(14 packages),guard:supply-chain,pack:dry-runpass.Review notes
Base
codex/p16g-weak-account-floor(#35), which sits onfix/pr15-integration-gates(#36); retarget as those land. Read the class definition and the three scheme pages first, thenpackages/iid/src/schemes.ts, thenpackages/iid-ladder/src/provider-prefixes.tsandladder.ts. The class definition is the newest ruling to ratify.