feat(runtime): consume governed Activity Core closes

Assistant: codex
Assistant-Model: gpt-5.6-sol
Assistant-Session: 01a06ba0-10aa-7ea0-b20a-4f3fac39efe9
This commit is contained in:
tegwick 2026-09-04 19:54:07 +02:00
parent 0e6d795aa4
commit d00ffcb402
22 changed files with 1218 additions and 148 deletions

View file

@ -1,7 +1,7 @@
# Repository grant contract
Status: **v1 enabled for local `TaskSpec` files; queued/profiled carriage is
not yet available**.
Status: **v1 enabled for local `TaskSpec` files and profiled Activity Core
rows**.
`repository_grant` is the explicit authority envelope for a bounded local Git
mutation. It is separate from task prose, labels, organizational attribution,
@ -53,16 +53,18 @@ Granted runs require durable external metrics and refuse `--no-metrics`. Their
metrics are written outside the checkout only after acceptance, so a successful
run remains clean. See [external-metrics.md](external-metrics.md).
Activity Core and issue-core adapters do not populate `repository_grant`.
Queued/profiled runs therefore cannot claim repository acceptance under this
contract. Existing grant-absent direct and compatibility runs retain their
legacy `HEAD`-changed behavior during migration.
Activity Core revision `b63131e` added strict definition admission and separate
queue carriage. The claim client parses that exact v1 field, refuses malformed
authority, and requires `harness_profile_ref` whenever a queued grant is
present. Profiled success applies the same repository acceptance policy and
external metrics contract as a local granted run.
Queued/profiled execution may use this contract only after:
1. an authoritative Activity Core/profile field carries the reviewed grant;
2. required close evidence durably records the grant, transaction, and accepted
result identities.
Before sending a profiled terminal result, the worker durably records the exact
run, transaction, worker, action, and bounded result. Response-lost closes are
replayed without repeating workload code and Activity Core distinguishes exact
reconciliation from terminal, evidence, owner, state, and lease conflicts.
Grant-absent compatibility runs retain their legacy result behavior during
migration.
Task descriptions, labels, `execution_refs`, consuming-repo defaults, and
profile absence must never synthesize a grant.