Release path: Packagist reads the public mirror, and a forge webhook serves the tag at once #2

Open
opened 2026-11-24 02:14:01 +00:00 by pallas · 6 comments
Member

Purpose (infrastructure): a tag pushed to git.macula.io reaches Packagist without GitHub, so composer require macula-io/macula-php keeps resolving new releases.

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

What happens today

Packagist reads https://github.com/macula-io/macula-php and serves a tag the moment it is pushed there (.github/workflows/ci.yml:68 says so). GitHub is stopped (rgfaber suspended), so a tag pushed anywhere else releases nothing, and the weekly crawl finds nothing new.

What this changes

  1. Packagist's repository URL for macula-io/macula-php moves to the public mirror https://pushin.eu/macula-io/macula-php. That is an owner step in the Packagist UI (forge-setup#30 section 2, step 5).
  2. A webhook on this repository posts to Packagist's update-package API when a tag is pushed, so the tag is served at once instead of waiting for the crawl.
  3. RELEASING.md says how a release is cut now, and the README's dead GitHub CI badge goes.

What waits on a token

The webhook URL carries Packagist's SAFE API token, which Raf writes to ~/.config/forge/packagist.token (0600). Nothing here reads it aloud or prints it.

Creating the hook also needs repository admin: a member token has push and pull and admin: false on this repository (measured 2026-11-24), so the account that creates it is named in the runbook rather than assumed.

Done when

  • a tag pushed to this forge repository appears on Packagist within minutes, carrying the same version string;
  • the README carries no dead GitHub CI badge.
**Purpose (infrastructure):** a tag pushed to git.macula.io reaches Packagist without GitHub, so `composer require macula-io/macula-php` keeps resolving new releases. Refs macula-io/forge-setup#30 (section 4, step 1). DECIDED 2026-11-24 "Yes, token plan (Recommended)". ## What happens today Packagist reads `https://github.com/macula-io/macula-php` and serves a tag the moment it is pushed there (`.github/workflows/ci.yml:68` says so). GitHub is stopped (rgfaber suspended), so a tag pushed anywhere else releases nothing, and the weekly crawl finds nothing new. ## What this changes 1. Packagist's repository URL for `macula-io/macula-php` moves to the public mirror `https://pushin.eu/macula-io/macula-php`. That is an owner step in the Packagist UI (forge-setup#30 section 2, step 5). 2. A webhook on this repository posts to Packagist's `update-package` API when a tag is pushed, so the tag is served at once instead of waiting for the crawl. 3. `RELEASING.md` says how a release is cut now, and the README's dead GitHub CI badge goes. ## What waits on a token The webhook URL carries Packagist's SAFE API token, which Raf writes to `~/.config/forge/packagist.token` (0600). Nothing here reads it aloud or prints it. Creating the hook also needs repository **admin**: a member token has `push` and `pull` and `admin: false` on this repository (measured 2026-11-24), so the account that creates it is named in the runbook rather than assumed. ## Done when - a tag pushed to this forge repository appears on Packagist within minutes, carrying the same version string; - the README carries no dead GitHub CI badge.
Author
Member

What is prepared, in PR 3 (pallas/2-forge-release, tip 2f440a4):

  • RELEASING.md — the path, the one-time setup and the runbook line for the token step.
  • scripts/verify-packagist-webhook.sh — reads the hook back as an admin, prints it with the API token masked, and names what is wrong; --test fires one delivery.
  • README.md — the dead GitHub badge is gone, and a Releases section points at the mirror.

One finding that shapes the step: the hook cannot be made over the API. Forgejo 15.0.12 routers/api/v1/utils/hook.go fills a hook's metadata for Slack alone, and services/webhook/packagist.go takes the target URL and the package URL only from the web form — an API-made Packagist hook would post an empty package URL. So it is a web-UI step, with the three values in RELEASING.md.

The verifier's refusal path is proven against the forge: a member token is refused by name (user should be an owner or a collaborator with admin write), which is also the measured admin: false on this repository — the step needs an admin account, not a member one.

What is prepared, in PR 3 (`pallas/2-forge-release`, tip `2f440a4`): - `RELEASING.md` — the path, the one-time setup and the runbook line for the token step. - `scripts/verify-packagist-webhook.sh` — reads the hook back as an admin, prints it with the API token masked, and names what is wrong; `--test` fires one delivery. - `README.md` — the dead GitHub badge is gone, and a Releases section points at the mirror. One finding that shapes the step: **the hook cannot be made over the API.** Forgejo 15.0.12 `routers/api/v1/utils/hook.go` fills a hook's metadata for Slack alone, and `services/webhook/packagist.go` takes the target URL and the package URL only from the web form — an API-made Packagist hook would post an empty package URL. So it is a web-UI step, with the three values in `RELEASING.md`. The verifier's refusal path is proven against the forge: a member token is refused by name (`user should be an owner or a collaborator with admin write`), which is also the measured `admin: false` on this repository — the step needs an admin account, not a member one.
Author
Member

The Supervisor's ruling closes the webhook finding on this issue: there is no webhook and no web form. The release job tells Packagist itself.

What that means here: .github/workflows/release.yml (release, on a v* tag) waits for the tag to reach the pushin.eu mirror (bounded, 5 minutes, failing with the tag and mirror it waited for), then POSTs to https://packagist.org/api/update-package?username=beamologist&apiToken=<secret> with {"repository":{"url":"https://packagist.org/packages/macula-io/macula-php"}}. The token comes from the PACKAGIST_TOKEN repository secret and is never printed. The verifier script is dropped and RELEASING.md describes the job step instead.

Proven while folding it in: the mirror wait passes on a tag it has (v0.11.0) and fails on one it does not, naming the tag and the mirror; the Packagist step refuses with the secret unset, and with a deliberately wrong token Packagist answered 403, so the endpoint and body reach Packagist and the saved answer carries no token.

The Supervisor's ruling closes the webhook finding on this issue: there is no webhook and no web form. The release job tells Packagist itself. What that means here: `.github/workflows/release.yml` (`release`, on a `v*` tag) waits for the tag to reach the pushin.eu mirror (bounded, 5 minutes, failing with the tag and mirror it waited for), then POSTs to `https://packagist.org/api/update-package?username=beamologist&apiToken=<secret>` with `{"repository":{"url":"https://packagist.org/packages/macula-io/macula-php"}}`. The token comes from the `PACKAGIST_TOKEN` repository secret and is never printed. The verifier script is dropped and `RELEASING.md` describes the job step instead. Proven while folding it in: the mirror wait passes on a tag it has (`v0.11.0`) and fails on one it does not, naming the tag and the mirror; the Packagist step refuses with the secret unset, and with a deliberately wrong token Packagist answered 403, so the endpoint and body reach Packagist and the saved answer carries no token.
Author
Member

Port state after the Supervisor's rulings (r=2, tip 7d050eb) — the open points, named here as the ruling asks:

  1. docs and advisories are out of ci.yml. Both were uses: calls into macula-io/macula-ci-images, which is PRIVATE on the forge; a cross-repository reusable resolves only against a public target, and Forgejo 15 ignores the if: of a uses: job that fails to expand, so no such call may stay and none can be guarded. Two ways back, each its own change: make macula-ci-images public on the forge, or copy both files in as stand-ins, the way the ported mcl-* repositories hold theirs. macula-codebase-checks#8 and #11 read those jobs by name, so the gap shows there.
  2. php-test cannot go green yet. composer build takes libmacula from macula-go's GitHub releases, and GitHub is stopped. The step is kept and fails loudly rather than skipped; it unblocks when macula-go's port serves that artifact from the forge (forge-setup#30 section 4 step 6).
  3. No macOS, Windows or android job exists in this repository, so the if: github.server_url == 'https://github.com' guard has nothing to apply to here.
  4. The image pins are the FORGE's registry by digest (git.macula.io/macula-io/macula-ci-otp@sha256:3e202cf7…, tag 20261123-0050); the ghcr pin this branch first carried was mine and is gone from both workflows.
Port state after the Supervisor's rulings (r=2, tip `7d050eb`) — the open points, named here as the ruling asks: 1. **`docs` and `advisories` are out of `ci.yml`.** Both were `uses:` calls into `macula-io/macula-ci-images`, which is PRIVATE on the forge; a cross-repository reusable resolves only against a public target, and Forgejo 15 ignores the `if:` of a `uses:` job that fails to expand, so no such call may stay and none can be guarded. Two ways back, each its own change: make macula-ci-images public on the forge, or copy both files in as stand-ins, the way the ported mcl-* repositories hold theirs. `macula-codebase-checks#8` and `#11` read those jobs by name, so the gap shows there. 2. **`php-test` cannot go green yet.** `composer build` takes libmacula from macula-go's GitHub releases, and GitHub is stopped. The step is kept and fails loudly rather than skipped; it unblocks when macula-go's port serves that artifact from the forge (forge-setup#30 section 4 step 6). 3. **No macOS, Windows or android job exists in this repository**, so the `if: github.server_url == 'https://github.com'` guard has nothing to apply to here. 4. The image pins are the FORGE's registry by digest (`git.macula.io/macula-io/macula-ci-otp@sha256:3e202cf7…`, tag 20261123-0050); the ghcr pin this branch first carried was mine and is gone from both workflows.
Author
Member

Actions on and the dispatch proof wait for the go port. The Supervisor's ruling: macula-php lands with Actions off, and the GO comes after macula-go's port lands, because php-test cannot go green until composer build can take libmacula from something other than GitHub's releases (forge-setup#30 section 4 step 6).

Open points now, as they stand:

  1. Stand-ins are in (r=2, tip 9cda8ff): ci-images-doc-snippets-php.yml and ci-images-dependency-advisories.yml are macula-ci-images' own files at 476b5724, byte for byte below a STAND-IN header, called locally — the advisory scan and the doc gate stay in CI. Check: tail -n +15 <file> | diff - <(git -C <macula-ci-images> show 476b5724:.github/workflows/<name>).
  2. php-test is red until libmacula is off GitHub (composer build), which the go port settles.
  3. Actions are off, and the dispatch proof follows the GO.
  4. No macOS, Windows or android job exists here, so the GitHub-only guard has nothing to apply to.
**Actions on and the dispatch proof wait for the go port.** The Supervisor's ruling: macula-php lands with Actions off, and the GO comes after macula-go's port lands, because `php-test` cannot go green until `composer build` can take libmacula from something other than GitHub's releases (forge-setup#30 section 4 step 6). Open points now, as they stand: 1. **Stand-ins are in** (r=2, tip `9cda8ff`): `ci-images-doc-snippets-php.yml` and `ci-images-dependency-advisories.yml` are macula-ci-images' own files at `476b5724`, byte for byte below a STAND-IN header, called locally — the advisory scan and the doc gate stay in CI. Check: `tail -n +15 <file> | diff - <(git -C <macula-ci-images> show 476b5724:.github/workflows/<name>)`. 2. **php-test is red until libmacula is off GitHub** (`composer build`), which the go port settles. 3. **Actions are off**, and the dispatch proof follows the GO. 4. No macOS, Windows or android job exists here, so the GitHub-only guard has nothing to apply to.
Author
Member

Mercurius PASSed r=2, his small fix is in, and I PASS his lines. Tip 5e17cc25 (12 lines over 9cda8ff): the three jobs that run inside the forge's own image — php-test, erlang-helper-lint, and the release Packagist job — now name the org's read-only pull account in container.credentials (vars.CI_IMAGE_PULL_USER / secrets.CI_IMAGE_PULL_TOKEN). Why: the forge's registry answers an anonymous pull of macula-ci-otp@sha256:3e202cf7… with 401.

What I checked on those lines:

  • Same shape and names as macula-portal's lint.yml and docker-publish.yml, and portal's container jobs ran green on this forge at 2026-11-24T02:34Z (tasks 8036, 8037) — live proof that act_runner honours container.credentials here.
  • The account is org-level, so it reaches this repository: the pull-account.sh line in forge-setup's README sets CI_IMAGE_PULL_TOKEN as the macula-io org Actions secret and CI_IMAGE_PULL_USER as the org variable (rotated by pull-account-all-orgs.sh).
  • Every job that pulls an image is covered. docs and advisories run without a container, on the runner's own image; the advisories stand-in's advisories-in-container job is gated if: inputs.container != '' and this caller passes none, so it skips.
  • actionlint clean on ci.yml and release.yml; the only findings are the known ones inside the two byte-for-byte stand-in files.

Open point 4 above is settled accordingly.

Open point 5 — sealed-interop.yml still says runs-on: ubuntu-24.04, on every pull_request and push, and no look at the forge's labels was made for it: it would sit queued. It belongs with the go port, since it needs libmacula — the same thing php-test waits for. It must be ported before Actions go on.

The tip is 5e17cc25 and PR 3 is ready for Terra to land.

**Mercurius PASSed r=2, his small fix is in, and I PASS his lines.** Tip `5e17cc25` (12 lines over `9cda8ff`): the three jobs that run inside the forge's own image — `php-test`, `erlang-helper-lint`, and the `release` Packagist job — now name the org's read-only pull account in `container.credentials` (`vars.CI_IMAGE_PULL_USER` / `secrets.CI_IMAGE_PULL_TOKEN`). Why: the forge's registry answers an anonymous pull of `macula-ci-otp@sha256:3e202cf7…` with 401. What I checked on those lines: - Same shape and names as macula-portal's `lint.yml` and `docker-publish.yml`, and portal's container jobs ran green on this forge at 2026-11-24T02:34Z (tasks 8036, 8037) — live proof that act_runner honours `container.credentials` here. - The account is org-level, so it reaches this repository: the `pull-account.sh` line in forge-setup's README sets `CI_IMAGE_PULL_TOKEN` as the macula-io **org** Actions secret and `CI_IMAGE_PULL_USER` as the org variable (rotated by `pull-account-all-orgs.sh`). - Every job that pulls an image is covered. `docs` and `advisories` run without a container, on the runner's own image; the advisories stand-in's `advisories-in-container` job is gated `if: inputs.container != ''` and this caller passes none, so it skips. - actionlint clean on `ci.yml` and `release.yml`; the only findings are the known ones inside the two byte-for-byte stand-in files. Open point 4 above is settled accordingly. **Open point 5 — `sealed-interop.yml` still says `runs-on: ubuntu-24.04`**, on every `pull_request` and `push`, and no look at the forge's labels was made for it: it would sit queued. It belongs with the go port, since it needs libmacula — the same thing `php-test` waits for. It must be ported before Actions go on. The tip is `5e17cc25` and PR 3 is ready for Terra to land.
Author
Member

Packagist is dropped; the release publishes to the forge's own Composer registry. DECIDED 2026-11-24 "we will ONLY use our own package management on the forge....no API key theatre we are sovereign". PR 4 (pallas/2-composer-registry, tip 5c977ff) replaces the Packagist step: the tag's job zips the tagged tree and PUTs it to /api/packages/macula-sdk/composer?version=<tag> as the repository's forge publisher account, then reads the registry's p2 metadata back with no credentials and fails if the version is not there. The Packagist call, its PACKAGIST_TOKEN and the mirror wait are gone — the upload needs no mirror. RELEASING.md and the README name the registry a consumer adds; ci.yml's two gate comments follow.

The issue's title still says Packagist reads the public mirror. That path no longer exists; the title is the Supervisor's to change if the issue stays open as the release record.

Two things wait outside this repository, named so they are not lost:

  1. The org macula-sdk does not exist yet (macula-io/forge-setup#36), so nothing can be published to it and the read-back cannot be exercised end to end.
  2. A publisher account that may write packages in macula-sdk — an account with write:package on that org, no repositories, its token written by the owner to ~/.config/forge/<name>.token (0600), then the repository variable FORGE_PACKAGES_USER and the secret FORGE_PACKAGES_TOKEN. Its script is the shape of image-build/publisher-account.sh in macula-io/forge-setup. Until both are set the release job fails at its upload, saying which one is missing.

The first real tag is also the point at which FORGE_PACKAGES_TOKEN's scope is proven: the upload runs in the macula-io repository and writes a package in macula-sdk, so the token, not the run's own token, is what carries it.

**Packagist is dropped; the release publishes to the forge's own Composer registry.** DECIDED 2026-11-24 "we will ONLY use our own package management on the forge....no API key theatre we are sovereign". PR 4 (`pallas/2-composer-registry`, tip `5c977ff`) replaces the Packagist step: the tag's job zips the tagged tree and PUTs it to `/api/packages/macula-sdk/composer?version=<tag>` as the repository's forge publisher account, then reads the registry's `p2` metadata back **with no credentials** and fails if the version is not there. The Packagist call, its `PACKAGIST_TOKEN` and the mirror wait are gone — the upload needs no mirror. `RELEASING.md` and the README name the registry a consumer adds; `ci.yml`'s two gate comments follow. The issue's title still says Packagist reads the public mirror. That path no longer exists; the title is the Supervisor's to change if the issue stays open as the release record. **Two things wait outside this repository**, named so they are not lost: 1. **The org `macula-sdk`** does not exist yet (macula-io/forge-setup#36), so nothing can be published to it and the read-back cannot be exercised end to end. 2. **A publisher account that may write packages in `macula-sdk`** — an account with `write:package` on that org, no repositories, its token written by the owner to `~/.config/forge/<name>.token` (0600), then the repository variable `FORGE_PACKAGES_USER` and the secret `FORGE_PACKAGES_TOKEN`. Its script is the shape of `image-build/publisher-account.sh` in macula-io/forge-setup. Until both are set the `release` job fails at its upload, saying which one is missing. The first real tag is also the point at which `FORGE_PACKAGES_TOKEN`'s scope is proven: the upload runs in the `macula-io` repository and writes a package in `macula-sdk`, so the token, not the run's own token, is what carries it.
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-php#2
No description provided.