Skip to content

fix(ci): switch tarpaulin to llvm engine to fix coverage flake#161

Merged
emal-avala merged 1 commit intomainfrom
fix/ci-tarpaulin-llvm-engine
Apr 22, 2026
Merged

fix(ci): switch tarpaulin to llvm engine to fix coverage flake#161
emal-avala merged 1 commit intomainfrom
fix/ci-tarpaulin-llvm-engine

Conversation

@emal-avala
Copy link
Copy Markdown
Member

Summary

Intermittent Coverage failures hit ~half of PRs with:

```
memory allocation of 93825031283952 bytes failed
test query::tests::cancel_before_first_event_interrupts_cleanly ...
ERROR cargo_tarpaulin: ECHILD: No child processes
```

Root cause: tarpaulin's default ptrace engine races with tokio's child-process reaper on cancellation tests. A ptrace-interrupted `wait()` returns a bogus value, which tokio interprets as an enormous allocation request.

Fix: pass `--engine llvm` to use source-based coverage via LLVM instrumentation. No ptrace, no race. Tests run on an unmodified binary, so behavior matches the non-coverage Test job.

Verification

  • Output format unchanged (cobertura XML) — Codecov upload works as-is
  • `--engine llvm` is stable in cargo-tarpaulin since 0.28
  • The flaky test itself is correct — it's the observer that was wrong

Evidence the flake exists

Test plan

Coverage intermittently fails with:
  memory allocation of 93825031283952 bytes failed
  test query::tests::cancel_before_first_event_interrupts_cleanly ...
  ERROR cargo_tarpaulin: ECHILD: No child processes

The default ptrace engine races with tokio's child-process reaper on
cancellation tests. The LLVM engine uses source-based coverage via
LLVM instrumentation — no ptrace, no child-reaping race. Tests run
against an unmodified binary, so behavior matches the non-coverage
Test job.

Same output format (cobertura XML), so the Codecov upload is unchanged.
@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@emal-avala emal-avala merged commit a217c94 into main Apr 22, 2026
13 of 14 checks passed
@emal-avala emal-avala deleted the fix/ci-tarpaulin-llvm-engine branch April 22, 2026 23:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant