test(coverage): rename-only hunks owe no changed-line coverage - #2248
Conversation
Size Report
npm unpacked components
Startup median (7 runs, lower is better):
Top changed chunks: no changes in the largest emitted chunks. Top changed packed filesNo changed packed files. |
|
BLOCKED at Owner-action CI failure: Lint & Format is red because No code finding beyond the required formatting fix: the owning route correctly forces Do not apply |
Pass --find-renames=90% to the changed-line diff so rename detection no longer depends on the host diff.renames setting: a 100%-similarity move contributes no changed lines and an edited move contributes only the hunks that differ from its source. Threshold unchanged.
Drops the stale src/daemon/handlers/session.ts over-budget bullet (242 lines on main) to stay under the AGENTS.md byte budget.
34bc30a to
4526f80
Compare
|
Lint & Format: ran |
|
BLOCKED at The prior formatting failure is resolved and the rename-coverage implementation/tests are correct. Required iOS Smoke is now red due to unrelated fixture accessibility-capture truncation ( |
|
BLOCKED at |
|
Restored the over-budget rule for |
|
Code review is clean, but this head is BLOCKED by iOS Smoke. The rename-only coverage logic and regressions are sound, including explicit 90% rename detection and the repository-level |
|
Summary
The changed-line coverage gate joins lcov with
git diff --unified=0 base...HEAD. Rename detection depended on the host'sdiff.renames: with it off, a pure move became delete + add and owed coverage on every moved line.run.tspasses--find-renames=90%: a 100%-similarity move owes nothing; an edited move owes only the hunks that differ from its source; below 90% it is an add. Threshold unchanged (70).model.test.ts: fixture diff with a 100% rename, a 90% rename with 3 edited lines, and an ordinary modified file, asserted throughparseUnifiedDiff+computeChangedCoverage.run.test.ts:git mvunderdiff.renames=falsereports0/0 (n/a)PASS.session.tsover-budget rule is restored per review; three redundant sentences are compressed to hold the byte budget (9,994/10,000).Validation
pnpm check:coverage-changed:test22/22;pnpm check:agent-guidance4/4;pnpm check:quickgreen.run.ts):a pure move owes nothing regardless of the host diff.renames settingFAILS.rename-only hunks owe no changed-line coverageFAILS,actual: 35, expected: 5.pnpm check:agent-guidance4/4 andpnpm check:affected --runpass at cc6c521.pnpm check:affected --run); 32 gates ran: 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(+model), depgraph, tmpdir-leaks(+model), coverage-model, wire-compat-model, production-exports, bundle-owner-files, fixture-cache(+fallback), command-docs, agent-guidance, xctest-selection, maestro-conformance, mutation-model.Tradeoffs / follow-ups
chore(gates)commit.