Repository navigation
fix(research): keep saved analysis readable on read-only sources - #7315
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 · gpt-6.1-sol · OpenAI · runtime_reported · reasoning_effort=max
Approval conclusion (author-owned PR; GitHub blocks formal self-approval)
动机
用户在只读研究来源打开已保存报告时,需要读到结论、失败与原文,并明确哪些操作可执行。
此前报告可读却提示分析不可用,空结果和失败提供无效分析或重试,旧运行回执还提供无效取消;现在保留报告、刷新与失败用量,只读来源不再承诺这些写操作。
真实隔离 HTTP/存储上的独立页面对照复现四种旧缺陷,当前 head 修复;读取失败保留报告,重试读取恢复,整个浏览测试没有写请求。
不改变分析权限或模型启用,不重新分析历史证据,不证明真实模型质量、研究因果、完整费用、安装态采用或整个研究发布完成。
改动思路
把来源可用性与执行权限分别从既有 pack 和 controller 读取,是现有渲染 owner 内的最小修复,无需新状态、设置或辅助框架。
本 PR 完成只读报告的误报和无效操作修复;原有来源身份、作业、重试、费用、模型和安装验收继续由各自 owner 负责。
未修改会继续复现四种误导;只删除警告又不能解决空结果、失败重试和取消入口,因此这几个分支属于同一个完整修复。useResearchAnalysis 的执行与取消 guard 原本已经阻止只读写入,本次让 ResearchAnalysisButton 与 ResearchAnalysisPanel 准确表达该事实。
规范依据:docs/reference/trajectory-assessment.md,固定修订 f094b2cfb2acde7a4a0d4d875bba52f64ac31ba9。按 existing-isolated-goal-sources 核验来源读取与显式执行,按 whole-history-presentation-language 核验失败/历史结果保留,结合既有前端 task-first-delivery 验证普通阅读、真实失败恢复与窄屏完整原文。它们都先于本修复;作者新增断言或图像不定义验收。经验建议仅用于追踪真实可读结果,不继承以往结论或科研效益。
具体改动
完整九路径:一个渲染文件 +7/-6、既有浏览器场景新增 84 行、七张合成图片。sourceAvailable 只看 pack 可用性,真正可执行仍需非只读且无读取错误;空结果和失败保留刷新与用量,已记录运行的取消控件遵从只读权限。原来源身份、原始报告、引用和失败回执均由现有 owner 维护,没有第二套配置或新公共词表。
| 独立同输入对照 | 基线 | 当前 head |
|---|---|---|
| 已保存、来源可读 | 错报分析不可用 | 报告可读,无假警告 |
| 只读空结果/失败 | 无效分析/重试承诺 | 刷新读取,失败用量保留 |
| 已记录运行 | 取消看似可用 | 明确禁用取消 |
| 来源变化/读取失败 | 需保留真实诊断 | 警告仍在,报告保留,可恢复读取 |
本轮独立真实 HTTP/存储页面对照覆盖以上四个旧缺陷及真正来源变化,读取 503 后重试恢复。普通本机路径的保存、空、失败、运行、来源变化五种状态,其完整可见文本、控件与禁用状态逐字一致,无归一化。完整打包 research-history 场景及 16 项分析 API 测试通过,UI 写请求为零,来源字节保持。
对主干的风险
最重要的反例是修掉假警告时隐藏真正来源错误,或让已存作业状态冒充执行许可;同输入两向反例与既有 API/controller guard 均已核验。此次只改 UI 投影,不变更模型权限、存储、调度、配额或 API。当前相关 #7326 修复测试启动的包来源,不替代本次界面修复;两者属于不同 owner 边界。
本地构建、最终 Chat 打包校验通过。premerge 四项直接检查、七项 catalog 和一项公开边界自动检查通过;原始父命令仍为 exit 1,明确保留七个 PNG 人工 hold。本轮已检查七图像素、合成来源与 metadata:只有四图附带 ICC 数据,未见私人路径、账户或凭据。自动结果与人工判断分开,均不构成合并授权。未查询或等待 CI。
首次复用目录中的旧打包产物被校验拒绝,重建后原命令通过;独立对照第一次过早观察空视图,保留失败后仅修正等待完整 pack 的条件,全部语义断言保持,重新对照通过。没有将失败改记成通过或删除产品检查。
我的整体评价
没有阻塞发现,批准当前 f7258a72a8fa9810889d5068d9bcde4ea465bf9c 的完整范围。宽屏报告直接显示结论与竞争解释,390px 按原顺序阅读;正文保留 16px,实验、完整方法与引用仍可访问,空、失败和未核验运行状态各有对应操作。
未验证安装态 App、真实模型或独立研究者理解;窄屏来源标签原有截断仍在,未将合成材料的阅读通过视为科研或费用收益。
长期工作连续性保持:历史报告、实际失败、未知保留和原文仍能在重读/恢复后访问。当前修复完成了有限的阅读任务,不能以测试或截图数量结清研究能力、正式发布与安装采用。架构上复用既有来源和执行 owner;无需新增 helper、配置或兼容分支。源码打包、真实回环后端与合成负例各自的证据范围已经区分;平台的 COMMENTED 结论与正式自批准限制、任何合并权仍分别保留。
English verdict: APPROVE f7258a7. Readable source state and execution permission are now distinct. The packaged suite, 16 API cases, paired real-HTTP readonly counterexamples and five verbatim local parity cases pass; real source/read failures remain visible and recoverable. Seven binary holds were inspected separately; installed use, real-model quality and cost remain unqualified.
Goal And Delivered Outcome
A saved report from a read-only research source was readable but displayed “Analysis is unavailable; refresh to retry.”
ResearchAnalysisPanelcombined pack availability with execution permission. The same conflation advertised ineffective generation/retry actions for empty or failed read-only results and an enabled cancel button for a stored running receipt.This change uses the existing pack availability to describe the source and the existing controller permission to gate actions. Saved reports remain readable; empty readers offer refresh, failure records retain their usage, and cancellation stays disabled on read-only sources. Genuine source changes and read failures still appear, with the last saved report preserved.
中文:修复“报告可读却提示分析不可用”的误报;只读空结果可刷新,失败与用量保留,待完成记录不再提供无效的取消操作。
main, based onf094b2cfb2acde7a4a0d4d875bba52f64ac31ba9; a single author commit.Author Declaration
AGENTS.md,docs/development/frontend-delivery.mdanddocs/development/design.mdatf094b2cfb2acde7a4a0d4d875bba52f64ac31ba9.ResearchAnalysisPanelresearch-historyscenario and seven visual capturesreadOnly, pack availability, execute/cancel guardsScope And Continuation
The changed entrypoints are the research analysis entry and panel. Ordinary local interactive fixture behavior is retained. This is a source proposal with a packaged synthetic journey; installed adoption, model quality, research causality and the wider release remain unqualified. No successor is needed for this repair. Independent review and maintainer merge remain separate.
Validation
f7258a72a8fa9810889d5068d9bcde4ea465bf9c; final source blobs match the successful runs below.npm run build:desktop: TypeScript and Vite; existing bundle-size warning remainsscripts/chat_bundle.py buildandverify, including the final committed revisionresearch-history, 35.7s: disposable HTTP server and real file-backed trajectory pack store, with synthetic provider outputs; no model serviceThe final main combination includes the previously merged first-frame CSS repair. The earlier baseline suite also passed. A wrong-working-directory packaging invocation failed before the script ran, then passed from the worktree root; no test failure is relabeled. No API, persisted-state, runtime routing or provider implementation changed, so backend promotion suites are outside this delta.
Frontend / Visual Evidence
Type of Change
LoopX Area
Boundary Checklist