feat(SDD-012): backlog-integrity guard for vault task files#183
Merged
Conversation
Add check-backlog-integrity.sh: flags duplicate ticket IDs and status contradictions (same ID marked both open and done) in 11-tasks.md, enforcing one-ticket-one-entry. Wired into the vault.sh dispatcher (check-tasks) and a GUI-independent vault-health.sh section so drift auto-surfaces at SessionStart. Sibling of SDD-006 check-md-escapes.sh (incident->guard). Portable sed+awk, fixture-tested. The 11-tasks.md consolidation to green is a tracked follow-up (AC5).
mlorentedev
added a commit
that referenced
this pull request
May 31, 2026
mlorentedev
added a commit
that referenced
this pull request
May 31, 2026
…or number reuse (#185) The number-only match false-positived two different tickets sharing a number (e.g. BUG-020-pwsh-profile vs BUG-020-splitpath). Match DUPLICATE/CONTRADICTION by the full bold id instead; report number reuse across different tickets as an advisory NOTE that does not fail. Parsing moved fully into awk (portable, no sed/tab). Follow-up to #183; refines the archived SDD-012 guard.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Ships the root-fix for backlog drift: a guard that enforces one ticket = one entry so
11-tasks.mdcan't silently re-diverge after a cleanup. Sibling of SDD-006 (check-md-escapes.sh) — same incident→guard shape.The drift it prevents: a sprint-overview view was layered on top of the older detailed entries, so 34 ticket IDs appeared 2+ times and the views disagreed (e.g.
IDEAS-007/SDD-004marked both open and done; the count read 63 open vs ~35 real).How
scripts/check-backlog-integrity.sh— takes<tasks-file>..., flags per file:DUPLICATE(same ID on 2+ entry lines) andCONTRADICTION(same ID marked both[ ]and[x]). Exit0/1/2. No Obsidian dep. Portable (sed -nE+ plain awk, no gawk-only features). Greedy[a-z]?keepsWIN-002adistinct fromWIN-002.scripts/vault.sh— newvault check-tasks <path>...dispatch.scripts/vault-health.sh— new GUI-independent section7/7 Backlog Integrityscanning every10_projects/*/11-tasks.md, so the drift auto-surfaces at SessionStart.tests/check-backlog-integrity.bats— 6 fixture tests (dup, contradiction, clean+sub-id, usage, missing, dispatcher).Verification
bats tests/check-backlog-integrity.bats→1..6allokshellcheck+bash -nclean on all 3 scripts11-tasks.md→ exit 1, 30 duplicates + 3 contradictions correctly identified (proves it works on production data, not just fixtures)Acceptance criteria
SDD
specs/SDD-012-tasks-integrity-guard/(scaffolded with--force-no-vault— vault busy; the SDD-012 backlog entry + consolidation land in the AC5 follow-up, tracked in the spec, not skipped)specs/archive/SDD-006-vault-integrity-check/