Repository navigation
test(storage): align the cold import fixture after retirement - #6608
loopx-agent wants to merge 1 commit into
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)
精确 head:be6af06ffe81f32b337a9208cb45066bba0dd9d3;不可变基线:de41d2d310ccb9d259200d81d6182a32824ca556。
动机
维护者在升级后的干净源码中运行 Goal 存储回归时,会先遇到测试收集失败,因而无法验证预览恢复和迁移后的数据是否保留。
此前测试仍导入已删除的 fixture(测试依赖准备函数),尚未执行 HTTP 就报错;本提案改用既有 cold_api 实际依赖的准备函数,让原有存储案例重新执行。
独立重现基线导入失败后,精确候选的 33 项真实 HTTP/File/SQLite 案例通过,原有断言与隔离维度保持不变。
本 PR 只修复测试接线;不修改存储实现、App、执行权限或完整恢复验收,也不把作者另报的安装态旅程当作本次独立证据。
改动思路
pytest 仍使用 test_chat_cold_source_import.source_modules_present 和 cold_api;真实 HTTP、冷接收端与 File/SQLite 决策继续归现有实现。 有界整理已完成于现有共享 fixture 的消费边界;保留一个实际依赖名即可,无须恢复兼容别名或新增 fixture 层。
具体改动
完整 diff 只有第 9 行导入替换:删除 capture_present 的消费,显式暴露 cold_api 所需的 source_modules_present。它有 True/False 两个参数;cold_api 自身有 physical/external-registry-parent-alias 两个参数。测试主体、断言、接收端代码与全部生产目录均与基线相同。
规格:docs/development/testing-and-quality.md,spec_revision:de41d2d310ccb9d259200d81d6182a32824ca556。Local Validation Environment:implemented(Run from the repository or dedicated worktree root with uv and the intended checkout.);Smokes And Canary:implemented(A durable smoke should protect shipped behavior, a reusable contract, a boundary or a regression that stranded automation.)。
基线在 capture_present 导入处退出;候选收集并通过全部 33 项。cold_api 的两种源码状态 × 两种 registry 路由仍执行,未恢复旧别名。 同一完整测试文件验证新 origin 只读恢复、原 receipt 和后写保留、旧预览与新 lease 拒绝、跨 Goal/registry/runtime 隔离、损坏记录及外部 Origin 拒绝、discard 持久化与反向迁移。
对主干的风险
最强风险是只修到“能收集”却丢失冷启动维度,或通过恢复旧别名掩盖退休遗漏。实际 33 项执行和四种 cold_api 组合排除了本次接线风险。没有独立重演作者另附的 wheel/非 dev App 安装态报告;完整 Goal/Host/Lark、其它平台与持续资格仍不在本次结论内。语义 advisory 对这些测试路径没有支持的载体,空报告不等于动态语义已证明。
Ruff、完整 semantic smoke、diff check 通过;canary 为 4 项直接检查、0 项 catalog 检查,门通过且无 manual hold。实际存储覆盖来自上述 33 项,而非 canary 数量。CI 按当前策略未查询、轮询或等待。
我的整体评价
测试修复目标已达到,结论为 APPROVE;改进的是维护者的验证路径。产品源码、持续执行和终端用户操作保持原样,不以本批通过替代完整恢复验收。有界整理已完成于现有共享 fixture 的消费边界;保留一个实际依赖名即可,无须恢复兼容别名或新增 fixture 层。
已检查同轮 @songoow 的 #6607:它覆盖相同修复(其中存储导入完全相同)。应选择该组合提案或 #6608 + #6609 这一交付组,保留贡献归属并清理冗余提案;这不是新增重复 smoke 的理由。本结论不授予合并或 bypass 权限。
English verdict: APPROVE - be6af06. Restores the existing fixture dependency;33 real HTTP/File/SQLite tests pass after reproducing the immutable-base collection failure. No runtime/App or full recovery qualification is claimed.
Superseded by the earlier community proposal #6607, which already contains the exact same storage-test fixture correction plus the related Results scenario repairs. Closing this duplicate keeps one delivery route and contributor attribution there. The branch and independent exact-head review (33 real HTTP/File/SQLite tests) remain available. This does not claim #6607 has been reviewed, merged or installed.
The original proposal and validation record are retained below.
After #6396 and #6597 landed together, the Goal storage suite could not collect because it still imported the removed
capture_presentfixture. Import the currentsource_modules_presentfixture required bycold_api, preserving its source-present/source-absent and registry-alias coverage without restoring obsolete fixtures.Validation: all 33 tests in
tests/control_plane/test_chat_goal_storage.pypass against real HTTP and isolated File/SQLite stores; Ruff, the changed-diff semantic advisory andgit diff --checkpass. The unmodified base fails during collection on the missing import.The runtime and App source are unchanged. Separately, a normal wheel and non-dev macOS App built from base
de41d2d310ccb9d259200d81d6182a32824ca556passed four different-port starts, prepared/completed original-preview recovery, stale-preview refusal with later writes preserved, durable discard and forward/reverse storage migration on a synthetic released-1.4.2 Goal. This qualifies that installed journey only; complete Goal reactivation, Host/Lark/support-matrix and sustained/default qualification remain separate.Future-facing pass: reuse the existing shared fixture owner; no compatibility alias or new fixture layer is needed.