Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions docs/decisions/0071-a-source-may-declare-its-names-identities.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# 0071 · A source may declare its names identities

- **Status**: Proposed · 2026-10-19 · [#1293](https://github.com/deeplethe/utopia/issues/1293) · open: all six decisions
- **Status**: Proposed · 2026-10-19 · [#1293](https://github.com/deeplethe/utopia/issues/1293) · open: all seven decisions
- **Written**: 2026-10-19 (conventions in the [README](README.md))
- **Related**: [0054](0054-a-source-may-push-statements-in-the-open-contract.md) decision 3 sends pushed statements down the same resolution path as prose, and this record narrows that for one kind of source; [0041](0041-a-name-is-a-claim-about-an-entity.md) owns name facts and name-vector recall; [#1248](https://github.com/deeplethe/utopia/issues/1248) meets the same problem from the merge side; [#1296](https://github.com/deeplethe/utopia/issues/1296) measured what the recall costs; [#1308](https://github.com/deeplethe/utopia/pull/1308) is the disjointness fix that stands on its own
- **Related**: [0054](0054-a-source-may-push-statements-in-the-open-contract.md) decision 3 sends pushed statements down the same resolution path as prose, and this record narrows that for one kind of source; [0041](0041-a-name-is-a-claim-about-an-entity.md) owns name facts and name-vector recall; [#1248](https://github.com/deeplethe/utopia/issues/1248) meets the same problem from the merge side and is decided here as decision 7; [#1296](https://github.com/deeplethe/utopia/issues/1296) measured what the recall costs; [#1308](https://github.com/deeplethe/utopia/pull/1308) is the disjointness fix that stands on its own

> A backend mirrors a repository into a base and pushes `owner/repo:src/a.ts#parseDate`, `owner/repo:src/a.test.ts::adds two`, `owner/repo:specs/x/spec.md#s0003`. Each name is an identity the client already knows to be unique. Every one still goes through write-time resolution. Because they share the `owner/repo:` prefix, their name vectors sit close together, and the duplicates queue fills with pairs that can never be the same thing.

Expand Down Expand Up @@ -41,6 +41,12 @@ One name fact can carry evidence from both an identity source and a prose docume
- **On:** the update that sets the flag also deletes the stored vectors of name facts that now have identity evidence, in the same transaction. Leaving them in place and skipping them would put an evidence join into every `nearest` query, which is the per-mention cost #1296 measured.
- **Off:** nothing is deleted. Those name facts become pending again, and the next extraction in the base backfills their vectors through `pending`, as it does for any name whose vector is missing. Recall for them returns from then on. Pairs that were never proposed while the flag was on are not proposed in retrospect.

**7. A `same` verdict that touches an identity entity goes to a person.**

*Revised 2026-10-22 (#1248):* decision 1 said #1248 decides the merge side with the same flag; this is that decision. An identity entity is one with a name fact that has evidence from an identity source, the same join decision 4 uses. When the adjudicator returns `same` at or above `AUTO_CONF` for a pair where either side is an identity entity, the pair is escalated to human review with the reason `escalate_identity` instead of being merged. This holds on both paths that apply a verdict: `apply_verdict` in `adjudication.rs` with governance off, the second look included (#889), and `apply` in `governance.rs` with governance on. It reuses the execution gate's escalation (0027), so a person sees why the pair is waiting, not "the adjudicator was unsure". A `kept` verdict still closes the pair automatically, which keeps the queue short. A merge a person makes is unchanged.

Why a person and not a stricter threshold: an identity source has already said what its names are. Decisions 2 to 4 remove the pairs that name vectors and the single-candidate split would raise, so what is left are containment and type-drift pairs and the cross-source duplicate (one thing pushed under two names by two producers). Those are exactly the cases where the model's `same` is a guess about a claim the producer made, and a wrong merge of identities is what #1248 measured: on a small local model, 40 automatic merges with governance off, nearly all wrong (a method into its file, two unrelated types). A person sees few of them because the vectors are off. Raising `AUTO_CONF` for these pairs would still let a confident wrong verdict through, and a per-base switch is a dead end (below).

## Not doing

- **Containment for identity names.** `containment_reviews` still runs for them. #1104's next cut rewrites that predicate, and whether an identity source skips it is a separate decision after that.
Expand All @@ -50,10 +56,12 @@ One name fact can carry evidence from both an identity source and a prose docume

- **Every `statements` push is an identity claim.** Too broad: 0054 sends pushes through the same path on purpose, and human-style names find real variants through their vectors.
- **Skip the vector channel after any single exact match.** That is #1296 item 1. Applied to every mention it changes prose resolution, and `the_same_literal_name_is_not_proposed_twice` asserts the opposite.
- **A per-base switch.** One base can mix an identity source with prose sources, and only the producer knows which names are identities.
- **A per-base switch.** One base can mix an identity source with prose sources, and only the producer knows which names are identities. #1248 first asked for `auto_merge: false` per base; decision 7 keeps the merge gate on the same per-source flag instead.
- **Closing a `same` verdict between two identity names as kept.** "Every name identifies one thing" does not say two names never identify the same thing: two producers can push one service under two names. A person decides those.

## Tests the code PR adds

- `an_identity_source_adds_no_name_vectors_and_asks_no_neighbours`: a push from an identity source leaves no `name_vector|` rows and runs no `nearest` query.
- `a_name_with_identity_evidence_gets_no_vector_even_when_prose_names_it_too` (decision 5).
- Turning the flag on deletes the identity names' vectors; turning it off makes them pending again (decision 6).
- `a_same_verdict_on_an_identity_entity_waits_for_a_person`: with governance off and with it on, a `same` verdict at or above `AUTO_CONF` on a pair with one identity side leaves both entities in place and an open review with `escalate_identity`; a `kept` verdict on the same pair still closes it (decision 7).
Loading