Skip to content

fix(chat): read original workbench state from its registered authority - #7333

Merged
loopx-agent merged 1 commit into
mainfrom
codex/shared-steward-projection-owner-20261026
Oct 25, 2026
Merged

loopx-agent merged 1 commit into
mainfrom
codex/shared-steward-projection-owner-20261026

Conversation

@loopx-agent

Copy link
Copy Markdown
Collaborator

Problem and behavior

After the App connects to an original Chat service, a private Chat storage override must not become another authority for registered Goal status. The coordinator already follows the registered runtime; Status and the delivery task map used the Chat override instead, so valid work could falsely appear to require a storage upgrade.

Both readers now reuse the coordinator's existing root. Chat history/settings remain in their original store, the unregistered/local fallback stays unchanged, and diagnostics redact both roots. No authority, migration or execution grant is added.

The original-conversation delegation inventory also lacked the existing Effect logical-request scope. A populated GET repeatedly scanned runtime source files while processing each record. It now qualifies one code revision per HTTP read while retaining all per-source authorization, receipt, Goal-lifetime and final-caller checks. The next HTTP read independently qualifies its own revision; no decisions or source state are cached.

Validation

Exact source: cb2202c079f023964b2fbfb245cd21fcac49521d.

  • Real Status/Chat controller regression: baseline fails with canonical_authority_required for file and SQLite authorities; head reads the original registered Goal and retains private messages byte-for-byte. Registered-root and ordinary local-root cases both pass, with path redaction checked.
  • 87 focused tests passed, including native source revocation, original request scope, read/adopt/queued-return semantics, paging/search/unreadable sources and path safety. The final rebase changes only unrelated research-fixture history; owned source bytes are unchanged.
  • Runtime pin regression checks one code qualification per HTTP read and a fresh second read that detects damaged original-source evidence.
  • An owned disposable HTTP fixture was profiled on its actual handler thread. About86% of the sampled first read was runtime source snapshot/fingerprint work. No production attachment or real message consumer was started.
  • The unchanged 13-request paging/negative test passed in18.56s before the fix; an explicit unpin counterfactual on the current code passed in13.70s; two uninstrumented head samples passed in5.95s and5.43s. These are bounded whole-test measurements including fixture setup, not endpoint p95 or a production speedup guarantee. Original target assertions and workload remain intact.
  • Bilingual RFC, exact diff hygiene, risk-based premerge and public/private text scans qualify the source; no remote CI is fetched under the current policy.

Installed original-service readback follows adoption; source tests do not replace it. This increment repairs the shared workbench readers and leaves complete media/reply/cursor synchronization in its existing acceptance.

Existing presentation

The existing App view/composer is reused without frontend or layout changes. The source-routing layout below is unchanged from #7328; it is a synthetic production-bundle reference, not evidence for this PR's Goal-root or latency results:

Existing original-source workbench

中文说明

Chat 私有存储不再被误当成注册 Goal 的状态权威;状态与任务图复用现有协调器根目录,原私聊历史不迁移。委派列表在一次 HTTP 请求内复用已核验代码修订,来源授权与回执仍逐条核查,下次请求重新核验;不以缓存或放宽权限换取性能。

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 · OpenAI · self_reported

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

动机

同时使用 App 和原消息管家的用户,需要工作状态与委派列表读取同一份注册工作。

原来 Chat 使用独立历史目录时,已有 Goal 会被误报为需要存储升级,委派读取还会反复扫描代码。改后状态跟随既有协调器,委派一次读取只核验一个代码修订。

真实文件和 SQLite 回归中,旧实现返回503和 canonical_authority_required,当前实现读取注册 Goal 并逐字保留原私聊;相同分页及失败测试也显著减少重复扫描。

本增量不迁移或混合历史,不放宽来源授权,不宣称完成媒体、回复关系和游标同步。

安装态采用与完整双端同步仍由现有验收继续;单次快测不代表生产尾延迟或长期收益。

这是既有原会话工作台的实际缺口。只增加超时会保留误导性的存储修复入口与重复扫描,只复制状态会制造另一权威。当前切片修正读取归属而非要求用户重新配置、迁移数据或再次确认。

改动思路

状态投影复用协调器已有根目录,代码核验复用既有 Effect 请求范围,授权和回执继续由原 owner 逐条决定。

当前 PR 只修复两处共享工作台读取,保持 Chat 数据、HTTP形状与既有授权边界;安装与原生读回在采用阶段完成。

Chat 历史目录和注册工作根目录分别服务存储与权威读取,不能因为一个命令覆盖了 Chat 路径就改选 Goal 状态。既有协调器已经解决该区别,因此两个状态消费者直接复用它。普通本地、无注册公共根目录以及独立 handler 保留原 fallback,不新增根目录配置或服务发现框架。

性能修复也复用已有 owner:一次 HTTP 请求只固定代码产物身份,不固定可变业务状态。每条来源、Goal 生命周期、回执以及返回前调用者范围仍按原逻辑核查,下次请求重新核验代码。没有缓存授权、减少扫描范围、改变分页或放宽失败处理。

具体改动

规范依据是 docs/architecture/rfcs/app-conversation-and-async-inbox-v0.md,修订 69bcaa95b1a116574a874507d3c36e790c70e535,并对照同修订中 coordination_runtime_root 关于注册工作与 Chat 存储分离的既有契约。one-work-owner、original-store-isolation、fresh-source-read 已落实;installed-qualification 保留为合并后的实际采用与原生读回。当前新增文档只披露实现和边界,不能当作自身正确性的独立规范。

关键代码讲解

  • _status_runtime_root 派生既有协调器根目录,独立 handler 无该控制器时保留原覆盖值。它不写注册表、不迁移库,也不选择另一个会话。
  • ChatStatusRequestMixin._status 和 _goal_task_map 共用该根目录,保留原 Goal 过滤、目录修订核对与错误分支。路径脱敏同时覆盖状态根目录和原 Chat 根目录,观察缓存仍属于 Chat 存储。
  • RequestControlMixin._request_inventory_read 只增加既有 effect_runtime_request_scope。原始来源、Goal/lifetime、回执、分页摘要和最终调用者核验没有被挪走或缓存。

六文件109增3删,生产机制只有小型状态适配修复和一次既有请求范围组合,其余是两份聚焦回归与双语说明。没有新公共状态、CLI选项、默认开关、依赖或第二消费者。原生/网页展示组件不变,由已有界面消费修正后的相同 JSON。

对主干的风险

主要风险是把“代码修订固定”误做成“授权和回执缓存”,或把“读正确权威”做成“复制/迁移到另一目录”。真实 Core 回归先在旧生产实现上得到文件与 SQLite 的503 canonical_authority_required,当前实现返回注册 Goal;原私聊 JSON 字节保持不变。另覆盖无公共注册根目录的本地路径,两种后端均保留原行为。第二次请求在原来源被损坏后发现 unreadable,证明没有沿用第一次业务结果;每次 HTTP 仍独立核验自己的代码修订。

完整聚焦测试87项通过,包含原生来源撤权、不同受众、已读/采用仍未回传、排队结果、分页搜索、未知来源及路径脱敏。13条记录跨12条展示上限仍保持完整 pending 计数和12/1分页;缺失/损坏来源即使搜索无结果也保留覆盖不完整,不能报告成功的空列表。

性能证据来自受控合成 HTTP 的实际 handler 线程,未附加生产进程或启动真实消息消费者。首次835ms样本中约86%落在运行时代码快照/指纹工作。原13请求分页与负例测试18.56秒,当前代码显式去掉新范围的反例13.70秒,当前两次普通执行5.95和5.43秒,均保留原语义断言。这些是包含 fixture 准备的整段测量,不是生产端点p95;采样本身也不能作为普通运行基线。首次采样因输出目录不存在而未运行目标,修复目录后才取得有效产物,失败记录保留。

精确head的预合并14项选择检查通过、自动失败与人工hold均为零;双语检查、差异卫生和六路径公开文本边界通过。重定基线只带入无关研究fixture历史,已核对所审生产与测试字节相同,未沿用旧结论。现策略不观察远端CI,未查询、等待或用其元数据代替这些证据。

语义与 CI 对齐

复用现有注册工作根目录、原会话 schema 和 Effect 请求修订机制,不增加共享词汇或执行义务。默认变化明确写入双语RFC;本地/独立handler的 fallback 有对照覆盖。请求级代码固定不会成为新的快照或授权协议,来源、队列与回传仍归原Core。当前本地检查满足本切片资格,实际服务采用与原生读回仍是交付后的独立验收。

我的整体评价

对 cb2202c079f023964b2fbfb245cd21fcac49521d 的结论是 APPROVE,作为原共享工作台的有依据增量。长程工作维度改善的是既有承诺和待回传请求的可见性及重复读取成本;不把一次性能测量解释为长期效果提升。体验维度移除假的存储升级要求,继续使用原入口、搜索和恢复方式,额外确认轮次为零。

架构决定是保留上述复用方案:根目录只从现有协调器派生,代码固定只借用已有请求范围,避免引入缓存框架或数据迁移。检查了既有 PersonalWorkspacePage 与 ConversationRequests,当前差异没有新增呈现或布局,故不提出新的视觉样式资格;安装态数据刷新仍需采用后核验。完整媒体/回复/游标同步、生产尾延迟和长期收益仍未由本PR证明。

English verdict: APPROVE for cb2202c079f023964b2fbfb245cd21fcac49521d. Status/task-map reuse the established registered authority while private Chat data stays intact. Original inventory pins code once per logical HTTP request without caching authorization or receipts. Real file/SQLite regressions,87 focused tests, exact local premerge and a controlled unpin counterfactual cover the changed invariants. Installed adoption and production p95 remain unqualified; remote CI was not consulted.

@loopx-agent
loopx-agent merged commit a66d8de into main Oct 25, 2026
21 of 36 checks passed
@loopx-agent
loopx-agent deleted the codex/shared-steward-projection-owner-20261026 branch October 25, 2026 17:52
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