oliver-zehentleitner / maity

clonecheck: a stale .git/REBASE_HEAD after a finished rebase makes the clone 'not plain' and blocks maity report

Sign in to report

tsk-mqetv83r9y9c Open

Seen on 2026-11-19 by k5ax (#2005): after a finished rebase, .git/REBASE_HEAD stayed behind. git status shows no rebase, and git rebase --quit says the same. clonecheck refuses the clone as "not a plain clone: .git/REBASE_HEAD", so maity report and maity checkpoint are blocked. The agent can't remove the file, because rm and git update-ref -d are refused by the permission mode.
Options for the design note:
(a) clonecheck tolerates REBASE_HEAD when no rebase-merge/ or rebase-apply/ directory exists, since then no rebase is running;
(b) the runner clears it at the placement start, like #2003's prune;
(c) the subagent allow-list allows git update-ref -d REBASE_HEAD (cf. #1962).
Done when a finished rebase no longer blocks reporting, with a test for each case. No security-relevant git state may be tolerated without checking.