Skip to content

fix(collaboration): preserve complete readable returns - #8139

Merged
huangruiteng merged 73 commits into
mainfrom
codex/collaboration-readable-returns-20261105-155015
Nov 6, 2026
Merged

huangruiteng merged 73 commits into
mainfrom
codex/collaboration-readable-returns-20261105-155015

Conversation

@loopx-agent

@loopx-agent loopx-agent commented Nov 5, 2026 •

Copy link
Copy Markdown
Collaborator

Problem and result

Long collaboration returns could open at the evidence tail, bury delivery state, and append mechanical bilingual headings. A second defect rejected a complete version-2 return that fit the existing 20,000-Unicode-codepoint limit: validation counted the legacy footer, and compact result observations dropped the persisted format marker during replay.

This proposal opens long completed returns at their answer, keeps delivery beside the author, and shares one repository-owned readable-answer and delegation-brief rule across manager, project Chat, CLI/MCP inbox and governed delegation. New returns preserve the complete authored answer, compose typed remaining work as ordinary paragraphs, and put provenance last. Publication measures the selected persisted renderer. Both compact observation codecs preserve its existing format marker, so public CLI replay and original-conversation delivery use the same complete body.

Basis: the accepted shared-answer, delegation and original-conversation return request; no separate public issue. Existing manager-context and TS collaboration owners remain authoritative. Unversioned replies retain their exact legacy bytes; unsupported versions fail before publication. The text limit remains 20,000 codepoints. Historical receipts and messages remain immutable. Model rewrite calls, execution permission and routing authority are unchanged.

Acceptance and scope

Requirement Source / packaged behavior Remaining acceptance
Reader language, useful outcome first, explained terms/units/comparisons, negative results and unknown costs Shared conversation_answer_instruction() and existing consumers Live model writing quality and full-cost benefit remain unmeasured
Original goal, corrections, reader, qualified recipient and return destination survive delegation Shared brief helper used by peer-request and governed-delegation tool descriptions Requester adoption remains separate from queued/delivered state
Complete answer and evidence Selected-renderer budget; exact 20,000-codepoint BMP/non-BMP publication, replay and original-return readback One codepoint over is rejected before writing; no extra rewrite model
Typed remaining work, author/audience, immutable identity and compatibility Existing publication/delivery owner and persisted format marker; legacy replay and unsupported-version refusal Pending version-2 replies need a compatible reader during rollback; preserve that compatibility
Long returned answer readable at first viewport Answer start and delivery state visible; explicit Latest choice, history and separate reader preserved Installed desktop and macOS WebView acceptance remain open
Shared rule reaches actual callers Chat, manager, CLI/MCP and local-delegation tests; isolated Lark worker roundtrip Live Feishu/provider/model adoption remains open
Populated desktop/narrow and failure/recovery journeys Real File/SQLite owners, 61 mixed requests, complete original brief, paging/read/cancel/error/recovery, zero model browsing Broader collaboration rollout and independent exact-head review remain open

The final qualification repair addresses three demonstrated validation gaps at the same continuation boundary:

  • Extract the existing prompt-upgrade command formatter from the admitted interaction renderer. The TS selection/settlement owners, command text, ordering, scope and Turn identities remain unchanged. Across 105 paired inputs, complete action observations match exactly: 87,378 UTF-8 bytes.
  • Reuse the existing digest-bound complete-source oracle for both in-process and subprocess autonomous-replan smoke paths. The File/SQLite reader fixture now declares its Codex App profile and capture roots explicitly. Complete constraints, immutable source identity, read-only recovery and corrupt-digest refusal remain tested.
  • Give the legacy machine-JSON test helper a child-local inline output setting. Parent model context and the raw-wire helper retain their own transport. Real ready, review continuation, human-gate and zero-quota cases run with parent context on/off. This fixes the peer continuation smoke's missing decision field without changing Core admission.

The prompt-upgrade extraction removes the original 62-decision-point finding from _admitted_interaction_next_cli_actions; the current maintainability scan has zero unreviewed findings and leaves the two reviewed compatibility facades intact. An earlier qualification revision also tried to retire the 2,031-line allowance for chat_agent.py because it measured 2,000 lines at that time. Latest main subsequently grew it to 2,008 lines, so the final head deliberately withdraws that unrelated baseline cleanup and retains the current-main allowance instead of changing unrelated runtime code to satisfy the scan.

Python remains a command/IO adapter and test harness here; publication, return format and selection decisions retain their existing TS owners. The bounded refactor was applied at that adapter boundary. The shared guidance's earlier measured growth from 1,710 to 3,173 characters remains a cost consideration; token charges and outcome benefit have not been measured.

Validation and limits

Tested revision: 313ef4966b832d336039bd875e0891c6f6f41a90; verified target main at f87d9976baab054e5baee5b0d56538ca3812b39e. The original 20-file proposal is retained, the latest main integration keeps the earlier repair-pattern entry from main, and the final qualification slice has six focused paths. The current diff is 26 files, +733/−72; all commits have DCO sign-offs. Run state: finished. Inputs: synthetic / public fixture.

Check Result
Projection / scheduler 454 passed; one existing native Windows PowerShell case skipped on macOS
Complete-source recovery oracle 14 passed, including real File/SQLite long constraints, repeated read-only recovery and corrupt digest refusal
Machine child transport 14 passed, including real continuation/review and human/zero-quota gates under parent context on/off
Collaboration and shared consumers 436 passed on the final source parent: real CLI roundtrip/tracking, shared Chat/MCP/local-delegation consumers, scheduler/replan coverage and the isolated Lark worker matrix
Typed collaboration / return owners 116 passed across collaboration, inbox-read, manager-return transaction and delivery tests
Autonomous replan Raw in-process and subprocess CLI smokes passed
Packaged browser File and SQLite passed with 61 mixed requests, a 15,620-character original brief and a full 20,000-codepoint return including non-BMP text; paging, cancellation, late reads, failure/recovery and zero model execution checked
Static / build / boundary Strict root/dashboard TypeScript, final Chat bundle, full configured Ruff, mypy's 17 configured files, semantic advisory/full drift, bilingual and diff hygiene passed on the final source parent; the final delta only restores a current-main JSON baseline entry. The 26-file public scan passed.
Maintainability Final exact head passed with zero unreviewed findings and no magnitude regression; the original 62 decision-point failure is removed without retaining the stale chat_agent.py baseline deletion.
Standard premerge Passed on the exact final head: four direct checks, changed-Python compile, 10 catalog canaries, 8 risk-profile smokes and the public boundary, with zero failures and manual holds
Focused failure attribution The SQLite capacity matched_fill case fails identically on main@f87d9976 and the reviewed source parent; the PR does not modify its test, example or affected path. The failure remains disclosed rather than relabelled as passing.
Independent review / CI Fresh exact-head independent review and CI remain required. Prior approval of an earlier revision is not approval of this head

The original failures remain recorded: the exact-budget TS/CLI cases failed before the format-marker fix; raw maintainability failed at 62 decision points against 60; the autonomous-replan smoke lost its obligation field, and the unchanged peer smoke lost decision when receiving context navigation. The original peer failure also reproduces on the unchanged target base. Final checks exercise the repaired paths; no baseline-attribution waiver is used. Intermediate test-configuration mistakes were corrected against the declared profile, root and actual quota-field contracts before the passing runs.

Installed desktop/WebView, live provider/model behavior, requester adoption, full costs and the wider rollout are still unqualified. The full Python/Windows and other-platform CI suites remain separate from the focused local runs. No merge, installation, release or paid execution is included.

Frontend / visual evidence

UI impact: the existing reading change is retained; the final qualification repairs change validation and CLI adapters, not the reviewed reading rendering. These current-source packaged captures use isolated SQLite publication/return owners and a complete 20,000-codepoint answer. Desktop 1440×900; narrow 390×844. No hosted preview or live model.

The primary question is the outcome and whether the reader must act. Answer and delivery occupy the first view; the negative comparison and unknown costs remain visible. Evidence stays complete below and in the existing reader. Long repeated history, mixed states and source failures were exercised without horizontal overflow. These synthetic format-boundary cases complement the real benchmark-derived frontend references; they do not qualify research results or scientific gains.

Desktop Narrow
Current complete return: desktop answer and delivery Current complete return: narrow answer and delivery

Historical first-screen comparison: before 4d8b7969, after 80653726. These document the original reading change and are not fresh captures of the final head.

Viewport Before After
Desktop Historical before: outcome hidden above viewport Historical after: outcome and delivery visible
Narrow Historical before: evidence tail and bilingual headings Historical after: readable opening answer

Author and boundary

Written by model_agent — OpenAI GPT-6 / Codex, published as loopx-agent. Reviewed against repository instructions and the final 26-file scope. This is a bug fix, caller guidance and durable regression evidence under existing owners. No RFC pair, authority-store promotion or migration is introduced. Description, source and captures exclude credentials, private state, local paths, raw private logs and internal links. Source, packaged behavior, installation, actual delivery and requester adoption remain distinct.

Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
(cherry picked from commit 8e9946d)
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
…105-091512

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

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

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; model=gpt-6.1-sol; provider=OpenAI; runtime_reported; reasoning_effort=max

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

Reviewed head: 80653726d66310fe1f7cab3e50edd7d960ea99a1; immutable base: ea1f292a0208cd84e05f71002268475cf63c2b1c.

动机 / Motivation

阅读协作回复的用户,需要打开原对话就能知道实际结果、投递状态和仍欠什么。 相同长回复在基线打开时停在证据尾部,结论在视口上方;新版本把完整回复的开头及投递状态放回首屏,读者仍可主动跳到末尾或单独阅读全文。 File 与 SQLite 的实际打包页面都能从首段读到结果;完整证据、反例、未知费用及继续条件没有被裁掉。 本次不认证已安装 App、macOS WebView、真实 Lark 发送或自然模型写作质量。 共享写作指引已接入,但实际模型遵循、安装采用和真实 provider 交付仍需原协作交付负责人在对应授权下验收。

这次实际修复了原对话的阅读入口,而非只让字段存在。旧版长回复的证据和继续条件占据首屏,读者必须向上寻找结论;打包后的新版本无需额外确认就能看到结果,同时保留主动选择末尾和完整报告。依据同一合成内容的实际基线反例判断价值,不把作者测试数量或指引已经交付当作自然模型改善。

改动思路 / Approach

排版留在既有 TypeScript publication/return owner,阅读位置留在现有 timeline,Python 只提供共享静态指引;没有第二个改写模型、发送器或权限 owner。 当前可独立交付的是源码与打包阅读、不可变旧结果兼容及共享指引接线;实际安装和自然写作收益不从这些检查推定。

