Assistant: codex Assistant-Model: gpt-5.6-sol Assistant-Session: 01a02b6f-7db1-7222-918b-e813a6bda38d
2.4 KiB
Repository grant contract
Status: v1 parsed, validation-ready, not execution-enabled.
repository_grant is the explicit authority envelope for a bounded local Git
mutation. It is separate from task prose, labels, organizational attribution,
tool profiles, and repository path resolution. None of those inputs may be
interpreted as repository authority.
Version 1
{
"repository_grant": {
"version": "1",
"allowed_paths": ["docs/", "README.md"],
"commit_count": {"min": 1, "max": 1},
"publish": false
}
}
All four fields are required and unknown fields are rejected.
versionis the string"1".allowed_pathsis a non-empty array of unique, repository-relative POSIX patterns. An exact path grants that path; a trailing/grants that directory subtree;*is confined to one path segment; and**may span segments. Absolute paths, parent traversal, backslashes, and.gitgrants are rejected.commit_count.minand.maxare positive integers satisfying1 <= min <= max <= 32.publishmust befalse. Version 1 grants local commits only. Publication needs a future separately reviewed contract with remote/ref and outcome evidence; it cannot be enabled by a label or tool profile.
The parser canonicalizes path order and exposes a stable grant id plus bounded evidence containing only the path count and digest, not the raw grant patterns. The repository acceptance validator converts the grant into the policy used to check descendant commits, changed paths, clean post-state, protected Git metadata, and local remote-tracking refs.
Current fail-closed posture
TaskSpec.from_file parses this contract, but run_task deliberately refuses
any task that supplies it before adapter dispatch. The Activity Core and
issue-core adapters do not currently populate it. Existing grant-absent direct
and compatibility runs retain their prior behavior while the transaction path
remains production-inert.
Execution may be enabled only after:
- an authoritative Activity Core/profile field carries the reviewed grant;
- the lease-bound transaction wraps adapter dispatch and result close;
- the runner validates the accepted result against this exact grant; and
- required close evidence durably records the grant, transaction, and accepted result identities.
Task descriptions, labels, execution_refs, consuming-repo defaults, and
profile absence must never synthesize a grant.