Skip to content

test: a second provider against the public contract, on SQL Server 2022 and SQLite, and the SQL Server lane - #157

Merged
CaffeinatedCoder merged 7 commits into
mainfrom
test/second-provider
Nov 16, 2026
Merged

CaffeinatedCoder merged 7 commits into
mainfrom
test/second-provider

Conversation

@CaffeinatedCoder

@CaffeinatedCoder CaffeinatedCoder commented Nov 16, 2026 •

Copy link
Copy Markdown
Owner

Closes #5

For #119, which this does not close: the contributor is written, measured and in CI, and every row of the audit table has its answer in the issue's body. Seven of the nine rows hold a "has to change". Changing the contract is the maintainer's decision, on #114 to #118, and #119 stays open until those rows are decided.

Problem

Every type of the contributor contract was shaped by one contributor on one provider, and nothing of the kernel ran on a live SQL Server. What in the contract is PostgreSQL's cannot be found by reading (#119, epic #111). The SQL Server 2022 lane was what was left of #5.

Change

Nothing under src/.

  • test/CodoMetis.EFCore.SchemaKit.SecondProvider.Tests, a test project the kernel grants no InternalsVisibleTo, so that it compiles against the public contract or not at all:
    • SqlServer/: ProbeIndex, a filtered nonclustered index with included columns, its contributor and SQL Server's dialect. Created through EXEC, renamed through sp_rename, with SQL Server's impact table: a dropped or altered column is RebuildAround, never Lost.
    • Sqlite/: ProbeSqliteIndex, an index on an expression, its contributor and SQLite's dialect.
    • Harness/Scripted.cs: a context with three migrations, so that EF Core's own Migrator writes the scripts.
    • A comment that begins Audit: marks each place where the contract could not say what the provider needs.
  • .github/workflows/dotnet.yml: the lane Integration (SQL Server 2022), in the gate's needs. It starts the server in a step with a password made there, writes the image digest and ProductVersion to the summary, fails when the server is not 16.x and when no integration test ran. The unit lane runs the project's tests that need no server.
  • CLAUDE.md: the project's row, its commands, a section "The second provider", and the SQLite bullet of the planner corrected (On SQLite an object created in the migration that rebuilds its table is lost in silence #145).

Found on the way and filed, not fixed here: #145 (on SQLite an object created in the migration that rebuilds its table is lost in silence) and #150 (a failing test did not fail the Test and Integration lanes; fixed since by #158).

After the review

A review of this PR seeded eleven defects into the contributors and dialects, and eight of them passed all 133 tests the PR had. Run again at that head (3a00e18) before anything was changed: the same eight pass, and the other three fail 2, 1 and 2 tests. Every count of the review holds. What changed since, by the review's items:

  1. Plan's rebuild. Three pairs keep the name and change the filter, the included columns or uniqueness: a drop and a create at the diff (Another_filter_…, Another_included_column_…, Uniqueness_under_the_same_name_is_a_drop_and_a_create), and on the server the catalog EnsureCreated() builds (Changing_the_filter_under_the_same_name, Adding_an_included_column_under_the_same_name, Making_the_index_unique_under_the_same_name).
  2. The schema, the order, the dialect, a filter written as SQL.
    • A table in a schema of its own, in DROP INDEX … ON, in CREATE INDEX and in sp_rename's first argument (An_index_of_a_table_in_a_schema_is_dropped_renamed_and_rebuilt_under_the_schema; live Dropping_…, Rebuilding_…, Renaming_the_index_of_a_table_in_a_schema_keeps_the_index), and two tables of one name in two schemas, where the namesake has to stay (Dropping_an_index_leaves_its_namesake_in_another_schema, Renaming_an_index_leaves_its_namesake_in_another_schema, live).
    • Two keys and two included columns, in the statement and in the catalog (Keys_and_included_columns_are_written_in_their_order, Two_keys_and_two_included_columns_reach_the_catalog_in_their_order, Changing_the_order_of_the_keys).
    • The dialect's claims for an object of the schema: by value for all seven kinds (The_dialect_says_where_SQL_Server_keeps_each_name) and at the diff through a stand-in. This contributor's index is named within its table, so a hook for these tests alone (ClaimedAs) lets it claim a name in the schema: refused beside a sequence, a foreign key, a check constraint, a primary key and a table, let through beside an index and beside a name taken in another schema. An object of the schema that a contributor really declares is not measured.
    • A filter without a placeholder is taken to read every column (A_filter_without_a_placeholder_is_taken_to_read_every_column). That is held at the diff alone, and cannot be held on the server: when the column such a filter reads is renamed its text changes, which is a rebuild whatever is answered.
  3. fix: a failing test fails the Test and Integration tests steps #158 is merged, and the branch is rebased onto it, onto Spike D: SqlOperations in idempotent scripts and bundles #146 and onto test: the rest of the 5.x port: convention tests, nightly.yml, the SBOMs and the skills #154. The lane's step no longer sets pipefail for itself, since the file's shell has it. test: the rest of the 5.x port: convention tests, nightly.yml, the SBOMs and the skills #154's convention tests pass with the lane in the file.
  4. The audit on A second provider against the public contract: a throwaway SQL Server contributor, and the audit of what in the kernel is PostgreSQL's #119 says what a test carries, in rows 1, 2, 3, 6, 7, 8 and 9: the schema's half of row 1 is carried by the stand-in, the "1504 mappings" are held by no test, row 2 is sound as far as it is measured, row 3 is "not measured", and SQLite's refusal in row 9 is asserted by both messages. No "has to change" was taken back.
  5. ExecuteScript runs sqlcmd's batches on SqlClient's session, and says so. With QUOTED_IDENTIFIER off, as sqlcmd starts without -I, SQL Server refuses to create a filtered index, this contributor's and EF Core's own (With_QUOTED_IDENTIFIER_off_a_filtered_index_is_refused, Msg 1934, live). spikes/D.ScriptsAndBundles/README.md has the same through sqlcmd itself, by hand; the two agree.
  6. The operator test is named for what it shows, The_operator_grammar_of_both_providers_is_PostgreSQLs. Neither probe dialect overrides Operator, so nothing is narrowed: that a dialect can refuse more and accept nothing more is by reading, and A second provider against the public contract: a throwaway SQL Server contributor, and the audit of what in the kernel is PostgreSQL's #119 says so.

CLAUDE.md no longer says that every rule has a test that breaks it. It says what was measured: the run below, by hand, once.

Tests

171 tests in the project, all green locally: 85 need no server (the SQLite ones run on a database file each) and 86 run on SQL Server 2022, a database per test (16.0.4305.5, Developer Edition, mcr.microsoft.com/mssql/server:2022-latest). In CI on a0b0018, rebased onto main with #154: Integration (SQL Server 2022) ran 86 of 86 on the server (image digest sha256:4525e3ef…), Test ran the other 85 beside the kernel's 723 and the PostgreSQL package's 176, and the gate passed.

What the issue lists, and where it is held (live = on SQL Server 2022):

Case Test
creates EnsureCreated_creates_the_index, A_first_migration_creates_the_index, The_create_script_creates_the_index (live)
renames through sp_rename Renaming_the_index_keeps_the_index (live, the same storage before and after)
follows a column rename Renaming_a_key_column, Renaming_an_included_column (live; the migration is EF Core's rename alone)
stands in the way of ALTER COLUMN and DROP COLUMN Answered_as_unaffected_an_altered_type_is_refused (Msg 5074), Answered_as_lost_a_dropped_column_is_refused (Msg 5074, Msg 4922), and Altering_…, Dropping_… with the index out of the way (live)
collides by name with a table's constraint An_index_named_like_a_key_of_its_table_is_refused_at_the_diff (SK1001), The_server_refuses_an_index_named_like (Msg 1913, live)
a snapshot round trip A_snapshot_round_trip_changes_nothing, A_migration_from_the_snapshot_leaves_what_EnsureCreated_builds (live)
a generated script with its batches The_migrations_script_leaves_what_EnsureCreated_builds, The_idempotent_script_applies_to_a_database_at_any_migration, Written_as_a_plain_statement_the_create_fails_the_script (Msg 207, live)
SQLite: an expression index created EnsureCreated_creates_the_index_on_the_expression, A_query_on_the_expression_is_answered_from_the_index
SQLite: the rebuild that loses it refused loudly A_table_rebuild_under_an_unchanged_index_fails_the_migration_and_loses_nothing, and the same for an altered and a dropped column the index reads; where it is not loud: three tests named Today_… (#145)

Each rule shown to fail without it. Each line of the two contributors, dialects and declarations was changed in turn, one change at a time, and the whole project run on the server: 102 changes, the review's eleven among them. 94 fail at least one test. Eight fail none, and none of the eight is a rule:

  • The answer to TableDropped, on both providers (2 changes). An index on a table that goes is no longer declared, and the planner drops it as such whatever is answered. In the audit, under BaseChange.
  • An answer to a change the provider never makes (2): TableRebuilt on SQL Server, TableMoved on SQLite.
  • Which of Plan's two descriptors names the table in sp_rename (1). The kernel hands Plan the source under the target's table, after a rename and after a move (Renaming_the_table_of_a_default_named_index, Moving_the_table_and_renaming_its_index_keeps_the_index, live).
  • SQLite's WithName (1). Its Plan is always a rebuild, and a pair that is rebuilt gets the drop and the create an unpaired object gets.
  • SQLite's answer Lost to an altered or a dropped column (2). The provider rebuilds the table for both, the rebuild is asked about by itself, and it says Lost already.

The run found three more gaps, closed in the last commit: on SQLite an altered column the index reads, answered RebuildAround, applied and lost the index; SQLite's stored form was held by no test; and that the dialect claims a name in its table's schema was held by value alone.

The counts are of the head with 166 tests; a change marked as run again is of the head with 171. Nothing in CI repeats this run.

All 102 changes

The review's eleven

Changed Tests that fail Among them
Plan never rebuilds 6 Adding_an_included_column_under_the_same_name, Another_filter_under_the_same_name_is_a_drop_and_a_create
DROP INDEX … ON without the schema 4 An_index_of_a_table_in_a_schema_is_dropped_renamed_and_rebuilt_under_the_schema, Dropping_an_index_leaves_its_namesake_in_another_schema
sp_rename's first argument without the schema 3 An_index_of_a_table_in_a_schema_is_dropped_renamed_and_rebuilt_under_the_schema, Renaming_an_index_leaves_its_namesake_in_another_schema
the key columns in the other order 4 Another_order_of_the_keys_is_another_index, Changing_the_order_of_the_keys
the included columns in the other order 6 Adding_an_included_column_under_the_same_name, Another_included_column_under_the_same_name_is_a_drop_and_a_create
the dialect: a key claims no name in the schema 3 A_name_taken_in_dbo_is_taken_for_a_table_without_a_schema, The_dialect_says_where_SQL_Server_keeps_each_name
the dialect: a table, a sequence, a foreign key and a check constraint claim nothing 7 A_collision_in_the_schema_is_described_as_PostgreSQL_would, A_name_taken_in_dbo_is_taken_for_a_table_without_a_schema
a filter without a placeholder reads no column 1 A_filter_without_a_placeholder_is_taken_to_read_every_column
the dialect: an index of EF Core's claims nothing 3 An_index_of_EF_Cores_takes_the_name_a_renamed_index_gives_up, The_dialect_says_where_SQL_Server_keeps_each_name
unique read as false 3 A_second_open_order_of_a_number_is_refused_and_a_shipped_one_is_not, Making_the_index_unique_under_the_same_name
CREATE INDEX … ON without the schema 8 An_index_of_a_table_in_a_schema_is_dropped_renamed_and_rebuilt_under_the_schema, Dropping_an_index_leaves_its_namesake_in_another_schema

SQL Server, the declaration and what is stored

Changed Tests that fail Among them
another Kind 2 An_index_named_like_a_key_of_its_table_is_refused_at_the_diff, The_declaration_is_one_annotation_in_the_snapshot
unique written as false 3 A_second_open_order_of_a_number_is_refused_and_a_shipped_one_is_not, Making_the_index_unique_under_the_same_name
a stored property renamed 1 The_declaration_is_one_annotation_in_the_snapshot
the filter not written 59 A_default_name_reaches_the_catalog, A_dropped_column_is_a_drop_before_and_a_create_after
the included columns not written 64 A_change_of_nullability_did_not_need_the_index_out_of_its_way, A_default_added_to_a_key_column_rebuilds_the_index_although_no_column_is_altered
the keys written in the other order 4 Another_order_of_the_keys_is_another_index, Changing_the_order_of_the_keys
the included columns lost on reading 102 A_change_from_the_snapshot_is_the_change_from_the_model, A_change_of_nullability_did_not_need_the_index_out_of_its_way
the filter lost on reading 93 A_change_from_the_snapshot_is_the_change_from_the_model, A_collision_in_the_schema_is_described_as_PostgreSQL_would
names compared ordinally 2 A_name_that_differs_from_the_keys_in_case_is_refused_too, Two_names_that_differ_in_case_are_two_in_a_case_sensitive_database_and_one_to_the_kernel

SQL Server, the descriptor and Resolve

Changed Tests that fail Among them
the keys are no dependency 11 A_default_added_to_a_key_column_rebuilds_the_index_although_no_column_is_altered, A_default_did_not_need_the_index_out_of_its_way_and_rebuilds_it
the included columns are no dependency 4 A_renamed_key_or_included_column_is_EF_Cores_rename_alone, Altering_the_type_of_an_included_column
the filter's columns are no dependency 7 A_filter_without_a_placeholder_is_taken_to_read_every_column, A_renamed_table_and_a_renamed_filter_column_in_one_migration
the whole table is a dependency 1 A_dropped_column_the_index_does_not_read_is_EF_Cores_drop_alone
the filter's column is never found 10 A_migration_from_the_snapshot_leaves_what_EnsureCreated_builds, A_renamed_filter_column_is_a_drop_before_and_a_create_after
the filter is taken to read every column 2 A_renamed_key_column_renames_a_default_named_index, A_renamed_key_or_included_column_is_EF_Cores_rename_alone
WithName keeps the old name 8 A_renamed_index_takes_the_name_of_an_index_EF_Core_drops, A_renamed_key_column_renames_a_default_named_index
the scope is the schema, not the table 1 A_dependency_on_an_index_cannot_say_which_tables_index_it_means
placed before the tables 74 A_change_from_the_snapshot_is_the_change_from_the_model, A_change_of_nullability_did_not_need_the_index_out_of_its_way
another prefix of the default name 9 A_default_name_reaches_the_catalog, A_renamed_key_column_renames_a_default_named_index
never unique 3 A_second_open_order_of_a_number_is_refused_and_a_shipped_one_is_not, Making_the_index_unique_under_the_same_name
never filtered 57 A_default_name_reaches_the_catalog, A_dropped_column_is_a_drop_before_and_a_create_after

SQL Server, Create, Drop and Plan

Changed Tests that fail Among them
no INCLUDE 62 A_change_of_nullability_did_not_need_the_index_out_of_its_way, A_default_added_to_a_key_column_rebuilds_the_index_although_no_column_is_altered
no WHERE 57 A_default_name_reaches_the_catalog, A_dropped_column_is_a_drop_before_and_a_create_after
no UNIQUE 3 A_second_open_order_of_a_number_is_refused_and_a_shipped_one_is_not, Making_the_index_unique_under_the_same_name
always UNIQUE 59 A_change_of_nullability_did_not_need_the_index_out_of_its_way, A_default_added_to_a_key_column_rebuilds_the_index_although_no_column_is_altered
without NONCLUSTERED 18 A_default_added_to_a_key_column_rebuilds_the_index_although_no_column_is_altered, A_dropped_column_is_a_drop_before_and_a_create_after
a filtered index as the plain statement 16 A_dropped_column_is_a_drop_before_and_a_create_after, A_filter_without_a_placeholder_is_taken_to_read_every_column
an unfiltered index through EXEC too 5 A_default_added_to_a_key_column_rebuilds_the_index_although_no_column_is_altered, A_dropped_column_is_a_drop_before_and_a_create_after
DROP INDEX table.index 15 A_default_added_to_a_key_column_rebuilds_the_index_although_no_column_is_altered, A_dropped_column_is_a_drop_before_and_a_create_after
Plan always rebuilds 8 A_renamed_index_takes_the_name_of_an_index_EF_Core_drops, A_renamed_key_column_renames_a_default_named_index
sp_rename's new name delimited 11 A_renamed_index_takes_the_name_of_an_index_EF_Core_drops, A_renamed_key_column_renames_a_default_named_index
sp_rename to the old name 11 A_renamed_index_takes_the_name_of_an_index_EF_Core_drops, A_renamed_key_column_renames_a_default_named_index
sp_rename with N'OBJECT' 11 A_renamed_index_takes_the_name_of_an_index_EF_Core_drops, A_renamed_key_column_renames_a_default_named_index
sp_rename's table taken from the source descriptor none (run again with the tests added since) no rule: see below

SQL Server, ImpactOf and Claims

Changed Tests that fail Among them
a renamed column always Follows 11 A_filter_without_a_placeholder_is_taken_to_read_every_column, A_migration_from_the_snapshot_leaves_what_EnsureCreated_builds
a renamed column always RebuildAround 2 A_renamed_key_column_renames_a_default_named_index, A_renamed_key_or_included_column_is_EF_Cores_rename_alone
an altered column Unaffected 9 A_default_added_to_a_key_column_rebuilds_the_index_although_no_column_is_altered, A_default_did_not_need_the_index_out_of_its_way_and_rebuilds_it
an altered column Follows 9 A_default_added_to_a_key_column_rebuilds_the_index_although_no_column_is_altered, A_default_did_not_need_the_index_out_of_its_way_and_rebuilds_it
an altered column Lost 11 A_default_added_to_a_key_column_rebuilds_the_index_although_no_column_is_altered, A_default_did_not_need_the_index_out_of_its_way_and_rebuilds_it
a dropped column Lost 6 A_dropped_column_is_a_drop_before_and_a_create_after, An_altered_column_is_a_drop_before_and_a_create_after
a dropped column Unaffected 2 An_altered_column_is_a_drop_before_and_a_create_after, Making_a_key_column_a_computed_one
a renamed table Unaffected 2 A_renamed_table_takes_its_index_along, Looked_up_by_the_changes_table_the_filters_column_is_not_found_and_the_rename_is_refused
a renamed table RebuildAround 2 A_renamed_table_takes_its_index_along, Looked_up_by_the_changes_table_the_filters_column_is_not_found_and_the_rename_is_refused
a renamed table Lost 2 A_renamed_table_takes_its_index_along, Looked_up_by_the_changes_table_the_filters_column_is_not_found_and_the_rename_is_refused
a moved table Unaffected 1 A_moved_table_takes_its_index_along
a moved table RebuildAround 1 A_moved_table_takes_its_index_along
a dropped table RebuildAround none (run again with the tests added since) no rule: see below
a rebuilt table Unaffected none (run again with the tests added since) no rule: see below
the index claims no name 5 A_name_that_differs_from_the_keys_in_case_is_refused_too, An_index_named_like_a_key_of_its_table_is_refused_at_the_diff
the index claims its name in the schema 8 A_dependency_on_an_index_cannot_say_which_tables_index_it_means, An_index_named_like_a_foreign_key_or_a_check_constraint_of_its_table_is_let_through

SQL Server's dialect

Changed Tests that fail Among them
a key claims no name among its table's indexes 4 A_name_that_differs_from_the_keys_in_case_is_refused_too, An_index_named_like_a_key_of_its_table_is_refused_at_the_diff
every object claims an index name too 2 An_index_named_like_a_foreign_key_or_a_check_constraint_of_its_table_is_let_through, The_dialect_says_where_SQL_Server_keeps_each_name
an index of EF Core's claims its name in the schema 4 An_index_of_EF_Cores_takes_the_name_a_renamed_index_gives_up, An_object_of_the_schema_may_be_named_like_an_index
an object of the schema is claimed without its schema 2 (run again with the tests added since) A_name_taken_in_another_schema_is_free_in_this_one, The_dialect_says_where_SQL_Server_keeps_each_name
no default schema 2 A_name_taken_in_dbo_is_taken_for_a_table_without_a_schema, The_dialect_names_the_schema_of_a_table_without_one
another default schema 2 A_name_taken_in_dbo_is_taken_for_a_table_without_a_schema, The_dialect_names_the_schema_of_a_table_without_one
the options do not tell the probe's dialect from the kernel's 4 A_name_taken_in_dbo_is_taken_for_a_table_without_a_schema, The_dialect_names_the_schema_of_a_table_without_one

SQLite, the declaration and the descriptor

Changed Tests that fail Among them
a stored property renamed 1 (run again with the tests added since) The_declaration_is_one_annotation_in_the_snapshot
the expression stored in another form 22 A_default_name_is_built_from_the_table_and_the_expression, A_dropped_column_under_the_index_fails_the_migration_as_a_rebuild_does
unique lost on reading 1 A_unique_index_on_the_expression_refuses_a_name_that_differs_in_case_only
names compared ordinally 1 Two_names_that_differ_in_the_case_of_an_umlaut_are_two_to_the_database_and_one_to_the_kernel
no dependencies 1 Renaming_the_column_the_expression_reads
WithName keeps the old name none (run again with the tests added since) no rule: see below
placed before the tables 20 A_default_name_is_built_from_the_table_and_the_expression, A_dropped_column_under_the_index_fails_the_migration_as_a_rebuild_does
another prefix of the default name 1 A_default_name_is_built_from_the_table_and_the_expression
never unique 1 A_unique_index_on_the_expression_refuses_a_name_that_differs_in_case_only

SQLite, Create, Drop, Plan, ImpactOf and Claims

Changed Tests that fail Among them
no UNIQUE 1 A_unique_index_on_the_expression_refuses_a_name_that_differs_in_case_only
always UNIQUE 11 A_default_name_is_built_from_the_table_and_the_expression, A_first_migration_creates_it
another key 13 A_default_name_is_built_from_the_table_and_the_expression, A_first_migration_creates_it
a drop that drops nothing 3 Another_name_is_a_drop_and_a_create, Dropping_the_index
a rename in place 1 Another_name_is_a_drop_and_a_create
a renamed column Unaffected 1 Renaming_the_column_the_expression_reads
a renamed column RebuildAround 1 Renaming_the_column_the_expression_reads
a renamed table Unaffected 2 A_renamed_table_whose_key_is_named_after_it_is_a_rebuild_and_fails_as_one, Renaming_the_table
a renamed table RebuildAround 2 A_renamed_table_whose_key_is_named_after_it_is_a_rebuild_and_fails_as_one, Renaming_the_table
an altered column RebuildAround 1 (run again with the tests added since) An_altered_column_under_the_index_fails_the_migration_as_a_rebuild_does
an altered column Lost none (run again with the tests added since) no rule: see below
a dropped column RebuildAround 1 A_dropped_column_under_the_index_fails_the_migration_as_a_rebuild_does
a dropped column Lost none (run again with the tests added since) no rule: see below
a rebuilt table Unaffected 3 A_dropped_column_under_the_index_fails_the_migration_as_a_rebuild_does, A_renamed_table_whose_key_is_named_after_it_is_a_rebuild_and_fails_as_one
a rebuilt table Follows 3 A_dropped_column_under_the_index_fails_the_migration_as_a_rebuild_does, A_renamed_table_whose_key_is_named_after_it_is_a_rebuild_and_fails_as_one
a rebuilt table RebuildAround 3 A_dropped_column_under_the_index_fails_the_migration_as_a_rebuild_does, A_renamed_table_whose_key_is_named_after_it_is_a_rebuild_and_fails_as_one
a moved table Lost none (run again with the tests added since) no rule: see below
a dropped table Unaffected none (run again with the tests added since) no rule: see below
the index claims no name 1 An_index_named_like_an_index_of_another_table_or_like_a_table_is_refused_at_the_diff
the index claims its name within its table 1 An_index_named_like_an_index_of_another_table_or_like_a_table_is_refused_at_the_diff

SQLite's dialect, and the kernel

Changed Tests that fail Among them
an index of EF Core's is named within its table 1 An_index_named_like_an_index_of_another_table_or_like_a_table_is_refused_at_the_diff
a table claims no name 1 An_index_named_like_an_index_of_another_table_or_like_a_table_is_refused_at_the_diff
a constraint claims a name 1 An_index_named_like_a_key_or_a_check_constraint_of_its_table_is_let_through_and_created
the options do not tell the probe's dialect from the kernel's 1 The_kernels_own_scopes_let_the_collision_through_to_the_database
the kernel grants the assembly its internals 1 The_kernel_grants_this_assembly_no_internals

The tests that hold a fact about the server and no rule of the contributor (The_server_refuses_…, The_server_takes_…, The_database_…) come in pairs of refused and taken, from the same statement with another name.

The guards of the lane, run locally with the step's own script before its first run in CI. Without SCHEMAKIT_TEST_MSSQL the live tests are skipped; with CI set they fail. With CI set and no server the script exited 0 under bash -e and 1 under bash -e -o pipefail: that was #150, and since #158 every step of the file runs with pipefail. A filter that matches nothing prints no count of passed tests, which the step takes for a failure.

Not shown: a user whose default schema is not dbo; an object of the schema that a contributor declares; SQLite's attached databases; a prerequisite of another provider behind Dependency.Extension, since neither object has one; a script applied through sqlcmd itself.

🤖 Generated with Claude Code

CaffeinatedCoder and others added 5 commits November 16, 2026 21:42
…22 and SQLite

Every type of the contributor contract was shaped by one contributor on one
provider, and nothing of the kernel ran on a live SQL Server (#119, epic #111).

test/CodoMetis.EFCore.SchemaKit.SecondProvider.Tests holds two contributors
nobody ships, written against the kernel's public contract alone: the kernel
grants the assembly no InternalsVisibleTo. A filtered nonclustered index with
included columns on SQL Server, an index on an expression on SQLite, each with
a dialect. Nothing under src/ changed.

- SQL Server: created through EXEC, renamed through sp_rename, a dropped or
  altered column answered RebuildAround (Msg 5074, Msg 4922), never Lost.
  Applied on a live server, a database per test, and compared with what
  EnsureCreated() builds; the scripts are EF Core's own Migrator's.
- SQLite: the index is created, follows a renamed column and table, and a
  table rebuild under it fails the migration. Three tests hold #145 as it
  is: an object created in the migration that rebuilds its table is lost.
- Each rule has a test that breaks it and asserts the server's message.
- A comment that begins "Audit:" marks what the contract could not say; the
  answers to #119's table are in the issue.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Integration (SQL Server 2022) runs the second provider's live tests (#119)
behind the CI gate: what was left of #5. The server is started by a step with
a password made there, so none is in the file. The lane writes the image
digest and the server's ProductVersion to the summary, fails when the server
is not 16.x and when no integration test ran, and has pipefail, since the
tests' output goes through tee (#150). The unit lane runs the project's tests
that need no server.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
…s test

Eight of eleven defects seeded into the contributors and dialects passed
every test. What was missing:

- Plan's rebuild: pairs that keep the name and change the filter, the
  included columns or uniqueness, offline and on the server.
- The schema in DROP INDEX … ON and in sp_rename's first argument: a table
  in a schema of its own, and two tables of one name in two schemas.
- The order of key columns and of included columns.
- A filter without a placeholder, which is taken to read every column.
- The dialect's claims for an object of the schema, by value and at the
  diff. The index stands in for such an object through ClaimedAs, since
  this contributor has none.

Corrected beside them: ExecuteScript runs sqlcmd's batches on SqlClient's
session, and with QUOTED_IDENTIFIER off SQL Server refuses a filtered index,
EF Core's own too (Msg 1934); the SQLite spelling test asserts the two
messages; the operator test is named for what it shows.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
… since #158

The step set pipefail for itself while #150 was open. The file's default
shell has it now, for every script, and says why it is not set per script.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
CaffeinatedCoder and others added 2 commits November 16, 2026 22:17
Each line of the two contributors, dialects and declarations was changed in
turn and the project run on the server. Three changes passed that are rules:

- SQLite: an altered column the index reads, answered as a reason to take
  the index away first, applied and lost the index (#145). The test alters
  the column the index is on.
- SQLite: the stored form of the declaration was held by no test.
- SQL Server's dialect: that a name is claimed in its table's schema was
  held by value alone. A name taken in another schema is free in this one.

And the rename in place after a move of the table, at the diff and on the
server: the kernel hands Plan the source under the target's table for a
move as for a rename, so which descriptor names the table is no rule.

The comment of the live test for a filter written as SQL says what it
shows. It does not hold that such a filter reads every column, and no test
on the server can.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
It said every rule of a contributor has a test that breaks it, while eight
of eleven seeded defects passed every test. It now says what was done: each
line of the contributors, dialects and declarations changed in turn, 102
changes, 94 that fail a test and 8 that are no rules, by hand and once.

And what the script tests do not say: they run on SqlClient's session, and
with QUOTED_IDENTIFIER off, as sqlcmd starts, SQL Server refuses a filtered
index (Msg 1934).

Co-Authored-By: Claude Fable 5.2 <[email protected]>
@CaffeinatedCoder
CaffeinatedCoder merged commit 535f442 into main Nov 16, 2026
11 checks passed
@CaffeinatedCoder
CaffeinatedCoder deleted the test/second-provider branch November 16, 2026 21:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/migrations The differ and generator decorators, snapshot format, EnsureCreated and the UseSchemaKit wiring area/release Versioning, changelogs, release wiring package/core Affects CodoMetis.EFCore.SchemaKit (the kernel) package/sqlserver Affects CodoMetis.EFCore.SchemaKit.SqlServer tests Adds or changes tests only (harnesses, parity suites); no library code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CI lanes: PostgreSQL 16 and 18, SQL Server 2022, and a prerelease path in the release workflow

1 participant