Repository navigation
#879 feat: producer-minted person_co_operator / org_co_operator identifier types - #894
Merged
Merged
Conversation
…ifier types A producer that knows only a name creates a person or organization by minting a ULID and observing by it: an unknown value creates the record (new), a re-send attaches to it (auto-attached), and a search on the value recovers it after a timeout. Both types join uq_identifiers_cannabis_observer (#812), so a value names one record; the index's DO block now rebuilds an index that predates them, and a duplicate rolls the rebuild back and keeps the old index. Both types join the replaces set (#848) with the other one-holder types. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…amily, not inside it Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…CT.md; OBSERVATIONS.md keeps a pointer OBSERVATIONS.md was already over its token budget (#428); the producer-facing rule belongs with the rest of the producer contract. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… frees the minted value Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… re-created Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
#879: create a person or org with no external identifier, by a producer-minted id
This implements the operator's 2026-11-25 decision on #879: producer-minted ids, not
op: "create".What changes
person_co_operator(01M8ARJWG12ZK4V10BA5PM0N7J);org_co_operator(01M8ARJWFZJMP5XDQECCMSRXZB).new);auto-attached), for good;people/search/orgs/searchwithidentifier_type+identifier_valuerecover it after a timeout.uq_identifiers_cannabis_observer(Unique (type, value) for the *_cannabis_observer identifier types #812), which keeps its name.identifier_takennaming the holder. The pre-check and the race mapping already key on the type-id set and the index name.CREATE … IF NOT EXISTSnever changes an existing predicate. So theDOblock now drops and rebuilds an index that lacks any of the six ids.EXCEPTIONclause rolls theDROPback too, so the narrower Unique (type, value) for the *_cannabis_observer identifier types #812 index stays. It never leaves no index.replaces(Observations: let a producer replace or retract a *_cannabis_observer identifier value #848) now covers the two new types too, because it uses the same one-holder set.ObservationAdditionalIdentifierdocstring is in the spec).Deploy notes
identifiersinside the apply transaction.apply-schema --testfrom this branch).unique_index.identifiers.uq_identifiers_cannabis_observeruntil this deploys.Tests
tests/api/public/test_co_operator_identifiers.py: seeded types, create, re-send, search recovery,identifier_taken,replaces(CR 2), and an archived record refusing a re-send (CR 5).test_schema_identifier_uniqueness.py:-m integrationwas not run (Tests: cut commit-hook and suite wall-clock; integration runs only when asked #890 / operator rule).Known limits:
test_one_value_on_a_second_entity_is_refused[org_cannabis_observer]failed right afterapply-schema --teston the shared test DB. It didn't reproduce in three later runs, all of which passed.Refs #879
🤖 Generated with Claude Code