Skip to content

fix(ci): derive reported shard count from the executing workflow - #6568

Open
loopx-agent wants to merge 1 commit into
mainfrom
codex/ci-declared-shard-topology-20261016
Open

loopx-agent wants to merge 1 commit into
mainfrom
codex/ci-declared-shard-topology-20261016

Conversation

@loopx-agent

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

Copy link
Copy Markdown
Collaborator

Goal And Delivered Outcome

The published ci-impact-plan in run 38779276605 reports four Python shards while that checkout's workflow declares six. The same stale count appears in its job summary.

Read the static shard axis from the immutable workflow at checkout_sha, removing the independent count. The real classifier and unchanged workflow summary now both report six. This corrects declared topology; it does not count executed jobs or change scheduling.

Author Declaration

  • Written by: model_agent — OpenAI GPT-6 family (Codex).
  • Specification and revision: reproduced mismatch above; existing classification/exemption contract in docs/development/ci-impact-selection.md at 7ed24c6c95f9b16f485e57a54d15893ac6079c2f. No separate written specification for the metadata repair.
Criterion Disposition Owner Evidence
Report the executing checkout's declared topology implemented impact_plan.declared_python_shards Real Git fixtures distinguish checkout, candidate head and dirty working file; actual summary consumer renders six
Preserve classification, trust and exemptions implemented Existing impact_plan / review_gate owners Full/forced/non-PR six; docs/presentation zero; existing cumulative-diff, trust, symlink and failure cases retained
Fail on unsupported topology without adding aggregate dependencies implemented Existing classifier adapter Seven invalid shapes fail without a fallback plan; real verify and verify-core run under python -S

Self-check: inspected the final four-file diff, current workflow, contributor rules and code owners. PyYAML stays lazy because only classification installs it; aggregate verification remains standard-library-only. This existing Git/YAML CI adapter remains Python; no new capability, shared vocabulary or control-plane authority is introduced.

Scope And Continuation

Complete within the metadata scope. The YAML matrix remains the single execution owner; resolve its checkout SHA once and reuse it for provenance and projection. No extra abstraction or generated workflow is needed.

Whole hosted Python qualification, duration balancing and runner cost remain outside this repair. The workflow, six execution shards, two workers, timeouts, coverage gates and permissions are unchanged. Existing full-qualification work remains the continuation; this PR does not close it.

Validation

  • Tested revision: 2e2ce2fea300ee55ef7a6ce6f1178d82b5b6036c (commits the verified source unchanged).
  • Run state: finished.
  • Hosted producer and consumer: qualified at merge 8efdcc5a03fd182dae95fcd7343681b3ab377551 (7ed24c6 + this unchanged head); whole-workflow qualification remains incomplete.
  • Input classes: synthetic, public_fixture.
  • Admission readback (2026-10-15T21:38:00Z): all 30 job records are present: 23 successful, one skipped and six Python shards with assigned runners and Run test shard in progress. The six earlier waiting views each linked to the corresponding serialized shard in predecessor run 38780592443. All six predecessors have now terminated; their terminal-to-successor-runner intervals, in shard order, are 3, 53, 3, 6, 3 and 27 seconds, with no same-index overlap observed for this pair. This is real admission evidence for the unchanged six lanes, not a proof of a global concurrency cap, release reservation, CPU cost or billed runner time. The predecessor remains a failed qualification at checkout 649b2b06c0e72e50ab2a148381472e4703975b16: four JUnit reports contain 55 failures; shards 2 and 6 exceeded the 60-minute limit and produced no JUnit. Python coverage is absent, and both pytest and merge-gate reject the incomplete result. These predecessor failures must not be attributed to the current 8efdcc5 checkout. Complete current full-suite results and combined coverage remain unavailable. The earlier 4253-second event-to-checks interval and 2111-second pending interval remain historical admission observations, not test durations.

Hosted execution readback (2026-10-15T22:50:11Z): shards 1–5 succeeded at actual checkout 8efdcc5; its complete Git tree is identical to the author head. All five downloaded JUnit archives match GitHub’s artifact digests and contain zero failures or errors. Every one of the predecessor’s 55 failed test identities is present and passing in their combined reports; identities were matched across shards because partition membership changed. The timing observer records 3,973 / 3,973 / 3,973 / 3,972 / 3,972 selected items, matching distinct phase identities per shard, mutually disjoint sets, no collection mismatch, and exit 0. Their pytest wall times are 1,805–2,638 seconds; this is not CPU or billed time.

The current cohort is now terminal and has not qualified. Shard 6 was cancelled with GitHub’s explicit maximum-execution-time annotation (60 minutes); the recorded job interval is 65 minutes, which is not a CPU-time measurement. Its actual checkout log also identifies 8efdcc5. The observer selected 3,972 items but records only 1,351 distinct phase identities, two with setup and no subsequent call/teardown report. The final log line is at 21:49:47Z, around 33% progress. There is no terminal observer result, shard-6 JUnit or coverage artifact. This identifies an incomplete execution boundary, not an assertion failure or a proven hang root cause. The existing runtime retirement proposal #6561 has a separate source and cohort; both incomplete test identities pass locally there under two workers, which does not qualify this hosted cohort or prove causality.

The pytest aggregate correctly exits 1 because SHARDS_RESULT=cancelled, and merge-gate rejects the failed pytest result. Five coverage databases remain readable; the complete executed union, combined coverage, coverage floor and merge readiness remain unqualified. The historical checkout’s 55 failures and two timeouts retain their own attribution. No extra CI run, worker, test-range or timeout change was used.

Check kind Result Evidence / limit
regression_parity passed Independent six-axis fixture fails against baseline's hardcoded four, passes after repair. All 17 CI unit tests pass, including negative topology/provenance and stdlib aggregate entrypoints.
real_entrypoint passed Real non-PR and normal PR classifier plans at the signed head report six; the unchanged workflow's actual summary program renders six. Other nonrevision plan fields match baseline. Local execution only.
real_entrypoint passed Natural hosted changes job 116600823814 checks out the exact merge above and passes all 17 CI unit tests. Its published ci-impact-plan declares six; the rendered GitHub job summary also shows six. All four changed files are byte-identical to the author head. This qualifies the metadata path; no executed Python shard count or whole-suite success is inferred.
integration passed All 688 workflow/resource/Sonar tests pass. Six real two-worker split fixtures produce complete, disjoint JUnit/coverage; partial or missing reports fail their completeness oracle.
integration passed Local author-checkout collection contains 22,632 distinct cases; all six local pytest-split selections are disjoint and their union is exact for that environment. Collection only, not hosted execution or timing evidence; the hosted Linux inventories are read independently above.
unit passed All eight qualification-summary and coverage-merger tests pass.
static passed Ruff on all changed Python modules, semantic advisory followed by full drift smoke, maintainability ratchet, explicit-path public-boundary scan and whitespace checks pass.

Coverage and gaps: tests cover the changed artifact producer, its real summary consumer, invalid configuration and unchanged qualification boundaries. No full hosted suite or native-platform qualification is claimed. Exact-scope change-quality passes and verifies against this unchanged head/base. Goal-aware premerge passes four direct checks, eight catalog canaries and eight risk-profile checks, with no failures, skips or manual holds. No self-merge authorization. The published exact-head COMMENTED review records APPROVE; that is not a formal GitHub approval or merge authorization. Full hosted CI and exact-head merge readiness remain unqualified on this normal PR.

Frontend / Visual Evidence

UI impact: none. No product viewport or interactive entrypoint changes; existing CI summary text receives the corrected declaration. Frontend/Lark/CLI product capability work is not applicable.

Type of Change

  • Bug fix
  • Documentation update
  • Test update

LoopX Area

  • Build, packaging, installer, or CI

Technical Direction

CI qualification integrity; this repair corrects declaration provenance without claiming full qualification or runner-efficiency acceptance.

Shared-authority RFC fixture impact

N/A: no authority store, provider routing or shared control-plane contract changes.

Boundary Checklist

  • No private state, credentials, raw traces, internal links or local paths in this proposal.
  • No duplicate benchmark work.
  • One reproduced CI metadata defect; original qualification limits retained.
  • UI impact marked none.
  • Every commit carries a DCO sign-off.

Read the immutable checkout matrix for CI plan and summary metadata. Preserve exemption and aggregate-gate behavior, reject unsupported topology, and verify provenance through real Git fixtures.

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=max

Approval conclusion (author-owned PR; GitHub blocks formal self-approval). Exact head 2e2ce2fea300ee55ef7a6ce6f1178d82b5b6036c,真实 Git merge-base 7ed24c6c95f9b16f485e57a54d15893ac6079c2f。

动机

阅读资格检查计划和摘要的维护者,需要知道当前工作流声明了多少个 Python 分片。

同一份声明六分片的工作流,基线计划和实际摘要代码仍显示四片;本 head 的本地真实入口均显示六片,减少维护者逐次核对配置的成本。

分片数字由执行 checkout 的不可变工作流推导,豁免仍为零,资格与调度规则保持原样。

这里只修正既有 CI 元数据,不证明分片实际运行、测试完整通过、时长收益或发布资格。

改动思路

执行工作流已经拥有分片拓扑,因此直接读取其 Git blob,比维护第二个数字或新增状态与同步服务更小且更可靠。 本 PR 的边界是既有 Python Git/YAML 分类适配器、两个薄回归文件和职责文档;工作流矩阵、并发、超时、选择与聚合规则未改。 比起把四改成六,这个19行 helper 去掉了手工同步的知识;比起新增配置或服务,它只延伸当前分类器的读取职责。先求完整不可变 base/head diff 并沿用原 flags,再把执行 checkout 同时用于来源字段与分片轴读取。Python/YAML 留在已有 CI IO 适配器,聚合 gate 的标准库边界保持独立。

本地真实入口 基线 本 head
同一六分片工作流,全量计划与原摘要 consumer 4 6
docs / presentation 豁免 0 0
checkout6、candidate3、未提交文件9 4 6,且仍记录真实 checkout

表格是本次真实 Git/摘要运行结果,不代表任何 hosted job 已执行。前后完整 plan 除不可变 fixture OID 与有意修正的 count 外逐字段相等。

具体改动

采用改动前已接受的规格 docs/development/ci-impact-selection.md,spec_revision 7ed24c6c95f9b16f485e57a54d15893ac6079c2f,而非拿本 PR 新增文案反向定义通过条件。immutable-plan implemented:原完整 diff、flags、source SHA、reason 与 coverage scope 保持;full-qualification implemented:六分片完整资格与显式豁免规则未改;summary-truth implemented:原摘要代码消费真实声明数,文档明确区分拓扑与实际执行。

关键代码讲解

  1. def declared_python_shards 用 git show checkout_sha:workflow 读取已提交 blob,BaseLoader 把标量按字符串处理;只接受唯一 shard 轴且恰为有序1到N。空、重复、缺口、非整数表达、动态轴及 include/exclude/第二轴都不能悄悄生成 fallback 数字。
  2. def plan 把原来的两次来源职责合到同一个 checkout SHA。只有原 python_tests 为真才读取矩阵;docs 和 presentation 路径仍返回零且无需 YAML 包,工作流、选择集合和资格门槛均未触动。
  3. def _verify 是实际下游 gate;它仍要求每个 required job 成功、exempt job 明确 skipped,并拒绝取消、缺失或矛盾结果。本次用真正 python -S review_gate.py verify/verify-core 证明聚合入口未意外依赖分类用 parser。

两个现有薄测试文件补齐来源、拒绝和标准库边界;没有生成测试选择表、拓扑副本、兼容 wrapper 或新模块。有界前瞻整理已通过删除常量4与复用一次 checkout 达成,无需把这项修复扩为调度重构。

对主干的风险

独立执行17个 CI 用例与311 subtests、688个 workflow/resource/Sonar 用例、6个 summary 用例全部通过,无跳过。额外19项独立真实 Git/摘要观察验证普通、forced、non-PR、豁免、candidate/checkout/dirty 三者分离及不支持矩阵;实际基线报告4而当前为6,工作流原有摘要代码也呈现对应差异。这些是本地真实生产入口与 consumer,未查询、轮询或等待 hosted CI。

最强反例是测试与 candidate 恰好都写六片,从而掩盖错误来源;本次将 candidate 改成三片、未提交文件改成九片,真正执行 checkout 仍为六片,结果正确。非法 full topology 在写 plan 前失败,而恶意/不支持矩阵下的 docs/UI 豁免仍可在 -S 下运行。未来 workflow 改为动态或额外维度会显式拒绝,须连同适配器更新;这是有界支持范围,不是成功运行声明。完整 hosted 测试遍历、平台、JUnit/coverage 完整性和耗时并未由本次元数据评审认证。

语义与 CI 对齐

复用既有 plan 字段和 workflow owner;python_shards 表示 declared topology,不能替代 required-job/coverage 条件。没有新共享词表、Goal义务、默认免跑或机器执行权限;YAML 错误是强制拒绝而非“建议”。本次对源与实际 consumer 的配对观察比空 advisory 或未改 registry 更能约束该语义。

我的整体评价

APPROVE。长期推进维度 improved:移除了每次拓扑调整后可能再次漂移的第二数字源;用户体验维度 improved:沿用原计划/摘要就能读到正确声明,不增加导航、填表、确认或手工对账。执行工作流已经拥有分片拓扑,因此直接读取其 Git blob,比维护第二个数字或新增状态与同步服务更小且更可靠。 本 PR 的边界是既有 Python Git/YAML 分类适配器、两个薄回归文件和职责文档;工作流矩阵、并发、超时、选择与聚合规则未改。 正向、错误来源、豁免和失败出口共同支持这个完整的内部维护结果;并未把小修复推断为 CI 性能提升或更大路线图完成。

English verdict: APPROVE — exact head 2e2ce2fea300ee55ef7a6ce6f1178d82b5b6036c. Derive declared shard metadata from the immutable executing workflow while preserving qualification, exemptions and standard-library aggregates. Independent base/head Git and actual summary comparisons distinguish4 from6;17 CI tests/311 subtests,688 workflow/resource tests and6 summary tests pass. Hosted execution, timing and complete platform qualification remain unclaimed; this review grants no merge authority.

This branch has not been deployed

No deployments
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.

1 participant