Repository navigation
fix(ci): omit AppImage in-mount phantom paths from coverage - #15057
Conversation
Design Review (Fable 5) — ✅ PASSDesign-level review of 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 |
GPT 5.6 Review — ✅ no blocking findingsGPT 5.6 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
Opus 5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
e0516d5 to
4ee3c5c
Compare
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
4ee3c5c to
d4d22c7
Compare
chenmingwei23
left a comment
There was a problem hiding this comment.
Bulk approve: readiness passed, board green, no outstanding changes requested.
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.pybuilds 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 xmlin 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
test/test_agent_home_isolation.pyor where it creates its fixtures.ignore_errors, which would also hide genuinely missing sources.What changed (motivation → approach → change)
Symptom:
coverage xmlaborts 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] omitand[coverage:report] omitinsetup.cfg(the report-time list is what the separate Combine process honours), and register it in_FIXTURE_ESCAPESintest/test_coverage_omit_contract.pyso 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 insetup.cfgbut not in_FIXTURE_ESCAPES,test_each_omit_pattern_resolves_to_exactly_one_filefails, so the escape registration is pinned.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.pypath, delete the mount, then runcoverage xml --rcfile=setup.cfg.setup.cfg: exit 1, "No source for code: '.../.mount_KiroXk3Qm9/usr/lib/kiro_crew/agent.py'".setup.cfg: exit 0, XML report written.Related Issues
Closes #11925
Pattern harvest
Not generalizable: the class is already handled by the
_FIXTURE_ESCAPEScontract; this adds the one missing escape for a fixture that fakes an AppImage mount.Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)