Skip to content

An identity source's names get no vectors from the backfill, and turning the flag on drops the ones already stored - #1390

Merged
WaylandYang merged 1 commit into
deeplethe:devfrom
re-cinq:feat/identity-names-pr2
Oct 24, 2026
Merged

WaylandYang merged 1 commit into
deeplethe:devfrom
re-cinq:feat/identity-names-pr2

Conversation

@gedaiu

@gedaiu gedaiu commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Part of #1293, decisions 4 to 6 of 0071. Now that #1333 is in dev, this is no longer stacked and is one commit on dev. A name fact with evidence from an identity source gets no vector from name_vectors::pending, even when prose names it too. Setting {"names": "identity"} on a source deletes the stored vectors of its names in the same transaction, and clearing the flag deletes nothing, so pending fills them again. Thanks to the review, the ordering gap is closed as well. Extracting an identity document deletes the vectors of the name facts it gave evidence to, and name_vectors::set skips a name that has identity evidence by then, so a backfill already in flight can't write one back. An untyped holder takes the declared class through the type-drift helper, a class a person removed stays removed, and 0071 has a dated note for it. Only decision 7 stays open.

The tests cover a name with identity and prose evidence that is not pending and that set refuses, flag on dropping only that source's vectors and flag off making them pending again, a prose vector lost when an identity push names it, and the holder class both ways. Each one fails without its change, and #1318's plan test passes unchanged. I ran the store integration and lib tests, the server tests, fmt and clippy against a freshly migrated database. Thanks for the careful look!

@WaylandYang WaylandYang left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! The decisions 4–6 logic looks right, and the flag-off path is nicely reversible. Three things before merge: (1) please rebase onto dev; #1333 was squashed, and 5f3d15c cherry-picks cleanly. (2) Decision 5 has an ordering gap: if a prose name fact already has a vector and an identity push later adds evidence to it, the vector stays, because the drop only runs when the flag flips. Could the identity push delete vectors for name facts with evidence from its document, with a test for the "prose vector first" order? Adding the same check to name_vectors::set would also close the race where an in-flight backfill writes a vector after the flag-on delete. (3) Optional: a test that a human-removed class is not re-adopted, and a dated note in 0071 for the holder-class change.

@gedaiu
gedaiu force-pushed the feat/identity-names-pr2 branch from 9173a7d to a870a0e Compare October 23, 2026 12:05
@gedaiu

gedaiu commented Oct 23, 2026

Copy link
Copy Markdown
Contributor Author

Thank you, good catch on the ordering. It's now one commit on dev. An identity push drops the vectors of names its document carries, and name_vectors::set refuses names with identity evidence, so a late backfill can't bring one back. A new test covers the prose-vector-first order. I also added the human-removed-class test and a dated note in 0071. The plan test is unchanged, and the store and server suites pass. Ready for another look whenever you have a moment.

…ing the flag on drops the ones already stored

Signed-off-by: Bogdan Szabo <bogdan@re-cinq.com>

@WaylandYang WaylandYang left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this closes the gap cleanly: the per-push drop, the set guard sharing one predicate with pending, and the prose-first test all check out, and the 0071 note reads well. Approving. One follow-up, opened as #1408: fact_evidence has no document_id index, so drop_for_document scans the table on every identity push; worth measuring on a large mirror.

@WaylandYang
WaylandYang merged commit 00f1172 into deeplethe:dev Oct 24, 2026
6 checks passed
gedaiu added a commit to re-cinq/utopia that referenced this pull request Oct 24, 2026
Sync upstream dev into re-dev (2026-10-24): deeplethe#1390 and 9 more
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants