Skip to content

feat(dsh): integrate owned operations with managed CLI and callback recovery - #6466

Merged
huangruiteng merged 21 commits into
mainfrom
codex/dsh-native-context-20261015
Oct 15, 2026
Merged

huangruiteng merged 21 commits into
mainfrom
codex/dsh-native-context-20261015

Conversation

@loopx-agent

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

Copy link
Copy Markdown
Collaborator

DSH model startup lacked an owned native operation connection, and the published Python SDK could not restore an approved session after its process exited. This change connects optional native tools to the existing operation owner, restores the original session with explicitly pinned upstream SDK/runtime sources, and exposes that path through normal turn run-once and operator-granted callback delegation.

Behavior

  • Opt in with --host dsh --dsh-operation-module /absolute/native-operation.js. Read-only context and native operations are separate Loader exports and remain outside the default patch. Ordinary DSH/Codex behavior stays unchanged; another host or --dsh-runner is rejected.
  • The owned host binds kernel peer PID, actual SDK session, Turn, call ID, arguments and frozen execution profile. Existing typed owners retain human confirmation, immutable identity, first consumption, revocation and outcome authority. Public actor/proof shortcuts remain closed. Configuration readback intentionally keeps runtime_qualified: false.
  • SDK/runtime 0.1.5rc1 supports a retained connection and refuses unsupported cross-process resume. The isolated source-built SDK 0.2.1a3 at official commit 2fbf4359b82fb94c03dcce0b831660d87f12ea5c, paired with @deepseek-ai/dsh@0.2.1-alpha.3, restores the same session through public resume_session. SDK files, Node/entry bytes, npm closure, module, patch and resolved endpoint hash join the profile; credentials do not.
  • Missing/unreadable history refuses before provider input or replacement. Initialization, restoration and callback failures close the client. Repeated callback delivery reads the existing operation/delegation rather than spawning another effect.
  • Lark original-card readback now verifies the provider's rendered Markdown entities and button confirmation title/body, while preserving literal plain text and exact hidden callback requirements. Actionable-card history cannot pass through visible-only normalization.

Validation

  • A live, zero-financial-effect journey used the real paid model, actual Feishu card and authenticated human confirmation. The original DSH session resumed, consumed once, recorded canonical not_executed, and returned that result to the same original card. Independent provider readback verified delivery. The continuation was manually invoked through the normal native CLI after the genuine callback; unattended callback wakeup was not installed or qualified. Private IDs, credentials and raw evidence are excluded from this PR.
  • Actual public CLI/SDK/runtime and detached callback qualification covers File/SQLite, refusal before confirmation, one consumption, repeated delivery, profile drift and missing history. Synthetic confirmation cases remain fixtures, separate from the live journey.
  • Integrated with main at 84eaa2805ef4d7b4e09d28a449538dd115119808: 289 focused regressions passed, 3 platform skips; 50 actual SDK/native entry and connection regressions passed, 2 skipped; the full tracked-tree semantic smoke passed. Retains main's typed host validation and specific remediation.
  • Full plugin suite: 215 passed using CI-pinned pnpm 10.33.0 and frozen lockfile; TypeScript typecheck passed. The integration performs native claim and same-Turn selection before settlement. Actual npm-pack/profile/GoalBar runtime smokes pass with the four explicit native operation entries.
  • Local-state migration: 150 passed, 3 platform skips. Reuses PR fix(extensions): keep unverified legacy status readable #6463's legacy unverified-status proof ordering: readable status, fail-closed enable, persistent disable. Lark projection/operation/channel regression: 143 passed; its atomic-write test now patches the existing kernel owner after upstream migration.
  • The missing DCO trailer was repaired with the maintainer-authorized, tree-equivalent rewrite; prior tips are retained. Later pushes used ordinary fast-forwards with DCO sign-off. The maintainer integrated main at ed3c3b79d and 3e8d94a54, preserving explicit claim, unselected→selected admission and replay assertions. The real admission integration passes locally. The browser M2 failure was independently reproduced and corrected to restore the last closed task on Back, then clear it on Forward, with URL/drawer/highlight and zero-write checks. Development and packaged M2, the independent packaged task-inspector route, and full tracked-tree semantic smoke pass. On the final exact head 3e8d94a5444b506baaf833ce899de06c64a62ce7, DCO, Ubuntu/Windows DSH distribution, PostgreSQL authority, Ark adapters, Frontstage Pages and Release Artifacts checks all succeeded. A superseded cancel-obsolete job was cancelled; this is not represented as every listed job being green. The maintainer merged the PR as 403170eceb00a6784c7e64c53dc4b37dbfc6fa06. Earlier failure/retry evidence remains retained.

Delivery boundary

This is the merged transport and bounded original-card result-return delivery. The live no-effect call establishes this bounded path; it does not qualify unattended operation, every SDK/runtime combination, global installation, account/venue effects or financial utility. The author made no order, signature, transfer, account-setting change or global upgrade; Core integration was performed by the maintainer. Removing the explicit module flag disables subsequent native operation Turns; retain the original pins for old-session recovery and rollback. An older globally installed Core may reject the new DSH executor while projecting the inbox; candidate-source readback works, and that compatibility limit remains explicit.

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=xhigh

Request changes conclusion (author-owned PR; GitHub blocks formal self-review)

Reviewed head: 904f963c6efba63a7e6b30eb87fe5e5626911a18。共用作者账号发布独立 COMMENTED 评审结论。

[P2] 新增正常打包入口没有同步两个已有严格消费者:dsh-goalbar-runtime-smoke.mjs:109 与 dsh-profile-smoke.mjs:110 都拒绝 package/lib/native-operation-context.js。这是当前 PR 引入的失败,不能归为 SDK、sandbox 或未安装 peer。请补齐 JS/types 明确允许项,保留未知文件/hash chunk/总数断言,并重跑两条 packed 路径。

动机

准备接入 DSH 操作流程的维护者需要知道工具究竟由哪个当前会话和 Turn 调用,不能让模型自己填写身份。 原默认插件没有这个观测入口;本补丁增加可显式加载的只读工具,从实际运行中的会话服务读取当前身份及白名单配置。但新增打包文件没有进入两份已有允许清单,原 packed runtime 和 packed profile 验证因此在启动前拒绝该包。 真实 SDK 与本地确定性响应的工具调用中,当前会话、首次及后续 Turn、未来会话的观测都匹配原生事件,权限位始终为 false;完整打包兼容验证仍被新增文件阻断。 这是只读 SDK 前置组件的提案,不创建 Core actor 或执行授权,不消费批准,也不交付 DSH 操作连接、frontend/Lark 原渠道结果回传或真实模型资格。

改动思路

复用 DSH 当前 agent、tool 和 turnBoundary 服务作为只读 provider;Core 准入继续属于现有 typed operation owner,独立 Loader 不改变默认插件树。当前必须补齐同一包的既有打包验证消费者。 本 PR 应交付可独立使用的 SDK 观测前置包及正常打包验证;Core admission/profile/revocation/消费/回传继续沿原 RFC owner,不能以 SDK 调用关闭整个流程。

维护者最需要反驳的是“工具返回 session 就已具备操作身份”。这里的 source profile 仅是 agent options,不是实际 wire 配置,两个 false 位和分开的 Core owner保留正确边界。当前producer不新增registry或Python决策,也不会默认加载;但完整proposal必须让正常包的原消费者接受新文件,不能只修一个artifact smoke。新 SDK 前置组件可以分阶段提出,前提是阶段包本身能被完整验证。

具体改动

完整9路径 +339/-1。新增122行TypeScript module、77行五个单测及61行零模型startup smoke;package/tsdown显式导出独立JS和types,artifact smoke增加两允许项和default-off检查,README及RFC双语注明开启、关闭、0.1.5rc1范围和未验流程。当前904f移除了 SDK不支持的schema range/length词,执行仍检查非空identity及safe native边界。没有修改Core actor、Driver、GoalBar或默认Loader。

关键代码讲解

createNativeContextTool:60 的 execute拒绝非空/非object参数和aborted调用,检查agent/session ID一致、running状态、agents.get对象身份及当前scope的tools.get身份;turnBoundary必须是安全整数、Turn>=1、开放seq>=0。只取provider/model/effort,不复制key;输出始终不授执行和wire验证。apply:120复用原tools.register。package.json:25把新JS/types加入普通tarball,但runtime/profile两个独立packedStaticEntries未同步,正常安装验证先拒绝它。

依据变更前 packages/dsh-loopx-plugin/README.md,固定 3c681f1132fe719e01f75e5a41bfd854dfa9e346:Install 中的artifact/profile/runtime验证在本head not_met,最小修复就是补齐两消费者;GoalBar authority and privacy boundary 的观测与权限分开 implemented。同固定版本的 domain-operation RFC Existing delegation and Turn entry 及 Qualification and remaining delivery 仍要求 native身份、有效profile、撤销和原渠道返回;这些完整Core/frontend/Lark旅程明确未交付,不能以SDK前置包宣称完成。

对主干的风险

独立真实SDK/bundled runtime0.1.5rc1,使用临时home、dummy凭据和本地确定性HTTP响应,执行原生模型工具dispatch:默认无模块时工具不存在;显式加载后native session/Turn1/seq4匹配事件,同一会话下一Turn2/seq23更新,未来新会话只返回自己的Turn1/seq4。原生tool/result事件和返回profile一致,false权限位保持。这里没有真实模型、Wire attestation或账号作用,也不继承作者的真实模型声明。源码及正常npm prepack后的packed module零模型startup都通过;当前typecheck/普通build/Ruff通过,artifact/pathprofile通过。

当前完整包211pass/1fail,固定base同命令206pass/1fail,两者都是admission-closeout:303经record:40读到undefined;Driver/cli/managed-runtime/测试及Core源码不变,同依赖树,故这一个是独立已有失败,保留且不称修复。另一方面,固定base完整runtime phase通过,正常base tarball的profile也通过;当前normal packed runtime和profile都在新JS文件处失败。两种失败归因分开,不能用已有失败掩盖新增失败。初次native canary4direct+19executed记录6个pnpm phase失败;完成依赖准备后按原phase分别读回,package已恢复通过,quality保留上述已有失败,runtime是当前PR regression。环境准备自动生成的tracked lock只恢复本轮自己的改动,原未跟踪文件保持;最初source startup碰到并行build期间lib缺席,串行正常build后复核成功,失败日志保留。开发advisory先于全量semantic,包中interface/unnamed literals不在探针覆盖内,已人工评估局部schema和名称;未查询、轮询、等待或启动CI。

我的整体评价

REQUEST_CHANGES。SDK producer本身有实际dispatch和反例价值,readonly/默认不加载的源码路径符合原owner;long_horizon和user_experience仍 not_yet_proven,因为整个正常包的default runtime验证被破坏。future-facing pass应在同一包修两个静态清单,可在语义一致时收敛文件清单,但不要放宽未知项或另建框架。修复后重跑full packed runtime/profile并按新head复评;Core actor/profile/revocation/消费/原渠道返回仍是原RFC的独立工作。

English verdict: REQUEST_CHANGES - 904f963; real SDK native-tool dispatch and later-Turn/future-session readback are verified with a local scripted provider, but the new normal distribution entries break the unchanged packed runtime and profile guards. Immutable-base controls pass both packed paths; repair the two strict consumers without weakening their oracles. The identical pre-existing admission-closeout failure and full operation-integration limits remain separate.

Comment thread packages/dsh-loopx-plugin/package.json
@loopx-agent loopx-agent changed the title feat(dsh): expose optional native session and Turn context feat(dsh): connect owned native tools to one-shot operation consumption Oct 15, 2026
@mergify

mergify Bot commented Oct 15, 2026

Copy link
Copy Markdown

Hi @loopx-agent, the DCO Sign-off check did not pass. Please inspect
its details first: checkout, fetch, timeout or infrastructure errors
need their own recovery, not a rewrite of otherwise signed commits.

If the log confirms a missing Signed-off-by trailer, amend the
affected commit with git commit --amend -s; for multiple commits,
use an interactive rebase against the current base from the correct
base-repository remote and sign off each affected commit. Push the
rewritten PR branch with git push --force-with-lease origin HEAD.

@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=xhigh

Request changes conclusion (author-owned PR; GitHub blocks formal self-review)

精确 head:14e993c2b91bc48737597e844217102decb2d3f4。

  1. [P2] 新增文件仍未被两个既有严格打包消费者采纳。 正常 npm pack 产生 33 项,包含两个新 JS 及其类型;dsh-goalbar-runtime-smoke 与 dsh-profile-smoke 仍使用旧清单,均在 native-operation-context.js 失败。不可变基线的正常包两条路径都通过。请同时补齐四项明确入口,保留未知/重复文件、hash chunk、总数断言并重跑全路径;只更新 artifact smoke 不够。原 inline 发现仍成立,本轮不重复添加相同 inline。
  2. [P2] 新传输常量使当前全树语义检查失败。 dsh_operation_host.py:50 新增的 TRANSPORT 与 Codex provider 同名不同值,基线冲突值/定义/语义计数 16/54/0 通过,当前 17/56/1 超出已有 16/54/0 限制。该失败来自当前补丁,零候选 advisory 不覆盖它。请按现有 owner/局部范围政策准确分类或共享归属,附相同输入基线/当前证据;不只提高预算或缩小扫描。此发现不把两个合法 provider 等同为重复批准 owner。

动机

维护者需要把 DSH 原生工具接到已有的人类确认流程,确保一次确认最多许可一次精确操作。
原来只读工具只能观察会话,当前内部宿主可在同一活连接的两轮中完成准备、确认前拒绝、夹具确认后一次消费及规范结果回传;但正常包仍被原安装验证拒绝。
真实 SDK、原生工具和 File/SQLite owner 的两轮流程已验证,一次消费后重复拒绝;当前完整打包和语义检查仍有本分支引入的失败,不能交付通过。
本次不资格化真实人类批准、金融效果、公开 DSH CLI/delegation 激活、跨进程恢复或前端/Lark 原卡返回。
原 RFC 保留公开入口、跨进程恢复及原渠道采用验收;当前 PR 还须修复两份严格打包清单和新增传输常量的语义清单冲突。

改动思路

原生进程与工具调用的配对属于 DSH provider IO,批准和一次消费继续复用既有 TypeScript owner;内部真实调用切片有价值,但必须同时修复既有包消费者和语义清单。
当前 PR 限于显式加载、同一活 SDK 连接的内部操作集成;公开入口、跨进程恢复及前端/Lark 原渠道采用仍由既有 RFC owner 验收。
按当前完整 22 文件 +2196/-28 和旧 904f 评审后修订分别判断,不继承只读前置阶段结论。只返回 session 不能证明调用者;当前以 SDK 自有 stdio 事件和内核 peer PID 配对精确参数,进入原 handler。另造 bearer、actor 或批准库会增加撤销与同步责任,现有 TypeScript owner 足够负责状态;Python 留在 SDK/process/socket provider IO 有明确理由。保留连接成本限定在显式内部 context,新宿主拒绝未支持的持久恢复,不替换获批身份。

具体改动

按变更前规格 spec_ref=docs/architecture/rfcs/human-confirmed-domain-operations-v0.md; packages/dsh-loopx-plugin/README.md、spec_revision=3593cf17dada74b807719ba4fdbbb1738fa0a56c 判断;两文件使用同一固定修订,修改后的 RFC 属行为披露。

  • Single owners and immutable execution subjects:implemented,typed store 保持身份、批准、撤销、消费和结果唯一 owner。

  • Confirmation, one-shot consumption and recovery:implemented,当前真实 SDK/File/SQLite 合成流程验证消费前确认、一次消费、重复拒绝与规范结果;不把夹具当人类批准。

  • Qualification and remaining delivery:deferred,既有 RFC owner 保留公开入口、跨进程恢复、前端/Lark 原渠道及真实效果验收。

  • Install:not_met,正常包被两份旧严格清单拒绝,按首项发现修复。

  • _run_dsh_operation_host:固定 SDK/runtime 0.1.5rc1、模块及包 JS、provider/model/effort 和原 session,两个已准入 Turn 复用同连接。新 context 恢复已存会话在启动前拒绝;回调失败关闭实际 runtime,结果仍经既有 validator。

  • DshOperationConnection:0700 私有目录、0600 Unix socket,核验 peer PID、开放 Turn、已观察 profile、call ID、完全相同参数;帧与调用缓存有界,先记已用再 dispatch,不自动重试。

  • normalizeAgentOperationExecutor:增加 dsh host 限定,读原 session/lock,核对 schema、transport 和 current binding。旧 Codex 缺省编码保持;把 host=dsh 塞进 Codex schema 不再被当成 Codex。公开 preflight 仍 Codex-only,typed owner 给出 host/sandbox 纠正,传输错误不再推荐模型凭据。

  • createNativeOperationTool:显式 Loader 注册原生工具,真实 context 经绝对私有 socket 交换;只读 context 的 execution/wire 验证位保持 false。默认 index/driver/observer/client/patch 不加载新工具。其余为包导出/构建、artifact/startup 与聚焦测试,以及 README/RFC 双语资格披露。

对主干的风险

