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:
parent
0e6d795aa4
commit
d00ffcb402
22 changed files with 1218 additions and 148 deletions
|
|
@ -2,8 +2,7 @@
|
|||
|
||||
Wired into `run_task`, profile-absent `execute_approach` mutators, and the
|
||||
profiled claim path under REINAH-WP-0003-T02 / ADR-002. Explicit local
|
||||
TaskSpec grants activate repository acceptance; queued/profiled grant carriage
|
||||
remains an upstream contract dependency.
|
||||
TaskSpec and profiled Activity Core grants activate repository acceptance.
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
|
@ -318,6 +317,24 @@ class RepositoryTransaction:
|
|||
"branch-changed",
|
||||
f"expected={baseline.branch or 'detached'} actual={post.branch or 'detached'}",
|
||||
)
|
||||
if not post.clean:
|
||||
raise RepositoryAcceptanceError(
|
||||
"dirty-post-state",
|
||||
f"entries={post.dirty_entries} status_digest={post.status_digest}",
|
||||
)
|
||||
if post.remote_refs != baseline.remote_refs:
|
||||
raise RepositoryAcceptanceError(
|
||||
"remote-refs-changed",
|
||||
"local remote-tracking refs moved during the transaction",
|
||||
)
|
||||
if (
|
||||
post.protected_git_metadata_digest
|
||||
!= baseline.protected_git_metadata_digest
|
||||
):
|
||||
raise RepositoryAcceptanceError(
|
||||
"git-metadata-changed",
|
||||
"protected Git config, hooks, or info metadata changed",
|
||||
)
|
||||
if post.head == baseline.head:
|
||||
raise RepositoryAcceptanceError("head-unchanged", "no new commit to accept")
|
||||
|
||||
|
|
@ -378,25 +395,6 @@ class RepositoryTransaction:
|
|||
f"count={len(invalid_paths)} paths={visible[:220]}",
|
||||
)
|
||||
|
||||
if not post.clean:
|
||||
raise RepositoryAcceptanceError(
|
||||
"dirty-post-state",
|
||||
f"entries={post.dirty_entries} status_digest={post.status_digest}",
|
||||
)
|
||||
if post.remote_refs != baseline.remote_refs:
|
||||
raise RepositoryAcceptanceError(
|
||||
"remote-refs-changed",
|
||||
"local remote-tracking refs moved during the transaction",
|
||||
)
|
||||
if (
|
||||
post.protected_git_metadata_digest
|
||||
!= baseline.protected_git_metadata_digest
|
||||
):
|
||||
raise RepositoryAcceptanceError(
|
||||
"git-metadata-changed",
|
||||
"protected Git config, hooks, or info metadata changed",
|
||||
)
|
||||
|
||||
acceptance = RepositoryAcceptance(
|
||||
policy_id=policy.policy_id,
|
||||
head=post.head,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue