Repository navigation
fix(ci): restore kernel static checks - #7415
huangruiteng merged 2 commits into
Conversation
Signed-off-by: song <liusongstep@gmail.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Signed-off-by: song <liusongstep@gmail.com>
songoow
left a comment
There was a problem hiding this comment.
Approval conclusion (author-owned PR; GitHub blocks formal self-approval): APPROVE - exact head a9fc7aa2da502d290a9371bc2f560dac74d691f0 is supported by focused exact-head evidence and passes the gate it repairs. The captured remote failures are independently attributed to unchanged shared baseline paths or downstream cascades; they remain real merge-readiness holds and CI is not claimed green.
Reviewer: model_agent · GPT-5 · OpenAI · self_reported
审核对象:PR #7415,exact head a9fc7aa2da502d290a9371bc2f560dac74d691f0。本结论只批准这个有界的 kernel-static 修复,不授予发布、push 或 merge 权限,也不把远程 CI 写成全绿。
动机
LoopX maintainers and every downstream pull request depend on the kernel-static gate; a regression here blocks ordinary validation before useful runtime and browser checks can run.
At the immutable base, loopx/ contains 146 top-level Python modules against the pinned 145-module budget, and Ruff reports three F811 fixture-injection collisions in tests/test_chat_conversation_bindings.py; at the exact head, chat_history.py lives under the existing manager_context package and the three intentional fixture injections carry line-local F811 annotations.
The exact-head five-file pytest set passes 323 tests, the CI Ruff selection passes, the top-level module count is 145 without raising the budget, and the remote kernel-static-checks job succeeds while chat-history paging behavior remains unchanged.
This PR does not complete the later monorepo distribution milestones, change chat-history runtime semantics, add a compatibility shim, raise the module budget, or disable F811 globally.
验收依据是已接受的 docs/architecture/rfcs/monorepo-distribution-split-v0.md revision 08e290fb5ee44506e12fc62651e088d71bb93a45 中 criterion M0 与 I3。M0 要求顶层模块 fixture/test 把当前数量钉住,I3 要求 internal-only move 更新全部 active caller 并删除旧 internal entry;本 PR 按这两个既有边界判断,不把 RFC 中还只是 proposal 的 D1–D4 或后续分发阶段冒充成本次交付。
改动思路
入口仍是现有 Python Tests kernel-static-checks:先由 tests/architecture/test_top_level_module_budget.py 读取 typed fixture 并数 loopx/*.py,随后 Ruff 检查测试与 kernel 选择。决定性的权威输入不是另一份模块数量缓存,而是 checkout 中的实际文件树;manager_context/roundtrip.py 继续作为 chat-history paging 的 caller,只把 sibling import 指向同一个实现。
本次把单一 chat-history paging module 归入既有 manager_context owner,并由既有 budget fixture、content-digest consumer inventory 与 Ruff contract 验证;没有新增状态、provider、CLI 或并行控制面。
| 边界 | 变更前 | exact head |
|---|---|---|
| 顶层模块预算 | 146,超过 fixture 的 145 | 145,fixture 未提高 |
| chat-history owner | loopx/chat_history.py |
loopx/capabilities/manager_context/chat_history.py |
| 已知 caller | 顶层 sibling import 与测试路径 | manager_context sibling import 与更新后的测试路径 |
| Ruff fixture 注入 | 三个 F811 | 三个行级 # noqa: F811 |
| runtime paging semantics | 既有分页、cursor 与 digest 校验 | 保持不变 |
本 PR 只恢复 kernel-static-checks 的两个继承红灯:将一个内部模块迁入既有 manager_context 包以回到 145 budget,并对三个 intentional fixture 注入点做行级 F811 抑制;不完成整个 monorepo distribution split,也不改变 chat-history runtime semantics。
具体改动
基线 08e290fb5ee44506e12fc62651e088d71bb93a45 到 exact head a9fc7aa2da502d290a9371bc2f560dac74d691f0 共 5 个文件、+7/-7,其中移动模块按 rename 97% 识别:两个 production paths、两个 architecture/chat tests 和一个 chat binding test。没有新增顶层模块、依赖、协议字段或持久化形态。
关键代码讲解
page_chat_messages(loopx/capabilities/manager_context/chat_history.py:12)保持原有 limit 校验、snapshot digest、cursor 解析和 error semantics,只把相对 import 改为...control_plane.content_digest。project_chat_session_snapshot(loopx/capabilities/manager_context/roundtrip.py:285)仍在:291lazy-import paging helper;调用边界和返回的 conversation page 合同不变。test_top_level_module_count_stays_at_the_pinned_budget(tests/architecture/test_top_level_module_budget.py:59)继续把实际loopx/*.py数量与 fixture 的 145 比较,因此删除旧顶层 entry 后无需降低或伪造预算。tests/test_chat_conversation_bindings.py:20、:46、:71的三个函数签名仍显式接收 pytest 注入 fixture;新增的# noqa: F811只覆盖这三行,不会吞掉同文件其它未来的 F811。tests/architecture/test_content_digest_single_owner.py:180与tests/test_chat_store_input_validation.py:10把 consumer inventory 和导入路径更新到新 owner,避免架构测试指向已删除模块。
正向路径:exact-head module budget 由 146 回到 145,Ruff selection 接受三个刻意 fixture 注入,content-digest ownership 与 control-plane import boundaries 都通过,五个受影响测试文件合计 323 passed。负向探针在 base 上复现同一真实缺陷:顶层文件计数为 146,原测试副本经 ruff --isolated --select F811 产生 3 个 F811;同一探针在 exact head 为 145 与 0 个 lint error。
对主干的风险
loopx.chat_history 删除后确实是一个技术 import 断点,但没有证据表明它已是受支持的公开 API:该模块在 ea34ecc841c7d18a7466dac23e74876db6c500cb 才作为内部抽取出现,晚于最新正式 release v2.1.1;loopx/__init__.py 没有导出它,公开文档只约束 loopx_chat_message_page_v1 响应,已发布 v* 产物的 wheel/sdist 都不含旧路径。只有主动绑定未发布 main commit 或从 desktop 预发布源中抽取代码的未知 consumer 仍可能受影响。按 I3 的 internal-only move 规则,本 PR 不应为这种未建立的深路径导入增加顶层 shim,因为 shim 会重新突破 145 模块预算;若未来出现真实外部 caller,再加带弃用窗口的 alias 并单独处理预算。
抓取快照中的 7 个远端失败均已做独立归因,但仍是真实 merge-readiness hold。Release Artifacts build、chat-bundle-browser (1)/(2)、dashboard-browser (1)/(2) 命中两个在 base 与 head 完全未改的浏览器场景:chat-recovery.mjs:44 的“询问全局待办”超时,以及 research-worker-readback.mjs:93 的“完整费用未知 / Complete costs are unknown”断言;798543b8..a9fc7aa2 对这些路径的 diff 为空,同签名也在当前 base 合并前的无关 PR 中出现,且两个 research-worker 失败跨 Node 22/24。checks 是 dashboard-acceptance 因 browser shard 失败被跳过后的 gate 级联,不是第二个独立回归。windows-powershell 的 runtime_startup_timeout 也来自未改的 effect-runtime 代码:相关 blob 与先前同 runner/toolchain 的成功运行一致,早先同一套件为 418 passed;当前 1 failed、417 passed、19 skipped 更像未改 runtime 的间歇启动超时,但没有重复运行和 child diagnostic,因而仍保留环境敏感性不确定性。
本地没有构建完整 PR wheel 或执行安装后 smoke;已完成的边界是 exact-head source checkout、五文件测试、CI Ruff selection、git diff --check、remote kernel-static-checks success,以及旧模块未进入最新正式 release 的产物检查。exact-PR wheel 与未发布 commit consumer 的缺口仍在下面保留。
我的整体评价
Long-horizon 影响为 improved:模块重新落到既有 manager_context owner,顶层预算 guard 继续作为唯一数量规则,不需要提高上限或创建并行架构状态。User-experience 影响为 preserved:没有 rendered presentation 改动,chat-history paging 的输入、cursor、snapshot 与错误语义未变;视觉检查因此不适用,未验证范围只是安装后与外部 caller 兼容性。
本次把单一 chat-history paging module 归入既有 manager_context owner,并由既有 budget fixture、content-digest consumer inventory 与 Ruff contract 验证;没有新增状态、provider、CLI 或并行控制面。架构判断为 retain。本 PR 只恢复 kernel-static-checks 的两个继承红灯:将一个内部模块迁入既有 manager_context 包以回到 145 budget,并对三个 intentional fixture 注入点做行级 F811 抑制;不完成整个 monorepo distribution split,也不改变 chat-history runtime semantics。
改动比例成立:一个文件移动、两个 production import 更新和三个测试引用/行级 lint annotation 足以修复两个已证实红灯;新增全局 lint 例外、预算提高或兼容框架都更昂贵。未发现需要阻止这个代码结论的 finding;残余风险是未发布 commit 上的未知深路径 consumer、未构建 exact-PR wheel/install smoke,以及仍为红/待完成的独立 CI 与 merge readiness。
因此 exact-head 代码结论为 APPROVE,但它是 author-owned PR 的 comment-style approval fallback,不是 GitHub formal approval,也不授予 merge、发布或 push 权限。7 个已归因远端失败与尚未完成的 test shards 是独立的 merge-readiness hold;在这次本地 artifact 生成过程中没有发布 review、没有 push、没有 merge。
English verdict: APPROVE - exact head a9fc7aa2da502d290a9371bc2f560dac74d691f0 restores the 145-module budget and the CI Ruff selection with focused local evidence; all seven captured remote failures are independently attributed to unchanged shared baseline paths or their downstream cascade, while the real red/pending checks preserve a separate merge-readiness hold and no all-green claim.
Goal And Delivered Outcome
docs/architecture/rfcs/monorepo-distribution-split-v0.mdmilestone M0 and Section 9; the existing Python Testskernel-static-checksjob.mainfails the repository gate for two inherited reasons. It contains 146 modules directly underloopx/against the accepted budget of 145, and Ruff 0.15.22 reports threeF811fixture-injection collisions in an unchanged chat test file.F811errors. After, the budget test passes at 145 with the budget unchanged, and the complete CI Ruff selection passes while the same pytest fixtures remain injected.mainat08e290fb5ee44506e12fc62651e088d71bb93a45; livemainadvanced during review to798543b82ecbc4479531c98ad5c93274f9bd6ce9, and a dry merge reports no conflict. The branch has not been rewritten merely to chase the moving base.Author Declaration
Implemented against
docs/architecture/rfcs/monorepo-distribution-split-v0.mdat08e290fb5ee44506e12fc62651e088d71bb93a45; the budget contract requires moving a module into a subpackage rather than raising the pinned count. The lint change follows the repository's existing per-linenoqaconvention for imported pytest fixtures.loopx/capabilities/manager_context/chat_history.py; unchanged budget fixturepytest -q --no-cov tests/architecture/test_top_level_module_budget.py# noqa: F811annotations intests/test_chat_conversation_bindings.pyruff check tests loopx/canary loopx/control_plane loopx/domain_packs loopx/presentationtests/architecture/test_content_digest_single_owner.pyloopx.chat_history; the moved module resolves from the existing manager-context package; the lint annotations cover only the three intentional fixture-name collisions rather than disablingF811for a module or directory.Scope And Continuation
kernel-static-checksjob. The branch does not change chat-history semantics, raise the budget, add a compatibility shim, or merge fix(ui): align mobile task inspector modality and focus #7410.Validation
a9fc7aa2da502d290a9371bc2f560dac74d691f0staticpassedruff check tests loopx/canary loopx/control_plane loopx/domain_packs loopx/presentation;git show --check; both commits contain DCO sign-offunitpassedtests/test_chat_conversation_bindings.pyplus the top-level module-budget test:50 passedintegrationpassed323 passedremote_cifailedkernel-static-checks, DCO, dependency review and change detection pass. The seven captured failures are independently attributed to unchanged shared baseline paths or their downstream cascade:build,chat-bundle-browser (1)/(2)anddashboard-browser (1)/(2)reproduce unchanged browser signatures,checksis the resulting acceptance-gate cascade, andwindows-powershellis an unchanged-code intermittent startup timeout. Six Python test shards were still pending at capture; CI is not claimed green.loopx.chat_historydeep path, but an exact-PR wheel/install smoke was not run. Full suite, packaged artifacts and live remote CI are not claimed as passes here; the independently attributed red/pending jobs remain a merge-readiness hold.Frontend / Visual Evidence
Type of Change
LoopX Area
Technical Direction
Shared-authority RFC fixture impact
N/A — no TypeScript control-plane migration, shared Goal Authority, persistence, provider-routing or fixture change.
Boundary Checklist
kernel-static-checksfailures.none.Signed-off-bytrailer.