Skip to content

Verify derived plan steps follow changes to their premises - #898

Merged
WaylandYang merged 6 commits into
deeplethe:devfrom
Maya-Kid:test/premise-replay
Sep 24, 2026
Merged

WaylandYang merged 6 commits into
deeplethe:devfrom
Maya-Kid:test/premise-replay

Conversation

@Maya-Kid

@Maya-Kid Maya-Kid commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

A plan step represented by a business-rule conclusion should follow changes to its factual premises without changing unrelated conclusions. Add three real PostgreSQL store tests for that contract:

  • Closing and rejecting a premise retires the affected current conclusion, preserves the appropriate historical view and leaves the unrelated step's row unchanged. Duplicate observations, occlusion and a late earlier observation are covered along that path.
  • With two alternative proofs, removing one preserves the conclusion and replaces its proof; removing the last retracts it.
  • With explicitly bound open statements, typed materialization followed by explicit temporal reconciliation and derivation retires the old-location step while preserving its past interval.

All three tests run normally on dev; there are no newly ignored tests and no production changes or dependencies on #884, #896 or #897. They exercise existing store APIs and explicitly supplied alignment/reconciliation, not an automatic ingestion-to-decision loop.

Validation: 8000623, based on dev@9f50e3c: Rust format, strict workspace/all-target Clippy and the PostgreSQL 16/pgvector workspace suite passed (1,081 passed, 0 failed, 5 existing ignored). UTOPIA_TEST_REQUIRE_DB=1 was set and all three new passing test names were verified. The unavailable PDF fallback utility limits that unrelated coverage.

Run against a migrated, dedicated PostgreSQL/pgvector database:

UTOPIA_TEST_REQUIRE_DB=1 cargo test --locked -p utopia-store --test store \
  a_plan_step_follows_its_premise -- --test-threads=1

Set UTOPIA_DATABASE_URL for that database. The HTTP replay and its version-specific assertions remain experimental evidence on the fork, outside this PR. The two proposed-behavior gaps and executable reproductions are tracked separately in #899 and #900.

Refs #875.

…related steps

Signed-off-by: dada-yan <BinjunYann@gmail.com>
@Maya-Kid Maya-Kid changed the title Replay observation changes against plan-step premises Verify derived plan steps follow changes to their premises Sep 24, 2026
@Maya-Kid
Maya-Kid marked this pull request as ready for review September 24, 2026 09:13

@WaylandYang WaylandYang left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Useful regression coverage on the real store path, and the docstring is honest that it exercises existing APIs with explicit reconciliation rather than the automatic loop (#899 and #900 remain open). Two optional suggestions: split the first test's seven phases so a failure in one does not hide the others, and note in the observe helper that it mirrors pending::confirm's ordering so drift is caught by a reader. LGTM.

@WaylandYang
WaylandYang merged commit 992423e into deeplethe:dev Sep 24, 2026
7 checks passed
@WaylandYang WaylandYang mentioned this pull request Sep 25, 2026
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.

2 participants