Harden world-class release gates

This commit is contained in:
yaojingang
2026-06-17 15:50:49 +08:00
parent e503cd6333
commit cece6f9b04
98 changed files with 3067 additions and 2714 deletions
+11
View File
@@ -45,6 +45,17 @@ def run_script(name: str, args: list[str], cwd: Path | None = None) -> dict:
}
def allow_report_status(result: dict, *, allowed_returncodes: set[int] | None = None) -> dict:
allowed = allowed_returncodes or {2}
if result.get("ok") or result.get("returncode") not in allowed or result.get("payload") is None:
return result
normalized = dict(result)
normalized["ok"] = True
normalized["soft_status_returncode"] = result.get("returncode")
normalized["soft_status_reason"] = "report generated with a non-passing evidence decision"
return normalized
def run_adoption_drift_if_source_exists(skill_dir: Path | None = None) -> dict:
target = (skill_dir or ROOT).resolve()
events_path = target / "reports" / "telemetry_events.jsonl"