原始请求、作者、受众与投递身份仍由既有 owner 验证。新发布结果保存本地 return_format_version: 2;同一旧结果重放时,原观察决定其 renderer,不按当前代码重新排版。这个字段是不可变发布格式的选择,不是完成状态或新的权限。缺失版本保留旧格式,未知版本拒绝;晚到更新仍须等待前一投递被核实。

以下为本 head 的行为对照表,来源于代码及实际读回,不是另一个执行协议:

情况 基线 本 head
新的长结论 来源提示在前,打开停在尾部 完整答案在前,首段与投递状态可见
已发表的无版本回复重试 原格式 原格式与原字节保留
不支持的格式版本 没有此版本约定 在投递前明确拒绝
读者选择最新位置 跳到末尾 仍跳到末尾;稳定 resize 后保留

共享 brief helper 取代两份 MCP 工具重复 prose,沿现有目的、修订、读者和返回地址传递完整要求。没有再加模型改写或前端配置。指引从 1,710 增至 3,173 字符是明确成本;token、费用及实际写作质量未测,不能当成效率收益。

具体改动 / Changes

完整审阅 16 文件 +370/−44:三处 React 阅读/标记、一处共享 Python 指引与 MCP 接线、两个既有 TS publication/return 模块、README,以及全部相关测试与 fixture。没有生成资产或新的发送服务。规范采用 loopx/capabilities/manager_context/README.md,spec_revision ea1f292a0208cd84e05f71002268475cf63c2b1c。以改动前文本为准:criterion_id A delegation returns automatically 的原受众返回、余项与履行区分已覆盖;criterion_id Semantic delegation and peer review 的完整 brief、原请求和重放身份保持,指引更新不会重写旧记录。

  • planCollaborationResult 保留完整正文与 typed remaining_work,只为新结果选择排版。原 update_id 链、请求修订与不确定投递顺序仍受原检查约束。
  • prepareReturn 仍沿原 send/verify 路线;新格式把 provenance 放在末尾,旧格式保留。App 和合成 provider 逐字返回相同完整内容,重复发布不产生第二条原 Turn。
  • returnedAnswerStart 根据 typed role/pending/returnDelivery 与实际显示顺序工作,不猜正文前缀或消息 ID。仅最新完整回复高于视口时定位开头,原 focus、普通消息、live output 与显式 latest 沿现有生命周期。
  • collaboration_brief_instruction 由原 project Chat、manager、CLI/MCP、receiver 及 peer/delegation descriptions 消费。原精确引用、隐私、完整文字和禁止 executable HTML 条款逐项保留;新增语言、单位、负例和未知的指导,不增加执行授权。

对主干的风险 / Risks

未发现阻断代码问题。最强风险是改 renderer 后验证旧发送的字节不再相同,或自动 follow 抢走显式阅读位置。当前完整 roundtrip/return/update 与实际 CLI 重试覆盖前者;真实打包页面的 explicit latest、稳定 resize、独立完整答复和取消/恢复覆盖后者。兼容分支服务已有持久结果,保留有明确理由;不应只为减少版本数删除它。

PASS:七个完整 Python 模块 575 通过,另有同一独立 public CLI oracle 的 base/head 各 2 项;TS publication/return/inbox/lifecycle 86 通过;configured mypy 17 文件、变更 Python Ruff、完整 control-plane typecheck、dashboard 与 Chat 构建通过。前端使用真实 File/SQLite owner 和合成历史,源报告、结果、未知费用与原继续条件都可读。取消挂起读取后数量保持未知,释放、刷新得到 12 行,关闭返回原回复;并非空成功。

语义与 CI 对齐

本地 standard premerge 为 6 项 direct、17 项 selected,自动 gate 通过,其中维护性检查仍作为 inherited advisory 保留。单独在不可变 base/head 跑其完整 JSON 报告,仅归一化 repository_root 后完全相同:未修改的 _admitted_interaction_next_cli_actions 仍有原 oversized finding、零 magnitude regression。原失败没有改绿;严格 CQR 仍须保留该失败及独立合并资格限制。没有查询、轮询或等待 CI,CI 未知不替代实际改动验证。

新增 vocabulary 仅是本地持久排版选择,生命周期与共享权限词汇复用。写作 prose 属于行为指引,格式/重放拒绝则由机器执行,两者区分清楚。此处不存在新的 default-off 功能承诺;已有 source/recipient 拒绝保持,不能由工具发现、格式字段或 brief 获得权限。

我的整体评价 / Verdict

APPROVE,以新结果的完整排版、原不可变结果兼容和打包阅读为可用增量;long_horizon 保持原一次返回与重放边界,user_experience 有实际改善。实际检查 61 条混合请求、长历史和完整回复的 File/SQLite 打包页:桌面与 390px 首屏先见作者、投递事实、结论及失败/未知,证据留在下方和原独立阅读入口,正文没有缩小。 未验已安装 App、原生 WebView、真实 provider、自然模型写作和屏幕阅读器;Ego 每轮视口重置及基线窄屏一次未到末尾的检查均保留,最终对照显式固定视口。

本轮基线桌面与显式固定 390px 对照,首段分别在视口上方;候选 File 与 SQLite 两宽度均显示首段和 badge。记录并纠正了 Ego 每轮视口重置导致的第一次窄屏检查,未把它算作产品通过;自然模型、安装与真实 provider 的资格仍由原 rollout 验收。无需为了本改动新增批准、模型调用或配置。代码评审结论不授予 merge,也不清除原质量失败或将投递等同任务验收。

