Skip to content

test(dsh-host): derive fixture profile versions from what is installed - #79

Merged
stuffbucket merged 1 commit into
mainfrom
fix/dsh-host-fixture-derive-versions
Sep 7, 2026
Merged

stuffbucket merged 1 commit into
mainfrom
fix/dsh-host-fixture-derive-versions

Conversation

@stuffbucket

Copy link
Copy Markdown
Owner

What

The dsh-host test fixture hardcodes the versions it writes into the fixture profile's package.json:

dependencies: {
  "@deepseek-ai/cordis": "4.0.1",
  "@deepseek-ai/dsh-llm": "0.1.0-rc.8",
  ...
}

but it symlinks the actually installed packages next to it. resolveExternalProfile requires 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

Error [DshHostStartError]: The external provider profile is invalid.

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.resolve that packageRoot already uses, so the manifest can never disagree with what is linked.

No production code changes — tests/fixture.ts only.

Verification

`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
stuffbucket merged commit c2ce9a5 into main Sep 7, 2026
6 checks passed
@stuffbucket
stuffbucket deleted the fix/dsh-host-fixture-derive-versions branch September 7, 2026 09:24
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant