Commit Graph

6 Commits

Author SHA1 Message Date
pzhang_zywl da17b3b3b2 fix: rule_signature conditions=None防御 + 0行表格覆盖率 + UT覆盖 - Closes #21
CI / test (pull_request) Successful in 9s
- step3 rule_signature: trigger.conditions=None 时使用 `or []` 防御
- step1 _quick_validate: total_rows=0 时行覆盖率设为 100% 而非 0%
- test_step1: 新增 TestHasSectionContent (10个) + TestQuickValidateEmptySections (2个)
- test_step3: 新增 TestRuleSignature (7个) + TestNormalizeRule (4个)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-01 13:29:25 +08:00
pzhang_zywl 82b6184691 fix: step3 添加 _normalize_rule 修复 trigger 缺失/null operator - Closes #22
CI / test (pull_request) Successful in 7s
- 新增 _normalize_rule 函数,对合并后的 rules 进行标准化
- 缺失 trigger → 补充默认 trigger + conditions
- trigger.operator 为 null → 默认设为 "=="
- trigger.conditions 为空 → 补充默认 condition

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-31 19:53:41 +08:00
pzhang_zywl f2f85b984f feat: agent_poller 所有评论/PR 自动附加 [DEV_AGENT_ID] 签名
CI / test (pull_request) Successful in 7s
- agent_poller.py 读取 DEV_AGENT_ID 环境变量(默认 da-01)
- comment/close-issue/create-pr 自动附加 [da-XXXX-XXXX] 签名
- start_dev_agent.sh 启动时设为 da-MMDD-HHmm,token 改为从环境变量读取
- DEV_AGENT.md 文档说明签名机制
- test_step2 修复 trigger=None 边缘情况

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-31 19:27:25 +08:00
pzhang_zywl 8069fc2f8a fix: pipeline LLM 全失败时明确报错而非静默输出空 IR - Closes #15
CI / test (pull_request) Successful in 7s
- step1: 所有 LLM 调用返回空 function_units 时抛出 RuntimeError
- step1: main() 在 _quick_validate 未通过时 sys.exit(1)
- step2: function_units 为空时提前报错终止
- step3: fragments 为空时提前报错终止
- test: test_step1 捕获 SystemExit, test_step2_5/step3 空数据改为 skip

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-31 17:41:16 +08:00
pzhang_zywl 682dedb4b4 fix: 完善 UT 覆盖,统一 pytest 测试发现 - Closes #2
CI / test (pull_request) Successful in 9s
- 新建 pytest.ini 统一 test discovery(tests/ + skills/ir_generation_skill/tests/)
- test_step1~3 转换为 pytest 兼容格式,无输出文件时自动 skip
- 新增 tests/test_detect_conflicts.py(18 个纯函数单测)
- 新增 tests/test_config.py(7 个配置模块单测)
- CI 改为 pytest -v 使用 pytest.ini testpaths
- DEV_AGENT.md 新增 PR 提交规范

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-31 00:07:07 +08:00
pzhang_zywl fec4c09ee0 sync: update all skills from latest workspace code
CI / test (push) Successful in 8s
doc_parser_skill:
- New: verify_flowchart.py (flowchart validation)
- Updated: LLM.py (multi-provider: DeepSeek + DashScope)
- Updated: image_parser.py (logic tree support, external prompts)
- Updated: SKILL.md, prompts/image_prompt.md

conflict_detection_skill:
- Updated: LLM.py (multi-provider sync)
- Updated: detect_conflicts.py (logic tree text conversion)

ir_generation_skill:
- Replaced old scripts/LLM.py + ir_generator.py with standalone project
- New: main.py, config.py, step1-3_*.py, ensemble_merge.py
- New: prompts/, tests/ subdirectories

tests:
- New: acceptance/ test suite with schema validation
- Fixed: conftest no longer globally skips non-acceptance tests
- Updated: test_sample.py for new ir_generation structure

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-30 22:45:08 +08:00