Build repository transaction core

Assistant: codex
Assistant-Model: gpt-5.6-sol
Assistant-Session: 01a02b6f-7db1-7222-918b-e813a6bda38d
This commit is contained in:
tegwick 2026-08-23 12:31:13 +02:00
parent e4b73a8a78
commit eaae4357eb
3 changed files with 600 additions and 0 deletions

View file

@ -146,6 +146,23 @@ signal cleanup, and close failure; a refused run changes neither repository nor
remote refs; and the result carries a bounded transaction identifier and
baseline evidence.
### Preparation — 2026-08-23
Added the production-inert core transaction primitive in
`rein_aharness/repository_transaction.py`. It keys a private external `flock`
by the resolved Git common directory, captures branch/detached `HEAD`, clean or
dirty index/worktree digests, upstream and remote-tracking refs, and exposes a
bounded transaction/baseline evidence envelope. Ten focused tests cover
cross-process same-repo contention, path aliases, distinct repos, dirty/staged/
untracked baselines, detached `HEAD`, private lock metadata, exception cleanup,
and non-repository refusal.
The primitive is intentionally not wired into `runner.py`, legacy approaches,
or the claim loop while ADR-002 still awaits Activity Core, sand-boxer, and
llm-connect acknowledgements. Lease-loss cancellation, moved-`HEAD` acceptance,
timeout/signal integration, and result-close reconciliation remain outstanding;
T02 therefore remains `wait`.
## Verify accepted commits and reconcile metrics/reporting
```task