Extract TestReport and LintReport presenters from the brief and gate parsers #808
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#808
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
Four parsers turn test or lint output into short reports, and they live in namespaces for one caller each:
ADR-0211 measured the gain: dispatch 240 had 24,627 characters of gate output, and 71% of it was backtrace.
Brief::RedTestskeeps only the failure kind, name and message. Other readers still get raw output. The programmer node gets the fullgate_resultstext with no cap (query/brief/facts.rb:49,presenter/brief/gate_output.rb). The orchestrator will need a short test report for the failure block in #806. A new reader must either find a parser in another caller's namespace or write its own.Reproduce
n/a: design ticket.
Approach
One report object for each output type, independent of the caller:
TestReporttakes overBrief::RedTests,RedTestLineandMinitestSummary.LintReporttakes overBrief::LintOffenseandGate::LintViolations. The test-reviewer brief output does not change. When no failure block parses, for example a load error,TestReport#linesreturns the first lines of the raw output so that no failure goes unseen.Required work:
TestReportwithparse,lines(limit:)andsummary. Move theBrief::RedTests,RedTestLineandMinitestSummarycallers to it.LintReportwithparseandlines(limit:). Move theBrief::LintOffenseandGate::LintViolationscallers to it.grep -rnE "RedTests|RedTestLine|MinitestSummary|LintOffense\b|LintViolations" plugins/os-sdlc/libprints nothingRejected: keep the parsers where they are and call
Brief::RedTestsfrom the orchestrator presenter — the name then describes the first caller, not the thing.Acceptance criteria
TestReportrenders it, then it lists both test names and messages and no backtrace lines.TestReportrenders it with a limit, then it returns no more than the limit.TestReportrenders it, then it returns the first lines of the raw output.TestReportgives its summary, then it returns the runs, assertions, failures and errors line.LintReportrenders it, then it lists each offense with its file, line, cop and message.Owner sketch
Non-goals
Switching the programmer node from
gate_resultstoTestReport. The programmer may need the full output; measure first.Origin
Briefnamespace for one caller ← DESIGN (ADR-0211,parser/brief/red_tests.rb)plugins/os-sdlc/lib/os_sdlc/parser/brief/red_tests.rb,plugins/os-sdlc/lib/os_sdlc/parser/minitest_summary.rb,plugins/os-sdlc/lib/os_sdlc/parser/brief/lint_offense.rb,plugins/os-sdlc/lib/os_sdlc/parser/gate/lint_violations.rbWork started on branch ticket-808 via /os-sdlc:implement.
Resolution
Done: TestReport (parse, lines(limit:), summary) and LintReport (parse, lines(limit:)) added; all callers moved; Brief::RedTests, RedTestLine, MinitestSummary, Brief::LintOffense, Gate::LintViolations deleted; load-error fallback returns the first 15 raw lines; test-reviewer red_tests output unchanged. Implementation 67 escalated on the suite time budget under load (tests green) and required work 1-3 was hand-finished.
Evidence: main
5766b0ff(commit5dcc15c7, merge8eb9c66a). Ticket check grep on plugins/os-sdlc/lib prints nothing. Full os-sdlc suite: 1296 runs, 0 failures, 0 errors, 14.7 s. Rubocop: no offenses on changed files.Follow-ups: none new; the suite budget under load is #813; the behavior-verifier passing without required work 1-3 was noted by session b505a812 for the #808 amendment and is not ticketed here
Follow-up for the behavior-verifier gap noted at close: #814 (required-work gate runs each check: command).