A-SW Hub / Repositories
Local Gitea · READ ONLY
← 저장소 Repositories
REPOSITORY

kitech/mil-hil-validation Private

[참조 MVP] MIL/HIL 검증 하네스 — 구성요소별 시험 시나리오의 허용오차를 판정하고 감사 가능한 요약을 만듭니다.

https://git.agrithing.ai/kitech/mil-hil-validation.git
8 commits
COMMIT DETAIL

feat: add executable reference MVP

A-SW Reference Factory <[email protected]> · 2026. 8. 2. 오전 7:37:56
7d644286874f19bf6929d775851511641fc27f4f
5 changed files +48 −0 parent 0b3cca6
added asw_component/__init__.py +3−0 View file
@@ -0,0 +1,3 @@
1 + from .component import execute
2 +
3 + __all__ = ["execute"]
added asw_component/component.py +11−0 View file
@@ -0,0 +1,11 @@
1 + from __future__ import annotations
2 +
3 +
4 + def execute(payload: dict) -> dict:
5 + results = []
6 + for case in payload.get("scenarios", []):
7 + error = abs(float(case["actual"]) - float(case["expected"]))
8 + passed = error <= float(case.get("tolerance", 0))
9 + results.append({"id": case["id"], "passed": passed, "error": round(error, 6), "evidence": case.get("evidence")})
10 + passed_count = sum(item["passed"] for item in results)
11 + return {"verdict": "PASS" if results and passed_count == len(results) else "FAIL", "passed": passed_count, "total": len(results), "results": results}
added examples/input.json +16−0 View file
@@ -0,0 +1,16 @@
1 + {
2 + "scenarios": [
3 + {
4 + "id": "TRACK-001",
5 + "actual": 0.18,
6 + "expected": 0.2,
7 + "tolerance": 0.05
8 + },
9 + {
10 + "id": "SAFE-001",
11 + "actual": 0,
12 + "expected": 0,
13 + "tolerance": 0
14 + }
15 + ]
16 + }
added pyproject.toml +8−0 View file
@@ -0,0 +1,8 @@
1 + [project]
2 + name = "mil_hil_validation"
3 + version = "0.1.0"
4 + description = "구성요소별 시험 시나리오의 허용오차를 판정하고 감사 가능한 요약을 만듭니다."
5 + requires-python = ">=3.11"
6 +
7 + [tool.unittest]
8 + test-path = "tests"
added run.py +10−0 View file
@@ -0,0 +1,10 @@
1 + from __future__ import annotations
2 + import json
3 + import sys
4 + from asw_component import execute
5 +
6 + if __name__ == "__main__":
7 + path = sys.argv[1] if len(sys.argv) > 1 else None
8 + with open(path, encoding="utf-8") if path else sys.stdin as source:
9 + payload = json.load(source)
10 + print(json.dumps(execute(payload), ensure_ascii=False, indent=2))