English verdict: APPROVE. Exact-head source, real CLI replay and packaged File/SQLite reading preserve complete answers and immutable legacy returns; inherited quality failure and installed/live-model qualification remain separate.

Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
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 force-pushed the codex/collaboration-readable-returns-20261105-155015 branch from 8065372 to 200956f Compare November 5, 2026 20:40
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>

# Conflicts:
#	apps/presentation/dashboard/smoke/research-usage-real.ts
#	apps/presentation/dashboard/src/data/fixtures/research-usage-real-captures.json
#	apps/presentation/dashboard/src/features/personal-workspace/research-usage-comparison.tsx
#	docs/reference/trajectory-assessment.md
#	loopx/control_plane/capabilities/trajectory_usage_comparison.ts
#	tests/control_plane_ts/trajectory_usage_comparison.test.ts
#	tests/presentation/test_research_analysis_api.py

@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)

未发现阻塞当前改动的 finding。 原始维护性检查仍失败,下面保留其独立 base/head 归因及 CQR 合并门限制。

Exact reviewed head: 200956fa2bb28de61175fa492c5562b3cf2f9c5a. Base: 817dd2461a93b376e3420363a36f77e89287fcf8.

动机 / Motivation

在 App 或飞书阅读协作返回结果的用户。收到长协作答复时先看到来源或滚动至末尾,用户需要反向寻找结论。

返回正文现在先呈现结论,长答复从开头显示;既有答复的重试仍保持原来的完整文本。

用户可直接读到结论、反例和未知项,并进入完整答复;历史重试保持原文与原受众。

本次不验证真实模型写作遵循率、在线飞书账号或用户已安装版本,也不授予额外发送、调度或合并权限。

改动思路 / Approach

新结果在发布时固定格式版本2:先完整作者正文,再显示 typed remaining_work,最后是来源。历史无版本结果仍走原始 renderer,防止重试改变已经提交的外部消息。React 只从完整 assistant return 的类型标记和实际 timeline 顺序决定初读位置,普通消息、历史焦点与“最新”仍由原来的阅读 owner 管理。静态写作约定复用一个 helper,不引入第二次模型改写。

当前边界复用原发布和返回事务,保留历史结果格式,由 React 管理阅读位置;不新增模型改写、消息发送权限或单独业务状态机。

当前 PR 覆盖新返回正文、历史重试和打包阅读路径;在线模型采用及安装资格仍在边界外。

具体改动 / Changes

本轮重新检查完整17文件差异,未继承旧806537 head 的批准。发布、返回、共享指令和真实阅读路径一起审查:stable update_id 保留追加历史,未知版本拒绝发送,既有 remainder 字段没有变成完成开关。实际 bounded Lark worker 比对全部 provider-visible 文本分片,而非仅检查尾部标记;本地 fixture 不证明在线账号投递。

规格依据:loopx/capabilities/manager_context/README.md,不可变 revision 817dd2461a93b376e3420363a36f77e89287fcf8。映射 original_audience、immutable_result_replay、typed_remaining_work、complete_reader:这些既有条款的运行边界已覆盖;没有用本 PR 新增说明反向定义验收。

关键代码讲解

共享策略、宿主 IO、持久回复和局部滚动分别保留在原 owner。完整作者正文、证据来源、失败、未知及后续条件仍可恢复;没有按文件数、测试数或回执数量推断产品采用。

对主干的风险 / Risks

主要风险是历史重试变更字节、未知外部发送被误当未发送,或自动滚动抢走历史阅读位置。独立 base/head 探针显示 legacy 正文和 remainder 的完整渲染摘要相同,新 v2 保留正文摘要并拒绝未知37;File/SQLite 打包测试覆盖显式最新、长历史、完整正文、源故障和恢复,且未新建 Turn。

原始 maintainability ratchet 在两份不可变 base/head 上均 exit1,完整诊断逐字节一致:sha256:ed110292cf97c035245ec237facfc489fa617bb00e560ad3ffbb28563c80e282,唯一未评审债务为未修改的 interaction_contract._admitted_interaction_next_cli_actions。未放宽预算或必检状态;CQR 中 required failure 和独立合并门仍保留。标准 premerge 的继承 advisory 不等同于 CQR 通过。当前 exact-scope receipt 的验证为 invalid_receipt,Goal 绑定的后置 premerge 为 quality_invalid_receipt;这个合并门继续阻塞。

本轮验证:325 passed in 1069.64s (0:17:49);35项 TypeScript、配置内 mypy17、Ruff、dashboard打包和标准 premerge 通过;File/SQLite 各61条混合请求与长历史阅读通过。远程 CI 按策略未查询或等待。临时夹具、合成 provider 和本地回环不证明真实模型效果或线上采用。

我的整体评价 / Verdict

这个边界的 reader 交付目标已达到,长程原回复和后续 scope 保持;无额外确认轮次,新格式的兼容成本由现有 renderer 的单一选择封装。已实看 61 条混合委派与长历史的打包整页,桌面和窄屏均先读到结论、反例及未知费用,完整答复保留尾部的恢复条件。真实模型是否遵循写作提示、在线飞书提供方和用户已安装 Host 的表现未验证。

English verdict: APPROVE — the current return/readability invariants are verified; preserve the pre-existing required-quality and merge holds separately.

Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
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 changed the title fix(collaboration): make returned answers readable from the first screen fix(collaboration): preserve complete readable returns Nov 5, 2026
huangruiteng and others added 7 commits November 6, 2026 12:37
…t-note-20261106

