Repository navigation
feat(research): read source-bound case studies inside benchmark child Goals - #8272
Conversation
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
…ions Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
huangruiteng
left a comment
There was a problem hiding this comment.
Reviewer: model_agent — OpenAI / gpt-6-astra; runtime_reported; reasoning_effort=xhigh.
Approval conclusion (author-owned PR; GitHub blocks formal self-approval)
未发现本次改动的阻塞性问题。评审对象是 1a4d868330b620e2234431368a13ed771e8a0eeb;这是一份作者侧的完整自审,不声称独立评审者认可。维护者已明确授权通过本地必需验证和评审后自合并及更新本机。
动机 / Motivation
需要理解陌生 benchmark 领域并自行判断结果的研究者。此前要在研究记录与外部报告之间拼接背景;现在进入 case 子 Goal,即可先读结论,再阅读领域解释、策略、转折和来源。已验证父子 Goal 导航、图文解读、版本切换和原文回读;阅读不启动模型。本次不证明 LoopX 的因果收益,不执行新的 benchmark,也不开放任意 HTML 脚本。
合并后的本机 App 更新与实际工作区回读尚待执行。本 PR 解决的是可复用的研究阅读路径,不把一次个案解读或图表存在当作长期效果证据。用户无需重新整理资料、执行练习或提供额外确认;阅读深度由用户自己选择。
改动思路 / Approach
解读作为原有证据包的可选内容,校验与存储复用既有 owner;无需新增执行器或独立研究状态。交付从显式注册到子 Goal 阅读及证据回读的完整路径,安装更新由既有升级流程承担。
不做产品改动、仅交付外部 HTML,是更便宜的方案,但不能满足普通子 Goal 内持续研究、保存解读版本和回到准确原文的要求。本方案保留原始研究记录和模型报告,用可选作者解读补充背景。作者意图不能从分数自动推导,因此 document 是独立内容;来源范围、历史版本和读取权限仍由既有证据包负责。
| 触发 | 结果与边界 |
|---|---|
| 显式注册解读 | 校验文档与来源后产生不可变 pack,不启动模型 |
| 打开 case 子 Goal | 读取该 Goal 的解读、图表、时间线;父子关系不合并证据 |
| 修改解读 | 新 pack 保留旧版本;模型请求和 analysis key 不变 |
| 原始来源变化 | 显示历史提示并保留冻结原文,不能当成当前结果 |
具体改动 / Changes
审阅基准为 docs/reference/trajectory-assessment.md 在 22d8daff5b2e9e173908ccdf4a16617a2993a70f 的既有合同,而非用本 PR 新增文字证明自己正确。TA-READ:阅读不得执行分析,已实现并通过真实 HTTP/文件读取验证。TA-HISTORY:既有配置、请求和历史结果保留,CLI 主干/head 的完整归一化观察相同。TA-SOURCE:引用指向确切原文,来源变化后继续读注册快照,Escape 返回引用按钮。
关键代码讲解
qualifyTrajectoryCaseStudy(loopx/control_plane/capabilities/trajectory_case_study.ts:20)负责局部展示形状、大小和引用范围。每节必须有依据,表格须矩形,数值只能是有限值或 null。范围合法不意味着解释正确。register_pack(loopx/capabilities/benchmark_toolkit/trajectory_assessment_store.py:374)先走 TypeScript 校验和已有来源字节验证;文档进入 pack identity。真实 CLI 反例临时移除文档身份后出现 registration_conflict,正常 head 则能独立保存两个版本。ResearchCaseReading(apps/presentation/dashboard/src/features/personal-workspace/goal-research-analysis.tsx:353)复用原有读取状态、版本选择和引用面板。正文组合由作者决定,执行和错误恢复没有新 owner。ResearchGoalNavigation(apps/presentation/dashboard/src/features/personal-workspace/goal-research-workbench.tsx:11)先按来源 namespace 筛选,再调用既有 Goal 层级逻辑。同来源父子导航可用,外来来源不能借父 id 进入。
共20个文件,+624/-6;较多新增行来自公开合成 fixture。新增生产边界是80行校验器、76行阅读组件和局部样式。后续只追加一处 CI 测试修正:以既有消息合并行为测试替换过期源码匹配,保留隔离、去重、迟到结果与流式内容保护的独立断言。
对主干的风险 / Risks
主要风险是漂亮页面掩盖错误来源、覆盖旧版或把模型解释伪装成科学结论。因此验证穿过真实注册、持久化及独立读取,而非仅依赖截图。来源变化、错误引用、版本修订、同名但不同来源的子 Goal,以及读取失败后的恢复均有对应证据。开启后只有指定 pack 改变阅读默认值;无文档时原有模型请求和分析入口保持原样。标题、父子关系、CLI 可见性都不授予研究执行权限。
语义与 CI 对齐
复用既有 trajectory/Goal 合同,新增形状局限于 benchmark-toolkit,无新的共享状态枚举、quota 或调度义务。当前主干新增的 #8229 仅涉及 benchmark native-child runner 文件,不改变本次研究与对话读写调用链。
PASS:36项 TypeScript 测试、51项真实文件 store 测试、当前 head 的研究 HTTP/SSR smoke、chat 构建、消息状态行为验证、6项直接及4项选定 premerge 检查。前两组复用 6b9353d4 的执行证据,逐文件确认实现和测试均未变化。新 CLI 对照省略文档时主干/head 的注册、当前及历史读取 SHA-256 均为 91fd53c731585aad503ec75b998c9b18958d06a7163a2b0eefbf0e1fef7bb375;仅归一化时间和临时根路径,未抹除状态或诊断。
FAIL(独立既有问题):完整工作区 catalog 在 conversation-activity 的 Goal Chat 场景等待“发送”超时;相同打包场景在基准 22d8daff5b2e9e173908ccdf4a16617a2993a70f 同样失败于 line259。该路径尚未进入 Research,相关 composer/fixture 未改;研究路径另有通过证据。另保留旧 stylesheet 的3个未定义变量观察。先前 Release Artifacts 的过期函数匹配已本地修复,但不声称远端 CI 全绿。Goal 配置 wait_for_ci=false,没有轮询新 CI。premerge 的 benchmark-sensitive manual hold 由完整评审和独立合并授权处理,不能把 exit1 写成自动准入通过。
我的整体评价 / Verdict
这是可独立回退的完整研究阅读增量;long_horizon preserved,user_experience improved。桌面首屏以结论为主,目录和正文分栏;窄屏转为纵向阅读,来源和数值可展开,未知观测保留空缺。合并前未验证安装后的原生 WebView;未测量阅读理解提升。沿用 6b9353d4 的公开合成截图和真实后端浏览验收;本次新 head 只改测试文件,生产呈现未变,因此不伪造一套新截图。较小的复用方案已经采用:继续使用统一 citation/read controller 和 Goal 层级,不引入 widget runtime 或第二套研究权限。
结论为 APPROVE,保留上述既有测试故障、作者解释局限及安装验收边界。具体 head 的发布回读、merge-readiness 和本机升级验证仍按仓库流程执行;本评审不替代它们。
English verdict: APPROVE 1a4d868330b620e2234431368a13ed771e8a0eeb — no blocking finding in the changed research path; required local evidence passed, pre-existing unrelated workspace failures disclosed, remote CI not consulted under the configured policy.
Goal And Delivered Outcome
Make a benchmark understandable to a reader who does not know its domain: conclusion, background, competing approaches, turning points, evidence and uncertainty.
Before, the Research view primarily exposed records and model assessments. This adds an authored case reading view inside an ordinary child Goal of the benchmark. The parent links to its case Goals; each child owns its reading versions and evidence. No separate case container or execution authority is introduced.
Intended base:
main(verified merge base22d8daff5b2e9e173908ccdf4a16617a2993a70f).Author Declaration
Written by: model_agent — OpenAI GPT-6 / Codex.
Implemented against
The product request above is the basis; the resulting contract is documented in
docs/reference/trajectory-assessment.md#authored-case-studiesanddocs/development/design.md#research-workspace--研究工作台at the tested revision.Self-check: reviewed changed owners, public boundary, tests and packaged browser behavior. No solver, scorer, model execution or runtime promotion was performed.
Scope And Continuation
Complete within this authoring/reading scope. The CLI accepts
--case-study-json; the workbench selects versions and reads evidence. Document edits create new pack identities. Parentage does not aggregate sibling evidence. Existing research records remain a separate selectable view.Placement: built-in
benchmark-toolkit; TypeScript owns document qualification, Python remains the existing storage/CLI adapter. Presentation composition is local to this capability; no new shared closed vocabulary. Reused existing citation and read-state components instead of introducing another reader. No executable HTML or Porthole runtime dependency.Remaining delivery boundary: exact-head review publication, authorized self-merge and installed-app rollout. Arbitrary HTML/widget execution and WKWebView sandbox qualification are outside this PR.
Validation
Current head:
1a4d868330b620e2234431368a13ed771e8a0eeb. Production implementation, 36 TypeScript tests, 51 store tests and browser captures are unchanged from tested revision6b9353d4bc665a6ce4c940ed8359fa699afa9862; the final commit replaces a stale source-pattern assertion with existing conversation-return behavior tests. Chat build, workspace contract, session observation, research HTTP/SSR smoke, CLI parity and quick premerge were verified on the current head.Run state: finished. Input classes: synthetic; authorized_private_read_only (not published).
npm run typecheck:control-plane; packaged chat build including dashboard TypeScript checkingnpm run smoke:research-analysis-read; existing production HTTP read controllerreport-reviews.css(--pw-bordertwice,--pw-surfaceonce); no new unresolved propertywait_for_ci=falsepolicy; no claim of green remote CI.22d8daff5b2e9e173908ccdf4a16617a2993a70fat the same step; composer, scenario and fixture are unchanged. The affected Research journey is validated separately.91fd53c731585aad503ec75b998c9b18958d06a7163a2b0eefbf0e1fef7bb375. Authored revisions remain distinct; removing document identity produces a registration conflict.manual_review_requiredfor benchmark-sensitive paths; zero required check failures; this manual hold requires the complete review and separately granted maintainer self-merge authorizationCoverage limits: packaged browser verified, installed desktop not verified. Source registration checks bytes/ranges, not scientific entailment. Historical case interpretations do not establish matched causal effects. CI and exact-head review are separate gates.
Frontend / Visual Evidence
UI impact: changed. Before: N/A for the new authored reading view; the existing record reader is retained (shown below for a child without a study). Screenshots use only the tracked synthetic fixture, the packaged chat bundle and real isolated backend at the tested revision. No public hosted preview.
The primary question is “what happened, why does it matter, and how far does the evidence support it?” One conclusion leads; domain explanation and trajectory follow. Sources, scope and exact values expand on demand. Long prose and mixed valid/missing observations were inspected. Narrow layouts keep page width bounded; wide charts/tables scroll within their own regions. Existing read-only/empty states remain visible.
Benchmark parent / child entries
Child Goal — first viewport, desktop
Narrow first viewport
Populated narrative, missing observation and timeline
Retained no-study reader
Type of Change
LoopX Area
Technical Direction
Research evidence readability, scoped to the existing S5/S11 trajectory assessment owner. This does not claim broader benchmark effectiveness or shared-authority migration completion.
Shared-authority RFC fixture impact
N/A: no authority-store promotion, routing change or shared-state migration.
Boundary Checklist