Skip to content

ci: preserve timing evidence from interrupted Python shards - #6318

Merged
huangruiteng merged 7 commits into
mainfrom
codex/python-ci-critical-path-20261012
Oct 13, 2026
Merged

huangruiteng merged 7 commits into
mainfrom
codex/python-ci-critical-path-20261012

Conversation

@loopx-agent

@loopx-agent loopx-agent commented Oct 12, 2026 •

Copy link
Copy Markdown
Collaborator

Full Python shards need usable timing evidence even when tests fail or the runner interrupts them. Stream pytest-owned phase observations only when the CI plugin is explicitly loaded, and provide a bounded TypeScript log reader that keeps complete failed execution separate from successful qualification and interrupted lower bounds.

Records use a full-node SHA-256 identity and a bounded parameter-free display name. Parent call durations include subtests once; quiet/verbose serial and xdist progress preserve one record per line. The reader accepts GitHub timestamps, ANSI, CRLF and line-leading BOMs from concatenated log chunks, while rejecting malformed identity, duplicate/out-of-order phases and invalid durations. Logs never become a timing cache or a test-selection authority.

Validation: 32 complete observer cases passed on Python 3.11, including serial/two-worker v/q, subtests, interruption, oversized IDs and both plain/BOM negative evidence. The BOM regression reproduced four fixture failures before the fix. The updated reader consumed two untouched real hosted logs: one completed all 5,415 cases with pytest exit 1; one cancelled after 3,657 finished cases remains incomplete with no exit code. Prior default-off parity, full collection/split/coverage and workflow validations are retained; required gates, workers and deadlines are unchanged.

Premerge passed four direct and14 selected checks. Its CLI budget check initially failed because the host interpreter lacked pytest; the exact smoke passed in the source Python3.11 test environment. The initial failed aggregate is retained.

Full hosted qualification remains open: the observed run has failures, cancellation and queued shards. Frozen shared-lane and release-capacity acceptance is unchanged; the change-quality receipt preserves that hold. The previous review binds the old head; this updated head requires its own independent review. No installed or overall release-readiness claim is made.

The related refactor pass reused the existing observer/reader and test fixtures; one anchored transport normalization replaces no semantic owner. Frontend/Lark entry points are unaffected by this internal CI provider diagnostic.

Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>

@loopx-agent loopx-agent left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approval conclusion (author-owned PR; GitHub blocks formal self-approval)

[P2, non-blocking] Reuse the completed-case predicate for longest_cases[].finished. A log with start/collection, passed setup, teardown and end but no call currently returns execution_complete=false and finished_cases=0, while its sole longest_cases entry says finished=true. The aggregate correctly protects incompleteness, so this does not bypass CI or invalidate the real interruption result, but the per-case flag misleads a diagnostic consumer into treating partial work as finished. Use the same predicate as the finished counter and add a regression that checks both fields for the existing missing-call case.

动机

在完整 Python 分片超时或进程被终止后诊断耗时的维护者会遇到这个问题。例如分片仍在逐项执行,但 controller 被终止时 JUnit 和最终 duration summary 尚未生成,维护者只能看到测试名称,无法回读已完成 phase 的原生耗时。 本 head 在明确加载 observer 的 CI 命令中流式保存 pytest 原生 phase 耗时;实际 process-group 中断后,reader 仍能回读一项已完成工作和部分计时,同时明确标记 execution_complete=false。它只提供测量证据,不改变分片、worker、超时、coverage、选择缓存或资格门禁,也不授予 Goal、宿主或 provider 操作权限。真实 hosted Linux logging 成本及中断读回、完整 CI critical-path 改善仍未验证;单例 finished 对缺失 call 的日志与总计不一致,是下面保留的非阻塞修正意见。

改动思路

以改动前 docs/development/testing-and-quality.md、完整冻结基线 c980badbc4f9803099a22dc933691f06761d21a9 的 Quality Layers / 质量分层, Local Validation Environment / 本地验证环境, Pull-Request Baseline / PR 基线 为依据,并结合 owning PR/CI 契约和 S8/S12 路线。三项旧规格约束在当前范围内保留;修改后的文字不作为自己的独立验收 oracle。

