Skip to content

fix(ci): lock tokenizer test dependencies - #7185

Merged
huangruiteng merged 1 commit into
mainfrom
codex/stage2c-tokenizer-lock
Oct 24, 2026
Merged

huangruiteng merged 1 commit into
mainfrom
codex/stage2c-tokenizer-lock

Conversation

@loopx-agent

Copy link
Copy Markdown
Collaborator

The current kernel admission fails because the test extra declares tiktoken==0.12.0 while the hash-locked Stage 2C environment omits it. Both main and #7181 stop at this invariant, so their downstream test matrix never starts.

Goal And Delivered Outcome

Regenerate tests/requirements-stage2c-linux-py311.txt through its existing uv==0.11.26 command. Add tiktoken==0.12.0 and its regex==2026.9.29 dependency, reusing the existing requests pin. All 57 existing versions and hash lists remain identical. The existing failing admission check passes with this lock.

Related to #7181; this repair targets main independently. The reproduced public CI failure is the outcome basis; no new roadmap item is needed.

Author Declaration

  • Written by: model_agent — OpenAI GPT-6 family.
  • Specification: tests/requirements-stage2c-tools.in, tests/test_stage2c_dependency_lock.py, and the kernel static admission section of docs/development/testing-and-quality.md at 3378f28d1210341affc96020a4f0336164f3a8a6.
Criterion Disposition Path / evidence
Linux/Python 3.11 lock covers declared test/build inputs implemented Existing lock regenerated from pyproject.toml and the tools input; 59 binary wheels resolve with required hashes.
Static admission rejects incomplete dependency declarations implemented Existing invariant retained; baseline fails for missing tiktoken, final seven-case static suite passes.
Pinned, hash-checked installation remains enforced implemented Existing workflow flags retained; corrupted tiktoken hashes are rejected by pip.

Self-check used the existing generator, native pytest entrypoint, pip binary resolution and repository checks. Refactoring was unnecessary: this owning lock and invariant already provide the complete repair boundary.

Scope And Continuation

Only the generated dependency lock changes. The author proposal is complete; native Linux installation/execution, the complete required suite and independent review remain outstanding. This is a reversible environment prerequisite for the existing CI program. Full qualification and merge remain held; existing shard, worker, timeout, coverage and permission criteria are retained.

Validation

  • Tested revision: 4feb7f72d7a577ecedd8583abbc5567e537a00c1, based on 3378f28d1210341affc96020a4f0336164f3a8a6.
  • Run state: finished.
  • Input classes: public_fixture, synthetic.
Check kind Result Evidence / limitation
regression_parity passed Immutable 7129efc baseline: existing kernel command 1 failed / 6 passed, missing tiktoken. Its lock, declaration inputs and invariant files are unchanged at 3378f28; final head: 7 passed.
real_entrypoint passed pip download --require-hashes --only-binary=:all: for Linux x86_64 CPython 3.11 resolves all 59 wheels. Every downloaded hash matches the lock; the added wheels carry Linux cp311 tags. This is cross-target verification on macOS.
regression_parity passed A temporary lock with corrupted tiktoken hashes is rejected by the same pip resolver against the downloaded wheel set. All 57 pre-existing pin versions and hash lists are unchanged.
static passed Full CI Ruff scope, configured mypy (17 files), CLI output budget smoke, public boundary scan, whitespace and bilingual diff check.
static blocked Goal-bound premerge: 4 direct checks passed, no catalog checks selected; aggregate fails on exact-scope CQR cqr_43e43cc5049e9bc71084. Required full Python and native Linux/hosted qualification remain outstanding.
integration not_run Native Linux installation/execution and complete candidate CI have not run here. Cross-target downloads do not establish runtime or full-pipeline success.

The existing tests already catch the defect, so this PR adds no mirrored regression or workflow exemption. Historical whole-suite failures remain failures; local admission and dependency checks do not qualify the complete CI program or long-horizon benefit.

Frontend / Visual Evidence

UI impact: none. No page, control, visible prompt, CLI behavior or runtime implementation changes; screenshots are not applicable.

Type of Change

  • Bug fix
  • Test environment update

LoopX Area

  • Build, packaging, installer, or CI

Shared-authority RFC fixture impact

N/A — no authority, state, migration or provider routing change.

Boundary Checklist

  • Public generated lock and public-safe evidence only.
  • Existing implementation and validation owners reused; no benchmark execution.
  • Exact scoped repair; no paired RFC changes.
  • UI impact marked none.
  • DCO sign-off retained on the commit.

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)

APPROVE — 未发现阻断本次依赖锁修复的缺陷。结论只绑定 4feb7f72d7a577ecedd8583abbc5567e537a00c1;完整流水线和合并资格另行判断。

动机

