release.yml on the forge: npm with NPM_TOKEN, and the three things the forge cannot do as it stands #2

Open
opened 2026-11-24 02:14:23 +00:00 by ceres · 5 comments
Member

Purpose (change): @macula-io/ts releases from git.macula.io again — a v* tag on this repository publishes that version to npm with NPM_TOKEN, and nothing on GitHub is needed.

Refs macula-io/forge-setup#30, section 4 step 3 (DECIDED 2026-11-24 "Yes, token plan (Recommended)").

What the port changes

  • .github/workflows/release.yml:87 — id-token: write goes (that is npm OIDC Trusted Publishing, which accepts only cloud-hosted CI); :168-169 — npm publish --access public --provenance becomes npm publish --access public, --tag next kept for a pre-release as it is today.
  • NPM_TOKEN comes from a repository secret the owner fills from ~/.config/forge/npm-macula-ts.token (mode 600, written by Raf, never printed, never echoed into a log).
  • The build-provenance attestation goes: actions/attest-build-provenance@v2 at prebuild-matrix.yml:159, with the attest input and the attestations: write / id-token: write it needs. macula-ts ships no SHA256SUMS file today, so unlike forge-setup#30's general wording there is none to keep here.
  • Tag-triggered only (on: push: tags: ["v*"] as now), and the repository is private on the forge, so it runs on the local host00 runner.

Three things the forge cannot do as this file stands

Each one needs a decision before code, because a port that ignores them publishes either a broken package or nothing.

  1. The five-platform prebuild matrix. prebuild-matrix.yml builds linux-x64, linux-arm64, darwin-x64, darwin-arm64, win32-x64 on ubuntu-22.04, ubuntu-22.04-arm, macos-latest, macos-15-intel and windows-latest, and says why there is no cross-compiling: cgo needs each platform's own C toolchain, and macula-ts#12 pins the linux prebuilds to Ubuntu 22.04's glibc baseline. The forge has one Linux docker runner on host00. So a forge release cannot build the five prebuilds the package ships. Options: (a) build the prebuilds where the platform runners live and hand them to the forge release as inputs; (b) add foreign runners to the forge (not available today); (c) publish with fewer prebuilds (changes what users get — not a release-path choice).
  2. No node or Go image in the forge registry. The registry holds macula-ci-otp, macula-ci-pq, macula-ci-martha, macula-ci-gleam and their variants: nothing with Node 24.20.0 and Go 1.27, which guard, test and publish all need. Forge jobs run in a container: image, and the JS actions this file uses (actions/checkout, setup-node, setup-go, upload-artifact, download-artifact, attest-build-provenance) are exactly the ones the forge cannot resolve (the macula-io/macula-ci-images#17 ruling: a JavaScript action dies at exitcode 127 in an image that carries no node). So checkout and setup become plain shell steps, and the prebuild artifacts crossing prebuilds → publish need a forge mechanism (artifact API) or a shared path.
  3. The two cross-repository reusables. release-guard.yml and dependency-advisories.yml are called from the private macula-io/macula-ci-images at pinned commits; the forge fails such a call at expansion and takes the whole file's other jobs with it. The established pattern is a pinned local copy in .github/workflows/ (as mcl-graph and mcl-mail carry them).

Done when

A v* tag on the forge publishes that version to npm, read back from the registry (npm view @macula-io/ts@<version>), and the same tag on GitHub is needed for nothing.

Built by Ceres; review by Neptunus or Jupiter (Mars places it).

Purpose (change): `@macula-io/ts` releases from git.macula.io again — a `v*` tag on this repository publishes that version to npm with `NPM_TOKEN`, and nothing on GitHub is needed. Refs macula-io/forge-setup#30, section 4 step 3 (DECIDED 2026-11-24 "Yes, token plan (Recommended)"). ## What the port changes - `.github/workflows/release.yml:87` — `id-token: write` goes (that is npm OIDC Trusted Publishing, which accepts only cloud-hosted CI); `:168-169` — `npm publish --access public --provenance` becomes `npm publish --access public`, `--tag next` kept for a pre-release as it is today. - `NPM_TOKEN` comes from a repository secret the owner fills from `~/.config/forge/npm-macula-ts.token` (mode 600, written by Raf, never printed, never echoed into a log). - The build-provenance attestation goes: `actions/attest-build-provenance@v2` at `prebuild-matrix.yml:159`, with the `attest` input and the `attestations: write` / `id-token: write` it needs. macula-ts ships no `SHA256SUMS` file today, so unlike forge-setup#30's general wording there is none to keep here. - Tag-triggered only (`on: push: tags: ["v*"]` as now), and the repository is private on the forge, so it runs on the local host00 runner. ## Three things the forge cannot do as this file stands Each one needs a decision before code, because a port that ignores them publishes either a broken package or nothing. 1. **The five-platform prebuild matrix.** `prebuild-matrix.yml` builds `linux-x64`, `linux-arm64`, `darwin-x64`, `darwin-arm64`, `win32-x64` on `ubuntu-22.04`, `ubuntu-22.04-arm`, `macos-latest`, `macos-15-intel` and `windows-latest`, and says why there is no cross-compiling: cgo needs each platform's own C toolchain, and macula-ts#12 pins the linux prebuilds to Ubuntu 22.04's glibc baseline. The forge has one Linux docker runner on host00. So a forge release cannot build the five prebuilds the package ships. Options: (a) build the prebuilds where the platform runners live and hand them to the forge release as inputs; (b) add foreign runners to the forge (not available today); (c) publish with fewer prebuilds (changes what users get — not a release-path choice). 2. **No node or Go image in the forge registry.** The registry holds `macula-ci-otp`, `macula-ci-pq`, `macula-ci-martha`, `macula-ci-gleam` and their variants: nothing with Node 24.20.0 and Go 1.27, which `guard`, `test` and `publish` all need. Forge jobs run in a `container:` image, and the JS actions this file uses (`actions/checkout`, `setup-node`, `setup-go`, `upload-artifact`, `download-artifact`, `attest-build-provenance`) are exactly the ones the forge cannot resolve (the macula-io/macula-ci-images#17 ruling: a JavaScript action dies at exitcode 127 in an image that carries no node). So checkout and setup become plain shell steps, and the prebuild artifacts crossing `prebuilds` → `publish` need a forge mechanism (artifact API) or a shared path. 3. **The two cross-repository reusables.** `release-guard.yml` and `dependency-advisories.yml` are called from the private `macula-io/macula-ci-images` at pinned commits; the forge fails such a call at expansion and takes the whole file's other jobs with it. The established pattern is a pinned local copy in `.github/workflows/` (as mcl-graph and mcl-mail carry them). ## Done when A `v*` tag on the forge publishes that version to npm, read back from the registry (`npm view @macula-io/ts@<version>`), and the same tag on GitHub is needed for nothing. Built by Ceres; review by Neptunus or Jupiter (Mars places it).
Author
Member

Supervisor's ruling, recorded as this issue's scope (via Mars, 2026-11-24)

  1. Only the linux-x64 prebuild leg ports onto the forge runner. linux-arm64, darwin-x64, darwin-arm64 and win32-x64 stay open: Raf's call in the ts release menu, between cross-compiling and shipping fewer prebuilds. Neither is built in this package, and no GitHub runner is called for them (GitHub is stopped).
  2. This package waits on macula-ci-node — macula-io/macula-ci-images#23 files it: Node 24.20.0 and Go 1.27, OTP-free. macula-ci-martha is not a substitute: it carries Node 24.22.3 (martha's own pin, not the 24.20.0 this repository's workflows name) and no Go toolchain.
  3. The pinned local copies of the reusables are prepared (the mcl-* stand-in pattern): ci-images-release-guard.yml @ b4c41abb, ci-images-dependency-advisories.yml @ 83a76a35, and ci-images-doc-snippets-ts.yml @ 711cfee7 — the third one because release.yml's docs gate calls docs.yml, which called that reusable cross-repository; a missing copy there would sink the release file's other jobs at expansion. release.yml and docs.yml now name the local copies.

Not pushed yet: the copies ride the same branch as the port, which starts once the image is on the registry.

## Supervisor's ruling, recorded as this issue's scope (via Mars, 2026-11-24) 1. **Only the `linux-x64` prebuild leg ports onto the forge runner.** `linux-arm64`, `darwin-x64`, `darwin-arm64` and `win32-x64` stay **open**: Raf's call in the ts release menu, between cross-compiling and shipping fewer prebuilds. Neither is built in this package, and no GitHub runner is called for them (GitHub is stopped). 2. **This package waits on `macula-ci-node`** — macula-io/macula-ci-images#23 files it: Node 24.20.0 and Go 1.27, OTP-free. `macula-ci-martha` is not a substitute: it carries Node 24.22.3 (martha's own pin, not the 24.20.0 this repository's workflows name) and no Go toolchain. 3. **The pinned local copies of the reusables are prepared** (the mcl-* stand-in pattern): `ci-images-release-guard.yml` @ `b4c41abb`, `ci-images-dependency-advisories.yml` @ `83a76a35`, and `ci-images-doc-snippets-ts.yml` @ `711cfee7` — the third one because `release.yml`'s docs gate calls `docs.yml`, which called that reusable cross-repository; a missing copy there would sink the release file's other jobs at expansion. `release.yml` and `docs.yml` now name the local copies. Not pushed yet: the copies ride the same branch as the port, which starts once the image is on the registry.
Author
Member

Prepared (local only, no branch): the linux-x64 leg on the forge

Drafted against macula-ci-node (macula-ci-images#23) as built on msi00, not pushed. The shape, and the two things it exposed:

One job instead of a matrix leg plus a publish job. With only linux-x64 on the forge, prebuilds and publish collapse into one job in macula-ci-node: the plain-shell checkout (the forge resolves no actions/checkout), npm run build:go, npm ci, npx prebuildify --napi --strip, the two bounded load stages as they are today, then npm publish --access public with NPM_TOKEN and no --provenance. No artifact ever crosses a job, so upload-artifact/download-artifact — JS actions this forge cannot resolve — leave the release path entirely.

Gap 1 — the Debian 12 load check needs a container. prebuild-matrix.yml's "The prebuild loads on Debian 12 (Linux)" step runs docker run --rm -v … node:24-bookworm inside the job, and a forge job container has no docker socket (the same reason build.yml uses host00's rootless BuildKit through a remote driver). Either that step moves to a job on a container-capable runner (the image-build label's shape), or the bookworm proof moves into the release's own gate some other way. macula-ts#12 pins the glibc baseline, so it cannot just be dropped.

Gap 2 — the other four prebuilds still have to arrive. Whatever Raf decides in the ts release menu, the publish step refuses an incomplete set today (no <plat> prebuild), so the forge publish either ships one platform (with Raf's yes) or takes the other four as inputs from somewhere.

Pinned local copies of the reusables are ready in a local commit (release-guard, dependency-advisories, doc-snippets-ts; see comment above), and release.yml/docs.yml name them. Nothing is pushed: this leg rides the branch that waits on macula-ci-node being published.

## Prepared (local only, no branch): the linux-x64 leg on the forge Drafted against `macula-ci-node` (macula-ci-images#23) as built on msi00, not pushed. The shape, and the two things it exposed: **One job instead of a matrix leg plus a publish job.** With only `linux-x64` on the forge, `prebuilds` and `publish` collapse into one job in `macula-ci-node`: the plain-shell checkout (the forge resolves no `actions/checkout`), `npm run build:go`, `npm ci`, `npx prebuildify --napi --strip`, the two bounded load stages as they are today, then `npm publish --access public` with `NPM_TOKEN` and no `--provenance`. No artifact ever crosses a job, so `upload-artifact`/`download-artifact` — JS actions this forge cannot resolve — leave the release path entirely. **Gap 1 — the Debian 12 load check needs a container.** `prebuild-matrix.yml`'s "The prebuild loads on Debian 12 (Linux)" step runs `docker run --rm -v … node:24-bookworm` inside the job, and a forge job container has no docker socket (the same reason `build.yml` uses host00's rootless BuildKit through a remote driver). Either that step moves to a job on a container-capable runner (the `image-build` label's shape), or the bookworm proof moves into the release's own gate some other way. macula-ts#12 pins the glibc baseline, so it cannot just be dropped. **Gap 2 — the other four prebuilds still have to arrive.** Whatever Raf decides in the ts release menu, the publish step refuses an incomplete set today (`no <plat> prebuild`), so the forge publish either ships one platform (with Raf's yes) or takes the other four as inputs from somewhere. **Pinned local copies of the reusables** are ready in a local commit (release-guard, dependency-advisories, doc-snippets-ts; see comment above), and `release.yml`/`docs.yml` name them. Nothing is pushed: this leg rides the branch that waits on `macula-ci-node` being published.
Author
Member

Raf's ruling via the Supervisor (Mars noted it on macula-io/forge-setup#30 c3066): @macula-io/ts publishes only to the forge's npm registry, https://git.macula.io/api/packages/macula-io/npm/. There is no npmjs token, and Raf deprecates the npmjs package himself. That replaces the NPM_TOKEN/registry.npmjs.org half of what this issue said:

  • The publish step becomes npm publish --access public --registry https://git.macula.io/api/packages/macula-io/npm/, authenticated with a forge token. Still dropped: --provenance (no provenance on a self-hosted CI). Still kept: the pre-release --tag next rule.
  • Open: which forge token the publish uses — a publisher account per the per-repo rule, or the crew packages path. That is the one decision left before the publish step can be written.
  • The README's install docs gain the .npmrc scope line (@macula-io:registry=https://git.macula.io/api/packages/macula-io/npm/), so npm i @macula-io/ts resolves from the forge and not from npmjs.
  • Owner step 1 of forge-setup#30's token list (the npm granular token) no longer applies to ts.

Everything else on this issue stands: the linux-x64 prebuild leg only (the other four platforms are Raf's call in the ts release menu), the pinned local copies of the three reusables, and this package waiting on macula-ci-node (macula-ci-images#23).

## DECIDED 2026-11-24 "Forge npm registry (Recommended)" — recorded as this issue's scope Raf's ruling via the Supervisor (Mars noted it on macula-io/forge-setup#30 c3066): `@macula-io/ts` publishes **only** to the forge's npm registry, `https://git.macula.io/api/packages/macula-io/npm/`. There is no npmjs token, and Raf deprecates the npmjs package himself. That replaces the `NPM_TOKEN`/registry.npmjs.org half of what this issue said: - The publish step becomes `npm publish --access public --registry https://git.macula.io/api/packages/macula-io/npm/`, authenticated with a **forge** token. Still dropped: `--provenance` (no provenance on a self-hosted CI). Still kept: the pre-release `--tag next` rule. - **Open:** which forge token the publish uses — a publisher account per the per-repo rule, or the crew packages path. That is the one decision left before the publish step can be written. - The README's install docs gain the `.npmrc` scope line (`@macula-io:registry=https://git.macula.io/api/packages/macula-io/npm/`), so `npm i @macula-io/ts` resolves from the forge and not from npmjs. - Owner step 1 of forge-setup#30's token list (the npm granular token) no longer applies to ts. Everything else on this issue stands: the `linux-x64` prebuild leg only (the other four platforms are Raf's call in the ts release menu), the pinned local copies of the three reusables, and this package waiting on `macula-ci-node` (macula-ci-images#23).
Author
Member

The linux-x64 leg on the forge: measured on msi00 in the macula-ci-node image

No branch yet (the workflow needs the image's digest, which exists once macula-io/macula-ci-images#23 lands and build.yml publishes it). What is proved now, so the leg is not a guess:

  • In macula-ci-node (Debian 12, node 24.20.0, go 1.27.4): npm run build:go, npm ci, npx prebuildify --napi --strip → prebuilds/linux-x64/@macula-io+ts.node (10,040,536 bytes).
  • The prebuild loads (C ABI 2) and generates a pq_pure key with build/ removed — the two bounded stages prebuild-matrix.yml runs today, run in the same image.
  • macula-ts#12's Ubuntu 22.04 half still holds, by measurement. The old leg was built on Ubuntu 22.04 because 24.04's libstdc++ broke bookworm; macula-ci-node is bookworm, so I checked the other direction. The produced .node requires at most GLIBC_2.34 and GLIBCXX_3.4.29 (objdump -T), and it loaded and generated a key on Ubuntu 22.04.5, glibc 2.35, node 24.20.0. Building in the bookworm image does not raise the floor for a 22.04 user.

Two consequences for the port, both in the draft release.yml:

  1. The docker run node:24-bookworm load step goes: a container job has no docker socket, and the job's own image IS bookworm, so the load above is that proof. The 22.04 half cannot be re-run in a container job; it was measured once from these steps.
  2. prebuilds and publish collapse into one job, so no artifact crosses a job and upload-artifact/download-artifact leave the release path.

The rehearsal (workflow_dispatch, no tag) runs every gate and this leg and stops at npm publish --dry-run. A tag release still refuses an incomplete prebuild set, as it does today: until the other four platforms are decided in the release menu, the tag path stops there by name instead of publishing a package that cannot load on four of the five.

## The linux-x64 leg on the forge: measured on msi00 in the macula-ci-node image No branch yet (the workflow needs the image's digest, which exists once macula-io/macula-ci-images#23 lands and `build.yml` publishes it). What is proved now, so the leg is not a guess: - In `macula-ci-node` (Debian 12, node 24.20.0, go 1.27.4): `npm run build:go`, `npm ci`, `npx prebuildify --napi --strip` → `prebuilds/linux-x64/@macula-io+ts.node` (10,040,536 bytes). - The prebuild loads (C ABI 2) and generates a `pq_pure` key with `build/` removed — the two bounded stages `prebuild-matrix.yml` runs today, run in the same image. - **macula-ts#12's Ubuntu 22.04 half still holds, by measurement.** The old leg was built on Ubuntu 22.04 because 24.04's libstdc++ broke bookworm; macula-ci-node is bookworm, so I checked the other direction. The produced `.node` requires at most `GLIBC_2.34` and `GLIBCXX_3.4.29` (`objdump -T`), and it loaded and generated a key on **Ubuntu 22.04.5, glibc 2.35, node 24.20.0**. Building in the bookworm image does not raise the floor for a 22.04 user. Two consequences for the port, both in the draft `release.yml`: 1. The `docker run node:24-bookworm` load step goes: a container job has no docker socket, and the job's own image IS bookworm, so the load above is that proof. The 22.04 half cannot be re-run in a container job; it was measured once from these steps. 2. `prebuilds` and `publish` collapse into one job, so no artifact crosses a job and `upload-artifact`/`download-artifact` leave the release path. The rehearsal (`workflow_dispatch`, no tag) runs every gate and this leg and stops at `npm publish --dry-run`. A tag release still refuses an incomplete prebuild set, as it does today: until the other four platforms are decided in the release menu, the tag path stops there by name instead of publishing a package that cannot load on four of the five.
Author
Member

State at park (Supervisor cut the crew to 6, Ceres parked): branch ceres/2-forge-release-port at 54b3ff7 (the r=1 fold-in is in), PR 3 open, and the rehearsal run 3309 of release.yml is still queued on the host00 runner — so there is no fresh GREEN ci= line for this tip yet and I am not handing it off. Neptunus's content PASS stands on bd4034f..c7bc9fb plus the fold-in.

Note for whoever picks it up: the push also fired the repository ci.yml (run 3307, failed at workflow level with no jobs) and docs.yml (3308) — those are the still-GitHub-shaped workflows, a separate port, not this package's release path. Actions is ON now, so a dispatch of release.yml on the branch reproduces the rehearsal: POST /repos/macula-io/macula-ts/actions/workflows/release.yml/dispatches with ref ceres/2-forge-release-port.

State at park (Supervisor cut the crew to 6, Ceres parked): branch `ceres/2-forge-release-port` at **54b3ff7** (the r=1 fold-in is in), PR 3 open, and the rehearsal run 3309 of release.yml is still **queued** on the host00 runner — so there is no fresh GREEN ci= line for this tip yet and I am not handing it off. Neptunus's content PASS stands on bd4034f..c7bc9fb plus the fold-in. Note for whoever picks it up: the push also fired the repository ci.yml (run 3307, failed at workflow level with no jobs) and docs.yml (3308) — those are the still-GitHub-shaped workflows, a separate port, not this package's release path. Actions is ON now, so a dispatch of release.yml on the branch reproduces the rehearsal: `POST /repos/macula-io/macula-ts/actions/workflows/release.yml/dispatches` with ref `ceres/2-forge-release-port`.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
macula-io/macula-ts#2
No description provided.