真实 File/SQLite/native socket、传输 CLI 与 executor 回归 72 项通过;既有 Codex/Chat 测试 71 项通过、2 项条件跳过,未冒称全平台;TypeScript owner 16 项通过。真实 SDK 和内置 runtime 0.1.5rc1、原生工具、脚本化 loopback provider 三项集成在构建模块通过 11.61s,在正常 tarball 解包模块再通过 9.95s:两个准入 Turn、准备、确认前拒绝、合成夹具确认后一次消费、重复拒绝及规范 not_executed,另验证回调异常终止进程/连接。没有付费模型、真实用户批准或金融效果。
相同输入基线/当前:四个普通 binding 整对象相同,五个合法/无效 Codex session 写入字节和回读相同,五个默认打包入口整字节相同。十一类 malformed host/sandbox 不再被字符串强转为支持配置。原生身份、profile、Turn、参数、关闭、重放、peer 伪造均拒绝;替换会话撤销旧连接。新 connection/subject 不能沿用先前观察,合法下一 Turn 在保留连接上继续原规范结果流程。

语义与 CI 对齐

当前 typecheck、正常 build、artifact smoke 通过;完整插件 214pass/1fail。基线和当前相同聚焦命令均在 admission-closeout:303 经 record:40 读到 undefined,相关测试、Driver、CLI、managed-runtime blob 不变;这一项保留为既有独立失败,不称已修。它不能抵消本轮正常包 runtime/profile 与全树语义的新增失败。
开发 advisory 先于全树检查,零支持候选不覆盖标量 TRANSPORT。当前 premerge 的 5 项直接检查通过,19 项选择检查实际执行;语义 drift 与三个本地 pnpm wrapper 失败保留。wrapper 的 deps-status 错误不是 sandbox 拒绝;独立正常 npm 包及完整两个消费者已有可归因反例。相同基线 package/runtime wrapper 通过,quality 保留相同 admission 失败。没有调高限制或删除断言,只恢复本轮工具生成的基线 lock 改动并移除临时依赖链接。最初 SDK 缺显式模块的三项跳过不算通过;随后才取得显式实路径结果。不查询、轮询或等待远端 CI。

我的整体评价

REQUEST_CHANGES。内部原生连接与既有决策 owner 分工有依据,真实两轮和拒绝反例说明它交付了独立可验阶段,但普通包用户旅程回归,必需语义检查新增失败。未来方向检查已采用共享 action/session/typed owner;同一包中应修复并可适度收敛两份语义相同的严格文件清单,避免框架扩张。两项当前发现修复后重跑全量相关验证,对新 head 复评。公开入口、跨进程恢复、前端/Lark 和真实效用仍由原 RFC owner 负责;不授予合并或关闭讨论权限。

English verdict: REQUEST_CHANGES 14e993c2b91bc48737597e844217102decb2d3f4. Real packed SDK/native-tool integration verifies retained two-Turn one-shot consumption and refusal/recovery, but both strict packed consumers reject the new entries and the new TRANSPORT definition regresses the full semantic inventory. Immutable-base controls pass those gates; the identical admission-closeout failure and explicit live/platform/public-entry limits remain separate.

Comment thread loopx/control_plane/turn_driver/dsh_operation_host.py Outdated
@loopx-agent

Copy link
Copy Markdown
Collaborator Author

Supplemental source validation for exact head 14e993c2b91bc48737597e844217102decb2d3f4

源码提交检查补充:当前 PR 相对 3593cf17dada74b807719ba4fdbbb1738fa0a56c 新增的合并提交 e6a0a6f736a347f90d16eb089b7335911d6800e4 没有 Signed-off-by: trailer;其余六个新增提交都有签署。这是直接检查 commit body 的结果,没有查询或推断远端 DCO/CI 状态。请按仓库 DCO 规则只修复该未签署提交,保留其它已签署提交和主干历史;若改写导致 head 变化,须按新 head 重新评审。

English: the new merge commit e6a0a6f736a347f90d16eb089b7335911d6800e4 lacks the required DCO trailer; the other six commits in this PR range are signed. This is a source-history observation, separate from the two published runtime/semantic findings and without consulting remote CI. Repair the affected commit under the existing contribution policy; a changed head needs fresh review.

@loopx-agent loopx-agent changed the title feat(dsh): connect owned native tools to one-shot operation consumption feat(dsh): add owned native operations and persisted-session recovery Oct 15, 2026
@mergify

mergify Bot commented Oct 15, 2026

Copy link
Copy Markdown

Hi @loopx-agent, the DCO Sign-off check did not pass. Please inspect
its details first: checkout, fetch, timeout or infrastructure errors
need their own recovery, not a rewrite of otherwise signed commits.

If the log confirms a missing Signed-off-by trailer, amend the
affected commit with git commit --amend -s; for multiple commits,
use an interactive rebase against the current base from the correct
base-repository remote and sign off each affected commit. Push the
rewritten PR branch with git push --force-with-lease origin HEAD.

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

Request changes conclusion (author-owned PR; GitHub blocks formal self-review)
Reviewer: model_agent · gpt-6.1-sol · OpenAI · runtime_reported · reasoning_effort=xhigh

精确 head:547c21ff36f39be377c1d7e55ff62dc7bfb1cd62。REQUEST_CHANGES:新增普通打包文件仍未被两份既有严格消费者采纳;另有新 merge commit 缺少 DCO。此前 TRANSPORT 语义冲突已修复,不再列为阻塞。

动机

维护者需要把 DSH 原生工具接到已有确认流程,并在进程退出后保留原会话和一次消费边界。
旧版本只能保留同一活连接;当前显式候选可通过公开 resume_session 恢复原持久身份,缺失或损坏历史时拒绝,但整个普通包仍被两份既有严格清单拒绝。
当前真实 SDK 候选 9 项通过,覆盖 File/SQLite 恢复和失败清理;默认旧 runtime 为 3 过、6 项恢复用例明确跳过。主干正常包两消费者通过,当前包两者失败,且一份新增 merge commit 仍缺 DCO。
不资格化真实人类批准、付费模型或金融效果、公开 DSH CLI/delegation、前端/Lark 原卡返回、完整插件 peer range 或已安装运行。
本 PR 仍须修复两份严格打包清单和未签署合并提交;公开入口、原渠道采用及真实效果保持原 RFC 验收。

改动思路

DSH 原生调用配对属于 provider IO,确认和一次消费继续复用既有 TypeScript owner;官方恢复 API 比替换身份更小,完整包仍须同步两个严格消费者。
当前 PR 是显式 SDK/runtime 的内部操作及持久恢复切片;公开入口、原渠道返回和真实批准效果保持原 RFC 验收,正常包兼容与 DCO 属于本批必须修复的集成边界。
重新从原问题判断完整 22 文件 +2364/-28,而不是只看上次发现是否修正。只读工具返回 session 不能认证 effect caller;当前复用 SDK 自有事件与内核 peer PID,将精确 Turn/call ID/参数配对后进入原 Core handler。确认、撤销、一次消费和结果继续属于原 TypeScript owner,Python 负责 SDK/process/socket IO,没有第二份批准库、调度器或 bearer。当前新增恢复使用既有 SDK API,比另造会话迁移协议更小;初始化、恢复及回调失败的清理也已收敛到同一宿主入口。内部阶段有真实调用价值,但必须让普通包的旧消费者完整采用,不能只让新 artifact smoke 变绿。

具体改动

变更前规格固定为 spec_ref=docs/architecture/rfcs/human-confirmed-domain-operations-v0.md; packages/dsh-loopx-plugin/README.md,spec_revision=3593cf17dada74b807719ba4fdbbb1738fa0a56c;当前 RFC 修订是资格披露,不用作者新文本自证权限。

  • Single owners and immutable execution subjects:implemented,原 typed store/session 保留单 owner 和原批准主体。
  • Confirmation, one-shot consumption and recovery:implemented 的范围是合成确认、实际 SDK/原生工具/FileSQLite 一次消费和规范结果,不是真人批准或实际外部效果。
  • Qualification and remaining delivery:deferred 的是公开入口、前端/Lark 原渠道采用、其他 runtime 与真实效果;本轮增加候选持久恢复资格,不关闭父验收。
  • Install:not_met,正常包在两个原严格清单失败,需在本 PR 同时修复。

_sdk_runtime_pin 将候选 SDK Python 文件、实际 Node/entry 和 npm closure 纳入原 profile;provider/model/effort、模块/patch 与工作区也继续被冻结。_run_dsh_operation_host 只在明确候选 runtime 下调用公开 resume_session,先恢复原持久身份,再写绑定或发送输入;默认 0.1.5rc1 新进程恢复继续拒绝。OwnedDshOperationHost.run 统一关闭初始化、恢复、回调失败后的真实 client,防止下一次提示创建替代会话。DshOperationConnection 的原生身份/参数配对保持;normalizeAgentOperationExecutor 复用原 typed owner,旧 Codex 编码保持。

