Skip to content

A derivation rewinds with the second clock - #557

Merged
WaylandYang merged 1 commit into
devfrom
fix/derivations-follow-the-second-clock
Sep 9, 2026
Merged

A derivation rewinds with the second clock#557
WaylandYang merged 1 commit into
devfrom
fix/derivations-follow-the-second-clock

Conversation

@WaylandYang

Copy link
Copy Markdown
Contributor

derived_for_entity kept invalidated_at IS NULL while the assertions beside it took as_of, so a rewound entity showed March's facts with today's conclusions: a derivation whose premises were not on record yet (#549). The read now takes as_of and uses record_axis::derived_held_at, the predicate the graph overview already used. The entity panel route and entity_facts over MCP pass the moment they had already parsed.

Record. 0019's status line names this cut. A new open question records the limit that stays: fact_derivations is rewritten in place when a kept conclusion is reproved (0030, cut 2), so a proof has one version, and expanding a rewound derivation shows today's premises with the retracted ones marked.

Test. a_derivation_follows_the_second_clock seeds two premises recorded on March 10 and a derivation drawn on March 11, then reads at March 1 (nothing on either half), March 10 noon (the premise, no conclusion), and now (the conclusion). After invalidating the derivation on April 1 it reads at March 20 (still there, as 0019 promises) and now (gone). With the old predicate the March 1 read fails.

Closes #549.

🤖 Generated with Claude Code

Closes #549.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: WaylandYang <wayland0916@gmail.com>
@WaylandYang
WaylandYang merged commit 2abdabc into dev Sep 9, 2026
4 checks passed
@WaylandYang
WaylandYang deleted the fix/derivations-follow-the-second-clock branch September 9, 2026 12:59
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.

Derived facts are not rewound by as_of in entity fact queries

1 participant