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
2 changes: 1 addition & 1 deletion .ai/toolchain.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ also explicitly use Node:
Bun differs in data-URL module imports, native TypedArray references, source maps,
filesystem globs, and `module.stripTypeScriptTypes`. Build and task orchestration
still run through Bun; these suites exercise their supported Node hosts.
- semantic-release, npm publication/provenance, VSCE/Open VSX, and native consumer smoke.
- The release (`scripts/release.mjs` with Aronrepo), npm publication/provenance, VSCE/Open VSX, and native consumer smoke.
- Benchmarks intentionally measuring Node hosts and Node-specific profiling tools.

Do not globally alias `node` to Bun. Package scripts select Bun explicitly;
Expand Down
2 changes: 1 addition & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ bun run type-check
```

## Commit Checking
Follow the [Aronrepo conventional commits](https://github.com/1aron/aronrepo/tree/main/packages/conventional-commits). Commit headers use `Type(Scope): Summary`, with PascalCase types, optional scopes, sentence case, and no trailing period.
Follow the [Aronrepo commit policy](https://github.com/1aron/aronrepo/tree/main/packages/aronrepo) in [AGENTS.md](../AGENTS.md#commit-and-release-policy). Commit headers use `Type(Scope): Summary`, with PascalCase types, optional scopes, sentence case, and no trailing period. `bun x aronrepo policy` lists which types release, and `bun x aronrepo explain` shows what the next release would be.
```bash
bun run commit-check
```
Expand Down
51 changes: 28 additions & 23 deletions .github/RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Run these commands with the actual candidate values and a fresh output directory
node scripts/release-readiness.mjs inventory --version "$VERSION" --output "$EVIDENCE/before.json"
node scripts/release-readiness.mjs inspect --archives "$ARCHIVES" --version "$VERSION" --revision "$REVISION" --output "$EVIDENCE/candidate.json"
node scripts/release-readiness.mjs rehearse --candidate "$EVIDENCE/candidate.json" --before "$EVIDENCE/before.json" --output "$EVIDENCE/rehearsal.json"
node --test scripts/release-readiness.test.mjs scripts/semantic-release-workspace.test.mjs scripts/semantic-release-promotion.test.mjs
node --test scripts/release-readiness.test.mjs scripts/release-workspace.test.mjs scripts/release-promotion.test.mjs
```

`inspect` rejects missing or duplicate packages, unresolved workspace protocols,
Expand Down Expand Up @@ -75,10 +75,15 @@ Before authorizing publication, retain:

## Normal publication sequence