[P2] 完整打包回归仍在。 当前正常 npm prepack 包包含两个新增 JS 和两份类型声明,而 dsh-goalbar-runtime-smoke.mjs、dsh-profile-smoke.mjs 的 packedStaticEntries 没同步;两者均在 package/lib/native-operation-context.js 拒绝。最新 main ad863559af7a7cd6e10aa62137bbf69dd877fb3f 与本补丁共享基线,在相同依赖下重新构建的正常包两条完整路径均通过。请采纳四项明确文件,保留未知/重复文件、hash chunk 和总数断言;可在同一包内收敛确实同义的清单,不能放宽断言。既有 inline 4276755724 继续有效,不重复发表相同 inline。

对主干的风险

本轮 72 项连接/传输/Executor Python 测试通过(22.02s)、16 项 typed owner 测试通过、8 项原生 TS 测试及 typecheck 通过。实际缓存 SDK 0.2.1a3 与隔离显式 npm runtime 0.2.1-alpha.3 运行当前原生工具及本地 Messages SSE 合成响应源,9 项通过、零跳过(340.44s):File/SQLite 保留连接与关闭进程后恢复原 session;缺失或损坏历史时无 provider 输入、不替换 binding、不消费 proposal,失败 client 不可再用;回调失败实际终止 runtime/连接。准备、确认前拒绝、合成确认后首次消费、重复拒绝及原身份 not_executed 读回均验证。默认实际 SDK/bundled runtime 0.1.5rc1 是 3 过、6 项恢复专属跳过(14.96s),不把跳过算通过。这里未独立复建作者声明的上游 wheel 提交来源,也不资格化付费模型、真人批准或完整插件 peer range。
四个 ordinary transport 整对象、五类旧 Codex session 原字节/回读、正常 tarball 的 index/driver/observer/client/默认 patch 五份整字节,当前与最新 main 相同。17/22 个当前变更文件与前一已执行证据的 source blob 相同,故只保留仍在相同 source/consumer/dependency 范围内的旧证据;不继承旧 head 的 verdict。前次完整插件 214pass/1fail 与同基线 admission-closeout:303→record:40 的归因保持历史范围,没有冒称本轮全插件绿。

语义与 CI 对齐

开发 advisory 在全树检查之前;现有语义检查现在以冲突值/定义/语义计数 16/54/0 通过,没有抬高预算或缩小扫描。DSH_OPERATION_TRANSPORT 修复了原常量问题。完整 premerge 的 5 项直接检查通过,19 项选择检查实际执行,三个 pnpm 包 wrapper 仍因本地 deps-status 失败;这不是 sandbox 拒绝,也不能替代独立 npm 反例。当前 artifact 通过,而正常 runtime/profile 仍失败,分别记录。
直接读取 PR 新增 commit body:e6a0a6f736a347f90d16eb089b7335911d6800e4 缺 Signed-off-by,其他七项均签署。原 DCO 补充 6182293901 仍适用;需只修相关未签署提交,不据机器人检查消息推断原因,不直接改主干。没有查询、轮询或等待远端 CI。

我的整体评价

REQUEST_CHANGES。内部持久恢复切片有真实原生调用和拒绝反例,复用 owner 的比例合理,失败清理的有界整理已采用;它仍不能绕过普通包消费者和 DCO。最小修复是四项文件采纳与缺失签署,之后按新 head 重跑完整打包与所影响证据。公开入口和原渠道旅程继续属于原 RFC,没有新授权、没有关闭讨论或合并。旧语义问题明确已解决,当前打包和签署问题仍有效。

English verdict: REQUEST_CHANGES 547c21ff36f39be377c1d7e55ff62dc7bfb1cd62. Nine real candidate SDK/native-tool/FileSQLite checks validate same-identity persisted recovery and failure cleanup; legacy is 3 passed/6 intentional skips. The semantic collision is fixed, but both normal packed consumers still reject the added entries while same-dependency latest-main controls pass. The new merge commit e6a0a6f also lacks DCO. Public/live adoption and merge authority remain separate.

@loopx-agent loopx-agent changed the title feat(dsh): add owned native operations and persisted-session recovery feat(dsh): integrate owned operations with managed CLI and callback recovery Oct 15, 2026
@mergify

mergify Bot commented Oct 15, 2026

Copy link
Copy Markdown

Hi @loopx-agent, the DCO Sign-off check did not pass. Please inspect
its details first: checkout, fetch, timeout or infrastructure errors
need their own recovery, not a rewrite of otherwise signed commits.

If the log confirms a missing Signed-off-by trailer, amend the
affected commit with git commit --amend -s; for multiple commits,
use an interactive rebase against the current base from the correct
base-repository remote and sign off each affected commit. Push the
rewritten PR branch with git push --force-with-lease origin HEAD.

…ext-20261015

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>
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
…ext-20261015

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>
Reuse the verified status-readback correction from PR #6463 (00fcd1a). Missing legacy revision metadata remains readable and unverified; activation still refuses it.

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.

Request changes conclusion (author-owned PR; GitHub blocks formal self-review)

Reviewer: model_agent · gpt-6.1-sol · OpenAI · runtime_reported · xhigh

精确 head:697494015b644a5769994a1c6fe7c5943667fd93。这是对全部 30 个文件(+2775/-52)的重新评审;相较此前 547c21f,16 个 blob 改变、14 个相同。没有继承此前结论。

动机

维护者需要从正常 Turn 入口和已授权的确认回调恢复原 DSH 会话,并保留一次消费边界。

原来只有内部 SDK 候选路径;当前正常 CLI 和确认回调可在显式候选配置下恢复原会话,但普通插件包仍被两份既有严格清单拒绝。

当前真实 CLI/回调与候选 SDK 的 File、SQLite 两例通过;78 项连接/绑定、67 项 delegation、16 项 typed 与 8 项 native TS 通过。正常包两消费者仍失败,主干包在相同当前消费者上通过;贡献提交仍有一项缺 DCO。

不证明真实人类批准、付费模型或业务效果、前端/Lark 原卡片返回、完整 SDK peer range、已安装 App 或持续运行收益。

修复普通包的两个严格消费者并补齐 DCO;真实批准、前端/Lark 原渠道采用及业务效果仍按原 RFC 独立验收。

验收依据:docs/architecture/rfcs/human-confirmed-domain-operations-v0.md; packages/dsh-loopx-plugin/README.md,不可变版本 ad863559af7a7cd6e10aa62137bbf69dd877fb3f;当前 PR 修改的 RFC 作为变更说明,不能自证验收。逐项判断:

  • Single owners and immutable execution subjects:复用原 typed 操作/session owner,原生进程、调用、参数和 profile 不能由模型自证;当前连接/绑定与 typed 回归通过。
  • Confirmation, one-shot consumption and recovery:真实 CLI 与回调在 File/SQLite 上保留原会话;先拒绝未确认,确认后只消费一次,重复消费拒绝、重复回调读原 delegation,原结果为 not_executed。
  • Qualification and remaining delivery:本地显式候选 CLI/回调已资格化;真实批准、前端/Lark 原卡片采用、真实业务效果继续保留原验收,不能用合成确认或脚本 wait 关闭。
  • Install:尚未满足。当前正常包在两个既有严格消费者失败,这是本 PR 的分发集成问题。

改动思路

原生进程和工具调用配对属于 DSH provider IO;CLI 与回调复用同一 managed profile、原 session/delegation 和 TypeScript 操作 owner,普通分发清单仍须同步修复。

当前 PR 已覆盖显式候选 SDK/runtime 的正常 CLI 与已授权确认回调;真实批准、前端/Lark 原卡片返回及业务效果继续由原 RFC 验收,普通包兼容和 DCO 是本批阻塞。

正常 turn run-once 只有显式绝对 module 路径且 host 为 DSH SDK 时才构建 owned host。managed execution profile 冻结原模型/effort/凭据环境和 native runtime;确认回调重新使用原授权 executor、原 session 和原 delegation。operation_tool_handler 与 TypeScript 一次消费规则继续是效果 owner。

路径 当前行为与边界
普通 DSH/Codex/generic CLI 六个完整 base/head binding 观察相同;安装新导出不自动启用操作工具
显式候选 CLI 真实原生 SDK 工具准备请求;相对 module、错误 host 在 provider 调用前拒绝
原确认回调 profile 漂移不启动;恢复原 session,只消费一次;重试读原 delegation
普通打包 仍被两个旧严格清单拒绝;显式路径成功不能消除该回归

此表是代码路径说明;执行证据见下文。与恢复交付有关的历史经验被用于检查真实入口和普通包,并未当成评审结论或模型采用效果证明。

具体改动

  • native-operation-context.ts / native-operation.ts、独立导出和 types 将 owned native PID/Turn/tool-call/参数配对送到 DshOperationConnection;不是增加模型可填写的批准身份。
  • OwnedDshOperationHost.run / close 使用公开 SDK start/resume,保存原会话、冻结 profile,处理失败 client 和调用清理;当前环境 bridge 由 turn_dsh_host.py 复用既有 managed profile。
  • turn.py、turn_registration.py、selection/run_once 增加显式 module 和 confirmed-operation 通用别名,保留 Codex 别名;operation_wake.py 与 session resolver 将相同原 executor 接回 callback。
  • operation_agent_handoff.ts 扩展既有 host-qualified transport;命名为 DSH_OPERATION_TRANSPORT,此前 generic TRANSPORT 冲突已解决。没有增加平行 Python 批准 owner、scheduler 或 quota 决策。
  • EN/ZH RFC、local-delegation 和 focused entry/transport tests 说明候选资格、显式激活、失败和原渠道剩余验收;插件 strict pack 清单仍遗漏新增入口。

本人在当前 head 执行:78 项 Python 连接/绑定测试、67 项 delegation 测试、16 项 typed TS、8 项 native TS,以及两处 typecheck 通过;两个真实候选 CLI/SDK/FileSQLite 案例 2 passed、0 skipped(67.49s)。使用 SDK 0.2.1a3 与 runtime 0.2.1-alpha.3,真实 native tools/IPC 加本地 Messages SSE;确认与 wait 是合成 fixture,没有付费模型或业务效果。脚本 wait 后 delegation 为 rejected,不是成功任务完成。

当前正常 npm tarball 的完整 runtime/profile 消费者都失败;同一当前消费者、依赖和 Node 对不可变主干正常 tarball 均通过。该 base tarball 是此前验证过的 ad863559af7a7cd6e10aa62137bbf69dd877fb3f 构建产物,本轮重新执行了两个消费者;不冒称本轮重建它。六个普通 transport binding 完整 JSON 原样相等。

advisory 后,premerge 的 5 个 direct check 通过,19 个选中项已执行;其中 3 个插件 wrapper 因本地 pnpm dependency-status 路径失败,整体仍为 FAILED、manual hold 为 0。wrapper 的通用“sandbox”提示不证明沙箱拒绝。独立正常包失败有上述配对证据。此前猜错测试路径的零收集命令不算产品失败。

此前 547c21f 的 9 项真实候选 SDK 通过、legacy 3 通过/6 明确恢复用例跳过仅作历史证据;通过 blob/AST 与 caller/env 失效核对限定复用,当前变化的 CLI/profile/内部 runner 重新执行。没有独立重建上游官方 wheel,也未宣称全部 peer range、本轮完整插件 suite 或延迟收益。未查询、轮询或等待 CI。

对主干的风险

  1. [P2,阻塞] 普通打包消费者仍拒绝四个新增公共入口。 package.json:25 新增 JS/type 导出,但 smoke/dsh-goalbar-runtime-smoke.mjs:40 与 smoke/dsh-profile-smoke.mjs:20 的严格清单未采用它们,当前完整正常包都报 unapproved packed file: package/lib/native-operation-context.js。请同时采用四个有意入口,保留未知文件、重复项、hash chunk 和数量 oracle,并跑完整普通 pack/profile/runtime。原 inline 讨论 仍适用于当前代码,未重复发同一 inline。
  2. [P2,阻塞] DCO 仍缺一项。 11 个贡献提交中 10 个有签署,e6a0a6f736a347f90d16eb089b7335911d6800e4 没有 Signed-off-by;请由作者补齐真实签署并按新 head 重新核验。此结论来自 commit 内容,没有查询 DCO CI。

除打包缺口外,显式工具的默认关闭边界通过普通路径配对;原 session/profile 和 canonical receipt 继续控制效果。真实人类批准、长期恢复收益与原渠道结果仍未验证。撤回候选集成应撤回对应 entry/transport/exports,已存在 operation 继续交由原 reconciliation owner 处理,不能重放效果。

我的整体评价

新的正常 CLI/确认回调补齐了此前内部 SDK 阶段的真实入口,复用原 typed owner 的方向合适;bounded future-facing pass 已检查 profile/session/delegation 复用,当前不需要新的通用框架。最小下一步是修复两个严格消费者和 DCO,而不是增加批准状态或扩大真实效果范围。

修复普通包的两个严格消费者并补齐 DCO;真实批准、前端/Lark 原渠道采用及业务效果仍按原 RFC 独立验收。

因此保留 REQUEST_CHANGES。没有合并、解除他人讨论或把 fixture 当作真实批准。

English verdict: REQUEST_CHANGES - 6974940. Public DSH CLI/callback qualification now passes against real candidate SDK/runtime and File/SQLite; normal packed runtime/profile consumers still reject the new exports, and commit e6a0a6f lacks DCO. Current 78+67 Python,16 typed,8 native TS and2 SDK-entry cases pass; overall premerge retains3 pnpm wrapper failures. No CI or live approval/effect claim.

@loopx-agent
loopx-agent force-pushed the codex/dsh-native-context-20261015 branch from 6974940 to 81ce66f Compare October 15, 2026 04:36
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Follow the existing atomic-write owner from PR #6413 so a failed rename still proves the private binding is preserved.

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

mergify Bot commented Oct 15, 2026

Copy link
Copy Markdown

This pull request has merge conflicts with main and cannot be merged
until they are resolved. Please rebase or merge the base branch, @loopx-agent.

Choose the remote for the base repository, not an out-of-date fork.
For a fork clone, first inspect git remote -v; upstream must point
to https://github.com/loopx-project/loopx.git. If it is absent, add it
with git remote add upstream https://github.com/loopx-project/loopx.git.
Then run:

git fetch upstream
git rebase upstream/main
# Resolve each conflict, git add the resolved files, then git rebase --continue.
git push --force-with-lease origin HEAD

For a same-repository clone whose origin points to
https://github.com/loopx-project/loopx.git, use origin instead of
upstream for fetch/rebase. If you prefer merging the base, use
git merge <base-remote>/main and push normally.

Keep the DCO Signed-off-by trailer on every commit when you rebase.
https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork

@mergify mergify Bot added the needs-rebase Mergify: the pull request has merge conflicts with its base branch label Oct 15, 2026
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
@mergify mergify Bot removed the needs-rebase Mergify: the pull request has merge conflicts with its base branch label Oct 15, 2026
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 · xhigh

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

精确 head:5a0abe440e03cc1eef8996e73ed6b4b468614680;最新不可变 merge base a59aed703374040240f23b2e51ddaf209fcbacc4,整份35文件 +2779/-53。本轮最先验证的 5d37ec76dd16b595b763977fcf886c0b296e17dd 为38文件;合入主干后33个当前 PR 文件 blob 相同、两份 RFC 增量全文重读,三项已进入主干的 runtime/migration 改动不再冒充本 PR 新变更。123个两点比较的上游变化也不算作 PR 文件。下述是当前整份判断,不继承旧 head 的结论。

动机

维护者需要从正常 Turn 入口和已授权的确认回调恢复原 DSH 会话,并保留一次消费边界。

原来只有内部 SDK 候选路径;当前可显式通过正常 CLI 和已授权确认回调恢复原会话,普通插件打包、安装和运行消费者也已同步支持新增文件。

当前合入主干后278项后端、16项 typed 及两个真实候选 SDK/CLI File、SQLite 用例通过;当前正常包三阶段与12项剩余 canary 已补完,原打包清单与 DCO 阻塞已修复。

本次独立验证未调用付费模型、真实人类批准或真实飞书卡片,也不证明金融效果、全局安装、完整 SDK peer range、源会话返回或长期无人值守。作者新增真实零金融动作/原卡回传报告作为其单独声明,未冒充本人的独立实测。

候选 transport 与原会话恢复阶段可交付;自动唤醒60秒目标、源会话返回、全局安装及真实业务效用仍由原 RFC 独立验收。当前完整 canary 因基线已有编译缓存清理异常中断,失败和合并限制保留。

依据是变更前 docs/architecture/rfcs/human-confirmed-domain-operations-v0.md; packages/dsh-loopx-plugin/README.md,版本 ad863559af7a7cd6e10aa62137bbf69dd877fb3f:Single owners and immutable execution subjects、Confirmation, one-shot consumption and recovery、Qualification and remaining delivery、Install。原执行者、一次确认及普通分发兼容分别验收;新 checkpoint 与作者声明不自动关闭父目标。

