A bound statement becomes a typed fact - #752
Merged
Merged
Conversation
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Signed-off-by: WaylandYang <wayland0916@gmail.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Signed-off-by: WaylandYang <wayland0916@gmail.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Signed-off-by: WaylandYang <wayland0916@gmail.com>
This was referenced Sep 18, 2026
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.
0044 cut 2, second slice: the typed graph is computed from the open graph through the phrase bindings of #751 (decision 3: "typed rows carrying
from_statement_id; materialisation and recomputation of the typed graph"). Pitfall 19 ofdocs/design/prior-work.md(a pipeline that cannot be re-run drifts).What lands
Migration 0067:
facts.from_statement_id(a typed row's source statement; checked to be typed-only; partial index), cascading with the statement.utopia_store::materialize: one set operation per base, run at the end of everyalign_phrasesjob. Every live open statement under a bound signature becomes onelayer = 'typed'row: predicate = the bound property, ends by the binding's direction (reverseswaps them), value, world-axis interval (valid_*as 0045 resolved it on the statement), attestation and confidence copied; the statement's evidence rows and role-word qualifiers are copied to the new row;from_statement_idpoints back. A statement with amoodqualifier is never materialised. Recomputation is the same operation: rows whose source no longer holds (the statement invalidated, the signature no longer bound, the property or direction changed, a mood added) are invalidated, rows that are due and missing are added, rows whose binding is unchanged keep their id, evidence and recorded time. Idempotent: a second run changes nothing. Ids are v7 from Rust (Postgres 17 has nouuidv7()), so rows are inserted one by one after one selecting query.Test (
a_bound_statement_becomes_a_typed_fact, database-backed, skipped withoutUTOPIA_DATABASE_URL): a statement under a forward binding gives one typed row with the property, copied interval, one evidence row and thesincequalifier; the statement with amoodgives none; a second run is a no-op; flipping the binding toreverseretires the row and adds one with the ends swapped, the old row kept as invalidated; setting the binding tononeretires it and adds nothing.Measured
No model call. On the two bases of #751 after a run under the strict rule:
By property on the batch: value 106, change_from_prior_period 35, votes_for / votes_against / abstentions 10 each, officer_of 6, participated_in 4, filed 2, issued_by 1. On NVDA: earnings_per_share 21, operating_income 20, net_income 18, change_from_prior_period 12, gross_margin 11, the three vote counts 10 each, revenue 5, officer_of 4, partnered_with 2, invested_in 1. A second run on each base retired 0 and added 0.
The judge of #751 already read these typed facts against their chunks (95% stated on the batch, 76% on the NVDA releases); the rows are the same statements under the same bindings, now in the ledger where the timeline, the conflict detector and the signature checks read
layer = 'typed'.Not in this change
Merging the typed rows that several statements produce for one triple (the timeline's refinement in
insert_fact_inneris not applied; one row per statement for now); implication rules and readings; typed qualifiers (fact_qualifiersby declared attribute) from role words; the alignment queue (#725).🤖 Generated with Claude Code