A merged card still shows the In Progress badge, because no phase command removes one #606
Labels
No labels
agent-ready
bug
contract
documentation
duplicate
enhancement
good first issue
help wanted
invalid
needs-human
needs-input
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
iterative-works/iw-cli#606
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?
Found during IW-601 phase 4, which asked how long a badge it wrote would stay on the card.
WHAT HAPPENED. After all four IW-601 phases merged,
project-management/issues/IW-601/review-state.jsonreads:The card is merged and still says In Progress. The dashboard shows both states at once, and one of them is false.
ROOT CAUSE. Every phase-lifecycle command appends its badge and removes nothing:
core/commands/PhaseStart.scala:155appendsIn Progresscore/commands/PhasePr.scala:697appendsReview Neededcore/commands/PhaseAdvance.scala:277appendsCompletecore/commands/PhaseMergedCard.scala:61-67appendsComplete, andPhase NN: CI not judgedwhen the merged head carried no verdictAll four use
ArrayMergeMode.Append. The only remover in the codebase is the human-facing--clear-badgesflag (core/commands/ReviewState.scala:578).NOT A PILE-UP.
mergeArrayde-duplicates bylabel(core/model/ReviewStateUpdater.scala:161-171), so four phases give oneIn Progress, not four. The defect is that the badge never leaves, not that it multiplies.WHY IT SURFACED NOW. IW-601 phase 4 adds a warning badge for a merged head with no CI verdict. No command removes a badge, so a badge reading
CI not judgedwould stay on the card and become false in every later phase. The phase worked around this by labelling itPhase NN: CI not judged, which stays true forever. The workaround is sound; the gap it works around is not fixed.REQUESTED FIX. Decide the lifecycle of a lifecycle badge. The phase-lifecycle badges (
In Progress,Review Needed,Complete) describe one mutually exclusive state, so a transition should replace them rather than add to them; badges that record a fact about a specific phase (Phase NN: CI not judged) are cumulative and must stay. A per-badge choice at each write site, or an owned-set replace for the lifecycle family, both satisfy this — the decision is which.This matters for the dashboard work: a card whose badges contradict each other cannot be read at a glance.
Type: bug
Filed from:
/home/mph/Devel/iw/iw-cli-IW-601on branchIW-601