Skip to content

An unknown date is not an open one (0022, first cut) - #394

Merged
WaylandYang merged 3 commits into
devfrom
feat/unknown-date
Sep 5, 2026
Merged

WaylandYang merged 3 commits into
devfrom
feat/unknown-date

Conversation

@WaylandYang

Copy link
Copy Markdown
Contributor

First cut of 0022. Every world-axis read treated an absent date as an open bound: a fact with no start held since always, and a fact the text says has ended — date not given — held today.

One predicate, one place. utopia_store::world_axis beside record_axis (0019): facts_hold_at, derived_hold_at, and the two projections facts_holds_from / facts_holds_to. edges_among (all three branches), entity_detail, derived_for_entity, the export and the RDF current triple take it; entity_facts no longer re-implements the rule in Rust, it passes at down. Edges and entity facts carry holds_from / holds_to — the interval as read — and the graph slider, its histogram and the panel's "current" filter use those. The stated interval stays for display.

An unknown bound reaches as far as the evidence. Migration 0030 adds facts.attested_at, the earliest document date among the observations merged into the row, backfilled from fact_evidence → documents.doc_time (else recorded_at). A missing start reads from it; a stated-but-undated ending reads until it. Validity gained the field; extraction passes the document's doc_time, the pending-facts nod looks up its chunk's document, a person's own fact anchors at now, superseding rows (close_superseded, correct_interval, the adoption rewrite) inherit it, and a repeated observation only moves it earlier.

An undated ending closes the dated row it ends. The record had left this to the write side; the benchmark showed why it cannot wait — with the read rule alone the ended-unknown row reads correctly and the dated open row beside it goes on holding, so #345's question still failed. insert_fact_inner now meets "ended, date unknown" against an open row with a stated start by superseding it (temporal::close_with_unknown_end): 'unknown' at the end, anchored on the ending's document, old row invalidated, evidence copied. A repeated ending reuses the closed row. The bare-row case (no stated start) needs two anchors and is #393.

Checked. an_unknown_date_is_not_an_open_one pins the table of cases in both directions on a real database — a no-start fact absent the day before its document and present on it, an ended-unknown fact present the day before and absent from it, a stated interval untouched, the both-unknown row absent at every moment yet listed on the entity — plus the anchor moving earlier and being inherited, and the closing. On a copy of the temporal benchmark base migrated in place, all 38 no-start facts anchored on a document date and the ledger probe scores 36/37 with both former known_gap questions now counted; the one still failing (lin-zhao-title-ended-unknown) has data ingested before this change — the ending is its own row and the dated row was never closed — and passes on a fresh ingest, which the closing test stands in for.

Second cut: derived rows on read intervals (the evaluator intersecting from ?? attested_at), where the derived precision CHECK loosens.

Closes #345. Closes #352.

🤖 Generated with Claude Code

WaylandYang and others added 3 commits September 6, 2026 03:04
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: WaylandYang <wayland0916@gmail.com>
@WaylandYang
WaylandYang merged commit 2c66a92 into dev Sep 5, 2026
@WaylandYang
WaylandYang deleted the feat/unknown-date branch September 5, 2026 19:19
WaylandYang added a commit to Floating-Y/utopia that referenced this pull request Sep 5, 2026
Signed-off-by: WaylandYang <wayland0916@gmail.com>
WaylandYang added a commit that referenced this pull request Sep 5, 2026
* fix: preserve record clock precision in changes

Signed-off-by: danwood <118035379+Floating-Y@users.noreply.github.com>

* The test follows entity_detail's new at parameter (#394)

Signed-off-by: WaylandYang <wayland0916@gmail.com>

---------

Signed-off-by: danwood <118035379+Floating-Y@users.noreply.github.com>
Signed-off-by: WaylandYang <wayland0916@gmail.com>
Co-authored-by: WaylandYang <wayland0916@gmail.com>
Co-authored-by: WaylandYang <145302500+WaylandYang@users.noreply.github.com>
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.

A fact with no start date is held at every moment A fact that ended on an unknown date is read as still holding

1 participant