Skip to content
Skills Library
Programming · Testing

flake-triage

/flake-triage

Diagnose a failing, flaky, or timing-out Go/chromedp test before changing it. Use when: test flake, intermittent failure, timeout, passes alone fails in suite.

Repository
agnt ↗
Licence
Apache-2.0
Last repository change
23.10.2026

Assessment and security

90/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content25 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 23.10.2026, without references to retired models or APIs.

Licence

Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.

What it does and when to use it

Diagnose a failing, flaky, or timing-out Go/chromedp test before changing it. Use when: test flake, intermittent failure, timeout, passes alone fails in suite.

Original author description

Diagnose a failing, flaky, or timing-out Go/chromedp test before changing it. Use when: test flake, intermittent failure, timeout, passes alone fails in suite.

How it works

  1. 0. Read what already ran
  2. 1. Where did it fail?
  3. 2. Reproduce the real trigger
  4. 3. Real-Chrome stalls: fixable or starvation?
  5. 4. Before calling it fixed
Original SKILL.md headings · 44 lines, 493 words
SKILL.md preview
---
name: flake-triage
description: "Diagnose a failing, flaky, or timing-out Go/chromedp test before changing it. Use when: test flake, intermittent failure, timeout, passes alone fails in suite."
---

# Flake triage

Classify the failure before touching code or deadlines. Most "flakes" in this repo are harness artifacts or data-loss races, not scheduler load.

## 0. Read what already ran

Read `.tman/<alias>.fail.log` (e.g. `.tman/test.fail.log`) at the repo root. Do not rerun the whole suite to find the failure.

## 1. Where did it fail?

| Signal | Class | Next step |
|---|---|---|
| Failed under parallel `go test ./...` only | Cross-package port/socket contention | Rerun under `-p 1`. Green → harness artifact, not a product bug. |
| Fails at 0.00s: `bootstrap failed`, `daemon already running`, `address already in use` | Shared global resource (socket, port, lock file) falling through to a production default | Reproduce with **two concurrent test binaries**. `-p 1` and isolation both hide it. Fix the helper's hermetic default; never widen a deadline. |
| Empty or missing result for the full deadline | Data-loss race (e.g. fd closed before reader drained) | Add a completion barrier, then lower the deadline. |
| Late result, ordering/count assertion off | Wall-clock premise | Rewrite the assertion against recorded timestamps (`testing-timing-assertion-flakes.md`). |
| `cmd/agnt` red on a task that never touched it | Known strays: `cmd/agnt/AGENTS.md` written by a spawned binary, port 5173 contention | Delete the stray, retry once. |
| Real-Chrome step stalls | Injection bug or renderer starvation | Step 3. |

## 2. Reproduce the real trigger

- Isolate and intensify the *suspected* test: tight loop (`-count=N -run '^Name$'`) plus induced CPU load (`stress`).
- A flake that needs sibling test binaries never reproduces in isolation. Test the condition that actually differs.
- Validate one `go test` at a time; concurrent runs pollute each other.
- Verify a fix under the same induced load that reproduced it. One clean run proves nothing.
- Spawned-binary tests that only misbehave with a controlling terminal: run under `script -qec '<go test …>' /dev/null`. A TTY-less run can skip and give a false clean.

## 3. Real-Chrome stalls: fixable or starvation?

Attach to the target and log browser-process CDP events (`Target.TargetInfoChanged`), which do not depend on page JS.

- Navigation commits late or the relay attaches late → injection/lifecycle ordering bug. Fix it.
- Navigation commits in under 1s but the renderer does not run inline script for seconds, and a second trace under the same load stalls at a different stage → CPU starvation.
- Doubling the budget: a real ordering bug converges to ~0% failures; starvation does not.

Starvation outcome: record it in `docs/testing-flake-registry.md` with the CDP evidence, keep the test `chromee2e`-tagged, never weaken assertions, never cherry-pick a clean run.

## 4. Before calling it fixed

- Mutation-check: revert the fix, confirm the test fails on the behavioural assertion.
- If not reproduced, only a defensive fix that mirrors a proven sibling pattern is allowed, labelled non-reproduced-defensive.
- A `-race`-only hook failure on a GREEN commit may bypass the hook only under Case B in `testing-parallel-package-flakes.md`.

Versions

The database has no other skills named flake-triage.

Database snapshot: 13.11.2026 · package version 5c47daef8bdd (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100triage-ci-flake
    Use when CI tests fail on main branch after PR merge, when investigating flaky test failures, or when user provides a PR URL/number to aggregate all failing tests
  • 100qa-investigation
    Investigate a specific test failure to its root cause and document the why. Detects whether a failing test is flaky (intermittent) or a deterministic bug during reproduction. Use when a test fails and you need the real cause, not just to make it green. Execution layer, not…
  • 100check-upstream-flake
    Check if a failing test is a known upstream flake in Chromium's LUCI Analysis database. Provides flakiness statistics, verdict, and recommendation for filter file decisions. Triggers on: check upstream flake, is this test flaky upstream, check luci flakiness, upstream flake check.
  • 100flaky-test-hunting
    Confirm and pin down a flaky test before fixing it — rerun hammers, seed hunts, order bisection, isolation analysis. Use whenever a test "sometimes fails", CI is green-then-red on the same commit, a nightly fails but the same tests pass on a PR, the user says "flaky",…
  • 100flaky-test-diagnoser
    Systematically diagnoses why a test is flaky by running multi-run experiments, isolation tests, ordering permutations, and timing analysis. Use when the user says a test is flaky, intermittent, non-deterministic, randomly failing, passes sometimes, or asks to debug test flakiness.
  • 100flaky-test-fix
    Investigate and fix a flaky test reported by a CI failure URL (e.g. a GitHub Actions job link) or a known-flaky test name. Use whenever someone hands over a flaky/intermittent test and wants it fixed — not skipped or retried. Triggers on "this test is flaky: <URL>",…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.