Merge remote-tracking branch 'origin/master' into worktree/ci-native-windows-20260808

This commit is contained in:
Tianyi Cui
2026-08-09 15:00:56 +08:00
161 changed files with 1569 additions and 1049 deletions

View File

@@ -161,6 +161,33 @@ describe('loadProfile', () => {
.toEqual([...PROFILE_TEMPLATES.web ?? []])
})
it('normalizes only the exact installation-owned headless bundle tuple', () => {
const anchor = stageInstallation({
'@deepseek-ai/dsh-base': { patch: '[]\n' },
'@deepseek-ai/dsh-web-app': { patch: '[]\n' },
'@deepseek-ai/dsh-headless': { patch: '[]\n' },
'custom-bundle': { patch: '[]\n' },
})
const home = tmp()
const stock = resolveProfileDir('headless', home)
initProfile(stock, [
'@deepseek-ai/dsh-base', '@deepseek-ai/dsh-web-app', '@deepseek-ai/dsh-headless',
])
loadProfile('t', 'headless', anchor, home)
expect(readProfileManifest('t', stock).dsh?.profile?.bundles)
.toEqual(['@deepseek-ai/dsh-base', '@deepseek-ai/dsh-headless'])
const customHome = tmp()
const custom = resolveProfileDir('headless', customHome)
initProfile(custom, [
'@deepseek-ai/dsh-base', '@deepseek-ai/dsh-web-app', '@deepseek-ai/dsh-headless', 'custom-bundle',
])
loadProfile('t', 'headless', anchor, customHome)
expect(readProfileManifest('t', custom).dsh?.profile?.bundles).toEqual([
'@deepseek-ai/dsh-base', '@deepseek-ai/dsh-web-app', '@deepseek-ai/dsh-headless', 'custom-bundle',
])
})
it('fails loud when a listed bundle declares no dsh.bundle', () => {
const anchor = stageInstallation({ 'not-a-bundle': {} })
const home = tmp()