fix(objectql): arm the late-manifest metadata bridge on project kernels too#3436
Merged
Conversation
…ls too The per-manifest bridge added for marketplace installs (#3428) armed itself inside the same `environmentId === undefined` gate as the one-shot startup bridge - but `os dev` boots the kernel project-scoped (environmentId 'env_local'), which is marketplace install-local's primary home, so the fix was inert exactly where it matters. Caught by browser-dogfooding the install flow: the install succeeded, yet the process never logged a bridge pass and the flag could never arm. The gate is correct for the one-shot bridge (it copies the ENTIRE process-wide SchemaRegistry, which would leak sibling-project objects on multi-environment servers) but does not apply to the per-manifest bridge: it only copies the objects of the one package this kernel just registered - nothing to leak. Arming now happens unconditionally at the end of start(); boot-time behavior on every kernel shape is unchanged (the flag still flips only after the startup path has run) and the one-shot bridge keeps its gate. Regression test: a project-scoped kernel (environmentId 'env_local' - the exact `os dev` shape) now asserts a post-bootstrap manifest.register lands its objects in the metadata service; red before this change. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
📓 Docs Drift CheckThis PR changes 1 package(s): 13 hand-written doc(s) reference the affected code and may need an implementation-accuracy re-verification:
|
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.
问题(#3428 的 dogfood 后续)
浏览器 dogfood #3428 的安装链路时发现:
os dev以项目级 kernel 启动(environmentId: 'env_local'),而 per-manifest bridge 的旗标 arming 沿用了一次性 bridge 的environmentId === undefined门控——于是修复在 marketplace install-local 的最主流宿主(os dev)下完全不生效:一次性 bridge 不跑、旗标永不翻、装包对象照旧进不了 metadata 服务。#3428 的集成测试全部用裸 kernel(无 environmentId),没暴露这一点。修复
翻旗标移出
environmentId === undefined块,改为start()末尾无条件执行(packages/objectql/src/plugin.ts):测试
新增回归测试:
environmentId: 'env_local'(精确复刻os dev形态)的 kernel,bootstrap 后经 manifest 服务装包 →metadata.getObject('crm_contact')有定义。已证红(修正前该测试失败:getObject undefined)。@objectstack/objectql72 文件 / 1041 测试全绿。os dev默认日志级 warn 会吞 bridge 的 info 行,勿以日志静默判 bridge 失效。🤖 Generated with Claude Code