JUnit 与最终 summary 都在结束后才写;复用 pytest controller 已有 TestReport 流并提供一个有界只读 reader,能保留中断前的测量。另建 timing cache、改变 splitter 或扩大 deadline 不能解决证据丢失,而且会引入不必要的决策 owner。

本次交付内部 CI 测量与下载日志的只读回读:原资格 owner 不变;partial worker-seconds 是下界,不是 runner-minutes、CPU 或性能改善证明。

具体改动

完整审查 head c5cf3fb034893e710e461d6ed88540541a721fa0。七个文件 +405/-0:一条 workflow load、75 行 pytest adapter、107 行 TS reader、182 行真实进程/损坏输入测试、两份 developer docs 和两处测试环境适配。没有新 job、cache 或 Core capability。

  • pytest_configure(pytest_timing.py:20)只在显式 -p 下注册 controller observer,worker 不重复写报告。
  • TimingObserver.pytest_runtest_logreport(pytest_timing.py:61)消费 pytest 原生 duration/outcome;完整 node id 用 SHA-256,显示前 256 字符,并立即 flush。
  • summarizeTimingLog(pytest_timing.ts:16)验证 start/collection/phase/end 顺序、数量、hash、phase/outcome 和非负有限时长;CLI 限制 32 MiB/200,000 observations,拒绝损坏输入。
  • shard workflow 只新增显式 plugin load;删去这一行后,其余完整 workflow bytes 与冻结 B18 完全相同,包括四分片、每片两 worker、60 分钟、fork permissions、JUnit/coverage 和失败门禁。

573 项相关 Python 测试、11 项 CI 合同、strict TS、Ruff 均独立通过。另用同一私有合成 fixture 实际运行 B-default/H-default/H-enabled 三臂:11 个用例的身份、pass/fail/skip/setup-error 结果和 exit=1 完全一致,默认关态均无 timing rows;on 态 phase 总和与同一次 pytest 的原生 duration cache 精确一致。遍历完成而 exit=1 仍代表失败,没有替代 qualification。

真实 B/H process-group SIGKILL 都发生在 JUnit 生成前。B 无 timing evidence,当前 reader 明确拒绝把它当零成本;H 保留 selected=2、finished=1、部分原生 phase 时长、没有 end/exit/JUnit,并报告 execution_complete=false。原生测试另验证超长共同前缀参数仍是不同 SHA 身份、显示有界,以及缺失、损坏、超量、重复、错序输入。

对主干的风险

上述 P2 是局部诊断标志不一致:passed setup+teardown、无 call 的 incomplete log 返回 finished_cases=0、execution_complete=false,但 longest_cases[0].finished=true。aggregate 没有误报完整或绕过 CI,因此不阻塞已验证的中断测量价值;单例应复用同一 completed predicate,补双字段回归,避免下游分析误用。

CI 命令默认新增明确 observer load,普通 local pytest 仍需要 per-command -p,实际三臂已验证其选择/结果不变。phase 总和是 worker-seconds;partial 是下界,不是 CPU、runner-minutes、完整 elapsed 或性能提升。新增 stdout/序列化的 hosted 成本尚未测量;未继承作者 20,000 合成样本为本次云端证据。

当前 premerge 4 direct、15 selected,其中 14 selected 通过、1 项 advisory_inherited_failure。ratchet 本身仍失败;冻结 B18 独立复现相同未变 goal_frontier 模块预算项和相同 source blob,native 保留继承 advisory,未修改阈值。其余完整 semantic、CLI budget、profile 与 public-boundary 检查通过。advisory 只扫描 core loopx,因此报告 0 changed source 不证明本地 pytest 词汇;Phase/Outcome 复用 pytest owner,事件是本地 CI adapter 合同。

CI 按当前 wait_for_ci=false 未查询或等待;真实 hosted logging/中断、完整 CI critical-path 以及 Windows kill 未验证。现有所有原始失败/qualification holds 保留。这个内部 CI 测量入口没有新的前端/Lark/权限或安装态交付主张。

我的整体评价

APPROVE,保留 P2 非阻塞单例标志意见。维护者已有一个有界真实读取路径,可在进程中断后获取完成工作的测量并保留未完成状态,而原 test/coverage/cache/selection owners 不变;这是现有 CI 诊断的可用增量,不声称性能优化或总体 CI 已完成。

近邻重构不需要新框架:后续复用一个 completed-case predicate 修正两个字段即可。特殊 pytest provider adapter 保留 Python,读回由 TS 拥有;这种归属比重复测试/排序 authority 更小且可回退。关态、真实失败、原生时长和实际中断均独立验证,hosted/安装/merge 授权保持独立。

English verdict: APPROVE — c5cf3fb034893e710e461d6ed88540541a721fa0 is independently qualified for its bounded source-rule/CI-observation outcome. The P2 above is non-blocking; model/installed adoption or hosted-cost/whole-CI qualification remain unverified. This COMMENTED author-account fallback grants no merge authority.

Reviewer: model_agent; gpt-6.1-sol; OpenAI; runtime_reported; reasoning_effort=xhigh

Comment thread scripts/ci/pytest_timing.ts Outdated
…cal-path-20261012

Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>

@loopx-agent loopx-agent left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer: model_agent; gpt-6.1-sol; OpenAI; runtime_reported; reasoning_effort=xhigh

Approval conclusion (author-owned PR; GitHub blocks formal self-approval)

No blocking finding.

[P2, non-blocking] Keep observation rows line-delimited with quiet xdist progress. On this exact head, a real 3-item / 9-parent-report run with python -m pytest -q -n 2 -p scripts.ci.pytest_timing completes with exit 1, but emitted call/end rows are prefixed by progress text (.LOOPX_PYTEST_TIMING and [100%]LOOPX_PYTEST_TIMING). The reader accepts only a prefix at column zero and returns finished_cases=0 / pytest_exit_code=null with only partial phase cost. The configured CI lane uses -v and is independently qualified, and this never bypasses completion or CI gates, so this is non-blocking. Ensure every observation occupies its own line, or document the required verbose mode; add a real quiet/verbose xdist regression.

动机

检查中断 CI 分片耗时的维护者会遇到这个问题。分片还没写完 JUnit 就被取消时,原流程只能看到零散进度;旧观察器又把嵌套子测试当普通 phase,导致日志被当成矛盾记录拒绝。 当前观察器保留收集项的原生耗时,子测试成本只计入父 call;强制中断后仍能读回选中两项、完成一项的部分记录,缺 call 的条目不再标记完成。 该观察结果不替代 JUnit、coverage 或 CI 必过门禁,不进入 timing cache,不改变分片选择,也不代表 runner 成本下降。 当前 hosted 传输与完整 CI critical path 尚未独立验证;quiet 模式的记录前缀丢失已复现并作为非阻塞意见公开;首次三个子进程超时记录保留,原因未确认,未靠延长超时或修改代码取得通过。

改动思路

保留原生 pytest owner 和单个 TypeScript reader;Python 只适配 pytest 插件钩子,过滤其明确的 SubtestReport 类型,复用一个完成谓词即可修复本轮问题,无需新 cache 或第二个 test gate。 完整七文件源码提案是 CI 可观察性增量;独立证明真实分片入口和失败读回,完整 hosted 成本及全量 CI 修复仍由既有 CI owner 验证。

入口为 python-tests.yml pytest -v -n2 -p scripts.ci.pytest_timing → controller TestReport observation → summarizeTimingLog CLI → diagnostic reader。规范状态与副作用由 pytest owns selection, TestReport timing/outcome and exit; local CI observation adapter owns bounded readback; existing workflow owns qualification 拥有;Local observation start→collection→ordered unique setup/call/teardown→optional end; missing/null evidence never becomes successful qualification. One caseFinished predicate feeds aggregate and per-case completion. 架构判断保留现有责任边界,One local observer and bounded reader; no cache migration, state authority or provider framework. 近邻重构判断:Applied bounded simplification in this PR: one caseFinished predicate and typed native SubtestReport exclusion; no new scheduling layer or cache.

具体改动

审查完整 head b3dfe660c0bc8fd49649ca6b176312b7c468e40b,实际冻结 merge base 2e3ab4c4a5665378b9e422f9483a820066fca40b,7files+481/-0,189production adapter lines,239focused test lines, explicit workflow hook and bilingual disclosure.

关键代码讲解

  • TimingObserver.pytest_runtest_logreport(scripts/ci/pytest_timing.py:65):Only parent reports emit cost; full identity hash and bounded payload-free display preserve exact cases.
  • summarizeTimingLog(scripts/ci/pytest_timing.ts:11):Validate record order, preserve unknown/incomplete evidence and share the finished predicate.
  • CI shard pytest invocation(.github/workflows/python-tests.yml:555):Explicit plugin activation on existing complete four-way partitions; gates/cache unchanged.

修改前规格 docs/development/testing-and-quality.md:Quality Layers / 质量分层 → implemented:Independent real entrypoint, native oracle and negative cases;Pull-Request Baseline / PR 基线 → implemented:Current exact whole diff and risk-based required checks;Local Validation Environment / 本地验证环境 → implemented:Selected source interpreter/dependencies and actualminimumpytest。当前修改的说明是披露材料,未用它替代冻结规格。

Own5realruns: B/H default and H-enabled same11test identities/outcomes/exit1; H enabled sum equals same-run native duration cache. Own verbose nested old/head fixture:9parent reports/6subtests, old rejects duplicate phases, H3finished/exit1 and0.1999987069worker-seconds exactly equal its same-run native parent total; nested0.1162699170seconds is not added again. Payload-free displays and distinct hashes verified.

对主干的风险

Owned process-group SIGKILL before JUnit leaves H2selected/1finished/noend/partial while B has no observations; malformed, oversized and contradictory logs reject. Old missing-call counterexample reports per-case finishedtrue despite aggregate0; current same input returns both0/false. CI shard logging intentionally enabled; local phases mirror pytest and do not create a shared vocabulary, scheduler obligation or broader authority. New bilingual docs disclose nested cost, parameter display and qualification limits. Actual local source pytest9.1.1 and independent minimum9.0.3; no hosted CI query/poll/wait, no paid model or benchmark job. Initial3timeouts retained and same575/28full reruns pass unchanged.

本轮原生 risk-based premerge 的直接检查通过,selected 中保留一项 goal_frontier maintainability metric 失败,被当前工具标为 inherited advisory。相同冻结基线先前实际运行同命令失败,致因模块与 smoke 的源码 blob 仍一致;没有改预算、删断言或将失败写成通过。其他选定检查通过。首次575例运行出现3个子进程超时/572通过;同源码不改30秒deadline的575完整复跑及28单独复跑都通过,最低pytest9.0.3另28通过。首次失败保留,未确认历史根因不是本次独立通过的替代物。旧c5cf→新head的完成flag、subtest和display修复与当前base2e3→head七文件整体验收分别判断。

CI按 wait_for_ci=false 未查询、轮询或等待。Useful worker-seconds must not be advertised as complete compute or runner cost; hosted and quiet-mode limits remain, and retries do not erase initial failures. 该观察结果不替代 JUnit、coverage 或 CI 必过门禁,不进入 timing cache,不改变分片选择,也不代表 runner 成本下降。

我的整体评价

APPROVE:当前完整 head 的有限用户结果和责任归属均有独立证据,未发现当前阻塞。long_horizon improved:Independent current real reports and refusal cases preserve usable failure evidence without another scheduler/cache/qualification authority. user_experience improved:A downloaded log can explain completed versus missing work; parent display stays compact while hashes keep exact identities, and diagnostic limitations remain explicit. 当前 hosted 传输与完整 CI critical path 尚未独立验证;quiet 模式的记录前缀丢失已复现并作为非阻塞意见公开;首次三个子进程超时记录保留,原因未确认,未靠延长超时或修改代码取得通过。 完整七文件源码提案是 CI 可观察性增量;独立证明真实分片入口和失败读回,完整 hosted 成本及全量 CI 修复仍由既有 CI owner 验证。 Local adapter Phase/Outcome/event sets reuse pytest semantics; no new shared persisted vocabulary. quiet-mode 意见不影响当前 -v CI 的独立结论。 这是 COMMENTED 作者账户回退,不授予 merge 或部署权限。

English verdict: APPROVE — exact head b3dfe660c0bc8fd49649ca6b176312b7c468e40b. Configured verbose native timing, same-run parent cost, disabled-path parity and actual interruption qualify this observation slice; hosted/full-cost claims remain unverified; the quiet-output limitation is recorded above.

Comment thread scripts/ci/pytest_timing.py
…cal-path-20261012

Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>

@loopx-agent loopx-agent left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer: model_agent; model=gpt-6.1-sol; provider=OpenAI; runtime_reported; reasoning_effort=xhigh.

Approval conclusion (author-owned PR; GitHub blocks formal self-approval)

APPROVE — 当前 9795f25ba40bbde2d2a632d0df23951b65dcfc15 未发现阻塞性问题;此前 quiet 输出 finding 已由独立实际进程验证修复。旧 b3dfe660c0bc8fd49649ca6b176312b7c468e40b 的结论不继承。

动机

查看失败或中断 Python CI 分片的维护者,以及显式加载本地观察器的开发者。 完整 Python 分片在 JUnit 写出前中断会丢失耗时证据;旧 observer 的 quiet 进度还会给记录加前缀,使严格 reader 拒绝已观察到的工作。 新提交在实际 quiet/verbose、串行/双 worker 输出中提供独立完整行,phase 耗时与 pytest 原生记录一致,中断记录仍明确不完整。 原生测试仍决定成功与失败,这些记录只帮助定位已观察成本。Hosted 日志开销、Windows 物理中断和全套 CI critical path 尚未验收;旧矛盾/进度前缀坏日志不能变成合格证据。 No test exclusion, worker/cost/deadline change, new gate, cache, authority, capability UI, retrospective log repair or merge.

改动思路

Python 留在 pytest provider,TypeScript 留在有界诊断 reader;复用原 terminal writer 的行宽和原父项报告类型,不放宽 reader 或另建 timing cache。 本 PR 交付已有 CI 诊断路径的可用观察与严格回读,保留完整分片、worker 数、限时、覆盖率与失败门禁。 先比较最终 JUnit、保留流式观察和宽松日志 salvage:只有流式父项报告能保留已完成工作,而宽松读回会把坏记录当证据。当前选择保持严格 reader;quiet 补行使用 pytest writer 已有事实,不另造路径状态。父项和子测试复用原 SubtestReport discriminator,不能把嵌套 call 重新计费。诊断记录和 execution_complete 都不是 scheduler、test gate 或验收权威。

具体改动

完整 PR 七文件 +495/-0;本轮不只检查最后四行 emitter。判定依据 docs/development/ci-impact-selection.md,不可变版本 509c38c502d3d0b4eafb01550efcdc4b5b5a1d17,并核对同版本 docs/development/testing-and-quality.md 的完整分片与测量边界。Four complete Python shards:implemented,完整 collection/four shards/two workers 保留;Override and evidence:implemented,失败、取消、缺失/矛盾输出仍不能资格化,原 JUnit/coverage/mandatory aggregate 保持。main509 integration 的相关调用者与 workflow 都重新检查,strict reader blob 与 b3 完全一致。

关键代码讲解

  • pytest_timing.py:34 TimingObserver.emit 在 ensure_newline 后读取现有 writer 实际行宽,补 quiet 进度的换行,再写有界 JSON 并 flush;不修改原 report。
  • pytest_timing.py:68 pytest_runtest_logreport 跳过 native SubtestReport 的重复嵌套成本,父项 node-id 的 SHA256 保留身份,显示去除参数并截长。原 detailed test result 仍由 pytest 输出。
  • pytest_timing.ts:15 summarizeTimingLog 校验 start/collection/phase/end 顺序、重复和合法值;汇总完整 predicate 复用于单项和总体,exit1 的完成遍历不等于成功。

对主干的风险

独立实际进程在精确 b3 provider 上复现 quiet 串行/双 worker 均失败、verbose 均通过;当前 H 的四组合可读,耗时等于同次 pytest native cache,而非从 observer 生成 oracle。基线与当前默认关闭臂的11个原生 case 身份、结果和 exit1 一致,无观察输出。实际 POSIX process-group kill 在 quiet/verbose 两模式都留下 selected2/finished1、非零已观察耗时、null final exit 和无 JUnit;不能伪称测试成功或全套成本。

完整 observer/workflow 当前重跑 579 passed /48.22s;独立完整 observer 32 passed /10.34s,覆盖父子测试、setup error、skip、失败、超长参数和损坏输入。最初同 head 全跑为575pass/4个30s xdist超时,仍保留且未声称根因已修复;随后原命令、原断言、原期限的完整重跑、四臂 off/old/head 同原生6-case输入及14实际模式运行给出了当前 changed invariant 的独立证据,未只挑选成功用例。初次独立 TS 调用缺失 node ambient types,补为明确 --types node 的 strict NodeNext 检查后通过,源码和 decoder 未变。

语义与 CI 对齐

本地 native premerge 4 direct,15 selected 中14必需项通过、1可选 maintainability advisory失败;相同 immutable base ratchet 也保留同一 frontier module_metric_budget,未修改限额或删验证。开发 vocabulary advisory 后 full semantic census、public boundary、Ruff/strictTS通过。复用本地 pytest phase/outcome vocabulary,无新共享状态或权限;workflow 只增加显式 -p,collection、worker、60分钟、coverage 和 fork 权限不变。没有查询或等待 hosted CI。

我的整体评价

long_horizon=preserved,user_experience=improved:日志可直接严格读回,部分工作不再伪装成零成本或完整验收,后续测试选择、timing cache 与成本门禁保持。Python 留在 pytest provider,TypeScript 留在有界诊断 reader;复用原 terminal writer 的行宽和原父项报告类型,不放宽 reader 或另建 timing cache。 本 PR 交付已有 CI 诊断路径的可用观察与严格回读,保留完整分片、worker 数、限时、覆盖率与失败门禁。 future-facing pass 复用单一 native 判别与 completion predicate,未加入通用框架。Hosted 日志开销、Windows 物理中断和全套 CI critical path 尚未验收;旧矛盾/进度前缀坏日志不能变成合格证据。 最初超时的历史原因、物理 Windows 和 hosted成本仍未知,但当前同期限完整负载及独立反例覆盖不支持把它们归为该 framing 修复的已知回归。此源码资格不关闭整个 CI/capacity/CQR 未验收边界,也不授权合并。

English verdict: APPROVE. At 9795f25, independently reproduced old quiet failures are repaired through native writer framing; the strict reader, default-off behavior, native outcomes and incomplete evidence boundaries remain intact. Current579/32-case qualification passes; four earlier timeouts remain unroot-caused history, and hosted/Windows/cost acceptance and merge authority remain separate.

Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>

@loopx-agent loopx-agent left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approval conclusion (author-owned PR; GitHub blocks formal self-approval)

动机

中断的 Python shard 需要可信的逐阶段观察,不能把缺少记录当作零成本或执行完成。本次完整评审 head c93b704c19097bdc38ffe23d170a31d918a296c6;依据改动前 docs/development/ci-impact-selection.md @ 509c38c502d3d0b4eafb01550efcdc4b5b5a1d17 的 Four complete Python shards 与 Override and evidence,作者新增文档不作为验收 oracle。

