fix: 流水线鲁棒性收尾 + 生产就绪 + preflight 强化#15
Open
yihui504 wants to merge 8 commits into
Open
Conversation
…verification reporter.md template adds '## Original Execution Log' section (output_<defect_id>.log ref) before MRE. verify_defects.py extracts script_name from output_*.log refs to find VERDICT; without it, all defects marked NEEDS_IMPROVEMENT (No VERDICT line) -> retry loop -> retry>=3 downgrade. 实战 chroma 1.5.9 mine A: reporter wrote mre/defect-N-script.py refs, verify_defects 4 regexes don't match -> 11/11 NEEDS_IMPROVEMENT. After fix: Original Log ref enables verify_defects to find log -> 11/11 CONFIRMED -> advance STATE_SAVE succeeds -> DONE.
reporter's '唯一正确执行路径' only listed defect-N.md; agent skipped summary.md, forcing main process to synthesize a minimal summary to pass gate_summary_consistency. Add summary.md to execution path + constraints with strict 'N == defects/*.md count' requirement; gate enforces.
docker-executor实战教训:distroless镜像无python,必须host py+客户端连 容器DB。缺客户端→agent失败跑到一半才报错。preflight提前在session start 用importlib.util.find_spec检查6个target客户端,warn缺失+pip提示。 mechanism替代docker-executor.md的policy报错。
实战bug:summary.md '| Defects Confirmed (Debate Stage 2) | 8 |' 被旧regex captured count=2('Stage 2'的2,应8)。根因:'[^\d\n|]*\|?\s*(\d+)' 允许数字前 有非数字文本,贪婪匹配到第一个数字。修复:按行扫描关键词,取该行最后一个数字 (表格cell的count)。self-check加Stage2陷阱用例验证。
实战bug:host python默认3.8(sqlite<3.35)→ chromadb import失败 + scripts含str|None语法3.8不支持 → cryptic SyntaxError跑到一半才报。 preflight加check_docker_executor_python检测py-3.12/python3.12等3.10+, 无则FATAL提示装3.10+。mechanism替代docker-executor.md Step2的policy检测。
CRITICAL: novelty_gate corrector_layer_check 恢复 'for item in items:'
(P0-12 重构意外删除导致 GitHub corrector 验证层完全失效)
refactor: extract_confirmed 统一到 _pipeline_utils (dedup + novelty_gate 共用)
fix: write_location_check 加 setup_encoding() (Windows cp1252 UnicodeEncodeError)
fix: test_b_side_gates subprocess.run 加 encoding=utf-8
docs: ai_failure_check check_m2 offline 范围文档化 (仅跳 M2)
累积: P0-11/P0-12 schema 双兼容 + P3-18a aggregate_votes 字段丰富化
+ 12 gate/决策器 --self-check 双向信号 + docker TCP healthcheck
+ verify-live-l2 SOP + mine.md direct-probe 兜底
回归: 13 self-check 全过 + pytest 46/46 passed
…_severity (P3-22 + P3-18a+) P3-22: _extract_level 移除 vote key — stage2_severity entry 的 vote 是 is_defect(判断)非级别,先命中会返回 is_defect 而非 severity 真值,导致全投票被误判 trivial/missing。 P3-18a+: defect_type 数据源升级到 stage2_severity.defect_type(Type 分类优先)。 - 新增 _severity_defect_types(sev) helper(与 _severity_levels 并列,同 schema 范式) - run() 优先级链:severity.defect_type (Type) > doc.category (attack) > unknown - self-check 场景 10(3 子案例:severity 优先 / doc fallback / 双缺 unknown) - deslop DRY: 提取 _SEV_META_KEYS 模块常量消除 _META_KEYS 重复定义 Type 分类(Type1_IllegalSuccess/Type2_PoorDiagnostics/Type3_RuntimeFailure/Type4_StateLogic)比 attack 分类(boundary/semantic/state)对 novelty_gate consumer_layer_check 更直接对应缺陷语义。 验证:self-check OK(场景 1-10)+ 双向信号(注入 bug exit 1)+ 11 scripts self-check 全过 + pytest test_b_side_gates 46/46 + architect APPROVE。
glm proxy 环境下 knowledge-extractor/verify-live-l2 agent 频繁 HTTP 400,当前依赖 Stop hook 重试 N 次后降级。env 标志 TESTVDB_PROXY=glm 让 pipeline 启动时即知走 fallback(preflight 检测 + mine.md 文档化触发条件)。 - preflight.py 加 check_glm_proxy(3 状态:standard/glm/未识别,英文 print 适配 Windows cp1252 console) - main() 加调用(check_network 后,check_settings_schema 前) - mine.md Step 4 加 env 标志触发说明 P3-20b(自动 probe + agent SOP fallback 触发)留下轮。 验证:3 env 状态 print 正确 + test_preflight_schema 全过 + architect APPROVE + deslop 无改动。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
7 个 commit 综合收尾:流水线鲁棒性(docker/reporter/gate)、preflight 强化(DB clients + Python 版本)、生产就绪(schema 双兼容 + self-check 双向信号 + novelty_gate CRITICAL 修复 + B7 编码修复)。
Changes(按主题分组)
🔴 CRITICAL regression 修复(本次审查发现)
corrector_layer_check恢复for item in items:循环 — P0-12 重构意外删除导致 GitHub corrector 验证层完全失效(grade_candidate 永远跳过 GitHub 搜索)Preflight 强化(commit e8c7843 / 0baa298)
流水线鲁棒性(commit 3571265 / a2b0463 / c94aedb / 51723ae)
docker/*.ymlper-target VERSION env + host 执行模型澄清gateclaimed_count 取最后一个数字避免 Stage 2 trapreporter要求 summary.md production + Original Execution Log ref 保 gate 一致性生产就绪收尾(commit c8d6884)
extract_confirmed()统一到_pipeline_utils(dedup_defects + novelty_gate 共用,DRY 漂移修复)write_location_check加setup_encoding()(Windows cp1252 UnicodeEncodeError)test_b_side_gatessubprocess.run 加encoding=utf-8ai_failure_checkcheck_m2 docstring 文档化 offline 仅跳 M2(M3-M7 本地检查不跳)--self-check双向信号 + verify-live-l2 SOP + mine.md direct-probe 兜底Test plan
--self-check全过(pipeline_state / verify_defects / verify_live_l1 / check_cache / ai_failure_check / detect_risky_scripts / scan_script_errors / validate_api_format / aggregate_votes / dedup_defects / novelty_gate / passport_verify / postcompact_verify)pytest tests/test_b_side_gates.py— 46/46 passed(含 B7 write_location_check 全 6 case)改动规模
28 files changed, +1467 / -209
备注
check_files.py(untracked,与本次无关)