agentleFS
standardbeaglestandardbeagle/agnt/.claude/skills/flake-triage/SKILL.md

flake-triage

Skill22 starsChanged 11 months agoApache-2.0View on GitHub

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.

1 other project uses a version of this.

Adopted by

Most recently taken up by

  • Other versions1 project uses a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 1

    1. yschimke/compose-ai-tools★ 127same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository7 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Read .tman/<alias>.fail.log (e.g.

    line 12
  2. Distinctive:

    Verify a fix under the same induced load that reproduced it.

    line 30
  3. Distinctive:

    If not reproduced, only a defensive fix that mirrors a proven sibling pattern is allowed, labelled non-reproduced-defensive.

    line 46

≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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?

SignalClassNext step
Failed under parallel go test ./... onlyCross-package port/socket contentionRerun under -p 1. Green → harness artifact, not a product bug.
Fails at 0.00s: bootstrap failed, daemon already running, address already in useShared global resource (socket, port, lock file) falling through to a production defaultReproduce 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 deadlineData-loss race (e.g. fd closed before reader drained)Add a completion barrier, then lower the deadline.
Late result, ordering/count assertion offWall-clock premiseRewrite the assertion against recorded timestamps (testing-timing-assertion-flakes.md).
cmd/agnt red on a task that never touched itKnown strays: cmd/agnt/AGENTS.md written by a spawned binary, port 5173 contentionDelete the stray, retry once.
Real-Chrome step stallsInjection bug or renderer starvationStep 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.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.