Add the poodr-guard-implementation map for green guard tests #876

Closed
opened 2026-10-01 15:26:43 +00:00 by jared · 2 comments
Owner

Problem

A guard or characterization ticket adds a test for behavior that already exists and changes no production code. The ticket map maps/poodr-ticket-implementation.yaml requires diff-test expect: red on test-writer, so such a run always escalates unexpected_pass and is finished by hand (#859; cc-plugins #79, commit 84bac12; same shape #539, #593, #638). ADR-0258 decision 12 names the first non-default map: maps/poodr-guard-implementation.yaml. It does not exist.

Reproduce

n/a: design change, nothing to reproduce.

Approach

Add plugins/os-sdlc/maps/poodr-guard-implementation.yaml:

change-auditor -> seam-designer -> test-writer (gates: { gate: diff-test, expect: green }, test-lint) -> mutation-check (agent suite-check, instructions "Run os-sdlc-gate DISPATCH_ID exactly once and stop", gates: [mutation]) -> test-reviewer -> suite-check (gates: [required-work, suite]) -> contract-auditor -> merge-ready. No programmer, refactorer, or behavior-verifier node.

Headers and nodes required by ADR-0258/ADR-0259 (A3), in the form slice 1 defines:

  1. fits: one sentence: the ticket adds or changes tests that guard behavior that already exists, with no production change.
  2. entries: [seam-designer, test-writer].
  3. ticket_shape: true (the guard ticket uses the ticket template).
  4. change-auditor edge reroute: map-router is NOT added here; slice 3 adds it to every reroutable map.
  5. needs-orchestrator waiting node with reroute: map-router, and the map-router node (agent: map-router, enrich: [approved_maps], gates: [reroute]), copied from the ticket map's slice-1 shape.
  6. Every agent node keeps escalate to the waiting node.

Edges with no programmer: test-writer fail -> test-writer (bound 2); mutation-check fail -> test-writer (bound 2, "the mutation survived: make the test guard the code"); test-reviewer fail -> test-writer (bound 2); suite-check fail -> test-writer (bound 2); contract-auditor fail -> escalate (no production role exists in this map).

Instructions: test-writer is told the behavior exists, the test must be green, and the handoff must carry mutation: { path:, patch: }. test-reviewer is told the new test is green by design and the mutation-check result is its red proof.

Edge-spend counters (ADR-0259 A6). LoopLedger#spend! (command/loop_ledger.rb:10) keys spends by (from_node, verdict) per implementation, and the guard map reuses node names from the ticket map. Decision: this matters only when a ticket-map loop on the same (node, verdict) was spent before the reroute; the guard map then reaches its bound early and escalates to the waiting node. The failure direction is safe: no extra loop runs, and the run stops at the orchestrator. ADR-0258 decision 8 already counts dispatches across maps, so counting edge spends across maps is consistent. This ticket keeps the shared counters and adds no ledger code. If early exhaustion shows up in practice, capture a ticket to reset spends on reroute.

Required work:

  1. Add the guard map — check: present name: poodr-guard-implementation in plugins/os-sdlc/maps/poodr-guard-implementation.yaml
  2. Gate test-writer on a green diff-test — check: present expect: green in plugins/os-sdlc/maps/poodr-guard-implementation.yaml
  3. Add the mutation-check node — check: present gates: [mutation] in plugins/os-sdlc/maps/poodr-guard-implementation.yaml
  4. Leave out the programmer — check: absent agent: programmer in plugins/os-sdlc/maps/poodr-guard-implementation.yaml

Acceptance criteria

  1. Given the plugin maps directory, when poodr-guard-implementation is loaded through Map::Catalog, then it loads and passes Map::Validator, including the entry-gates rule (every path from seam-designer and test-writer to merge-ready passes required-work and suite).
  2. Given the loaded guard map, when its nodes are listed, then they are change-auditor, seam-designer, test-writer, mutation-check, test-reviewer, suite-check, contract-auditor, map-router, the waiting node, and the null nodes, and none has agent programmer or behavior-verifier.
  3. Given a run on the guard map at test-writer, when the test-writer gate records pass (new test green), then the run advances to mutation-check.
  4. Given a run on the guard map at mutation-check, when the mutation gate fails, then the run returns to test-writer.

Owner sketch

name: poodr-guard-implementation
fits: <one sentence>
entries: [seam-designer, test-writer]
ticket_shape: true
entry: change-auditor
nodes:
  mutation-check:
    agent: suite-check
    verdict: { source: gate, gates: [mutation] }

Origin

  • Trigger: user ruling on the map reroute design, 2026-10-01 (ADR-0258 decision 12; ADR-0259 A3, A6)
  • Improvised this session: none
  • Chain: guard tests escalate as unexpected_pass ← only one map exists and it requires red-first ← DESIGN (docs/adr/0258)
  • Root candidate: #859
  • Where: plugins/os-sdlc/maps/poodr-ticket-implementation.yaml
  • Improvised this session: none
  • Root candidate: #859
  • Session: 55a56279-83ee-47d5-a21e-ee67f9e28abd
  • Transcript: /home/jared/.claude/projects/-home-jared-dev-cc-os/55a56279-83ee-47d5-a21e-ee67f9e28abd.jsonl

Parent: #859
Blocked by: #868, #869, #870, #872, #873, #885, #875

## Problem A guard or characterization ticket adds a test for behavior that already exists and changes no production code. The ticket map `maps/poodr-ticket-implementation.yaml` requires `diff-test expect: red` on test-writer, so such a run always escalates `unexpected_pass` and is finished by hand (#859; cc-plugins #79, commit 84bac12; same shape #539, #593, #638). ADR-0258 decision 12 names the first non-default map: `maps/poodr-guard-implementation.yaml`. It does not exist. ## Reproduce n/a: design change, nothing to reproduce. ## Approach Add `plugins/os-sdlc/maps/poodr-guard-implementation.yaml`: change-auditor -> seam-designer -> test-writer (gates: `{ gate: diff-test, expect: green }`, `test-lint`) -> mutation-check (agent `suite-check`, instructions "Run `os-sdlc-gate DISPATCH_ID` exactly once and stop", gates: `[mutation]`) -> test-reviewer -> suite-check (gates: `[required-work, suite]`) -> contract-auditor -> merge-ready. No programmer, refactorer, or behavior-verifier node. Headers and nodes required by ADR-0258/ADR-0259 (A3), in the form slice 1 defines: 1. `fits:` one sentence: the ticket adds or changes tests that guard behavior that already exists, with no production change. 2. `entries:` `[seam-designer, test-writer]`. 3. `ticket_shape: true` (the guard ticket uses the ticket template). 4. `change-auditor` edge `reroute: map-router` is NOT added here; slice 3 adds it to every reroutable map. 5. `needs-orchestrator` waiting node with `reroute: map-router`, and the `map-router` node (`agent: map-router`, `enrich: [approved_maps]`, `gates: [reroute]`), copied from the ticket map's slice-1 shape. 6. Every agent node keeps `escalate` to the waiting node. Edges with no programmer: test-writer `fail` -> test-writer (bound 2); mutation-check `fail` -> test-writer (bound 2, "the mutation survived: make the test guard the code"); test-reviewer `fail` -> test-writer (bound 2); suite-check `fail` -> test-writer (bound 2); contract-auditor `fail` -> escalate (no production role exists in this map). Instructions: test-writer is told the behavior exists, the test must be green, and the handoff must carry `mutation: { path:, patch: }`. test-reviewer is told the new test is green by design and the mutation-check result is its red proof. Edge-spend counters (ADR-0259 A6). `LoopLedger#spend!` (command/loop_ledger.rb:10) keys spends by `(from_node, verdict)` per implementation, and the guard map reuses node names from the ticket map. Decision: this matters only when a ticket-map loop on the same `(node, verdict)` was spent before the reroute; the guard map then reaches its bound early and escalates to the waiting node. The failure direction is safe: no extra loop runs, and the run stops at the orchestrator. ADR-0258 decision 8 already counts dispatches across maps, so counting edge spends across maps is consistent. This ticket keeps the shared counters and adds no ledger code. If early exhaustion shows up in practice, capture a ticket to reset spends on reroute. Required work: 1. Add the guard map — check: present `name: poodr-guard-implementation` in `plugins/os-sdlc/maps/poodr-guard-implementation.yaml` 2. Gate test-writer on a green diff-test — check: present `expect: green` in `plugins/os-sdlc/maps/poodr-guard-implementation.yaml` 3. Add the mutation-check node — check: present `gates: [mutation]` in `plugins/os-sdlc/maps/poodr-guard-implementation.yaml` 4. Leave out the programmer — check: absent `agent: programmer` in `plugins/os-sdlc/maps/poodr-guard-implementation.yaml` ## Acceptance criteria 1. Given the plugin maps directory, when `poodr-guard-implementation` is loaded through `Map::Catalog`, then it loads and passes `Map::Validator`, including the entry-gates rule (every path from `seam-designer` and `test-writer` to `merge-ready` passes `required-work` and `suite`). 2. Given the loaded guard map, when its nodes are listed, then they are change-auditor, seam-designer, test-writer, mutation-check, test-reviewer, suite-check, contract-auditor, map-router, the waiting node, and the null nodes, and none has agent `programmer` or `behavior-verifier`. 3. Given a run on the guard map at test-writer, when the test-writer gate records `pass` (new test green), then the run advances to mutation-check. 4. Given a run on the guard map at mutation-check, when the mutation gate fails, then the run returns to test-writer. ## Owner sketch ```yaml name: poodr-guard-implementation fits: <one sentence> entries: [seam-designer, test-writer] ticket_shape: true entry: change-auditor nodes: mutation-check: agent: suite-check verdict: { source: gate, gates: [mutation] } ``` ## Origin - Trigger: user ruling on the map reroute design, 2026-10-01 (ADR-0258 decision 12; ADR-0259 A3, A6) - Improvised this session: none - Chain: guard tests escalate as unexpected_pass ← only one map exists and it requires red-first ← DESIGN (docs/adr/0258) - Root candidate: #859 - Where: plugins/os-sdlc/maps/poodr-ticket-implementation.yaml - Improvised this session: none - Root candidate: #859 - Session: 55a56279-83ee-47d5-a21e-ee67f9e28abd - Transcript: /home/jared/.claude/projects/-home-jared-dev-cc-os/55a56279-83ee-47d5-a21e-ee67f9e28abd.jsonl Parent: #859 Blocked by: #868, #869, #870, #872, #873, #885, #875
Author
Owner

Work started: os-sdlc pipeline on branch ticket-876 (worktree .claude/worktrees/ticket-876).

Work started: os-sdlc pipeline on branch ticket-876 (worktree .claude/worktrees/ticket-876).
Author
Owner

Resolution

Done: Added plugins/os-sdlc/maps/poodr-guard-implementation.yaml: change-auditor, seam-designer, test-writer (diff-test expect green, test-lint), mutation-check (gates: [mutation]), test-reviewer, suite-check (required-work, suite), contract-auditor, waiting and map-router nodes; no programmer or behavior-verifier.

Evidence: Pipeline implementation 9 completed with no rejections (8 dispatches, 5 min 18 s); commit a10b547d merged to main; tests/adapter/map/catalog_guard_map_test.rb loads and validates the map through Map::Catalog; bin/test 9 suites passed on main.

Follow-ups: none

## Resolution **Done:** Added plugins/os-sdlc/maps/poodr-guard-implementation.yaml: change-auditor, seam-designer, test-writer (diff-test expect green, test-lint), mutation-check (gates: [mutation]), test-reviewer, suite-check (required-work, suite), contract-auditor, waiting and map-router nodes; no programmer or behavior-verifier. **Evidence:** Pipeline implementation 9 completed with no rejections (8 dispatches, 5 min 18 s); commit a10b547d merged to main; tests/adapter/map/catalog_guard_map_test.rb loads and validates the map through Map::Catalog; bin/test 9 suites passed on main. **Follow-ups:** none
jared closed this issue 2026-10-01 20:56:37 +00:00
jared referenced this issue from a commit 2026-10-02 17:43:17 +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.

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