Skip to content

fix(dsh): activate on the DSH 0.2.2 tool-role result of the loopx skill call - #9297

Merged
loopx-agent merged 1 commit into
loopx-project:mainfrom
xiaobaifly7:fix/dsh-tool-role-activation
Nov 23, 2026
Merged

loopx-agent merged 1 commit into
loopx-project:mainfrom
xiaobaifly7:fix/dsh-tool-role-activation

Conversation

@xiaobaifly7

Copy link
Copy Markdown
Contributor

Goal And Delivered Outcome

  • Outcome basis / optional anchor: reproduced defect on DSH 0.2.2-rc.3.
  • Goal/source and gap: DSH 0.2.2 records a tool result as a message with role tool, with toolCallId/isError on the message itself, not as a tool-result block in a user message. The activation fold only knew the older shape, so a model-initiated loopx skill call never activated the Driver on DSH 0.2.2.
  • Observable before → after: before, no activation and no continuation; after, a successful tool-role result activates. An error result still does not, and the legacy shape still works.
  • Issue/task and intended base: none. Base main.

Author Declaration

  • Written by: model_agent, Anthropic Claude (Opus 5.5) in Claude Code, operated by the commit author.

Implemented against

  • Specification and revision: no written specification; the request in this PR is the basis (message shape observed on DSH 0.2.2-rc.3).
  • Criteria:
Criterion (spec clause) Disposition Symbol / path Test or command
Accept the tool-role result shape implemented foldActivationEvent "activates on the DSH 0.2.2 tool-role result shape and still rejects its error results"
Error results never activate implemented foldActivationEvent same test
  • Self-check before submission: the new test fails on main's Driver and passes here. Existing legacy-shape activation tests still pass.

Scope And Continuation

  • Completed scope and remaining work: complete within this scope.
  • Slice boundary / successor: N/A

Validation

  • Tested revision: 5d83bcb
  • Run state: finished
  • Input classes: synthetic
Check kind Result Public-safe evidence / limitation
unit passed tests/driver.spec.ts 141/141
unit passed Full package suite: failures identical by name to main (18 pre-existing on Windows)
static passed pnpm run typecheck
  • Coverage and gaps: the fixture reproduces the recorded DSH 0.2.2-rc.3 shape; no live host run in this branch.

Frontend / Visual Evidence

  • UI impact: none

Type of Change

  • Bug fix

LoopX Area

  • Host or runtime integration

Technical Direction

  • Direction / acceptance reference, when applicable: N/A

Shared-authority RFC fixture impact

N/A

Boundary Checklist

  • Neither the diff nor this PR body/comments/attachments disclose private state, credentials, raw traces or verifier output, internal links, or local machine paths.
  • I did not duplicate maintainer-owned benchmark work unless a maintainer split out a public issue for it.
  • I kept the change scoped to the linked issue/task.
  • No paired RFC changed.
  • UI impact none.
  • Every commit includes a DCO Signed-off-by trailer (git commit -s).

🤖 Generated with Claude Code

…ll call

DSH 0.2.2 records a tool result as a message with role "tool" and
toolCallId/isError on the message itself, not as a "tool-result" block in
a user message. The activation fold only knew the older block shape, so a
model-initiated loopx skill call never activated the Driver there.

Accept both shapes; an error result still does not activate.

Signed-off-by: xiaobaifly7 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>

@loopx-agent loopx-agent 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.2-sol · OpenAI · runtime_reported · xhigh

动机 / Motivation

在 DSH 0.2.2-rc.3 中让模型调用 loopx 技能的用户,需要成功返回后由现有 Driver 继续该 Session。 该 Host 用 tool 角色消息返回技能调用结果。基线只识别旧 user 角色内的结果块,成功调用也不会进入续跑。 现有 Driver 在收到同一 call ID 的成功 tool 角色结果后安排一次续跑。失败结果仍不触发。 只补充同一 Session 的结果载体,不创建 Goal 绑定,不改变额度和已绑定宿主的唤醒权限。

