Skip to content

fix(report): phase status dot color reflects verdict not execution status#359

Merged
decko merged 3 commits into
mainfrom
soda/325
May 27, 2026
Merged

fix(report): phase status dot color reflects verdict not execution status#359
decko merged 3 commits into
mainfrom
soda/325

Conversation

@decko
Copy link
Copy Markdown
Owner

@decko decko commented May 27, 2026

Summary

Phase status dots in the HTML report now correctly reflect the structured verdict for verify and review phases, rather than relying solely on execution status.

Previously, a verify phase that completed execution successfully (status = completed) but with a FAIL verdict would show a green dot. Similarly, a review phase with verdict REWORK showed a green dot. This misled users into thinking everything was fine when it wasn't.

Changes

  • Template (src/raki/report/templates/report.html.j2): Replaced the single dot_class expression with a multi-branch block implementing priority rules:

    1. Hard execution failures (failed/skipped/superseded) always win over any verdict
    2. verify phase with structured verdict: PASS → green, else → red
    3. review phase with structured verdict: approve/pass/pass-with-follow-ups → green, REWORK → yellow, else → red
    4. All other phases: existing gen>1 → rework logic preserved
  • Tests (tests/test_report_html.py): Added 12 new tests in TestPhaseTimelineDotColoring covering all verdict×status combinations including edge cases where execution status overrides verdict.

  • Changelog (changes/325.fix): Towncrier fragment added.

Acceptance Criteria

  • A verify phase with verdict FAIL and status completed shows a red dot
  • A verify phase with verdict PASS and status completed shows a green dot
  • A review phase with verdict REWORK and status completed shows a yellow dot
  • A review phase with verdict approve/pass/pass-with-follow-ups shows a green dot
  • A review phase with verdict FAIL shows a red dot
  • Hard execution failures (failed/skipped/superseded) take priority over any verdict
  • Existing gen>1 rework logic is preserved for all other phases
  • All 1937 tests pass
  • Lint, formatting, and type checks are clean

Review Results

Specialist Verdict Findings
Test pass 0
Implementation pass 0
Verification pass 0
Review pass 0

Refs #325


Assisted-by: Claude Opus 4.6 (1M context) noreply@anthropic.com
Assigned-by: decko

decko added 3 commits May 26, 2026 20:57
Add tests to TestPhaseTimelineDotColoring covering all verdict×status
combinations described in the plan:

- verify PASS + completed → green dot
- verify FAIL + completed → red dot (currently fails — bug)
- verify PASS + failed/skipped/superseded → status wins
- review approve/pass/pass-with-follow-ups → green dot
- review REWORK + completed → yellow dot (currently fails — bug)
- review FAIL + completed → red dot (currently fails — bug)
- review REWORK + failed → status wins (red)
- non-verify/review phase gen>1 preserves rework logic

Also extend _make_report_with_phases helper to accept output_structured
per phase entry.
…hases

Replace the single-line dot_class expression (line 1384) with a
multi-branch block that checks verdict from output_structured before
falling back to the existing generation-based logic.

Priority rules:
- failed/skipped/superseded status always wins over any verdict
- verify phases: PASS verdict → green (completed), else → red (failed)
- review phases: approve/pass/pass-with-follow-ups → green, REWORK →
  yellow (rework), else → red (failed)
- all other phases: gen>1 completed → yellow (rework), else status

All CSS classes (phase-status-completed, phase-status-rework,
phase-status-failed, phase-status-skipped, phase-status-superseded)
already existed — no style changes required.
@decko decko added the ai-assisted Implemented with AI assistance label May 27, 2026
@decko decko merged commit 74fdf34 into main May 27, 2026
4 checks passed
@decko decko deleted the soda/325 branch May 27, 2026 00:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-assisted Implemented with AI assistance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant