IW-606: A merged card still shows the In Progress badge, because no phase command removes one #614

Merged
mph merged 13 commits from IW-606 into main 2026-09-23 15:03:17 +00:00
Member

Summary

A review-state card could show two or three phase-lifecycle badges at once (In Progress, Review Needed, Complete). Every phase command appended its badge and no command removed the badge before it. So a merged card still said In Progress.

Defect fixed

Phase 1 — Phase-lifecycle badges are only ever added, never removed (#611)

  • New PhaseLifecycleBadge enum is the one owner of the three lifecycle labels.
  • ReviewStateUpdater.UpdateInput.supersededBadges: when a phase command writes a lifecycle badge, it removes every other badge of the family first. The new badge takes the position of the first badge it removes.
  • phase-start, phase-pr, phase-merge (through PhaseMergedCard) and phase-advance use the supersede.
  • Badges outside the family (severity, Phase NN: CI not judged) stay.
  • The --badge / --append-badge / --clear-badges CLI flags do not change.
  • docs/review-state-cards.md documents the rule.

Testing

  • Unit: ReviewStateUpdaterTest, PhaseLifecycleBadgeHarnessTest, and the harness tests of phase-start, phase-pr, phase-merge, phase-advance, PhaseMergedCard.
  • CI ran the full suite on the phase PR #611.

Follow-ups filed

  • #612 — PhaseAdvance.maybeUpdateReviewState repeats the PhaseMergedCard shape.
  • #613 — test/help-intercept.bats has a non-final ! grep -q assertion that bats does not check.

Release notes

Karta úkolu na přehledu teď vždy ukazuje jen jeden stav fáze. Každý krok práce na fázi nyní svůj stav nahradí místo toho, aby jen přidal další štítek. Štítek závažnosti a poznámky ke konkrétní fázi zůstávají beze změny. Plné znění: project-management/issues/IW-606/release-notes.md.

🤖 Generated with Claude Code

Closes #606

## Summary A review-state card could show two or three phase-lifecycle badges at once (`In Progress`, `Review Needed`, `Complete`). Every phase command appended its badge and no command removed the badge before it. So a merged card still said `In Progress`. ## Defect fixed **Phase 1 — Phase-lifecycle badges are only ever added, never removed** (#611) - New `PhaseLifecycleBadge` enum is the one owner of the three lifecycle labels. - `ReviewStateUpdater.UpdateInput.supersededBadges`: when a phase command writes a lifecycle badge, it removes every other badge of the family first. The new badge takes the position of the first badge it removes. - `phase-start`, `phase-pr`, `phase-merge` (through `PhaseMergedCard`) and `phase-advance` use the supersede. - Badges outside the family (severity, `Phase NN: CI not judged`) stay. - The `--badge` / `--append-badge` / `--clear-badges` CLI flags do not change. - `docs/review-state-cards.md` documents the rule. ## Testing - Unit: `ReviewStateUpdaterTest`, `PhaseLifecycleBadgeHarnessTest`, and the harness tests of `phase-start`, `phase-pr`, `phase-merge`, `phase-advance`, `PhaseMergedCard`. - CI ran the full suite on the phase PR #611. ## Follow-ups filed - #612 — `PhaseAdvance.maybeUpdateReviewState` repeats the `PhaseMergedCard` shape. - #613 — `test/help-intercept.bats` has a non-final `! grep -q` assertion that bats does not check. ## Release notes Karta úkolu na přehledu teď vždy ukazuje jen jeden stav fáze. Každý krok práce na fázi nyní svůj stav nahradí místo toho, aby jen přidal další štítek. Štítek závažnosti a poznámky ke konkrétní fázi zůstávají beze změny. Plné znění: `project-management/issues/IW-606/release-notes.md`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Closes #606
A merged card still shows the In Progress badge, because no phase command removes one

Artifacts:
- analysis.md
- issue.md

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A merged card still shows the In Progress badge, because no phase command removes one

Artifacts:
- tasks.md
- review-state.json (tasks_ready)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Issue: IW-606
Phase: 1 - Phase-lifecycle badges are only ever added, never removed

This commit marks the checkpoint for phase 1 context generation.
Use dx-fix IW-606 to return to this point.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Phase-lifecycle badges are only ever added, never removed

Artifacts:
- phase-01-tasks.md

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
docs(IW-606): add release notes
Some checks failed
CI / lint (pull_request) Successful in 14s
CI / changes (pull_request) Successful in 4s
CI / contract (pull_request) Has been skipped
CI / format (pull_request) Successful in 10s
CI / test (pull_request) Has been cancelled
CI / dashboard-build (pull_request) Has been cancelled
CI / compile (pull_request) Has been cancelled
4e35cc65f2
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
chore(IW-606): update review-state to all_complete
All checks were successful
CI / changes (pull_request) Successful in 4s
CI / contract (pull_request) Has been skipped
CI / format (pull_request) Successful in 10s
CI / lint (pull_request) Successful in 16s
CI / compile (pull_request) Successful in 1m39s
CI / dashboard-build (pull_request) Successful in 1m16s
CI / test (pull_request) Successful in 15m47s
dc6733430f
mph merged commit 66c0e9a18a into main 2026-09-23 15:03:17 +00:00
Sign in to join this conversation.
No description provided.