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
Copy file name to clipboardExpand all lines: CLAUDE.md
+21-2Lines changed: 21 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,8 +4,9 @@
4
4
5
5
## Development workflow
6
6
7
-
Before running the e2e tests, ensure the test prerequisites from
8
-
HACKING.md are installed.
7
+
The e2e tests run inside this VM. If `uv` is not yet installed, install
8
+
it first (see Tooling policy below). Ensure the test prerequisites from
9
+
HACKING.md are also installed.
9
10
10
11
Always run the test suite before committing:
11
12
@@ -15,6 +16,24 @@ uv run pytest tests/test_e2e.py -v -s
15
16
16
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.
17
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
+
18
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.
19
38
20
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