Skip to content

fix(workspace): read delivery snapshots with local evidence safely - #7339

Merged
loopx-agent merged 2 commits into
mainfrom
codex/delivery-review-safe-projection
Oct 25, 2026
Merged

loopx-agent merged 2 commits into
mainfrom
codex/delivery-review-safe-projection

Conversation

@loopx-agent

@loopx-agent loopx-agent commented Oct 25, 2026 •

Copy link
Copy Markdown
Collaborator

Goal and result

Opening Goal → Overview → Delivery and evidence failed with HTTP 500 when an existing acceptance review referenced an owner-local evidence file. The adapter validated the internal path before its existing outbound redactor could remove it. Validate the final redacted delivery snapshot instead: the read succeeds, while credential-bearing fields, secret-like values and unbounded raw payloads remain refused.

This is one complete, reversible read-path repair under S5. It changes no acceptance conclusion, canonical evidence, original conversation, model execution or source permissions. The ordinary status path retains its existing behavior. The shared redactor and public-payload validator remain the owners; no new schema, configuration or sanitizer.

Author declaration and validation

Written by: model_agent — OpenAI Codex, GPT-6 family. Current head a3e3abf9bb348693c464edece7c6af81440fe14c adds the narrow first viewport to the code/captures validated at 42aa1877767c09f25a440b890abbca51ee3fcae4; executable source and test blobs are unchanged; verified base ec66345f7ecd826c166c9df45628ca52c3df15a2.

  • Real HTTP / File / SQLite: 28 tests pass across delivery review and registered work/Chat roots. Reads preserve the exact original acceptance revision, evidence bytes and original Chat store, including after runtime restart. Existing origin, Goal, registry-change, unavailable-source and unknown-state cases remain.
  • Counterfactual: with the same valid canonical fixture, both provider cases fail on the unchanged adapter with HTTP 500; four unsafe-payload controls pass. The repaired adapter passes all six cases.
  • Packaged frontend / real backend: a populated synthetic Goal reads HTTP 500 before and 200 after; desktop and 390px readers retain source acceptance and issue zero mutation requests or browser errors. No paid model or benchmark execution.
  • Fixture maintenance: initialize the existing synthetic source through the canonical authority helper. Explicitly scope its two Goal-wide gates. Missing Markdown is covered by the stronger existing File/SQLite complete-map/restart cases; it no longer falsely represents a missing canonical source. Actual unreadable-map coverage remains.
  • Static / publication: diff hygiene, staged bilingual gate and semantic advisory pass; publication-boundary checks and image source/metadata inspection are clean.
  • Premerge: six direct checks and nine selected checks pass, including Python compilation, bilingual diff and publication-boundary checks. The tool reports manual_review_required for six binary images; the exact-head review must assess their pixels, metadata and synthetic source. No automatic check failed.

Bounded simplification: reuse the existing canonical fixture initialization and consolidate the obsolete missing-display assertion into the existing provider-parity cases. A new helper, privacy implementation or language migration would add no value to this adapter ordering fix. Required exact-head review and merge readiness remain separate.

Visual evidence

UI behavior: availability changes; component layout and typography are unchanged. Synthetic fixtures only, packaged Chat assets and production HTTP/SQLite read owners. The first viewport is byte-identical before/after and still prioritizes the objective, compact outcomes and current work. The expanded region replaces the false read failure with the existing delivery chain; unknown and unverified acceptance stays visible. The narrow reader still has its existing tall action area; this PR does not claim a layout improvement or installed native WebView qualification.

Packaged first viewport, 1440×1000

Packaged narrow first viewport, 390×844

Region Before After
Desktop, 1440×1000 Before desktop After desktop
Phone, 390×844 Before phone After phone

No public preview deployment. Original owner data and local evidence paths are excluded from the public artifacts.

Type of change

  • Bug fix
  • Focused regression and canonical fixture maintenance
  • Public-safe visual evidence
  • DCO signed; no paired RFC change

Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
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; reasoning_effort=max

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

动机

用户在 Goal 概览打开交付与依据时,会读取已保存的验收观察与工作关系。
当一条既有自查引用本地证据文件时,旧版在脱敏前拒绝该路径并返回 500;本次先脱敏再校验,恢复读取且保留未核验结论。
相同真实 HTTP 与 File/SQLite 来源在修复后返回安全快照,原始证据、验收版本和原会话保持不变。
本次不改页面排版、模型调用、验收结论、执行权限或持久化格式。
安装采用和研究页其余布局、完整原生交互仍沿既有交付工作验收,本 PR 不将它们宣称完成。

本次判定为有实际价值的独立增量。继续刷新不能修复已有证据中的路径;要求用户修改证据、配置另一套来源或重新执行分析都会增加无效工作,并损害可追溯性。最短合法路径仍是打开原有交付区域,不需要额外确认、复制命令或模型操作。

改动思路

已有 Chat 输出适配器同时拥有脱敏与出口校验;调整同一条输出流水线即可修复,移除校验或改写原证据都会破坏既有边界。
保留同一读取入口和拒绝语义,仅让已有本地路径先经过已有脱敏;新增真实 HTTP 与原状态不变的回归,不扩展配置、数据模型或执行权。