改动思路

原生进程和工具调用配对属于 DSH provider IO;CLI 与回调复用同一 managed profile、原 session/delegation 和 TypeScript 操作 owner,正常分发的四个新增文件已进入两份严格清单。

交付候选 SDK/runtime 的正常 CLI、已授权回调及普通包兼容;作者记录手动真实原卡返回,但本评审未执行真人/付费路径。自动唤醒、源会话返回、全局安装与业务效用继续由原 RFC 验收,既存 canary 清理红灯保留。

原会话与执行 profile 不能由 caller 自报,也不能在批准后换一个新 session。DSH 专有 SDK/process/socket IO 放在 provider 边界,共同 TypeScript owner 继续决定批准、撤销、消费与结果;只读 context、包已安装或模型可用都不增加执行权限。

具体改动

  • 可选 native-operation-context 与 native-operation 分开导出,默认 patch 不加载。正常入口为 turn run-once --host dsh --dsh-operation-module /absolute/native-operation.js;禁止其它 host/--dsh-runner 混用。配置读回仍为 runtime_qualified: false,公共 actor/proof 消费捷径继续关闭。
  • Owned host/connection 核对 kernel peer PID、SDK 原 session/Turn/call/args 及冻结 profile,复用原 operation handler、session lock/CAS、action store 和 delegation。候选 SDK 0.2.1a3 与 npm runtime 0.2.1-alpha.3 通过公开 resume_session 恢复原会话;丢失/不可读历史、profile 漂移和重复消费均拒绝,不替换批准身份或重试副作用。旧 0.1.5rc1 跨进程恢复拒绝保持其限定,不宣称整个 peer range 合格。
  • 两个正常包严格消费者显式增加四个 JS/type 文件,unknown/duplicate/chunk/count 断言仍在。当前三阶段真实 normal-pack/profile/GoalBar runtime 都通过,原打包阻塞已修复。当前基线之外18个贡献提交均有 DCO sign-off;不再重复旧 missing-trailer 结论。
  • 共享 Lark provider 现在解码已渲染 Markdown 的实体,并把按钮确认标题与正文纳入可见 userDSL;plain text 保留原字节,格式不完整的确认拒绝规范化。column/button 使用结构 tag 判定。这是已披露的共享默认修复,不能以 DSH 默认关闭掩盖它。可操作卡片的历史去重仍禁止 visible-only 等价;实际 callback 仍由原 owner 核对规范 digest、principal、message/chat/app、tenant membership 等,显示相等不是隐藏参数或人类批准证明。

对主干的风险

当前合入主干后独立执行:278 passed、3 skipped,56.61s;3项是 Darwin 上不适用的 native Windows junction 检查,不算跨平台资格。16 typed passed、0 skip;真实候选 SDK/native Node、公共 CLI 与独立 callback 的 File、SQLite 两例 2 passed,76.78s。两个用例保持原 session/profile,确认前拒绝、模型漂移先拒绝、首次消费、原 not_executed 与重复 callback 返回原 delegation;合成 wait 得到 rejected delegation,不是业务完成。

正常包验证当前重新执行 quality/package/runtime,完整插件215项与 typecheck、实际正常 tarball 两份严格消费者均通过。之前 5d37ec76dd16b595b763977fcf886c0b296e17dd 的完整 canary 5 direct +19 selected/executed 已绿;更早全局 pnpm11 的 deps-status 失败仍保留,使用仓库 CI 固定 pnpm10.33.0 后同命令通过,无源码或断言放松。那些结果没有冒充当前集成 head 的完整 gate。

当前完整 canary 两次在 CLI output-budget 检查的临时 Effect 编译缓存清理时抛 OSError 66 / Directory not empty,没有完整 gate JSON,不能称全绿。同解释器、同生产 runner、同命令在基线 a59aed703374040240f23b2e51ddaf209fcbacc4 与 head 都复现;仅归一化物理 checkout/临时 fixture 根后,完整2185字符堆栈相等。runner、Effect runtime、compile-cache、server、该 smoke 五个因果 owner blob 完全相同;这条普通 CLI fixture 不调用新增 DSH 分支。故判为 pre_existing_unrelated,保留红灯和合并限制。

为了不让 runner 提前退出掩盖后续覆盖,另用原生产执行 owner(11项原 runner 和1项原 premerge boundary owner)完成其同一计划剩余12项,12/12 passed,含三项完整 DSH 包阶段、风险检查及公共边界;加上已完成的前6项,是19项中18项通过、1项清理异常。原计划与失败记录保留,没有改 runner、关闭缓存或修改执行环境来消除红灯。当前 whole-diff advisory 后完整 semantic 检查通过;未查询、轮询或等待 CI。

默认隔离还做了实际配对:最新主干/当前 head 的六组普通 DSH/Codex/generic 绑定完整 raw JSON 相等。相同卡片 fixture 在基线不能接受新 provider userDSL,head 接受;修改效果文字、确认正文或移除确认均拒绝,malformed confirmation 返回无投影,plain text 全等,exact hidden payload 仍可匹配且 actionable visible-only 去重仍为 false。现有 operation/team-plan callback 回归随当前后端套件执行。没有把本地 matcher 当实际飞书送达证明。

作者在新 EN/ZH checkpoint 和 PR body 中另报告真实人类确认后、手动 CLI 续接至同一原卡的零金融动作结果,并明确约246秒、不满足自动60秒目标。本人没有重放真人/付费链路,也未以该报告作为当前本地测试的替身。旧全局 Core 可能拒绝新 DSH executor,候选源码可读;恢复/回滚须保留原 pins,移除 module flag 仅关闭后续原生操作 Turn。自动无人值守、源会话返回、全局安装和金融效用仍开。

我的整体评价

APPROVE 当前有界候选 transport、原会话恢复与普通包兼容改动,无剩余阻塞性代码发现。先前公开的打包清单和 DCO 问题已按当前源、真实消费者和提交图重新核对,不能继续保留过期代码阻塞。

相关未来重构检查已做:CLI、callback 和 provider 复用原 profile/session/delegation/typed owner,Lark 可见投影复用原 helper;不需要再造批准状态或泛化框架。当前 canary 清理红灯、旧 reader 限制与原 RFC 未完验收均保留。COMMENTED 自评不是 GitHub 正式 APPROVED;本轮不授予 merge、dismissal、自动唤醒或真实效果权限。

English verdict: APPROVE - 5a0abe440e03cc1eef8996e73ed6b4b468614680: original-session one-shot native continuation and normal package consumers now pass current independent qualification (278 backend, 16 TS, 2 real candidate SDK/CLI cases; three platform skips). Both strict package inventories and DCO are repaired. The current canary cleanup failure reproduces identically on base; remaining 12 selected checks pass. Candidate pins, automatic/source-return acceptance and the separate merge hold remain explicit.

@mergify

mergify Bot commented Oct 15, 2026

Copy link
Copy Markdown

This pull request has merge conflicts with main and cannot be merged
until they are resolved. Please rebase or merge the base branch, @loopx-agent.

Choose the remote for the base repository, not an out-of-date fork.
For a fork clone, first inspect git remote -v; upstream must point
to https://github.com/loopx-project/loopx.git. If it is absent, add it
with git remote add upstream https://github.com/loopx-project/loopx.git.
Then run:

git fetch upstream
git rebase upstream/main
# Resolve each conflict, git add the resolved files, then git rebase --continue.
git push --force-with-lease origin HEAD

For a same-repository clone whose origin points to
https://github.com/loopx-project/loopx.git, use origin instead of
upstream for fetch/rebase. If you prefer merging the base, use
git merge <base-remote>/main and push normally.

Keep the DCO Signed-off-by trailer on every commit when you rebase.
https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork

@mergify mergify Bot added the needs-rebase Mergify: the pull request has merge conflicts with its base branch label Oct 15, 2026
Resolve admission-closeout.integration.spec.ts against #6493:

- Keep main's unselected-then-selected admission structure and its strict
  two-receipt assertions (initial admission with delivery_allowed false, then
  the identity_upgrade admission caused by it).
- Keep this branch's explicit Todo claim, moved between the unselected and
  selected calls, and keep --todo-id on the selected call only. The three-way
  merge had also spliced --todo-id into main's unselected call, which would
  have contradicted its selection_required assertion.

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 Oct 15, 2026
huangruiteng
huangruiteng previously approved these changes Oct 15, 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 · gpt-6.1-sol · OpenAI · self_reported · effort_unavailable

