feat(runtime): 抽出 action-execution 子系统 — ADR-0076 D11 步骤③ PR-8 (#2462) - #3565
Merged
Conversation
… ③ PR-8 (#2462) 16 helpers (~560 lines) behind server-registered business actions move to action-execution.ts on the narrow ActionExecutionDeps slice (resolveService + getObjectQL — deliberately NO env-resolution state; that stays with route handlers). The ADR-0104 warn-once statics (actionParamsStrict/warnActionParamsOnce) ride along as module functions — they were HttpDispatcher statics the extracted body referenced, which would have made a value-cycle back into the dispatcher. Dispatcher keeps 4 thin delegates that have in-class callers (callData/enforceActionParams/actionPermissionError/buildActionSession); the 12 internal-only helpers are invoked directly on the module (5 call sites in buildMcpBridge/handleActions rewired). This is the pre-cut for PR-9: /actions and /mcp become mechanical domain extractions now that their shared machinery is a module. Verified: runtime 649, http-conformance 41, dogfood 351 (full-build first — the suite needs every example/connector dist), dependent closure DTS green. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
Contributor
📓 Docs Drift CheckThis PR changes 1 package(s): 17 hand-written doc(s) reference the affected code and may need an implementation-accuracy re-verification:
|
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
动机(#2462 D11 步骤③,深耦合批第一刀)
/actions与/mcp(经 buildMcpBridge)共享 16 个 dispatcher 私有 helper(~560 行):action 声明收集/解析、ADR-0104 参数强制、权限/AI 暴露门、engine facade + session 形状、调用执行、callData协议/ObjectQL 数据桥。本刀把它们抽成action-execution.ts独立模块——这是让 PR-9 的两域抽体变回机械刀的前置。设计
ActionExecutionDeps刻意窄:只有resolveService+getObjectQL——env 解析状态(kernel/resolver)一概不进,留在路由 handler 层。调查证实 16 个体内零 kernel 依赖。actionParamsStrict/warnActionParamsOnce)随体搬为模块函数——抽出的体引用HttpDispatcher.静态会形成回环。验证
runtime 649 绿;http-conformance 41 绿;dogfood 全套 351 绿(须先全仓 build——套件依赖全部 example/connector dist);下游闭包 DTS 绿。零行为变化。
关联 #2462。下一刀 PR-9:/actions + /mcp 两域抽体。
🤖 Generated with Claude Code