我对照了“不处理”“清空或改写引用”“取消验证”“新增脱敏层”四种选择。前三种分别保留故障、损坏原证据或降低安全性;最后一种重复现有职责。这里复用原来的两个函数,将顺序从“内部数据校验→脱敏”改为“脱敏→最终输出校验”。只有安全可展示的本地路径引用从失败变为可读,凭据字段、类似密钥的值和无限制原始载荷仍遭拒绝。没有新增配置、枚举、版本解码器或状态所有者。

采用的既有交付规范是 docs/development/frontend-delivery.md,固定版本 ec66345f7ecd826c166c9df45628ca52c3df15a2;对应要求 task-first-delivery:必须以打包入口、真实所属后端和相关失败/恢复验证交付。本次使用生产 HTTP 与 File/SQLite、打包页面及真实原始来源的只读适配器核对,没有用空快照或模型回答代替来源。这个要求在当前范围内已实现;安装采用仍单独报告。

具体改动

ChatStatusRequestMixin._status 继续通过已有注册 Goal、目录版本与来源检查,组合工作图、完整工作映射和验收观察。构造结果后先经过既有 redact_local_paths,最后仅对交付读取执行 validate_public_safe_value。普通状态分支没有新增校验,也没有改变已有数据来源、排序、分页和失败出口。

redact_local_paths 本身保持不变:注册路径、运行时与扫描根仍由同一出口处理,原始验收记录不被写回或替换。新增测试通过真实验收 owner 保存本地证据引用,分离 Chat store 与工作运行时,再经 HTTP 读取。File 与 SQLite 都检查了原始版本、证据字节、自查的“不确定”结论与未独立验证状态,以及重启后的重复读取;原会话记录保持不变。

测试 fixture 使用现有 canonical helper 初始化合法源,并明确两个 Goal 范围门槛。旧的“删除 Markdown 就等于失去权威源”断言与现行契约矛盾,已合并到原有更强的 File/SQLite 完整映射、缺显示文件和重启对照中;五个节点及完整关系的独立 oracle 保留,真正不可读的来源仍单独验证。

同一 fixture 指纹 fd5285b7385b80d2f157e1c901b20c18ffff371545c25345c098fb36d29742cb、同一命令下,原适配器结果为 26 通过、仅两项本地引用正例返回 500;当前 head 为 28 项通过。四项恶意验收载荷仍被拒绝,恢复为安全源后重新返回 200。打包合成整页在 1440×1000 与 390×844 核对了错误/正常读回,均无修改请求或浏览器错误。没有启动模型、benchmark 或把未知结论改成通过。

对主干的风险

最重要的风险是把“读取成功”误做成“取消安全检查”。我沿整个结果对象验证了相反方向:嵌套凭据字段、类似密钥的值、raw log 和 request body 都不能输出;外部 Origin、未知/重复或越界 Goal、目录变化仍按原路径拒绝,错误不泄露内部诊断。普通 status、缺失验收、不可读映射及已完成前序的显示语义也在同一组对照中保留。

源码预合并的六项直接检查、九项选中检查均通过,包括编译、双语 diff、公共边界和相关 canary。工具仍返回 manual_review_required,原因是六张二进制图片必须人工检查;本评审已经逐张检查像素、PNG 元数据和公开合成来源,没有把工具结果改写成自动通过。精确范围 CQR 已记录,按当前策略没有读取或轮询 GitHub CI。没有新权限、持久化变更或迁移;回滚只需撤回适配器的顺序调整。

我的整体评价

窄屏默认视图也已实际查看:三个紧凑成果条目仍占据较多首屏高度,当前工作位于其后,这是既有排版而非本次修复的收益;既有交付工作仍需继续改善。新增截图是最终 head 相对初版的唯一差异,Python 源码与测试字节保持一致,最终 head 的 28 项检查再次通过。

没有发现阻止合入的缺陷,APPROVE 当前 head a3e3abf9bb348693c464edece7c6af81440fe14c。这次修复恢复了实际可用的读取结果,且生产改动集中在原适配器;测试清理保留了独立的 canonical 映射和真实拒绝覆盖,范围与故障相称。

整页首屏仍以方向、三个紧凑成果和当前工作为主;展开交付区域从错误提示恢复为已有交付链,未核验与未知没有变成通过。
没有将合成浏览器视为真实原生 WebView 验收;窄屏既有操作区仍较高,本次未改善排版,也未证明整页研究体验完成。

六张图片的公开安全性与本次可见读回已经核对;它们不能替代原生采用或整个研究页的后续验收。合并仍须在相同 head 上取得当前 merge readiness,并依据既有授权执行,不能把 COMMENTED 自评当成 GitHub 正式 self-approval。

English verdict: APPROVE — a3e3abf. The existing redactor now precedes the unchanged final public-value validator. Paired real HTTP/File/SQLite checks reproduce only the two intended base failures, then pass all 28 cases; unsafe payload refusal, source scope and original state are preserved. Packaged desktop/phone readback and six public-safe image reviews are complete. No layout, paid-model or installed-native qualification is claimed; exact-head merge readiness remains separate.

@loopx-agent
loopx-agent merged commit adbcb08 into main Oct 25, 2026
23 of 29 checks passed
@loopx-agent
loopx-agent deleted the codex/delivery-review-safe-projection branch October 25, 2026 20:06
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