Skip to content

feat(runtime): /automation 域 handler 体抽出 — ADR-0076 D11 步骤③ PR-6 (#2462) - #3542

Merged
os-zhuang merged 1 commit into
mainfrom
feat/d11-step3-extract-automation
Jul 27, 2026
Merged

feat(runtime): /automation 域 handler 体抽出 — ADR-0076 D11 步骤③ PR-6 (#2462)#3542
os-zhuang merged 1 commit into
mainfrom
feat/d11-step3-extract-automation

Conversation

@os-zhuang

Copy link
Copy Markdown
Contributor

动机(#2462 D11 步骤③,系列第六刀)

抽出 /automation(flow CRUD、trigger/execute、runs 历史、pause/resume——ADR-0018/0019/0022 面,~260 行)。系列中最干净的一刀:deps 契约零增长(getService/resolveService/success/error 全覆盖)。

改动

  • domains/automation.ts:体逐字搬迁。路由顺序精妙处原样保留——/actions/connectors/_status 三个守卫分支必须先于 /:name → getFlow catch-all(字面叫 "actions" 的 flow 不得遮蔽它们),新测试锁定守卫位置。
  • /actions(handleActions)有意不在本刀:调查确认它深耦合 env 解析状态(this.kernel/kernelResolver/resolveDefaultProject + 4 个私有 helper),归入 /data /meta 深耦合批单独设计。

验证

接缝套件 37 测试(新增 3:列表 / 守卫位置+过滤 / 无服务 fall-through);runtime 全量 642 绿;http-conformance 41 断言绿;下游闭包 --force 含 DTS 全绿。

关联 #2462(D11 步骤③ PR-6)。剩余:/auth /mcp /ai(中)+ /actions /meta /data(深耦合批,需单独设计)。

🤖 Generated with Claude Code

…D11 step ③ PR-6 (#2462)

The automation service bridge (~260 lines) moves to
domains/automation.ts. Cleanest extraction of the series: zero new
DomainHandlerDeps growth (getService/resolveService/success/error cover
it). Route-order subtlety preserved verbatim — /actions, /connectors
and /_status keep their guard positions before the /:name→getFlow
catch-all (a flow literally named "actions" must not shadow them; a new
seam test locks the guard position).

NOTE: /actions (handleActions) is NOT in this cut — it is
deep-coupled to env-resolution state (this.kernel / kernelResolver /
resolveDefaultProject + 4 private helpers) and goes with the /data
/meta deep-coupling batch.

Verified: seam suite 37 tests, runtime 642 green, http-conformance 41
green, dependent closure builds with DTS (--force).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@vercel

vercel Bot commented Jul 27, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
spec Building Building Preview, Comment Jul 27, 2026 3:35am

Request Review

@github-actions github-actions Bot added documentation Improvements or additions to documentation tests tooling size/l labels Jul 27, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 1 package(s): @objectstack/runtime.

17 hand-written doc(s) reference the affected code and may need an implementation-accuracy re-verification:

  • content/docs/api/index.mdx (via @objectstack/runtime)
  • content/docs/api/wire-format.mdx (via @objectstack/runtime)
  • content/docs/automation/hook-bodies.mdx (via @objectstack/runtime)
  • content/docs/concepts/north-star.mdx (via packages/runtime)
  • content/docs/data-modeling/drivers.mdx (via @objectstack/runtime)
  • content/docs/deployment/index.mdx (via @objectstack/runtime)
  • content/docs/deployment/production-readiness.mdx (via @objectstack/runtime)
  • content/docs/deployment/single-project-mode.mdx (via @objectstack/runtime)
  • content/docs/deployment/vercel.mdx (via @objectstack/runtime)
  • content/docs/getting-started/your-first-project.mdx (via @objectstack/runtime)
  • content/docs/permissions/authentication.mdx (via @objectstack/runtime)
  • content/docs/permissions/authorization.mdx (via packages/runtime)
  • content/docs/plugins/packages.mdx (via @objectstack/runtime)
  • content/docs/protocol/kernel/http-protocol.mdx (via @objectstack/runtime)
  • content/docs/protocol/kernel/index.mdx (via @objectstack/runtime)
  • content/docs/protocol/kernel/lifecycle.mdx (via @objectstack/runtime)
  • content/docs/releases/implementation-status.mdx (via @objectstack/runtime)

Advisory only. To re-verify, run the docs-accuracy-audit workflow scoped to these files:
node scripts/docs-audit/affected-docs.mjs origin/main → pass the list as args.docs.

@os-zhuang
os-zhuang merged commit 688e9df into main Jul 27, 2026
15 of 16 checks passed
@os-zhuang
os-zhuang deleted the feat/d11-step3-extract-automation branch July 27, 2026 03:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/l tests tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant