Repository navigation
feat(iid, iid-spec): floor weak account handles below anchor eligibility, with the spec amendment and conformance rule (P16g) - #35
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.
This was referenced Oct 19, 2026
jonathanprozzi
changed the base branch from
codex/p16-typed-wd
to
update/v1.1.0-alpha
October 19, 2026 19:44
… codex/p16g-weak-account-floor
…the public packages floor weak handles (P16g)
jonathanprozzi
changed the base branch from
update/v1.1.0-alpha
to
fix/pr15-integration-gates
October 19, 2026 20:00
This was referenced Oct 19, 2026
jonathanprozzi
marked this pull request as ready for review
October 19, 2026 20:39
kamescg
changed the base branch from
fix/pr15-integration-gates
to
update/v1.1.0-alpha
October 20, 2026 16:22
This was referenced Oct 22, 2026
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. Base is #36 (
fix/pr15-integration-gates); retarget toupdate/v1.1.0-alphaonce #36 lands. Suggested order across the series: #36 → #37 → #35 → #39 → #40 → #41.To ratify here: the weak
acctform (<platform>:@<handle>) is valid and unambiguously typed but never anchor-eligible (P1 floor), recorded under §9.7 as a pre-publication amendment rather than an additive extension. Everything else is mechanical.Receipt: four conformance ledger entries retired because both sides now agree; harness 1029 pass / 0 fail on this diff.
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/iidtreats bothacctforms as anchor-eligible: the strong form<platform>:<immutable id>and the weak form<platform>:@<handle>. The reference implementation floors the weak form: it stays valid and unambiguously typed, but it never anchors at P0 and sits one rung below the strong form, because handles can be renamed or recycled. The spec text and the conformance corpus in@0xintuition/iid-specsaid nothing about the weak form's eligibility, and the corpus validator never computed eligibility itself, so a vector carrying the wrong expectation would have passed.Need
Weak handles reported as valid, typed and not anchor-eligible, with the spec, the corpus and the validator all stating and checking the same rule.
Reconciliation
packages/iid/src/parse.ts: the canonical weak form<platform>:@<handle>getsanchorIneligibilityReason: 'weak-account'andanchorEligible: false. The new reason joins the exported union intypes.ts. Canonicalization and canonical bytes are unchanged (twitter:@Jack→twitter:@jack,GitHub:MonaLisa→github:MonaLisa, as before).packages/iid-spec/schemes/acct.mdandspec/07-representation-profiles.md: the eligibility rule, stated once in each place.spec/09-registry-governance.mdgains §9.7 "Pre-publication amendments" with a dated record of this change, because §9.3.1 does not allow changing the eligibility of an existing valid form after publication.valid-acct-strong(int:acct:github:MonaLisa, eligible) andvalid-acct-weak(int:acct:twitter:@jack, valid, typed, ineligible).anchorIneligibleValuePatternper scheme, a regular expression applied to the value after the scheme.acctdeclares^[^:]+:@;wddeclares its eight dormant binding slugs so the existing dormant-binding vector keeps its expectation under the exact comparison.test/validate-fixtures.mjs): exported asvalidateCorpus; computes the expected eligibility of every vector (valid, registered non-Class-C scheme, unambiguous effective typing, no exclusion-pattern match) and compares it with the declared value in both directions, naming the vector on a mismatch. Noacctspecial case in code. The newtest/validate-fixtures.test.mjskeeps the two rejections permanently red-first, and the packagetestscript runs it.Parity
Matches the reference implementation's
iidpackage (the weak-account rule in its parser) and its conformance rule foracct. One difference is left outside this PR: the reference's parser accepts a non-ASCII handle (twitter:@jäck) where the train rejects it as malformed; both treat it as ineligible. That is the pre-existing grammar difference between the two parsers and is tracked on its own.Conformance ledger: the four weak-handle entries in
conformance/known-divergences.ts(the anchor envelope case and three ladder cases for social-media-account) now agree with the reference and are retired; the README enumeration moves to 33/25 for the anchor proof and 388/66 for the ladder proof. Harness on top of #36: 1029 pass, 23 todo, 0 fail.Held out
Evidence
packages/iid: typecheck and lint green; 282 tests pass, including nine new weak-account cases (weak forms ineligible with the reason; strong forms eligible, including an embedded:@after the id starts; canonical bytes preserved; a noncanonical weak handle invalid with its repair) and the two corpus vectors. Red-first: four cases failed before the parser change.packages/iid-spec: corpus validation OK (170 vectors, 26 schemes); the three validator tests pass, two of which failed before the eligibility comparison existed.schema:validate, rootregistry:check(14 packages) andguard:supply-chainpass.Review notes
Base
fix/pr15-integration-gates(#36) so the conformance gate runs on this diff; retarget to the train branch once #36 lands. Readpackages/iid/src/parse.tsandweak-account.test.tsfirst, then the §9.7 record in09-registry-governance.md, then the validator. The one judgement call is the §9.7 route (a pre-publication amendment rather than an additive extension); it is in effect by default and open to ratification in this review.