init: company-haness 설계

This commit is contained in:
DongHyeonka
2026-07-23 17:49:00 +09:00
parent 57d1bab894
commit f668d6a158
962 changed files with 98989 additions and 1 deletions
+30
View File
@@ -0,0 +1,30 @@
"""benchmark 입력(brief·rubric·fixtures·evidence-pack) sha256 — controller 주입 감사·재현용."""
import hashlib
import os
def sha256_file(path):
h = hashlib.sha256()
with open(path, "rb") as f:
for chunk in iter(lambda: f.read(65536), b""):
h.update(chunk)
return h.hexdigest()
def sha256_tree(root):
"""디렉토리 정규화 hash: (상대경로, 파일hash) 를 경로 정렬해 연쇄."""
h = hashlib.sha256()
for rel in sorted(os.path.relpath(os.path.join(dp, fn), root)
for dp, _, fns in os.walk(root) for fn in fns):
h.update(rel.encode())
h.update(sha256_file(os.path.join(root, rel)).encode())
return h.hexdigest()
def benchmark_input(brief, rubric, fixtures_dir, evidence_pack_dir):
return {
"brief-sha256": sha256_file(brief),
"rubric-sha256": sha256_file(rubric),
"fixture-set-sha256": sha256_tree(fixtures_dir),
"evidence-pack-sha256": sha256_tree(evidence_pack_dir),
}