Skill: Diagnose a Red Run
Capture the branch failure
- Record the exact command, commit SHA, exit code, and passed/failed/skipped
counts. Quote the first actionable failure; do not summarize it away.
- Classify the check: testkit spec, unit suite, typecheck, build, lint, or CI job.
Run a clean control
Never call a failure pre-existing from memory or from a modified checkout.
git fetch origin dev
git worktree add /tmp/openwork-dev-control --detach origin/dev
# In that clean worktree, prepare the same prerequisites and run the exact command.
git worktree remove /tmp/openwork-dev-control
- Keep tool versions, environment, services, flags, and secrets equivalent.
- Quote the control command,
origin/dev SHA, exit code, counts, and matching
failure text.
- Classify as pre-existing only when the clean control demonstrates the same
failure. Otherwise classify it as introduced, environment-specific, or
unresolved. A non-reproducing control is not proof of flakiness; repeat both
sides before using that label.
Classify by signature
- Unit/type/CI-only failure: inspect the first failing job and run its exact
command locally before broadening scope.
- Vision disagreement on identical pixels: claim wording or product ambiguity.
Make the product unambiguous or make the claim factual.
- Timeout with an On-screen dump: read it. It names the state; for example,
/session can expose a steer-back race.
- Auth
403 INVALID_ORIGIN: inspect Den trusted origins.
- Authorize URL points at the real provider: Den booted without mock env.
- Teardown
403 fresh_auth_required: the session aged; a freshSession retry
exists.
Environment forensics
- Kill by port, not process name.
tsx watch can orphan its Node child, which
keeps the port while /health lies.
EADDRINUSE in logs while health returns 200 means a zombie survived.
- Electron zombies can respawn from a root process; kill the process group.
- Leaked state pollutes organizations; delete leftover connectors between runs.
For a testkit failure, read the test run's last unvalidated artifacts before touching
code. Publish useful red test evidence with publish-evidence; it remains human audit,
not a passing verdict.
1---2name: diagnose-a-red-run3description: Test is red, typecheck failed, CI job failed, flaky, timed out, was this already broken. Use to classify any failing check before changing code or calling it pre-existing.4---5
6# Skill: Diagnose a Red Run
7
8## Capture the branch failure
9
10- Record the exact command, commit SHA, exit code, and passed/failed/skipped
11 counts. Quote the first actionable failure; do not summarize it away.
12- Classify the check: testkit spec, unit suite, typecheck, build, lint, or CI job.
13
14## Run a clean control
15
16Never call a failure pre-existing from memory or from a modified checkout.
17
18```bash
19git fetch origin dev
20git worktree add /tmp/openwork-dev-control --detach origin/dev
21# In that clean worktree, prepare the same prerequisites and run the exact command.
22git worktree remove /tmp/openwork-dev-control
23```
24
25- Keep tool versions, environment, services, flags, and secrets equivalent.
26- Quote the control command, `origin/dev` SHA, exit code, counts, and matching
27 failure text.
28- Classify as pre-existing only when the clean control demonstrates the same
29 failure. Otherwise classify it as introduced, environment-specific, or
30 unresolved. A non-reproducing control is not proof of flakiness; repeat both
31 sides before using that label.
32
33## Classify by signature
34
35- Unit/type/CI-only failure: inspect the first failing job and run its exact
36 command locally before broadening scope.
37- Vision disagreement on identical pixels: claim wording or product ambiguity.
38 Make the product unambiguous or make the claim factual.
39- Timeout with an On-screen dump: read it. It names the state; for example,
40 `/session` can expose a steer-back race.
41- Auth `403 INVALID_ORIGIN`: inspect Den trusted origins.
42- Authorize URL points at the real provider: Den booted without mock env.
43- Teardown `403 fresh_auth_required`: the session aged; a `freshSession` retry
44 exists.
45
46## Environment forensics
47
48- Kill by port, not process name. `tsx watch` can orphan its Node child, which
49 keeps the port while `/health` lies.
50- `EADDRINUSE` in logs while health returns 200 means a zombie survived.
51- Electron zombies can respawn from a root process; kill the process group.
52- Leaked state pollutes organizations; delete leftover connectors between runs.
53
54For a testkit failure, read the test run's last unvalidated artifacts before touching
55code. Publish useful red test evidence with `publish-evidence`; it remains human audit,
56not a passing verdict.