fix: restore ayanamsa state and keep tests hermetic
Independent Staging Quality Gate / validate (push) Successful in 21m34s
Independent Staging Quality Gate / publish (push) Successful in 2m1s

This commit is contained in:
Jesse_Chen
2026-09-03 23:22:15 +08:00
parent 027e4b0827
commit c1e3f32a0f
30 changed files with 227 additions and 53 deletions
+9 -3
View File
@@ -1,6 +1,7 @@
#!/usr/bin/env python3
from __future__ import annotations
import argparse
import hashlib
import json
import re
@@ -9,7 +10,7 @@ from pathlib import Path
ROOT = Path(__file__).resolve().parents[1]
OUTPUT = ROOT / "references/oracle/full_technique_invocation_matrix_2026_07_22.json"
OUTPUT_NAME = "full_technique_invocation_matrix_2026_07_22.json"
SCAN_ROOTS = {
"skill": ["SKILL.md", "skills"],
@@ -339,13 +340,18 @@ def _claim_boundary(tech: Technique, claim_status: str) -> str:
def main() -> None:
parser = argparse.ArgumentParser()
parser.add_argument("--output-dir", type=Path, default=ROOT / "references/oracle")
args = parser.parse_args()
packet = build_matrix()
without_hash = dict(packet)
without_hash["content_hash"] = ""
digest = hashlib.sha256(json.dumps(without_hash, ensure_ascii=False, sort_keys=True).encode("utf-8")).hexdigest()
packet["content_hash"] = digest
OUTPUT.write_text(json.dumps(packet, ensure_ascii=False, indent=2) + "\n", encoding="utf-8")
print(json.dumps({"path": str(OUTPUT.relative_to(ROOT)), "sha256": digest, "summary": packet["summary"]}, ensure_ascii=False, indent=2))
args.output_dir.mkdir(parents=True, exist_ok=True)
output = args.output_dir / OUTPUT_NAME
output.write_text(json.dumps(packet, ensure_ascii=False, indent=2) + "\n", encoding="utf-8")
print(json.dumps({"path": str(output), "sha256": digest, "summary": packet["summary"]}, ensure_ascii=False, indent=2))
if __name__ == "__main__":