改动思路 / Approach

现有权威和消费者足以解决问题。README 规定只有真实的同会话成功调用可以激活。继续用 Driver 的原有归约器匹配调用和结果,只接纳上游增加的载体。无需新状态、迁移或把错误分支转成成功。 只补充同一 Session 的结果载体,不创建 Goal 绑定,不改变额度和已绑定宿主的唤醒权限。 原先的匹配前提仍适用。失败输入继续走原有拒绝路径,只有满足现有约束的记录才能完成这一步。未调用、失败调用、普通文字和不匹配调用仍不触发。旧 user 角色结果继续由原有匹配逻辑处理。

具体改动 / Changes

精确头的净差异为两个文件 +41/-2。生产代码在已存在的匹配函数中处理当前场景,测试加入正常回读、失败或不匹配边界。README 规定只有真实的同会话成功调用可以激活。继续用 Driver 的原有归约器匹配调用和结果,只接纳上游增加的载体。 依现有合同核验了 original_9297_contract 和 unchanged_negative_gate,两个约束均有执行证据。当前主干与精确头的三方合成未产生冲突。 现有合同

关键代码讲解

  • exactModelActivationCall 只收录名称精确为 skill、JSON 参数明确命名 loopx 的模型调用。 源码
  • foldActivationEvent 通过同一 Session 内已记录的 call ID 匹配成功结果,保留失败和旧消息的处理。 源码

对主干的风险 / Risks

PASS。精确源码的 Driver 141 项通过,展示成功结果触发一次续跑。锁定的 DSH Session 和 LLM 依赖声明均确认 0.2.2-rc.3 的消息角色和字段。 在相同依赖和测试中替换为基线 Driver,新结果形态不会到达续跑。精确头现有回归覆盖错误结果,旧结果、普通文字和 Session 绑定用例仍通过。 包的 Driver 141 项、类型检查及 host/client 构建通过。使用真实 DSH 消息构造器的独立测试覆盖了成功、失败和错误 call ID。全包和 quality 阶段出现旧 Pause 回执在短轮询窗口内未出现。该用例调用 GoalBar 操作服务,不经过本次变化的技能激活归约器,单独运行时基线和准确头均通过。同一精确头降低本地测试并发后,全包 373 项通过。基线全包 372 项通过。 精确 Git 检出的全包结果为 ⎯⎯⎯⎯⎯⎯⎯ Failed Tests 1 ⎯⎯⎯⎯⎯⎯⎯。 快速预合并 4 项直接检查通过,选中检查 2 项通过。未通过项已保留下列原始结果。 python3 examples/canary/dsh-loopx-plugin-validation.py --phase quality。 适用范围与残余风险已限定。Driver 接入验证使用固定版本的 DSH 消息类型和隔离的宿主夹具。未实际运行付费模型或实装宿主。

语义与 CI 对齐

使用现有协议、既有匹配条件和状态投影。未调用、失败调用、普通文字和不匹配调用仍不触发。旧 user 角色结果继续由原有匹配逻辑处理。 比较原实现与当前头的结果,没有依赖远端 CI。 回归测试

我的整体评价 / Verdict

没有阻止批准的问题。该改动恢复了正常且已经获准的后续路径,降低合法工作因数据形状中断的风险,保留错误、授权、写回和调度约束。变更在后台事件归约器,没有更改 GoalBar 或可视布局。 Driver 接入验证使用固定版本的 DSH 消息类型和隔离的宿主夹具。未实际运行付费模型或实装宿主。

English verdict: APPROVE at 5d83bcb. Recognizes the pinned DSH 0.2.2-rc.3 successful tool-role result for the matched LoopX skill call while preserving legacy and failure gates.

@loopx-agent
loopx-agent merged commit 13ff0db into loopx-project:main Nov 23, 2026
35 of 41 checks passed
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