Replies: 4 comments
|
Confirmed on a source checkout of Environment and reproduction
git clone https://github.com/deepseek-ai/deepseek-harness.git
cd deepseek-harness
pnpm install
DEVELOPER_DIR=/Library/Developer/CommandLineTools pnpm run build
pnpm dsh webThe Additional diagnostic detailThe stack identifies the already-present service branch, rather than only a missing-service activation-order problem: if (ctx.get('webServer') === undefined) ctx.inject(['webServer'], registerWebCarrier)
else registerWebCarrier(ctx)
Verified workaroundA temporary Web-only overlay: - id: modules
inject: [webServer]Starting with that overlay succeeds: pnpm dsh web --patch /path/to/web.patch.yml --no-open --port 0Observed results: the process prints its local startup URL; fetching that URL with cookie handling returns HTTP 200, and the HTML contains both The overlay was tested without editing repository source. Keeping any required dependency specific to the Web composition also preserves the package's optional Web-server support for other carriers. |
|
This looks like it also explains a startup-time regression, so cross-linking: #6391 Boundary (added after the discussion in #6391): this edge is Web-composition-only and must not be lifted into the package — the desktop host has no |
|
Boundary correction to my earlier comment (raised by @argszero in #6391): this edge is Web-composition-only and must not be lifted into the package. The desktop host has no For the root fix the registry's initial scan should wait for activation to settle (e.g. the |
|
你的方向对了一半,但结论可以更省事 —— 我把两个都验了。 修复点其实在 const owner = this.ctx; // :541
handle: (channel, handler) => this.register(owner, channel, handler),
return owner.effect(() => owner.webServer.register(route), ...); // :618它读 顺带一个对你有用的机制细节:patch 不只能替换 for (const [key, value] of Object.entries(overrides)) {
if (key === "id") continue;
target[key] = value; // inject 也能这样打进去
}所以不需要改官方 bundle 源码,一行补丁就够: - id: connection
inject: [webRuntime, webServer]验证:修复前插件 已打包为组合包(并验证过 bundle 形态交付同样有效):dsh-connection-rpc-fix。 |
Uh oh!
There was an error while loading. Please reload this page.
Summary
The Web bundle should make the existing
modulesLoader row explicitly depend onwebServerduring activation.Today the official Web composition owns both rows, but
modulesis still declared without an activation dependency:Under parallel Loader activation, adding an extra client bundle can make the Node half of
@deepseek-ai/dsh-client-modulesactivate beforewebServeris available and hit the Cordis service-access race (webServer without inject). We reproduced this downstream indsh-vision-routeron the preview Host.Proposed upstream change
Keep ownership in the Web bundle and add only the activation edge that the Web composition already requires:
I would prefer this to remain Web-surface-specific rather than becoming a package-global/static dependency, because the dependency is about this bundle's activation order.
Why this is the correct seam
I traced the path end-to-end: Loader merges a row's
entry.options.injectinto the Cordis plugin fiber dependency map, and Cordis keeps that fiber pending until the required service is available. This is therefore a real activation dependency, not just client-graph metadata such asdsh.client.inject.The downstream workaround currently used by Vision Router is an id-targeted, non-insert overlay:
The
namehere is only a fail-closed identity assertion for the existing Host row. It is not intended to claim ownership of an@deepseek-ai/*component.That workaround should not become permanent: if the official row later gains another
injectdependency, a downstream field override could otherwise replace the new list. The long-term owner of this edge should therefore be the official Web bundle.Prepared implementation
I prepared and validated the minimal upstream patch on a fork:
The patch:
inject: [webServer]to the official Webmodulesrow;loadOverlayPatches()+composeEntries()path.Validation
Validated against upstream
master@b2e3b2a0125854567a4a5fcba75782e42fe84901/dsh 0.1.5-alpha.2:packages/bundle/web-app/tests: 22/22 passpnpm verify-cordis-config: 143 config files passpnpm exec tsc -b packages/bundle/web-app/tsconfig.json: passpnpm run typecheck: passOn the Vision Router side, the compatibility overlay is intentionally still present while affected DSH versions remain supported. A new lifecycle sentinel now classifies the Host state as
shim-required,retire-ready, ordangerous-drift; once an official DSH release ownsmodules -> webServer, downstream CI will explicitly require retiring the workaround instead of silently carrying it forever.Relevant downstream tracker: ysr666/dsh-vision-router#448
If this direction matches the intended Web bundle ownership model, the fork commit above is ready to cherry-pick or reimplement upstream.
All reactions