Release on the forge: twine to the forge PyPI, and every job on our runner #2

Open
opened 2026-11-24 03:11:47 +00:00 by hygiea · 1 comment
Member

Purpose (port): a v* tag on this repository publishes that version to the forge's own PyPI registry from git.macula.io — nothing on GitHub, and no registry outside the forge.

DECIDED 2026-11-24 "we will ONLY use our own package management on the forge....no API key theatre we are sovereign" (Raf, macula-io/forge-setup#30 c3130), whose py line reads "twine to the forge PyPI". Refs macula-io/forge-setup#30, macula-io/forge-setup#36 (macula-sdk, the public package org), macula-io/macula-rust#2 (the same port, already landed), macula-io/macula-go#3.

What the port changes

GitHub CI is stopped (has_actions=false on this repo, read back today). Every job moves to the forge's own runner: this repository is private, so the runner is the local host00 one, label docker, in the pinned CI image by digest, pulled with the org's CI_IMAGE_PULL_USER / CI_IMAGE_PULL_TOKEN.

  • Publish. pypa/gh-action-pypi-publish@release/v1 with id-token: write and environment: pypi (release.yml:87-109) is Trusted Publishing, which exists only for GitHub/GitLab/Google Cloud and cannot work here. It becomes twine upload to https://git.macula.io/api/packages/macula-sdk/pypi, authenticating with the repository's own publisher account in macula-sdk: user FORGE_PACKAGES_USER (org variable, sdk-publisher) and password FORGE_PACKAGES_TOKEN (repository secret). No PyPI account, no PyPI token, no OIDC.
  • Trigger. Still push: tags: ["v*"]; a workflow_dispatch is added for the no-token proof. Only a push publishes: the publish step is guarded on the event, never on anything a dispatch carries, so no input reaches the upload.
  • Marketplace actions. actions/checkout@v4, actions/setup-go@v5, actions/setup-python@v5, actions/upload-artifact@v4, actions/download-artifact@v4 and golangci/golangci-lint-action@v8 are JavaScript/bundle actions; a JS action dies at exitcode 127 in a job image with no node (DECIDED 2026-11-22 "do both": forge CI uses no marketplace actions). Checkout becomes the plain-shell block every forge repository carries byte-identically (macula-io/martha#601); the rest become plain shell (pinned tarballs, pip install, a pinned golangci-lint binary) or artifacts through the runner's own workspace.
  • The cross-repository reusable. ci.yml:104 calls macula-io/macula-ci-images/.github/workflows/dependency-advisories.yml@83a76a35; the forge can call into another repository only when that repository is public, and macula-ci-images is private. It becomes a pinned local copy, as macula-rust carries it.
  • The GitHub-only legs. scripts/fetch_native.sh reads gh release download and gh attestation verify against macula-io/macula-go on GitHub, and wheels.yml / release.yml clone https://github.com/macula-io/macula-go.git. Both follow macula-go#3 (libmacula as a macula-sdk generic package) and stay guarded off until that lands.

Established by probe today (2026-11-24)

  • The forge's PyPI upload endpoint wants HTTP Basic. POST /api/packages/macula-sdk/pypi anonymously answers 401 with www-authenticate: Basic realm="Gitea Package API" and body reqPackageAccess; the same POST to a nonexistent owner answers 404 Not found. So twine's basic auth (user + password) is the right form here — not the Cargo registry's Bearer scheme that macula-rust#2 had to add.
  • macula-sdk carries no packages yet (GET /api/v1/packages/macula-sdk → []), and the account sdk-publisher does not exist yet (GET /api/v1/users/sdk-publisher → "user redirect does not exist"). A successful upload therefore cannot be proved until the SDK release menu creates the publisher account and the FORGE_PACKAGES_TOKEN secret; this port stops at a token-free proof.
  • twine has no --dry-run. The token-free proof a dispatch gives is: every job runs, the wheels build, twine check passes on them, and the registry endpoint is reached and seen to want credentials (the 401 above). The upload itself is only exercised by a tag; the first real tag is the SDK release menu's.

Open points, for the Supervisor — not decided here

  • The wheel set. GitHub built five wheels on five platform runners (ubuntu-latest, ubuntu-24.04-arm, macos-latest, macos-15-intel, windows-latest). The forge has one runner, on an x86_64 host. Four of the five cannot be built there, so release.yml's "expected 5 wheels" check and what a forge release actually ships are a ruling, not a port decision. Until it is made, those matrix entries are guarded on server_url and the count check names the platforms the forge can build.
  • What starts a peer. Any leg that dials a station someone else runs is guarded, as macula-go#2's was.

Done when

A v* tag on the forge publishes the version pyproject.toml carries to https://git.macula.io/api/packages/macula-sdk/pypi, read back from the registry's simple index, and a dispatch of the same workflow runs every job and stops before the upload without a token; nothing on GitHub is needed for either.

Purpose (port): a `v*` tag on this repository publishes that version to the forge's own PyPI registry from git.macula.io — nothing on GitHub, and no registry outside the forge. DECIDED 2026-11-24 "we will ONLY use our own package management on the forge....no API key theatre we are sovereign" (Raf, macula-io/forge-setup#30 c3130), whose py line reads "twine to the forge PyPI". Refs macula-io/forge-setup#30, macula-io/forge-setup#36 (macula-sdk, the public package org), macula-io/macula-rust#2 (the same port, already landed), macula-io/macula-go#3. ## What the port changes GitHub CI is stopped (`has_actions=false` on this repo, read back today). Every job moves to the forge's own runner: this repository is private, so the runner is the local host00 one, label `docker`, in the pinned CI image by digest, pulled with the org's `CI_IMAGE_PULL_USER` / `CI_IMAGE_PULL_TOKEN`. - **Publish.** `pypa/gh-action-pypi-publish@release/v1` with `id-token: write` and `environment: pypi` (release.yml:87-109) is Trusted Publishing, which exists only for GitHub/GitLab/Google Cloud and cannot work here. It becomes `twine upload` to `https://git.macula.io/api/packages/macula-sdk/pypi`, authenticating with the repository's own publisher account in macula-sdk: user `FORGE_PACKAGES_USER` (org variable, `sdk-publisher`) and password `FORGE_PACKAGES_TOKEN` (repository secret). No PyPI account, no PyPI token, no OIDC. - **Trigger.** Still `push: tags: ["v*"]`; a `workflow_dispatch` is added for the no-token proof. Only a push publishes: the publish step is guarded on the event, never on anything a dispatch carries, so no input reaches the upload. - **Marketplace actions.** `actions/checkout@v4`, `actions/setup-go@v5`, `actions/setup-python@v5`, `actions/upload-artifact@v4`, `actions/download-artifact@v4` and `golangci/golangci-lint-action@v8` are JavaScript/bundle actions; a JS action dies at exitcode 127 in a job image with no node (DECIDED 2026-11-22 "do both": forge CI uses no marketplace actions). Checkout becomes the plain-shell block every forge repository carries byte-identically (macula-io/martha#601); the rest become plain shell (pinned tarballs, `pip install`, a pinned golangci-lint binary) or artifacts through the runner's own workspace. - **The cross-repository reusable.** ci.yml:104 calls `macula-io/macula-ci-images/.github/workflows/dependency-advisories.yml@83a76a35`; the forge can call into another repository only when that repository is public, and macula-ci-images is private. It becomes a pinned local copy, as macula-rust carries it. - **The GitHub-only legs.** `scripts/fetch_native.sh` reads `gh release download` and `gh attestation verify` against macula-io/macula-go on GitHub, and wheels.yml / release.yml clone `https://github.com/macula-io/macula-go.git`. Both follow macula-go#3 (libmacula as a macula-sdk generic package) and stay guarded off until that lands. ## Established by probe today (2026-11-24) - **The forge's PyPI upload endpoint wants HTTP Basic.** `POST /api/packages/macula-sdk/pypi` anonymously answers `401` with `www-authenticate: Basic realm="Gitea Package API"` and body `reqPackageAccess`; the same POST to a nonexistent owner answers `404 Not found`. So twine's basic auth (user + password) is the right form here — not the Cargo registry's `Bearer` scheme that macula-rust#2 had to add. - `macula-sdk` carries no packages yet (`GET /api/v1/packages/macula-sdk` → `[]`), and the account `sdk-publisher` does not exist yet (`GET /api/v1/users/sdk-publisher` → "user redirect does not exist"). A successful upload therefore cannot be proved until the SDK release menu creates the publisher account and the `FORGE_PACKAGES_TOKEN` secret; this port stops at a token-free proof. - **twine has no `--dry-run`.** The token-free proof a dispatch gives is: every job runs, the wheels build, `twine check` passes on them, and the registry endpoint is reached and seen to want credentials (the 401 above). The upload itself is only exercised by a tag; the first real tag is the SDK release menu's. ## Open points, for the Supervisor — not decided here - **The wheel set.** GitHub built five wheels on five platform runners (`ubuntu-latest`, `ubuntu-24.04-arm`, `macos-latest`, `macos-15-intel`, `windows-latest`). The forge has one runner, on an x86_64 host. Four of the five cannot be built there, so release.yml's "expected 5 wheels" check and what a forge release actually ships are a ruling, not a port decision. Until it is made, those matrix entries are guarded on `server_url` and the count check names the platforms the forge can build. - **What starts a peer.** Any leg that dials a station someone else runs is guarded, as macula-go#2's was. ## Done when A `v*` tag on the forge publishes the version `pyproject.toml` carries to `https://git.macula.io/api/packages/macula-sdk/pypi`, read back from the registry's simple index, and a dispatch of the same workflow runs every job and stops before the upload without a token; nothing on GitHub is needed for either.
Author
Member

Port in PR 3 (hygiea/2-forge-release, main..786ebe85), and what the build established beyond the plan above.

Probes, 2026-11-24. The registry takes HTTP Basic: an anonymous POST /api/packages/macula-sdk/pypi answers 401 with www-authenticate: Basic realm="Gitea Package API"; a nonexistent owner answers 404. macula-sdk carries no packages (GET /api/v1/packages/macula-sdk -> []) and sdk-publisher does not exist (GET /api/v1/users/sdk-publisher -> "user redirect does not exist"), so a successful upload cannot be proved before the SDK release menu creates them. The forge carries macula-go v0.31.0 at 99580b4d, exactly the commit abi/MACULA_GO_REF records, which is why the port clones macula-go from the forge and not from github.com.

Proved locally on this branch (go 1.27.0, the pinned tag): build_native.sh built libmacula, python -m build produced the wheel, twine check --strict passed, and the wheel carries the 13,739,208-byte library. auditwheel and the manylinux tag belong to the job image, not to a local run.

Not yet proved, and blocked on settings rather than code. This repository reads has_actions=false and my token is not its admin, so the token-free dispatch proof cannot run. It needs Actions enabled for macula-io/macula-py, as was done for macula-rust.

Corrected in the port. The five-platform wheel matrix is gone rather than guarded: a matrix entry cannot be excluded by a job-level if: (the matrix context is not available there and actionlint refuses it), and an entry whose runner does not exist leaves the job queued instead of skipped. One job, manylinux_2_28_x86_64, is what the forge can build and prove.

Port in PR 3 (`hygiea/2-forge-release`, main..786ebe85), and what the build established beyond the plan above. **Probes, 2026-11-24.** The registry takes HTTP Basic: an anonymous `POST /api/packages/macula-sdk/pypi` answers `401` with `www-authenticate: Basic realm="Gitea Package API"`; a nonexistent owner answers `404`. `macula-sdk` carries no packages (`GET /api/v1/packages/macula-sdk` -> `[]`) and `sdk-publisher` does not exist (`GET /api/v1/users/sdk-publisher` -> "user redirect does not exist"), so a successful upload cannot be proved before the SDK release menu creates them. The forge carries macula-go `v0.31.0` at `99580b4d`, exactly the commit `abi/MACULA_GO_REF` records, which is why the port clones macula-go from the forge and not from github.com. **Proved locally on this branch** (go 1.27.0, the pinned tag): `build_native.sh` built libmacula, `python -m build` produced the wheel, `twine check --strict` passed, and the wheel carries the 13,739,208-byte library. auditwheel and the manylinux tag belong to the job image, not to a local run. **Not yet proved, and blocked on settings rather than code.** This repository reads `has_actions=false` and my token is not its admin, so the token-free dispatch proof cannot run. It needs Actions enabled for `macula-io/macula-py`, as was done for `macula-rust`. **Corrected in the port.** The five-platform wheel matrix is gone rather than guarded: a matrix entry cannot be excluded by a job-level `if:` (the `matrix` context is not available there and actionlint refuses it), and an entry whose runner does not exist leaves the job queued instead of skipped. One job, manylinux_2_28_x86_64, is what the forge can build and prove.
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-py#2
No description provided.