Skip to content

feat(spec)!: 删除 trigger-registry 的 Connector 簇 —— 同一业务需求的第三份声明,文件名承诺的东西从未存在 (#4499) - #4503

Merged
os-zhuang merged 1 commit into
mainfrom
claude/datasource-config-validation-i7wdmo
Aug 1, 2026
Merged

feat(spec)!: 删除 trigger-registry 的 Connector 簇 —— 同一业务需求的第三份声明,文件名承诺的东西从未存在 (#4499)#4503
os-zhuang merged 1 commit into
mainfrom
claude/datasource-config-validation-i7wdmo

Conversation

@os-zhuang

Copy link
Copy Markdown
Contributor

Closes#4499

结论

automation/trigger-registry.zod.ts 全文件删除:630 行、11 个 schema、两个工厂 helper、一个测试文件、一张生成的 reference 页。

两个独立的事实叠在一起:

  1. 文件名承诺的东西从未存在。 里面没有任何 trigger registry —— 每一个导出都是 connector 词汇(ConnectorSchema / Authentication* / Operation* / ConnectorInstance / Connector.apiKey())。
  2. 这是同一业务需求的第三份声明,且零消费者。 引擎注册和校验走 integration/connector.zod.ts(ADR-0097,engine.ts:1379);stack connectors: 集合走 DeclarativeConnectorEntrySchema;monorepo 里 spec 之外唯一引用它的是两个文档生成器 —— 发布渠道,不是消费者。

三份声明的收束(Prime Directive #12 — one capability, one contract):

声明归宿
integration/connector.zod.ts(ADR-0097)唯一活契约
integration/connector/* 六个 per-provider 模板#4480 已删
automation/trigger-registry.zod.ts 本簇本 PR

顺带修掉的假路标

integration/connector.zod.ts 的文件头挂着一节 "When to use Integration Connector vs. Trigger Registry?",用平台的口吻把"轻量场景"指向这个死文件。和 #4487 修掉的 capabilities.readOnly 处方同病:路标必须指向被强制执行的地方。该节替换为一段记录这次移除的说明,轻量场景就地解决(简单 auth 的 connector 实例,或 sync.zod.ts / etl.zod.ts)。

值得记录的两点

1. tsc 是最好的清道夫,这次它真的抓到了东西 —— 只是不是我的。 全依赖 typecheck(119 个任务)first-run 失败在 CLI,stash 我的改动后同样失败 —— 是 worktree 的 node_modules 落后于 main 新加的 @objectstack/metadata-protocol 依赖,pnpm install 后 119/119 全绿。这次全量 typecheck 同时是本删除"零消费者"判定的编译器级确认。

2. 迁移说明里有一个名字撞车陷阱。 活模块 integration/connector.zod.ts导出 ConnectorTriggerSchemaConnector 类型,但形状不同(ADR-0097 实例语义 vs 这份的 category/operations 词汇)。所以"把 import 路径查找替换一下"不是迁移 —— changeset 里明确写了这一点。

移除套件(与 #4480 同型)

处理
automation/index.tsbarrel 行删除,留注记录去向与理由
基线authorable-surface.json有意删除 69 行(gate (a) 绊线);json-schema.manifest.json 删 11 条
文档生成build-docs.ts 页面列表、build-skill-references.ts 源列表;重新生成后 trigger-registry.mdx 消失,references/automation/connector.mdx保留但只剩活着的 DataSyncConfig(生成器自己收敛的,不是手改)
strictness ledger按 checker 自己的契约删行(它拒绝不存在的文件和不可解析的计数),审计线索移到表后 prose;顺带记一笔:旧行的 "descriptors are code-registered; bindings authored" 本身就是双重乐观 —— 从来没有任何东西 code-register 过这些 descriptor,也没人 author 过 binding。automation 节合计 99 → 88
其余PROTOCOL_MAP.md 行、quick-reference 行、v17 dead-clusters 行、major changeset
D2 conversion —— 不是可存储的 stack 元数据,os migrate meta 无源可改写

验证

check:liveness / empty-state / authorable-surface / docs / api-surface /
spec-changes / upgrade-guide / skill-refs / skill-docs / skill-examples /
strictness-ledger —— 全部 PASS
  • @objectstack/spec — 279 files / 7041 tests passed
  • @objectstack/service-automation — 624 tests passed(ADR-0097 活路径不受影响)
  • 全依赖 typecheck — 119/119 任务通过

Generated by Claude Code

BREAKING CHANGE: @objectstack/spec/automation no longer exports the third
declaration of the connector vocabulary — ConnectorSchema,
ConnectorInstanceSchema, ConnectorOperationSchema, ConnectorTriggerSchema,
ConnectorCategorySchema, the Authentication*/OAuth2Config/Operation* family,
their inferred types, and the Connector.apiKey()/.oauth2() factory helpers.
All 630 lines of automation/trigger-registry.zod.ts go, plus its test and
generated reference page.
Despite the filename the file contained no trigger registry: every export was
connector vocabulary, self-contained and read by nothing. The automation
engine registers and validates connectors against ConnectorSchema from
integration/connector.zod.ts (ADR-0097) and never imported this one; the
stack `connectors:` collection parses DeclarativeConnectorEntrySchema; outside
the spec package the only references in the monorepo were the two doc
generators that published it. A full dependent typecheck (119 tasks) passes
with the file gone — the compiler confirms the zero-consumer verdict.
This closes the connector triple-declaration (Prime Directive #12): the
ADR-0097 contract is the one spelling, the six per-provider templates fell in
#4480, this was the last copy. integration/connector.zod.ts's header loses its
"When to use Integration Connector vs. Trigger Registry?" section with it —
guidance that steered lightweight cases to a dead file with the platform's
authority, the same defect class as the capabilities.readOnly prescription
corrected in #4487.
The removal kit, same shape as #4480:
- automation/index.ts barrel line removed with a note recording the decision
- authorable-surface.json: 69 keys deleted deliberately (gate (a)'s strict-
removal trip wire); json-schema.manifest.json: 11 entries
- build-docs page list and build-skill-references source list pruned;
reference pages, skill references, api-surface regenerated (the
references/automation/connector.mdx page survives with only the live
DataSyncConfig on it)
- strictness ledger: row dropped per the checker's contract, prose note keeps
the audit trail (the old row's "descriptors are code-registered; bindings
authored" was optimistic twice over); automation section total 99 → 88
- PROTOCOL_MAP row, quick-reference row, v17 dead-clusters row
- major changeset with the name-collision warning: the live module also
exports ConnectorTriggerSchema/Connector with different shapes, so an
import-path find-and-replace is not a migration
No D2 conversion: none of this was storable stack metadata, so there is no
source for `os migrate meta` to rewrite.
Closes#4499
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WsgTqRF58HsQYKLsrZ5pQY
@vercel

vercelBot commented Aug 1, 2026

Copy link
Copy Markdown

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

1 Skipped Deployment
ProjectDeploymentActionsUpdated (UTC)
objectstackIgnoredIgnoredAug 1, 2026 1:20pm

Request Review

@os-zhuang
os-zhuang enabled auto-merge August 1, 2026 13:20
@github-actions

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

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

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

  • content/docs/ai/agents.mdx(via @objectstack/spec)
  • content/docs/ai/skills-reference.mdx(via @objectstack/spec)
  • content/docs/ai/skills.mdx(via @objectstack/spec)
  • content/docs/api/client-sdk.mdx(via @objectstack/spec)
  • content/docs/api/environment-routing.mdx(via @objectstack/spec)
  • content/docs/api/error-catalog.mdx(via @objectstack/spec)
  • content/docs/api/error-handling-client.mdx(via @objectstack/spec)
  • content/docs/api/error-handling-server.mdx(via @objectstack/spec)
  • content/docs/api/index.mdx(via @objectstack/spec)
  • content/docs/automation/approvals.mdx(via @objectstack/spec)
  • content/docs/automation/connectors.mdx(via @objectstack/spec)
  • content/docs/automation/flows.mdx(via @objectstack/spec)
  • content/docs/automation/hook-bodies.mdx(via packages/spec)
  • content/docs/automation/hooks.mdx(via @objectstack/spec)
  • content/docs/automation/index.mdx(via @objectstack/spec)
  • content/docs/automation/webhooks.mdx(via @objectstack/spec)
  • content/docs/automation/workflows.mdx(via @objectstack/spec)
  • content/docs/concepts/architecture.mdx(via @objectstack/spec)
  • content/docs/concepts/design-principles.mdx(via packages/spec)
  • content/docs/concepts/index.mdx(via @objectstack/spec)
  • content/docs/concepts/metadata-driven.mdx(via @objectstack/spec)
  • content/docs/concepts/metadata-lifecycle.mdx(via packages/spec)
  • content/docs/concepts/north-star.mdx(via packages/spec)
  • content/docs/data-modeling/analytics.mdx(via @objectstack/spec)
  • content/docs/data-modeling/drivers.mdx(via @objectstack/spec)
  • content/docs/data-modeling/external-datasources.mdx(via @objectstack/spec)
  • content/docs/data-modeling/field-types.mdx(via @objectstack/spec)
  • content/docs/data-modeling/fields.mdx(via @objectstack/spec)
  • content/docs/data-modeling/formulas.mdx(via @objectstack/spec)
  • content/docs/data-modeling/index.mdx(via @objectstack/spec)
  • content/docs/data-modeling/objects.mdx(via @objectstack/spec)
  • content/docs/data-modeling/queries.mdx(via @objectstack/spec)
  • content/docs/data-modeling/schema-design.mdx(via @objectstack/spec)
  • content/docs/data-modeling/seed-data.mdx(via @objectstack/spec)
  • content/docs/data-modeling/validation-rules.mdx(via @objectstack/spec)
  • content/docs/data-modeling/validation.mdx(via @objectstack/spec)
  • content/docs/deployment/cli.mdx(via @objectstack/spec)
  • content/docs/deployment/troubleshooting.mdx(via @objectstack/spec)
  • content/docs/deployment/validating-metadata.mdx(via @objectstack/spec)
  • content/docs/getting-started/build-with-claude-code.mdx(via @objectstack/spec)
  • content/docs/getting-started/common-patterns.mdx(via @objectstack/spec)
  • content/docs/getting-started/examples.mdx(via @objectstack/spec)
  • content/docs/getting-started/quick-reference.mdx(via @objectstack/spec)
  • content/docs/getting-started/quick-start.mdx(via @objectstack/spec)
  • content/docs/getting-started/your-first-project.mdx(via @objectstack/spec)
  • content/docs/kernel/cluster.mdx(via @objectstack/spec)
  • content/docs/kernel/contracts/auth-service.mdx(via packages/spec)
  • content/docs/kernel/contracts/cache-service.mdx(via packages/spec)
  • content/docs/kernel/contracts/data-engine.mdx(via @objectstack/spec)
  • content/docs/kernel/contracts/index.mdx(via @objectstack/spec)
  • content/docs/kernel/contracts/metadata-service.mdx(via packages/spec)
  • content/docs/kernel/contracts/storage-service.mdx(via packages/spec)
  • content/docs/kernel/index.mdx(via packages/spec)
  • content/docs/kernel/runtime-services/email-service.mdx(via packages/spec)
  • content/docs/kernel/runtime-services/index.mdx(via packages/spec)
  • content/docs/kernel/runtime-services/queue-service.mdx(via packages/spec)
  • content/docs/kernel/runtime-services/sharing-service.mdx(via packages/spec)
  • content/docs/kernel/runtime-services/sms-service.mdx(via packages/spec)
  • content/docs/kernel/runtime-services/storage-service.mdx(via packages/spec)
  • content/docs/kernel/services-checklist.mdx(via @objectstack/spec)
  • content/docs/kernel/services.mdx(via @objectstack/spec)
  • content/docs/permissions/authorization.mdx(via @objectstack/spec)
  • content/docs/permissions/permission-sets.mdx(via @objectstack/spec)
  • content/docs/permissions/permissions-matrix.mdx(via @objectstack/spec)
  • content/docs/permissions/positions.mdx(via @objectstack/spec)
  • content/docs/permissions/rls.mdx(via @objectstack/spec)
  • content/docs/permissions/sharing-rules.mdx(via @objectstack/spec)
  • content/docs/plugins/adding-a-metadata-type.mdx(via @objectstack/spec)
  • content/docs/plugins/development.mdx(via @objectstack/spec)
  • content/docs/plugins/index.mdx(via @objectstack/spec)
  • content/docs/plugins/packages.mdx(via @objectstack/spec)
  • content/docs/protocol/backward-compatibility.mdx(via @objectstack/spec)
  • content/docs/protocol/diagram.mdx(via packages/spec)
  • content/docs/protocol/kernel/config-resolution.mdx(via @objectstack/spec)
  • content/docs/protocol/kernel/i18n-standard.mdx(via @objectstack/spec)
  • content/docs/protocol/kernel/index.mdx(via @objectstack/spec)
  • content/docs/protocol/kernel/lifecycle.mdx(via @objectstack/spec)
  • content/docs/protocol/kernel/plugin-spec.mdx(via @objectstack/spec)
  • content/docs/protocol/kernel/runtime-capabilities.mdx(via @objectstack/spec)
  • content/docs/protocol/knowledge.mdx(via @objectstack/spec)
  • content/docs/protocol/objectql/index.mdx(via @objectstack/spec)
  • content/docs/protocol/objectql/query-syntax.mdx(via @objectstack/spec)
  • content/docs/protocol/objectql/schema.mdx(via @objectstack/spec)
  • content/docs/protocol/objectql/security.mdx(via packages/spec)
  • content/docs/protocol/objectql/state-machine.mdx(via @objectstack/spec)
  • content/docs/protocol/objectui/actions.mdx(via @objectstack/spec)
  • content/docs/protocol/objectui/concept.mdx(via @objectstack/spec)
  • content/docs/protocol/objectui/index.mdx(via @objectstack/spec)
  • content/docs/protocol/objectui/layout-dsl.mdx(via @objectstack/spec)
  • content/docs/protocol/objectui/record-alert.mdx(via @objectstack/spec)
  • content/docs/protocol/objectui/widget-contract.mdx(via @objectstack/spec)
  • content/docs/releases/implementation-status.mdx(via @objectstack/spec)
  • content/docs/releases/index.mdx(via @objectstack/spec)
  • content/docs/releases/v12.mdx(via @objectstack/spec)
  • content/docs/releases/v13.mdx(via @objectstack/spec)
  • content/docs/releases/v16.mdx(via @objectstack/spec)
  • content/docs/releases/v17.mdx(via @objectstack/spec)
  • content/docs/releases/v9.mdx(via @objectstack/spec)
  • content/docs/ui/actions.mdx(via @objectstack/spec)
  • content/docs/ui/create-vs-edit-form.mdx(via @objectstack/spec)
  • content/docs/ui/dashboards.mdx(via @objectstack/spec)
  • content/docs/ui/forms.mdx(via @objectstack/spec)
  • content/docs/ui/index.mdx(via @objectstack/spec)
  • content/docs/ui/public-data-collection.mdx(via @objectstack/spec)
  • content/docs/ui/setup-app.mdx(via @objectstack/spec)
  • content/docs/ui/translations.mdx(via @objectstack/spec)
  • content/docs/ui/views.mdx(via @objectstack/spec)

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.

@github-actionsgithub-actionsBot added size/xl documentation Improvements or additions to documentation tests tooling labels Aug 1, 2026
@os-zhuang
os-zhuang added this pull request to the merge queueAug 1, 2026
Merged via the queue into main with commit c57f3cfAug 1, 2026
18 checks passed
@os-zhuang
os-zhuang deleted the claude/datasource-config-validation-i7wdmo branch August 1, 2026 13:45
os-zhuang pushed a commit that referenced this pull request Aug 1, 2026
…olved
Second catch in one afternoon, this time inside the merge queue: the queue
built this branch against a main that had just landed #4503 (trigger-registry
Connector cluster removal), which deleted the ./automation copies of
Connector, ConnectorSchema and ConnectorTriggerSchema — and the gate refused
the queue build until their baseline lines were gone. 55 → 52.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01M9uWvoEp9CoLzYjNExj9sL
akarma-synetal pushed a commit to akarma-synetal/framework that referenced this pull request Aug 2, 2026
…erent declaration, judged by symbol identity (objectstack-ai#4446) (objectstack-ai#4506)
* feat(spec): ratchet cross-entry dual-source exports — same name, different declaration, judged by symbol identity (objectstack-ai#4446)
api-surface.json records every export per entry point, so a name appearing on
two entries was VISIBLE — but nothing distinguished the two ways that happens,
and only one of them is fine: a re-export (one declaration, two import paths)
versus a DUAL-SOURCE (each entry resolving the shared name to its own
declaration, so which type a consumer gets depends on nothing but the import
path). The dual-source case is the objectstack-ai#4411 trap: eleven names declared twice
across ./kernel and ./system, where the copy that LOOKED canonical was the
dead one — a pick by name compiled and failed later, at an edge value.
New pure check `check:dual-source-exports`:
- Judged by SYMBOL IDENTITY, not name: every export of all 16 public entries
is resolved through its alias chain to the original symbol; a name whose
entries resolve to >=2 distinct symbols is dual-source. Name-based counting
would drown the signal — the real surface carries 148 legitimately
re-exported names next to the 63 real findings.
- Shrink-only baseline (dual-source-exports.baseline.json) records the 63
existing dual-sources — including the MetadataFormat ./shared≠./system enum
divergence, the ./contracts third-shape interfaces, and two type-vs-const
cases (ShareRecipientType, TransformType) the name-level scan could not even
see. A NEW dual-source fails with the fix at the declaration (converge +
re-export, or rename); a resolved one fails until its line is deleted. The
baseline is hand-edited under review, deliberately NOT generated: a `gen:`
that rewrites it would admit new dual-sources via "run the fix command"
instead of via a maintainer decision.
- Self-tests first (the check-exported-any pattern), pinning both edges: a
fixture dual-source (incl. type-vs-const) must be flagged, a re-export must
not, and count assertions keep a resolution failure from reading as clean.
- Wired everywhere a new check must be: package.json, the check:generated
reconciliation ledger (NO_GENERATOR — it would fail the run unclassified),
lint.yml's TypeScript Type Check job after the build step, and the AGENTS.md
pure-checks paragraph.
Also fixes a fresh flake this work kept tripping over: the objectstack-ai#4491 parity tests
spawn a tsx subprocess that loads the whole spec surface (~4.5s alone, 5-7s
under turbo's parallel load) against vitest's 5s default timeout — three
consecutive full-suite runs failed a DIFFERENT test of that file each time,
every one a timeout, while the file alone stayed green. The six spawning tests
now carry an explicit 60s timeout: a timeout there should mean "the script
hung", not "the runner was busy".
Closesobjectstack-ai#4446.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01M9uWvoEp9CoLzYjNExj9sL
* chore(spec): shrink the dual-source baseline by the 8 pairs objectstack-ai#4500 resolved
First contact with reality, one merge in: objectstack-ai#4500 removed the connector
"template" cluster, deleting the ./integration copies of ConsumerConfig,
DatabaseProvider, MessageQueueProvider and MultipartUploadConfig (type +
Schema each). Those 8 names are no longer dual-source, and the gate's
stale-entry leg refused to pass until their baseline lines were deleted —
the shrink-only ratchet ratcheting down exactly as designed. 63 → 55.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01M9uWvoEp9CoLzYjNExj9sL
* chore(spec): shrink the dual-source baseline by the 3 pairs objectstack-ai#4503 resolved
Second catch in one afternoon, this time inside the merge queue: the queue
built this branch against a main that had just landed objectstack-ai#4503 (trigger-registry
Connector cluster removal), which deleted the ./automation copies of
Connector, ConnectorSchema and ConnectorTriggerSchema — and the gate refused
the queue build until their baseline lines were gone. 55 → 52.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01M9uWvoEp9CoLzYjNExj9sL
---------
Co-authored-by: Claude <noreply@anthropic.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentationImprovements or additions to documentationsize/xlteststooling

Projects

None yet

2 participants

@os-zhuang@claude