From d2986f1f5fee0e0ad151fd813b9306873131c805 Mon Sep 17 00:00:00 2001 From: agent-exec-transport Date: Sun, 18 Oct 2026 12:03:23 +0000 Subject: [PATCH] agent-exec transport 2633f16b2b409f0873abdc9c2fc89d4f/40f7d143ac3c --- scripts/evidence.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/scripts/evidence.py b/scripts/evidence.py index e630f523..e53f6861 100644 --- a/scripts/evidence.py +++ b/scripts/evidence.py @@ -297,7 +297,8 @@ def validate_precheck(receipt, purpose="start"): raise EvidenceError("Precheck object capture is incomplete") if receipt["before"]["head"] != current["head"] or after["head"] != current["head"]: raise EvidenceError("Precheck source HEAD has changed") - if after["target_branch"] != current["target_branch"] or not after["target_head"]: + if after["target_branch"] != current["target_branch"] or ( + not after["target_head"] and purpose != "resume-local"): raise EvidenceError("Precheck authoritative target has changed") if purpose != "resume-local" and after["target_head"] != current["target_head"]: raise EvidenceError("Precheck authoritative target has changed") @@ -310,9 +311,10 @@ def validate_precheck(receipt, purpose="start"): if any(obj["branch"] != current["branch"] or obj["target_branch"] != current["target_branch"] for obj in (receipt["before"], after)): raise EvidenceError("Precheck belongs to a different task branch") - git("merge-base", "--is-ancestor", context["r0"], after["target_head"]) + if after["target_head"]: + git("merge-base", "--is-ancestor", context["r0"], after["target_head"]) if purpose == "resume-local": - if current["target_head"]: + if after["target_head"] and current["target_head"]: try: git("merge-base", "--is-ancestor", after["target_head"], current["target_head"]) except EvidenceError: @@ -466,7 +468,7 @@ def main(): if os.environ.get("SRC", "SELF") not in ("", "SELF"): raise EvidenceError("Local evidence is SELF; GATE/REPLAY require external execution identity") if sys.argv[1:] == ["--local-context"]: - context = task_context() + context = task_context(require_target=False) print("[task-state] registered=" + str(context["root"]) + " initial_base=" + context["r0"]) return 0 if sys.argv[1:]: