Skip to content

fix(ci): restore kernel static checks - #7415

Merged
huangruiteng merged 2 commits into
loopx-project:mainfrom
songoow:codex/fix-chat-history-module-budget-20261027
Oct 26, 2026
Merged

huangruiteng merged 2 commits into
loopx-project:mainfrom
songoow:codex/fix-chat-history-module-budget-20261027

Conversation

@songoow

@songoow songoow commented Oct 26, 2026 •

Copy link
Copy Markdown
Collaborator

Goal And Delivered Outcome

  • Outcome basis / optional anchor: docs/architecture/rfcs/monorepo-distribution-split-v0.md milestone M0 and Section 9; the existing Python Tests kernel-static-checks job.
  • Goal/source and gap: current official main fails the repository gate for two inherited reasons. It contains 146 modules directly under loopx/ against the accepted budget of 145, and Ruff 0.15.22 reports three F811 fixture-injection collisions in an unchanged chat test file.
  • Observable before → after, with the validation row that proves it: Before, the module-budget test fails at 146 modules and the subsequent full Ruff step fails with three F811 errors. 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.
  • Issue/task and intended base: no standalone public issue; this is the focused prerequisite for the inherited CI failure isolated from fix(ui): align mobile task inspector modality and focus #7410. Initial base is current official main at 08e290fb5ee44506e12fc62651e088d71bb93a45; live main advanced during review to 798543b82ecbc4479531c98ad5c93274f9bd6ce9, and a dry merge reports no conflict. The branch has not been rewritten merely to chase the moving base.

Author Declaration

  • Written by: Codex (OpenAI) model agent.

Implemented against

  • Specification and revision: docs/architecture/rfcs/monorepo-distribution-split-v0.md at 08e290fb5ee44506e12fc62651e088d71bb93a45; 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-line noqa convention for imported pytest fixtures.
  • Criteria:
Criterion (spec clause) Disposition Symbol / path Test or command
The top-level module count returns to the pinned budget implemented loopx/capabilities/manager_context/chat_history.py; unchanged budget fixture pytest -q --no-cov tests/architecture/test_top_level_module_budget.py
The CI Ruff selection accepts explicit pytest fixture injection implemented three narrow # noqa: F811 annotations in tests/test_chat_conversation_bindings.py ruff check tests loopx/canary loopx/control_plane loopx/domain_packs loopx/presentation
Content-digest consumers are explicitly owned after the move implemented tests/architecture/test_content_digest_single_owner.py focused architecture selection
Existing chat-history pagination, store validation and binding behavior are preserved implemented manager-context sibling import and unchanged test bodies five-file focused pytest set
  • Self-check before submission: reviewed every source/test reference to loopx.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 disabling F811 for a module or directory.

Scope And Continuation

  • Completed scope and remaining work: complete within this scope. Two independently reviewable commits restore the two inherited invariants in the kernel-static-checks job. 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.
  • Slice boundary / successor: N/A. The module move and the narrow lint suppression can each be reviewed and reverted independently, while together they allow the normal downstream job to proceed.

Validation

  • Tested revision: a9fc7aa2da502d290a9371bc2f560dac74d691f0
  • Run state: finished (local source validation; remote CI is tracked separately)
  • Input classes: synthetic, public_fixture
Check kind Result Public-safe evidence / limitation
static passed ruff check tests loopx/canary loopx/control_plane loopx/domain_packs loopx/presentation; git show --check; both commits contain DCO sign-off
unit passed Exact-head tests/test_chat_conversation_bindings.py plus the top-level module-budget test: 50 passed
integration passed Exact-head five-file set covering module budget, content-digest ownership, control-plane import boundaries, chat-store validation and conversation bindings: 323 passed
remote_ci failed kernel-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) and dashboard-browser (1)/(2) reproduce unchanged browser signatures, checks is the resulting acceptance-gate cascade, and windows-powershell is an unchanged-code intermittent startup timeout. Six Python test shards were still pending at capture; CI is not claimed green.
  • Coverage and gaps: the focused validation covers both failing static steps, the affected chat-history consumers and inward import boundaries. The latest formal release artifacts do not contain the removed loopx.chat_history deep 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

  • UI impact: none
  • Before: N/A
  • After: N/A
  • First viewport and preview: N/A; no user-visible surface changes.
  • States and viewports shown: N/A
  • Source data: none
  • Attention review: N/A; presentation is unchanged.
  • Craft review: N/A; presentation is unchanged.

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Refactoring (no functional changes)
  • Documentation update
  • Test update

LoopX Area

  • Control plane (goals, todos, quota, scheduler, registry, runtime)
  • Benchmark boundary (adapters, runners, verifiers, scoring, evidence)
  • Capability or extension (providers, adapters, skills)
  • Public docs or presentation surface (README, protocols, dashboard)
  • Build, packaging, installer, or CI
  • Host or runtime integration

Technical Direction

  • Direction / acceptance reference, when applicable: Accepted monorepo distribution split, milestone M0; repair the inherited kernel-static gate without changing chat-history behavior.

Shared-authority RFC fixture impact

N/A — no TypeScript control-plane migration, shared Goal Authority, persistence, provider-routing or fixture change.

Boundary Checklist

  • Neither the diff nor this PR body/comments/attachments disclose private state, credentials, raw traces or verifier output, internal links, or local machine paths.
  • I did not duplicate maintainer-owned benchmark work.
  • I kept the change scoped to the two inherited kernel-static-checks failures.
  • No paired English/Chinese RFC changed; this follows the existing accepted RFC without editing it.
  • UI impact is marked none.
  • Every commit includes a DCO Signed-off-by trailer.

Signed-off-by: song <liusongstep@gmail.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-10-26T17:08:17.779494Z
We couldn’t complete this review. Comment @codex review to try again.
64158b4 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

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 songoow changed the title fix(chat): restore the top-level module budget fix(ci): restore kernel static checks Oct 26, 2026

@songoow songoow 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): 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)仍在 :291 lazy-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.

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