feat: Phase 2 complete — 13 Phases of COBOL type classification and test benchmark

P0.6: gcov infrastructure
P1: extract_structure output expansion (11 new feature fields)
P2: Confusion group rule engine (8 pairs + contradiction + backtrack)
P3: 4-factor confidence calculation + quality gate update
P4: 33+2 COBOL program type test samples (22 files, 7 categories)
P5: parametrized/ test data generation engine
P6: japanese_data.py lookup tables
P7-10: Type-specific test suites (~159 parametrized tests)
P11: Full classification pipeline (classify_program) + orchestrator integration
P12: Documentation (module-interfaces, test-plan v3.0, coverage-matrix)

Architecture decisions:
- classification_pipeline/ merged to hina/pipeline/
- parametrized/ as independent module
- japanese_data.py as root-level file
- hina/__all__ only exports classify_program()

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
hangshuo652
2026-06-19 23:51:55 +08:00
parent 63b5284715
commit bc1d56d1a4
129 changed files with 19378 additions and 261 deletions
+49
View File
@@ -0,0 +1,49 @@
"""Prepare test data for Playwright E2E tests."""
from pathlib import Path
FIXTURES = Path(__file__).parent / "fixtures"
COBOL_GIT = Path(r"D:\cobol-java\jcl-cobol-git")
def prepare():
results = []
# Check simple fixtures
for f in ["simple.cpy", "simple.cbl", "simple.yaml"]:
p = FIXTURES / f
results.append(("OK" if p.exists() else "MISSING", f"fixtures/{f}"))
# Create bad COBOL
bad = FIXTURES / "bad.cbl"
if not bad.exists():
src = (FIXTURES / "simple.cbl").read_text()
bad.write_text(src.replace("STOP RUN.", "THIS_IS_SYNTAX_ERROR"))
results.append(("CREATED", "fixtures/bad.cbl"))
else:
results.append(("OK", "fixtures/bad.cbl"))
# Check COBOL system data
for f in ["member.dat", "rate.dat", "transactions.dat"]:
p = COBOL_GIT / "data/input" / f
results.append(("OK" if p.exists() else "MISSING", f"jcl-cobol-git/data/input/{f}"))
for f in ["validated_tx.dat"]:
p = COBOL_GIT / "data/work" / f
results.append(("OK" if p.exists() else "MISSING", f"jcl-cobol-git/data/work/{f}"))
# Check COBOL programs
for f in ["CRDVAL.cbl", "CRDCALC.cbl"]:
p = COBOL_GIT / "cobol" / f
results.append(("OK" if p.exists() else "MISSING", f"jcl-cobol-git/cobol/{f}"))
# Check Java
for f in ["CrdVal.java", "CrdCalc.java"]:
p = COBOL_GIT / "java/src/main/java/coboljava" / f
results.append(("OK" if p.exists() else "MISSING", f"jcl-cobol-git/java/{f}"))
return results
if __name__ == "__main__":
for status, name in prepare():
print(f"[{status:7s}] {name}")