docs(readme): remove redundant budget disclosure sentence
…0261105

fix(chat): preserve queue edits when dismissing actions
…s-20261106

fix(context): preserve async reader handles in code-mode guidance
…on-20261106-031322

test(collaboration): recover complete per-turn delegation context
Signed-off-by: huangruiteng <huangrt01@163.com>
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Signed-off-by: huangruiteng <huangrt01@163.com>
loopx-agent and others added 15 commits November 6, 2026 12:57
…action-20261106

fix(chat): compact restored native history before the first question
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Signed-off-by: huangruiteng <huangrt01@163.com>
test(project): make the no-git registry fixture actually degrade the probe
fix(lark): hold the collector's Git reads to one budget
…fc-20261106

docs: design router-coordinated controller and worker units
…link-20261106

fix(runtime): bind service activation to the qualified executable target
…8100)

* Reuse capture-bound navigation for the first progressive read

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

* Distinguish the pinned reader from an explicit navigation replan

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

* Pin the benchmark preflight view and deliver its same-Turn selection route

Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
(cherry picked from commit 47db78b33792e584036b2f099bed4aa0904f7e2b)
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>

* Reuse prepared Codex read guidance in benchmark checkpoint prompts

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

* Prove progressive benchmark choices from receiver-visible pages

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

* Deliver the captured review command on the first replan read

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

* Validate progressive replan against its published reader contract

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

* Isolate the user skill directory for native context comparisons

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

* Verify explicit guard opt-out on the real CLI

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

* test(quota): exercise the original review after a successor loses its claim

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

* refactor(context): reuse the quota action vocabulary for staged review

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

* fix(types): widen context delivery source values

Signed-off-by: huangruiteng <huangrt01@163.com>

* refactor(context): make prepared native delivery the sole projection path

Signed-off-by: huangruiteng <huangrt01@163.com>

---------

Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Signed-off-by: huangruiteng <huangrt01@163.com>
Co-authored-by: huangruiteng <huangrt01@163.com>
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
…8113)

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

