runtime.fixtures.ts (packages/platform-android/src) sits outside any
__tests__ dir, so vitest's coverage.include picked it up as production
source and the changed-line gate scored its 20 unreachable construction
lines directly, failing at 39.39% against the 70% threshold.
Add '**/*.fixtures.ts' to coverage.exclude (repo-wide convention:
40+ fixture modules, all test support, never production). The file
disappears from lcov and scripts/coverage-changed/model.ts's existing
excluded-path fallback reports it non-gating instead, with no
duplicate classifier needed there.
Planted red (targeted run against the real diff/model, not committed):
BEFORE (file present in lcov, all added lines uncovered): totalLines=110
coveredLines=0 pct=0 passed=false. AFTER (file absent from lcov post-fix):
totalLines=0 excludedTotal=99 excludedReason=excluded-path passed=true.
Confirmed against a real `vitest run --coverage` + `check:coverage-changed`
pass: runtime.fixtures.ts absent from coverage/lcov.info, gate PASS,
99 lines reported under excluded/excluded-path.
Summary
Extracts duplicated test setup from two platform suites into sibling fixture modules with named exports (AGENTS.md; no barrels).
packages/platform-apple/src/core/__tests__/perf.fixtures.ts:mockHostCommandsroutesrunCmdthrough ordered handlers; bundle writers andpshandlers (macosBundleLookup,iosSimulatorAppContainer,hostPs,simulatorPs,simulatorPsUnavailable) replace the per-testmockImplementationladders.packages/platform-android/src/runtime.fixtures.ts:ANDROID_EMULATOR,androidRuntimeHost,androidNavigationHost,bindOrdinaryreplace the repeated host literals andbind({...})blocks.Every test keeps its title and its own assertions; nothing deleted, merged, or parametrized. The Maestro replay suite (400 duplicated lines) is left for a follow-up: this PR is at 937 gross diff lines against the 1,000 budget.
Validation
--min-tokens 80 --min-lines 8) duplicated lines:perf.test.ts418 → 18;runtime.test.ts226 → 0.perf.test.ts24 → 24 (88assert.);runtime.test.ts26 → 26 (98expect().perf.tsdrop host-ps fallback → REDsampleAppleMemoryPerf falls back to host ps when simulator ps is unavailableperf.tsskipcleanupLocalArtifacton nonzeroleaks→ REDcaptureAppleMemorySnapshot removes partial memgraph when leaks exits nonzeroruntime.tscacheprobe-failed→ REDa failed probe is not cached, so the next inspection asks againruntime.tsadmitunsupported→ REDrefuses both clipboard halves when the build reports no clipboard shellCoverage-gate fix, at head
9b1034bdadc412b7d72202cdbc4be9e0ac4bab3f(BLOCKED finding 1 — seechore(gates)commit):packages/platform-android/src/runtime.fixtures.tssat outside any__tests__dir, socoverage.includepicked it up as production source and the changed-line gate scored its 20 unreachable construction lines directly (39.39% < 70%). Added**/*.fixtures.tstovitest.config.ts'scoverage.exclude(repo-wide convention: 40+ fixture modules, all test support).model.ts(BEFORE/AFTER, not committed as a new test — the existing "includable source absent from lcov" model test already covers the generic mechanism): file present in lcov, all added lines uncovered →totalLines=110 coveredLines=0 pct=0 passed=false; file absent from lcov (post-fix) →totalLines=0 excludedTotal=99 excludedReason=excluded-path passed=true.vitest run --coverage+check:coverage-changed --base origin/main:runtime.fixtures.tsis absent fromcoverage/lcov.info, and the gate reportsPASSwith its 99 code-like lines under the non-gating excluded tally (excluded-path).oxlint vitest.config.ts --deny-warnings,pnpm check:coverage-changed:test(20/20 green) — both green.Full affected gate: green at full sha
9b1034bdadc412b7d72202cdbc4be9e0ac4bab3f(pnpm check:affected --run; gates run: format, lint, typecheck, layering, di-seams, fallow, mcp-metadata, build, package, integration-node, macos-coverage, vitest-related, integration-progress, replay-compat, daemon-wire-compat, affected-selector, gate-manifest, gate-manifest-model, depgraph, tmpdir-leaks, tmpdir-leaks-model, coverage-model, wire-compat-model, production-exports, bundle-owner-files, fixture-cache, fixture-fallback, command-docs, agent-guidance, xctest-selection, maestro-conformance, mutation-model; rest are GitHub-authoritative/parked and skipped locally by design)Tradeoffs / follow-ups
chore(gates)commit for that; thechore(gates)commit in this push is the unrelated coverage-exclude fix above.session-replay-runtime-maestro.test.ts.