Skip to content

fix(ci): omit AppImage in-mount phantom paths from coverage - #15057

Merged
chenmingwei23 merged 1 commit into
mainfrom
fix/coverage-omit-appimage-mount-11925
Sep 30, 2026
Merged

chenmingwei23 merged 1 commit into
mainfrom
fix/coverage-omit-appimage-mount-11925

Conversation

@iamwhatever

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: Coverage Combine stops failing when a test shard recorded a fake AppImage mount path that is gone by report time.

test/test_agent_home_isolation.py builds an AppImage layout under the system TMPDIR (kc-appimage-*/.mount_KiroXk3Qm9/usr/lib/kiro_crew/agent.py), outside pytest's tmp root. When a shard records that path, coverage xml in Coverage Combine exits 1 with "No source for code", and Coverage Gate fails closed. Seen on CI run 35409494426 (PR #11556).

Why it matters

Any PR can hit an intermittent red Coverage Gate that has nothing to do with its diff, which costs a rerun and a diagnosis each time.

Not a goal

  • Changing test/test_agent_home_isolation.py or where it creates its fixtures.
  • Turning on ignore_errors, which would also hide genuinely missing sources.

What changed (motivation → approach → change)

Symptom: coverage xml aborts on a phantom .mount_* source path. Cause: the repo omits fixture escapes by glob (*/pytest-of-*/*, */kirocrew-wt-example/*), but nothing covers the AppImage mount layout. Change: add */.mount_*/* to both [coverage:run] omit and [coverage:report] omit in setup.cfg (the report-time list is what the separate Combine process honours), and register it in _FIXTURE_ESCAPES in test/test_coverage_omit_contract.py so the contract test accepts a glob that matches no repo file. .mount_* is the AppImage runtime's own mount name, so it covers both fixture sites and any later mount-simulating fixture; no real source lives under it on a runner.

Backwards compatibility

Compatible: this only omits more paths from coverage; nothing in the runner checkout sits under a .mount_* directory, so no measured file is dropped.

Tests

  • test/test_coverage_omit_contract.py: all 9 tests pass. With the glob in setup.cfg but not in _FIXTURE_ESCAPES, test_each_omit_pattern_resolves_to_exactly_one_file fails, so the escape registration is pinned.
  • Scoped backend run (scripts/run_scoped_tests.py --surface backend, 67 related files): 5965 passed, 41 skipped.

Manual verification

Repro script: write a coverage data file holding a real file plus a .mount_KiroXk3Qm9/usr/lib/kiro_crew/agent.py path, delete the mount, then run coverage xml --rcfile=setup.cfg.

  • main's setup.cfg: exit 1, "No source for code: '.../.mount_KiroXk3Qm9/usr/lib/kiro_crew/agent.py'".
  • this branch's setup.cfg: exit 0, XML report written.

Related Issues

Closes #11925

Pattern harvest

Not generalizable: the class is already handled by the _FIXTURE_ESCAPES contract; this adds the one missing escape for a fixture that fakes an AppImage mount.

Checklist

  • At most two commits (one is the norm), with a Conventional Commits title (feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable)
  • No secrets, credentials, or internal references in the diff

@iamwhatever
iamwhatever requested a review from a team as a code owner September 29, 2026 17:12
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Sep 29, 2026
@github-actions

github-actions Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Fable 5) — ✅ PASS

Design-level review of d4d22c78b2eb5bb161a0b3eb031e1081461c8632 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

Design-Verdict: PASS

Nothing to check.

[DESIGN-REVIEWED] d4d22c7

Description read

[DESCRIPTION-READ] b99c7ce5e0d6c9541643163836ea6eb573ab111f8ecdf0c851874bb333e30971

That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

GPT 5.6 Review — ✅ no blocking findings

GPT 5.6 completed its review of d4d22c78b2eb5bb161a0b3eb031e1081461c8632 and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] d4d22c7

False positive or not applicable? A repository writer can comment:
/ai-review override gpt d4d22c78b2eb5bb161a0b3eb031e1081461c8632: <one-sentence reason>

@github-actions

github-actions Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5 Review — ✅ no blocking findings

Reviewed d4d22c78b2eb5bb161a0b3eb031e1081461c8632 — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] d4d22c7

Verdict parsed from the review's SHA-scoped output markers for commit d4d22c78b2eb5bb161a0b3eb031e1081461c8632.

False positive or not applicable? A repository writer can comment:
/ai-review override fable d4d22c78b2eb5bb161a0b3eb031e1081461c8632: <one-sentence reason>

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Sep 29, 2026
@iamwhatever
iamwhatever force-pushed the fix/coverage-omit-appimage-mount-11925 branch from e0516d5 to 4ee3c5c Compare September 29, 2026 20:55
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Sep 29, 2026
test_agent_home_isolation.py fabricates an AppImage layout under the
system TMPDIR, outside pytest's tmp root, so a recorded
.mount_*/usr/lib/kiro_crew/agent.py path escapes the pytest-of-* omit.
After the mount is gone, coverage xml in Coverage Combine fails with
"No source for code" and Coverage Gate fails closed.

Add */.mount_*/* to both [coverage:run] and [coverage:report] omit and
register it as a fixture escape in the omit contract test.

Closes #11925
@iamwhatever
iamwhatever force-pushed the fix/coverage-omit-appimage-mount-11925 branch from 4ee3c5c to d4d22c7 Compare September 29, 2026 22:34
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: passed Eligible automated validation passed for the current revision and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Sep 29, 2026

@chenmingwei23 chenmingwei23 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bulk approve: readiness passed, board green, no outstanding changes requested.

@chenmingwei23
chenmingwei23 merged commit e2a2b64 into main Sep 30, 2026
99 checks passed
@chenmingwei23
chenmingwei23 deleted the fix/coverage-omit-appimage-mount-11925 branch September 30, 2026 03:45
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Sep 30, 2026
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.

Coverage Combine fails when the combined data holds an AppImage in-mount source path that no longer exists

2 participants