Doctor detect and fix closed issues with open workflow labels #145

Closed
opened 2026-05-30 10:04:57 +00:00 by steve · 0 comments
Owner

Problem

Doctor reads issue files through normalized in-memory labels, so closed issues that still carry an open workflow label (open, ready, active, blocked) in frontmatter are invisible to audits and doctor-fix.

Goal

Report workflow label/state mismatches during pnpm backlog:doctor and relabel them via pnpm backlog:doctor:fix --apply.

Acceptance Criteria

  • Doctor warns on closed issues with open workflow labels (and open issues with closed labels)
  • --strict fails when mismatches remain
  • doctor-fix plans and applies relabel to done/abandoned (or open for open issues)
  • Unit tests cover detection and rendering

Validation Commands

  • node --test scripts/issue-sync-lib.test.mjs
  • pnpm test:scripts

Implementation Summary

Doctor scans raw frontmatter labels for workflow/state mismatches (closed+open label, open+done/abandoned). doctor-fix --apply relabels to done/abandoned or open; --strict fails while mismatches remain. Added planWorkflowLabelFixes helpers and unit tests.

## Problem Doctor reads issue files through normalized in-memory labels, so closed issues that still carry an open workflow label (`open`, `ready`, `active`, `blocked`) in frontmatter are invisible to audits and doctor-fix. ## Goal Report workflow label/state mismatches during `pnpm backlog:doctor` and relabel them via `pnpm backlog:doctor:fix --apply`. ## Acceptance Criteria - Doctor warns on closed issues with open workflow labels (and open issues with closed labels) - `--strict` fails when mismatches remain - doctor-fix plans and applies relabel to `done`/`abandoned` (or `open` for open issues) - Unit tests cover detection and rendering ## Validation Commands - `node --test scripts/issue-sync-lib.test.mjs` - `pnpm test:scripts` ## Implementation Summary Doctor scans raw frontmatter labels for workflow/state mismatches (closed+open label, open+done/abandoned). doctor-fix --apply relabels to done/abandoned or open; --strict fails while mismatches remain. Added planWorkflowLabelFixes helpers and unit tests. <!-- backlog:task_id=TASK-BACKLOG-015 source_spec=spec/src/80-maintenance/issues-backlog.md -->
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lapis-notes/lapis#145
No description provided.