Point-by-point audit of all 117 commits between alpha.2 and alpha.3: every host contract this plugin relies on (token auth, slash RPC, MarkdownText labels, the event-stream/persistence APIs behind sidechat.events, SettingsNamespaceInput, SUBAGENT_DESCRIPTOR_VERSION (still 3), dsh-client-store, the profile loader, the node-pty pin) is unchanged, so no plugin code needed rewiring. alpha.3's breaking changes (required BeginSubmissionInput.mode, the renamed attachment-invalid subagent error, the removed SQLite persistence backend, the identity-gated projection change feed) do not touch this plugin. What did need adapting was the dependency tree: the alpha.3 npm artifacts ship with workspace-era metadata that does not match their published code — - dsh-subagent@0.1.2-alpha.3 imports `admitPromptContent` from @deepseek-ai/dsh-attachment without declaring that dependency, so resolution floats to a stale 0.1.1-rc.1 copy that lacks the export (broke 5 test files at load time); - six transitive peers (dsh-scope, dsh-session-projection, dsh-system-prompt, dsh-user-approval, dsh-util-time, dsh-code-runtime) drifted to pre-alpha.3 versions against the ^0.1.2-alpha.3 ranges the alpha.3 packages declare; - the alpha.3 line peers on @deepseek-ai/cordis ^4.0.2 (was ^4.0.1). Fix: pin the seven stragglers via pnpm-workspace.yaml overrides (with a note to drop them once upstream fixes its metadata), narrow the cordis peer to ^4.0.2, and bump the baseline pins — CI mount gate, dsh.plugin.json engines, peer/devDependencies, README badges, plus SIDEBAR_SERVICE_VERSION in lockstep. Verified on the npm-published @deepseek-ai/dsh@0.1.2-alpha.3: typecheck clean, 107 test files / 1137 tests green, `pnpm peers check` reports zero unmet peers, and the real-host mount smoke passes 14/14.
117 lines
4.1 KiB
YAML
117 lines
4.1 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
workflow_dispatch:
|
|
|
|
# Cancel a superseded PR run (it is on a stale commit); never cancel a
|
|
# push run — it is already producing the post-merge signal. The mount job
|
|
# boots a real DSH + Chromium, so the savings matter there most.
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
|
|
jobs:
|
|
ci:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 20
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
with:
|
|
# Tests run git log against this repository and need the full history.
|
|
fetch-depth: 0
|
|
- uses: pnpm/action-setup@v6
|
|
with:
|
|
version: 11
|
|
- uses: actions/setup-node@v7
|
|
with:
|
|
node-version: 22
|
|
cache: pnpm
|
|
# The plugin's git revert/cherry-pick spawn git without setting an
|
|
# identity (deliberate, see tests/smoke.spec.ts) and rely on ambient
|
|
# config; the runner has none by default.
|
|
- name: Configure git identity for tests
|
|
run: |
|
|
git config --global user.name "dsh-better-sidebar-ci"
|
|
git config --global user.email "ci@dsh.invalid"
|
|
- name: Install dependencies
|
|
run: pnpm install --frozen-lockfile
|
|
- name: Typecheck
|
|
run: pnpm typecheck
|
|
- name: Test
|
|
run: pnpm test
|
|
- name: Build
|
|
run: pnpm build
|
|
# The consumer-facing declaration surface guard: a browser-only plugin
|
|
# (no @types/node, skipLibCheck: false) must type-check against the
|
|
# shipped lib/types. Runs AFTER build (it reads the built output).
|
|
- name: Check consumer type surface
|
|
run: pnpm check:consumer-types
|
|
|
|
# Pack the plugin as an npm tarball, mount it into a REAL DSH instance
|
|
# through the official `dsh plugin --profile web add` channel, and render
|
|
# the DSH web UI headlessly (Playwright Chromium) to prove the plugin
|
|
# mounts without crashing the shell. Drives `pnpm test:mount`, which boots
|
|
# a keyless `dsh web` against a scratch profile and sweeps every built-in
|
|
# sidebar tab. No API key needed — the whole lane is deterministic.
|
|
plugin-mount:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 30
|
|
# CI runs must never report to the production telemetry endpoint baked
|
|
# into the DSH composition (same guard DSH's own CI uses).
|
|
env:
|
|
DSH_TELEMETRY_DISABLED: '1'
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
|
|
- uses: pnpm/action-setup@v6
|
|
with:
|
|
version: 11
|
|
|
|
- uses: actions/setup-node@v7
|
|
with:
|
|
node-version: 22
|
|
cache: pnpm
|
|
|
|
- name: Install dependencies
|
|
run: pnpm install --frozen-lockfile
|
|
|
|
# Pin the DSH CLI the lane mounts into; the profile's bundle stack
|
|
# (dsh-base / dsh-web-app) resolves from this installation. Keep in
|
|
# step with the plugin's @deepseek-ai/* peer range when bumping.
|
|
# DSH 0.1.2-alpha.x is published under the `alpha` dist-tag; the lanes
|
|
# speak the slash-only RPC dialect (tests/e2e/host-protocol.ts).
|
|
- name: Install dsh CLI (pinned)
|
|
run: npm install -g @deepseek-ai/dsh@0.1.2-alpha.3
|
|
|
|
# lib/ is gitignored; the tarball is produced from this build.
|
|
- name: Build and pack the npm tarball
|
|
run: pnpm build && pnpm pack
|
|
|
|
- name: Install Playwright Chromium
|
|
run: pnpm exec playwright install --with-deps chromium
|
|
|
|
- name: Mount + headless-render smoke
|
|
run: pnpm test:mount
|
|
|
|
# Aggregate double-mount regression: a fixture aggregate bundle mounts
|
|
# dsh-better-sidebar under its own entry id BEFORE the plugin's bundle
|
|
# row; the plugin must back off (no duplicate /sidebar/api, boot OK).
|
|
# Uses the pinned DSH CLI installed above.
|
|
- name: Aggregate double-mount regression
|
|
env:
|
|
DSH_CMD: dsh
|
|
run: bash scripts/e2e-aggregate-mount.sh
|
|
|
|
- name: Upload Playwright report on failure
|
|
if: failure()
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: playwright-report
|
|
path: |
|
|
playwright-report/
|
|
test-results/
|
|
if-no-files-found: ignore
|