Gate settlement reply carries step outputs and passed-step feedback #490

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

Context

Since the #477 in-turn gate redesign, the programmer/test-writer agents run os-sdlc-runner gate <dispatch_id> themselves, but the reply built at lib/os_sdlc/runner/gate_settlement.rb:64-67 contains only {type, dispatch_id, verdict, step}. The full gate output is already captured per step as GateStepOutcome rows (gate_verdict.rb:30) but surfaces only via the gate_results enrich on the NEXT dispatch — a SubagentStop-era design. An agent told only verdict: fail, step: test must re-run the suite manually to see why, doubling every iteration's cost (an 80s suite becomes 160s per round).

Tasks

  • GateVerdict collects its GateStepOutcome objects and returns them alongside the Verdict (or Verdict gains passed/failed step data).
  • GateSettlement#record includes in the reply hash: the failing step's captured output, the list of steps that passed, and an instruction line telling the agent to correct the failures and rerun os-sdlc-runner gate <dispatch_id>.
  • On full pass, the reply states all steps green and that the agent may finish.
  • Runner CLI gate command prints the enriched reply so the invoking agent sees it in-turn.
  • Tests cover fail-with-output, pass-with-prior-steps, and full-green reply shapes.

Acceptance criteria

  • A failing lint gate reply names the offenses (rubocop output) and the steps already green, without the agent running any test/lint command itself.
  • No schema change; StepResult capture path unchanged.

Origin

  • Trigger: #476 grilling session 2026-08-23, trace of the os-sdlc-runner gate path.
  • Improvised this session: none.
  • Chain: blind in-turn iteration ← reply built from Verdict only (gate_settlement.rb:64-67) ← DESIGN (feedback routed to the next dispatch via gate_results enrich, ADR-0133/0134 era SubagentStop model).
  • Root candidate: this ticket.
## Context Since the #477 in-turn gate redesign, the programmer/test-writer agents run `os-sdlc-runner gate <dispatch_id>` themselves, but the reply built at lib/os_sdlc/runner/gate_settlement.rb:64-67 contains only `{type, dispatch_id, verdict, step}`. The full gate output is already captured per step as GateStepOutcome rows (gate_verdict.rb:30) but surfaces only via the `gate_results` enrich on the NEXT dispatch — a SubagentStop-era design. An agent told only `verdict: fail, step: test` must re-run the suite manually to see why, doubling every iteration's cost (an 80s suite becomes 160s per round). ## Tasks - [ ] GateVerdict collects its GateStepOutcome objects and returns them alongside the Verdict (or Verdict gains passed/failed step data). - [ ] GateSettlement#record includes in the reply hash: the failing step's captured output, the list of steps that passed, and an instruction line telling the agent to correct the failures and rerun `os-sdlc-runner gate <dispatch_id>`. - [ ] On full pass, the reply states all steps green and that the agent may finish. - [ ] Runner CLI `gate` command prints the enriched reply so the invoking agent sees it in-turn. - [ ] Tests cover fail-with-output, pass-with-prior-steps, and full-green reply shapes. ## Acceptance criteria - [ ] A failing lint gate reply names the offenses (rubocop output) and the steps already green, without the agent running any test/lint command itself. - [ ] No schema change; StepResult capture path unchanged. ## Origin - Trigger: #476 grilling session 2026-08-23, trace of the `os-sdlc-runner gate` path. - Improvised this session: none. - Chain: blind in-turn iteration ← reply built from Verdict only (gate_settlement.rb:64-67) ← DESIGN (feedback routed to the next dispatch via `gate_results` enrich, ADR-0133/0134 era SubagentStop model). - Root candidate: this ticket.
Author
Owner

Work starting on branch worktree-ticket-490 via /os-sdlc:implement pipeline.

Work starting on branch worktree-ticket-490 via /os-sdlc:implement pipeline.
Author
Owner

Resolution

Done: Gate settlement reply now carries step outputs and passed-step feedback: GateVerdict collects its GateStepOutcome rows (outcomes accessor); GateSettlement builds a GateReply value object whose reply hash adds passed_steps, the failing step's captured output, and a message (rerun instruction naming the dispatch id on fail; 'all gates green -- you may finish' on pass). CLI gate prints the enriched reply via the existing emit path. No schema change; StepResult capture path untouched.

Evidence: Branch worktree-ticket-490. Files: plugins/os-sdlc/lib/os_sdlc/runner/gate_verdict.rb, gate_settlement.rb, new tests/runner/gate_settlement_test.rb (full-green, fail-with-output, fail-with-prior-passed-steps shapes, incl. rubocop offense text in lint-fail reply output). Pipeline gates green: 1085 runs, 0 failures; rubocop no offenses. Reviewer (opus) verdict: pass.

Follow-ups: #494 captured (brief composer false 'no tracker configured', skeptic CREATE). Lint-output assertion done inline this session (skeptic DROP-do-inline). Dropped: private_constant GateReply, collapse record_verdict/record, fail-open failing_output — reviewer-rated non-blocking, no provenance beyond style.

## Resolution **Done:** Gate settlement reply now carries step outputs and passed-step feedback: GateVerdict collects its GateStepOutcome rows (outcomes accessor); GateSettlement builds a GateReply value object whose reply hash adds passed_steps, the failing step's captured output, and a message (rerun instruction naming the dispatch id on fail; 'all gates green -- you may finish' on pass). CLI gate prints the enriched reply via the existing emit path. No schema change; StepResult capture path untouched. **Evidence:** Branch worktree-ticket-490. Files: plugins/os-sdlc/lib/os_sdlc/runner/gate_verdict.rb, gate_settlement.rb, new tests/runner/gate_settlement_test.rb (full-green, fail-with-output, fail-with-prior-passed-steps shapes, incl. rubocop offense text in lint-fail reply output). Pipeline gates green: 1085 runs, 0 failures; rubocop no offenses. Reviewer (opus) verdict: pass. **Follow-ups:** #494 captured (brief composer false 'no tracker configured', skeptic CREATE). Lint-output assertion done inline this session (skeptic DROP-do-inline). Dropped: private_constant GateReply, collapse record_verdict/record, fail-open failing_output — reviewer-rated non-blocking, no provenance beyond style.
jared closed this issue 2026-08-23 18:22:56 +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#490
No description provided.