Repository navigation
fix(research): use faithful localized guidance by default for new analyses - #7444
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 | declaration_source=runtime_reported | reasoning_effort=max
Approval conclusion (author-owned PR; GitHub blocks formal self-approval)
APPROVE the bounded source change at 81611f9686418aedc38b42a43bfc7b82c82b3836. No blocking finding. This approves new-input guidance selection and successful-output recovery, not translation semantics or merge authority.
动机 / Motivation
研究人员在既有研究分析入口生成下一份报告时,会遇到默认译文指导偏弱和接续复用丢失译文的问题。
例如,同一证据的成功分析后来重试失败,再登记接续版本:旧实现会丢失原有译文,新实现从成功尝试的原始输出恢复,保留译文与指标。
本次确认新输入保存默认指导、接续保留完整展示结果;继续使用原分析操作,无需新增选择或确认。
本次不增加修订译文入口,不修改旧报告,也不宣称语义翻译质量、正式安装版本或净效率已获验收。
整份报告的语义质量、正式 App 采用与实际效率仍待原研究工作继续验证。
改动思路 / Approach
Preparation records a method; execution remains the existing explicit Analysis operation. The trusted CLI/store writer asks the existing TypeScript parser to fill an omitted encoding, then saves that normalized input. Ordinary reads re-prepare that saved input without choosing today's defaults. This avoids an extra editor, per-field jobs, navigation, re-entry or confirmation: zero additional required interaction rounds.
Qualified readback has restored literals and is not raw provider output. For continuation, the store now reads model-output.json from the successful attempt, including an archived success after a failed retry, and passes it to the same typed qualifier/comparison. Missing or malformed raw data cannot certify reuse.
保留现有 TS 决策与 Python 文件/进程边界;默认选择属于新输入准备,旧版本兼容属于持久化契约,接续恢复属于既有分析存储。无需新的译文产品。仅交付新输入的默认指导与成功原始输出复用;语义质量、部署采用和净效率不在本次通过结论中。
| Same input/trigger | Base | Exact head |
|---|---|---|
| New default writer, encoding omitted | Direct-field method | Existing v3 persisted before execution |
| Frozen/explicit input | Original request | Complete request unchanged |
| Successful translation, later failed retry, same-evidence successor | reused may be true while display is lost |
Exact successful raw response preserves display and metrics |
| Browse, switch language, inspect originals | No model job | No model job |
This source-derived table also reflects the bounded replay. It is not model-comprehension evidence; a separate diagram was unnecessary.
具体改动 / Changes
The seven-file diff is 99 additions / 17 deletions: three existing production files; one bilingual contract clarification; two focused test files; and a two-line browser wait that observes the existing focus-return frame while retaining the assertion. No new editor, endpoint, module, state authority, CLI option or provider is introduced.
关键代码讲解
parseTrajectoryInputdistinguishes missing encoding from explicitnull. Only a new-writer hint plus a display snapshot selects v3. Existing encoding validation and canonical property order remain, so execution revalidation reconstructs the saved request exactly.preparetransports new-writer intent for current-schema preparation. The existing CLI still previews until--execute; normalization invokes no model.register_packselects the guidance with the existing default configuration, verifies complete source bytes and saves normalized input. Explicit custom configurations and frozen reads retain their prior method._continuationlocates the raw successful attempt and delegates reuse eligibility and qualification to the existing TypeScript owner. Analytical comparison omits the restored display sidecar; raw translations remain available for actual reuse.inspect_packandexecute_packremain the consumers and lifecycle owners.
Specification basis: docs/reference/trajectory-assessment.md at bb150595664fe0e910db9587cff22ea3b471f5ee (pre-change contract). These are review mapping labels for its unnumbered criteria, not new protocol identifiers:
- LANGUAGE — implemented: same interface-language job/cache binding; bilingual owner checks and retained HTTP journey.
- FROZEN — implemented: old prompt, key, schema and input stay exact; twelve complete base/head preparations plus two previously saved requests.
- EXPLICIT — implemented: original execution, timeout, cancel, retry, cache and observed-usage owners remain; no calls on registration or browsing.
- RETRY — implemented: failed retry preserves prior successful output and its own usage; continuation now preserves its complete translated display too.
- ORIGINAL — implemented: strict literals/citations and missing/invalid-row original fallback remain, including partial-to-complete retry.
- BOUNDARY — implemented: mechanical coverage still makes no linguistic, causal or model-calibration certification.
The default-selection amendment implements the requested ordinary generation workflow. It changes a new frozen request, not the identity or meaning of an earlier report.
对主干的风险 / Risks
The strongest counterexample is a misleading success receipt: after partial success and failed retry, reuse appears successful but loses the entire display. I applied the same synthetic public-store oracle to immutable base and head exports, selecting explicit v3 so the default change cannot mask this defect. Base reaches reuse and fails whole-display equality; head preserves complete display and metrics. This runs real scoped files, the actual TypeScript bridge and a synthetic child, not a paid model. The oracle extends the committed test_full_history_display_uses_the_same_job_and_preserves_original_versions successor assertions to the explicit-v3 branch. Language-key mismatch and changed-source execution reject; the prior result remains readable, and later explicit retry completes the partial result.
PASS: new writer and independent readback agree on the saved key; original input bytes stay unchanged. PASS: twelve complete preparations across omitted/explicit encodings and unspecified/Chinese/English language have identical base/head hashes on the frozen path. Explicit null rejects with the same full diagnostic. These checks cover replay and rejection, rather than comparing only verdict codes.
Reused validation is tied to complete source tree 8fdc0cb814bb991bb57a7ff4dfefe7bf719fba02, identical to this reviewed head: 34 typed-owner checks; 88 process/store/HTTP/Explore cases with 31 HTTP/Explore cases rechecked after main integration; typecheck, Ruff, two saved-request parity checks and the packaged research-history scenario (183.309 seconds). The packaged run's original commit is f451efc28f822f7b18ac5e41d24f505cf5bff5db; it is a synthetic packaged journey, not installed-App evidence. Earlier normalization-order and focus-timing failures remain recorded; canonical request roundtrip and the retained asynchronous focus assertion cover their current invariants. No failed observation was relabelled as passing.
语义与 CI 对齐
This reuses the existing encoding vocabulary, typed qualification and source/attempt owners. No prose-based state classifier or generic work-lane obligation is added. Fidelity prose is guidance; literal/citation checks are enforced, and a mechanically valid but semantically poor translation remains possible. Default selection is disclosed in the bilingual reference and named regression. Disabled execution still produces no job; frozen shared preparation retains its complete prompt/schema/key, so isolation is demonstrated rather than inferred from a missing feature object.
Repository-native premerge validation passed six direct and fifteen selected automatic checks, with the exact seven-file quality receipt valid. The benchmark-sensitive maintainer review remains a manual merge hold. Per the current review policy, remote CI was not fetched, polled or waited for. No merge, install, release or new model call was performed.
我的整体评价 / Verdict
problem_context: justified_increment. long_horizon: improved by preserving reusable successful output across failure and continuation. user_experience: preserved for the existing authorized analysis/read/original/recovery journey, with zero extra required choices or confirmations. Actual future-model translation quality and comprehension remain unverified; the existing research owner continues that broader acceptance.
本 PR 未改变页面布局、控件或静态界面文案;已检查既有 research-history 展示路径。生成指导的效果不能用未生成的界面截图证明。未验证范围:未来生成正文的语义与可读性、正式安装 App 未验证。
The scope is proportionate: reuse the existing owner and existing v3 guidance, retain real persisted-format compatibility, and avoid a dedicated revision product. The bounded simplification is already present—raw response reuse instead of rebuilding provider output from a presentation projection. Existing schemas/encodings are reused; no new shared semantic vocabulary is required. Approval covers this exact source proposal only. Semantic quality, installed-App adoption, full cost/benefit and maintainer merge authorization remain separate limits.
English verdict: APPROVE at 81611f9686418aedc38b42a43bfc7b82c82b3836. No blocking finding; same-fixture base/head execution falsifies the old display-loss behavior and the reviewed head passes, while frozen requests retain exact identity. Translation semantics and installed adoption are not certified; merge remains held for the required maintainer boundary.
New research analyses should generate faithful localized prose through the existing analysis action. Newly prepared/default-registered display snapshots now select the existing fidelity guidance when no encoding was specified. The normalized input saves that choice before execution; explicit encodings/configurations and historical requests remain unchanged.
The same store now reuses a successful attempt’s raw provider response, including after a later retry failed. Restored presentation text is not fed back as provider output. Source, language, version, cancellation, retry and original-text fallback boundaries remain in the existing owners.
Validation at
81611f9686418aedc38b42a43bfc7b82c82b3836: 34 typed-owner tests; 88 process/store/HTTP/Explore tests, with the integrated HTTP/Explore suite rechecked after current-main integration (31 passed); typecheck, Ruff, two complete frozen-request parity checks, and source public-boundary checks. The packaged research-history journey passed in 183.309 seconds. Its tested complete source tree is identical to this proposal’s tree. The initial normalization-order failure and its failing observation are retained locally; canonical parsing now makes writer/readback identities agree.The exact seven-file quality receipt is valid. The standard premerge run passed six direct and fifteen selected automatic checks. It remains held for the benchmark-sensitive maintainer review; no automatic failures were waived. Literal/schema validation does not establish semantic translation quality, installed-App adoption or net efficiency. No additional model run was launched for this correction. Maintainer review and merge authorization remain separate.
Presentation boundary: no frontend layout, interface text, new action, translation editor or revision workflow is included. Existing analysis, language switching, source readback and failure/recovery were exercised in the packaged synthetic journey; this is not an installed-App claim.
中文:译文质量由既有分析的默认生成承担。新准备/默认登记在未指定编码时采用已有的忠实表达指导,保存版本化输入后再执行;旧配置、原文、历史产物及阅读零调用保持。修复失败重试后复用成功原始输出的路径;不新增“修订译文”入口或专用流程。数值字面通过仍不代表完整语义或整页可读性已验收。