Skip to content

fix(ci): restore Python Tests and Full Public Smokes on main - #5292

Merged
huangruiteng merged 5 commits into
loopx-project:mainfrom
songoow:codex/ci-restore-tests-smokes
Sep 29, 2026
Merged

huangruiteng merged 5 commits into
loopx-project:mainfrom
songoow:codex/ci-restore-tests-smokes

Conversation

@songoow

@songoow songoow commented Sep 29, 2026 •

Copy link
Copy Markdown
Collaborator

Why

main has been red on Python Tests and Full Public Smokes. This PR repairs four independent, already-diagnosed drifts. Each is a check whose recorded expectation fell behind a change that was itself correct; none is a product regression.

# Failing check Root cause Introduced by
1 examples/repository-hygiene-smoke.py; loopx check --scan-path . (also run by examples/canary/canary-promotion-readiness-smoke.py) tests/control_plane/test_public_safe_text_classifier.py carried literal local-path and internal-marker fixtures that the public/private scanner flags #5245
2 examples/interaction-pattern-catalog-smoke.py the built-in machine-configuration namespace goal_storage was registered but not listed in IP-030 of docs/concepts/interaction-pattern-catalog.md #5242
3 examples/dashboard-demo-readiness-smoke.py -> npm run smoke:home-route smoke/home-route-smoke.ts asserted that workspace-action-form.tsx inlines draft.kind === "goal" ? "goal.create", but that logic moved into goal-create-request.ts #4376, #5265
4 examples/loopx-chat-stream-throughput-smoke.py a 1.5s wall-clock assertion tripped at 1.506s on a shared CI runner; the invariant it protects (no per-delta fsync) is already asserted by the fsync count runner variance

Scope change since the first revision. The first revision also changed the registry I/O census validator to tolerate line-only drift. #5286 has since merged to main: it regenerated the manifest and deliberately made premerge reject a moved registry site, with a test (test_premerge_semantic_smoke_rejects_moved_registry_site). That is the opposite rule, so the tolerance commit was withdrawn and this PR no longer touches the census. The branch was rebased onto current main to drop it.

What still keeps Python Tests red after this PR. The last run on this PR failed only in tests/control_plane/test_quota_settlement_cli.py (test_standard_codex_app_settlement_is_receipted_and_idempotent, test_todoless_autonomous_replan_settles_quota_refresh_spend_chain). They were bisected to #5244, which routes python -m loopx.cli quota scheduler-ack-current to the native follow-up whose ACK mode and receipt-staleness rule differ from the in-process route. That control-plane fix is a separate PR from branch codex/native-followup-parity. Both are needed for a green main.

What changed

One commit per reviewer concern:

  1. test(public-safe-text): build the two path fixtures at runtime ("/".join([...])), matching the file's existing credential-fixture discipline, with a one-line comment saying why. The classifier still sees identical text.
  2. docs(catalog): add goal_storage to IP-030's built-in namespace list in the existing per-namespace bullet style. The catalog has no zh-CN mirror.
  3. test(dashboard): assert the current contract. The form imports from ./goal-create-request and previews through goalCreateRequest(, and goal-create-request.ts exports goalCreateRequest with actionKind: "goal.create".
  4. test(chat): keep fsync_calls < 100 as the real budget and turn the time assertion into a 5.0s hang guard, with a comment naming the fsync count as the budget.

No runtime, CLI, persisted-state or permission behavior changes. The diff is tests, one smoke and one doc.

Checks run on this head

All from the worktree root with PYTHONPATH=. on the checkout interpreter, after rebasing onto main.

Check Result
pytest tests/architecture/test_project_registry_io_census.py tests/architecture/test_goal_instance_binding_inventory.py tests/control_plane/test_public_safe_text_classifier.py passed, including #5286's moved-site test
examples/semantic-vocabulary-drift-smoke.py ok
examples/repository-hygiene-smoke.py ok (was failing on the two fixture lines)
python -m loopx.cli check --scan-path . ok, public boundary scan clean
examples/interaction-pattern-catalog-smoke.py ok (was failing on goal_storage)
cd apps/presentation/dashboard && npm run smoke:home-route ok (was failing on the inlined action assertion)
examples/loopx-chat-stream-throughput-smoke.py ok
loopx canary premerge --from-git-diff passed: tier=standard, changed_files=5, surfaces=docs_project_content/public_boundary/python; selected=13, failures=0, advisory_failures=0, no skips
examples/dashboard-demo-readiness-smoke.py and canary-promotion-readiness-smoke.py end to end not runnable on the author's Linux host: the first sub-step examples/macos-dashboard-launchagent-status-smoke.py needs zsh. Their other sub-steps pass individually; CI runs them in full.

The CI-only "Directory not empty: 'profile'" temp-cleanup message on the canary smoke was not reproduced locally, so no cleanup change is included.

Why this coverage is enough

Each item is a check-only or doc-only change, and each failing check was re-run to green on this head. The public boundary is re-verified over the whole tree by both repository-hygiene-smoke and loopx check.

Rollback

Revert the PR or any single commit; the four commits are independent.

Bounded future-facing refactor

Found unnecessary. The boundary considered was the census validator; #5286 settled it on main with a stricter premerge rule, so no refactor is proposed here.

🤖 Generated with Claude Code

songoow and others added 4 commits September 29, 2026 07:46
tests/control_plane/test_public_safe_text_classifier.py (loopx-project#5245) carried
the literals for a local filesystem path and an internal ext_data path,
which the repository public/private boundary scanner flags. Join the
segments at runtime, matching the file's existing credential-fixture
discipline, so the classifier still sees the same text while
repository-hygiene-smoke and `loopx check --scan-path .` pass.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: song <22676124+songoow@users.noreply.github.com>
loopx-project#5242 registered the built-in `goal_storage` namespace but IP-030's
namespace inventory was not updated, so
interaction-pattern-catalog-smoke failed on main. Add it to the list
and describe what it fixes and does not do, in the existing style.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: song <22676124+songoow@users.noreply.github.com>
home-route-smoke asserted that workspace-action-form.tsx inlined
`draft.kind === "goal" ? "goal.create"`, but loopx-project#4376/loopx-project#5265 moved that
into goal-create-request.ts. Assert the current contract instead: the
form previews through the shared goalCreateRequest builder, and that
builder produces the "goal.create" action.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: song <22676124+songoow@users.noreply.github.com>
loopx-chat-stream-throughput-smoke failed on a shared CI runner at
1.506s against a 1.5s wall-clock bound. The invariant it protects, no
per-delta fsync, is already asserted by the fsync count; keep that as
the budget and loosen the time assertion to a 5s hang guard.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: song <22676124+songoow@users.noreply.github.com>
@songoow
songoow force-pushed the codex/ci-restore-tests-smokes branch from 1701123 to b57fc1b Compare September 29, 2026 11:56
huangruiteng
huangruiteng previously approved these changes Sep 29, 2026

@huangruiteng huangruiteng left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

精确 head:b57fc1bac38cacb7b7a622020359f5d2a503fa59。已阅读完整四文件 diff,并在独立检出中复跑关联路径;本评审不把远端红 CI 自动归因于该 PR。

动机

main 上的 Python Tests 和 Full Public Smokes 有四个彼此独立的检查漂移:公开边界扫描撞上测试夹具中的字面本地路径,交互目录漏列已存在的 goal_storage,Dashboard smoke 仍断言已搬走的内联表达式,聊天流 smoke 的 1.5 秒绝对阈值在共享 runner 上以 1.506 秒擦线。此 PR 修的是检查与文档的当前合同,不改变产品运行时;它只能消除这四处已定位失败,不能单独宣称整个 Python Tests 变绿,因为另外两条 scheduler ACK 用例仍由独立改动处理。

改动思路

路径夹具在测试运行时拼接,分类器收到的文本仍相同,而源码级公开边界扫描不再把它误当泄漏;IP-030 只补机器配置目录里已有的 goal_storage,不授予迁移现存 Goal 的权限。home-route smoke 改为检查表单调用共享 goalCreateRequest,并核验构造器仍产出 goal.create;聊天流保持 fsync_calls < 100 作为避免逐 delta 持久同步的结构预算,把耗时阈值从 1.5 秒改为 5 秒的卡死保护。四处都沿用现有 owner,没有新增状态、CLI、权限或兼容层。相邻可做的保行为重构已检查,现阶段没有必要把这些独立 drift 合并成新框架。

具体改动

  • test_public_safe_text_classifier.py 的 _LOCAL_PATH、_ORG_MARKER_PATH 继续测试同样的 local-path 与 org-marker 分类;正例为 35 项相关 pytest 通过,负例是原字面夹具会触发 repo scanner,当前整树扫描 4275 个文件无边界错误。
  • interaction-pattern-catalog.md 的 IP-030 补列 goal_storage,明确默认 file、新 Goal 可经审查选 sqlite、旧 Goal 不自动迁移;目录 smoke 通过。
  • home-route-smoke.ts 追到实际 goal-create-request.ts 入口,核验表单 import、预览调用和 actionKind: "goal.create";在 Dashboard 包中执行 smoke 通过。这是源码合同 smoke,未声称重新做了浏览器交互测试。
  • loopx-chat-stream-throughput-smoke.py 的同一 500-delta 场景保留完整 delta/顺序和 replay 断言。本机 base 五次为 0.258–1.193 秒、head 六次为 0.178–1.448 秒,fsync 在本次 head 检查为 47 次;运行时代码在本 PR 中没有变。样本来自一台机器,不能推导 CI 的延迟分布或证明 5 秒是用户可感知性能目标。它只在这个 smoke 中充当宽松 hang guard。

对主干的风险

最大风险是把 5 秒误读为性能达标,掩盖未来小于 5 秒的 CPU/调度退化;这里仍有 500-delta、fsync < 100、完整 replay 的结构保护,但绝对吞吐预算事实上变松。我认为在本次仅修 CI 漂移、运行时无改动的边界内可接受;后续性能门槛应按同机 base/head 分布与消费者延迟目标单独定,不应拿这条 hang guard 当性能资格。首次架构测试因独立检出缺根目录 npm 开发依赖而失败;安装声明依赖后原命令重跑为 35/35,通过,属于环境启动问题而非 PR 回归。风险型 premerge、语义扫描、公开边界和 git diff --check 均通过;未查询远端 CI,也未把另外两条 ACK 失败归责于此 PR。无产品 UI 改动,故不需要新的视觉首屏预览。

我的整体评价

APPROVE 这个有界的检查修复:当前 diff 与四个已知漂移一一对应,保留原分类输入与聊天流结构保护,没有修改运行时或降低权限门槛。建议非阻断地把标题/PR 文案收窄为“四项 CI 漂移修复”:当前 head 实际是四个文件,且合并此 PR 后 Python Tests 仍需独立 ACK 修复;并把 5 秒只作为 hang guard 的取舍写进后续性能证据。批准不等于可自合并;精确 head 的合并资格仍由维护者与独立门禁决定。

English verdict: APPROVE - exact head b57fc1b; four test/docs drifts are addressed by focused Python, dashboard, catalog, boundary and premerge checks. The 5s wall-clock bound is only a hang guard, not a throughput qualification; unrelated ACK failures remain a separate merge-readiness concern.

…e app-server environment

loopx-project#5272 makes every synthetic native Codex profile set LOOPX_USAGE_PING=0 so a
rebuilt environment cannot become an adoption sample. The widesearch
app-server environment test pins the exact variable set and did not include
that opt-out, so it failed on main after loopx-project#5272. The opt-out is non-secret and
required by that contract; the test still rejects provider credentials and
unrelated private variables.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Signed-off-by: song <22676124+songoow@users.noreply.github.com>
@huangruiteng
huangruiteng merged commit 5ab23b3 into loopx-project:main Sep 29, 2026
32 of 36 checks passed
songoow added a commit to songoow/loopx that referenced this pull request Sep 29, 2026
Pick up the main fixes from loopx-project#5288 and loopx-project#5292.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Signed-off-by: song <22676124+songoow@users.noreply.github.com>
songoow added a commit to songoow/loopx that referenced this pull request Sep 29, 2026
Pick up the main fixes from loopx-project#5288 and loopx-project#5292.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Signed-off-by: song <22676124+songoow@users.noreply.github.com>
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