Per-gate expect declarations with red classifier ported from RedAssert #492
Labels
No labels
P0
P1
P2
P3
bug
create
delete
enhancement
filed-by/agent
filed-by/user
frozen
lint-rule
needs-info
needs-triage
next
plugin/cc-architect
plugin/os
plugin/os-adr
plugin/os-aidd-lint
plugin/os-backlog
plugin/os-context
plugin/os-doc-hygiene
plugin/os-sdlc
plugin/os-vault
project/cc-os
ready-for-agent
ready-for-human
recurring
review
update
waiting
wayfinder:grilling
wayfinder:map
wayfinder:map
wayfinder:research
wayfinder:task
wayfinder:task
wontfix
worklist/deviations
worklist/lint-rule
worklist/new-implement-build
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
jared/cc-os#492
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
GateVerdict judges every gate by
exit_status.zero?(command_result.rb:6-7). The test-writer node needs the inverse — red for the right reason — which today is unenforced: maps/poodr-implementation.yaml:74-77 aliases both pass and fail edges to test-reviewer, and agents/test-writer.md:20 documents:brokenrejection that nothing implements. The correct classification (:unexpected_pass/:red/:brokenvia MinitestSummary) exists only in lib/os_sdlc/red_assert.rb:21-26, reachable solely from the legacy session-less CLI. Decision (2026-08-23, option C): gates declare expectations per entry, mixed scalar-or-hash form, green default.Tasks
{gate: NAME, expect: red|green}; Map::Validator normalizes both to one internal form and rejects unknown expect values.gates: [{gate: test, expect: red}]with real edges: pass → test-reviewer, fail → test-writer (bounded), replacing the aliased edges.Acceptance criteria
gates: [test, lint]style strings stay valid).Out of scope: deleting the legacy session-less red-assert/green-assert CLI chain (RedAssert/GreenAssert/BaseAssert/GateRunner and wrappers) — separate cleanup after this lands.
Origin
os-sdlc-runner gate.Acceptance addendum (2026-08-24, bundling the #499 decision): the test-writer node also carries a test-lint gate ({expect: green}) over the diffed TEST files, and the programmer/repair lint gate is scoped to exclude test files. Acceptance: a test-file rubocop offense settles the test-writer round as fail and routes back to test-writer (bounded), never to programmer-repair; production-file offenses behave as today. Fail edge bound: 2, exhausted -> error, matching the programmer-repair convention. Work started 2026-08-24 direct on main (probe + change-interpreter consult done this session; new ADR to be recorded, NOT an ADR-0139 amendment — 0139 is unrelated --target binding).
Resolution
Done: Per-gate expect shipped: GateExpectation normalizes scalar-or-hash gates entries (green default, unknown expect rejected at Map::Validator); GateVerdict classifies expect-red gates via the RedAssert port (unexpected_pass/red/broken through MinitestSummary); settled reply names the classification; test-writer node now gates: [{gate: test, expect: red}, test-lint] with a real bounded fail edge; agents/test-writer.md corrected
Evidence: Commit
c7ee237on main, 21 files; ADR-0147 (Accepted) records the schema, classification table, test-lint ownership, and retained legacy CLI; all four classifications covered in tests/runner/gate_verdict_test.rb; acceptance verified: LoadError nonzero settles broken/fail, genuine red settles pass to test-reviewer, programmer string-form gates unchanged (regression test); suite 1080 runs green except the 4 pre-existing ChangeInterpreterAgentTest baseline failures; rubocop cleanFollow-ups: Legacy RedAssert/GateRunner session-less CLI cleanup explicitly deferred in ADR-0147, already tracked as out-of-scope per the ticket. Live supervised pipeline run of the new red gate rides on #501's review gate (the planned replay). Otherwise none.