|
| 1 | +# TDD Evidence: code-review-10 review scope modes |
| 2 | + |
| 3 | +## Failing |
| 4 | + |
| 5 | +### 2026-03-17 `tests/unit/specfact_code_review/run/test_commands.py` |
| 6 | + |
| 7 | +Command: |
| 8 | + |
| 9 | +```bash |
| 10 | +HATCH_DATA_DIR=/tmp/hatch-data \ |
| 11 | +HATCH_CACHE_DIR=/tmp/hatch-cache \ |
| 12 | +VIRTUALENV_OVERRIDE_APP_DATA=/tmp/virtualenv-appdata \ |
| 13 | +hatch run pytest tests/unit/specfact_code_review/run/test_commands.py -q |
| 14 | +``` |
| 15 | + |
| 16 | +Result: `5 failed, 14 passed` |
| 17 | + |
| 18 | +Key failures before implementation: |
| 19 | + |
| 20 | +- `test_run_command_supports_full_scope_and_path_filters` |
| 21 | + - exit code was `2` because `--scope` was not supported yet |
| 22 | +- `test_run_command_supports_changed_scope_with_repeatable_path_filters` |
| 23 | + - exit code was `2` because `--scope`/`--path` were not supported yet |
| 24 | +- `test_run_command_rejects_scope_mixed_with_positional_files` |
| 25 | + - CLI returned the generic option error instead of the governed mixed-targeting message |
| 26 | +- `test_run_command_rejects_path_mixed_with_positional_files` |
| 27 | + - CLI returned the generic option error instead of the governed mixed-targeting message |
| 28 | +- `test_run_command_fails_when_scope_and_paths_match_no_files` |
| 29 | + - CLI returned the generic option error instead of an actionable empty-scope failure |
| 30 | + |
| 31 | +## Passing |
| 32 | + |
| 33 | +### 2026-03-17 Focused scope-mode tests |
| 34 | + |
| 35 | +Commands: |
| 36 | + |
| 37 | +```bash |
| 38 | +HATCH_DATA_DIR=/tmp/hatch-data \ |
| 39 | +HATCH_CACHE_DIR=/tmp/hatch-cache \ |
| 40 | +VIRTUALENV_OVERRIDE_APP_DATA=/tmp/virtualenv-appdata \ |
| 41 | +hatch run pytest tests/unit/specfact_code_review/run/test_commands.py tests/unit/specfact_code_review/run/test_runner.py -q |
| 42 | + |
| 43 | +HATCH_DATA_DIR=/tmp/hatch-data \ |
| 44 | +HATCH_CACHE_DIR=/tmp/hatch-cache \ |
| 45 | +VIRTUALENV_OVERRIDE_APP_DATA=/tmp/virtualenv-appdata \ |
| 46 | +hatch run pytest tests/e2e/specfact_code_review/test_review_run_e2e.py -q |
| 47 | + |
| 48 | +HATCH_DATA_DIR=/tmp/hatch-data \ |
| 49 | +HATCH_CACHE_DIR=/tmp/hatch-cache \ |
| 50 | +VIRTUALENV_OVERRIDE_APP_DATA=/tmp/virtualenv-appdata \ |
| 51 | +hatch run validate-cli-contracts |
| 52 | +``` |
| 53 | + |
| 54 | +Results: |
| 55 | + |
| 56 | +- `tests/unit/specfact_code_review/run/test_commands.py` and `tests/unit/specfact_code_review/run/test_runner.py`: `36 passed` |
| 57 | +- `tests/e2e/specfact_code_review/test_review_run_e2e.py`: `2 passed` |
| 58 | +- CLI contract validation: `Validated 3 CLI contract scenario files.` |
| 59 | + |
| 60 | +### 2026-03-17 SpecFact dogfood review |
| 61 | + |
| 62 | +Command: |
| 63 | + |
| 64 | +```bash |
| 65 | +SPECFACT_ALLOW_UNSIGNED=1 \ |
| 66 | +HATCH_DATA_DIR=/tmp/hatch-data \ |
| 67 | +HATCH_CACHE_DIR=/tmp/hatch-cache \ |
| 68 | +VIRTUALENV_OVERRIDE_APP_DATA=/tmp/virtualenv-appdata \ |
| 69 | +hatch run specfact code review run \ |
| 70 | + --scope changed \ |
| 71 | + --path packages/specfact-code-review \ |
| 72 | + --path tests/unit/specfact_code_review \ |
| 73 | + --json \ |
| 74 | + --out /tmp/code-review-10-report.json |
| 75 | +``` |
| 76 | + |
| 77 | +Result: |
| 78 | + |
| 79 | +- verdict: `PASS` |
| 80 | +- score: `115` |
| 81 | +- findings: `0` |
| 82 | + |
| 83 | +### 2026-03-17 Worktree quality gates |
| 84 | + |
| 85 | +Commands completed successfully: |
| 86 | + |
| 87 | +```bash |
| 88 | +HATCH_DATA_DIR=/tmp/hatch-data HATCH_CACHE_DIR=/tmp/hatch-cache VIRTUALENV_OVERRIDE_APP_DATA=/tmp/virtualenv-appdata hatch run format |
| 89 | +HATCH_DATA_DIR=/tmp/hatch-data HATCH_CACHE_DIR=/tmp/hatch-cache VIRTUALENV_OVERRIDE_APP_DATA=/tmp/virtualenv-appdata hatch run type-check |
| 90 | +HATCH_DATA_DIR=/tmp/hatch-data HATCH_CACHE_DIR=/tmp/hatch-cache VIRTUALENV_OVERRIDE_APP_DATA=/tmp/virtualenv-appdata hatch run lint |
| 91 | +HATCH_DATA_DIR=/tmp/hatch-data HATCH_CACHE_DIR=/tmp/hatch-cache VIRTUALENV_OVERRIDE_APP_DATA=/tmp/virtualenv-appdata hatch run check-bundle-imports |
| 92 | +HATCH_DATA_DIR=/tmp/hatch-data HATCH_CACHE_DIR=/tmp/hatch-cache VIRTUALENV_OVERRIDE_APP_DATA=/tmp/virtualenv-appdata hatch run smart-test |
| 93 | +HATCH_DATA_DIR=/tmp/hatch-data HATCH_CACHE_DIR=/tmp/hatch-cache VIRTUALENV_OVERRIDE_APP_DATA=/tmp/virtualenv-appdata hatch run contract-test |
| 94 | +``` |
| 95 | + |
| 96 | +Results: |
| 97 | + |
| 98 | +- `type-check`: `0 errors, 0 warnings, 0 notes` |
| 99 | +- `lint`: `10.00/10` |
| 100 | +- `smart-test`: `383 passed` |
| 101 | +- `contract-test`: `384 passed` |
| 102 | + |
| 103 | +Pending: |
| 104 | + |
| 105 | +- `verify-modules-signature --require-signature --payload-from-filesystem --enforce-version-bump` |
| 106 | + - blocked until the final `packages/specfact-code-review/module-package.yaml` changes in this worktree are re-signed |
0 commit comments