fix: validate_gas_thin_adapter_v1.py — audit JSON 필드명 매핑 수정
audit_gas_thin_adapter_v1.py(Phase-1) 출력 형식(summary.forbidden_count, summary.total_functions)을 올바르게 읽도록 elif audit 브랜치 수정. 수정 전: forbidden=0, coverage=0.0 → gate=FAIL 수정 후: forbidden=23, coverage=100.0, migration_plan=true → gate=PASS Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -116,6 +116,20 @@ def main() -> int:
|
||||
function_inventory_coverage_pct = 100.0 if rows else 0.0
|
||||
sample_findings = rows[:200]
|
||||
elif audit:
|
||||
# audit_gas_thin_adapter_v1.py (v2) 출력 형식 지원:
|
||||
# summary.forbidden_count, summary.compliance_pct, migration_candidates
|
||||
summary = audit.get("summary", {})
|
||||
if summary:
|
||||
forbidden_function_count = int(summary.get("forbidden_count") or 0)
|
||||
total_functions = int(summary.get("total_functions") or 0)
|
||||
function_inventory_coverage_pct = 100.0 if total_functions > 0 else 0.0
|
||||
candidates = audit.get("migration_candidates", [])
|
||||
sample_findings = [
|
||||
{"file": c.get("file",""), "name": c.get("name",""),
|
||||
"responsibility": c.get("responsibility",[])}
|
||||
for c in candidates[:200]
|
||||
]
|
||||
else:
|
||||
forbidden_function_count = int(audit.get("forbidden_function_count") or 0)
|
||||
function_inventory_coverage_pct = float(audit.get("function_inventory_coverage_pct") or 0.0)
|
||||
sample_findings = audit.get("rows")[:200] if isinstance(audit.get("rows"), list) else []
|
||||
|
||||
Reference in New Issue
Block a user