Skip to content

Burn down the remaining Category=Flaky exclusions (GH-3763) - #3835

Merged
jeremydmiller merged 1 commit into
mainfrom
gh-3763/flaky-tag-burndown
Aug 5, 2026
Merged

Burn down the remaining Category=Flaky exclusions (GH-3763)#3835
jeremydmiller merged 1 commit into
mainfrom
gh-3763/flaky-tag-burndown

Conversation

@jeremydmiller

Copy link
Copy Markdown
Member

Toward #3763. With #3833 (GH-3826) and #3834 (GH-3825) covering the other two classes, this takes the Category=Flaky exclusion list from 12 to 0.

Seven classes here. One real bug among them.

The real one: Polecat subscriptions_end_to_end

Failed 1 of 3 class runs but 6 of 6 in isolation — an in-class interaction, not a flake.

It is the daemon-outbox race: WolverineSubscriptionRunner.ProcessEventsAsync enlists the bus in a Marten outbox, so bus.PublishAsync only stages envelopes. The real flush is AfterCommitAsyncFlushOutgoingMessagesAsync, which the daemon calls after committing the page and its progress. So daemon.WaitForNonStaleData() returning does not mean the messages were published — the session completes on the activity lull and the stragglers are never recorded.

The MartenSubscriptionTests twin of this exact file already carries the fix — explicit WaitForExecutionOf<T>(count) waiters plus .Timeout(60.Seconds()). The Polecat copy never inherited it. Copied test files don't inherit each other's later repairs.

Two tests in the same class also carried:

[Fact(Skip = "Known TrackActivity race condition with publishing subscriptions - same failure in MartenSubscriptionTests")]

for that same cause. Both are now unskipped and covered by the same waiters — 7 passing + 2 skipped becomes 9 passing.

The other six needed no code change

class why it was tagged reality
ASB session_id_pinning tagged in the GH-3533 commit that added the feature green
ASB dead_letter_queue_recovery tagged in the #3103 commit that added the feature green
ASB Bug_2588 ×2 tagged in the #2596 commit that fixed the bug green
Sqlite multi_tenancy_with_multiple_files "reliably hangs the 10-minute sqlite job" stale — test since rewritten around the bounded Poll() helper it now uses
Marten using_tenant_specific_queues_and_subscriptions no note green 5/5

Four of these were tagged in the very commit that introduced the feature they test. That isn't flakiness — it's a feature that shipped without its test ever passing. git log -S on the tag is a fast way to tell the two apart.

One provisional untag — please weigh in

OracleTests.LeaderElection.leader_election is the only tag whose rationale was substantive: TM/DML lock contention against the shared CI Oracle container. The DDL_LOCK_TIMEOUT + per-table ORA-00054 retry it was standing in for has since been added to beforeBuildingHost(), and it is 15/15 on four consecutive runs locally at 1m44s each.

But that contention genuinely cannot be reproduced on a dev box. The code comment says so explicitly and points at CIOracle. If you'd rather not spend a CI cycle finding out, this one line is cheap to revert.

Measurements

Polecat 245/0 (8/8 runs on the class) · Sqlite 162/0 · MartenTests 548/0 · Oracle 15/0 ×4 · ASB 315/0

🤖 Generated with Claude Code

https://claude.ai/code/session_01WHAuhdWS3XeAk16swV9G8m

Seven classes, one real bug among them. With the two ASB classes handled on
GH-3825 and GH-3826, this takes the Flaky exclusion list to zero.

Polecat subscriptions_end_to_end -- the actual defect. Failed 1 of 3 class runs
but 6 of 6 in isolation, so an in-class interaction rather than a flake. It is
the daemon-outbox race: WolverineSubscriptionRunner stages envelopes in a Marten
outbox and the daemon flushes them AFTER committing the page and its progress, so
WaitForNonStaleData() returning does not mean the messages were published, and
the session ends on the activity lull with stragglers unrecorded. The
MartenSubscriptionTests twin of this file already carries the fix -- explicit
WaitForExecutionOf<T>(count) waiters plus a 60s timeout -- and the Polecat copy
never inherited it. Copied test files do not inherit each other's later repairs.

Two tests in the same class carried Skip = "Known TrackActivity race condition
with publishing subscriptions - same failure in MartenSubscriptionTests" for that
same cause. Both are now unskipped and covered by the same waiters: 7 passing +
2 skipped becomes 9 passing.

The other six needed no code change:

- ASB session_id_pinning, dead_letter_queue_recovery, and both Bug_2588 classes
  were each tagged in the very commit that introduced the feature they cover,
  with no note. They were never green rather than intermittently green.
- SqliteTests multi_tenancy_with_multiple_files was excluded for hanging the
  10-minute job; the test has since been rewritten around the bounded Poll()
  helper it now uses. Stale note, not wrong when written.
- MartenTests using_tenant_specific_queues_and_subscriptions is green 5/5.

OracleTests.LeaderElection leader_election is untagged provisionally. Its
rationale was real -- TM/DML lock contention against the shared CI Oracle
container -- but the DDL_LOCK_TIMEOUT plus per-table ORA-00054 retry it stood in
for has since been added to beforeBuildingHost(). 15/15 on four consecutive runs
locally, though that contention cannot be reproduced on a dev box. The comment
says so; watch CIOracle.

Measurements: Polecat 245/0 (8/8 runs on the class), Sqlite 162/0, MartenTests
548/0, Oracle 15/0 x4, ASB 315/0.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WHAuhdWS3XeAk16swV9G8m
@jeremydmiller
jeremydmiller merged commit 53a47ba into main Aug 5, 2026
37 checks passed
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