Skip to content

fix: oracles seeds credits a seed only against a passing baseline - #158

Merged
CaffeinatedCoder merged 1 commit into
release/2.3.0from
fix/oracle-seeds-baseline
Oct 29, 2026
Merged

CaffeinatedCoder merged 1 commit into
release/2.3.0from
fix/oracle-seeds-baseline

Conversation

@CaffeinatedCoder

Copy link
Copy Markdown
Owner

Closes #151

Problem

oracles seeds counted any failed test as a catch and never checked that the oracle passes without the seed. On an arm64 Mac, SQL Server 2022 under QEMU never starts, so SqlServer.InitializeAsync throws ContainerNotRunningException and every test of both SQL Server oracles fails. The tool still reported both seeds CAUGHT (10,071 of 10,071 and 170 of 170) and exited 0 with every seed is caught.

Change

  • test/oracles/SeedVerdict.cs, linked into the tool and its tests:

    • Read(exitCode, trx, oracle) turns one run into a Run.
    • IsSetupFailure recognises xunit's own setup messages.
    • Judge(baseline, seeded) gives the verdict.
    • The remarks record what the TRX holds for each kind of failure.
  • tools/Oracles/Program.cs:

    • It first runs a baseline: every oracle the selected seeds name, on a copy with no seed, built and filtered the same way. It prints one BASELINE line per oracle.
    • An oracle whose baseline fails is not run with the seed, and its pairs are ERROR.
    • A project that does not build is an error for its oracles only, not for the whole seed.
    • ERROR exits 4, so it can be told apart from a missed seed (exit 1).
  • How a setup failure is told apart, measured on xunit.v3 4.0.2 with Microsoft Testing Platform:

    • Fixture fails to set up: a class, collection or assembly fixture that fails to construct or initialize fails each test with xunit's fixed message (Collection fixture type 'T' threw in InitializeAsync). xunit.v3.core 4.0.2 holds four more setup messages, and all are matched.
    • Fixture fails in Dispose: only an error counter in the TRX, with no failed result.
    • Host crash: no TRX, and an exit code other than 0 or 2.
    • Every test skipped: nothing ran.

    A failure in a test class's own constructor or InitializeAsync reads like one in the test body, so it counts as the test's own.

  • design/adr/0117: the rule, its measurement, and what was rejected. It restores for the oracle kit the baseline that decision 108 had given the prober. Decision 112's port had dropped it.

  • test/oracles/README.md has a verdict table. CONTRIBUTING's and AGENTS' release steps now say what ERROR means and that an arm64 Mac needs TYPEKIT_MSSQL_IMAGE.

Tests

oracles seeds on this arm64 Mac, at this branch:

SQL Server 2022 (no TYPEKIT_MSSQL_IMAGE): exit 4, 2 min 22 s

BASELINE SqlServerKeyVariantTests: DOES NOT PASS without a seed, 170 of 170 tests failed in setup, not in the test: Collection fixture type 'CodoMetis.TypeKit.EntityFrameworkCore.Tests.SqlServer' threw in InitializeAsync
BASELINE SqlServerQueryVariantTests: DOES NOT PASS without a seed, 10071 of 10071 tests failed in setup, not in the test: Collection fixture type 'CodoMetis.TypeKit.EntityFrameworkCore.Tests.SqlServer' threw in InitializeAsync
ERROR   column-cast-not-re-typed.patch -> SqlServerQueryVariantTests: without the seed, 10071 of 10071 tests failed in setup, ...
ERROR   ushort-key-not-generated.patch -> SqlServerKeyVariantTests: without the seed, 170 of 170 tests failed in setup, ...
(the six other pairs CAUGHT, their baselines passing)
AN ORACLE COULD NOT BE JUDGED: its baseline or its run did not reach the tests' own code; fix that and run again

TYPEKIT_MSSQL_IMAGE=mcr.microsoft.com/azure-sql-edge:latest: exit 0, 5 min 36 s. All 8 baselines pass.

BASELINE SqlServerKeyVariantTests: passes without a seed, 167 tests
BASELINE SqlServerQueryVariantTests: passes without a seed, 9621 tests
CAUGHT  column-cast-not-re-typed.patch -> SqlServerQueryVariantTests: 2978 of 9621 tests fail, e.g. ...(kind: "DateOnly", conversion: TypeKit, site: NamedQueryFilter, accessor: ValueThroughTypeParameter, op: GreaterOrEqual)
CAUGHT  inline-value-objects-ignored.patch -> SchemaTests: 92 of 164 tests fail
CAUGHT  json-key-written-by-to-string.patch -> JsonParityTests: 71 of 157 tests fail
CAUGHT  patch-traverse-takes-a-null-selector.patch -> NullDelegateTests: 1 of 142 tests fail
CAUGHT  result-reads-as-json.patch -> NotWireTypeTests: 15 of 99 tests fail
CAUGHT  traverse-async-resumes-on-the-caller-s-context.patch -> AsynchronousContextTests: 1 of 73 tests fail
CAUGHT  ushort-key-not-generated.patch -> KeyGenerationVariantTests: 19 of 547 tests fail
CAUGHT  ushort-key-not-generated.patch -> SqlServerKeyVariantTests: 10 of 167 tests fail, e.g. ...(shape: TpcRoot, kind: "ushort")
every seed is caught

The executed counts under Edge (9621, 167) are lower than 2022's because the tests that need 2022-only functions skip on Edge.

🤖 Generated with Claude Code

`oracles seeds` read any failed test as a catch, so a SQL Server fixture that
never started (2022 under QEMU on an arm64 Mac) credited both SQL Server seeds
while every test failed in `SqlServer.InitializeAsync`, and the tool exited 0.

The tool now runs every oracle the selected seeds name on a copy with no seed
first, built and filtered as the seeded runs are. A seed is CAUGHT only when
its oracle passes there and fails with the seed in a test of its own. A run
that never reached the tests is ERROR, exit 4, with or without the seed. The
TRX decides that, as measured with xunit.v3 4.0.2:
- a fixture that fails to set up fails each test with one of xunit's own
  messages;
- a fixture that fails in Dispose is only an `error` counter;
- a crashed host writes no TRX and exits other than 0 or 2;
- a run whose every test is skipped ran nothing.
A failing baseline is ERROR too. Decision 118 records the rule, and the
README, CONTRIBUTING and AGENTS say what ERROR means at release.

Input class: the ways a run fails outside a test's own code. SeedVerdictTests
covers each kind measured above and every setup message xunit.v3.core 4.0.2
holds. With the setup check and the baseline seeded out, three of those tests
fail, the dead fixture of #151 among them.

Closes #151.

Defect-Class: TOOL
Found-By: OR
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@CaffeinatedCoder CaffeinatedCoder added this to the 2.3.0 milestone Oct 29, 2026
@CaffeinatedCoder CaffeinatedCoder added bug Something isn't working silent Compiles or answers and does less than it appears to severity/medium Inconsistency or failure in a narrow scenario area/release Versioning, changelogs, packaging and release wiring area/tooling The repository's tools: prober, verdict, guard, docs-query, smoke test labels Oct 29, 2026
@CaffeinatedCoder
CaffeinatedCoder merged commit 1d2c547 into release/2.3.0 Oct 29, 2026
21 checks passed
@CaffeinatedCoder
CaffeinatedCoder deleted the fix/oracle-seeds-baseline branch October 29, 2026 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/release Versioning, changelogs, packaging and release wiring area/tooling The repository's tools: prober, verdict, guard, docs-query, smoke test bug Something isn't working severity/medium Inconsistency or failure in a narrow scenario silent Compiles or answers and does less than it appears to

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant