molecule-ai-workspace-runtime/molecule_runtime/scripts
rabbitblood c43df7f947 fix(precommit): skip during rebase/cherry-pick/merge/revert — unblocks DIRTY PR rebase
Trace from molecule-core cycle 107 (2026-04-24): 15 staging PRs stuck
DIRTY (real merge conflicts) with 0 merges in 1+ hours. Authors couldn't
rebase to fix the conflicts because the pre-commit hook (shipped in
0.1.11) refuses ANY commit that includes forbidden paths in the diff —
including rebase replays of historical commits that pre-date the gate.

Specifically, agents trying to `git rebase staging` on a PR like
"docs(marketing): Phase 30 social copy" fail at the first commit replay
because that commit added marketing/* files. The fix would require
interactive rebase + manual file deletion + commit amend — agents don't
do that, so the PR stays DIRTY indefinitely.

Detection: check .git for rebase-merge/, rebase-apply/, CHERRY_PICK_HEAD,
MERGE_HEAD, or REVERT_HEAD. These state markers exist only during the
corresponding git operation. Skip the hook silently when present.

The hook still blocks fresh `git commit` (the failure mode it was
designed for). It just doesn't try to police what was already in git
history.

Bumped to 0.1.14.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-24 04:34:55 -07:00
..
molecule-gh-token-refresh.sh feat: ship GitHub credential-helper inline in runtime (fixes #1933 class) 2026-04-24 00:41:32 -07:00
molecule-git-token-helper.sh feat: ship GitHub credential-helper inline in runtime (fixes #1933 class) 2026-04-24 00:41:32 -07:00
pre-commit-block-internal-paths.sh fix(precommit): skip during rebase/cherry-pick/merge/revert — unblocks DIRTY PR rebase 2026-04-24 04:34:55 -07:00