From e5efb49dd4a66cd5031612b3314507260f6322c4 Mon Sep 17 00:00:00 2001 From: hangshuo652 Date: Mon, 31 Aug 2026 22:28:53 +0800 Subject: [PATCH] =?UTF-8?q?docs:=20=E6=9B=B4=E6=96=B0=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E6=96=87=E6=A1=A3=E5=92=8C=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AGENTS.md | 2 +- ANCHORED_SUMMARY.md | 4 ++++ README.md | 14 +++++++------- SETUP.md | 14 +++++++------- _AI_USAGE_LOG.md | 12 ++++++++++++ pyproject.toml | 13 ++++++------- pytest.ini | 1 + test-data/s26_regression_check.py | 2 +- tests/test-report.md | 12 +++++++----- 9 files changed, 46 insertions(+), 28 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index a1f34fe..58966f5 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -132,7 +132,7 @@ python -m pytest tests/test_biz_e2e.py -v | 依赖 WSL | `test_biz_e2e.py` | E2E 测试需要 WSL 环境运行 COBOL | | 测试预期与实现不符 | `test_cond.py`, `test_design.py` 等 | 开发过程中的正常现象,不影响核心功能 | -> **注意**:跳过的测试不影响核心功能验证,814个测试全部通过。 +> **注意**:跳过的测试不影响核心功能验证,820个测试全部通过。 ## 关键约束与注意事项 diff --git a/ANCHORED_SUMMARY.md b/ANCHORED_SUMMARY.md index bffae31..a0755bf 100644 --- a/ANCHORED_SUMMARY.md +++ b/ANCHORED_SUMMARY.md @@ -1,5 +1,9 @@ # Anchored Summary — KIN Coverage Improvement +> **说明(2026-08-31 口径统一)**:本文档是 **2026-06 期间针对 9 个 KIN 基准程序的专项覆盖率改进快照**, +> 表内"100%"仅指该批程序在当时的**特定实测**分支覆盖,**不代表平台当前整体覆盖率**。 +> 平台整体口径见 `tests/test-report.md`(当前目标/实测 75%)。 + ## Goal Achieve 100% branch coverage for 9 KIN COBOL programs by fixing branch tree path generation, group-item constraint expansion, and coverage marking. diff --git a/README.md b/README.md index cfac193..d44e1a2 100644 --- a/README.md +++ b/README.md @@ -117,13 +117,13 @@ run.py | 指标 | 数量 | |------|------| -| 核心代码 | 22 个模块,~8000 行 | -| 黑盒模块 | 8 个模块,~5000 行 | -| 测试文件 | 80+ 个测试用例 | -| 基准程序 | 43 个 COBOL 程序 | -| 对应PGMパターン | 16 种,24 个程序 | +| 核心代码 | cobol_testgen 18 个模块,~13,700 行 | +| 黑盒模块 | black-box-data-create 22 个模块,~2,300 行 | +| 测试文件 | 96 个测试文件,885 个测试用例 | +| 基准程序 | 40 个基准目录,83 个 COBOL 源程序 | +| 对应PGMパターン | 16 种 | | 修复数量 | 19 个关键 bug 修复 | -| 设计文档 | 9 个 V3 详细设计文档 | +| 设计文档 | 10 个 V3 详细设计文档 | ### 覆盖率 @@ -131,7 +131,7 @@ run.py |------|--------| | 分支覆盖率 | 75% | | 条件覆盖率 | 75% | -| 测试通过率 | 95%+ | +| 测试通过率 | 820 通过 / 0 失败(885 收集,65 跳过) | ### 技术亮点 diff --git a/SETUP.md b/SETUP.md index 5cc9242..f811f17 100644 --- a/SETUP.md +++ b/SETUP.md @@ -197,16 +197,16 @@ python test-data/s15_coverage_verification.py S15: 17 PASS / 0 FAIL ``` -### 5.2 完整 43 程序覆盖率报告(2-3 分钟) +### 5.2 完整基准程序覆盖率报告(2-3 分钟) ```bash python test-data/s25_per_program_report.py ``` -期望输出末尾: +期望输出末尾(示例,程序数随基准目录变化): ``` -100%: 43 programs -TOTAL 3178 3178 100% +100%: N programs +TOTAL XXXX XXXX 100% ``` ### 5.3 回归快速检查(2 分钟) @@ -217,8 +217,8 @@ python test-data/s26_regression_check.py 期望输出: ``` -Total: 3178/3178 = 100.00% -ALL 43/43 AT 100% — NO REGRESSIONS +Total: XXXX/XXXX = 100.00% +✅ ALL PROGRAMS AT 100% BRANCH COVERAGE — NO REGRESSIONS ``` ### 5.4 指定 COPYBOOK 目录 @@ -459,7 +459,7 @@ echo "=== DONE ===" | 版本 | 日期 | 说明 | |:----:|:----:|------| -| v3.0 | 2026-06-25 | 当前版本。43/43 程序 100% 分支覆盖 | +| v3.0 | 2026-06-25 | 当前版本。全量基准程序分支覆盖达标(平台整体目标 75%) | | v2.0 | 2026-06-20 | 新 PROCEDURE DIVISION 解析器 + 线性路径枚举 | | v1.0 | 2026-06-14 | 初始版本,BrParser regex 解析器 | diff --git a/_AI_USAGE_LOG.md b/_AI_USAGE_LOG.md index 87f5ff9..fd6d88f 100644 --- a/_AI_USAGE_LOG.md +++ b/_AI_USAGE_LOG.md @@ -13,6 +13,18 @@ --- +### 2026-08-31 23:58:00 - 交付归档 +- **范式步骤:** 交付归档 +- **修改摘要:** 统一评审问题4(声称与实现不一致)残留文档口径:ANCHORED_SUMMARY.md 标注为 2026-06 针对 9 个 KIN 程序的专项实测快照(100% 不代表平台整体,整体口径为 75%);README 成果摘要规模数字按实测修正(cobol_testgen 18 模块 ~13,700 行、black-box-data-create 22 模块 ~2,300 行、测试 96 文件/885 用例、基准 40 目录/83 源程序、设计文档 10 个);README 测试通过率改为实测(820 通过/0 失败);SETUP.md 移除硬编码 "43 程序 100%"(改为动态程序数、整体目标 75%);s26_regression_check.py 硬编码 "43/43 100%" 消息改为动态输出;test-report.md 覆盖率表标注为整体口径 +- **涉及文件:** `ANCHORED_SUMMARY.md`, `README.md`, `SETUP.md`, `tests/test-report.md`, `test-data/s26_regression_check.py` +- **使用模型:** deepseek/deepseek-v4-flash + +### 2026-08-31 23:55:00 - AI编码实现 +- **范式步骤:** AI编码实现 +- **修改摘要:** 修复评审问题3残留:pyproject.toml build-backend 由无效的 setuptools.backends._legacy:_Backend 改为 setuptools.build_meta;packages.find include 补齐 data/jcl/quality/parametrized 四个运行时包;新增 [tool.setuptools] py-modules 声明根级模块 japanese_data/orchestrator/orchestrator_db/main;清理 pytest.ini 与 pyproject.toml 重复配置(pythonpath 合并至 pytest.ini);同步 tests/test-report.md 与 AGENTS.md 测试数字(820 passed/65 skipped/885 collected) +- **涉及文件:** `pyproject.toml`, `pytest.ini`, `tests/test-report.md`, `AGENTS.md` +- **使用模型:** deepseek/deepseek-v4-flash + ### 2026-08-31 23:45:00 - 测试验证 - **范式步骤:** 测试验证 - **修改摘要:** 修复pytest模块命名冲突:在tests/hina/和tests/e2e/目录下添加__init__.py文件;配置pytest.ini跳过e2e目录(asyncio冲突);修复test_web_e2e.py/test_biz_e2e.py/playwright导入和浏览器配置(使用firefox) diff --git a/pyproject.toml b/pyproject.toml index 8b56494..ad6efc2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [build-system] requires = ["setuptools>=68.0"] -build-backend = "setuptools.backends._legacy:_Backend" +build-backend = "setuptools.build_meta" [project] name = "verify-cli" @@ -12,12 +12,11 @@ dependencies = [ "pyyaml>=6.0", ] +[tool.setuptools] +py-modules = ["japanese_data", "orchestrator", "orchestrator_db", "main"] + [tool.setuptools.packages.find] where = ["."] include = ["cobol_testgen*", "runners*", "agents*", "comparator*", - "config*", "report*", "storage*", "hina*", "tools*", "web*"] - -[tool.pytest.ini_options] -testpaths = ["tests"] -python_files = "test_*.py" -pythonpath = ["."] + "config*", "report*", "storage*", "hina*", "tools*", "web*", + "data*", "jcl*", "quality*", "parametrized*"] diff --git a/pytest.ini b/pytest.ini index 232f1bc..1d0b2fb 100644 --- a/pytest.ini +++ b/pytest.ini @@ -1,4 +1,5 @@ [pytest] testpaths = tests python_files = test_*.py +pythonpath = . addopts = -v --tb=short --ignore=tests/e2e diff --git a/test-data/s26_regression_check.py b/test-data/s26_regression_check.py index 3d5373d..92b3793 100644 --- a/test-data/s26_regression_check.py +++ b/test-data/s26_regression_check.py @@ -44,4 +44,4 @@ if errors: if below: for b in below: print(f" <100%: {b[0]}: {b[1]}/{b[2]}") if not errors and not below: - print("✅ ALL 43/43 AT 100% — NO REGRESSIONS") + print("✅ ALL PROGRAMS AT 100% BRANCH COVERAGE — NO REGRESSIONS") diff --git a/tests/test-report.md b/tests/test-report.md index 9c90503..66d0094 100644 --- a/tests/test-report.md +++ b/tests/test-report.md @@ -29,14 +29,14 @@ ### 1.3 最新测试结果 ``` -======================== 814 passed, 71 skipped, 3 warnings in 62.83s ======================== +================ 820 passed, 65 skipped, 5 warnings in 69.35s (0:01:09) ================ ``` | 指标 | 数值 | |------|------| -| 收集测试数 | 895 | -| 通过 | 814 | -| 跳过 | 71 | +| 收集测试数 | 885 | +| 通过 | 820 | +| 跳过 | 65 | | 失败 | 0 | | 错误 | 0 | @@ -141,6 +141,8 @@ ### 5.2 覆盖率结果 +> 下表为平台**整体目标/口径**(75%)。单程序实测数据请以 `s25_per_program_report.py` 运行结果为准。 + | 程序 | 分支覆盖率 | 条件覆盖率 | |------|------------|------------| | KIN01INP | 80% | 75% | @@ -213,7 +215,7 @@ python -m pytest tests/test_biz_e2e.py -v - ✅ 非 DB 管道正常运行 - ✅ DB 管道正常运行 - ✅ 覆盖率达到 75% -- ✅ 814个测试全部通过 +- ✅ 820个测试全部通过 - ✅ 0个导入错误 - ✅ 0个测试失败