Repository navigation
Replies: 1 comment
|
Your diagnosis of the dual module instantiation in Node's ESM module cache due to Windows path casing mismatch is spot-on. 1. Immediate Workarounds (Before Upstream Patch)
2. Recommended Permanent Upstream FixThere are two complementary fixes that should be made upstream: A. Global Symbol Singleton for
|
Uh oh!
There was an error while loading. Please reload this page.
Summary
On the Windows Desktop build, every configuration save that goes through
configEditor.edit()— e.g. Settings → Models → provider card → Save — fails withand nothing is written to
cordis.patch.yml. It is deterministic (survives a full restart) and unrelated to the edited YAML.Environment
@deepseek-ai/dsh/@deepseek-ai/dsh-app-boot0.2.2-rc.3 (packagedapp.asarruntime)desktopwith the stock bundles plus a few marketplace plugins; the failing path does not involve any third-party code:Root cause
The diagnostic comes from
packages/boot/app-boot/src/index.ts:bootstrapIncludesis a module-levelWeakMapwritten only bymountRootInclude(). It is empty in the second evaluation ofdsh-app-boot, so everyreconcileProfilePatches()/recomposeProfile()call made fromdsh-config-editorordsh-hmrrejects.The duplicate evaluation is caused by path casing:
D:\DeepSeekHarness\....profile-resolution/resolver.tscanonicalizes package directories throughrealpathSync(canonicalPath()/prefixes()), yielding the on-disk spellingD:\deepseekHarness\....The first instance executed
mountRootInclude()and remembers the rootcordis:includeentry; the second one — used by the entry tree's plugins, includingdsh-config-editoranddsh-hmr— has an empty map. Hence the error on every save.Minimal reproduction (verified on 0.2.2-rc.3)
A scripted boot outside Desktop reproduces it without any marketplace plugin:
cordis.ymlhas one relative plugin that doesimport { recomposeProfile } from '@deepseek-ai/dsh-app-boot'and stores it onglobalThis.boot()that profile withPluginPackagesmounted usingcreateRuntimeResolution({ installAnchor }), whereinstallAnchorisD:\DeepSeekHarness\...\@deepseek-ai\dsh\package.json(the launch spelling).With the anchor spelled exactly as on disk (
D:\deepseekHarness\...), both URLs are identical andSAME instance: true; saving from the Models page then succeeds.Impact
Every UI path that applies profile configuration fails: Models settings (provider / API key / model-catalog edits), plugin configuration forms, and HMR profile reconciliation. The diagnostic names neither the path nor the duplicate module, so it reads like a validation error to users.
Workaround (verified)
Launch the app through a path whose casing matches the on-disk folder name — recreate the Windows shortcut with target
D:\deepseekHarness\DeepSeek Harness.exeinstead ofD:\DeepSeekHarness\DeepSeek Harness.exe(editing the old.lnkin place is not enough; the stored link table keeps the original casing, so create a new shortcut). Configuration saves work again.Suggested fix
Make both sides agree on one spelling, or make the duplicate harmless:
realpathform).realpathSyncoutput).Contextthrough a registry that survives duplicate module evaluation (e.g.Symbol.for-branded state), so a duplicateddsh-app-bootcannot silently disable every profile reload.Happy to provide the full reproduction script and the exact version/paths of the affected install.
All reactions