fix: keep goal failure reasons gate-specific
This commit is contained in:
@@ -802,8 +802,13 @@ def run(job_path: str) -> int:
|
|||||||
job = load_json(job_path)
|
job = load_json(job_path)
|
||||||
audit_hash = audit(job, "failed")
|
audit_hash = audit(job, "failed")
|
||||||
emit(goal_id, "H5-governance", "pass", "Failed decision anchored", {"audit_hash": audit_hash})
|
emit(goal_id, "H5-governance", "pass", "Failed decision anchored", {"audit_hash": audit_hash})
|
||||||
emit(goal_id, "H6-agentops", "error", "Orchestration failed", {"reason": reason, "latency_ms": int((time.monotonic() - started) * 1000)})
|
# Keep gate semantics distinct. H2 may report a patch-contract failure,
|
||||||
emit(goal_id, "H7-orchestration", "blocked", "Goal workflow stopped", {"reason": reason})
|
# while H6/H7 must report their own lifecycle state and retain the H2
|
||||||
|
# error only as causal evidence. Reusing `reason` here made the UI show
|
||||||
|
# goal_patch_missing as if telemetry and orchestration independently
|
||||||
|
# failed the patch contract.
|
||||||
|
emit(goal_id, "H6-agentops", "error", "goal_orchestration_failed", {"root_reason": reason, "latency_ms": int((time.monotonic() - started) * 1000)})
|
||||||
|
emit(goal_id, "H7-orchestration", "blocked", "goal_workflow_stopped", {"root_reason": reason})
|
||||||
update_job(job_path, audit_hash=audit_hash)
|
update_job(job_path, audit_hash=audit_hash)
|
||||||
return 2
|
return 2
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user