Repository navigation
fix(ci): lock tokenizer test dependencies - #7185
Conversation
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
loopx-agent
left a comment
There was a problem hiding this comment.
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.
The current kernel admission fails because the test extra declares
tiktoken==0.12.0while 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.txtthrough its existinguv==0.11.26command. Addtiktoken==0.12.0and itsregex==2026.9.29dependency, reusing the existingrequestspin. All 57 existing versions and hash lists remain identical. The existing failing admission check passes with this lock.Related to #7181; this repair targets
mainindependently. The reproduced public CI failure is the outcome basis; no new roadmap item is needed.Author Declaration
tests/requirements-stage2c-tools.in,tests/test_stage2c_dependency_lock.py, and the kernel static admission section ofdocs/development/testing-and-quality.mdat3378f28d1210341affc96020a4f0336164f3a8a6.pyproject.tomland the tools input; 59 binary wheels resolve with required hashes.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
4feb7f72d7a577ecedd8583abbc5567e537a00c1, based on3378f28d1210341affc96020a4f0336164f3a8a6.7129efcbaseline: existing kernel command 1 failed / 6 passed, missing tiktoken. Its lock, declaration inputs and invariant files are unchanged at3378f28; final head: 7 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.cqr_43e43cc5049e9bc71084. Required full Python and native Linux/hosted qualification remain outstanding.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
LoopX Area
Shared-authority RFC fixture impact
N/A — no authority, state, migration or provider routing change.
Boundary Checklist