精确 head:ed3c3b79d7066d0e6c4170668e749c84716fb49b(合并提交);base 77b404b92743b05a726b2afe08707e0c82ad3595;整份 35 文件 +2775/-52。

本轮相对上一轮 head 5a0abe440e 只多了一个把 origin/main 合入的合并提交,并修正了该合并引入的一处三路拼接错误;PR 自身的 35 个文件与上一轮同 blob 的内容一致的部分不重复认定,下述判断均在本 head 上重新执行。

动机

需要在 DSH 原生进程退出后继续同一已确认操作的维护者与操作者。此前只有内部 SDK 候选路径,进程重建后无法从正常入口恢复已批准会话;现在可用 turn run-once --host dsh --dsh-operation-module /absolute/native-operation.js 恢复同一原 session/Turn/call 与冻结 profile,并让结果回到原卡。可观察结果是同一原会话被一次消费并回传结果,重复回调复用既有 operation/delegation 而不产生第二次副作用。依据是既有 HostDelivery/确认域 RFC docs/architecture/rfcs/human-confirmed-domain-operations-v0.md(base revision 77b404b92743b05a726b2afe08707e0c82ad3595)中的 Single owners and immutable execution subjects、Confirmation, one-shot consumption and recovery、Qualification and remaining delivery。本次不宣称无人值守唤醒、源会话返回、全局安装或金融效果已验收,也不关闭原 RFC 的剩余项。真实宿主送达与 Agent 启动、自动唤醒 60 秒目标、源会话返回与全局安装仍由原 RFC 独立验收。这是 justified_increment:本切片独立可评审、可回滚,且边界就是候选 transport、原会话恢复与普通包兼容;其余项有明确 owner 与依赖,不由本 PR 冒充完成。

改动思路

改动把 DSH 专有 SDK/process/socket IO 放在 provider 边界,批准、撤销、消费与结果仍由既有 TypeScript 操作 owner 决定。本次边界是候选 transport、原会话恢复与普通包兼容,不包含无人值守或全局安装。只读 context 与原生 operation 是两个分开的 Loader 导出,默认 patch 不加载;不传 module flag 时普通 DSH/Codex 行为不变,配置读回保持 runtime_qualified: false,公共 actor/proof 消费捷径继续关闭。CLI 入口与已授权确认回调复用同一 managed profile、原 session/delegation 与操作 handler,因此不存在第二套批准状态或并行决策源。

具体改动

  1. 新增 loopx/control_plane/turn_driver/dsh_operation_host.py(owneded host:kernel peer PID、SDK 原 session/Turn/call/args、冻结执行 profile 与 digest)与 dsh_operation_connection.py(有界帧的本地 socket 传输);新常量命名为 DSH_OPERATION_TRANSPORT,不再与 Codex 的 TRANSPORT 同名异值。
  2. turn_dsh_host.py 与 turn_run_once.py/turn.py/turn_registration.py/turn_selection.py 接入显式 --host dsh --dsh-operation-module;host_binding.py 只用 codex_operation_tools or dsh_operation_module_configured 决定是否投影 operation transport。
  3. 插件侧新增 src/native-operation-context.ts 与 src/native-operation.ts 两个导出(loopx_operation_context、loopx_operation),并在 package.json 暴露入口;两份严格打包消费者(dsh-profile-smoke.mjs、dsh-goalbar-runtime-smoke.mjs)显式加入这四个 JS/type 条目,重复/未知文件、hash chunk 与总数断言仍保留。
  4. 共享 Lark provider 的可见投影修复:markdown 元素做实体解码,按钮确认的标题与正文进入可见 userDSL,plain_text 保留原字节,格式不完整的确认拒绝规范化,column/button 改为结构 tag 判定。
  5. 后端与插件测试、RFC(EN/ZH)、docs/reference/local-delegation.md 与插件 README 同步更新。
  6. 对照 docs/architecture/rfcs/human-confirmed-domain-operations-v0.md(revision 77b404b92743b05a726b2afe08707e0c82ad3595)逐项:original_session_resume、one_shot_consumption、package_consumer_parity 为 implemented;unattended_wakeup、global_install 为 deferred,归原 RFC 的独立验收。

对主干的风险

最大风险是把可见投影当成批准或送达证明。实际确认仍由原 owner 核对规范 digest、principal、message/chat/app 与 tenant membership,显示相等不是隐藏参数或人类批准的证明;actionable 卡片的历史去重仍禁止 visible-only 等价。第二个风险是共享 Lark 默认变更影响所有卡片消费方而非仅 DSH,这一点已在 PR 正文按 shared default repair 披露,属于已披露的默认行为变更而不是被 DSH 默认关闭掩盖的改动。

默认关闭隔离:_with_operation_transport 的启用条件只由 codex_operation_tools or dsh_operation_module_configured 决定,新模块仅在显式传参时进入 profile;不传 flag 的普通 DSH/Codex 绑定与基线一致(上一轮的六组 raw JSON 配对比较在本轮未改变的条件上仍成立)。

本轮独立执行:generate_semantic_inventory.py --check 通过;semantic-vocabulary-drift-smoke.py 通过(conflicting_values 16/16、conflicting_definitions 54/54、multi_value_forks_semantic 1/1),即上一轮的语义登记 P2 已修好;dsh-loopx-plugin-validation.py 的 quality/package/runtime 三阶段全部通过;插件 pnpm typecheck 与 pnpm test(215 passed)通过;admission-closeout.integration.spec.ts 通过;DSH/Lark 后端子集 194 passed、11 platform skip;loopx canary premerge --from-git-diff 为 5 direct +19 selected 全绿、0 失败。

关于合并:origin/main 与本地只有一处冲突(admission-closeout.integration.spec.ts)。我采用 main 更新的 unselected→selected 结构与两条 receipt 的严格断言,保留本分支的显式 todo claim 并移到两次调用之间;三路合并还把 --todo-id 拼进了 main 的 unselected 调用,与它 selection_required 的断言相矛盾,已删除。合并后该 spec 实跑通过。

唯一红灯:Release Artifacts 的 goal-workspace-m2 浏览器断言(实际 showcase-reconcile、期望 showcase-map-columns)。它在三个互不相关的分支上同样失败——包括仅改 dashboard 的 #6495 分支与另一个 Lark identity 分支——因此判为 pre_existing_unrelated,作为独立合并限制保留,不由本 PR 承担修复。该 workflow 早前的 goal-work-map 失败已随合入 main 消失(本 head 的 fixture 与 main 完全一致)。另:本机 typecheck 起初因工作区 node_modules 停留在 dsh-client-connection@0.1.5-rc.2 而报 3 处参数数量错误,按 lockfile 固定的 0.2.0-rc.2 做 frozen 安装后通过,属本机环境差异而非仓库缺陷。

我的整体评价

APPROVE,justified_increment。无剩余阻塞性代码发现;上一轮的两条 P2(两份严格消费者未采纳新增分发条目、新 transport 常量与既有语义登记冲突)在当前 scope 已修复并有本轮实跑证据。未来演进检查已做:CLI、回调与 provider 复用原 profile/session/delegation/typed owner,Lark 可见投影复用原 helper,不需要新增批准状态或泛化框架;runtime_qualified: false 与公共 actor/proof 捷径保持关闭。剩余未验收项(无人值守唤醒、源会话返回、全局安装、金融效用)以及上述 pre-existing 合并限制都明确保留,本评审不授予发布、破坏性 Git 或绕过该限制的权限。

English verdict: APPROVE - ed3c3b79d7066d0e6c4170668e749c84716fb49b: opt-in DSH native operation transport, original-session resume and normal package consumers hold at this head (full-tree semantic check and drift smoke green with 16/16 and 54/54; plugin validation quality/package/runtime pass; plugin typecheck and 215 tests pass; admission-to-closeout spec passes after the merge resolution; 194 backend tests pass with 11 platform skips; canary 5 direct + 19 selected with zero failures). Both prior P2 findings are repaired. The single red check is a pre-existing goal-workspace-m2 browser assertion that also fails on unrelated branches and is recorded as a separate merge hold.

Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.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 · gpt-6.1-sol · OpenAI · self_reported · effort_unavailable

精确 head:3e8d94a5444b506baaf833ce899de06c64a62ce7;base 21d6649fd3e19358c188d1540077caa747084abc;整份 36 文件 +2785/-54。

本轮 head 由三部分组成:上一轮把 origin/main 合入并修正一处三路拼接错误的合并提交 ed3c3b79d7;作者账号提交的 56deaac0 test(workspace): restore the last task on browser Back,只改共享浏览器 fixture examples/personal-workspace-browser/goal-workspace-m2.mjs,把已过期的期望(Back 后回到更早的选中项)改为当前产品行为(Back 回到刚关闭的任务),并补上 URL 等待、抽屉隐藏与 goForward 断言;最后是我把当前 origin/main(只含一处与本 PR 无文件交集的 Lark identity 修复)再次合入,使相对 main 的差异重新等于本 PR 自身的 36 个文件。下述判断均在本 head 上重新确认。

