Commit Graph

17 Commits

Author SHA1 Message Date
pzhang_zywl 1477dbdd18 fix: step3 _normalize_rule 为缺失 section 的 table/text source 补齐字段 - Closes #53
CI / test (pull_request) Successful in 8s
LLM 生成的 source 有时缺少 section 字段,导致 Layer A schema 验证失败。
在 _normalize_rule 中添加防御性处理:从兄弟 source 或 rule path 推断 section。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-02 15:46:59 +08:00
pzhang_zywl 93e13e947c fix: table coverage only counts functional sections + specific missing row feedback - Closes #21
CI / test (pull_request) Successful in 8s
- _quick_validate: table rows only from functional sections
- Track specific missing rows with content for targeted feedback
- _build_coverage_feedback: includes missing row details
- Denominator: 24->18 rows, coverage: 54%->67%

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-01 14:03:59 +08:00
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 ebda8e37d1 fix: step1 空章节过滤 + step3 rule_signature None-safe - Closes #21
CI / test (pull_request) Successful in 9s
- step1 _quick_validate 添加 _has_section_content() 过滤空内容章节
  (如仅含"无"字的图片章节),避免误报低覆盖率警告
- step3 rule_signature 使用 `or {}` 防御 trigger=None 场景
  修复 QE 报告的 step3 AttributeError

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-01 13:15:19 +08:00
pzhang_zywl 788611d299 fix: 修复章节覆盖率误报 + pipeline 验证非阻塞 - Closes #21
CI / test (pull_request) Successful in 8s
- 过滤非功能章节(背景/术语/变更日志/PRD标题等)
- 章节/表格覆盖率阈值从95%改为70%
- 覆盖率不足改为警告,不阻塞pipeline
- parent_issues 改为非阻塞警告
- 仅 format_issues 和 logic_tree missing_paths 阻塞

自测验证: step1 pipeline 通过 (26 function_units, 5/10 sections)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-31 22:44:45 +08:00
pzhang_zywl b679c02e3a fix: 改进覆盖反馈重试 — 更具体的提示 + 诊断日志 - Closes #21
CI / test (pull_request) Successful in 8s
- 反馈文本增加 5 条明确的修复动作指令
- 重试使用 T=0.3(而非 0.0)获得更多样输出
- 添加重试 prompt 长度、新增 sections 等诊断日志
- 重试失败时打印完整 traceback

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-31 22:08:44 +08:00
pzhang_zywl 62266dde4d fix: 修复 trigger.operator null + 添加覆盖反馈重试 - Closes #22, Closes #21
CI / test (pull_request) Successful in 7s
#22: _normalize_rule 补充 trigger 级别 operator (AND/OR) 默认值
#21: step1 验证失败时自动生成覆盖反馈并重试一轮
#22: step2 过滤空规则片段,避免污染下游

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-31 20:20:54 +08:00
pzhang_zywl cb15e7abd0 fix: step1 _quick_validate 增加 section/table 覆盖率检查 - Closes #21
CI / test (pull_request) Successful in 14s
- 新增章节覆盖率检查(functional sections vs covered sections)
- 新增表格行覆盖率检查
- 不达标时输出未覆盖章节列表
- passed 条件增加覆盖率阈值判断

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-31 19:57:08 +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 087ad77f39 fix: 修复 secrets.yaml 路径错误导致 LLM 无法认证 - Closes #15
CI / test (pull_request) Successful in 7s
根因: SECRETS_YAML 指向不存在的路径 (projects/workspace-document-analyzer/...)
修复: 改为多路径搜索 ~/.openclaw/config/secrets.yaml 等。
配套: call_llm 增加响应内容诊断日志。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-31 19:16:27 +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 c2affcad42 fix: 移除 hardcode 输入文件路径,完善输入验证 - Closes #8
CI / test (pull_request) Successful in 9s
- 移除 _DEFAULT_INPUT 硬编码默认输入文件路径
- INPUT_JSON 仅从 IR_INPUT_JSON 环境变量获取
- load_input_document() 无输入时给出明确错误提示
- 新增 test_no_hardcoded_input_file / test_set_input_file_accepts_none

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-31 16:16:49 +08:00
pzhang_zywl 884848f15f fix: 统一输出文件目录结构 - Closes #3
CI / test (pull_request) Successful in 7s
- 新增 PROJECT_OUTPUT (项目根/output/),统一所有输出文件
- IR 中间产物 → output/ir/,最终交付物 → output/final/
- agent_poller.py 新增 pr-status/merge-pr/close-issue/lifecycle 命令
- DEV_AGENT.md 同步更新完整闭环流程
- 更新 conftest/test_sample 中的默认路径

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-31 14:38:37 +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
pzhang_zywl 40567a4fb6 Initial commit: document_analyzer with CI/CD pipeline
CI / test (push) Successful in 30s
- 4 skill pipeline (doc_parser, conflict_detection, ir_generation, resolution_application)
- CI workflow on push/PR (.gitea/workflows/ci.yml)
- Auto-issue on CI failure (.gitea/workflows/auto-issue.yml)
- Pytest smoke tests (tests/test_sample.py)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-29 20:00:26 +08:00