Fix mikado invariant check rejecting close without impl
A close commit with zero preceding impl commits is valid — some leaf nodes involve operational steps (e.g., creating a mirror) with no code changes. Removed the false-positive check. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
14e931591b
commit
1c3bf35dad
2 changed files with 3 additions and 8 deletions
|
|
@ -14,9 +14,8 @@ Checks:
|
|||
1. All commits follow the C2(<chain>): <verb> <description> 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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue