Skip to content

feat(metadata-protocol,objectql): MetadataProtocolPlugin + registerProtocol 退出开关 — ADR-0076 Step 2 PR-A (#2462) - #3578

Merged
os-zhuang merged 1 commit into
mainfrom
feat/step2-metadata-protocol-plugin
Jul 27, 2026
Merged

feat(metadata-protocol,objectql): MetadataProtocolPlugin + registerProtocol 退出开关 — ADR-0076 Step 2 PR-A (#2462)#3578
os-zhuang merged 1 commit into
mainfrom
feat/step2-metadata-protocol-plugin

Conversation

@os-zhuang

Copy link
Copy Markdown
Contributor

跨仓窗口开启(用户授权 cloud 可修改)——Step 2 三段式第一腿(纯加性)

按记忆中预写的 Step 2 配方执行:

  • createMetadataProtocolPlugin()(metadata-protocol 包)接管 ObjectQLPlugin 历史内联装配:ObjectStackProtocolImplementation 构造 + protocol 注册、元数据存储平台对象(同 environmentId===undefined 门)、D12 degraded analytics fallback。模式照抄 plugin-security(命名插件 + dependencies:['com.objectstack.engine.objectql'] + ctx.getService('objectql'))。装配冲突守卫把 kernel 的泛型重复抛错转为带修法的配置指引。
  • ObjectQLPluginregisterProtocol?: boolean(默认 true 零行为变化):false 跳过装配段;authored hook/action 重绑订阅抽为共享私有方法、delegated 模式下从 start() 惰性 arm(所有 init 已跑完,时序安全);DB hydration 本就经 getService('protocol')+类型守卫消费——零改动。
  • 组合测试放 objectql 侧(metadata-protocol 不得依赖 objectql 连 devDep 也不行——turbo 判环,PR#2415 教训):面等价 / protocol-free boot / 冲突守卫 / 默认模式回归。

后续两腿

  • PR-B(cloud):3 处 boot 站点(objectos-runtime×2 + control-plane-preset)装 MetadataProtocolPlugin + registerProtocol:false
  • PR-C(framework):删内联装配 + objectql 的 protocol re-exports + dependency(breaking,launch-window minor)。

验证

objectql 1086 / metadata-protocol 70 / runtime 653 / dogfood 351 / 全仓 build 全绿。

关联 #2462(Step 2 PR-A)。

🤖 Generated with Claude Code

…otocol opt-out — ADR-0076 Step 2 PR-A (#2462)

Cross-repo window opened. Additive first leg of the three-leg sequence:

- metadata-protocol grows createMetadataProtocolPlugin() owning the
  historical inline assembly: ObjectStackProtocolImplementation +
  'protocol' registration, the metadata-storage platform objects
  (same environmentId===undefined gate), and the D12 degraded
  analytics fallback. Assembly-conflict guard turns the kernel's
  generic duplicate throw into the actionable fix.
- ObjectQLPlugin grows registerProtocol?: boolean (default true, zero
  behavior change). false skips the assembly block; the authored
  hook/action mutation rebind is extracted to a shared private method
  and arms lazily from start() against whatever registered 'protocol'.
  DB hydration already consumed getService('protocol') + a type guard
  — untouched.
- Combo tests live in objectql (metadata-protocol must not depend on
  objectql even as devDep — turbo flags the cycle, the PR#2415
  lesson): surface parity, protocol-free boot, conflict guard,
  default-mode back-compat.

PR-B flips cloud's 3 boot sites; PR-C retires the built-in assembly +
objectql's protocol re-exports + the dependency.

Verified: objectql 1086, metadata-protocol 70, runtime 653, dogfood
351, full build green.

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.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
objectstack Ignored Ignored Jul 27, 2026 7:49am

Request Review

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

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 2 package(s): @objectstack/metadata-protocol, @objectstack/objectql.

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

  • content/docs/concepts/metadata-lifecycle.mdx (via @objectstack/metadata-protocol, @objectstack/objectql)
  • content/docs/data-modeling/formulas.mdx (via packages/objectql)
  • content/docs/deployment/migration-from-objectql.mdx (via @objectstack/objectql)
  • content/docs/deployment/vercel.mdx (via @objectstack/objectql)
  • content/docs/kernel/services-checklist.mdx (via @objectstack/objectql)
  • content/docs/kernel/services.mdx (via @objectstack/objectql)
  • content/docs/permissions/authentication.mdx (via @objectstack/objectql)
  • content/docs/plugins/index.mdx (via @objectstack/objectql)
  • content/docs/plugins/packages.mdx (via @objectstack/objectql)
  • content/docs/protocol/kernel/index.mdx (via @objectstack/objectql)
  • content/docs/protocol/objectql/state-machine.mdx (via @objectstack/objectql)
  • content/docs/releases/implementation-status.mdx (via @objectstack/objectql)
  • content/docs/releases/v9.mdx (via @objectstack/objectql)

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 20cb232 into main Jul 27, 2026
16 checks passed
@os-zhuang
os-zhuang deleted the feat/step2-metadata-protocol-plugin branch July 27, 2026 07:58
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/m tests tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant