Early gate placement: where does test-lint run relative to red-assert? #311

Closed
opened 2026-08-07 12:55:11 +00:00 by jared · 1 comment
Owner

Question

The new test-lint step runs after test-writer and before the programmer — but where exactly relative to red-assert and disclosure rows? Sub-questions: does rubocop autocorrect run on the test files at this gate (cheap, deterministic) before dispatching test-lint-fixer? Is the gate conditional (skipped entirely when rubocop is clean)? And after test-lint-fixer edits tests, must red-assert run (or re-run) to re-verify the tests still fail for the right reason?

Map: #310

## Question The new test-lint step runs after test-writer and before the programmer — but where exactly relative to red-assert and disclosure rows? Sub-questions: does rubocop autocorrect run on the test files at this gate (cheap, deterministic) before dispatching test-lint-fixer? Is the gate conditional (skipped entirely when rubocop is clean)? And after test-lint-fixer edits tests, must red-assert run (or re-run) to re-verify the tests still fail for the right reason? Map: #310
jared self-assigned this 2026-08-07 12:59:01 +00:00
Author
Owner

Resolution (2026-08-07)

Gate order — red-assert brackets the gate. Pipeline becomes: write-failing-tests → disclose-test-writer → red-assert → [early test-lint gate] → conditional red-assert re-run → shard-plan. The first red-assert proves test-writer's output fails for the right reasons; the re-run (only when test-lint-fixer actually edited) proves the fixer preserved that. Unambiguous attribution between test-writer bugs and fixer-introduced breakage; extra test run only on the dirty path. Mirrors green-assert's re-verify-after-lint-fix pattern.

Gate scope — only files test-writer touched this run. Pre-existing offenses in untouched test files (like the 1 in #261) are left to the late gate (#313). Keeps the gate fast and blame-local.

Autocorrect — yes, safe autocorrect (rubocop -a) runs first, scoped to the same files, before any fixer dispatch; residual offenses fan out to test-lint-fixer. Mirrors the late gate's autocorrect → residual-fanout shape.

Conditionality — free by construction: clean rubocop → no fixer dispatch → no red-assert re-run; the gate adds zero cost on the clean path.

## Resolution (2026-08-07) **Gate order — red-assert brackets the gate.** Pipeline becomes: write-failing-tests → disclose-test-writer → red-assert → [early test-lint gate] → conditional red-assert re-run → shard-plan. The first red-assert proves test-writer's output fails for the right reasons; the re-run (only when test-lint-fixer actually edited) proves the fixer preserved that. Unambiguous attribution between test-writer bugs and fixer-introduced breakage; extra test run only on the dirty path. Mirrors green-assert's re-verify-after-lint-fix pattern. **Gate scope — only files test-writer touched this run.** Pre-existing offenses in untouched test files (like the 1 in #261) are left to the late gate (#313). Keeps the gate fast and blame-local. **Autocorrect — yes, safe autocorrect (rubocop -a) runs first**, scoped to the same files, before any fixer dispatch; residual offenses fan out to test-lint-fixer. Mirrors the late gate's autocorrect → residual-fanout shape. **Conditionality — free by construction:** clean rubocop → no fixer dispatch → no red-assert re-run; the gate adds zero cost on the clean path.
jared closed this issue 2026-08-07 13:00:02 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
jared/cc-os#311
No description provided.