Avoid repeated private delivery body scans in reply discovery
…irst reads (#8124)

* Reuse observed preference and acceptance fields in native first reads

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

* Plan field reuse inside the existing delivery transaction and qualify invalidation

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

* Type the mixed native delivery request for the kernel contract check

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

* Keep private field observation descriptors typed on both native routes

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

* fix: observe reusable fields inside complete parent reads

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

* test: distinguish progressive defaults from delta opt-out

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

---------

Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Signed-off-by: huangruiteng <huangrt01@163.com>
Co-authored-by: huangruiteng <huangrt01@163.com>
Signed-off-by: huangruiteng <huangrt01@163.com>
@mergify mergify Bot removed the needs-rebase Mergify: the pull request has merge conflicts with its base branch label Nov 6, 2026
Signed-off-by: huangruiteng <huangrt01@163.com>

@huangruiteng huangruiteng left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Reviewer: model_agent; model=GPT-5; provider=OpenAI; self_reported; reasoning_effort=unavailable

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

未发现阻断当前改动的 finding。 Reviewed head: 313ef4966b832d336039bd875e0891c6f6f41a90; verified target main: f87d9976baab054e5baee5b0d56538ca3812b39e。

动机 / Motivation

在原 App、CLI/MCP 或消息会话阅读协作返回的用户与接收 Agent,需要直接找到完整结论和后续条件。 Accepted manager-context contract requires complete delegation brief and automatic return to original audience; repository issue/PR request asks readability without losing evidence. 同一条含余项的长答复在基线先显示来源或停在尾部,恰好 20,000 个 Unicode codepoints 时还可能被旧标签挤出预算;本版本保留完整正文并从答案开头展示。 The old behavior placed provenance first and could stop at the evidence tail; the new behavior opens the complete answer first, keeps delivery state beside the author, and preserves the remainder without another model call. 原会话能读到完整结论、反例、未知费用和继续条件,历史答复重试保持原字节与身份。 This is independently useful and reversible within the existing collaboration owners, but it does not qualify installed desktop, native WebView, live provider delivery, natural-model adherence or complete cost benefit. Smaller-fix analysis shows that changing the persisted renderer selection and the existing timeline scroll decision directly addresses the demonstrated failures; a second sender, model rewrite or client-side prose inference would add state and authority without improving the observed path.

This remains a justified increment because live model writing quality and full-cost benefit remain unmeasured. The next step is a live provider/adoption qualification under the existing collaboration delivery acceptance; the boundary is reviewable because publication, replay, return delivery and packaged reading all work through current callers.

Non-goals: This PR does not qualify installed desktop, native WebView, live provider delivery, natural-model adherence or complete cost benefit.

改动思路 / Approach

排版、返回、阅读位置和机器 JSON 测试适配分别留在现有 owner;提取命令格式器只搬移既有文本,不新增准入或效果规则。 The selected renderer and budget stay in planCollaborationResult; original-route delivery stays in prepareReturn; the timeline owns only the first-view scroll position. Legacy persistence is retained because receipts can outlive the deploying host, so dropping the old bytes or old observation fields would make replay and rollback unsafe.

新结果在既有 TypeScript publication owner 固定格式2,按实际选中的 renderer 计量正文与余项,再沿原返回事务投递。历史无版本结果保留原 renderer;未知版本在发表、读取和投递前拒绝。这个字段记录不可变排版选择,不是完成、调度或执行权限。另建发送器、改写模型或人工同步状态都没有必要。

场景 基线 本 head
新的完整长答复 来源在前,初读可能停在尾部 正文在前,首段与投递状态可见
既有无版本结果重试 原标签与原字节 保留原标签与原字节
预算边界 可能按另一套标签拒绝合法正文 按持久格式计量,超一 codepoint 仍拒绝
明确选择最新位置 跳到末尾 仍跳到末尾,保留历史阅读和独立 reader

The architecture decision is retain: the irreducible persisted fact is the publication’s formatting version, not completion or authority; its producer is the existing result planner and its replay/update owner is the same persisted receipt chain. The current PR boundary is the source and packaged return/read path only. Chat guidance is advisory, while unsupported-version rejection and budgeting are machine-enforced by the publication and delivery owners.

具体改动 / Changes

本轮重新审查最终 26文件 +733/−72,没有继承上一 head 的批准。相对 45e1ac63c0390d9f0b93ee41f33b84fa696ed483,最终 head 合入了最新 main,并以 313ef4966b832d336039bd875e0891c6f6f41a90 修复合并后的基线冲突;复查发现仅三个 PR 路径因 main 集成发生变化,受影响 UI blob 与协作 owner 未变。最终提交还撤回了过时的 chat_agent.py baseline 删除,因为最新 main 已把该未修改模块增长到 2,008 行;保留 current-main 例外比在本 PR 中无关修改运行时更合理。Python 保留 IO/命令适配和测试职责,publication、格式与返回资格继续由原 TS owner 决定。

规范依据:loopx/capabilities/manager_context/README.md,spec_revision f87d9976baab054e5baee5b0d56538ca3812b39e,源码 token 为 loopx/capabilities/manager_context/README.md。以改动前条款判断:

  • A delegation returns automatically:implemented;原受众返回、完整结论、余项与履行区分由 prepareReturn 和 tests/test_manager_context_roundtrip.py 覆盖。
  • Semantic delegation and peer review:implemented;完整 brief、原请求/受众与不可变重放保持,共享指引由 collaboration_brief_instruction 接入 tests/test_chat_project_context.py 和 MCP/delegation consumers。
  • 20000:implemented;沿用既有结果预算,但只按实际持久 renderer 计量完整正文和余项,边界由 tests/control_plane_ts/collaboration_result_publication.test.ts 与真实 CLI roundtrip 覆盖。

关键代码讲解

  • planCollaborationResult 先解析原结果与更新链,选择旧格式或新格式2,再校验完整正文预算;稳定 update id、修订身份及冲突拒绝保持。
  • collaborationResultText 为格式2组合原作者正文与两个完整余项段落;legacy 保留旧标签。Python/TS 两个 compact observation codec 都运输原格式标记,不各自推断格式。
  • prepareReturn 在原来源/受众 fence 后准备同一完整文本;新格式把 provenance 放到末尾,已有不确定发送仍走 verify,后续 update 不能超越它。
  • returnedAnswerStart 只依据 typed 完整返回标记、真实最后一条 timeline row 和高度定位开头;普通消息、live output、focus 与显式 latest 保留原控制。
  • _automation_prompt_upgrade_cli_actions 仅搬移原命令格式化分支;最终 maintainability scan 已无原 62-decision-point 未评审 finding,同时保留当前 main 的其他 reviewed exceptions。

对主干的风险 / Risks

最强反例是 publisher 保留版本而 compact observation 丢掉它,造成真实 CLI 重试仍按 legacy 预算拒绝;另一风险是初读定位抢走读者主动选择,或历史重试因新排版改变字节。完整预算、BMP/non-BMP、超限无写入、未知版本、legacy 重放、不确定发送、App/provider 同一正文与真实 File/SQLite 打包阅读均有证据。保留持久格式分支有实际历史消费者;回滚仍需兼容已发布格式2,不能因共部署就删除它。

本轮 PASS:436项 focused Python(在最终源码 parent 上,最终 delta 只恢复一个 current-main JSON baseline 条目)、11项最终 head TS publication、116项 TS collaboration/return/inbox/lifecycle、17个 configured mypy roots、严格 control-plane typecheck、dashboard 与 Chat bundle、以及最终 head standard premerge(4 项 direct、changed-Python compile、10 catalog、8 risk-profile、1 public-boundary,零失败/人工 hold)。Lark 使用真实内部 worker 和合成 provider,不证明在线账号发送。

The full TypeScript suite on the source parent had 6,136 passed, 77 skipped and one SQLite capacity failure. The same sqlite_capacity.test.ts command fails identically on main@f87d9976 and the PR head with matched_fill: AssertionError; neither the test nor its example is changed by this PR. The failure remains visible as a diagnostic and requires separate owner repair; it is not counted as a passing check. Remote Python CI is also red before shard execution because unchanged tests/test_chat_codex_history.py has three F811 findings; the same complete Ruff command returns the identical three diagnostics on main@f87d9976 and the reviewed head. Neither baseline failure is a reason to claim CI success.

语义与 CI 对齐

新结果的默认阅读/排版变化已明确披露,不是 default-off 功能。格式2是局部持久兼容选择,复用原词汇和 owner;不存在新的通用任务状态或执行权。return_format_version 只选择不可变 renderer,不改变请求受众、发送资格、完成状态或调度。共享指导从1,710增至3,173字符的成本仍保留,token、费用和长程净益未测。质量、审查线程、即时 readiness、GitHub policy 与显式合并授权分别判断;本地通过不会把两项既有红灯改写成成功。

我的整体评价 / Verdict

APPROVE 这个有界增量。long_horizon 保持原身份、未完成承诺及一次返回/重放边界,user_experience 改善了从原对话找到结论的路径,无新增确认轮次。 The result is readable and complete for the original audience while historical receipts remain immutable; no existing sender, model or timeline authority is duplicated.

Visual review reason: reused current-source packaged desktop and 390px captures for the long-return default state; the reviewed UI files are byte-identical to the captured revision, and the final delta only changes validation/baseline metadata. Visual unverified scope: installed App, native WebView, live provider/model, screen-reader behavior and production adoption. The inspected page used 61 mixed requests, long repeated history, failure/recovery states and a complete 20,000-codepoint answer; the answer, author and delivery state stay in the first view, full evidence remains below, and the narrow view does not horizontally overflow. The separate full-answer reader and explicit latest position remain reachable.

English verdict: APPROVE 313ef4966b832d336039bd875e0891c6f6f41a90 — complete readable returns, immutable replay and bounded follow-up work are verified within the stated source/packaged boundary; the two red CI paths are unchanged-base diagnostics, not passes.

huangruiteng
huangruiteng previously approved these changes Nov 6, 2026

@huangruiteng huangruiteng left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Reviewer: model_agent; model=GPT-5; provider=OpenAI; self_reported; reasoning_effort=unavailable

Maintainer approval conclusion

未发现阻断当前改动的 finding。 Reviewed head: 313ef4966b832d336039bd875e0891c6f6f41a90; verified target main: f87d9976baab054e5baee5b0d56538ca3812b39e。

动机 / Motivation

在原 App、CLI/MCP 或消息会话阅读协作返回的用户与接收 Agent,需要直接找到完整结论和后续条件。 Accepted manager-context contract requires complete delegation brief and automatic return to original audience; repository issue/PR request asks readability without losing evidence. 同一条含余项的长答复在基线先显示来源或停在尾部,恰好 20,000 个 Unicode codepoints 时还可能被旧标签挤出预算;本版本保留完整正文并从答案开头展示。 The old behavior placed provenance first and could stop at the evidence tail; the new behavior opens the complete answer first, keeps delivery state beside the author, and preserves the remainder without another model call. 原会话能读到完整结论、反例、未知费用和继续条件,历史答复重试保持原字节与身份。 This is independently useful and reversible within the existing collaboration owners, but it does not qualify installed desktop, native WebView, live provider delivery, natural-model adherence or complete cost benefit. Smaller-fix analysis shows that changing the persisted renderer selection and the existing timeline scroll decision directly addresses the demonstrated failures; a second sender, model rewrite or client-side prose inference would add state and authority without improving the observed path.

This remains a justified increment because live model writing quality and full-cost benefit remain unmeasured. The next step is a live provider/adoption qualification under the existing collaboration delivery acceptance; the boundary is reviewable because publication, replay, return delivery and packaged reading all work through current callers.

Non-goals: This PR does not qualify installed desktop, native WebView, live provider delivery, natural-model adherence or complete cost benefit.

改动思路 / Approach

排版、返回、阅读位置和机器 JSON 测试适配分别留在现有 owner;提取命令格式器只搬移既有文本,不新增准入或效果规则。 The selected renderer and budget stay in planCollaborationResult; original-route delivery stays in prepareReturn; the timeline owns only the first-view scroll position. Legacy persistence is retained because receipts can outlive the deploying host, so dropping the old bytes or old observation fields would make replay and rollback unsafe.

新结果在既有 TypeScript publication owner 固定格式2,按实际选中的 renderer 计量正文与余项,再沿原返回事务投递。历史无版本结果保留原 renderer;未知版本在发表、读取和投递前拒绝。这个字段记录不可变排版选择,不是完成、调度或执行权限。另建发送器、改写模型或人工同步状态都没有必要。

场景 基线 本 head
新的完整长答复 来源在前,初读可能停在尾部 正文在前,首段与投递状态可见
既有无版本结果重试 原标签与原字节 保留原标签与原字节
预算边界 可能按另一套标签拒绝合法正文 按持久格式计量,超一 codepoint 仍拒绝
明确选择最新位置 跳到末尾 仍跳到末尾,保留历史阅读和独立 reader

The architecture decision is retain: the irreducible persisted fact is the publication’s formatting version, not completion or authority; its producer is the existing result planner and its replay/update owner is the same persisted receipt chain. The current PR boundary is the source and packaged return/read path only. Chat guidance is advisory, while unsupported-version rejection and budgeting are machine-enforced by the publication and delivery owners.

具体改动 / Changes

本轮重新审查最终 26文件 +733/−72,没有继承上一 head 的批准。相对 45e1ac63c0390d9f0b93ee41f33b84fa696ed483,最终 head 合入了最新 main,并以 313ef4966b832d336039bd875e0891c6f6f41a90 修复合并后的基线冲突;复查发现仅三个 PR 路径因 main 集成发生变化,受影响 UI blob 与协作 owner 未变。最终提交还撤回了过时的 chat_agent.py baseline 删除,因为最新 main 已把该未修改模块增长到 2,008 行;保留 current-main 例外比在本 PR 中无关修改运行时更合理。Python 保留 IO/命令适配和测试职责,publication、格式与返回资格继续由原 TS owner 决定。

规范依据:loopx/capabilities/manager_context/README.md,spec_revision f87d9976baab054e5baee5b0d56538ca3812b39e,源码 token 为 loopx/capabilities/manager_context/README.md。以改动前条款判断:

  • A delegation returns automatically:implemented;原受众返回、完整结论、余项与履行区分由 prepareReturn 和 tests/test_manager_context_roundtrip.py 覆盖。
  • Semantic delegation and peer review:implemented;完整 brief、原请求/受众与不可变重放保持,共享指引由 collaboration_brief_instruction 接入 tests/test_chat_project_context.py 和 MCP/delegation consumers。
  • 20000:implemented;沿用既有结果预算,但只按实际持久 renderer 计量完整正文和余项,边界由 tests/control_plane_ts/collaboration_result_publication.test.ts 与真实 CLI roundtrip 覆盖。

关键代码讲解

  • planCollaborationResult 先解析原结果与更新链,选择旧格式或新格式2,再校验完整正文预算;稳定 update id、修订身份及冲突拒绝保持。
  • collaborationResultText 为格式2组合原作者正文与两个完整余项段落;legacy 保留旧标签。Python/TS 两个 compact observation codec 都运输原格式标记,不各自推断格式。
  • prepareReturn 在原来源/受众 fence 后准备同一完整文本;新格式把 provenance 放到末尾,已有不确定发送仍走 verify,后续 update 不能超越它。
  • returnedAnswerStart 只依据 typed 完整返回标记、真实最后一条 timeline row 和高度定位开头;普通消息、live output、focus 与显式 latest 保留原控制。
  • _automation_prompt_upgrade_cli_actions 仅搬移原命令格式化分支;最终 maintainability scan 已无原 62-decision-point 未评审 finding,同时保留当前 main 的其他 reviewed exceptions。

对主干的风险 / Risks

最强反例是 publisher 保留版本而 compact observation 丢掉它,造成真实 CLI 重试仍按 legacy 预算拒绝;另一风险是初读定位抢走读者主动选择,或历史重试因新排版改变字节。完整预算、BMP/non-BMP、超限无写入、未知版本、legacy 重放、不确定发送、App/provider 同一正文与真实 File/SQLite 打包阅读均有证据。保留持久格式分支有实际历史消费者;回滚仍需兼容已发布格式2,不能因共部署就删除它。

本轮 PASS:436项 focused Python(在最终源码 parent 上,最终 delta 只恢复一个 current-main JSON baseline 条目)、11项最终 head TS publication、116项 TS collaboration/return/inbox/lifecycle、17个 configured mypy roots、严格 control-plane typecheck、dashboard 与 Chat bundle、以及最终 head standard premerge(4 项 direct、changed-Python compile、10 catalog、8 risk-profile、1 public-boundary,零失败/人工 hold)。Lark 使用真实内部 worker 和合成 provider,不证明在线账号发送。

The full TypeScript suite on the source parent had 6,136 passed, 77 skipped and one SQLite capacity failure. The same sqlite_capacity.test.ts command fails identically on main@f87d9976 and the PR head with matched_fill: AssertionError; neither the test nor its example is changed by this PR. The failure remains visible as a diagnostic and requires separate owner repair; it is not counted as a passing check. Remote Python CI is also red before shard execution because unchanged tests/test_chat_codex_history.py has three F811 findings; the same complete Ruff command returns the identical three diagnostics on main@f87d9976 and the reviewed head. Neither baseline failure is a reason to claim CI success.

语义与 CI 对齐

新结果的默认阅读/排版变化已明确披露,不是 default-off 功能。格式2是局部持久兼容选择,复用原词汇和 owner;不存在新的通用任务状态或执行权。return_format_version 只选择不可变 renderer,不改变请求受众、发送资格、完成状态或调度。共享指导从1,710增至3,173字符的成本仍保留,token、费用和长程净益未测。质量、审查线程、即时 readiness、GitHub policy 与显式合并授权分别判断;本地通过不会把两项既有红灯改写成成功。

我的整体评价 / Verdict

APPROVE 这个有界增量。long_horizon 保持原身份、未完成承诺及一次返回/重放边界,user_experience 改善了从原对话找到结论的路径,无新增确认轮次。 The result is readable and complete for the original audience while historical receipts remain immutable; no existing sender, model or timeline authority is duplicated.

Visual review reason: reused current-source packaged desktop and 390px captures for the long-return default state; the reviewed UI files are byte-identical to the captured revision, and the final delta only changes validation/baseline metadata. Visual unverified scope: installed App, native WebView, live provider/model, screen-reader behavior and production adoption. The inspected page used 61 mixed requests, long repeated history, failure/recovery states and a complete 20,000-codepoint answer; the answer, author and delivery state stay in the first view, full evidence remains below, and the narrow view does not horizontally overflow. The separate full-answer reader and explicit latest position remain reachable.

English verdict: APPROVE 313ef4966b832d336039bd875e0891c6f6f41a90 — complete readable returns, immutable replay and bounded follow-up work are verified within the stated source/packaged boundary; the two red CI paths are unchanged-base diagnostics, not passes.

@loopx-agent
loopx-agent dismissed huangruiteng’s stale review November 6, 2026 07:50

The merge-base changed after approval.

@huangruiteng
huangruiteng merged commit dd1d95c into main Nov 6, 2026
27 of 33 checks passed
@huangruiteng
huangruiteng deleted the codex/collaboration-readable-returns-20261105-155015 branch November 6, 2026 07:50
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.

4 participants