chore(compat): support the dsh 0.2.1 line

The plugin declared two supported dsh releases while the line it actually
runs on — 0.2.1 — was outside the matrix, so the seams the plugin rides were
never probed against it.

The 0.2.1 line continues the V4 Config-form generation with every seam spelled
as at 0.2.0-rc.2, so the baseline entry is the same with the two facts that
differ: the line vendors cordis 4.0.5, and it adds the `web-deepseek-api`
entry the balance fold falls back to. The compat matrix now runs the plugin
against that tag's real sources like any other line, and the workflows fetch
it.

The driver's staging follows the line: the values package grew a sibling
module its entry re-exports by relative path, so the entry is staged under its
own name and the sibling rides along.
This commit is contained in:
bowenliang123 committed 2026-10-20 06:01:36 +08:00
1 parent 00d8afa224
commit 16ecd2af38
6 files changed
+38 -12

No files matched your search

+2 -1
View File
@@ -54,7 +54,8 @@ jobs:
git remote add origin https://github.com/deepseek-ai/deepseek-harness.git
git fetch --depth 1 -q origin \
refs/tags/dsh-v0.1.7-rc.2:refs/tags/dsh-v0.1.7-rc.2 \
refs/tags/dsh-v0.2.0-rc.2:refs/tags/dsh-v0.2.0-rc.2
refs/tags/dsh-v0.2.0-rc.2:refs/tags/dsh-v0.2.0-rc.2 \
refs/tags/dsh-v0.2.1-rc.2:refs/tags/dsh-v0.2.1-rc.2
# `pnpm test` is the vitest run only: all three projects (host and client
# against src, compat against the BUILT plugin at each baseline tag) plus
+2 -1
View File
@@ -62,7 +62,8 @@ jobs:
git remote add origin https://github.com/deepseek-ai/deepseek-harness.git
git fetch --depth 1 -q origin \
refs/tags/dsh-v0.1.7-rc.2:refs/tags/dsh-v0.1.7-rc.2 \
refs/tags/dsh-v0.2.0-rc.2:refs/tags/dsh-v0.2.0-rc.2
refs/tags/dsh-v0.2.0-rc.2:refs/tags/dsh-v0.2.0-rc.2 \
refs/tags/dsh-v0.2.1-rc.2:refs/tags/dsh-v0.2.1-rc.2
- name: Test
run: DSH_REPO="$PWD/.tmp/dsh-repo" pnpm test
+2 -2
View File
@@ -6,13 +6,13 @@ The rules dsh-context must hold on every supported `@deepseek-ai/dsh` release, a
**Law.** Record only what no other artifact carries; delete what code, tests, or git history already say. Verify against the dsh sources before acting — source wins over this page. Less is ALWAYS better.
Last verified: **2026-10-14** (dsh-context `0.70.0`, dsh `0.2.0-rc.2` npm install and `0.2.1-alpha.3` tree).
Last verified: **2026-10-20** (dsh-context `0.73.3`, dsh `0.1.7-rc.2` / `0.2.0-rc.2` / `0.2.1-rc.2` tag trees).
## 1 · Supported set
*What the plugin declares it works on.*
1. **Support exactly `0.1.7-rc.2` and `0.2.0-rc.2`** — both the V4 durable-log generation. The floor is `0.1.7-rc.2` because it is the first `0.1.7`-line release with a complete npm dependency closure; anything older gets §2's fallback composition with an upgrade prompt, never a fold.
1. **Support exactly `0.1.7-rc.2`, `0.2.0-rc.2` and `0.2.1-rc.2`** — all the V4 durable-log generation. The floor is `0.1.7-rc.2` because it is the first `0.1.7`-line release with a complete npm dependency closure; anything older gets §2's fallback composition with an upgrade prompt, never a fold.
## 2 · Admission
+2 -1
View File
@@ -71,7 +71,8 @@
"compatibility": {
"dshReleases": {
"0.1.7-rc.2": "compatible",
"0.2.0-rc.2": "compatible"
"0.2.0-rc.2": "compatible",
"0.2.1-rc.2": "compatible"
}
}
},
+13 -5
View File
@@ -16,7 +16,7 @@
*/
/** The supported dsh tags, in lockstep with the BASELINES entries below. */
export type BaselineId = 'v0.1.7-rc.2' | 'v0.2.0-rc.2'
export type BaselineId = 'v0.1.7-rc.2' | 'v0.2.0-rc.2' | 'v0.2.1-rc.2'
/** The harness web half's client faces, as far as the compat probes consume them. */
export interface ClientSeam {
@@ -223,12 +223,12 @@ export interface Baseline {
}
/** One support-matrix entry. Every supported line is the V4 generation, so
* the seams are spelled once here; a future line that diverges on a needle outgrows the factory (inline its entry instead). */
function baseline(id: BaselineId, tag: string, session: string): Baseline {
* the seams are spelled once here; a line that diverges states its divergence here. */
function baseline(id: BaselineId, tag: string, session: string, line: { cordis?: string; stockIds?: readonly string[] } = {}): Baseline {
return {
id,
tag,
cordis: '4.0.4',
cordis: line.cordis ?? '4.0.4',
session,
foldEventTypes: [
'request/header', 'request/context', 'step/start', 'step/end',
@@ -319,7 +319,7 @@ function baseline(id: BaselineId, tag: string, session: string): Baseline {
},
stockIds: {
file: 'packages/bundle/base/cordis.patch.yml',
ids: ['llm-deepseek', 'web-search-deepseek'],
ids: line.stockIds ?? ['llm-deepseek', 'web-search-deepseek'],
},
providerFiles: [
{
@@ -384,4 +384,12 @@ export const BASELINES: readonly Baseline[] = [
// session-format tree carries no v4-to-v5 migration). Cordis stays 4.0.4,
// and the line continues to enforce the plugin dsh-peer gate this plugin's `>=0.1.7-rc.2` peers satisfy.
baseline('v0.2.0-rc.2', 'dsh-v0.2.0-rc.2', '0.2.0-rc.2'),
// The 0.2.1 line continues the V4 Config-form generation with every seam the
// plugin rides spelled as at `0.2.0-rc.2`. Two facts differ: the line
// vendors cordis 4.0.5, and it adds the `web-deepseek-api` entry the
// balance fold falls back to.
baseline('v0.2.1-rc.2', 'dsh-v0.2.1-rc.2', '0.2.1-rc.2', {
cordis: '4.0.5',
stockIds: ['llm-deepseek', 'web-search-deepseek', 'web-deepseek-api'],
}),
]
+17 -2
View File
@@ -57,6 +57,16 @@ export function stageFile(baseline: Baseline, tagPath: string, localName: string
return file
}
/** Stage one file only when the tag carries it: a line that does not ship the
* file stages nothing, and the sibling a staged module imports by relative
* path rides along. */
function stageFileIfPresent(baseline: Baseline, tagPath: string, localName: string): boolean {
const run = spawnSync('git', ['-C', DSH_REPO, 'cat-file', '-e', `${baseline.tag}:${tagPath}`], { encoding: 'utf8' })
if (run.status !== 0) return false
stageFile(baseline, tagPath, localName)
return true
}
/** The host packages the tag's staged sources import at runtime, at this line's own versions. */
function hostDepsOf(baseline: Baseline): Record<string, string> {
return {
@@ -108,7 +118,7 @@ function driverSource(pluginUrl: string, developerMessages: boolean): string {
return `
import { Context } from '@deepseek-ai/cordis'
import { SessionProjectionRegistry } from './registry/index.ts'
import { snapshotJsonValue } from './dsh/json-values.ts'
import { snapshotJsonValue } from './dsh/index.ts'
const plugin = await import(${JSON.stringify(pluginUrl)})
const ctx = new Context()
const registry = new SessionProjectionRegistry(ctx)
@@ -268,7 +278,12 @@ export function runDriver(baseline: Baseline): DriverReport {
ensureHostDeps(baseline)
stageFile(baseline, 'packages/session/session-projection/src/index.ts', join('registry', 'index.ts'))
stageFile(baseline, 'packages/session/session-projection/src/types.ts', join('registry', 'types.ts'))
stageFile(baseline, 'packages/util/values/src/index.ts', join('dsh', 'json-values.ts'))
// The values package under its own file name: its modules import each other
// by relative path, so renaming the entry would break the sibling links.
stageFile(baseline, 'packages/util/values/src/index.ts', join('dsh', 'index.ts'))
// The 0.2.1 line's values package grew a sibling module the staged entry
// re-exports by relative path, so it rides along where the tag ships it.
stageFileIfPresent(baseline, 'packages/util/values/src/partial-json.ts', join('dsh', 'partial-json.ts'))
const driver = join(STAGE, baseline.id, 'driver.mjs')
writeFileSync(driver, driverSource(`file://${join(REPO, 'lib', 'index.js')}`, baseline.foldEventTypes.includes('developer/message')))
const run = spawnSync(process.execPath, [driver], { cwd: STAGE, encoding: 'utf8', timeout: 60_000 })