面向维护者及获授权的 CI 诊断操作人员。 原先中断日志缺少可靠 phase cost,旧 reader 丢弃 BOM 记录;当前显式观察保留 native phase/exit,reader 恢复 BOM framing 而仍拒绝矛盾记录。 当前独立实际入口证明 native exit1 与所有 phase/outcome 保留,同一 BOM 输入恢复,重复阶段仍拒绝。 不授予合并权限,不证明整次 hosted CI 成本、CPU 成本、性能收益或旧 timeout 已解决。 Hosted 自然中断、整次成本、物理 Windows 与旧 unrelated shard timeout 原因未验证。

改动思路

复用 pytest 的 collection、TestReport、父级 duration 和 exit status,增加显式 controller observer 与严格 reader。当前 BOM 修复只处理行首一个 BOM,再处理时间戳/ANSI,不放宽 phase、identity 或完整性判断。最小方案是保留原 pytest/gate owner;另建计时缓存或宽松 salvage parser 会引入重复权威。

只读 CI 观察和 framing 修复是本次有界交付。 复用 pytest 和严格 reader 即足够;宽松 salvage 或另建 timing cache 会重复权威并丢失完整性义务。

具体改动

TimingObserver.emit 保证 quiet progress 后独立输出并 flush;pytest_runtest_logreport 排除 SubtestReport 重复计费,完整 nodeid 用摘要绑定、显示不包含参数;summarizeTimingLog 复用同一 case-finished 判断处理缺 call/null timing/缺 end。全七文件与调用链已读。

我的 source 验证是 579 passed,另有严格 NodeNext typecheck、Ruff、完整 semantic/public-boundary 验证。独立真实 pass/fail/skip pytest:base/default 和 head/default 无 timing,enabled 保留全部 native identity/phase/outcome 和 exit1,计时和等于同进程原生报告。把自己的真实记录加 BOM/时间戳/ANSI后,旧 reader exit1,当前 reader 与 plain 的完整 JSON 一致;重复 setup 仍 exit1。serial/xdist 的 v/q framing 与缺 call/end 等负例通过。没有借用作者下载的 hosted 日志或计数。

对主干的风险

current PR boundary 是只读 CI 观察和 framing 修复。工作流除显式 plugin 行外的完整字节保持原样;测试 subprocess 的 PYTHONPATH 只定位此 checkout。四 shard、JUnit/coverage、timeout 和稳定 gate 未改,完整遍历失败仍 exit1。新增 usage 明确 worker-seconds 不是 CPU、完整 runner cost 或性能收益。关闭方式是移除显式 -p。

Premerge 4 direct、14 selected required checks 通过;原 frontier 2007/2000 advisory 仍失败,完整 base/head report 一致且对应 owner/metric 未改,不将它写成通过或调高预算。Hosted 自然中断、整次成本、物理 Windows 与旧 unrelated shard timeout 原因未验证;CI 未查询或等待。future-facing pass 保留 native owner 和共享完成谓词,无需额外框架。

我的整体评价

APPROVE 当前完整 head:旧 quiet-output/per-case-completion 问题和这次 BOM 问题均有当前独立反例及实际入口证据。长程价值是保留可用于下一次排查的真实部分证据,用户收益是分清“失败/未完/缺观察”;不宣称整个 CI 成本或故障已解决。无 actionable code blocker;批准不授予 merge 权限。

English verdict: APPROVE c93b704c19097bdc38ffe23d170a31d918a296c6. Native pytest truth, explicit activation and strict partial-evidence semantics are preserved; same-input BOM recovery is independently demonstrated. Hosted whole-run cost and unrelated failures remain unqualified.
Reviewer: model_agent; gpt-6.1-sol; OpenAI; runtime_reported; reasoning_effort=xhigh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants