Repository navigation
An identity source's names get no vectors from the backfill, and turning the flag on drops the ones already stored - #1390
Conversation
WaylandYang
left a comment
There was a problem hiding this comment.
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.
9173a7d to
a870a0e
Compare
|
Thank you, good catch on the ordering. It's now one commit on |
…ing the flag on drops the ones already stored Signed-off-by: Bogdan Szabo <bogdan@re-cinq.com>
a870a0e to
128c067
Compare
WaylandYang
left a comment
There was a problem hiding this comment.
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.
Sync upstream dev into re-dev (2026-10-24): deeplethe#1390 and 9 more
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, sopendingfills 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, andname_vectors::setskips 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
setrefuses, 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!