From a09f3e1e71704ec58659ef9778a4b4656d0331f9 Mon Sep 17 00:00:00 2001 From: Jiaxiaoyuan Date: Mon, 9 Nov 2026 22:15:55 +0800 Subject: [PATCH 1/3] ci: scope public repository checks to WebUI --- .github/workflows/webui-ci.yml | 75 ++++++++++++++++++++++++++++++++++ docs/webui-ci.md | 41 +++++++++++++++++++ release/public-source.json | 2 + test/source-sync.test.mjs | 23 +++++++++++ 4 files changed, 141 insertions(+) create mode 100644 .github/workflows/webui-ci.yml create mode 100644 docs/webui-ci.md diff --git a/.github/workflows/webui-ci.yml b/.github/workflows/webui-ci.yml new file mode 100644 index 000000000..a647d3d36 --- /dev/null +++ b/.github/workflows/webui-ci.yml @@ -0,0 +1,75 @@ +name: WebUI CI + +on: + push: + branches: [main] + pull_request: + workflow_dispatch: + +permissions: + contents: read + +concurrency: + group: webui-ci-${{ github.ref }} + cancel-in-progress: true + +jobs: + webui: + name: WebUI (${{ matrix.os }}) + runs-on: ${{ matrix.os }} + timeout-minutes: 40 + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, macos-latest] + env: + MCODE_WEBUI_VERIFY_DIR: ${{ runner.temp }}/webui-package-checks + WEBUI_BROWSER_OUTPUT_DIR: ${{ runner.temp }}/webui-browser-results + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 + with: + persist-credentials: false + - uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0 + with: + version: 9.12.0 + - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 + with: + node-version: "24" + cache: pnpm + - run: pnpm install --frozen-lockfile + - name: Check WebUI types + run: pnpm typecheck:webui + - name: Check WebUI dependency boundaries + run: pnpm check:webui-dependency + - name: Check WebUI presentation rules + run: pnpm check:webui-presentation + - name: Check WebUI motion rules + run: pnpm check:webui-motion + - name: Check WebUI overlays + run: pnpm check:webui-overlays + - name: Check WebUI feedback + run: pnpm check:webui-feedback + - name: Build WebUI + run: pnpm build:webui + - name: Check WebUI build boundaries + run: pnpm check:webui-boundary + - name: Install Chromium + run: pnpm install:webui-browsers + - name: Install Chromium system dependencies + if: runner.os == 'Linux' + run: pnpm exec playwright install-deps chromium + - name: Test WebUI units and integrations + run: pnpm test:webui + - name: Test WebUI browser interactions + if: runner.os == 'Linux' + run: pnpm test:webui-browser + - name: Verify WebUI package installation + run: pnpm test:webui-package + - name: Upload WebUI browser diagnostics + if: ${{ failure() && runner.os == 'Linux' }} + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7 + with: + name: webui-browser-${{ matrix.os }}-${{ github.run_attempt }} + path: ${{ runner.temp }}/webui-browser-results/ + retention-days: 7 + if-no-files-found: ignore diff --git a/docs/webui-ci.md b/docs/webui-ci.md new file mode 100644 index 000000000..6add4eeb2 --- /dev/null +++ b/docs/webui-ci.md @@ -0,0 +1,41 @@ +# WebUI-only GitHub CI + +The public `mcode-webui/minimax-code` repository uses +`.github/workflows/webui-ci.yml` for pull requests, pushes to `main`, and manual +runs. It executes existing WebUI commands directly. It does not invoke the +repository-wide `pnpm verify` pipeline or publish packages. + +| Coverage | Linux / Node 24 | macOS / Node 24 | +| --- | --- | --- | +| WebUI server, client and test types | Yes | Yes | +| Dependency, presentation, motion, overlay and feedback rules | Yes | Yes | +| WebUI build and bundle boundaries | Yes | Yes | +| WebUI unit and integration tests | Yes | Yes | +| Playwright browser scenarios | Yes | No | +| npm package build, installation and launcher verification | Yes | Yes | + +Package verification uses an isolated installation and does not publish to npm. +Browser failure diagnostics are retained as Actions artifacts for seven days. + +## Repository settings + +The following inherited workflows are disabled in the public repository's Actions +settings: Source verification, CLI release, Node compatibility, Performance, +Release audit, Source candidate, Label issue product, Sync GitHub issues to +Feishu, and WebUI npm preview. Their files remain in Git for recovery and for +the existing local workflow-contract tests. In particular, npm publishing is +disabled, including manual runs of the preview workflow. + +GitHub workflow disablement is repository configuration, not a YAML change. +Copying the repository to another GitHub repository does not copy that setting; +configure the active workflows there before pushing or publishing tags. +Dependabot can still create dependency-update PRs; those PRs run WebUI CI. + +The local `pnpm verify`, its profiles, all existing gate scripts and package +commands are unchanged. Run them locally when broader runtime, CLI, release or +security validation is needed. A green WebUI CI run does not establish those +broader checks. The previously reported repository-history scan findings are +outside this CI scope and have not been remediated by disabling Release audit. + +Automatic CI does not impose merge protection. Required checks and branch rules +remain a separate repository setting. diff --git a/release/public-source.json b/release/public-source.json index cddaad6f7..13097c1a5 100644 --- a/release/public-source.json +++ b/release/public-source.json @@ -48,6 +48,7 @@ ".github/workflows/security.yml", ".github/workflows/source-candidate.yml", ".github/workflows/sync-issue-to-feishu.yml", + ".github/workflows/webui-ci.yml", ".github/workflows/webui-npm-preview.yml", ".gitignore", ".gitleaks.toml", @@ -167,6 +168,7 @@ "docs/telemetry.md", "docs/tui-capabilities.md", "docs/verification.md", + "docs/webui-ci.md", "examples/clamp/README.md", "examples/clamp/clamp.mjs", "examples/clamp/clamp.test.mjs", diff --git a/test/source-sync.test.mjs b/test/source-sync.test.mjs index 2e6a40799..7d72deddd 100644 --- a/test/source-sync.test.mjs +++ b/test/source-sync.test.mjs @@ -26,6 +26,29 @@ import { extensionIdFromPublicKey, parseExtensionIdList, readStoreExtensionIds } import { validateExceptionLedger, sourceFingerprint } from '../scripts/lib/webui-dependency-rules.mjs'; import { acceptanceRecordFiles, restoreAcceptanceRecords } from '../scripts/lib/acceptance-records.mjs'; +test('public WebUI CI runs only WebUI checks and cannot publish packages', () => { + const workflow = parseYaml(readFileSync(new URL('../.github/workflows/webui-ci.yml', import.meta.url), 'utf8')); + assert.deepEqual(workflow.on.push.branches, ['main']); + assert.ok(Object.hasOwn(workflow.on, 'pull_request')); + assert.ok(Object.hasOwn(workflow.on, 'workflow_dispatch')); + assert.deepEqual(workflow.permissions, { contents: 'read' }); + assert.deepEqual(Object.keys(workflow.jobs), ['webui']); + const manifest = JSON.parse(readFileSync(new URL('../package.json', import.meta.url), 'utf8')); + const job = workflow.jobs.webui; + assert.deepEqual(job.strategy.matrix.os, ['ubuntu-latest', 'macos-latest']); + const commands = job.steps.filter(step => step.run).map(step => step.run); + for (const command of commands) { + if (command === 'pnpm install --frozen-lockfile' || command === 'pnpm exec playwright install-deps chromium') continue; + assert.match(command, /^pnpm (?:typecheck|check|build|install|test):webui(?:-[a-z]+)?$/); + assert.ok(Object.hasOwn(manifest.scripts, command.slice('pnpm '.length)), command); + } + for (const command of ['pnpm typecheck:webui', 'pnpm build:webui', 'pnpm test:webui', 'pnpm test:webui-browser', 'pnpm test:webui-package']) { + assert.ok(commands.includes(command), `Missing ${command}`); + } + assert.ok(commands.indexOf('pnpm build:webui') < commands.indexOf('pnpm test:webui-browser')); + assert.equal(job.steps.find(step => step.run === 'pnpm test:webui-browser').if, "runner.os == 'Linux'"); +}); + test('coverage review distinguishes declared browser scenarios from executed evidence', () => { const output = execFileSync(process.execPath, ['scripts/coverage-review.mjs', '--check'], { encoding: 'utf8' }); const evidence = JSON.parse(readFileSync(new URL('../scripts/lib/webui-browser-coverage-evidence.json', import.meta.url), 'utf8')); From b85ea0a3bf1d178b3d153fca9280b7aed8f4609a Mon Sep 17 00:00:00 2001 From: Jiaxiaoyuan Date: Mon, 9 Nov 2026 22:18:54 +0800 Subject: [PATCH 2/3] ci: initialize runner output paths inside a step --- .github/workflows/webui-ci.yml | 8 +++++--- test/source-sync.test.mjs | 7 ++++++- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.github/workflows/webui-ci.yml b/.github/workflows/webui-ci.yml index a647d3d36..ae1b175b1 100644 --- a/.github/workflows/webui-ci.yml +++ b/.github/workflows/webui-ci.yml @@ -22,13 +22,15 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, macos-latest] - env: - MCODE_WEBUI_VERIFY_DIR: ${{ runner.temp }}/webui-package-checks - WEBUI_BROWSER_OUTPUT_DIR: ${{ runner.temp }}/webui-browser-results steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 with: persist-credentials: false + - name: Set isolated WebUI output directories + shell: bash + run: | + echo "MCODE_WEBUI_VERIFY_DIR=$RUNNER_TEMP/webui-package-checks" >> "$GITHUB_ENV" + echo "WEBUI_BROWSER_OUTPUT_DIR=$RUNNER_TEMP/webui-browser-results" >> "$GITHUB_ENV" - uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0 with: version: 9.12.0 diff --git a/test/source-sync.test.mjs b/test/source-sync.test.mjs index 7d72deddd..8e4c96719 100644 --- a/test/source-sync.test.mjs +++ b/test/source-sync.test.mjs @@ -35,8 +35,13 @@ test('public WebUI CI runs only WebUI checks and cannot publish packages', () => assert.deepEqual(Object.keys(workflow.jobs), ['webui']); const manifest = JSON.parse(readFileSync(new URL('../package.json', import.meta.url), 'utf8')); const job = workflow.jobs.webui; + assert.equal(job.env, undefined); assert.deepEqual(job.strategy.matrix.os, ['ubuntu-latest', 'macos-latest']); - const commands = job.steps.filter(step => step.run).map(step => step.run); + const directories = job.steps.find(step => step.name === 'Set isolated WebUI output directories'); + assert.equal(directories.shell, 'bash'); + assert.match(directories.run, /MCODE_WEBUI_VERIFY_DIR=\$RUNNER_TEMP\//); + assert.match(directories.run, /WEBUI_BROWSER_OUTPUT_DIR=\$RUNNER_TEMP\//); + const commands = job.steps.filter(step => step.run && step !== directories).map(step => step.run); for (const command of commands) { if (command === 'pnpm install --frozen-lockfile' || command === 'pnpm exec playwright install-deps chromium') continue; assert.match(command, /^pnpm (?:typecheck|check|build|install|test):webui(?:-[a-z]+)?$/); From 46590c2c7f307c98582461c1796d0ae0de61c2da Mon Sep 17 00:00:00 2001 From: Jiaxiaoyuan Date: Mon, 9 Nov 2026 22:20:15 +0800 Subject: [PATCH 3/3] ci: run complete WebUI suites on Linux macOS and Windows --- .github/workflows/webui-ci.yml | 5 ++--- docs/webui-ci.md | 20 ++++++++++++-------- test/source-sync.test.mjs | 6 ++++-- 3 files changed, 18 insertions(+), 13 deletions(-) diff --git a/.github/workflows/webui-ci.yml b/.github/workflows/webui-ci.yml index ae1b175b1..b4c0dcc89 100644 --- a/.github/workflows/webui-ci.yml +++ b/.github/workflows/webui-ci.yml @@ -21,7 +21,7 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest, macos-latest] + os: [ubuntu-latest, macos-latest, windows-latest] steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 with: @@ -63,12 +63,11 @@ jobs: - name: Test WebUI units and integrations run: pnpm test:webui - name: Test WebUI browser interactions - if: runner.os == 'Linux' run: pnpm test:webui-browser - name: Verify WebUI package installation run: pnpm test:webui-package - name: Upload WebUI browser diagnostics - if: ${{ failure() && runner.os == 'Linux' }} + if: ${{ failure() }} uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7 with: name: webui-browser-${{ matrix.os }}-${{ github.run_attempt }} diff --git a/docs/webui-ci.md b/docs/webui-ci.md index 6add4eeb2..de7005d6b 100644 --- a/docs/webui-ci.md +++ b/docs/webui-ci.md @@ -5,17 +5,21 @@ The public `mcode-webui/minimax-code` repository uses runs. It executes existing WebUI commands directly. It does not invoke the repository-wide `pnpm verify` pipeline or publish packages. -| Coverage | Linux / Node 24 | macOS / Node 24 | -| --- | --- | --- | -| WebUI server, client and test types | Yes | Yes | -| Dependency, presentation, motion, overlay and feedback rules | Yes | Yes | -| WebUI build and bundle boundaries | Yes | Yes | -| WebUI unit and integration tests | Yes | Yes | -| Playwright browser scenarios | Yes | No | -| npm package build, installation and launcher verification | Yes | Yes | +| Coverage | Linux / Node 24 | macOS / Node 24 | Windows / Node 24 | +| --- | --- | --- | --- | +| WebUI server, client and test types | Yes | Yes | Yes | +| Dependency, presentation, motion, overlay and feedback rules | Yes | Yes | Yes | +| WebUI build and bundle boundaries | Yes | Yes | Yes | +| WebUI unit and integration tests | Yes | Yes | Yes | +| Playwright browser scenarios | Yes | Yes | Yes | +| npm package build, installation and launcher verification | Yes | Yes | Yes | Package verification uses an isolated installation and does not publish to npm. Browser failure diagnostics are retained as Actions artifacts for seven days. +Only installation of Linux system dependencies is platform-gated. CI does not +skip the browser or package suites on macOS or Windows. This coverage declaration +does not establish a passing run; platform and visual-baseline failures remain +visible and require diagnosis rather than relaxed assertions. ## Repository settings diff --git a/test/source-sync.test.mjs b/test/source-sync.test.mjs index 8e4c96719..3653ad181 100644 --- a/test/source-sync.test.mjs +++ b/test/source-sync.test.mjs @@ -36,7 +36,7 @@ test('public WebUI CI runs only WebUI checks and cannot publish packages', () => const manifest = JSON.parse(readFileSync(new URL('../package.json', import.meta.url), 'utf8')); const job = workflow.jobs.webui; assert.equal(job.env, undefined); - assert.deepEqual(job.strategy.matrix.os, ['ubuntu-latest', 'macos-latest']); + assert.deepEqual(job.strategy.matrix.os, ['ubuntu-latest', 'macos-latest', 'windows-latest']); const directories = job.steps.find(step => step.name === 'Set isolated WebUI output directories'); assert.equal(directories.shell, 'bash'); assert.match(directories.run, /MCODE_WEBUI_VERIFY_DIR=\$RUNNER_TEMP\//); @@ -51,7 +51,9 @@ test('public WebUI CI runs only WebUI checks and cannot publish packages', () => assert.ok(commands.includes(command), `Missing ${command}`); } assert.ok(commands.indexOf('pnpm build:webui') < commands.indexOf('pnpm test:webui-browser')); - assert.equal(job.steps.find(step => step.run === 'pnpm test:webui-browser').if, "runner.os == 'Linux'"); + for (const command of ['pnpm test:webui', 'pnpm test:webui-browser', 'pnpm test:webui-package']) { + assert.equal(job.steps.find(step => step.run === command).if, undefined, `${command} must run on every platform`); + } }); test('coverage review distinguishes declared browser scenarios from executed evidence', () => {