Build #438 slice 3: subagent-stop records handoff + produces gate verdict #442

Closed
opened 2026-08-20 14:31:28 +00:00 by jared · 2 comments
Owner

Parent

#438 (map-driven os-sdlc runner build spec). Design: docs/os-sdlc-rebuild/map-runner-design.md. Settled decisions + guard-manifest process: docs/os-sdlc-rebuild/interface-sketches.md.

Pre-build gate

First step before any code: run the seam-design pass per docs/os-sdlc-rebuild/seam-design-prompt.md to produce this slice's interface sketch. The sketch is the guard manifest: any class, public method, or signature change beyond it → stop, comment on this ticket, do not write it.

What to build

The E3 entrypoint takes the stopping agent's JSON on stdin, validates the structured YAML handoff (verdict when the node's verdict source is agent, summary, optional items), rejects malformed content loudly at intake — exit 3, never stored — and runs GateVerdict for gate-sourced nodes producing pass/fail. The verdict persists on dispatches.verdict (settled decision D6 — slice 4 reads it there). CompletionIntake keeps terminal stamping until slice 4 replaces it. Handoffs record created_by as an FK; agent_type derives via the creator, never a denormalized string; the writer never addresses a target.

Acceptance criteria

  • Malformed handoff YAML → exit 3 and nothing stored (red test)
  • Gate-sourced node produces pass/fail recorded on the dispatch's verdict column
  • Handoff rows carry created_by FK and NULL target_agent_type at intake
  • Tests assert exit codes and stamped fields via the public entrypoint

Blocked by

Origin

  • Trigger: /to-tickets decomposition of #438 (2026-08-20, user-directed)
  • Improvised this session: none
  • Chain: DESIGN (docs/os-sdlc-rebuild/map-runner-design.md, docs/os-sdlc-rebuild/interface-sketches.md, ADR-0133/0134/0135)
  • Root candidate: #438
## Parent #438 (map-driven os-sdlc runner build spec). Design: docs/os-sdlc-rebuild/map-runner-design.md. Settled decisions + guard-manifest process: docs/os-sdlc-rebuild/interface-sketches.md. ## Pre-build gate First step before any code: run the seam-design pass per docs/os-sdlc-rebuild/seam-design-prompt.md to produce this slice's interface sketch. The sketch is the guard manifest: any class, public method, or signature change beyond it → stop, comment on this ticket, do not write it. ## What to build The E3 entrypoint takes the stopping agent's JSON on stdin, validates the structured YAML handoff (verdict when the node's verdict source is agent, summary, optional items), rejects malformed content loudly at intake — exit 3, never stored — and runs GateVerdict for gate-sourced nodes producing pass/fail. The verdict persists on dispatches.verdict (settled decision D6 — slice 4 reads it there). CompletionIntake keeps terminal stamping until slice 4 replaces it. Handoffs record created_by as an FK; agent_type derives via the creator, never a denormalized string; the writer never addresses a target. ## Acceptance criteria - [ ] Malformed handoff YAML → exit 3 and nothing stored (red test) - [ ] Gate-sourced node produces pass/fail recorded on the dispatch's verdict column - [ ] Handoff rows carry created_by FK and NULL target_agent_type at intake - [ ] Tests assert exit codes and stamped fields via the public entrypoint ## Blocked by - #441 ## Origin - Trigger: /to-tickets decomposition of #438 (2026-08-20, user-directed) - Improvised this session: none - Chain: DESIGN (docs/os-sdlc-rebuild/map-runner-design.md, docs/os-sdlc-rebuild/interface-sketches.md, ADR-0133/0134/0135) - Root candidate: #438
Author
Owner

Work started: building slice 3 via the TDD loop on branch build/438-slice-3. Sketch approved with D17-B (enrich-driven brief facts), D18 (created_by + target_agent_type split), D19 (parse handoff before first write), D20 (schema 8 incl. approved D12 exception for target_agent_type).

Work started: building slice 3 via the TDD loop on branch build/438-slice-3. Sketch approved with D17-B (enrich-driven brief facts), D18 (created_by + target_agent_type split), D19 (parse handoff before first write), D20 (schema 8 incl. approved D12 exception for target_agent_type).
Author
Owner

Resolution

Done: Slice 3 built TDD-first on build/438-slice-3, merged to main at 87ff85d. E3 subagent-stop parses/validates handoff content before any write (D19: malformed → named defect, exit 3, zero rows, unstamped dispatch), splits handoff producer/target as created_by + target_agent_type (D18, schema 8 with dispatches.verdict per D20 incl. the user-approved D12 exception), records gate verdicts via GateVerdict/Verdict, and briefs are enrich-driven per D17-B. A concurrent Map::Loader namespace refactor from peer session os-sdlc-76 was sequenced as its own commit 3fbe518 with ADR-0136.

Evidence: ruby -Ilib tests/all.rb: 833 runs, 2137 assertions, 0 failures (verified by orchestrator; 16 new tests incl. malformed-first-red, claim-scoping, agent-sourced verdict). rubocop zero offenses on all dirty files, no disables. Zero stale MapLoader/MapValidator references at the refactor commit.

Follow-ups: Sdlc/Structural/PrimitiveObsessedIvar cop crashes on masgn-to-ivar patterns (lib/os_sdlc/cops/primitive_obsessed_ivar.rb:85) — same cop crash family as the already-ticketed node.rb crash; noted on that existing ticket's scope, no new ticket filed. E3 payload still emits round_complete/round_failed types; their retirement is owned by slice 4's approved sketch (existing ticket #443).

## Resolution **Done:** Slice 3 built TDD-first on build/438-slice-3, merged to main at 87ff85d. E3 subagent-stop parses/validates handoff content before any write (D19: malformed → named defect, exit 3, zero rows, unstamped dispatch), splits handoff producer/target as created_by + target_agent_type (D18, schema 8 with dispatches.verdict per D20 incl. the user-approved D12 exception), records gate verdicts via GateVerdict/Verdict, and briefs are enrich-driven per D17-B. A concurrent Map::Loader namespace refactor from peer session os-sdlc-76 was sequenced as its own commit 3fbe518 with ADR-0136. **Evidence:** ruby -Ilib tests/all.rb: 833 runs, 2137 assertions, 0 failures (verified by orchestrator; 16 new tests incl. malformed-first-red, claim-scoping, agent-sourced verdict). rubocop zero offenses on all dirty files, no disables. Zero stale MapLoader/MapValidator references at the refactor commit. **Follow-ups:** Sdlc/Structural/PrimitiveObsessedIvar cop crashes on masgn-to-ivar patterns (lib/os_sdlc/cops/primitive_obsessed_ivar.rb:85) — same cop crash family as the already-ticketed node.rb crash; noted on that existing ticket's scope, no new ticket filed. E3 payload still emits round_complete/round_failed types; their retirement is owned by slice 4's approved sketch (existing ticket #443).
jared closed this issue 2026-08-20 20:25:27 +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#442
No description provided.