Skip to content

CRAP: command input, interaction and system output branches #3422

Description

@thymikee

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions