Skip to content

A contradiction points at an error upstream (B2a) - #238

Merged
WaylandYang merged 2 commits into
devfrom
feat/contradictions-have-a-queue
Sep 3, 2026
Merged

A contradiction points at an error upstream (B2a)#238
WaylandYang merged 2 commits into
devfrom
feat/contradictions-have-a-queue

Conversation

@WaylandYang

Copy link
Copy Markdown
Contributor

Implements B2a of 0017: the engine and the queue. B2b (visibility in the graph and the entity panel) stays planned.

Engine (utopia-reason): derive::contradictions measures a derivation against functional / inverse_functional / asymmetric / irreflexive with overlapping validity. Derived vs asserted comes out per item; derived vs derived is aggregated by rule pair. Five unit tests.

Queue (utopia-store, migration 0020): run records axiom_violations of kind derived_contradiction (left = the assertion hit, right = the last premise, the derived triple in detail, capped at 50 per predicate); rule clashes land in ontology_defects as rules_disagree. materialize uses the same function to hold those derivations back; an accepted pair lands on the next run. Both load edges through one timed_edges so the queue and the graph never disagree. Integration test covers block → close → land → accept → rule clash → clear.

Review: the card shows the derived line, the asserted line and one clue (stale / duplicate / unsure), with repairs right there: end date (fact_closed, new resolution), retract, see duplicates, open ontology, let both stand. The endpoint performs the repair and re-materializes. New colour token --u-contest.

Decision records: 0017 status line updated to "B2a implemented"; 0002 and 0016 carry a revision note; index row updated. This branch carries the 0017 record from #237, so #237 can be closed once this merges.

Verified end to end on the isolated DB: the card appears after "Run check", "Give the assertion an end date" closes the assertion, resolves the row and lands the derivation; a real rules_disagree surfaced in the demo KB (paired with symmetric vs allied with inverse, against asymmetry).

🤖 Generated with Claude Code

WaylandYang and others added 2 commits September 3, 2026 10:24
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.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.

1 participant