diff --git a/docs/changelog.d/+fix-mikado-close-without-impl.bugfix.md b/docs/changelog.d/+fix-mikado-close-without-impl.bugfix.md new file mode 100644 index 0000000..f6501ae --- /dev/null +++ b/docs/changelog.d/+fix-mikado-close-without-impl.bugfix.md @@ -0,0 +1 @@ +Fix mikado-branch-invariant-check false positive: close commits without preceding impl commits are valid (e.g., operational tasks with no code changes). diff --git a/mise-tasks/mikado-branch-invariant-check b/mise-tasks/mikado-branch-invariant-check index d8443ba..ffe3d1a 100755 --- a/mise-tasks/mikado-branch-invariant-check +++ b/mise-tasks/mikado-branch-invariant-check @@ -14,9 +14,8 @@ Checks: 1. All commits follow the C2(): convention 2. The invariant ordering is maintained: plan commits come before impl/close 3. No plan commits appear after any impl or close commits -4. Close commits don't appear before impl commits in the same cycle -5. The chain stem in commit messages matches the branch name -6. impl commits don't modify Mikado card files (docs with mikado frontmatter) +4. The chain stem in commit messages matches the branch name +5. impl commits don't modify Mikado card files (docs with mikado frontmatter) Can also be run standalone (no arguments) to validate existing branch history. @@ -233,11 +232,6 @@ def check_invariant(commits: list[dict], chain_stem: str) -> list[str]: seen_impl = True elif verb == "close": seen_close = True - if not seen_impl: - errors.append( - f"{sha_short}: close commit without preceding impl — " - f"leaf nodes should be closed after implementation work" - ) elif verb == "finalize": # finalize is the permitted exception — must be last if i != len(commits) - 1: