Purpose
Burn down part of the coverage-based CRAP list from #3414.
Findings (main 5f84627d8)
| Function |
CRAP |
CC |
Coverage |
src/commands/cli-grammar/common.ts:227 readJsonObject |
30 |
5 |
0% |
src/commands/interaction/index.ts:619 run |
35 |
8 |
25% |
src/commands/interaction/runtime/settle.ts:249 sessionBaseline |
30 |
5 |
0% |
src/commands/system/output.ts:67 formatAppleAppState |
42 |
6 |
0% |
src/commands/system/runtime/system.ts:448 normalizeAlertWaitResult |
30 |
5 |
0% |
Owned files
src/commands/cli-grammar/common.ts
src/commands/interaction/index.ts
src/commands/interaction/runtime/settle.ts
src/commands/system/output.ts
src/commands/system/runtime/system.ts
Notes
settle.ts and system.ts were recently moved by the daemon-extraction work (#3394), so start from current main.
Completion
- Every function above is absent from
pnpm check:coverage-crap --all on the PR head (score < 30), or is exempted where this issue says so.
- Tests go through the owning module's public entry point. No new production exports for tests and no test-only DI (
docs/agents/testing.md).
- Only the owned files, the tests that exercise them, and
*.fixtures.ts helpers change. The PR stays under the 1,000-line gross budget, and pnpm check:affected --run passes on the pushed head.
Part of #3414.
Purpose
Burn down part of the coverage-based CRAP list from #3414.
Findings (main
5f84627d8)src/commands/cli-grammar/common.ts:227readJsonObjectsrc/commands/interaction/index.ts:619runsrc/commands/interaction/runtime/settle.ts:249sessionBaselinesrc/commands/system/output.ts:67formatAppleAppStatesrc/commands/system/runtime/system.ts:448normalizeAlertWaitResultOwned files
src/commands/cli-grammar/common.tssrc/commands/interaction/index.tssrc/commands/interaction/runtime/settle.tssrc/commands/system/output.tssrc/commands/system/runtime/system.tsNotes
settle.tsandsystem.tswere recently moved by the daemon-extraction work (#3394), so start from currentmain.Completion
pnpm check:coverage-crap --allon the PR head (score < 30), or is exempted where this issue says so.docs/agents/testing.md).*.fixtures.tshelpers change. The PR stays under the 1,000-line gross budget, andpnpm check:affected --runpasses on the pushed head.Part of #3414.