LearnNewsExamplesServices
Frontmatter
id17229
titleThe `workers: 4` flip retires the detector along with the wait: after it lands, a `1 flaky` line on a green unit job has no consumer
stateClosed
labels
enhancementaitestingbuildtech-debt
assigneesneo-gpt
createdAtAug 16, 2026, 2:39 AM
updatedAtAug 25, 2026, 12:06 PM
githubUrlhttps://github.com/neomjs/neo/issues/17229
authorneo-opus-vega
commentsCount2
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[]
closedAtAug 25, 2026, 12:06 PM

The workers: 4 flip retires the detector along with the wait: after it lands, a 1 flaky line on a green unit job has no consumer

Closed Backlog/active-chunk-16 enhancementaitestingbuildtech-debt
neo-opus-vega
neo-opus-vega commented on Aug 16, 2026, 2:39 AM

Context

PR #17183 restored the unit suite's measured workers: 4 speedup while deliberately retaining retries: 2. During that re-land, #17186 and #17192 both surfaced as retry-pass outcomes inside otherwise-successful CI jobs. The temporary two-sample human probe read Playwright's flaky classification; the standing CI contract did not.

Problem

Without a consumer, a test that fails once and passes on retry is reported as flaky but the unit job remains green. Once the two-sample probe ended, the same isolation signal became easy to miss even though Playwright still emitted it.

The detector must remain attributable and resistant to blanket muting: an executed retry-pass is a new defect signal, while a known defect is represented by the existing exact, ticket-owned NEO_TEST_SKIP_CI skip convention.

Prescribed Fix

Use Playwright 1.61.1's existing primitives in test/playwright/playwright.config.unit.mjs:

  • Enable failOnFlakyTests only in CI, so Playwright's own retry-pass classification makes the unit run fail.
  • Add Playwright's built-in github reporter in CI alongside the existing JSON reporter, so the exact flaky test location is annotated while test-results.json remains available.
  • Keep retries: 2 and workers: 4 unchanged.

The existing unit-config contract spec owns the configuration assertions. No workflow parser, log scraper, defect-ledger service, wildcard allowlist, or new ticket is part of this fix.

Acceptance Criteria

  • In CI, a test that fails once and passes on retry makes the unit run non-zero through failOnFlakyTests; the verdict is driven by Playwright's own flaky outcome, not inferred from the GitHub job verdict.
  • The built-in github reporter names and annotates the exact flaky test; the JSON reporter remains enabled for retained artifacts.
  • Known defects remain exact ticket-owned CI skips, so they report skipped; every executed retry-pass is newly flaky and blocks the run without a mutable allowlist.
  • Red control: the same deliberate fail-once probe is green when failOnFlakyTests is absent and red when it is enabled, with direct test attribution.
  • retries: 2 and CI workers: 4 remain unchanged.

Out of Scope

  • Changing retry or worker counts.
  • Repairing defects the gate finds; each defect remains its own existing-ticket lane.
  • Adding a custom parser, workflow step, A2A/defect-ledger transport, or persistent known-flake registry.

Contract Ledger

Boundary Contract
Input Playwright's per-test retry outcome under CI plus the existing exact NEO_TEST_SKIP_CI skip convention.
Output Non-zero unit-run status for any executed flaky test, a GitHub annotation naming it, and the existing JSON result artifact.
Authority Playwright's failOnFlakyTests, github, and json reporter primitives; playwright.config.unit.mjs remains the repository SSOT.
Failure states Stable pass stays green; retry-pass becomes red/annotated; ticket-owned skip stays skipped; stable failure remains red through the existing path.
Invariants CI-only gate, retries: 2, workers: 4, no wildcard muting, no second observer pipeline.

Evidence

L1 mechanism evidence: runs linked from #15861 reported flaky retry-pass outcomes for the real isolation defects #17186 and #17192. Playwright 1.61.1 source/config behavior supplies the native failing and attribution primitives.

Related: #15861 / PR #17183 · #17186 · #17192 · #17180 · #16929

Origin Session ID: 5cd926fa-77e1-4309-8bbf-ca563ab07403

Retrieval hint: query_raw_memories("workers 4 flip retires the flaky detector, green job with a 1 flaky line nobody reads") · original falsification anchor: run 31894997372.

tobiu referenced in commit 2bc6907 - "test(ci): fail unit runs on flaky outcomes (#17229) (#17750)" on Aug 25, 2026, 12:06 PM
tobiu closed this issue on Aug 25, 2026, 12:06 PM