Validate repository transaction results

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:58:07 +02:00
parent eaae4357eb
commit 2e16504e1f
3 changed files with 573 additions and 4 deletions

View file

@ -159,9 +159,9 @@ 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`.
llm-connect acknowledgements. Controlled moved-`HEAD` acceptance is prepared
under T03 below; lease-loss cancellation, timeout/signal integration, and
result-close reconciliation remain outstanding. T02 therefore remains `wait`.
## Verify accepted commits and reconcile metrics/reporting
@ -199,6 +199,28 @@ leaves the checkout in its declared state; metrics and required completion
evidence survive a temporary Hub/API outage without duplicating the workload
commit; and docs no longer claim checks that the code does not perform.
### Preparation — 2026-08-23
Extended the production-inert transaction core with an explicit
`RepositoryAcceptancePolicy` and read-only post-run validator. It now requires
same-branch descendant commits within declared bounds, repository-relative path
patterns, a clean index/worktree, unchanged local remote-tracking refs, and an
unchanged digest of protected Git config, hooks, and info metadata. Accepted
evidence contains bounded commit/path lists plus policy, path-set, baseline, and
post-state digests; it retains no prompt or provider output.
Sixteen additional adversarial cases bring the focused transaction suite to 26
tests. They cover a valid one-commit result, unrelated history, excess commits,
ungranted paths, glob boundary semantics, dirty post-state, branch movement,
unchanged `HEAD`, remote-ref movement, Git config/hook changes, and bounded path
evidence. The full suite passes 123 tests with the existing optional
`glas_harness` contract skip.
No current `TaskSpec` or instance-manifest field supplies an authoritative path
grant, so the validator remains deliberately unwired. Defining that versioned
grant surface, metrics atomicity, and required close-evidence reconciliation
remain outstanding; T03 remains `wait`.
## Remove tenant logic from the shared runtime
```task