# W1e — cc-watch Step 3 integration test (#1696)

Regression guard against today's M134 root-cause bug: empty `features[]` producing zero issues silently.

## Refactor

Step 3 of `claude-release-watch.yml` was 78 lines of inline shell with 0 test coverage. Extracted to `scripts/cc-file-adoption-issues.sh` (callable independently) and tested with mocked `gh` CLI calls.

## Cases covered

# | Input | Expected creates | Why
--- | --- | --- | ---
1 | Empty gaps array | 0 | No-op workflow
2 | `features: []` (today's bug) | 0 | REGRESSION GUARD
3 | `gap_score: 5` | 0 | Below threshold
4 | `gap_score: 10` | 1 | Happy path
5 | Existing key in dedup | 0 | No duplicates
6 | Mixed scores | only ≥10 | Filter precision
7 | Two versions w/ features | 2 (per-version) | Multi-version
8 | `below_floor: true` (W1h) | 0 | Floor skip works
9 | Missing `GH_REPO` | non-zero exit | Loud failure
10 | Missing args.json | 0 (graceful) | Soft skip

## Test results

      Results: 16 passed, 0 failed
    SUCCESS

## Mock infrastructure

    tests/integration/_mock-gh/gh
      └── issue list  → returns []  by default
      └── issue create → logs to MOCK_LOG, returns mocked URL
      MOCK_EXISTING_KEYS env → simulates dedup hits