Skip to content

#774 The gate has been running green on engine merges while its heaviest engine test sat unrun - #775

Merged
nockawa merged 3 commits into
mainfrom
feature/774-gate-hidden-engine-test
Aug 11, 2026
Merged

nockawa merged 3 commits into
mainfrom
feature/774-gate-hidden-engine-test

Conversation

@nockawa

@nockawa nockawa commented Aug 11, 2026

Copy link
Copy Markdown
Collaborator

Part of #774. Two commits, independently reviewable.

The finding

main went red after #772 on one test:

FixtureConfigTests.Stress_Config_Completes_Without_Backpressure_Timeout
System.InvalidOperationException: B+Tree insert made no progress in 10000 pessimistic retries.

Chasing why produced something more useful than the failure itself. The Workbench suite is gated behind a path filter matching tools/Typhon.Workbench/** only, so src/Typhon.Engine/** changes never run it — and the gate's heaviest page-cache/B+Tree stress case lives in that project:

Run Merge Workbench suite
31417824609 #765 (engine) did not run
31434839913 #769 (engine) did not run
31446209914 #772 ran — 617 tests

#772 touched one Workbench SPA file, flipped the filter on, and surfaced a pre-existing failure. The gate was reporting green on engine merges while its hardest engine case sat unrun.

Not a #772 regression, and not a flake

#772 changed no B+Tree file and no concurrency primitive. Its only live-path change writes 2 bytes into previously-free page-header space [54,58); chunk capacity and node packing are untouched, so tree shape and contention are unchanged.

A re-run of the identical commit settles the flake question:

Run engine shard Workbench
original initial-failed=2 → both recovered, FLAKED … NON-blocking failed
re-run initial-failed=0 — completely clean failed, same test, same exception

Reliably red, green locally in Release. shard.py's own premise applies: "a REAL regression fails every attempt."

Commit 1 — move the test where engine changes run it

Into Typhon.Engine.Tests/Data/SwgFixtureStressTests.cs. The engine project already carries the Typhon.Workbench.Fixtures reference, so this is a move, not a plumbing exercise. Shard 0 is a catch-all, so no shards.json edit is needed.

Quarantined against #774 on arrival, with a QUARANTINE.md row — main stays green while the cause is unfixed, and the nightly still runs it. The move is the part that lasts: it is what makes engine changes execute this test once #774 is fixed.

I could not cite #695 — it is closed, as are #297, #740 and #679. #739 is the only one in that family still open and may well be the same root cause, but that is unproven, so #774 carries the evidence instead. The engine's exception text citing a closed issue is noted there.

Commit 2 — extend the retry net to the Workbench suite

shard.py gains a retry subcommand reusing the same trx parsing, MAX_RETRIES and run_one (now taking an optional project); run-gate.sh falls through to it. Previously an identical-probability flake was absorbed in the engine suite and hard-red in Workbench — decided by which directory a file sits in.

It deliberately does not weaken the verdict: failing every attempt still returns non-zero, and a non-zero exit with no recorded failure (crashed host, zero-test run) returns 1 rather than being absorbed — the same false-green the plan-integrity check already guards against.

This would not have saved the run that prompted it, and #774 is the worked example of why it must not be asked to.

Verification

engine suite (gate filter)   5200 passed · 0 failed · 20 skipped
moved test in its new home   passes locally, Release, 3s
gate filter excludes it      "No test matches" ✓
suppression lint             clean WITH GitHub checks (validates #774 open)
shard.py self-tests          13/13
run-gate.sh                  bash -n clean; `set -uo pipefail` confirmed

Left deliberately

ci.sky.yaml is untouched — its own header asks for that during the cutover, and the aws-gate job it drives is dormant. The remaining #774 items (drop the stale (see #695) text; decide whether src/Typhon.Engine/** should trigger the Workbench suite at all) are tracked on the issue, not done here.

…ere engine changes run it

The test asserts an engine property — that the commit path sustains 105,500 spawns across a five-component indexed schema without the page cache raising back-pressure — but it lived in Typhon.Workbench.Tests purely because the fixture generator it drives is a Workbench tool. The merge gate runs that project only when the path filter tools/Typhon.Workbench/** matches, so a change confined to src/Typhon.Engine/** never executed the gate's heaviest back-pressure case. Confirmed across three consecutive merges: the runs for #765 and #769 did not run it at all, and #772's run did only because that branch happened to touch one SPA file. The gate was reporting green on engine merges while its hardest engine case sat unrun.

Quarantined against #774 on arrival rather than left blocking. It fails 2 runs out of 2 on the self-hosted gate box with "B+Tree insert made no progress in 10000 pessimistic retries" and passes locally in Release, so it is reliably red rather than flaky — the second run's engine shard was initial-failed=0, meaning no retry net could absorb it, and by shard.py's own premise that a real regression fails every attempt, none should be asked to. The nightly still runs it, so the quarantine records the state instead of hiding it.

The exception's own "(see #695)" citation is stale: #695 was the unbounded SpinWriteLock livelock and is closed, fixed by bounding the spin and throwing. What the throw now reports is the #739 family, which is still open.
The engine suite has had a retry net since #405 because it runs through shard.py; the Workbench suite never did, because run-gate.sh invokes it with a bare dotnet test. The consequence is that an identical-probability timing flake is absorbed in one project and hard-red in the other, decided by which directory the test file sits in rather than by anything about the test. The run that prompted this showed both halves at once: two engine tests failed, were retried alone and recovered as NON-blocking, while the Workbench run failed one test and took the gate down.

Rather than reimplement the policy in bash, shard.py gains a retry subcommand that reuses the same trx parsing, the same MAX_RETRIES and the same run_one, which now takes an optional project. run-gate.sh falls through to it when the Workbench run fails.

It deliberately does not weaken the verdict. A test that fails every attempt still returns non-zero, and a non-zero exit with no recorded failure — a crashed host, a build error, a zero-test run — returns 1 rather than being absorbed, which is the same false-green this file's plan-integrity check already guards against. This would not have saved the run that prompted it, and #774 is the worked example of why it must not.

ci.sky.yaml is left untouched: its own header asks for that during the cutover, and the aws-gate job it drives is currently dormant.
The only conflict was QUARANTINE.md, where #773 removed the #389 row because it fixed #389, and this branch had added its own row immediately above it. Resolved by keeping the new row and taking main's deletion; the [Category("Quarantine")] attribute on PayloadAxes_SurviveACrash is gone from the source too, so the register and the code agree.

Engine suite after the merge: 5237 passed, 0 failed, 20 skipped under the gate's filter — up from 5200 because main added tests and the un-quarantined #389 test now runs. Suppression lint clean, rule-coverage audit 0 blocking.
@nockawa
nockawa merged commit d3763bf into main Aug 11, 2026
9 checks passed
@nockawa
nockawa deleted the feature/774-gate-hidden-engine-test branch August 11, 2026 01:09
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