Skip to content

CI: run coverage on Linux arm64 and enforce 90% - #3

Merged
jvmvik merged 1 commit into
masterfrom
ci-coverage
Nov 5, 2026
Merged

jvmvik merged 1 commit into
masterfrom
ci-coverage

Conversation

@jvmvik

@jvmvik jvmvik commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

🤖 AI-generated: Claude Opus 5.5 (claude-opus-5-5) · effort unknown · main session · moved the kcov coverage job off macOS, checked it in a local Debian trixie arm64 container, then ran it in CI (run 42017357776)

Why

The coverage job never finished on macos-latest. kcov hung the unit-test binary under ptrace until the 15-minute step cap cancelled it. That happened on every recent run, for example 41716931111, 36064642753, 36007132940 and 35994813631. The job was marked continue-on-error, so the red X never blocked anything. The same zig build cov finishes in 4–8 s on a local Mac, so the hang only shows up on GitHub's macOS runner.

What changed

  • Runner: coverage now runs on ubuntu-24.04-arm inside a debian:trixie container. Debian trixie packages kcov 43; Ubuntu 24.04 has no kcov package.
  • Container options: --security-opt seccomp=unconfined. kcov disables ASLR with personality(2), and Docker's default seccomp profile rejects that call, so kcov exited with code 255 on 5 out of 5 local tries.
  • No longer advisory: the job fails below 90% line coverage (REVIEW Q6) and fails when kcov reports no instrumented files. The HTML report is uploaded even when the check fails.
  • README: the coverage figure was stale (90.4% → 92.95% without a key), and the section now explains how CI measures coverage.
  • CHANGELOG: added an Unreleased entry.

Evidence

What I tried locally:

Setup Result Runs
macOS (local) works, 92.95% 5/5
Linux arm64, Debian trixie, seccomp unconfined works, 92.95% 6/6
Linux arm64, default seccomp kcov exits with code 255 0/5
Linux amd64 (emulated) 0% inconclusive
Ubuntu 24.04 no kcov package n/a

CI on this branch (run 42017357776, started with workflow_dispatch): all jobs passed.

Job Result Details
coverage passed 58 s. Coverage 97.50% with the key: client.zig 427/438, root.zig 2/2
test (ubuntu-latest) passed
test (macos-latest) passed

Review notes

  • Blocking now: the coverage job can fail the workflow. That happens below 90%, or when a live integration test fails inside the job.
  • Not verified: the old note that x86_64 Linux reports 0%. I couldn't test it on native hardware.

✍️ Human context (fill in before posting or sharing): where this stands, what you tested by hand, what your gut says.

🤖 Generated with Claude Code

AI: Claude Opus 5.5 · effort unknown · main session: moved the kcov job off macOS, verified in a local Debian trixie arm64 container

The macOS coverage job timed out on every run: kcov hung the unit-test
binary under ptrace until the 15-minute step cap fired. Run it instead on
ubuntu-24.04-arm in a debian:trixie container, which packages kcov 43
(Ubuntu 24.04 has none). kcov disables ASLR via personality(2), which
Docker's default seccomp profile rejects, so the container runs with
seccomp=unconfined.

The job is no longer advisory and fails below 90% line coverage or when
kcov reports no instrumented files. README coverage figure refreshed
(94.01% without a key).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jvmvik
jvmvik merged commit 72b66d7 into master Nov 5, 2026
3 checks passed
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