Un-reserve the crystal namespace (phase 2 — merge after phase 1 deploys + backfill runs) - #326
Open
lopugit wants to merge 1 commit into
Open
Conversation
…leted With relationship uniqueness on the server-only root uniqueKeys namespace and the six crystal-path indexes non-unique (phase 1), a data thing carrying followKey/memberKey/dmKey/inviteCode/emojiKey/friendKey/voteKey at its crystal root enters no unique index: it is ordinary user data that can neither squat a real relationship nor be blocked by one. This deletes RESERVED_CRYSTAL_ROOT_KEYS, the sanitizeDataCrystal rejection, the lockstep test, and the KIND_BLIND audit constant, replacing the apiTests entry with the open-namespace assertion and rewriting the TESTING.md bug-class lines. MERGE ORDERING (load-bearing): deploy phase 1 first and let every deployment DB run its boot-time index swap (plus the backfill-relationship-unique-keys migration on the home db) BEFORE this merges — the reservation is the only squat guard on a DB that still has its old kind-blind unique indexes. Verified live on phase-2 code: a data thing claiming the EXACT followKey of a real pair saves AND the real follow of that pair still succeeds beside it (coexistence — the squat is physically impossible), every relationship name saves as plain data on create and PATCH, and the full unit battery, things API group, and client build stay green. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
lopugit
added a commit
that referenced
this pull request
Aug 19, 2026
lopugit
added a commit
that referenced
this pull request
Aug 19, 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.
Merge only after the phase-1 PR has deployed and every deployment DB has run its boot-time index swap (plus
backfill-relationship-unique-keyson the home db). Until a DB's old kind-blind unique indexes are dropped by its ensure run, the #320 sanitizer reservation is its only squat guard — this PR deletes that guard.Phase 2: the crystal namespace goes back to fully open
With relationship uniqueness on the server-only root
uniqueKeysnamespace and the six crystal-path indexes non-unique (phase 1), a data thing carryingfollowKey,memberKey,dmKey,inviteCode,emojiKey,friendKey, orvoteKeyat its crystal root enters no unique index: it's ordinary user data that can neither squat a real relationship nor be rejected. So the reservation stopgap — which the owner explicitly did not want as the permanent shape — is deleted whole:RESERVED_CRYSTAL_ROOT_KEYS+ thesanitizeDataCrystalrejection (registry.ts) — gone; free-form crystals reserve no names.KIND_BLIND_UNIQUE_CRYSTAL_ROOT_KEYSaudit constant → replaced by a KIND-BLIND HISTORY comment beside the lookup indexes (the "never add a crystal-path unique index" rule stays written down where the next index author will read it).reservedCrystalRootKeys.test.ts(lockstep pin) — deleted with the lists it pinned.things-data-reserved-crystal-root(must-400) →things-data-relationship-names-open(must-save).relationshipUniqueKeys.test.ts: the transition-reservation pin becomes the open-namespace pin (every mapped name +voteKeyvalidates as plain data).Verified live on phase-2 code
The definitive coexistence proof: a data thing claiming the exact
followKeyof a real user pair saves (200), and the real follow of that same pair still succeeds beside it — squatting is physically impossible, in both directions. Every relationship name (includingvoteKey) saves as ordinary data on create and PATCH. Full unit battery (27 suites, 0 failures), things API group 31/31,build:clientclean.Stack: #320 (reservation stopgap) → phase 1 (uniqueKeys migration) → this PR (un-reservation).
🤖 Generated with Claude Code