You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Document CI failure reproduction workflow in CLAUDE.md
Add a section explaining how to reproduce CI failures locally
by forcing TCG mode with QEMU_ACCEL=tcg, and the expected
reproduce → fix → verify → full suite workflow.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: CLAUDE.md
+18Lines changed: 18 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,6 +16,24 @@ uv run pytest tests/test_e2e.py -v -s
16
16
17
17
The test boots the VM end-to-end (takes ~90s without KVM) and verifies `curl https://pypi.org` works through mitmproxy. Do not commit if this fails.
18
18
19
+
### Fixing CI failures
20
+
21
+
When a test fails in CI but passes locally, **reproduce the failure locally
22
+
before applying a fix.** This VM has KVM, but CI may not — one known
23
+
divergence is the QEMU CPU model (`-cpu host` with KVM vs `-cpu max` with
24
+
TCG). To match CI's TCG environment:
25
+
26
+
```bash
27
+
QEMU_ACCEL=tcg uv run pytest tests/test_e2e.py::test_that_failed -v -s
28
+
```
29
+
30
+
The workflow is:
31
+
32
+
1.**Reproduce** — run the failing test under CI-like conditions and confirm it fails.
33
+
2.**Fix** — apply the change.
34
+
3.**Verify** — re-run under the same conditions and confirm it passes.
35
+
4.**Full suite** — run the complete test suite to check for regressions.
36
+
19
37
The full suite including the network isolation tests can take 5+ minutes under TCG emulation. TCG is slower than KVM but not *that* slow — if cloud-init status is unchanged for more than a minute, check the console log and process list rather than assuming it's just slow. A dead QEMU process or OOM kill is more likely than TCG being the bottleneck.
20
38
21
39
Launch the test with `Bash` using `run_in_background: true`, then immediately attach a `Monitor` to tail the output file with a progress filter. This keeps the conversation unblocked while streaming results:
0 commit comments