The semantic-release configuration runs workspace publication first, the cohort
promotion plugin next, and GitHub release creation last. The workspace plugins
publish dependencies before their dependents, including optional and peer
dependencies pinned to this cohort. Publication requires both explicit workflow flags:
`bun run release` (`scripts/release.mjs`) releases the checked-out commit of a
release branch. [Aronrepo](https://github.com/1aron/aronrepo/tree/main/packages/aronrepo)
decides the version, tag and notes from the commits since the channel's last
`v*` tag with this repository's `explicit` policy, the same rules as the commit
hook, the PR title check and `bun x aronrepo explain`. The script then runs
workspace publication, the cohort promotion next, and GitHub release creation
last, with the assets in `aronrepo.config.js`. The workspace module publishes
dependencies before their dependents, including optional and peer dependencies
pinned to this cohort. Publication requires both explicit workflow flags:

```text
MASTER_CSS_RELEASE_STAGE=1
Expand All @@ -87,11 +92,13 @@ MASTER_CSS_RELEASE_STATE=release-artifacts/promotion-state.json
```

These flags are guards, not a replacement for authorization. Both are required by
the normal semantic-release invocation; setting only one is not a supported
the normal release invocation; setting only one is not a supported
stage-only release workflow. Use one release concurrency group and prevent an
operator or another workflow from writing the same tags concurrently.

1. `prepare` versions all workspaces before packing. Before the first npm write,
1. `prepare` versions all workspaces before packing, then the script pushes the
version tag, so an interrupted npm phase never selects the same commit again.
Before the first npm write,
record the source revision, full archive cohort and SHA-512 values, target
channel baselines, workflow run identity and an empty operation log.
2. Publish each archive under `candidate-<exact-version>`. Record an upload attempt
Expand Down Expand Up @@ -120,8 +127,9 @@ operator or another workflow from writing the same tags concurrently.
operation first, and verifying the tag afterward. npm has no multi-package
transaction or atomic compare-and-swap. Readers can observe a partially moved
channel during promotion, but every candidate dependency already exists.
5. Only after all promotions succeed may semantic-release create the GitHub
release. Keep editor publication and deployment held until their separate
5. Only after all promotions succeed may the release create the GitHub
release. A rerun on the tagged commit creates a missing GitHub release only when
every package's channel already points to the version. Keep editor publication and deployment held until their separate
validation and authorization gates are met. A completed npm phase does not
prove those downstream phases succeeded.

Expand Down Expand Up @@ -214,9 +222,9 @@ tags. It does not execute upload, promotion, rollback or deletion commands.
An explicitly authorized recovery run sets `MASTER_CSS_RELEASE_RECOVERY=1` in
addition to the normal guards, restores the archived state and archives, and uses
the same candidate revision/version. `prepare` can reuse verified archived bytes,
but do not resume by rerunning semantic-release: it creates a Git tag before npm
publication and may then select no new release on a retry. The explicit recovery
entrypoint bypasses semantic-release's version selection and Git writes:
but do not resume by rerunning `bun run release`: it creates the Git tag before
npm publication and then selects no new release on a retry. The explicit recovery
entrypoint bypasses version selection and Git writes:

```sh
# MUTATING: only in a separately authorized OIDC recovery workflow, never as a check.
Expand All @@ -229,13 +237,11 @@ so the original temporary preparation workspace is not needed. Archive paths in
state are relative to the state file and remain portable when the whole evidence
directory is restored. It verifies all archived bytes, stages only missing
versions, reruns the registry host consumer and resumes recorded promotion steps.
It never creates/deletes Git tags or notes, creates a GitHub release, publishes an
editor extension, or deploys a site. Reconcile those downstream states separately. In particular, a channel recovered
outside semantic-release does not update its Git notes: the next normal release
remains blocked by the pending channel until an operator verifies completed npm
promotion and explicitly reconciles the semantic-release channel note, preserving
its existing channels. Do not delete/recreate release tags or alter notes merely
to silence that guard.
It never creates/deletes Git tags, creates a GitHub release, publishes an
editor extension, or deploys a site. Reconcile those downstream states separately.
After a recovery completes npm promotion, rerunning the original Release job
creates the missing GitHub release from the tag. Do not delete/recreate release
tags to make a release run again.

The `Release` workflow now has an explicit manual npm-only recovery mode. It uses
`release.yml`, preserving the configured npm Trusted Publisher workflow identity.
Expand Down Expand Up @@ -280,10 +286,9 @@ where the channel was previously absent, remove only that channel. Re-read befor
each authorized write and stop on interference. This is an operator procedure,
not automatic rollback; published versions remain immutable and available.

Automatic semantic-release `addChannel` is blocked in `verifyConditions`, before
semantic-release writes channel notes to Git. Use the explicit recovery entrypoint
for a channel change with archived evidence. The promotion implementation's
`addChannel` also requires the archived release state and package archives for the
There is no automatic channel promotion of an existing version. Use the explicit
recovery entrypoint for a channel change with archived evidence. Promotion
requires the archived release state and package archives for the
same version/revision and validates the entire registry cohort. It does not
reconstruct old release evidence from the current checkout. Missing archived
evidence fails closed; automatic channel promotion without that evidence is not
Expand Down
12 changes: 10 additions & 2 deletions .github/workflows/pull-request-title-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,20 @@ jobs:
# pull_request_target runs base-branch code; keep the token out of the checkout.
- uses: actions/checkout@v6
with:
fetch-depth: 0
persist-credentials: false
# Only commitlint runs here, so skip husky and every package postinstall.
# Fetch the PR commits as data only; no PR code is installed or run.
- run: git fetch --no-tags origin "+refs/pull/${PR_NUMBER}/head:refs/remotes/pull/head"
env:
PR_NUMBER: ${{ github.event.pull_request.number }}
# Only aronrepo runs here, so skip husky and every package postinstall.
- uses: ./.github/actions/setup-bun
with:
turbo-cache: "false"
ignore-scripts: "true"
- run: printf '%s\n' "$PR_TITLE" | bun run commitlint
# A squash merge turns the title into the commit header, so it must release what the PR diff ships.
- run: bun x aronrepo check --title "$PR_TITLE" --base "$BASE_SHA" --head "$HEAD_SHA"
env:
PR_TITLE: ${{ github.event.pull_request.title }}
BASE_SHA: ${{ github.event.pull_request.base.sha }}
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
4 changes: 1 addition & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,6 @@ jobs:
runs-on: ubuntu-latest
permissions:
contents: write
issues: write
pull-requests: write
id-token: write
steps:
- uses: actions/checkout@v6
Expand All @@ -84,7 +82,7 @@ jobs:
run: |
test "$(npm --version)" = 11.21.0
bun run check:release
node --test scripts/semantic-release-workspace.test.mjs scripts/semantic-release-promotion.test.mjs scripts/semantic-release-major-guard.test.mjs scripts/release-registry-provenance.test.mjs
node --test scripts/release.test.mjs scripts/release-workspace.test.mjs scripts/release-promotion.test.mjs scripts/release-registry-provenance.test.mjs
- name: Require unused editor versions before publishing npm
if: ${{ needs.validation.outputs.vscode_release_affected == 'true' }}
run: node packages/vscode/scripts/verify-store-availability.mjs
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/site-toolchain-snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ on:
- .github/workflows/site-toolchain-snapshot.yml
- scripts/site-toolchain-snapshot.mjs
- scripts/site-toolchain-snapshot.test.mjs
- scripts/semantic-release-workspace.mjs
- scripts/semantic-release-workspace.test.mjs
- scripts/semantic-release-promotion.mjs
- scripts/release-workspace.mjs
- scripts/release-workspace.test.mjs
- scripts/release-promotion.mjs
- scripts/release-registry-consumer.mjs
- scripts/npm-oidc.mjs
- scripts/release-config-check.mjs
Expand Down Expand Up @@ -56,7 +56,7 @@ jobs:
- name: Install publishing npm CLI
run: npm install --global npm@11.21.0
- name: Verify OIDC publication and snapshot packaging
run: bun run check:release && node --test scripts/site-toolchain-snapshot.test.mjs scripts/semantic-release-workspace.test.mjs
run: bun run check:release && node --test scripts/site-toolchain-snapshot.test.mjs scripts/release-workspace.test.mjs
- name: Publish exact site snapshot
run: node scripts/site-toolchain-snapshot.mjs --output release-artifacts/site-toolchains --publish
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ jobs:
bun run check:toolchain
bun run test:toolchain
bun test scripts/validation-workflow.test.mjs scripts/editor-release-gate.test.mjs
node --test scripts/pages-release-target.test.mjs scripts/pages-site-manifest.test.mjs scripts/pages-site-release.test.mjs scripts/pages-release-github.test.mjs scripts/npm-package-bootstrap.test.mjs site/utils/release-code.test.mjs scripts/release-outcome.test.mjs scripts/release-readiness.test.mjs scripts/semantic-release-promotion.test.mjs scripts/semantic-release-major-guard.test.mjs scripts/release-registry-provenance.test.mjs scripts/release-recovery-artifact.test.mjs scripts/semantic-release-notes.test.mjs
node --test scripts/pages-release-target.test.mjs scripts/pages-site-manifest.test.mjs scripts/pages-site-release.test.mjs scripts/pages-release-github.test.mjs scripts/npm-package-bootstrap.test.mjs site/utils/release-code.test.mjs scripts/release-outcome.test.mjs scripts/release-readiness.test.mjs scripts/release.test.mjs scripts/release-promotion.test.mjs scripts/release-registry-provenance.test.mjs scripts/release-recovery-artifact.test.mjs
- name: Verify isolated package-manager archive consumers
shell: bash
run: |
Expand Down
20 changes: 2 additions & 18 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1,20 +1,4 @@
#!/usr/bin/env sh

bun --bun commitlint --edit "$1" || {
cat <<'EOF'

Master CSS commit messages must follow Aronrepo conventional commits:
Type(Target): Summary

Examples:
Fix(Core): Parse escaped selectors
Docs(Site): Update box shadow reference
Test(CLI): Cover extract watch mode

Types:
Bump, Feat, New, Perf, Add, Update, Improve, Fix, Deprecate, Drop, Docs, Upgrade, Revert, Example, Test, Refactor, Chore, Misc

Use PascalCase types, optional scopes, sentence case, and no trailing period.
EOF
exit 1
}
# Prints the problem and a suggested header; `bun x aronrepo policy` lists every type.
bun x aronrepo check --edit "$1"
Loading
Loading