修复 workflow-docs-sync PASS completion 错误成功#14
Merged
Conversation
wlvh
force-pushed
the
agent/workflow-docs-sync-pass-completion-hotfix
branch
from
July 20, 2026 10:08
e9f2fa6 to
544f187
Compare
wlvh
marked this pull request as ready for review
July 20, 2026 10:23
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.
1. 背景与目标
上一版 completion 规格已基本按当时要求实现;本轮是对规格本身的 correctness 修正,不是“修复 Codex 未按要求实现”。
本轮只处理四个边界:
待补充,还要求当前责任 block/cell 非空,并定义轻量 literal-pipe 合同;PR_BODY.md的机械准备责任从 PASS Agent 移回工作流准备阶段。不修改 pin、seal / SUBMIT、reviewer、run/result schema;不新增 receipt、restart、rebaseline、通用 Markdown parser、Threat Model B 或 Shadow Case B/C;不修改 SEC_metrics 旧失败 run。
2. 实现方案
F01:migration-aware PREPARE
validate_refreshable_pr_body镜像 ordinary sync 的 refreshable 边界:sync marker 与 auto pair 必须唯一、闭合;当前 agent section 可完整缺失,但 partial、duplicate、overlap、sentinel 外内容和非 sync body 全部失败;旧 section 顺序只要求 spans 合法且不重叠。F02:non-empty completion
.coding_workflow/diffs/pr_body_skeleton.md派生;每个 current block 必须有且仅有一行非空证据:,且不含待补充。|当分隔符;cell 内字面 pipe 必须写为\|或<br>。none与允许位置的待判断均合法。其他 alignment
harness.PERMITTED_INHERIT_PATHS == set(sync_coding_workflow.PERMITTED_INHERIT_FILES);生产常量不变,没有第三份配置。3. 变更范围
zh/skills/workflow-docs-sync/scripts/harness.pytests/test_workflow_sync_skill.pytests/test_sync_coding_workflow.pyzh/scripts/OPERATIONS.mden/scripts/OPERATIONS.mdzh/skills/workflow-docs-sync/evals/README.md4. Review / 修复记录
证据:、reconcile/execution 空 cell、Remaining 无 payload、未转义 pipe 均失败;具体 evidence、none、允许位置的待判断、具体 decision 与 escaped|均成功。019f7e7c-e952-7643-ac42-225ece901b33migration 内部 heading 兼容
旧 body 的
repo_facts_map可少一个 current heading;PREPARE 保留旧语义内容,PASS_1 Agent 再从当前 skeleton 补入该 heading,completion 成功。scope 仍以 start-pass baseline 为准,schema 则来自 current pinned skeleton,不会被旧 baseline 的 heading 数永久锁死。5. 预算例外与 follow-up
生产 Python 固定统计口径始终为:
zh/skills/workflow-docs-sync/scripts/*.py:harness 1902 行;zh/skills/workflow-docs-sync-review/scripts/*.py:reviewer validator 354 行;zh/scripts/install_skills.py:installer 244 行;原生产硬上限是 2200。本 correctness hotfix 为同时闭合 migration-aware PREPARE、current Repo Facts schema、非空 completion 和 literal-pipe 错误合同,获得一次性 2500 行例外;该例外不构成永久预算上调。
<=2200;不得把代码移到预算路径外规避统计。<=1800,不得删除或弱化独立语义断言。本 PR 不同时进行大规模 consolidation。专项测试当前为 2150 行,符合本 PR 临时上限。
6. 验证
42 passed in 97.15s。ghPATH 专项:22 passed in 93.10s。ghPATH 全量:42 passed in 101.11s。unittest.subTest迭代:42 / 42 / 24;subtest 不计入 pytest collected。git diff --check:通过。Skill is valid!。7. SEC_metrics 新 Case A
baa200f209945bcf5c1918b4ff5e4b08b589c3f8创建;pinned upstream 为本 PR commit544f1877158b123b00cb4d4c9711e5d1558bc21c。d87cfbc815504de09f12711e57e21295。PREPARE 自动创建正式 body,初始 body 与 current skeleton SHA-256 完全一致。证据:和空 reconcile/execution cells 后,finish 以PASS PR_BODY 未完成/证据: 值不得为空失败;active 仍为 PASS_1,completed 仍只有 PREPARE,PASS_1 result 不存在。none、待判断与 escaped\|,并给 owned architecture 加入明确“no SEC semantic repair”的 readiness 探针后,原地 finish 成功。[PREPARE, PASS_1]、activenull、submit_readyfalse;PASS_1 changed paths 精确为PR_BODY.md、architecture.md。PR_BODY.mdSHA-2565e6577a47aeb1013009c3b128e4142eae3c2b1d69e3728ae796b0c0a0d20e439;architecture.mdSHA-256ddc95aa137289288eebf19bb98022c3e08ef754b0bbd1dd61c348589f7e96ef7。2edb59977eb143e5bb9a4555f38e572a未修改。8. 已知限制与回滚
9. 最终自检
origin/main恰好一个 commit,使用 amend + force-with-lease