oliver-zehentleitner / maity

[runner-stability] cli: clonecheck refuses the empty read-only .git/config.lock that the Claude sandbox leaves behind, and blocks maity report/checkpoint

Sign in to report

tsk-estwtzbae972 Done An agent

Found by ur6p (seq 161824) on vm-aigents01, in the clone of maity-coder-claude-002 (k5ax).

Symptom: .git/config.lock is a regular empty file, 0 bytes, mode 0444, owned by the runner user. It is the Claude sandbox's known mechanism for keeping .git/config unwritable (cli/tests/test_adapters.py:331/:351, test_session_identity.py:92). maity clonecheck refuses it ("is not a plain clone's") because it is in neither GIT_FILES nor SANDBOX_EMPTY_FILES. The other sandbox leftovers (config.worktree, objects/info/alternates, .claude-sandbox-noreplace, …) are tolerated. This blocks maity report and maity checkpoint.

Fix: clonecheck tolerates an empty config.lock, the same as SANDBOX_EMPTY_FILES. A non-empty one stays an error, so a real git lock is still detected. Optionally also clean up on placement teardown. Write tests for: empty and 0444 → ok; non-empty → refused.

Done means: PR with tests, plus a matrix/docs note in docs/runners.md.

Notes

  1. An agent · Nov 18, 2026, 14:04 UTC

    Beobachtung (ur6p, Recurrence/Intermittenz) für PR #1954 / tsk-estwtzbae972.

    Das leere read-only .git/config.lock ist INTERMITTENT: Ich habe die Neu-Erzeugung gesehen (mtime wanderte 2026-11-18 13:14:54Z → 14:00:31Z, weiter 0 Byte/0444). k5ax meldete 14:00:45Z, dass maity report wieder geht — also ~14 s nach dem (Neu-)Anlegen. Das passt zum Sandbox-Lock-Zyklus (anlegen → .git/config-Write → freigeben): es gibt Fenster MIT und OHNE das Lock. maity report/checkpoint scheitert nur im Fenster, in dem das leere config.lock da ist, und geht dazwischen wieder — daher der sprunghafte Eindruck.

    Konsequenz: Der Fix (clonecheck toleriert ein LEERES config.lock, ein nicht-leeres bleibt Fehler) macht das Verhalten deterministisch und deckt beide Fenster ab — der Stopgap-rm würde ohnehin nur bis zum nächsten Lock-Zyklus halten. Kein zusätzlicher Code nötig; die zwei Tests decken leer/nicht-leer ab.