动机

需要在 DSH 原生进程退出后继续同一已确认操作的维护者与操作者。此前只有内部 SDK 候选路径,进程重建后无法从正常入口恢复已批准会话;现在可用 turn run-once --host dsh --dsh-operation-module /absolute/native-operation.js 恢复同一原 session/Turn/call 与冻结 profile,并让结果回到原卡。可观察结果是同一原会话被一次消费并回传结果,重复回调复用既有 operation/delegation 而不产生第二次副作用。依据是既有 HostDelivery/确认域 RFC docs/architecture/rfcs/human-confirmed-domain-operations-v0.md(base revision 77b404b92743b05a726b2afe08707e0c82ad3595)中的 Single owners and immutable execution subjects、Confirmation, one-shot consumption and recovery、Qualification and remaining delivery。本次不宣称无人值守唤醒、源会话返回、全局安装或金融效果已验收,也不关闭原 RFC 的剩余项。真实宿主送达与 Agent 启动、自动唤醒 60 秒目标、源会话返回与全局安装仍由原 RFC 独立验收。这是 justified_increment:本切片独立可评审、可回滚,且边界就是候选 transport、原会话恢复与普通包兼容;其余项有明确 owner 与依赖,不由本 PR 冒充完成。

改动思路

改动把 DSH 专有 SDK/process/socket IO 放在 provider 边界,批准、撤销、消费与结果仍由既有 TypeScript 操作 owner 决定。本次边界是候选 transport、原会话恢复与普通包兼容,不包含无人值守或全局安装。只读 context 与原生 operation 是两个分开的 Loader 导出,默认 patch 不加载;不传 module flag 时普通 DSH/Codex 行为不变,配置读回保持 runtime_qualified: false,公共 actor/proof 消费捷径继续关闭。CLI 入口与已授权确认回调复用同一 managed profile、原 session/delegation 与操作 handler,因此不存在第二套批准状态或并行决策源。

具体改动

  1. 新增 loopx/control_plane/turn_driver/dsh_operation_host.py(owneded host:kernel peer PID、SDK 原 session/Turn/call/args、冻结执行 profile 与 digest)与 dsh_operation_connection.py(有界帧的本地 socket 传输);新常量命名为 DSH_OPERATION_TRANSPORT,不再与 Codex 的 TRANSPORT 同名异值。
  2. turn_dsh_host.py 与 turn_run_once.py/turn.py/turn_registration.py/turn_selection.py 接入显式 --host dsh --dsh-operation-module;host_binding.py 只用 codex_operation_tools or dsh_operation_module_configured 决定是否投影 operation transport。
  3. 插件侧新增 src/native-operation-context.ts 与 src/native-operation.ts 两个导出(loopx_operation_context、loopx_operation),并在 package.json 暴露入口;两份严格打包消费者(dsh-profile-smoke.mjs、dsh-goalbar-runtime-smoke.mjs)显式加入这四个 JS/type 条目,重复/未知文件、hash chunk 与总数断言仍保留。
  4. 共享 Lark provider 的可见投影修复:markdown 元素做实体解码,按钮确认的标题与正文进入可见 userDSL,plain_text 保留原字节,格式不完整的确认拒绝规范化,column/button 改为结构 tag 判定。
  5. 后端与插件测试、RFC(EN/ZH)、docs/reference/local-delegation.md 与插件 README 同步更新;共享浏览器 fixture 的 Back 期望按当前产品行为校正(56deaac0)。
  6. 对照 docs/architecture/rfcs/human-confirmed-domain-operations-v0.md(revision 77b404b92743b05a726b2afe08707e0c82ad3595)逐项:original_session_resume、one_shot_consumption、package_consumer_parity 为 implemented;unattended_wakeup、global_install 为 deferred,归原 RFC 的独立验收。

对主干的风险

最大风险是把可见投影当成批准或送达证明。实际确认仍由原 owner 核对规范 digest、principal、message/chat/app 与 tenant membership,显示相等不是隐藏参数或人类批准的证明;actionable 卡片的历史去重仍禁止 visible-only 等价。第二个风险是共享 Lark 默认变更影响所有卡片消费方而非仅 DSH,这一点已在 PR 正文按 shared default repair 披露,属于已披露的默认行为变更而不是被 DSH 默认关闭掩盖的改动。

默认关闭隔离:_with_operation_transport 的启用条件只由 codex_operation_tools or dsh_operation_module_configured 决定,新模块仅在显式传参时进入 profile;不传 flag 的普通 DSH/Codex 绑定与基线一致(上一轮的六组 raw JSON 配对比较在本轮未改变的条件上仍成立)。

本轮独立执行:generate_semantic_inventory.py --check 通过;semantic-vocabulary-drift-smoke.py 通过(conflicting_values 16/16、conflicting_definitions 54/54、multi_value_forks_semantic 1/1),即上一轮的语义登记 P2 已修好;dsh-loopx-plugin-validation.py 的 quality/package/runtime 三阶段全部通过;插件 pnpm typecheck 与 pnpm test(215 passed)通过;admission-closeout.integration.spec.ts 通过;DSH/Lark 后端子集 194 passed、11 platform skip;loopx canary premerge --from-git-diff 为 5 direct +19 selected 全绿、0 失败。

关于合并:origin/main 与本地只有一处冲突(admission-closeout.integration.spec.ts)。我采用 main 更新的 unselected→selected 结构与两条 receipt 的严格断言,保留本分支的显式 todo claim 并移到两次调用之间;三路合并还把 --todo-id 拼进了 main 的 unselected 调用,与它 selection_required 的断言相矛盾,已删除。合并后该 spec 实跑通过。

CI 状态:在本 PR 的合并 head(ed3c3b79d7)上,typescript-core 三个分片、dashboard-browser 分片 1 与 2、chat-bundle、stage2c(mutants/installed/e2e)、kernel-static-checks、windows-powershell、dsh-plugin 两个平台、postgresql-authority 与 adapter-contract 全部通过。唯一失败是 dashboard-browser 分片 3 与 Release Artifacts 的同一个 goal-workspace-m2 断言(实际 showcase-reconcile、期望 showcase-map-columns);它在三个互不相关的分支上同样失败——包括仅改 dashboard 的 #6495 分支与另一个 Lark identity 分支——说明该 fixture 期望相对当前产品已过期,而不是本 diff 的回归,也解释了为什么本 PR 早前 goal-work-map 的红灯随合入 main 消失。本 head 的 56deaac0 正是把这个过期期望校正为当前行为;该 head 的 CI 仍在排队,本轮没有把它当作已绿证据。另:本机 typecheck 起初因工作区 node_modules 停留在 dsh-client-connection@0.1.5-rc.2 而报 3 处参数数量错误,按 lockfile 固定的 0.2.0-rc.2 做 frozen 安装后通过,属本机环境差异而非仓库缺陷。

我的整体评价

APPROVE,justified_increment。无剩余阻塞性代码发现;上一轮的两条 P2(两份严格消费者未采纳新增分发条目、新 transport 常量与既有语义登记冲突)在当前 scope 已修复并有本轮实跑证据。未来演进检查已做:CLI、回调与 provider 复用原 profile/session/delegation/typed owner,Lark 可见投影复用原 helper,不需要新增批准状态或泛化框架;runtime_qualified: false 与公共 actor/proof 捷径保持关闭。剩余未验收项(无人值守唤醒、源会话返回、全局安装、金融效用)以及上述 pre-existing 合并限制都明确保留,本评审不授予发布、破坏性 Git 或绕过该限制的权限。

English verdict: APPROVE - 3e8d94a5444b506baaf833ce899de06c64a62ce7: opt-in DSH native operation transport, original-session resume and normal package consumers hold here (full-tree semantic check and drift smoke green with 16/16 and 54/54; plugin validation quality/package/runtime pass; plugin typecheck and 215 tests pass; admission-to-closeout spec passes after the merge resolution; 194 backend tests pass with 11 platform skips; canary 5 direct + 19 selected with zero failures). Both prior P2 findings are repaired, and the newest behaviour change is a single stale shared browser fixture expectation realigned with current product behaviour; a CI run for this head is still queued and is not claimed as green.

@huangruiteng
huangruiteng merged commit 403170e into main Oct 15, 2026
29 of 30 checks passed
@huangruiteng
huangruiteng deleted the codex/dsh-native-context-20261015 branch October 15, 2026 08:03
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.

2 participants