维护者为 Python 改动运行现有静态准入与 Linux/Python 3.11 测试环境时,会遇到声明依赖和锁文件不一致。原版已声明 tiktoken,却没有将它锁入测试环境,现有准入断言因此失败;补齐原有锁文件后,同一断言通过,后续测试才具备继续验证的前提。已独立确认声明覆盖恢复、59 个目标平台 wheel 可按哈希解析,且原有 57 项版本与哈希完全保留。本次只修复测试环境前提,不认证完整流水线、原生 Linux 运行、安装后的产品行为或长期收益。原生 Linux 安装执行、完整必需测试及精确范围变更质量资格仍由既有交付流程完成。

改动思路

复用现有依赖声明、固定版本的生成器和独立断言,补齐测试环境,边界合适。uv==0.11.26 解析依赖,现有 pytest 断言按 Linux/Python 3.11 检查声明覆盖,pip 继续执行二进制与哈希校验。删除断言、删除实际使用的依赖或放宽工作流准入都会掩盖已复现的问题;仅更新原有生成物足够,不需要新增配置或测试框架。

具体改动

规范依据为 docs/development/testing-and-quality.md,spec_revision 3378f28d1210341affc96020a4f0336164f3a8a6,并交叉读取同版 pyproject.toml、tests/requirements-stage2c-tools.in、现有不变量和工作流。

  • test_stage2c_lock_covers_runtime_test_and_build_requirements:implemented。完整锁新增 tiktoken==0.12.0 与其 regex==2026.9.29 依赖;原 57 项版本与完整哈希集合逐项相同。相同原生静态命令在不可变基线是 1 failed / 6 passed,错误明确为缺少 tiktoken;本 head 是 7 passed。
  • Install locked test and package build tools:implemented。原 --require-hashes --only-binary=:all: 消费路径不变。独立真实 pip 按 Linux x86_64 CPython 3.11 目标解析了 59 个 wheel,全部下载摘要属于锁内允许集合。新增 wheel 的平台标签与 Python 要求匹配;tiktoken 元数据声明 regex 和 requests,后者复用原 pin。
  • kernel-static-checks:implemented。不变量、预算断言与工作流没有改动,完整现有 Ruff 范围通过。原生成器重跑后,除命令头中的临时输出文件位置之外,生成正文逐字一致。相对最新已观察主干 5b94c82c6b737ccbaced9ded4f98587cdb2b1595,上述声明、锁、测试、工作流与规范均未变化,基线证据仍适用。

全 PR 只有该生成锁 +194/-1,主要是两包的 187 个允许摘要以及依赖来源注释,没有新增生产逻辑或复制 smoke。

对主干的风险

最强反例是包名与版本存在、哈希却不可用,此时声明测试仍可能通过。我在可丢弃锁副本中替换全部 tiktoken 摘要,再让同一个真实 pip 对已下载 wheel 离线解析,实际以哈希不匹配退出;原强校验仍有效。现有 57 项 pin/摘要完全相同,避免借修复扩大升级范围。

本 head 的标准风险预合并检查 4 项直接检查通过,目录未选择额外 smoke;完整 Ruff 范围通过。测试在源代码工作区运行,wheel 解析是在 macOS 上指定 Linux 目标,没有执行 Linux 扩展或原生安装,也没有运行完整必需流水线。作者记录的精确范围变更质量 hold 保留,独立代码批准不清除它;本轮未查询、轮询或等待 CI。

我的整体评价

交付判断为 justified_increment:该修复完成一个可单独回滚、有真实失败依据的测试环境前提,后续由现有交付流程完成原生平台、完整测试和质量资格。代码体积 necessary,没有额外协议、兼容分支或值得强行抽象的结构;已有独立断言足够,不添加镜像测试。

long_horizon 与 user_experience 在本范围为 not_applicable:已检查该测试依赖锁及其 CI 消费路径,没有运行时调度、持久承诺、产品交互或视觉表面变化。视觉检查不适用,未验证范围仍是原生 Linux 和完整流水线。随包提供的恢复 RFC 分阶段交付经验对这个内部前提不适用,也不构成效益证据。APPROVE 支持该精确修复进入既有资格流程,不表示已合并、已安装或证明长期收益。

English verdict: APPROVE — 4feb7f72d7a577ecedd8583abbc5567e537a00c1 reproducibly completes the existing test dependency lock. Immutable-base admission fails for missing tiktoken; the unchanged head suite passes all seven cases. All 59 Linux-target wheels resolve with matching hashes, corrupted hashes are rejected, and all 57 old pins/hash lists remain intact. Native Linux execution, complete pipeline qualification and scoped quality/merge holds remain separate and unverified.

@huangruiteng
huangruiteng merged commit 99ff5b7 into main Oct 24, 2026
27 of 37 checks passed
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