Skip to content

Six tests that pass with their rule broken #107

Closed

Description

@CaffeinatedCoder

Seeded 2026-11-16 on main @ 1690320: all six are confirmed. Each test, as it is on main, passes with its rule broken:

Test The defect that was seeded The test on main
C04_has_differences_sees_the_declaration SchemaKitModelDiffer.HasDifferences returns the inner differ's answer passes, on all three providers
The_inner_operations_are_passed_through_untouched the decorator adds an annotation to the first operation of the inner differ passes, on all three providers
Every_kind_of_object_has_a_scope (kernel) the kernel's dialect returns no claim for a key, a foreign key and a check constraint passes
A_name_that_differs_in_case_is_another_name (PostgreSQL) the contributor writes the constraint's name in upper case passes
A_deferrable_constraint_checked_at_commit_is_not_one_checked_at_once the reader takes deferrable with initiallyDeferred for not deferrable passes
Changing_the_deferral Create never writes a deferral passes, on PostgreSQL 18

One thing the table above does not say about the fifth: asserting the two statements would not have been enough. A rebuild's statements show the target alone, so they are the same whatever the reader took the source for. What was read shows only against the model that declares it, as no operations.


Found by the pre-preview sweep of main @ 948496a (GPT's read of both test projects). Each was read against its test; none was seeded yet.

Tests that pass with their rule broken

Test What it would not notice
WiringConditionTests.C04_has_differences_sees_the_declaration HasDifferences(null, model) is true through the table alone, and (model, model) is false either way. A HasDifferences that returns the inner differ's answer passes both
OperationOrderTests.The_inner_operations_are_passed_through_untouched It compares the operations' types and their count. A name, a column or an annotation changed on the way passes
NameClaimTests.Every_kind_of_object_has_a_scope (kernel) It counts the members of SchemaModelObject and never calls Claims. A dialect that returns no scope for any kind passes
NameClaimTests.A_name_that_differs_in_case_is_another_name (PostgreSQL) It counts one SQL operation. The constraint created under the primary key's name in its other case passes
ComplexIndexes5xExclusionReaderTests.A_deferrable_constraint_checked_at_commit_is_not_one_checked_at_once It counts two operations. A reader that takes the deferred source for not deferrable gives two as well
PgExclusionLiveTests.Changing_the_deferral It compares the migrated catalog with EnsureCreated()'s. A create that never writes a deferral gives two equal catalogs

Change

Each asserts what its name says: the statement or the catalog text, not a count. For C04, a model pair whose only difference is the declaration.

Done when

Each of the six has been shown to fail with its rule broken in a scratch copy, as the repository asks of every guard.

Activity

  1. added this to the 11.0.0 milestone on Nov 14, 2026
  2. added
    tests
    package/core
    package/postgresql
    area/migrations
    on Nov 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/migrationspackage/corepackage/postgresqltests

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions