fix-flaky-tests
Diagnostic tool for fixing Go test failures (flakes, races, timeouts, deadlocks) during local dev or CI.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Diagnostic tool for fixing Go test failures (flakes, races, timeouts, deadlocks) during local dev or CI.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Properly size CI runners for price, performance, and stability.
Configure and run local CRE environments and CRE end-to-end tests in the chainlink repo. Use this when starting local CRE on the default topology, running smoke or regression CRE tests, or creating a custom topology to override flags, limits, capability config, or user config overrides.
基于 SOC 职业分类
| name | fix-flaky-tests |
| description | Diagnostic tool for fixing Go test failures (flakes, races, timeouts, deadlocks) during local dev or CI. |
<absolute_constraints>
make test instead).core/, deployment/. Warn the user if running outside these.go.mod before writing any new utility code. Three lines of existing library usage beats 30 lines of hand-rolled logic that has to be maintained and tested.go test commands. Only use make test ARGS="diagnose ..." from the repository root. Use --iterations 1 for a single run.diagnose runs expected >2m: Execute in background. Perform a single 30s crash check, then suspend task and wait for the report.json system notification. DO NOT poll.LSP for code navigation, if available. Check if it works using a go file from the project. If it is not available try code-review-graph. Only if that is also unavailable use find, grep, etc.<jira_reference> Read jira.md to understand how to claim tickets, find eligible flaky-test tickets, check if there are any tickets related to a specific test, read and add comments and transition JIRA issues.
After a FIXED outcome, the ticket must stay assigned to the investigator (accountId from atlassianUserInfo) when moved to In Review. Do not unassign on FIXED — see transition-ticket.md assignee policy.
</jira_reference>
<cli_reference>
Execute from repository root.
make test ARGS="diagnose [harness_flags] -- [go_test_flags] ./path"
--ai-output before --.-count.--iterations N, --fail-fast-on=(timeout|slow), --parallel-iterations N.--run '^TestName$', --timeout 10m, --race.make test ARGS="diagnose -h".--iterations.| Profile | --iterations | --parallel-iterations | Use when |
|---|---|---|---|
| Quick | 1-5 | 1-5 | Quick check to validate no failures |
| Standard | 30 | 1–5 | Default standard check |
| Deep | 150-500 | 2–10 | Default to validate that a flake exists before fix, or no longer exists after fix |
| Race pass | 30 | 1 | Verifying with --race after --. |
| Debug | 1–5 | 1 | Reproducing a known failure mode; use --fail-fast if appropriate. |
IF at any time the user interrupts or interjects during this loop, pick it up again where you left off, unless explicitly told otherwise.
Chainlink nodes are blockchain oracles. Read /README.md. Tests share single postgres DB. Diagnose loop creates new DB. Output hypothesis first. Show diffs. Do not abstract fixes.Approaches:
go test profiles (-race, -cpuprofile, -trace).
<context_compaction>
Reference diagnose-attempted-fixes-[test/package]-[flake/broken/timeout/slow].jsonl when summarizing.
</context_compaction>
<possible_execution_issues>
operation not permitted sandbox error. STOP. Require user execution outside sandbox.
</possible_execution_issues><logs_structure>
[resultsDir]/
|-- iteration-n.log.jsonl # Read only if needed. Full outputs.
|-- postgres-state-n.md # Read for DB error/hang. Final state.
|-- report.json # Read for summary. Extract args via jq .run.
|-- report.csv # DO NOT READ.
|-- logs/
|---- pkg_TestName_iter-n.log # Read for specific test failures.
</logs_structure>
<sub_agent_protocol>
LogAnalyzer when reading logs/ or iteration-n.log.jsonl. Read ./references/log-analyzer-subagent.md.GithubFailureAnalyzer when inspecting CI failure. Read ./references/github-failure-analyzer.md.JiraManager when interacting with JIRA. Read ./references/jira-mananger-subagent.md.
</sub_agent_protocol>