Migrate whynot-design npm catalog and docs to Forgejo registry
All checks were successful
CI Smoke / host-smoke (push) Successful in 1s
CI Smoke / container-smoke (push) Successful in 3s

Update catalog, docs, tests, and exec_delivery comment for Forgejo npm API.
This commit is contained in:
tegwick 2026-07-09 11:38:15 +02:00
parent ff0dc8aeb2
commit 0ab9c649b9
7 changed files with 10 additions and 10 deletions

View file

@ -41,7 +41,7 @@ delivery_modes:
# the engine never hardcodes a registry. Matches coulomb/whynot-design/.npmrc.
delivery_config:
npm:
registry: "https://gitea.coulomb.social/api/packages/coulomb/npm/"
registry: "https://forgejo.coulomb.social/api/packages/coulomb/npm/"
scope: "@whynot"
package: "@whynot/design"
# Package maturity tag. Under the netkingdom publication-scope policy this

View file

@ -13,7 +13,7 @@
A catalog entry carries `org` + `repo` explicitly (never a bare "owner"), and the
npm registry/scope live in `delivery_config.npm` as data — the engine never
hardcodes a registry. The pilot publishes `@whynot/design` from the
`coulomb/whynot-design` repo to `https://gitea.coulomb.social/api/packages/coulomb/npm/`.
`coulomb/whynot-design` repo to `https://forgejo.coulomb.social/api/packages/coulomb/npm/`.
## Install

View file

@ -63,7 +63,7 @@ when the backend can only enforce a coarser one.
```yaml
delivery_config:
npm:
registry: "https://gitea.coulomb.social/api/packages/coulomb/npm/"
registry: "https://forgejo.coulomb.social/api/packages/coulomb/npm/"
scope: "@whynot"
package: "@whynot/design"
maturity: maturity-build # feeds the policy

View file

@ -16,7 +16,7 @@ prompts, workplans, or normal logs.
| Canonical decision | `e6381a56-6b04-4fd5-b2de-f3ef59cde888` |
| Org/repo | `coulomb/whynot-design` |
| npm package | `@whynot/design` |
| npm registry | `https://gitea.coulomb.social/api/packages/coulomb/npm/` |
| npm registry | `https://forgejo.coulomb.social/api/packages/coulomb/npm/` |
| Catalog mount/path | `secret/coulomb/whynot-design/npm/publish` |
| Catalog field | `npm_token` |
| Injected env var | `NPM_AUTH_TOKEN` |

View file

@ -92,7 +92,7 @@ def _npm_userconfig(registry: str, scope: str, token_env: str) -> Iterator[Path]
os.fchmod(fd, 0o600)
authkey = _registry_authkey(registry)
with os.fdopen(fd, "w") as fh:
# e.g. @whynot:registry=https://gitea.coulomb.social/api/packages/coulomb/npm/
# e.g. @whynot:registry=https://forgejo.coulomb.social/api/packages/coulomb/npm/
fh.write(f"{scope}:registry={registry}\n")
fh.write(f"{authkey}:_authToken=${{{token_env}}}\n")
yield path

View file

@ -97,7 +97,7 @@ def test_repo_catalog_loads_and_has_pilot():
# org=coulomb, repo=whynot-design (not conflated); npm targets Gitea registry
assert pilot.org == "coulomb"
assert pilot.repo == "whynot-design"
assert pilot.npm["registry"].startswith("https://gitea.coulomb.social/")
assert pilot.npm["registry"].startswith("https://forgejo.coulomb.social/")
assert pilot.npm["scope"] == "@whynot"
# SECRETS-WP-0003 closeout uses the canonical State Hub decision UUID;
# the slug-named fixture is retired to offline fallback only.

View file

@ -3,21 +3,21 @@ from secrets_engine.exec_delivery import _npm_userconfig, _registry_authkey
def test_registry_authkey_strips_scheme_and_trails_slash():
assert (
_registry_authkey("https://gitea.coulomb.social/api/packages/coulomb/npm/")
== "//gitea.coulomb.social/api/packages/coulomb/npm/"
_registry_authkey("https://forgejo.coulomb.social/api/packages/coulomb/npm/")
== "//forgejo.coulomb.social/api/packages/coulomb/npm/"
)
# missing trailing slash is added
assert _registry_authkey("https://host/api/npm") == "//host/api/npm/"
def test_npm_userconfig_writes_registry_and_token_ref_not_value():
registry = "https://gitea.coulomb.social/api/packages/coulomb/npm/"
registry = "https://forgejo.coulomb.social/api/packages/coulomb/npm/"
with _npm_userconfig(registry, "@whynot", "NPM_AUTH_TOKEN") as path:
body = path.read_text()
assert f"@whynot:registry={registry}" in body
# token is referenced via env expansion, never written literally
assert "${NPM_AUTH_TOKEN}" in body
assert "//gitea.coulomb.social/api/packages/coulomb/npm/:_authToken" in body
assert "//forgejo.coulomb.social/api/packages/coulomb/npm/:_authToken" in body
# file is mode 0600
assert (path.stat().st_mode & 0o077) == 0
# cleaned up on context exit