Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
File renamed without changes.
22 changes: 12 additions & 10 deletions docs/webui-ci.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,20 @@ skip the browser or package suites on macOS or Windows. This coverage declaratio
does not establish a passing run; platform and visual-baseline failures remain
visible and require diagnosis rather than relaxed assertions.

## Repository settings
## Active and archived workflows

The following inherited workflows are disabled in the public repository's Actions
settings: Source verification, CLI release, Node compatibility, Performance,
Only `webui-ci.yml` remains in `.github/workflows/`. The following inherited
workflows are archived under `.github/legacy-workflows/`: 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.
Feishu, and WebUI npm preview. GitHub does not discover workflows in that
directory. Their content is preserved for recovery and the existing local
workflow-contract tests. npm publishing has no active workflow entry point.

The legacy workflows also remain disabled in repository settings, but the
source archive is what makes this scope portable to a new checkout or repository.
Restoring a legacy YAML file to `.github/workflows/` would restore its triggers;
the workflow-contract test rejects additional active YAML files.
Dependabot can still create dependency-update PRs; those PRs run WebUI CI.

The local `pnpm verify`, its profiles, all existing gate scripts and package
Expand Down
18 changes: 12 additions & 6 deletions packages/webui/docs/releasing.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
# WebUI package on the npm registry

The WebUI is packaged as `@minimax-webui/minimax-code` and published to
`https://registry.npmjs.org` under the `preview` dist-tag. Publishing is fully
automatic: every push to the `webui` branch builds the standalone package and
publishes a new preview version. No tag, no version edit, no manual step.
The WebUI is packaged as `@minimax-webui/minimax-code`. Automatic npm publishing
has been retired from this repository. CI still verifies package installation;
it does not publish to `https://registry.npmjs.org`. The archived preview workflow
and local packaging commands are documented below for reference.

## How a release happens
## Archived preview release workflow

`.github/workflows/webui-npm-preview.yml` runs on `push` to `webui` and on
The npm publishing workflow is archived at
`.github/legacy-workflows/webui-npm-preview.yml` and disabled in the public
repository. The description below records its behavior if explicitly restored;
there is currently no automatic or manual npm publishing workflow. See
[`WebUI-only CI`](../../../docs/webui-ci.md) for the active verification scope.

The archived workflow was configured to run on `push` to `webui` and on
`workflow_dispatch`. It:

1. installs the workspace with a frozen lockfile;
Expand Down
18 changes: 9 additions & 9 deletions release/public-source.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 13 additions & 10 deletions test/source-sync.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ import { validateExceptionLedger, sourceFingerprint } from '../scripts/lib/webui
import { acceptanceRecordFiles, restoreAcceptanceRecords } from '../scripts/lib/acceptance-records.mjs';

test('public WebUI CI runs only WebUI checks and cannot publish packages', () => {
const activeWorkflows = readdirSync(new URL('../.github/workflows/', import.meta.url))
.filter(name => /\.ya?ml$/.test(name)).sort();
assert.deepEqual(activeWorkflows, ['webui-ci.yml']);
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'));
Expand Down Expand Up @@ -341,7 +344,7 @@ test('performance defaults to the 100-round suite; long history requires explici
assert.deepEqual(selectScenarios(config, { scenario: 'startup' }).map(s => s.id), ['startup']);
assert.throws(() => selectScenarios(config, { suite: 'typo' }));
assert.throws(() => selectScenarios(config, { scenario: 'typo' }));
const workflow = parseYaml(readFileSync(new URL('../.github/workflows/performance.yml', import.meta.url), 'utf8'));
const workflow = parseYaml(readFileSync(new URL('../.github/legacy-workflows/performance.yml', import.meta.url), 'utf8'));
assert.equal(workflow.on.workflow_dispatch.inputs.suite.default, 'full');
assert.deepEqual(workflow.on.workflow_dispatch.inputs.suite.options, ['full', 'basic']);
const compare = workflow.jobs.performance.steps.find(s => s.name === 'Compare on this runner');
Expand All @@ -350,7 +353,7 @@ test('performance defaults to the 100-round suite; long history requires explici
});

test('performance labels select full coverage without interrupting checks for unrelated labels', () => {
const workflow = parseYaml(readFileSync(new URL('../.github/workflows/performance.yml', import.meta.url), 'utf8'));
const workflow = parseYaml(readFileSync(new URL('../.github/legacy-workflows/performance.yml', import.meta.url), 'utf8'));
const job = workflow.jobs.performance;
assert.deepEqual(workflow.on.pull_request.types, ['opened', 'synchronize', 'reopened', 'labeled', 'unlabeled']);
assert.equal(job.strategy.matrix.suite, `\${{ fromJSON((inputs.suite == 'full' || (github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'perf:full'))) && '["full"]' || '["basic"]') }}`);
Expand Down Expand Up @@ -441,7 +444,7 @@ test('performance exit codes fail regressions and errors but not inconclusive no
});

test('performance workflow warns on basic inconclusive runs but fails full inconclusive runs', () => {
const workflow = parseYaml(readFileSync(new URL('../.github/workflows/performance.yml', import.meta.url), 'utf8'));
const workflow = parseYaml(readFileSync(new URL('../.github/legacy-workflows/performance.yml', import.meta.url), 'utf8'));
const compare = workflow.jobs.performance.steps.find(s => s.name === 'Compare on this runner');
assert.match(compare.run, /\|\| status=\$\?/);
assert.match(compare.run, /if \[ "\$status" -eq 2 \]/);
Expand Down Expand Up @@ -507,7 +510,7 @@ test('performance measurements require complete successful tool execution', () =
});

test('performance workflow uses pinned mock input and an unprivileged PR job', () => {
const workflow = parseYaml(readFileSync(new URL('../.github/workflows/performance.yml', import.meta.url), 'utf8'));
const workflow = parseYaml(readFileSync(new URL('../.github/legacy-workflows/performance.yml', import.meta.url), 'utf8'));
const config = JSON.parse(readFileSync(new URL('../scripts/perf/config.json', import.meta.url), 'utf8'));
assert.ok(Object.hasOwn(workflow.on, 'pull_request'));
assert.ok(!Object.hasOwn(workflow.on, 'pull_request_target'));
Expand Down Expand Up @@ -665,7 +668,7 @@ test('CLI publication requires every supported installation receipt for the exac
});

test('CLI release publishes only tag pushes after full verification and archive installation', () => {
const workflow = parseYaml(readFileSync(new URL('../.github/workflows/cli-release.yml', import.meta.url), 'utf8'));
const workflow = parseYaml(readFileSync(new URL('../.github/legacy-workflows/cli-release.yml', import.meta.url), 'utf8'));
assert.deepEqual(workflow.on.push, { tags: ['v*'] });
assert.equal(workflow.on.workflow_dispatch.inputs.tag.required, false);
assert.equal(workflow.permissions.contents, 'read');
Expand Down Expand Up @@ -949,7 +952,7 @@ test('change classification is conservative for mixed changes, metadata and miss

test('CI aggregate rejects failed, cancelled, missing and unexpectedly skipped checks', { skip: process.platform === 'win32' }, () => {
// This shell step only runs on the aggregate job's Ubuntu runner.
const workflow = parseYaml(readFileSync(new URL('../.github/workflows/ci.yml', import.meta.url), 'utf8'));
const workflow = parseYaml(readFileSync(new URL('../.github/legacy-workflows/ci.yml', import.meta.url), 'utf8'));
const script = workflow.jobs.verification.steps[0].run;
const full = { CLASSIFICATION: 'success', DOCS_ONLY: 'false', DOCS_RESULT: 'skipped', MATRIX_RESULT: 'success' };
const docs = { CLASSIFICATION: 'success', DOCS_ONLY: 'true', DOCS_RESULT: 'success', MATRIX_RESULT: 'skipped' };
Expand All @@ -971,7 +974,7 @@ test('CI aggregate rejects failed, cancelled, missing and unexpectedly skipped c
});

test('ordinary CI runs a focused Windows contract while compatibility remains macOS/Linux', () => {
const readWorkflow = name => parseYaml(readFileSync(new URL(`../.github/workflows/${name}.yml`, import.meta.url), 'utf8'));
const readWorkflow = name => parseYaml(readFileSync(new URL(`../.github/legacy-workflows/${name}.yml`, import.meta.url), 'utf8'));
const ci = readWorkflow('ci');
assert.ok(Object.hasOwn(ci.on, 'pull_request'));
assert.deepEqual(ci.on.push.branches, ['main']);
Expand All @@ -997,7 +1000,7 @@ test('ordinary CI runs a focused Windows contract while compatibility remains ma
assert.ok(audit.jobs['source-history-artifact'].steps.some(step => step.run?.includes('gitleaks dir dist')));
});
test('manual source candidates pin every checkout and receipt to the selected revision', () => {
const workflow = parseYaml(readFileSync(new URL('../.github/workflows/source-candidate.yml', import.meta.url), 'utf8'));
const workflow = parseYaml(readFileSync(new URL('../.github/legacy-workflows/source-candidate.yml', import.meta.url), 'utf8'));
assert.deepEqual(Object.keys(workflow.on).sort(), ['workflow_call', 'workflow_dispatch']);
assert.equal(workflow.on.workflow_call.inputs.revision.required, true);
assert.equal(workflow.env.MCODE_CANDIDATE_REVISION, '${{ inputs.revision || github.sha }}');
Expand Down Expand Up @@ -1256,7 +1259,7 @@ test('public support forms preserve destination URLs and separate Desktop from C
});

test('issue product labels follow current form answers without replacing unrelated labels', async () => {
const workflow = parseYaml(readFileSync(new URL('../.github/workflows/label-issue-product.yml', import.meta.url), 'utf8'));
const workflow = parseYaml(readFileSync(new URL('../.github/legacy-workflows/label-issue-product.yml', import.meta.url), 'utf8'));
assert.deepEqual(workflow.on, { issues: { types: ['opened', 'edited'] } });
assert.deepEqual(workflow.permissions, { issues: 'write' });
assert.equal(workflow.concurrency['cancel-in-progress'], false);
Expand Down Expand Up @@ -1322,7 +1325,7 @@ test('issue forms label incoming reports for triage and retain collaborator-only
});

test('issue notification is restricted to public destination events and builds payloads offline', t => {
const workflow = parseYaml(readFileSync(new URL('../.github/workflows/sync-issue-to-feishu.yml', import.meta.url), 'utf8'));
const workflow = parseYaml(readFileSync(new URL('../.github/legacy-workflows/sync-issue-to-feishu.yml', import.meta.url), 'utf8'));
assert.deepEqual(workflow.on, { issues: { types: ['opened'] } });
assert.deepEqual(workflow.permissions, { contents: 'read', issues: 'read' });
const job = workflow.jobs['notify-feishu'];
Expand Down
Loading