Repository navigation
test(dsh-host): derive fixture profile versions from what is installed - #79
Merged
Merged
Conversation
`resolveExternalProfile` rejects a profile whose manifest declares a version
that differs from the one actually resolved, so the fixture's hardcoded
`"@deepseek-ai/cordis": "4.0.1"` was a tripwire: the next bump of cordis,
dsh-llm or schemastery turns all 44 dsh-host tests into
Error [DshHostStartError]: The external provider profile is invalid.
which names neither the package nor the version, and reads like a regression in
the dependency rather than staleness in the fixture. #54 already had to bump
these strings by hand for dsh-llm rc.6 -> rc.8; #71 (cordis 4.0.1 -> 4.0.2)
tripped it again.
Derive the versions from the same resolution `packageRoot` already uses, so the
manifest always agrees with the packages the fixture symlinks in.
No production code changes. Verified both ways: 44/44 on main (cordis 4.0.1)
and 44/44 with #71's bumps applied (cordis 4.0.2, schemastery 3.18.2), with no
pins.
stuffbucket
added a commit
that referenced
this pull request
Sep 7, 2026
…alled (#81) ## What The same defect #79 fixed in the dsh-host fixture, at a second site. `packages/maximal/tests/provider-profile-integration.test.ts` hardcodes the versions it writes into the fixture profile's manifest: ```js peerDependencies: { "@deepseek-ai/cordis": "4.0.1", "@deepseek-ai/dsh-llm": "0.1.0-rc.8" }, dependencies: { "@deepseek-ai/cordis": "4.0.1", "@deepseek-ai/dsh-attachment": "0.1.0-rc.6", ... } ``` while symlinking the *actually resolved* packages beside it. `resolveExternalProfile` requires the two to agree. ## Why it wasn't already broken Four of these literals were **already stale on main** — `dsh-brand` and `dsh-timeout` went to rc.8 in #65 and #66 — without failing anything, because only packages referenced by `providers.json` get version-checked. `cordis` is referenced via `runtime.cordis`, so #80's 4.0.1 → 4.0.2 trips it. As in #79, the failure surfaces as the generic ``` The external provider profile is invalid. ``` naming neither the package nor the version. ## The fix Derive all ten from the same `require.resolve` that `packageRoot` already uses — including the four that are merely declared rather than referenced, so a later widening of the check can't resurrect this. No production code changes. ## Verification Run in the disposable container (`node scripts/docker-test.mjs`) with #80's bumps applied: - `external oMLX profile integration > loads through composition and preserves user configuration` — **passes** (was the sole failure on #80) - full run green: 15/15 tasks, `@stuffbucket/maximal` 92 pass / 0 fail, `maximal-core` 1859 pass / 0 fail, `maximal-electron` 1147 passed, `maximal-client` 70 passed - `verify:workspace` 13 assertions over 2764 things, 0 failed; lockfile supply-chain policies pass over 1715 entries - ESLint clean Unblocks #80.
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.
What
The dsh-host test fixture hardcodes the versions it writes into the fixture profile's
package.json:but it symlinks the actually installed packages next to it.
resolveExternalProfilerequires the two to agree (profile.ts:766), so any bump of cordis, dsh-llm or schemastery breaks every test in the package.Why it matters
The failure surfaces as the generic
which names neither the package nor the version — it reads like a regression in the bumped dependency. This is exactly what happened on #71 (cordis 4.0.1 → 4.0.2), and #54 had already had to hand-bump these strings once for dsh-llm rc.6 → rc.8.
The fix
Derive the versions from the same
require.resolvethatpackageRootalready uses, so the manifest can never disagree with what is linked.No production code changes —
tests/fixture.tsonly.Verification
pnpm run lintandpnpm run typecheckclean across the workspace