Skip to content

A typed fact is as confirmed as the statement it was built from - #37

Merged
gedaiu merged 1 commit into
re-devfrom
fix/typed-fact-confirmed-by-its-statement
Oct 24, 2026
Merged

gedaiu merged 1 commit into
re-devfrom
fix/typed-fact-confirmed-by-its-statement

Conversation

@gedaiu

@gedaiu gedaiu commented Oct 24, 2026

Copy link
Copy Markdown

Materialize copies a statement's evidence onto the typed row it builds. When a statements source re-pushes an item that states the same thing again, the statement gets evidence on the new chunk and the typed row does not: it keeps the old copy, whose chunk is now superseded, and Review lists it as unconfirmed although its statement is current. In one production base that is 71,025 typed rows. RC-004's close leaves typed rows that have a statement source to their statement, so nothing ever cleared them.

UNCONFIRMED_FACT keeps its three clauses and adds one: a typed row is not unconfirmed while one of its source statements (typed_fact_sources) is live, open and has evidence on a chunk that is not superseded. Open statements and typed rows with no statement source are judged as before. The lookups go through the primary keys of typed_fact_sources, facts and fact_evidence. graph::stale_facts had its own copy of the old clauses and now reads the fragment, so the list and the counts agree. The decision is RC-005; web/src/docs/ingest.md gains one sentence.

Not changed here: readers of a typed row's own evidence (graph::fact_evidence) still see the old copy, and rows a rule implies from a statement (implied_fact_sources) are not covered. RC-005 names both as follow-ups.

Tests: a_typed_fact_is_unconfirmed_only_once_its_statement_is (new, failed before the fix with (2, [lone, typed])), RC-004's and the review tests; cargo test -p utopia-store and cargo test --bin utopia-server green on a fresh migrated database; fmt and clippy -D warnings clean.

🤖 Generated with Claude Code

Materialize copies a statement's evidence onto the typed row it builds, and
a re-push that states the statement again gives only the statement the new
chunk. The typed row kept the old, superseded copy and went to Review as
unconfirmed although its statement was current: 71,025 such rows in one
base. UNCONFIRMED_FACT now leaves out a typed row while one of its source
statements is live, open and backed by a live chunk; graph::stale_facts
reads the same fragment instead of its own copy (RC-005).
@gedaiu
gedaiu merged commit b161780 into re-dev Oct 24, 2026
6 checks passed
gedaiu added a commit to re-cinq/lore that referenced this pull request Oct 24, 2026
Bumps `utopia_image_tag` to `0.1.0-re.23` and `utopia_image_digest` to
`sha256:86591a57...`, the multi-arch index digest checked against ghcr.
re.23 judges a typed fact as confirmed while the statement it was built
from is still stated (re-cinq/utopia#37, RC-005): a re-push gives only
the statement its new evidence, so typed rows kept a stale copy and
looked unconfirmed, 71,025 of them in lore's base. It also keeps every
rewrite of an open statement a statement (re-cinq/utopia#38: a merge
undone and a corrected interval). No new migration since re.22.

After merge: `terraform apply` from main.

Related: #3413.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
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.

1 participant