Skip to content

Port the convention tests, MigrationHarness, release workflow and skills #35

Closed
1 of 1 issue completed

Description

@CaffeinatedCoder

With the first src/ project. Plan, section 3.1.

Change

From CaffeinatedCoder/EFCore.ComplexIndexes, as files adapted to what is true here. Not ported: anything about .targets and the design-time registration.

Where it stands

From 5.x Here With
release.yml, PackagingConventionTests, DocumentationLinkTests Ported; DocumentationSampleTests is this repository's own #124
ChangelogConsistencyTests Ported for the one changelog: a section for the shipped version, none newer, newest first, the heading's form, — unreleased for the shipped version alone, the terse form, absolute links, ### Changed answers in a minor only, no README with a version section #154
WorkflowGateConventionTests Ported, and the gate's script is run #154
CiInputConventionTests Ported, with allowPrerelease: false; the nightly report's script is run #154
ReleaseWiringConventionTests Ported, with what is this repository's: publish names the events it runs for, the only write permissions, the pack checks' filter. The tag check, the release's notes and the SBOM step are run #154
SecurityPolicyConsistencyTests Ported for the policy's two states: no supported row before a version without a suffix is dated, then the latest minor #154
DocumentationApiTests Ported for the prose (every csharp block is compiled already), in the PostgreSQL test project #154
ClaudeMdConsistencyTests Ported, reading the skills too, in the PostgreSQL test project #154
nightly.yml Ported #154
The SBOM tool manifest and its step Ported: verify generates, release attaches #154
The skills migration-safety-review, verify-the-guard, plain-docs Ported, rewritten against this repository #154
MigrationHarness Not ported. Contexts, LiveDatabase and AssertMigratesTo cover what has a subject here; the comparison is in a comment below
The guards whose subject does not exist here yet Not ported, and listed with what each needs in #152
ClaudeMdConsistencyTests' count of the Npgsql whitelist Not ported: the differ it counts does not exist here

An independent analysis of #154 broke 16 subjects, saw every guard fail, and found five ways a broken subject stayed green: a job the workflow reader did not see, a changelog heading the release step refuses, the place of the SBOM steps, what the guard of CLAUDE.md did not read, and a build-only reference from Directory.Build.props. Each is closed in #154 and shown on its seed there. With them came WorkflowFileTests, which holds the reader every workflow rule reads through.

Found on the way: #151 (a dry run of release.yml stops at the — unreleased heading), #153 (the README and the guide predate the plain-docs voice). #160 (every piped script runs with pipefail) builds on WorkflowFile and is not part of this.

Done when

Each ported guard has been shown to fail without its subject in this repository, and CONTRIBUTING.md's "What is not here yet" section is gone. Both are in #154: its description has one line per guard, with what was broken and what the test said.

Sub-issues

Sub-issues

1 of 1 Issues completed
Loading 1 sub-issues

Activity

  1. added this to the 11.0.0 milestone on Nov 11, 2026
  2. added
    tests
    area/release
    on Nov 11, 2026
  3. CaffeinatedCoder commented on Nov 14, 2026

    @CaffeinatedCoder
    OwnerAuthor

    From the pre-preview sweep of main @ 948496a, 2026-11-14 (lens: delivery). Both packages packed with dotnet pack -c Release and consumed from a project outside the repository.

    What the pack checks of the release workflow have to hold, each measured:

    • The exact kernel pin is not there. The PostgreSQL package's nuspec says <dependency id="CodoMetis.EFCore.SchemaKit" version="11.0.0-preview.1" />, a lower bound. A consumer with the PostgreSQL package at preview.1 and a kernel packed as preview.2 with one contract method renamed restores with no warning, builds with none, and fails at the first context: MissingMethodException: … AddLegacyDeclarationReader. A target that brackets the project reference's version gives [11.0.0-preview.1], and the pair then fails at restore (tried in a copy):

      <Target Name="ExactKernelVersion" AfterTargets="_GetProjectReferenceVersions">
        <ItemGroup>
          <_ProjectReferencesWithVersions Update="@(_ProjectReferencesWithVersions)" ProjectVersion="[%(_ProjectReferencesWithVersions.ProjectVersion)]" />
        </ItemGroup>
      </Target>

      The check: unzip the PostgreSQL package and assert the kernel dependency is [$(Version)].

    • No README in either package (README: the sample does not compile against preview.1, and neither package carries a README #106).

    • No symbols: no .snupkg and no PDB in lib/, so the nuspec's repository commit gives SourceLink nothing.

    • InternalsVisibleTo for the test assemblies is in the Release build, and the assemblies are unsigned. To decide: a condition on the configuration, or leave it.

    Sound: license, project URL, repository and commit in the nuspec; net11.0 only; a consumer builds with no suppression, and an implementer of the contract gets SK9001.

  4. CaffeinatedCoder commented on Nov 16, 2026

    @CaffeinatedCoder
    OwnerAuthor

    MigrationHarness is not ported: the comparison

    MigrationHarness (test/EFCore.ComplexIndexes.Tests/Harness/MigrationHarness.cs at bee405f) does four things. Each is either done here already, by the tests' own harness, or has no subject in SchemaKit.

    MigrationHarness in 5.x Here
    NpgsqlModel<T>(), SqlServerModel<T>(), SqliteModel<T>(): the relational model of a context's design-time model, per provider Contexts.Of<TModel>() and .Relational() in the PostgreSQL tests (Harness/Models.cs), wired as a consumer wires it, UseNpgsql(…, o => o.UseSchemaKit()). The kernel's tests take the provider as a parameter: Setup.Options<T>().Use(provider) for Npgsql, SQL Server and SQLite (Harness/Setup.cs)
    NpgsqlDiff, SqlServerDiff, CoreDiff, Diff<TDiffer>, CreateDiffer: a differ subclass, built by hand from five EF-internal services No subject. The differ is a decorator and no EF class is derived from (decision 1), so a test asks the context for it: Contexts.Diff<TFrom, TTo>() is to.GetService<IMigrationsModelDiffer>().GetDifferences(from.Relational(), to.Relational()). What is diffed is what UseSchemaKit() registered, which a differ built by hand would go around
    DiffWith: the differ itself, for a test that reads a subclass's state No subject: there is no subclass
    NpgsqlSql(operations, complexIndexWiring: false): the same operations through the stock generator, to see a feature degrade without the runtime wiring No subject. Every object is a SqlOperation rendered when the migration is scaffolded (decision 4), so the provider's generator writes it as it is, and a missing wiring throws at the declaration (decision 3). The removal of a registration is tested from a packed consumer: test/ConsumerSmokeTest/run.sh with SMOKE_BREAK. An operation 5.x built for its own generator is refused by LegacyFormats.RequireRewritten
    SqlServerSql(operations, target): rendered with the target model, since SQL Server's generator answers differently without one The rule holds here: LiveDatabase.Apply hands the context's generator the design-time model, as database update does. There is no SQL Server package yet (#29)

    What the tests here do that MigrationHarness never did is the oracle: LiveDatabase gives a test a database of its own, Migrate<TFrom, TTo>() applies the diff through the context's differ, generator and executor, and AssertMigratesTo<TFrom, TTo>() compares the catalog it leaves with what EnsureCreated() builds for the target model, by pg_get_constraintdef (Integration/PgExclusionLiveTests.cs).

    So nothing is ported. CLAUDE.md says so under "Coming from the 5.x repository".

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/releasetests

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions