Add diff-scoped test gate and gate vocabulary diff-test/lint/suite #491

Closed
opened 2026-08-23 17:47:59 +00:00 by jared · 7 comments
Owner

Context

Runner::GateCommands (lib/os_sdlc/runner/gate_commands.rb:12-29) knows only test (full suite via Project#test_command) and lint (rubocop on DiffedRubyFiles). The programmer's iteration loop pays the full-suite cost (~18s+) on every gate run, when a diff-scoped test run would return red in 1-2s. Decision from the 2026-08-23 #476 session: programmer gates become ordered [diff-test, lint, suite] so cheap feedback drives iteration and the expensive suite runs only once the cheap gates are green; the reviewer then receives known-green work.

Tasks

  • GateCommands gains a diff-test command: run only the test files corresponding to the diffed files (reuse DiffedRubyFiles; map lib paths to their test files; a diffed test file runs itself).
  • Existing full-suite command becomes the suite gate; keep test as an alias or migrate map vocabulary explicitly — pick one, no silent dual meaning.
  • Update maps/poodr-implementation.yaml programmer node to gates: [diff-test, lint, suite].
  • Map::Validator accepts the new gate names; unknown gate names still raise (GateVerdict::UnknownGate).
  • Tests cover diff-test command construction, empty-diff behavior, and gate ordering.

Acceptance criteria

  • A programmer round with a one-file change gets a red/green diff-test verdict without running the full suite.
  • Full suite still gates the node before the pass edge fires.

Origin

  • Trigger: #476 grilling session 2026-08-23, gate-path trace.
  • Improvised this session: none.
  • Chain: slow iteration loops ← single full-suite test gate (gate_commands.rb:20-21) ← DESIGN (v1 pipeline ran the whole suite per round).
  • Root candidate: this ticket.
## Context Runner::GateCommands (lib/os_sdlc/runner/gate_commands.rb:12-29) knows only `test` (full suite via Project#test_command) and `lint` (rubocop on DiffedRubyFiles). The programmer's iteration loop pays the full-suite cost (~18s+) on every gate run, when a diff-scoped test run would return red in 1-2s. Decision from the 2026-08-23 #476 session: programmer gates become ordered `[diff-test, lint, suite]` so cheap feedback drives iteration and the expensive suite runs only once the cheap gates are green; the reviewer then receives known-green work. ## Tasks - [ ] GateCommands gains a `diff-test` command: run only the test files corresponding to the diffed files (reuse DiffedRubyFiles; map lib paths to their test files; a diffed test file runs itself). - [ ] Existing full-suite command becomes the `suite` gate; keep `test` as an alias or migrate map vocabulary explicitly — pick one, no silent dual meaning. - [ ] Update maps/poodr-implementation.yaml programmer node to `gates: [diff-test, lint, suite]`. - [ ] Map::Validator accepts the new gate names; unknown gate names still raise (GateVerdict::UnknownGate). - [ ] Tests cover diff-test command construction, empty-diff behavior, and gate ordering. ## Acceptance criteria - [ ] A programmer round with a one-file change gets a red/green diff-test verdict without running the full suite. - [ ] Full suite still gates the node before the pass edge fires. ## Origin - Trigger: #476 grilling session 2026-08-23, gate-path trace. - Improvised this session: none. - Chain: slow iteration loops ← single full-suite `test` gate (gate_commands.rb:20-21) ← DESIGN (v1 pipeline ran the whole suite per round). - Root candidate: this ticket.
Author
Owner

Work starting via /os-sdlc:implement on branch worktree-worktree-ticket-491 (worktree). Start time 2026-08-23T15:20:18-04:00.

Work starting via /os-sdlc:implement on branch worktree-worktree-ticket-491 (worktree). Start time 2026-08-23T15:20:18-04:00.
Author
Owner

BLOCKED: /os-sdlc:implement run stalled at the programmer step. Two defects: (1) the dispatch brief arrived empty — the worktree has no .cc-os/config, so intake could not fetch this ticket's body; the programmer made no change and the gate stamped a vacuous 'pass'. (2) The SubagentStop hook never recorded the completion (dispatches row 1 has verdict=pass but completed_at NULL in the worktree .sdlc/pipeline.db), so the runner returns await_completion forever. Not resuming; recovery is a fresh implementation-open after the hook and intake defects are fixed. Branch worktree-worktree-ticket-491 kept.

BLOCKED: /os-sdlc:implement run stalled at the programmer step. Two defects: (1) the dispatch brief arrived empty — the worktree has no .cc-os/config, so intake could not fetch this ticket's body; the programmer made no change and the gate stamped a vacuous 'pass'. (2) The SubagentStop hook never recorded the completion (dispatches row 1 has verdict=pass but completed_at NULL in the worktree .sdlc/pipeline.db), so the runner returns await_completion forever. Not resuming; recovery is a fresh implementation-open after the hook and intake defects are fixed. Branch worktree-worktree-ticket-491 kept.
Author
Owner

Blocker corrections landed on main (5b2abcf, ADR-0143): worktree.baseRef=head in global settings, worktree-start now symlinks .cc-os and .sdlc/pipeline.db from the owning checkout, implement skill defaults to poodr-implementation.yaml, plugin cache refreshed. Retry in a fresh session.

Blocker corrections landed on main (5b2abcf, ADR-0143): worktree.baseRef=head in global settings, worktree-start now symlinks .cc-os and .sdlc/pipeline.db from the owning checkout, implement skill defaults to poodr-implementation.yaml, plugin cache refreshed. Retry in a fresh session.
Author
Owner

Starting pipeline work on branch worktree-worktree-ticket-491 (fresh supervised retry).

Starting pipeline work on branch worktree-worktree-ticket-491 (fresh supervised retry).
Author
Owner

Work starting on branch worktree-ticket-491 via os-sdlc pipeline (supervised retry).

Work starting on branch worktree-ticket-491 via os-sdlc pipeline (supervised retry).
Author
Owner

Pipeline run blocked: implementation 3 ended implementation_failed (bound_exhausted:test-reviewer/fail). Failed step: test-reviewer, increment 3. Gate detail: new test test_to_h_diff_test_is_nil_when_the_diff_touches_no_code_path_ruby_files was GREEN (1053 runs, 0 failures) — the empty-diff nil behavior already ships in GateCommands#diff_test_command via DiffedTestPaths — and the same tree mixes production edits (gate_commands.rb, diffed_test_paths.rb, maps/poodr-implementation.yaml), so the test change could not be isolated as red-first. Work-in-progress remains on branch worktree-ticket-491 (increments 1-2 green, contract-audited, behavior for diff-test + suite gate largely present). Recovery is a fresh implementation-open.

Pipeline run blocked: implementation 3 ended implementation_failed (bound_exhausted:test-reviewer/fail). Failed step: test-reviewer, increment 3. Gate detail: new test test_to_h_diff_test_is_nil_when_the_diff_touches_no_code_path_ruby_files was GREEN (1053 runs, 0 failures) — the empty-diff nil behavior already ships in GateCommands#diff_test_command via DiffedTestPaths — and the same tree mixes production edits (gate_commands.rb, diffed_test_paths.rb, maps/poodr-implementation.yaml), so the test change could not be isolated as red-first. Work-in-progress remains on branch worktree-ticket-491 (increments 1-2 green, contract-audited, behavior for diff-test + suite gate largely present). Recovery is a fresh implementation-open.
Author
Owner

Resolution

Done: Diff-scoped test gate shipped: GateCommands#to_h emits diff-test (new DiffedTestPaths collaborator, nil on empty diff) and suite (former full-suite command); poodr map programmer gates now [diff-test, lint, suite]; map/validator tests cover the gate list and empty-diff nil. Both acceptance criteria met: one-file changes get a diff-test verdict without the full suite, and the suite still gates before the pass edge.

Evidence: Merged to main in 400cdfd (feature commit 1b5dc65, branch worktree-ticket-491); suite green 1053 runs / 0 failures; user reviewed the diff and approved merge. Pipeline record: .sdlc/pipeline.db implementation 3.

Follow-ups: #497 (diffed test file runs itself — the one unimplemented #491 task), #498 (change-interpreter tracker access from worktree subagents), #499 (test-file lint ownership deadlock in poodr map); all skeptic-verdicted CREATE

## Resolution **Done:** Diff-scoped test gate shipped: GateCommands#to_h emits diff-test (new DiffedTestPaths collaborator, nil on empty diff) and suite (former full-suite command); poodr map programmer gates now [diff-test, lint, suite]; map/validator tests cover the gate list and empty-diff nil. Both acceptance criteria met: one-file changes get a diff-test verdict without the full suite, and the suite still gates before the pass edge. **Evidence:** Merged to main in 400cdfd (feature commit 1b5dc65, branch worktree-ticket-491); suite green 1053 runs / 0 failures; user reviewed the diff and approved merge. Pipeline record: .sdlc/pipeline.db implementation 3. **Follow-ups:** #497 (diffed test file runs itself — the one unimplemented #491 task), #498 (change-interpreter tracker access from worktree subagents), #499 (test-file lint ownership deadlock in poodr map); all skeptic-verdicted CREATE
jared closed this issue 2026-08-24 12:55: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#491
No description provided.