$npx -y skills add remotion-dev/remotion --skill flakeTrack Remotion CI flakes in issue #8375, increment repeated signatures, discover failed PR checks when no PR is given, and rerun flaky GitHub Actions jobs.
| 1 | # Flake |
| 2 | |
| 3 | Use this skill when a Remotion CI check fails and looks flaky, or when asked to run `/flake`. |
| 4 | |
| 5 | Tracker issue: https://github.com/remotion-dev/remotion/issues/8375 |
| 6 | |
| 7 | ## Goal |
| 8 | |
| 9 | Record flaky CI failures in issue #8375 and get the affected suite running again. |
| 10 | |
| 11 | For every confirmed or likely flake: |
| 12 | |
| 13 | 1. Identify the PR, workflow run, job, failed step, and concise failure signature. |
| 14 | 2. Update issue #8375: |
| 15 | - If the signature already exists, increment its `Count`. |
| 16 | - If it is new, append a row with count `1`, workflow/job, first-seen date, and evidence URL. |
| 17 | 3. Rerun the flaky job or failed jobs. |
| 18 | |
| 19 | ## Find The Failure |
| 20 | |
| 21 | Prefer `gh` because the GitHub app may not expose all Actions logs or write permissions. |
| 22 | |
| 23 | If the user gave a PR: |
| 24 | |
| 25 | ```bash |
| 26 | gh pr view <pr-number> --repo remotion-dev/remotion --json number,title,headRefName,statusCheckRollup |
| 27 | gh pr checks <pr-number> --repo remotion-dev/remotion --watch=false |
| 28 | ``` |
| 29 | |
| 30 | If the user gave a workflow run or job URL: |
| 31 | |
| 32 | ```bash |
| 33 | gh run view <run-id> --repo remotion-dev/remotion --json databaseId,attempt,displayTitle,event,headBranch,headSha,status,conclusion,workflowName,createdAt,updatedAt,url,jobs |
| 34 | gh api repos/remotion-dev/remotion/actions/jobs/<job-id>/logs |
| 35 | ``` |
| 36 | |
| 37 | If there is no PR context, inspect recent open PRs and recent failed runs: |
| 38 | |
| 39 | ```bash |
| 40 | gh pr list --repo remotion-dev/remotion --state open --limit 30 --json number,title,headRefName,statusCheckRollup |
| 41 | gh run list --repo remotion-dev/remotion --workflow "Install and Test" --status failure --limit 20 --json databaseId,displayTitle,event,headBranch,headSha,conclusion,createdAt,url,workflowName |
| 42 | ``` |
| 43 | |
| 44 | For rerun attempts, inspect the original attempt before deciding whether a failure was flaky: |
| 45 | |
| 46 | ```bash |
| 47 | gh api repos/remotion-dev/remotion/actions/runs/<run-id>/attempts/1/jobs --paginate |
| 48 | gh api repos/remotion-dev/remotion/actions/jobs/<failed-job-id>/logs |
| 49 | ``` |
| 50 | |
| 51 | ## Classify A Flake |
| 52 | |
| 53 | Treat a failure as a flake when at least one is true: |
| 54 | |
| 55 | - The same run, job, or failed step succeeded after a rerun without code changes. |
| 56 | - The failure is infrastructure/network related, such as `fetch failed`, connection resets, package manager download failures, cache service failures, or runner provisioning errors. |
| 57 | - The test failure is a timeout, race, browser disconnect, port collision, or intermittent external service failure, and the PR changes do not plausibly touch that area. |
| 58 | |
| 59 | Do not record deterministic type errors, lint errors, snapshots, or test assertions caused by changed source behavior unless there is evidence they pass on retry. |
| 60 | |
| 61 | ## Signature Rules |
| 62 | |
| 63 | Use a stable signature that groups repeats but stays specific enough to act on: |
| 64 | |
| 65 | - Include package or suite when available, for example `@remotion/it-tests#testssr`. |
| 66 | - Include test name when available. |
| 67 | - Include the root error text, stripped of timestamps, paths, random IDs, ports, line numbers, and ANSI codes. |
| 68 | - Include workflow/job separately in the tracker row, not inside the signature unless needed to disambiguate. |
| 69 | |
| 70 | Good examples: |
| 71 | |
| 72 | - `` `oven-sh/setup-bun@v2.1.2` failed with `TypeError: fetch failed` `` |
| 73 | - `` `delayRender()` timeout while running `Render video with browser instance not open` in `@remotion/it-tests#testssr` `` |
| 74 | |
| 75 | ## Update The Tracker |
| 76 | |
| 77 | Read the issue body: |
| 78 | |
| 79 | ```bash |
| 80 | gh issue view 8375 --repo remotion-dev/remotion --json body --jq .body |
| 81 | ``` |
| 82 | |
| 83 | Edit the full issue body, preserving the table. Always write the replacement Markdown to a temporary file and use `--body-file`; do not pass multiline Markdown inline. |
| 84 | |
| 85 | Table format: |
| 86 | |
| 87 | ```md |
| 88 | | Count | Signature | Workflow / job | First seen | Evidence | |
| 89 | | ---: | --- | --- | --- | --- | |
| 90 | | 1 | `signature` | `Workflow` / `Job` | YYYY-MM-DD | https://github.com/remotion-dev/remotion/actions/runs/... | |
| 91 | ``` |
| 92 | |
| 93 | When incrementing an existing row: |
| 94 | |
| 95 | - Change only `Count` unless the evidence link is dead or less useful than the new one. |
| 96 | - Keep `First seen` as the earliest known date. |
| 97 | |
| 98 | When appending a row: |
| 99 | |
| 100 | - Use the GitHub Actions job URL when possible. |
| 101 | - Use the current date from the log timestamp, not the local machine date, if they differ. |
| 102 | |
| 103 | Verify after editing: |
| 104 | |
| 105 | ```bash |
| 106 | gh issue view 8375 --repo remotion-dev/remotion --json body --jq .body |
| 107 | ``` |
| 108 | |
| 109 | ## Rerun |
| 110 | |
| 111 | Prefer rerunning only failed jobs: |
| 112 | |
| 113 | ```bash |
| 114 | gh run rerun <run-id> --repo remotion-dev/remotion --failed |
| 115 | ``` |
| 116 | |
| 117 | If only one known flaky job needs a rerun and the run is complete: |
| 118 | |
| 119 | ```bash |
| 120 | gh api --method POST repos/remotion-dev/remotion/actions/jobs/<job-id>/rerun |
| 121 | ``` |
| 122 | |
| 123 | If a flaky suite is still in progress and waiting would block the task, abort that workflow run and rerun failed jobs after cancellation is visible: |
| 124 | |
| 125 | ```bash |
| 126 | gh run cancel <run-id> --repo remotion-dev/remotion |
| 127 | gh run watch <run-id> --repo remotion-dev/remotion --exit-status |
| 128 | gh run rerun <run-id> --repo remotion-dev/remotion --failed |
| 129 | ``` |
| 130 | |
| 131 | If `gh |