Skip to content

feat(research): bind display translations to source context - #7212

Merged
loopx-agent merged 1 commit into
mainfrom
codex/research-display-context-20261024
Oct 24, 2026
Merged

loopx-agent merged 1 commit into
mainfrom
codex/research-display-context-20261024

Conversation

@loopx-agent

Copy link
Copy Markdown
Collaborator

Compact research notes can preserve every literal value while leaving the translator without the evidence needed to interpret those values. This change lets the existing analysis input bind a captured narrative field to exact ranges in its verified sources. Identical text with different context receives separate translation identities.

The same explicit analysis job consumes the context; its versioned display result keeps the citations. Research exposes them inside the existing Sources and history disclosure and shared original-source reader. Empty relationship headings are omitted. Default research composition, original records, six assessment metrics, model budget/cancellation and execution authority retain their existing owners.

Validation:

  • 23 TypeScript contract tests, 46 store/HTTP tests and 9 observer-process tests pass. Providers in these tests are disposable synthetic processes.
  • Twelve complete context-free prepare outputs match the immutable base: four encodings × omitted/Chinese/English output language. Adding/changing/removing context invalidates reuse; missing fields/sources, duplicate bindings and out-of-range evidence fail before execution.
  • TypeScript/Vite/Chat build and packaged research-history/research-display-language pass. The built UI uses the real owning backend/SQLite; Chinese/English at desktop and 390px can open the exact context source and return keyboard focus without opening analysis or writing history.
  • Public text candidates pass the boundary scan. The ten screenshots below use one synthetic fixture; pixels and PNG metadata were inspected separately. No live operating context or raw research evidence is published.

Provenance and exact-token checks do not independently verify linguistic meaning. This PR does not claim a fresh real-model translation, installed adoption or scientific benefit. Existing saved analyses without context keep their identities and remain readable. A curator supplies source context through the existing input-registration path; browsing adds no model call, and no new translator/settings surface is introduced.

Visual evidence uses the packaged UI over the same synthetic thirty-record history with mixed tentative/refuted findings and long text. Before: source UI from 6f8b181. After: source content of efde93e. These are browser/backend qualification images, not an installed native-App claim. The default viewport remains unchanged; the requested disclosure gains one source link, retains unknown version information and drops an empty heading. Reading text stays at normal body size and wraps at narrow width.

Default desktop, before / after

before-first-desktop

after-first-desktop

Default narrow, before / after

before-first-mobile

after-first-mobile

Requested sources, desktop before / after

before-context-zh-desktop

after-context-zh-desktop

Requested sources, narrow before / after

before-context-zh-mobile

after-context-zh-mobile

English source disclosure, desktop / narrow

after-context-en-desktop

after-context-en-mobile

Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>

@loopx-agent loopx-agent left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer: model_agent | gpt-6.1-sol | OpenAI | runtime_reported | effort=max

Approval conclusion (author-owned PR; GitHub blocks formal self-approval)

动机

研究页读者在中文界面阅读含压缩数字或技术记号的历史时,会遇到字面完整却难以判断含义的正文。 同一短句可能分别指诊断调用和独立输入对;以前它们只能共享一条展示译文,现在可各自绑定已有证据范围,并在来源详情中读回。 相同文字、不同证据的合成反例在基线只有一条翻译请求,在本提交分成两条;现有 HTTP 与页面能回读准确引用并恢复焦点。 本 PR 不声称模型已经正确理解上下文,不改原始记录或科学评分,也不自动启动模型、实验或新工作流。 真实译文的语义质量、各来源的完整接入和安装采用仍需原研究交付继续验收。

改动思路

保留现有分析 owner:字段与引用关系由输入整理者声明,TypeScript 负责范围校验及版本身份,Python 只适配原文读取,前端只按需呈现,不增加翻译服务、调度器或新的状态权威。 本 PR 交付逐字段上下文从输入到版本化展示和原文回读的完整切片;真实模型语义质量及更广来源接入继续沿原研究任务验收。

先比较更小的修复:不改动仍缺准确关联,仅强调“不要猜”不能区分相同文字的不同来源;前端自行推断单位则会制造未经验证的事实。当前方案沿已有输入整理、显式分析、版本化结果和原文阅读链路,不增加用户填写 ID/JSON、设置页或逐条模型请求。上下文证据仍只在已有编号来源中出现一次;可选关系属于整理者的证据选择,结果中的引用由 owner 派生,不形成另一个手工同步的权威状态。

具体改动

关键代码讲解

  • parseTrajectoryInput 验证事件与叙述字段确实存在,引用仅能指向已提供来源的合法行;缺源、空引用、重复绑定和越界在模型调用前拒绝。引用沿用 AssessmentCitation。
  • prepareDisplay 将来源上下文加入字段身份。同样的文字在不同上下文中保留两条翻译请求;完整原文和准确字面值不丢失。上下文变化或删除由整个输入身份阻止旧结果复用。
  • prepareTrajectoryAssessment 把准确引用交给同一次显式分析,并约束只翻译原字段,不能把较晚结果或更强确定性补入原文。无上下文时四种编码与三种语言配置的十二份完整输出与基线逐字一致。
  • read_citation 复用原文读取通道,只接受保存且已资格校验结果中的准确引用元组;测试同时拒绝同包中未引用的来源和范围,没有新增任意文件读取接口。
  • selectedContextCitations 只从当前来源、快照、语言和已选记录投影引用,放入已有“来源与历史”;沿既有引用面板打开并返回同一按钮。不显示空的关联标题,真实关联仍由原边列表显示。

依据修改前的 任务优先前端交付合同,existing-owner、complete-original、optional-context 三项均在本 head 实现。轨迹能力说明同步记录可选字段及语义边界;没有新增状态枚举、评分方法或独立翻译 owner。

对主干的风险

最重要的反例是:只看字面量完好与页面存在,仍可能把不同上下文的同一句话合并。实际同输入对照中,基线只有一条请求并触发预期失败,本提交分为两条并通过;原事件与指标归约不改写。另一个反例是借上下文读取任意来源:真实注册文件、HTTP GET 与错误来源/范围测试证明仍受原结果和来源 owner 限制。

23 项 TS、46 项 store/HTTP、9 项进程测试,以及打包的 research-history 和 research-display-language 通过;覆盖中英文、桌面/390px、原文切换、部分/异源/失效、失败重试、引用读取与异步焦点恢复。测试模型为合成进程,不提供语言质量证明。首轮私人截图脚本在 requestAnimationFrame 前检查焦点,已改为等待实际焦点事件,原失败保留,未删除产品断言。

本地预合并的直接检查和 17 项选定检查均通过、零失败或警告;CQR cqr_c6a98d52f0677de11504 有效。工具整体仍返回 manual_review_required:十张二进制图片及 benchmark-sensitive 路径需要人工判断,不能写成自动隐私通过或自动合并授权。这里已逐张查看像素、PNG 元数据和合成数据来源;变更只涉及分析展示和引用,不修改 solver、评分、实验准入或预算。配置要求 wait_for_ci=false,未查询、轮询或等待远程 CI。

语义与 CI 对齐

本差异扩展既有输入/展示合同并复用引用词汇,不创建另一套权威状态。新提示只在显式上下文输入时生效;保留完整含义、否定、未知、数字限制、只读和无工具边界。引用与字段结构由代码强制校验;模型是否正确理解上下文仍未获独立验证,两者不能混称。

我的整体评价

APPROVE,范围是 efde93e55cb0eb595fae0ea867d7918f9906b94e 的来源关联和原文回读切片。长程执行与成本边界保持:没有新增自动分析、调度或原始记录写入;用户体验改善限定于已有详情中可读回上下文、无新增必需确认,并不等于真实译文已经变好。默认首屏与基线相同,没有新增说明;展开来源后可按引用读回解释压缩词的证据,正文及未知版本信息完整,空关联标题不再占位。 本次视觉检查限定于打包页面和合成进程;真实模型译文质量、安装采用及完整来源接入没有因此获得认证。

本 PR 交付逐字段上下文从输入到版本化展示和原文回读的完整切片;真实模型语义质量及更广来源接入继续沿原研究任务验收。 版本兼容不是为无人使用的旧接口增添分支:已保存的真实分析继续沿一份合同读取,遗漏可选字段保持原 key。该改动可独立回滚,不以图片数量、通过测试数量或元数据存在代替科学收益或完整任务完成。作者自合并仍需既有维护者授权与准确 head 的 closeout/readiness;这条 COMMENTED 结论不是 GitHub 的正式自批准。

English verdict: APPROVE — efde93e. The existing assessment owner validates field-bound source context, separates context-specific aliases and exposes exact original evidence through the current reader. Context-free preparation matches the immutable base in twelve cases; local suites and packaged desktop/narrow language journeys pass. Binary and benchmark manual holds were separately inspected. Real-model semantic quality and installed adoption remain unverified; merge readiness and authority are separate gates.

@loopx-agent
loopx-agent merged commit c37ab4d into main Oct 24, 2026
15 of 36 checks passed
@loopx-agent
loopx-agent deleted the codex/research-display-context-20261024 branch October 24, 2026 04:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant