Repository navigation
fix(ui): withdraw adoption when source use becomes unavailable - #6361
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=xhigh
Approval conclusion (author-owned PR; GitHub blocks formal self-approval)
动机
在团队成果中读取已验收报告、核对修订并准备确认其后续使用的操作人员。 报告自身字节和历史验收没变,但上游输入失效时,旧界面读取后续结果仍保留该报告及修订痕迹,旁边却提示来源不可用,给操作人员矛盾的当前证据。 当前界面按已有来源资格撤回旧报告、修订痕迹和采用控件;修复原输入后,用原刷新或键盘重读可恢复原结果,不重派已完成工作。 本次只修复现有报告/采用界面的当前使用条件,不增加验收或执行权限;合成导航和 scripted worker 的真实 HTTP/SQLite 流程不认证付费模型、独立语义 verifier、已安装原生 App/Lark、整条 M2/M3 或长期收益。
改动思路
复用同一局部 accepted predicate,并与现有报告、对比及修订 reader 的 current_use 条件对齐;TS 继续掌握来源资格和采用事务,前端只撤回失效呈现。 单行生产条件及对应可复现的打包失效/恢复验证,保留旧 readback 缺字段的兼容性;CLI 与 backend 字节未改。 历史 accepted 说明当时验收通过,不能代替此刻来源是否可用。读取先核对 source,再读取 downstream;原身份、版本和 generation 检查仍在同一流程,消费者单独不可读时保留刚核实的 source,而来源本身失效才撤回原报告。
具体改动
当前 086132e855d266447953e64a11942f4d12670e80,冻结 60d833b13c85135587b725013b247e827663ffb9,完整 7 文件 +110/-4,生产逻辑只有一处条件。原规范 docs/reference/local-delegation.md 的 Source use and recheck 要求历史验收与 current_use 分开,unavailable 不供当前使用、team view 撤回报告、修复后 read 不重派:此有界要求 implemented。原 recovery RFC 的 M2/M3/整体产品与安装态资格仍开放,未把这一个 reader 修复当整个路线完成。
关键代码讲解
accepted新增current_use?.state !== "unavailable",与既有 result/comparison/correction reader 条件相同;旧 readback 缺字段仍保留兼容。没有新增 Enum 或 Python 判断源。sameResult/uses复用该 predicate;同一 request、Agent/Todo、产物版本和哈希不再绕过当前来源资格,source/downstream 都经过现存限制。read先重读 source,失效调用onObservation(null),由已有 parent 撤回报告和修订痕迹。可用 source 先写观察,再核验 downstream,因此可选消费者丢失不抹去新验证的修订证据。confirm仍走原 requester-scoped typed adoption;lost ACK 只重读原 receipt,未新增采用、派发或验收权限。测试给真实 HTTP/SQLite fixture 加第三层来源链,并分别验证旧报告撤回、恢复、完整既有 adoption/修订流程;三张图片为公开合成状态。
对主干的风险
我的三个完整打包 browser 场景通过:真实 HTTP/SQLite 来源链、原 adoption/lost-ACK、修订 evidence-return;七项完整 File/SQLite 当前来源用例通过。用相同当前 source-chain fixture/assertions 对冻结 base 的正常 bundle 执行,历史验收和产物字节仍相同,但撤回 alert 缺失,旧控件保留,30 秒后在该断言失败;当前完整流程通过。只切换 fixture/import 的选定源码根,没有放宽字段、错误、权限或断言。base 初次缺前端依赖/manifest 的 setup 失败保留,正常 npm ci 和 build 后才记录真实反例。
来源中间结果 current_use 失效后,报告/trace/采用控件撤回;原输入修复后的键盘刷新恢复同一结果,session 保持暂停及原内容,三次 scripted worker 各一次,零额外 adoption/dispatch。可选下游失效仍保留 freshly verified correction,旧字段缺席兼容及原失效/恢复链通过。脚本化导航不是 authority/verifier 模拟替身:采用与来源规则仍走真实 typed HTTP/SQLite owner;worker 本身是合成的,没有付费模型。
语义与 CI 对齐
advisory 后 4 direct、5 selected native premerge、完整 semantic、CSS、bundle source verify、TS/packaged build、typecheck/Ruff 通过。完整 diff 未改 backend/CLI/默认开关,原 schema/状态词表复用,原机器来源义务与 UI 呈现边界保留;没有查询或等待 CI。first viewport、导航和 style 未改。三张原 PR 合成图及本轮 desktop/390px、reduced-motion、keyboard 观察显示错误和刷新在原 context,未以颜色单独传达状态。
Ego 的独立真实隔离 Goal 导航也检查了当前 bundle,但原 HTTP 测试 fixture 不是完整 serve_chat 初始化,缺少 assets/selectedGoal/catalog/action 等外围属性,不能把该导航当采用 pane 或安装态 App 验证。我保留这些 setup 输出并关闭自己的 TaskSpace 和 fixture;上述关键资格来自独立执行的完整公开打包测试,未宣称完整原生导航/已安装 App/Lark 已通过。
我的整体评价
APPROVE。long_horizon 和 user_experience 均 improved:界面只把当前可用的来源当证据,修复后沿原操作读回,不再要求额外派工或让旧报告与失效提示并存。复用同一局部 accepted predicate,并与现有报告、对比及修订 reader 的 current_use 条件对齐;TS 继续掌握来源资格和采用事务,前端只撤回失效呈现。 单行生产条件及对应可复现的打包失效/恢复验证,保留旧 readback 缺字段的兼容性;CLI 与 backend 字节未改。 相邻前瞻检查保留一个局部 predicate,不为一处条件新增状态/authority 层。全部结论绑定当前头部;paid-model L1、独立 verifier、安装 App/Lark、整条 M2/M3 和长期收益未验,批准不授予合并权限。
English verdict: APPROVE — 086132e. The existing current-use condition now withdraws an unchanged historical report when its source ancestry is unavailable and restores it by explicit readback without redispatch. Three complete packaged scenarios, seven File/SQLite cases and the frozen-base withdrawal counterexample qualify this bounded frontend repair; scripted navigation/workers do not prove installed native App or independent model verification.
An accepted report can keep the same output bytes after one of its dependency inputs becomes unavailable. The adoption reader checked historical acceptance and output versions, but omitted the existing
current_useobservation. Opening a downstream candidate could therefore retain the old report and correction trace alongside an unavailable source.The reader now uses the same current-use condition as the report and correction readers. An unavailable source clears the displayed report/trace and adoption controls; restoring the input permits explicit readback recovery. The existing TypeScript delegation owner remains authoritative, and older readbacks without this field retain compatibility. This is a frontend repair, with no new receipt, configuration, provider or acceptance authority.
Validation:
The ordinary task takes no extra navigation or confirmation: read the downstream candidate, see source failure in place, restore the input and refresh. The related refactor pass reuses the existing local predicate; an additional authority/helper layer is unnecessary. CLI and backend behavior are unchanged. Installed native App/Lark, paid-model L1, independent semantic verifier, full-suite and release qualification are not established by these tests.
Screenshots use synthetic navigation and scripted workers against the real HTTP/SQLite owner. They show source failure/recovery presentation, not live independent verification. The default first screen and navigation are unchanged.
390px withdrawal view