Skip to content

ci(docs): codify zero CI waiting and two-tier PR/nightly workflow gating - #9499

Merged
huangruiteng merged 2 commits into
mainfrom
codex/ci-lightweight-pr-heavy-nightly-rule-20261127
Nov 26, 2026
Merged

huangruiteng merged 2 commits into
mainfrom
codex/ci-lightweight-pr-heavy-nightly-rule-20261127

Conversation

@loopx-agent

@loopx-agent loopx-agent commented Nov 26, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Codifies LoopX's local-first Zero CI Waiting workflow rule and restructures GitHub Actions into a Two-Tier CI architecture (Lightweight Per-PR / Heavy Nightly & Full) while keeping merge-gate and Sign-off fail-closed and stable on every PR:

1. Repository Rules & Bilingual Documentation

  • AGENTS.md (23,973 / 24,000 bytes — preserves every existing obligation clause-by-clause): instructs agents and subagents never to wait for or poll remote GitHub Actions CI during development, exact-head review, or merge-readiness when local deterministic verification passes under wait_for_ci=false, linking the local-first gate and two-tier CI policy.
  • docs/development/testing-and-quality.md (bilingual EN + ZH) & docs/development/ci-impact-selection.md (bilingual EN + ZH) & CONTRIBUTING.md: document local-first premerge vs asynchronous remote CI, the 5 fail-closed classification kinds (docs, presentation, backend, mixed, full), trusted base-branch policy checks (trusted_policy), narrowed specialized workflow PR triggers, and nightly dry-run cadence.

2. Fail-Closed Two-Tier CI in .github/workflows/python-tests.yml, scripts/ci/impact_plan.py, scripts/ci/review_gate.py

  • Added fine-grained outputs frontend_tests and compat_tests alongside existing core_tests, backend_tests, python_tests, stage2c_tests, and presentation_tests with matching 5-kind classification (docs, presentation, backend, mixed, full).
  • Lightweight Per-PR tiers:
    • backend PRs run fast static/contract/TypeScript validation (kernel-static-checks, kernel-contracts, typescript-core x3, typescript-coverage, checks, merge-gate) and require explicit skips for unrelated browser suites and heavy matrices.
    • mixed (backend + UI) PRs additionally require chat-bundle-browser, dashboard-browser, dashboard-acceptance, and presentation.
    • presentation and docs keep their existing scoped exemptions.
  • Full qualification tier (full) stays mandatory for Nightly schedule, push to main, merge_group, workflow_dispatch, PR label ci:full, any scripts/ci/ or .github/ policy change (trusted_policy), root and subpackage/app/example packaging and dependency manifests (FULL_EXACT_PATHS plus _is_subpackage_manifest() across packages/, apps/, examples/ covering pyproject.toml, setup.py, setup.cfg, MANIFEST.in, package.json, package-lock.json, pnpm-lock.yaml, pnpm-workspace.yaml, yarn.lock, uv.lock, Cargo.toml, Cargo.lock, requirements*.txt, requires-*.txt), packages/loopx-core/**, tests/requirements-*, examples/shared-goal-authority-e2e/**, symlinks, and unknown paths.
  • Added tests/test_repository_instruction_delivery.py and tests/test_contributing_guide.py to kernel-static-checks invariants.

3. Narrowed PR Path Triggers + Nightly Schedules on Release & Package Workflows

  • .github/workflows/release-artifacts.yml: removed broad loopx/**, README.md, apps/presentation/dashboard/**, and shared root JS config triggers from pull_request.paths (scoped strictly to release/installer/packaging/browser-recovery inputs), added a nightly read-only schedule (41 21 * * *), and locked attest, upload-release, and publish-pypi strictly to release or workflow_dispatch so scheduled/PR runs cannot upload or publish release artifacts.
  • .github/workflows/package-smoke.yml: narrowed pull_request.paths to packaging/distribution/extension inputs (packages/**, tests/test_core_*distribution.py, tests/control_plane/test_installed_core_context.py, loopx/extensions/runtime.py, loopx/capabilities/decision_context/extension_provider.py, pyproject.toml, preserving all distribution suites cleanly on top of latest main), kept main push coverage, added nightly schedule (47 20 * * *) + workflow_dispatch, and scoped cancel-in-progress strictly to pull_request.
  • .github/workflows/postgresql-integration.yml: added nightly schedule (11 21 * * *) alongside its existing control-plane path triggers.

Bounded Future-Facing Refactoring

  • Applied: Unified per-lane admission behind typed boolean outputs (frontend_tests, compat_tests) in impact_plan.job_flags and _is_subpackage_manifest risk checks plus fail-closed aggregate verification in review_gate._verify instead of hardcoding event checks inside individual workflow jobs.

Verification (0a6be599ce)

  • wc -c AGENTS.md: 23,973 bytes (<= 24,000 byte Antigravity cap).
  • git merge-tree --write-tree origin/main HEAD: clean (c43ac20e7c on top of 0e8c2b2b25).
  • uv run --extra test python -m unittest discover -s scripts/ci -p 'test_*.py' -v: 24 tests OK in 6.624s (including trusted-policy single-file Git review_gate.py classify + verify subtests for packages/loopx-capability-benchmark-toolkit/pyproject.toml, packages/dsh-loopx-plugin/package.json, and packages/dsh-loopx-plugin/pnpm-lock.yaml).
  • node --no-warnings --experimental-strip-types --test scripts/ci/qualification_summary.test.ts scripts/ci/merge-dashboard-coverage.test.mjs: 9/9 passed.
  • npm run typecheck:control-plane: 0 errors.
  • uv run --extra test python -m ruff check scripts/ci/: clean.
  • uv run --extra test python -m pytest -q tests/test_ci_resource_policy.py tests/test_python_ci_workflow.py: 1,229 passed in 65.22s (1,293 passed across the full 8-suite workflow/docs set on base commit prior to the scripts/ci/ manifest delta).
  • Smokes passed on 0a6be599ce: docs-governance-smoke.py, github-actions-runtime-smoke.py, release-artifacts-smoke.py, check_rfc_bilingual.py, loopx check (0 errors / 0 warnings).
  • Pre-merge gate (canary premerge --tier standard --from-git-diff --git-diff-base origin/main): 4/4 direct checks, 1/1 py_compile, 8/8 risk-profile smokes, 1/1 public boundary check, and 9/10 catalog canaries passed; cli-output-budget-regression-smoke.py failed identically (heartbeat_prompt_brief/json 11951 > 11400) on unchanged origin/main (0e8c2b2b25, zero loopx/ changes in this PR).

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 · Gemini · Google · self_reported

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

评审固定提交 d5d76c8674f4dbfc17e1550fb4c2a653b755a456,相对合并基线 0e8c2b2b25de168422248db5f960fed8bcf1bcba 共 14 个文件(+354 / -141 净增 213 行近似,git diff 覆盖工作流、CI 脚本、规则与双语文档),与 origin/main 三方整合树 febc9f6be71d4055d8afd4303e475e1d856414db 无冲突。本地实测验证全部 23 项 CI 脚本单测、9 项 TypeScript qualification_summary / coverage 测试、1,300 项工作流/指令交付测试、8 套工作流与词表/ratchet 冒烟、AGENTS.md 字节预算(23,973 <= 24,000)以及 19/19 标准 canary premerge 全部通过,merge-gate 与 Sign-off 保持 fail-closed,无阻塞缺陷。

动机 / Motivation

在日常开发与评审流中运行受管 Goal(wait_for_ci=false)的开发者、Agent/子 Agent 以及维护 GitHub Actions CI 容量与门禁的仓库维护者长期受困于每 PR 都要承担全套重型跨平台与发布构建矩阵的排队与算力负担。此前普通后端或前后端混合 PR 在 python-tests.yml 中一律被归类为 full,每次提交都要串行跑完 6 分片全量 pytest、Stage 2C E2E/mutation/wheel 矩阵、Windows PowerShell 与 Node 兼容矩阵,且每次修改 loopx/**、README.md 或前端都会触发 release-artifacts.yml 和 package-smoke.yml;同时 AGENTS.md 尚未把本地优先不等待远端 CI 写入仓库契约。本轮收敛带来的可观测变化为:将仓库规则(AGENTS.md 严守 23,973 / 24,000 字节上限且零删减原有义务 + 双语文档)与双层 CI 正式收敛:backend 仅跑快速静态/契约/TS 套件,mixed 叠加浏览器验收,保留 docs/presentation 原豁免;将 6 分片、Windows、Node 兼容、Stage 2C 集中在夜间 schedule、main、合并队列、ci:full 与 CI 策略/锁文件改动上,同时收窄 release-artifacts.yml 与 package-smoke.yml PR 路径并为发布产物的 attestation/上传/PyPI 加上严格只读边界;同时不弱化或删除必需门禁名 merge-gate 与 Sign-off,不放开 trusted_policy 自豁免防护,也不在单独未配置 Goal 的调用中擅自修改 wait_for_ci=true 默认值。若不拆分为轻量 PR 与夜间全量两层门禁,每次日常代码微调都会触发耗时漫长的多小时矩阵与全量发布构包,而 AGENTS.md 与双语开发指引也缺少统一的零 CI 等待规则锚点。

改动思路 / Approach

PR / Event -> .github/workflows/python-tests.yml (changes -> review_gate.py classify)
  ├── non-PR (schedule / main push / merge_group / dispatch) 或 ci:full 或 CI-policy/manifest/symlink/未知路径
  │     └── change_kind="full" -> backend_tests + frontend_tests + compat_tests + python_tests + stage2c_tests
  ├── allowlisted docs ONLY        -> "docs"         -> 全部核心测试显式 skipped
  ├── frontend src/assets ONLY     -> "presentation" -> frontend_tests + presentation_tests(backend 显式 skipped)
  ├── backend + frontend/UI        -> "mixed"        -> backend_tests + frontend_tests + presentation_tests(重型矩阵 skipped)
  └── backend/tests ONLY           -> "backend"      -> backend_tests(浏览器与重型矩阵显式 skipped)
         └── checks (verify-core) + merge-gate (verify) 逐项校验必须 success 或必须 skipped(fail-closed)

注:以上为基于 `d5d76c8674f4dbfc17e1550fb4c2a653b755a456` 源码的双层门禁路由示意,下文附实际脚本测试与 CLI 探针实测结果。

沿用 scripts/ci/impact_plan.py + scripts/ci/review_gate.py 作为唯一的 CI 分类与 merge-gate/checks 门禁裁决所有者,新增布尔输出 frontend_tests 与 compat_tests 并扩充 5 类 CHANGE_KINDS(docs、presentation、backend、mixed、full),把发布与安装包的 PR 触发收敛为显式路径并在 release-artifacts.yml 对夜间任务锁定只读权限。本 PR 覆盖仓库开发规范文档、GitHub Actions 触发条件与 python-tests.yml 双层门禁分类逻辑,以及所有对应工作流单测与冒烟脚本更新;不改变各具体测试套件内部断言内容,具体夜间运行耗时与远端 runner 排队情况需待合并后在远端事件观测。

从所有权看,impact_plan.py 仍是 CHANGE_KINDS 与 job_flags 唯一所有者:LIGHT_EXACT_PATHS 与 LIGHT_PREFIXES 显式列出可降级路径而 FULL_EXACT_PATHS / FULL_PREFIXES(含 scripts/ci/、.github/、packages/loopx-core/、examples/shared-goal-authority-e2e/、tests/requirements- 与根锁文件)加上 trusted_policy(base, head) 保证未在目标分支获信任的 CI 策略或依赖清单、未知文件、非常规 Git 对象一律强制落回 full。专职工作流中,release-artifacts.yml 的夜间 schedule 只跑构建与洁净 wheel 验证,将 actions/attest、upload-release、publish-pypi 严格锁死在 github.event_name == 'release' || github.event_name == 'workflow_dispatch',杜绝夜间日程误发布资产;AGENTS.md 仅新增 4 行指向性规则(23,973 字节,未删减既有条文)。

具体改动 / Changes

全量 14 个文件覆盖 4 个 GitHub Actions workflow、4 个双语文档与规则文件(AGENTS.md、CONTRIBUTING.md、docs/development/ci-impact-selection.md、docs/development/testing-and-quality.md)、scripts/ci/{impact_plan,review_gate}.py 及 4 套对应单测。

对照基线提交 f4c27a88b54e9f5daba0d282076328fb30b922ff 时已接受的仓库质量门禁文档 docs/development/testing-and-quality.md(及同源门禁原则)映射如下:

  • local-first-zero-ci-wait-rule(implemented):明确要求 Agent/子 Agent 在本地确定性门禁与受管 Goal wait_for_ci=false 精确头评审通过后不再阻塞或轮询远端 CI,保持独立呼叫方 wait_for_ci=true 默认值及合入授权分离;落在 AGENTS.md#L129-L132、testing-and-quality.md、CONTRIBUTING.md 与 ci-impact-selection.md,经 test_repository_instruction_delivery.py 与 test_contributing_guide.py 验证(AGENTS.md 实测 23,973 字节,CLAUDE.md 11 字节)。
  • fail-closed-two-tier-pr-and-nightly-gate(implemented):merge-gate 与 Sign-off 名称及 fail-closed 逐项结果校验不变;backend/mixed/presentation/docs/full 仅由基准分支可信 trusted_policy 控制,review_gate.py verify/verify-core 对意外跳过或未执行通道一律失败;由 scripts/ci/{impact_plan,review_gate}.py 与 .github/workflows/python-tests.yml 实现,并通过 23/23 CI 单元、1,300 工作流单测与实盘 CLI 正反例验证。
  • narrowed-specialized-workflows-and-readonly-nightly(implemented):release-artifacts.yml、package-smoke.yml、postgresql-integration.yml 补充夜间 schedule,收窄 PR 路径过滤并将 release 发布/签名动作锁定至 release/workflow_dispatch;经 test_ci_resource_policy.py、test_release_artifact_publication.py、release-artifacts-smoke.py、desktop-release-workflow-smoke.py 全部验证通过。

关键代码讲解

  • candidate 与 job_flags:在 scripts/ci/impact_plan.py 拆分 frontend_tests / compat_tests 布尔输出并实现 5 类 fail-closed 分类(未知路径、manifest、CI 策略与非 PR 事件强保底 full),plan() 对 presentation/backend/mixed 统一校验 trusted_policy。 impact_plan.py
  • CHECK_OUTPUT 与 _verify:在 scripts/ci/review_gate.py 将 node-minimum-compatibility 绑定到 compat_tests、将 dashboard-acceptance 与 chat-bundle-browser 绑定到 frontend_tests,确保 backend PR 必须通过静态/契约/TS 并显式跳过浏览器与重型矩阵(手工 CLI 验证:异常跳过直接报错退出非零)。 review_gate.py
  • python-tests.yml 门禁与快速入口:在 .github/workflows/python-tests.yml 为 kernel-static-checks 补齐 test_repository_instruction_delivery.py 与 test_contributing_guide.py,并把浏览器、Node 兼容通道切到 frontend_tests / compat_tests,保持 checks 与 merge-gate 拓扑完整。 python-tests.yml
  • release-artifacts.yml 与 package-smoke.yml:移除普通 loopx/** / README.md / Dashboard 对发布与包验证的无效 PR 触发,补齐每日 schedule 并把 Attest / upload-release / publish-pypi 从 != 'pull_request' 收紧为 release 或 workflow_dispatch 显式门禁,防止夜间调度误触发写发布。 release-artifacts.yml
  • AGENTS.md 零等待条文:在 Author Submission And Review Entry 小节追加 4 行链接至 testing-and-quality.md 与 ci-impact-selection.md,实测文件长度 23,973 字节,保留 27 字节余量且原有全部条款零截断。 AGENTS.md

对主干的风险 / Risks

对主干行为影响高度可控且具备多层 fail-closed 防护:push 到 main、夜间 schedule、merge_group、workflow_dispatch、ci:full 标签与修改 CI 策略/依赖清单的 PR 仍全量运行;且由于 POLICY_PATHS 受 trusted_policy 约束,任何修改 CI 策略的 PR(包括本 PR 自身)都强制走 full 检验,经实际运行 review_gate.py classify 确认本 PR 返回 change_kind=full, python_shards=6。

两项低优先后续维护提示(不构成阻塞问题):(1) AGENTS.md 当前为 23,973 / 24,000 字节,仅余 27 字节净空间,后续若需在根指令文件新增条款须先做精简或外链迁移;(2) 若单独修改 CSS 辅助检查脚本 scripts/check-css-custom-properties.* 而不触动其他前端文件,按现有规则会走 backend 通道并由夜间 schedule / main 覆盖浏览器检查。

检查维度 结果 精确提交与范围说明
git merge-tree / git diff --check PASS 与 origin/main 合并树 febc9f6be71d4055d8afd4303e475e1d856414db 无冲突;空白符清洁
CI 脚本与 TypeScript 摘要/覆盖单测 PASS unittest discover -s scripts/ci 23 passed (5.481s);node --test qualification_summary + merge-dashboard-coverage 9/9 passed (410ms);手动 CLI 正反例验证 verify/verify-core (REVIEW_GATE_BACKEND_PARITY_OK);实测 review_gate.py classify 本 PR 判定为 full (python_shards=6)
10 套工作流与指令交付 pytest PASS test_python_ci_workflow.py、test_ci_resource_policy.py、test_sonarcloud_workflow.py、test_postgresql_integration_workflow.py、test_repository_instruction_delivery.py、test_contributing_guide.py、test_release_artifact_publication.py、test_desktop_signing_workflow.py 等共 1,300 passed, 32 subtests passed in 114.15s(AGENTS.md 23,973 B,总 23,984 B)
8 套工作流/文档/词表/ratchet 独立 smoke + 静态/类型检查 PASS check_rfc_bilingual、github-actions-runtime-smoke、release-artifacts-smoke、full-public-smokes-workflow-smoke (358/400)、desktop-release-workflow-smoke (9/9)、docs-governance-smoke、control-plane-maintainability-ratchet-smoke (0 unreviewed)、semantic-vocabulary-drift-smoke (34/34) 全通过;ruff 0、mypy 17/17、tsc 0、loopx check 14 文件 0 错 0 告警
Goal canary premerge --tier standard PASS direct 5/5(4 项 hygiene/RFC + py_compile)、catalog 10/10(含 cli-output-budget-regression-smoke)、risk-profile 8/8、public boundary 1/1 全通过(19/19, failures=0, manual_hold_count=0;仅因只读评审工作区无本地 CQR 文件导致 gate 为 quality_receipt_missing)
真实 GitHub Actions 远端夜间定时与并发触发 UNVERIFIED 实际 GitHub hosted runner 调度时机与线上执行需合入后由夜间/主干事件异步验证;按仓库策略不等待远端 CI

我的整体评价 / Verdict

APPROVE。 该 PR 严谨落地了「本地优先零 CI 等待」开发规范与「轻量 PR / 夜间全量」双层 CI 架构,在大幅削减普通 PR 串行排队成本的同时保持 merge-gate、Sign-off、trusted_policy 与发布写权限门禁 100% fail-closed。所有涉及分类逻辑、门禁聚合、AGENTS.md 字节上限、双语一致性和工作流契约的 23 + 9 + 1,300 项自动化测试、8 项独立 smoke 与 19/19 canary premerge 检查均在精确提交上独立复现通过;outcome_impact 两维分别给出长程效率正向提升与既有用户体验无回归保留(含未配置 Goal 仍守 wait_for_ci=true),且无 UI 渲染改动(仅修改 CI 工作流 YAML、分类/门禁 Python 脚本、单测及仓库 Markdown 文档,未涉及任何前端 UI 界面或视觉组件变更。,未验证范围为 none)。

English verdict: APPROVE at d5d76c8. Clean codification of the local-first zero-CI-waiting rule (AGENTS.md 23,973/24,000 B with zero dropped obligations) and fail-closed two-tier PR/nightly CI gating across workflows, classifiers, and read-only release nightly sweeps; all 23 CI unit tests, 9 TS checks, 1,300 workflow/instruction tests, 8 smokes, and 19/19 standard premerge checks pass.

@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.2-sol · OpenAI · runtime_reported · xhigh

Request changes conclusion (author-owned PR; GitHub blocks formal self-review)

[P2] 子包依赖清单应继续触发全量资格。用精确 base/head 的分类器及聚合脚本,对两个现有清单分别制作单文件 Git 改动。基线两个都走 full。候选在三个策略文件与目标一致时,均把它们判为 backend。免除全量 Python、Windows、Stage2c、Node 兼容与浏览器;聚合接受这组跳过状态。显式 force-full 对照恢复 full。独立 package-smoke 路径仍符合触发,无法替代这些合并门禁中的全量通道。 把已受支持的各发布包依赖清单纳入 full 风险边界,复用现有候选分类和 gate 映射。加入 Python companion 与 DSH Node 包单文件清单变更的 Git 分类和预期 job 测试。 源码

动机 / Motivation

用轻量普通 PR 加夜间与高风险场景全量验证,减少低影响改动占用的 CI 资源并保持本地门禁。 基线只给限定文档和纯展示改动豁免,包装及依赖清单均走 full。 涉及 standalone 扩展、DSH 和其他已发行子包依赖清单的维护者,以及消费 stable merge-gate 的评审和维护者。

错误豁免会让分发依赖改变在完整 Python、Stage2c 和兼容矩阵之前形成合并门禁成功结果。 CI 策略变更与显式 force-full 仍走 full。常规验收稳定复用已有合并名称,workflow 静态测试通过。 两个提交各 23 个 scripts/ci unittest 通过,候选 pytest 配置、资源策略、仓库指令 1,235 项通过。另在隔离 Git 仓库用真实 classify/verify 验证清单分类变化及门禁接受。git diff --check、merge-tree 检查通过。 探针只运行本地 Git、分类和门禁脚本。job 终态为对照输入,托管 Actions 未运行或核验。 基线契约

改动思路 / Approach

该改动沿用 Python Tests changes job → scripts/ci/review_gate.py classify → verify-core 与 verify。保持可信分支策略及单一计划,再利用兼容、浏览器两组标志安排 job。盲点出现在 full 路径清单。 候选仅对根级和 Dashboard 等指定路径强制 full;其余 packages 下文件默认为轻量后端。这使包级声明继承普通实现分支。 沿用 full 风险匹配与现有 job flags,在同一处包含已跟踪的包依赖清单。

具体改动 / Changes

精确提交 d5d76c8,本次对照目标 0e8c2b2。14 个文件,+427/−171,覆盖分类和聚合、工作流触发、双语说明及回归。

关键代码讲解

  • FULL_EXACT_PATHS。根清单和少数特定清单列入 full 风险路径。 源码

  • is_full_risk_path。通用 packages 前缀下未命中 full 清单的文件被判为非 full。 源码

  • candidate。按风险再按 frontend 判定;剩余进入 backend。 源码

  • _verify。根据计划要求 success 或 skipped,接受误分类后符合的跳过。 源码

  • package-manifest-full-qualification(partial)。打包和依赖清单变更维持完整验证,普通后端修改才采用轻量路径。

对主干的风险 / Risks

用精确 base/head 的分类器及聚合脚本,对两个现有清单分别制作单文件 Git 改动。基线两个都走 full。候选在三个策略文件与目标一致时,均把它们判为 backend。免除全量 Python、Windows、Stage2c、Node 兼容与浏览器;聚合接受这组跳过状态。显式 force-full 对照恢复 full。独立 package-smoke 路径仍符合触发,无法替代这些合并门禁中的全量通道。 候选自身修改 CI,完整验证通过不能覆盖后续普通 PR 使用已受信政策时的错分。 把已受支持的各发布包依赖清单纳入 full 风险边界,复用现有候选分类和 gate 映射。加入 Python companion 与 DSH Node 包单文件清单变更的 Git 分类和预期 job 测试。

语义与 CI 对齐

用精确 base/head 的分类器及聚合脚本,对两个现有清单分别制作单文件 Git 改动。基线两个都走 full。候选在三个策略文件与目标一致时,均把它们判为 backend。免除全量 Python、Windows、Stage2c、Node 兼容与浏览器;聚合接受这组跳过状态。显式 force-full 对照恢复 full。独立 package-smoke 路径仍符合触发,无法替代这些合并门禁中的全量通道。 把已受支持的各发布包依赖清单纳入 full 风险边界,复用现有候选分类和 gate 映射。加入 Python companion 与 DSH Node 包单文件清单变更的 Git 分类和预期 job 测试。

我的整体评价 / Verdict

REQUEST_CHANGES。 修复子包清单的风险分类后再复审。 按改动风险实际保留必要资格,确保节省的运行时间仍可与覆盖一致解释。

English verdict: REQUEST_CHANGES at d5d76c8. Request changes. Two existing distribution manifests become lightweight backend changes after the policy is trusted, and merge-gate accepts skipping the full qualification lanes.

Comment thread scripts/ci/impact_plan.py Resolved
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.2-sol · OpenAI · runtime_reported · xhigh

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

动机 / Motivation

普通 PR 走轻 CI,同时让真实包清单和锁文件继续接受完整跨平台及发行检查。 基线的两个发行包清单走 full,上一评审头把它们降为 backend,允许 Python、兼容性与 Stage 2C 跳过。 提交通用软件改动和已发布子包依赖的维护者。

包依赖变化覆盖不足会压掉验证兼容性和交付所需的信号。 在既有 pr-review Python 包清单、DSH package.json 与 pnpm-lock.yaml、桌面 Cargo 清单上,当前候选均返回 full。verify-core 与 verify 接受完整计划,逐项缺 pytest、Stage 2C、Node 最低兼容或 Windows 时被真实 verify 拒绝。 精确候选 CI 脚本 unittest 24 项通过。对基线、上一评审头及候选,用真实 Git 提交和真实门禁 CLI 逐一观察四项实际清单与一项测试 fixture。 本次实测为本地规则与门禁结果组合,远端 Actions runner 的实际调度和耗时未纳入。 基线契约

改动思路 / Approach

该改动沿用 scripts/ci/review_gate.py classify,GitHub Actions 的 checks/merge-gate,verify-core 和 verify。。先在显式目录识别已知依赖清单和锁,再使用常规轻重分流。原工作流验证 flags,无新门禁。 路径位于 packages、apps 或 examples 并匹配 manifest 名称时进 full。引导与可执行业务代码仍使用原分类。 用既有分类层的文件路径语义保住全量 lane,复用同一重型任务查验,避免单独的包门禁分支。

具体改动 / Changes

精确提交 0a6be59,本次对照目标 0e8c2b2。14 文件 +565/−171。本次复评修复相对上个头只改三份文件,在既有 CI 分类和测试内完成。

关键代码讲解

  • _is_subpackage_manifest。将发布包的目录和清单名结合判定,排除 tests fixture。 源码

  • is_full_risk_path。全量风险检查优先于一般轻量路由。 源码

  • CHECK_OUTPUT。将计划 bits 对应真实 job 路由,跳过全量指定任务不可通过。 源码

  • dependency-change-full-qualification(implemented)。构建、依赖、打包和真实 CI 策略改动应强制全量;显式轻量分类仍有稳定边界。

对主干的风险 / Risks

相同可信策略下,上个头仍会接受两个原反例的重型任务跳过。独立对照还核验了 tests/fixtures/.../package.json 留在既有轻量用途,且显式 --force-full 仍返回全量。 夜间实际任务调度独立于本地脚本验证,不能用本地分类观测替代运行时 CI 指标。 已通过显式目录/真实 manifest 识别与门禁回归修正。

我的整体评价 / Verdict

APPROVE。 上一精确头的包清单漏判已修复。对正式包清单、锁文件和应用构建 manifest 的真实门禁验证通过。 保留普通 PR 的短反馈,同时恢复有依赖或构建边界变化的完整反馈。

English verdict: APPROVE at 0a6be59. Approve the reviewed head. The real Git/CLI matrix restores full qualification for both original subpackage manifests, the pnpm lock and the desktop Cargo manifest, and rejects skipped heavy checks while preserving the fixture lane.

@huangruiteng
huangruiteng merged commit 43d3501 into main Nov 26, 2026
14 of 19 checks passed
@huangruiteng
huangruiteng deleted the codex/ci-lightweight-pr-heavy-nightly-rule-20261127 branch November 26, 2026 18:37
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