Gate output in briefs is cut at 4000 chars, so test-reviewer cannot see every red test #670
Labels
No labels
P0
P1
P2
P3
bug
category/code-change
category/cross-repo
category/eval-run
category/investigation
category/no-test-target
category/owner-ruling
category/prose-artifact
category/recurring-chore
category/structure
category/umbrella
crc-refactor
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
rule-proposal
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#670
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?
Problem
BriefFacts caps the diff-test gate output at MAX_GATE_OUTPUT_CHARS = 4000
(plugins/os-sdlc/lib/os_sdlc/pipeline/brief_facts.rb:8). A ticket with many
acceptance criteria produces more red output than that. The test-reviewer
then cannot confirm which new tests are red, and it adds a GAP item every
round instead of a verdict it can stand behind.
On #655 implementation 19 (2026-09-24), the test-reviewer reported in three
consecutive rounds (dispatches 216, 218, 220):
AC5, AC7, AC9, AC15, AC18, AC19, AC20 tests is not visible
tests is not visible.
Test-reviewer, last 30 days: 22 pass / 25 fail / 1 error, 12 of the fails
mention truncation.
The largest stored diff-test output on record (dispatch 240) is 24,627
chars. Of that, stack-trace lines (
---Backtrace---blocks and linesmatching
\S+:\d+:in) are 71% of the bytes; the 24N) Failure:/N) Error:headers together are 292 chars. The reviewer needs the header plusmessage per failure, not the trace.
Approach
Required work:
OsSdlc::Pipeline::RedTestsin plugins/os-sdlc/lib/os_sdlc/pipeline/red_tests.rb.RedTests.parse(output)returns one string perN) Failure:/N) Error:block, using this regex sketch.BLOCK = /^\s*\d+\) (Failure|Error):\n(.+?)\n(.*?)(?=^\s+\S+:\d+:in |^\s*\d+\) |\z)/mentries = output.scan(BLOCK).map { |kind, name, message| "#{kind[0]} #{name.strip}\n#{message.strip}" }"red_tests" => :red_teststo FACT_RESOLVERS in plugins/os-sdlc/lib/os_sdlc/pipeline/brief_facts.rb.{ step => RedTests.parse(summary["output"]) }.GATE_OUTPUT_WARN_CHARS = 20_000and asized(text)helper that returns text unchanged at or under the line.sizedprefixes one line, "BLOAT: gate output is N chars, over the 20000 watch line. Report it as a BLOAT item in your handoff.", followed by the whole text.sizedat the gate_results and lint_offense_history call sites; drop no character of either fact.Error:entry ofgate_resultsis red. A test named in aFailure:entry is red. Reject a test as unexpectedly green only when it appears in neither." with "A test named in ared_testsentry is red;Emarks an error,Fa failure. Reject a test as unexpectedly green only when no entry names it."test_changesorgate_resultsis absent or empty" line to namered_testsinstead ofgate_results.bin/refresh-pluginsRejected: persisting red_tests as a step_results column — a SCHEMA_VERSION bump archives and recreates the live pipeline.db (db.rb archive_and_recreate), and the parse is a pure function of the stored output, so no schema change is needed.
Acceptance criteria
OsSdlc::Pipeline::RedTests.parseruns against it, then it returns 24 entries and no entry contains a backtrace line.BriefFacts::FACTSis inspected, then it includesred_tests, and both map files validate withoutUnknownFactorInvalidMapError.BriefFactsfact call path, when its output is inspected, then it never emits aTRUNCATEDmarker and never drops a character of the underlying text.gate_resultsvalue over 20,000 chars, whenBriefFactsbuilds the fact, then the value carries theBLOAT:prefix line and the full text follows it.plugins/os-sdlc/agents/test-reviewer.md, when its red-status rule is read, then it namesred_testsand does not namegate_results.red_testsfact, then all 24 of its failure/error test names appear in the fact.Owner sketch
Non-goals
Persisting the parsed list: the step_results.output column is unchanged and nothing new is stored.
The programmer node keeps gate_results in both maps.
plugins/os-sdlc/tests/pipeline/lint_offense_line_test.rb: its 200-char cut belongs to LintOffenseLine, not MAX_GATE_OUTPUT_CHARS.
#630
#662
The enrich audit (#676)
The amending ADR for #630/#662/#670, to be written once after all three land, outside this run
Persisting the parsed red_tests list
Fixture
Pulled from
.sdlc/pipeline.db, dispatch 240, stepdiff-test, by runningthe design's
BLOCKregex against the storedoutputcolumn. It found 24blocks; first Failure and first Error shown here with traces trimmed to 3
lines:
First Failure block:
A later Error block:
The parser's own output for this file (
RedTests.entries, message clippedat the first stack-trace line) is:
Use this file (or dispatch 240's full output) as the fixture for
RedTestsparser tests; it is real gate output, not synthesized.Origin
with the four open items named in the prompt
BriefFacts::MAX_GATE_OUTPUT_CHARS (DESIGN, brief_facts.rb:8; ADR-0206 caps
the hook payload, not the brief-fetch path)
sdlc/lib/os_sdlc/pipeline/brief_facts.rb
277f-4747-a5a1-56dc14e19cf5.jsonl
Skeptic gate: not run; the running goal (session 557d47dd) directs a follow-
up ticket for each pipeline defect.
Work started on branch ticket-670 via /os-sdlc:implement.
Resolution
Done: RedTests parses Minitest output into one entry per red test (kind, name, location, message; no traces). red_tests is a BriefFacts fact; the test-reviewer node enriches with it in place of gate_results in both maps. MAX_GATE_OUTPUT_CHARS truncation removed; facts over 20,000 chars carry a BLOAT warning prefix and stay whole.
Evidence: main
ed5073f7via os-sdlc implementation 23: 8 dispatches, 0 retries, all pass; RedTests parses the dispatch-240 fixture to 24 entries; suite green (dispatch 263); worktree finish refreshed plugins.Follow-ups: Amending ADR for ADR-0204 (gate cap) and ADR-0206 (envelope, seven charters) written next in this session. Enrich audit is #676 (blocked by this ticket, now unblocked). No other follow-ups.