Repository navigation
test(dashboard): let the delegation smoke read the real steward source - #7599
Conversation
loopx-agent
left a comment
There was a problem hiding this comment.
Reviewer: model_agent · gpt-6.1-sol · OpenAI · runtime_reported · reasoning_effort=max
未发现当前完整精确 head 31ff0a7284847181d4ee5bc3317b5b2c9227d793 的阻断问题,结论为 APPROVE。
动机 / Motivation
维护 packaged Chat 回归检查、核验原管家会话失败与恢复的开发者。
fixture已切到源不可用并返回409,但页面被测试自己的固定200响应拦住,等待错误提示持续超时;去掉拦截后页面能看到真实拒绝并在源恢复后重试。
旧故障已复现,新脚本完整通过,保留拒绝、恢复及所有原断言,产品页面与协议均未改变。
本次只修已有测试,不宣称生产UI改变、安装态采用或任何其他PR的CI已恢复。 不把旧测试超时解释成生产故障,也不把这次通过解释成其他分支已经通过。
改动思路 / Approach
复用fixture已经安装的真实conversation source owner,删除唯一遮住服务器状态的stub即可;保持旧stub或删除失败断言都会失去该回归保护。
本PR交付一个既有browser smoke的真实source拒绝/恢复路径,未引入额外测试、产品代码或新状态。
基线为 fb331f45c355152a4c1658af1e097f60a5840154。产品源码、fixture 和断言没有变化,只有测试里的固定响应被移除,所以无需新的配置、状态、回归文件或用户操作。保留该拦截同时放宽等待时间,不能让页面观察真实409;删除拒绝断言则会丢掉已存在的恢复覆盖。
具体改动 / Changes
完整diff为一个测试文件 +2/-2:删一行固定响应,改两行注释。没有生产、生成文件或持久schema变化。
fixture(action)继续通过stdin控制隔离server;source-unavailable改变原conversation source,source-recover恢复它。该fixture用真实SQLite/Inbox与HTTP owner,外部provider不执行。- 页面读取与拒绝/恢复断言 现在绕过测试stub,直接读取同一server。第113行后的409、错误提示、入口隐藏及重试断言全部保留。Node fetch原本不受page.route影响;现在页面也能观察同一拒绝。
规范依据:spec_ref docs/development/good-smokes.md,spec_revision fb331f45c355152a4c1658af1e097f60a5840154。Start With The Contract 对应已交付Chat入口;Prefer Semantic Pressure 对应真实拒绝与恢复;Public-Safe Fixtures 对应合成隔离状态及无外部执行。依据来自变更前文档,不由本次通过结果反推要求。
相邻app-steward-smoke.ts验证source owner,delegation-media smoke保护媒体入口;二者不能替代本脚本的真实页面拒绝/重试。这是修已有覆盖,没有新增同形smoke。已读投递的历史恢复RFC经验;当前内部测试边界成立,不移植旧评审结论或要求完成无关父RFC。
对主干的风险 / Risks
| 验证 | 结果与边界 |
|---|---|
| 同fixture、同构建资产的旧基线脚本 | FAIL(预期回归重现):第115行等不可用提示30秒超时;保留原失败。 |
| head build与完整原smoke | PASS:搜索、分页、原对话、失败/重试、旧响应、焦点、workspace隔离、窄屏、英文、source拒绝/恢复、只读断言。 |
| Ego独立入口 | PASS:真实source 200;拒绝后409且委派入口为0;原Retry恢复200和13条委派。没有用页面拦截伪造postcondition。 |
| 本地仓库门 | PASS:配置内17文件mypy、完整control-plane TypeScript typecheck、diff/DCO/双语门通过;明确路径public scan零错误/警告。 标准source premerge四direct、两catalog通过。 |
完整native队列中的预算#7592和文档#7593有不同owner/不变量;此次没有借它们的结果替代browser证据。该脚本原先就连接真实source,只是页面额外被stub遮盖;删除stub不改变生产默认、授权、错误文案、调度或quota。没有新增用户确认、配置或人工准备轮次。
精确scope的CQR:cqr_277fba74f5c874d32fcd,PASS / valid;风险对应验证与源码判断已记录。
我的整体评价 / Verdict
复用fixture已经安装的真实conversation source owner,删除唯一遮住服务器状态的stub即可;保持旧stub或删除失败断言都会失去该回归保护。
本PR交付一个既有browser smoke的真实source拒绝/恢复路径,未引入额外测试、产品代码或新状态。
long_horizon与user_experience保持;这次证明的是现有回归信号恢复,不是模型效果或长期成本收益。已检查完整diff、packaged Chat和source拒绝/恢复入口;仅测试拦截变化,没有页面、组件、布局或文案改动,视觉改动评审不适用。 安装态、外部Lark连接、真实模型采用及长程效果未在本轮验证。
本地build的大chunk提示保留为现有构建提示,不改阈值。未查询、等待CI;审批、closeout与merge readiness分别处理。没有合并或安装权限推论。
English verdict: APPROVE — 31ff0a7284847181d4ee5bc3317b5b2c9227d793 removes the test interception that hid the real source refusal. The old script reproduces the timeout; the complete packaged smoke and independent real-source recovery pass. Product behavior is unchanged.
The delegation-search smoke fabricated a 200 answer for /api/chat/app-steward with page.route, so the page never observed the fixture's later source refusal and the "steward conversation is unavailable" alert could not appear. The expectation added with loopx-project#7526 therefore failed on every run, including runs of unrelated branches. The fixture already installs the real conversation source owner and answers {ok: true, binding_id: null, session_id: null} in its normal state, exactly the payload the route fabricated. Dropping the route lets the page read the real answer, so the refusal and the recovery after it are exercised against the server instead of a stub. Validation: the packaged smoke reproduces the same timeout before the change and passes afterwards; RFC bilingual check passed; loopx canary premerge --from-git-diff green; public boundary scan clean. Signed-off-by: xiaoan17 <anbc1224@gmail.com>
31ff0a7 to
46ca769
Compare
Rebased onto current main — new head
|
Scope
One browser smoke, and the base failure it carries.
apps/presentation/dashboard/smoke/delegation-search-browser-smoke.mjsfails onevery run of
chat-bundle-browser (1). It is unrelated to any open change: thesame assertion fails on branches that do not touch the Dashboard.
Current gap
The smoke fabricated the steward source answer:
Later in the same run the fixture makes that endpoint refuse, and the smoke
expects the page to show it:
The interception answered every page request with 200, so the page never entered
the unavailable state, the alert never rendered, and the wait timed out after
30s. The 409 assertion above it passes because it is a Node-side fetch that
bypasses the page route.
Fix
The fixture already installs the real conversation source owner and answers
{ok: true, binding_id: null, session_id: null}in its normal state — exactlythe payload the route fabricated. Dropping the route lets the page read the
real answer, so the refusal and the recovery after it are exercised against the
server instead of a stub. No product code, schema, wire or default changes.
Validation
delegation-search-browser-smoke.mjs:115before the change, and passes afterit, including the source refusal and recovery it added.
loopx canary premerge --from-git-diffgreen;public boundary scan clean.
Why it matters now
#7592(a quota output-budget ceiling) is blocked by this job on the sharedbase. Landing this first lets that PR rebase onto a green base.
Signed-off-by: xiaoan17 anbc1224@gmail.com