From 425aff9f57678085fee2d629c2b09776603e4f9b Mon Sep 17 00:00:00 2001 From: weichen Date: Mon, 5 Oct 2026 11:43:03 +0000 Subject: [PATCH] Record EXT-1 evidence rows and result summary on the task card --- .task/feature-ext-1-inproc-handler.md | 142 +++++++++++++++++++++++++- 1 file changed, 137 insertions(+), 5 deletions(-) diff --git a/.task/feature-ext-1-inproc-handler.md b/.task/feature-ext-1-inproc-handler.md index 5da3b6ba..bc892d8c 100644 --- a/.task/feature-ext-1-inproc-handler.md +++ b/.task/feature-ext-1-inproc-handler.md @@ -6,11 +6,18 @@ - 权威仓:ssh://git@git-ssh.u1680832.nyat.app:31411/weichen/Agent-System-Dev.git;目标分支:main;R0(initial_base_sha)= aeb8513e9c746294cfdb44c0fb55fa0fe26590d9 - 工作区:/home/weichen/projects/Agent-System-Dev-wt-feature-ext-1-inproc-handler(worktree);分支:feature/ext-1-inproc-handler -- 授权与交付终点:<本次允许的动作与终点;未授权事项写明> +- 授权与交付终点:EXT-1 基座侧实现(backend 子仓)+ 下游示例 + documents 提案 + .tmp P0 材料(11/12/13,不入库);子仓按 documents→backend→Dev 顺序提交,Dev PR 合入为本任务交付终点;不改基座既有路径语义,高后果操作(tag/建仓)不在本卡范围。 ## 目标与非目标 -<预期结果、受影响入口/模块/契约;明确不做什么。> +本卡即 **EXT-1 扩展点申请卡**(compat-policy §6 四要素)+ 基座侧实现任务: + +- **场景**:Agent-System-RDM 的 `rdm.ingest` 等命令经四入口(button/card/slash/chat)分发到 `cmdbus.Dispatch` 时,被以 `no host handler bound` 拒绝——`Registry.AddCommand` 与 manifest `provides.commands` 只注册规格不绑处理器;进程内插件也没有 owner 凭证与基座服务端回调身份(H4)。 +- **希望符号**:`pkg/extension` 新增 `Request`/`Handler`/`Host`(owner 作用域宿主句柄最小集:kv、audit、llm、knowledge search/write(embed)、tasks 台账、artifacts 只读)与 `Registry.AddCommandHandler(spec, h)`;`cmdbus` 新增 `RegisterPluginCommand`。 +- **为何现有注册点组合不出来**:`RegisterPluginCommands` 仅登记 spec;`HostClient` 走 sidecar HTTP 需进程内不可得的 token;owner 作用域必须由基座在分发时构造,插件无法自造。 +- **兼容**:只加符号与方法,不改既有路径语义;`SurfaceVersion` 保持 `2.0.0-experimental`,实验窗口内调整以提案 2026-10-05-ext-1-inproc-command-handler.md 为记录。 + +非目标:artifacts 写入(完整集,R1-7 前再评估);sidecar/EXT-3;下游仓创建与五仓 tag(另行双钥匙执行);RDM 领域逻辑。 ## 同步记录 @@ -26,6 +33,131 @@ ## 结果与验证(完成后填写) -- 结果: -- 验证:<结论摘要 PASS/FAIL/SKIP/NOT_RUN 逐项;逐条证据由 make evidence 写入上方证据表> -- 影响与剩余项: +- 结果:**EXT-1 最小集全部交付**——`pkg/extension` 新增 `Request`/`Handler`/`Host`(surface.txt 12→15)与 `Registry.AddCommandHandler`;`cmdbus.RegisterPluginCommand` 绑定处理器(高危确认卡拦截天然覆盖);`rag.IndexChunks` 抽出复用;`internal/app` 以 `hostcaps` 同源实现 hostapi 闭包与 `inprocHost`(owner 作用域:所有 store 调用 owner 第一参数、KnowledgeWrite 强制 Owner/Source);示例 `rdm.ping` 处理器 + go.mod core require/replace;documents 提案 + compat-policy §5 tag 名对齐 v0.2.0。artifacts **写入**未实现(完整集,按批注 1 R1-7 前再评估)。P0 材料 11/12/13 已落 `.tmp/智能体系统/further-objective/`(不入库)。.tmp 方案 V1.2 的 D3「单条 replace」已证伪并勘误(下游须复制 8 条 deps replace)。 +- 验证:make test 全链 **PASS**(提交前 786f852 树与最终 HEAD 517b897 各一轮,exit 0);make test-boundaries **PASS**;examples/downstream-rdm `go test ./...` **PASS**;backend `go test ./...` 29 包 **PASS**(含 cmdbus 三例、rag IndexChunks 两例、app 双 owner 作用域 + embed=hash 向量写入);final-HEAD 快检(boundaries+pins+examples)**PASS**。逐条证据见下方证据表;权威源为 CI 在 PR HEAD 的 `make test`+`make build`(GATE)。 +- 影响与剩余项:公开面依赖 0→1(+agent-system-core,声明式 go.mod 须按 compat-policy §4 加 core require+replace);既有路径语义不变、SurfaceVersion 保持 2.0.0-experimental。剩余:artifacts 写入(完整集);五仓 tag 与下游建仓(12/13 号材料备好,owner 双钥匙执行);MS0 评审材料待评审会使用(11 号)。 +| 2026-10-05T11:27:52Z | `make precheck` | 786f852def | 0 | SELF | 3c8da1b91e60945e | + + +``` +$ make precheck +[exit 0 | HEAD 786f852def | sha256:3c8da1b91e60945e] 输出尾部 15 行: +make[1]: Entering directory '/home/weichen/projects/Agent-System-Dev-wt-feature-ext-1-inproc-handler' +[repo] branch=feature/ext-1-inproc-handler head=786f852def +[remote] origin/main=aeb8513e9c ahead=1 behind=0 +[tree] clean submodules_drift=0 uninit=0 +[worktrees] linked=1 +[hooks] core.hooksPath=scripts/hooks(pre-commit/post-merge 实际接线) +[facts] policy/facts.md 4 条事实均在有效期内 +[required-reading] core/baseline.md, workflows/delivery.md §1 +[R0] aeb8513e9c(完整:aeb8513e9c746294cfdb44c0fb55fa0fe26590d9) +[verdict] READY — 可建任务工作区:make task-start NAME=feature/your-branch +make[1]: Leaving directory '/home/weichen/projects/Agent-System-Dev-wt-feature-ext-1-inproc-handler' +``` +| 2026-10-05T11:38:10Z | `make test-boundaries` | 786f852def | 0 | SELF | d12268928a5549a2 | + + +``` +$ make test-boundaries +[exit 0 | HEAD 786f852def | sha256:d12268928a5549a2] 输出尾部 15 行: +make[1]: Entering directory '/home/weichen/projects/Agent-System-Dev-wt-feature-ext-1-inproc-handler' +bash scripts/lint-boundaries.sh +architecture ok (68 edges) +architecture negative ok +boundaries ok +make[1]: Leaving directory '/home/weichen/projects/Agent-System-Dev-wt-feature-ext-1-inproc-handler' +``` +| 2026-10-05T11:38:10Z | `cd examples/downstream-rdm && go test -count=1 ./...` | 786f852def | 0 | SELF | 640877758fe3c88f | + + +``` +$ cd examples/downstream-rdm && go test -count=1 ./... +[exit 0 | HEAD 786f852def | sha256:640877758fe3c88f] 输出尾部 15 行: +ok example.com/agent-system-plugin-rdm 0.002s +``` +| 2026-10-05T11:38:18Z | `make test` | 786f852def | 0 | SELF | fe92462ce20f1fe9 | + + +``` +$ make test +[exit 0 | HEAD 786f852def | sha256:fe92462ce20f1fe9] 输出尾部 25 行: + at recursivelyTraversePassiveMountEffects (/home/weichen/projects/Agent-System-Dev-wt-feature-ext-1-inproc-handler/modules/ui/node_modules/react-dom/cjs/react-dom-client.development.js:16851:13) + at commitPassiveMountOnFiber (/home/weichen/projects/Agent-System-Dev-wt-feature-ext-1-inproc-handler/modules/ui/node_modules/react-dom/cjs/react-dom-client.development.js:17183:11) + at recursivelyTraversePassiveMountEffects (/home/weichen/projects/Agent-System-Dev-wt-feature-ext-1-inproc-handler/modules/ui/node_modules/react-dom/cjs/react-dom-client.development.js:16851:13) + + ✓ test/toolblock.test.tsx (4 tests) 76ms + ✓ test/tabstrip.test.tsx (3 tests) 71ms + ✓ test/collapsible.test.tsx (5 tests) 79ms + ✓ test/ui.test.tsx (6 tests) 68ms + ✓ test/overlay-host.test.tsx (6 tests) 64ms + ✓ test/card-anchor.test.tsx (4 tests) 82ms + ✓ test/file-preview.test.tsx (9 tests) 85ms + ✓ test/inbox.test.tsx (13 tests) 87ms + ✓ test/inline-confirm.test.tsx (7 tests) 103ms + ✓ test/capability.test.tsx (14 tests) 135ms + + Test Files 14 passed (14) + Tests 103 passed (103) + Start at 11:38:48 + Duration 620ms (transform 477ms, setup 0ms, import 1.50s, tests 918ms, environment 3.20s) + +knip unused exports 55 <= 55 +cd deps/agent-command && go vet ./... && go test -count=1 ./... +ok agent-command 0.002s +ok agent-command/conformance 0.002s +make[1]: Leaving directory '/home/weichen/projects/Agent-System-Dev-wt-feature-ext-1-inproc-handler' +``` +| 2026-10-05T11:39:42Z | `bash scripts/lint-boundaries.sh && bash scripts/check-pins.sh && cd examples/downstream-rdm && go test -count=1 ./... && echo 'final-HEAD quick checks OK'` | 517b89760a | 0 | SELF | 26cb4cbcc3d68ec3 | + + +``` +$ bash scripts/lint-boundaries.sh && bash scripts/check-pins.sh && cd examples/downstream-rdm && go test -count=1 ./... && echo 'final-HEAD quick checks OK' +[exit 0 | HEAD 517b89760a | sha256:26cb4cbcc3d68ec3] 输出尾部 15 行: +ok deps/agent-native agent-intent +warn: deps/agent-native deps/development-guidelines is 26b562d2e34f, Dev is af199eeaa23c +ok deps/agent-native error-code-system +ok deps/agent-native logging-system +ok deps/agent-squad agent-intent +ok deps/agent-squad agent-native +warn: deps/agent-squad deps/development-guidelines is 26b562d2e34f, Dev is af199eeaa23c +ok deps/agent-squad error-code-system +ok deps/agent-squad logging-system +warn: deps/agent-intent deps/development-guidelines is 26b562d2e34f, Dev is af199eeaa23c +ok deps/agent-intent error-code-system +ok deps/agent-intent logging-system +pins ok +ok example.com/agent-system-plugin-rdm 0.003s +final-HEAD quick checks OK +``` +| 2026-10-05T11:39:50Z | `make test` | 517b89760a | 0 | SELF | b55eef9dea426887 | + + +``` +$ make test +[exit 0 | HEAD 517b89760a | sha256:b55eef9dea426887] 输出尾部 25 行: + at runWithFiberInDEV (/home/weichen/projects/Agent-System-Dev-wt-feature-ext-1-inproc-handler/modules/ui/node_modules/react-dom/cjs/react-dom-client.development.js:1048:13) + at commitHookEffectListMount (/home/weichen/projects/Agent-System-Dev-wt-feature-ext-1-inproc-handler/modules/ui/node_modules/react-dom/cjs/react-dom-client.development.js:13748:29) + at commitHookPassiveMountEffects (/home/weichen/projects/Agent-System-Dev-wt-feature-ext-1-inproc-handler/modules/ui/node_modules/react-dom/cjs/react-dom-client.development.js:13835:11) + at commitPassiveMountOnFiber (/home/weichen/projects/Agent-System-Dev-wt-feature-ext-1-inproc-handler/modules/ui/node_modules/react-dom/cjs/react-dom-client.development.js:16906:13) + at recursivelyTraversePassiveMountEffects (/home/weichen/projects/Agent-System-Dev-wt-feature-ext-1-inproc-handler/modules/ui/node_modules/react-dom/cjs/react-dom-client.development.js:16851:13) + at commitPassiveMountOnFiber (/home/weichen/projects/Agent-System-Dev-wt-feature-ext-1-inproc-handler/modules/ui/node_modules/react-dom/cjs/react-dom-client.development.js:17183:11) + at recursivelyTraversePassiveMountEffects (/home/weichen/projects/Agent-System-Dev-wt-feature-ext-1-inproc-handler/modules/ui/node_modules/react-dom/cjs/react-dom-client.development.js:16851:13) + + ✓ test/overlay-host.test.tsx (6 tests) 62ms + ✓ test/inbox.test.tsx (13 tests) 84ms + ✓ test/card-anchor.test.tsx (4 tests) 90ms + ✓ test/file-preview.test.tsx (9 tests) 88ms + ✓ test/inline-confirm.test.tsx (7 tests) 106ms + ✓ test/capability.test.tsx (14 tests) 143ms + + Test Files 14 passed (14) + Tests 103 passed (103) + Start at 11:40:18 + Duration 613ms (transform 393ms, setup 0ms, import 1.30s, tests 952ms, environment 3.29s) + +knip unused exports 55 <= 55 +cd deps/agent-command && go vet ./... && go test -count=1 ./... +ok agent-command 0.002s +ok agent-command/conformance 0.002s +make[1]: Leaving directory '/home/weichen/projects/Agent-System-Dev-wt-feature-ext-1-inproc-handler' +```