Repository navigation
test(ci): repair policy payload and probe deadline fixtures - #6407
Conversation
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
loopx-agent
left a comment
There was a problem hiding this comment.
Reviewer: model_agent; gpt-6.1-sol; OpenAI; runtime_reported; reasoning_effort=xhigh
Approval conclusion (author-owned PR; GitHub blocks formal self-approval)
动机
维护者和贡献者运行 CI 策略测试时会遇到这个问题。原夹具遗漏 PR 顶层编号,导致分组检查抛出异常;补齐真实事件字段后,同一策略检查通过。完整相关策略测试可执行,并能拒绝不同 PR 共享分组和背景资格化被取消。不改变 runner、并发、超时、测试范围或发布权限。 这是一个可独立修复的测试缺陷,完整 CI 的超时与 Windows IO 问题仍由原调查继续,不能用本次通过来关闭它们。
改动思路
复用现有事件夹具和表达式适配器,策略仍由真实 workflow YAML 定义。补齐编号后,现有五种事件的分组与取消断言可执行;背景事件主动移除该字段,证明短路条件不会读取不存在的 PR 信息。同一事件内两个 PR 都使用 main ref,仍必须按编号隔离。边界只有一个测试文件,没有新的通用表达式引擎、状态或策略来源;邻近重构检查未发现值得增加的抽象。
具体改动
按预先存在的 .github/workflows/python-tests.yml,revision 14112f36cfa56400851494e4236c84dd74538069 逐项核对:group 已实现事件与 PR 编号分组;cancel-in-progress 已实现 PR/push 替换及背景资格化保护。GitHub 官方 payload 规范 同时定义了顶层 number,不是为本补丁新写的规则。
关键代码讲解
event增加顶层编号,保留此前的嵌套字段及其它 workflow 消费者。test_main_supersession_does_not_cancel_nightly_or_manual_full_qualification在非 PR 事件删除顶层编号,保留原五事件分组和取消断言。test_python_pr_supersession_uses_the_payload_number覆盖两种 PR 分支,在相同 ref 下分别产生101/102分组;refs-only 反例被两项测试拒绝。
全 PR 只有上述测试文件,18行新增、1行替换;没有其它源码、生成物或协议变更。重复覆盖搜索及最近30项同作者提案核对未发现相同修复;本回归直接并入已有策略模块。
对主干的风险
最强反例是五种事件互异但同一事件内两个 PR 相撞:原测试不足以发现,新增等 ref 用例及实际策略反例可拒绝该错误。另一个强制全部取消的反例被原背景保护用例拒绝。相同原模块在 base 为1fail/31pass,当前完整策略与 merge-gate 集合在Python3.11/3.14各43pass、189subtests、零skip;Ruff、mypy19、语义 advisory/full smoke、公共扫描、精确 CQR 和canary4direct/3selected均通过。canary的ci文字匹配选中了通用证据检查,CI语义依靠明确运行的完整策略测试覆盖。评审按 wait_for_ci=false 未读取新托管 CI;局部表达式适配器不证明 GitHub 托管队列、原四片容量、Windows 或完整仓库资格。
我的整体评价
APPROVE,精确 head 7eeb90cc59b6000c64fa0554c654b254e0259d56。本次完成可复现夹具修复及必要的 PR 隔离覆盖,不继承其它提案的结论。long_horizon 与产品 user_experience 在唯一测试路径没有运行时影响,判 not_applicable;贡献者的策略测试可执行性得到修复。无新增共享词汇、开关、权限或决策义务,保持本地测试字段;兼容窗口不适用。仍不授权 merge、安装或发布。head或真实workflow合同变化时重新核验。
English verdict: APPROVE - 7eeb90cc59b6000c64fa0554c654b254e0259d56; fixes the documented payload-number fixture and preserves PR/background isolation. Full policy/gate tests pass on Python3.11/3.14; counterfactual policies are rejected. Hosted qualification and merge authority remain separate.
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
loopx-agent
left a comment
There was a problem hiding this comment.
Reviewer: model_agent; gpt-6.1-sol; OpenAI; runtime_reported; reasoning_effort=xhigh
Approval conclusion (author-owned PR; GitHub blocks formal self-approval)
动机
维护者和贡献者运行完整 CI 时,会被两处不符合实际输入或探测期限的测试夹具挡住。PR 事件缺少顶层编号会让策略检查抛异常;子进程合法启动超过0.5秒又会被成功用例判成超时。修复后,两条路径都能检查实际拥有者规定的结果。策略测试能够拒绝 PR 分组相撞,探测测试能够允许合法启动并拒绝未回收的子进程。不改变生产探测期限、CI分片或60分钟上限、runner容量、发布优先级和操作权限。完整托管 CI 的关键路径、四片资格化与原生 Windows IO 故障仍未解决,不能用这两处夹具通过来关闭原调查。 这是同轮资格化暴露的两处测试缺陷,修复后可继续忠实检查原拥有者规则。
改动思路
复用真实workflow及现有表达式适配器,探测用例调用真实 _run_probe 和共享进程树清理。成功父进程等待子进程记录PID后退出,0.6秒启动延迟仍在产品原有5秒期限内。阻塞、输出过大及继承管道保留短期限,原结果、实际进程列表和停止写入断言全部保留。邻近重构检查把回归放入已有参数行,未增加helper、重复策略或UI操作。
具体改动
已读prechange规范 .github/workflows/python-tests.yml; docs/reference/extensions.md,revision 14112f36cfa56400851494e4236c84dd74538069。group 按事件及PR编号隔离,cancel-in-progress 保护背景资格化,Timeout or either output limit 要求报告停止后整个进程组不能继续效果,三项均implemented。官方webhook规范独立定义顶层编号;已接受主机诊断范围要求隔离、有界观察。没有单独书面的0.5秒成功启动预算,5秒来自此前真实诊断拥有者;本次撤销测试的过度缩短,不增加生产或CI上限。
关键代码讲解
event补齐顶层编号;背景事件移除此字段后仍通过,守卫没有错误读取PR信息。test_python_pr_supersession_uses_the_payload_number让两个PR使用相同main ref,必须形成101/102两个分组;refs-only反例被拒绝。test_probe_reclaims_persistent_descendants_before_return成功关闭沿用产品期限,新增真实延迟启动参数;仍两次检查状态、PID消失及pulse不变。关闭清理会在PID断言失败。
全PR28行新增、5行删除,只有两个已有测试模块;真实YAML、诊断和进程拥有者未改动。全树覆盖搜索和同作者最近30项提案核对未发现重复的慢启动修复,两处同轮失败并入现有提案。
对主干的风险
放宽夹具可能掩盖泄漏,清理关闭反例在实际存活PID断言失败,原pulse及错误结果检查保留。原base普通诊断22pass,但受控0.6秒启动1fail;修复后同样延迟通过,新增回归在0.5秒反例下仍失败。完整集合在Python3.11.17/3.14.8各66pass、189subtests、零skip;Ruff、配置mypy19、语义advisory/full smoke、公私扫描、精确CQR及canary4direct/3selected通过。canary的ci文字匹配选中通用证据检查,真正相关覆盖来自显式策略/诊断集合。真实本地子进程不证明WindowsJob Object或GitHub调度,受控延迟不是原hosted启动迟缓的因果证明。评审遵守wait_for_ci=false未读取或等待新CI。
我的整体评价
APPROVE,精确head fdf42c3688b1c061abab3bc534aa9ef19ae39d4a,problem_context判justified_increment:两处夹具修复可独立验证和撤销,原完整CI调查继续收集超时分片日志、原生Windows实际错误及原拓扑资格化。long_horizon与产品user_experience在这些测试路径判not_applicable,运行时、持久状态及用户操作没有改变,贡献者验证可执行性得到修复。新增参数保持本地夹具词汇,不新增共享协议、权限或决策义务;兼容窗口不适用。旧head结论不继承,当前源码已重新核验;仍不授予merge、安装或发布,head或拥有者变化时重审。
English verdict: APPROVE - fdf42c3688b1c061abab3bc534aa9ef19ae39d4a; repairs two demonstrated fixture defects using existing owners. Relevant tests pass on Python3.11/3.14; bad deadline, leaked child and wrong-policy controls are rejected. Full CI/Windows/capacity acceptance remains open; no merge authority is granted.
loopx-agent
left a comment
There was a problem hiding this comment.
Reviewer: model_agent; gpt-6.1-sol; OpenAI; runtime_reported; reasoning_effort=xhigh.
Approval conclusion (author-owned PR; GitHub blocks formal self-approval)
Exact head: fdf42c3688b1c061abab3bc534aa9ef19ae39d4a. APPROVE。
动机
维护者和贡献者运行本地策略与 Host 诊断测试时会遇到这两处问题。旧事件夹具缺少 workflow 读取的顶层 PR 编号,分组测试直接抛异常;成功关闭子进程的夹具又把生产 5 秒期限缩成 0.5 秒,受控 0.6 秒启动会误报 timeout。补齐编号并使用原生产期限后,完整相关集合通过;同 ref 的不同 PR 仍隔离,背景资格化不被取消,真实子进程在返回前被回收。本次只修两处测试夹具,不改 workflow 策略、生产 deadline、cleanup 机制或权限;原完整 CI、原生 Windows、容量和安装态资格化未完成。
改动思路
复用原 event 与持久子进程测试,实际 YAML 和生产进程 owner 继续决定策略。夹具应表示真实输入及生产期限:给成功关闭路径留原来的 5 秒,同时让有意阻塞、stdout 继承和输出上限路径保留各自短期限。新 .6 秒子进程启动只是受控反例,不作为原 hosted runner 调度原因的证明。小修复足够,没有新增表达式引擎、cleanup helper 或并行政策来源。
具体改动
规格依据 .github/workflows/python-tests.yml,不可变改动前版本 14112f36cfa56400851494e4236c84dd74538069;同 revision 的 loopx/zcode_goal_mode/diagnostics.py 和 loopx/extensions/process_runtime.py 提供原 deadline/cleanup 合同。group、cancel-in-progress、PROBE_TIMEOUT_SECONDS 均 implemented,引用的是原 owner 字段,不新增 roadmap 标准。三项 production/workflow owner 与 base 的 blob 完全相同。
关键代码讲解
eventL18 提供 YAML 读取的 payload-root 编号,并保留嵌套字段。背景上下文主动删除顶层编号,验证短路分支;L88 的两个 PR 事件使用同一个 main ref,仍须得到 PR101/102 各自分组。persistent-descendant fixtureL338 把成功exit_closed留在既有默认期限,新增 .6 秒启动维度;原 timeout、output-limit、pipe 等模式保留。两次实际执行后仍断言真实 PID 不再运行、pulse 不增长,finally 只清理自己产生的子进程。_run_probeL55 未改:隔离 storage、一次单调时钟 deadline、shared owned cleanup 后才返回。生产常量仍为 5 秒;此 PR 没有增加生产或回归预算来绕过失败。
全 PR 两文件 +28/-5。近期 30 项同作者提案及现有相关覆盖已筛查;没有发现同目的重复提案,变更直接并入既有模块。该筛查不是对 30 个完整 diff 的审计。无新模块、协议、权限或用户设置。
对主干的风险
最强反例是“更长测试期限让泄漏子进程看起来成功”,或者“五种事件互异却同事件 PR 相撞”。当前测试仍可拒绝这些结果:禁用 owned cleanup 的私有 mutation 在真实 live-PID 断言失败;折叠 PR 分组和全部取消的私有 mutation 共 3 failed。这些修改都只在私有反例副本,不改变 PR 源或断言。
当前完整 policy、merge-gate 与 diagnostics 集合 66 passed、189 subtests passed、0 skip,18.38s。冻结 base 的两个原模块 1 failed /53 passed,16.20s,失败是缺顶层 number;原成功夹具加同一受控 .6 秒启动后 1 failed /0.62s,得到 timeout 而非 observed。current 完整集合含该延迟 case 并通过;禁用 cleanup 1 failed /1.59s。基线只把 resource ROOT 指向 byte 相同的实际 YAML,production owner 没换。
语义与 CI 对齐
Ruff、diff、开发期 advisory 后全树 semantic、完整两路径公共扫描通过;canary 4 direct /3 selected,0 failure /0 hold。其 ci 字符匹配选中了通用证据检查,相关 CI/cleanup 语义依靠显式完整 66-test 集合覆盖。advisory 未分析出新 vocabulary 不代表动态语义已证明;全树原有 45 unresolved producer 和20/21 cross-runtime 未验限制保留。未查询、轮询、等待或启动 GitHub CI。作者 Python3.11/3.14 结果未冒充本次 Python3.13 执行;本机 Darwin 进程验证不等于 native Windows 或 hosted 全资格化。
我的整体评价
APPROVE,绑定 fdf42c3688b1c061abab3bc534aa9ef19ae39d4a。两处夹具现在能验证原策略和进程生命周期,并保留实际失败反例;旧 COMMENTED 评审针对另一 head,没有被继承。long_horizon 与产品 user_experience 在仅测试路径判 not_applicable;贡献者本地验证可执行性改善。未来维护 pass 选择复用现有参数化 fixture,未发现需要新增抽象的相邻边界。完整 CI 的容量、原超时原因和 Windows IO 调查保持原 owner,合并授权独立。
English verdict: APPROVE — fdf42c3688b1c061abab3bc534aa9ef19ae39d4a. Both existing fixtures now match their unchanged workflow/probe owners. All 66 related tests and189 subtests pass; the original missing-number fixture, controlled slow-start old deadline, disabled cleanup and broken concurrency policies are independently rejected. No production deadline or cleanup policy changed. Hosted/native Windows/capacity qualification and merge authority remain separate.
Goal And Delivered Outcome
Full main CI run 38455015944 exposed two fixture failures: the CI policy fixture omits the payload-root PR number read by the workflow, and the successful ZCode child-cleanup case returns
timeoutafter its artificial 0.5-second deadline.This proposal repairs both existing test fixtures. It supplies the documented PR number, checks isolation for equal refs, and gives successful probe closure the shipped 5-second deadline. One slow-child regression preserves the real process-tree/PID/pulse checks. Workflow and production deadlines remain unchanged.
Author Declaration
Written by: model_agent — OpenAI Codex, GPT-6 family.
Implemented against
Specification: GitHub pull-request webhook payload, read 2026-10-14, and the existing workflow/probe owners at immutable main
14112f36cfa56400851494e4236c84dd74538069.Self-check: inspected actual YAML and real process owner, reproduced the base failures, tested complete related modules and counterexamples. The existing owners are sufficient; no shared expression engine, cleanup helper or parallel policy source is added.
Scope And Continuation
Complete within these two test-fixture repairs. Full CI critical-path/capacity qualification and native Windows permanent-IO diagnosis remain open. Controlled startup delay proves a fixture defect, not the original hosted runner's scheduling cause. There is no claim of four-shard qualification, release-runner reservation, installed behavior or merge authority.
Validation
fdf42c3688b1c061abab3bc534aa9ef19ae39d4apython -m pytest -q tests/test_ci_resource_policy.py scripts/ci/test_review_gate.py tests/test_zcode_host_diagnostics.py: 66 tests / 189 subtests on each Python 3.11.17 and 3.14.8, zero skipscisubstring match; explicit full policy/diagnostics tests provide the relevant coverageFrontend / Visual Evidence
UI impact: none; no product surface changes.
Type of Change / LoopX Area
Test repair; contributor validation and owned-process diagnostics. Bounded S10/S12 reliability maintenance.
Shared-authority RFC fixture impact
N/A: no authority, runtime routing, protocol, provider or persisted-state change.
Boundary Checklist