Skip to content

fix(assertions): a report quotes the statement as it was written - #14

Merged
YoanSallami merged 1 commit into
feat/v2-assertionsfrom
fix/assertion-report-names
Oct 4, 2026
Merged

YoanSallami merged 1 commit into
feat/v2-assertionsfrom
fix/assertion-report-names

Conversation

@YoanSallami

Copy link
Copy Markdown
Contributor

Problem

An import renames the predicates it brings in, inside @Assert statements too, and the report showed the renamed text. With import concepts.DeliveredOrder.DeliveredOrder;:

✗ Customer2.has_delivery is violated: forall c, Customer2 c -> exists o a, Deliveredorder_DeliveredOrder o c a

Fix

The statement is kept as written for reports (statement_source, stored when an import first renames it); the renamed text is only what gets translated to SQL. verify, run and assertions() now print DeliveredOrder o c a.

Tests

  • New regression test in tests/cli/test_assertions.py: an assertion naming an imported predicate reports its statement verbatim, and still translates.
  • tests/cli: 545 passed, 33 skipped. cargo test --lib: 828 passed.

Targets feat/v2-assertions (#13), which it is based on.

🤖 Generated with Claude Code

An import renames the predicates it brings in, inside @Assert statements
too, and the report showed the renamed text: `DeliveredOrder o c a` came
back as `Deliveredorder_DeliveredOrder o c a`. The statement is now kept as
written for reports; the renamed one is only what gets translated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@YoanSallami
YoanSallami merged commit 79b5f9e into feat/v2-assertions Oct 4, 2026
16 of 17 checks passed
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