diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 3a01954..3e6eb39 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -33,6 +33,9 @@ jobs: - name: Type check run: npm run typecheck + - name: Check repository and image origins + run: npm run test:origins + - name: Build the static export run: npm run build env: @@ -74,7 +77,7 @@ jobs: push: true provenance: false tags: | - ghcr.io/ncecere/omg-docs:${{ github.sha }} - ghcr.io/ncecere/omg-docs:latest + ghcr.io/bitop-dev/omg-docs:${{ github.sha }} + ghcr.io/bitop-dev/omg-docs:latest labels: | org.opencontainers.image.revision=${{ github.sha }} diff --git a/Dockerfile b/Dockerfile index 30039cd..52c287c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,7 +10,7 @@ RUN npm run build FROM docker.io/library/nginx:1.31.6-alpine@sha256:df221db836e1754089190208cee7eeda94f233197056426eda74a43ab1abeac2 -LABEL org.opencontainers.image.source="https://github.com/ncecere/omg-docs" \ +LABEL org.opencontainers.image.source="https://github.com/bitop-dev/omg-docs" \ org.opencontainers.image.description="Open Model Gateway documentation (static site)" \ org.opencontainers.image.licenses="MIT AND CC-BY-4.0" diff --git a/README.md b/README.md index b577875..351c0a6 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Open Model Gateway docs -The user, administrator and operator documentation for [Open Model Gateway](https://github.com/ncecere/open-model-gateway), the self-hosted AI model gateway for one enterprise. It's published at ; the product's website is . Both addresses, the repositories and the release the docs describe are in `lib/site.ts`. +The user, administrator and operator documentation for [Open Model Gateway](https://github.com/bitop-dev/open-model-gateway), the self-hosted AI model gateway for one enterprise. It's published at ; the product's website is . Both addresses, the repositories and the release the docs describe are in `lib/site.ts`. These pages are for the people who call models through the gateway, the administrators who run an installation, and the operators who host it. The Open Model Gateway repository's own `docs/` folder stays the engineering record (contracts, design notes and runbooks). The docs describe **Open Model Gateway v0.10.0**, released 2026-11-02. @@ -22,6 +22,7 @@ npm run dev # http://localhost:3000 | `npm run dev` | Development server with hot reload. | | `npm run build` | The static export, in `out/`, followed by `check-names` (below). | | `npm run check:links` | Checks every internal link and anchor in `out/` (run after a build). | +| `npm run test:origins` | Checks current repository/publishing paths and historical release image/signature references. | | `npm run typecheck` | TypeScript. | | `npm start` | Serves `out/` locally. | | `npm run screenshots` | Imports screenshots (below). | @@ -96,11 +97,15 @@ nginx (Alpine, pinned by digest) runs as user 101 on port 8080, keeps its pid an Pushes to `main` run `.github/workflows/publish.yaml`: it type-checks, builds (including `check-names`) and link-checks the site, then builds and pushes a multi-arch image (linux/amd64, linux/arm64): -- `ghcr.io/ncecere/omg-docs:` -- `ghcr.io/ncecere/omg-docs:latest` +- `ghcr.io/bitop-dev/omg-docs:` +- `ghcr.io/bitop-dev/omg-docs:latest` Pull requests run the checks only. Actions are pinned by commit SHA, and Dependabot opens grouped weekly updates for npm, Actions and the Docker base images. +The docs image now publishes under `bitop-dev`; a deployment still pulling `ghcr.io/ncecere/omg-docs` must be updated separately to receive new builds. This repository does not change the hosting configuration. + +Gateway image examples remain pinned to the release these docs describe, v0.10.0. That release still pulls from `ghcr.io/ncecere/open-model-gateway` and verifies against its original `ncecere` workflow identity. Repository links use `bitop-dev`, but transferring a repository does not move old packages or change existing signing certificates. See [Container and Compose](content/docs/self-hosting/container.mdx#release-images) for the distinction between historical and post-transfer images. + ## Licence - **Code** (the site's source, scripts and configuration): [MIT](LICENSE). diff --git a/app/brand.css b/app/brand.css index 5c83a1e..9726034 100644 --- a/app/brand.css +++ b/app/brand.css @@ -6,7 +6,7 @@ * places at once. * * The values come from Open Model Gateway's own dashboard - * (github.com/ncecere/open-model-gateway, main for v0.3.0), which uses the + * (github.com/bitop-dev/open-model-gateway, main for v0.3.0), which uses the * Bitop UI library: apps/web/src/components/ui/themes/neutral.css (colours: * cool slate neutrals with an indigo accent, light and dark; shadows) and * apps/web/src/components/ui/styles/tokens.css (radii, font stack). The diff --git a/content/docs/api/index.mdx b/content/docs/api/index.mdx index de3cd16..497acd6 100644 --- a/content/docs/api/index.mdx +++ b/content/docs/api/index.mdx @@ -9,7 +9,7 @@ Open Model Gateway has two HTTP APIs: - **The management API** under `/api/v1`, used by the dashboard with browser sessions and, from v0.8.0, by scripts with [admin API tokens](/docs/administration/admin-api-tokens). API keys can't use it. See [Management API](/docs/api/management-api). - Each endpoint accepts a documented subset of the vendor's API, and each provider supports a subset of that. Anything outside it is refused with an error, never silently dropped or changed, except where a page says a field is accepted and dropped. This reference is written by hand from the gateway's source. From v0.10.0 the repository also carries a drift-checked OpenAPI 3.1 document of the supported inference API, [`docs/openapi/inference.openapi.json`](https://github.com/ncecere/open-model-gateway/blob/v0.10.0/docs/openapi/inference.openapi.json) (27 operations), checked against the running gateway and the official OpenAI and Anthropic SDKs. + Each endpoint accepts a documented subset of the vendor's API, and each provider supports a subset of that. Anything outside it is refused with an error, never silently dropped or changed, except where a page says a field is accepted and dropped. This reference is written by hand from the gateway's source. From v0.10.0 the repository also carries a drift-checked OpenAPI 3.1 document of the supported inference API, [`docs/openapi/inference.openapi.json`](https://github.com/bitop-dev/open-model-gateway/blob/v0.10.0/docs/openapi/inference.openapi.json) (27 operations), checked against the running gateway and the official OpenAI and Anthropic SDKs. ## Endpoints diff --git a/content/docs/api/management-api.mdx b/content/docs/api/management-api.mdx index 8edc2ba..2e6ce06 100644 --- a/content/docs/api/management-api.mdx +++ b/content/docs/api/management-api.mdx @@ -57,8 +57,8 @@ Platform Admins and Auditors still see personal workspaces' totals in platform r From v0.10.0 the repository carries drift-checked OpenAPI 3.1 documents: -- [`docs/openapi/management.openapi.json`](https://github.com/ncecere/open-model-gateway/blob/v0.10.0/docs/openapi/management.openapi.json): every management route (251 operations), including each route's access policy and admin API token scope, generated from the gateway's route policy and checked against the real handlers. -- [`docs/openapi/inference.openapi.json`](https://github.com/ncecere/open-model-gateway/blob/v0.10.0/docs/openapi/inference.openapi.json): the supported inference API (27 operations). +- [`docs/openapi/management.openapi.json`](https://github.com/bitop-dev/open-model-gateway/blob/v0.10.0/docs/openapi/management.openapi.json): every management route (251 operations), including each route's access policy and admin API token scope, generated from the gateway's route policy and checked against the real handlers. +- [`docs/openapi/inference.openapi.json`](https://github.com/bitop-dev/open-model-gateway/blob/v0.10.0/docs/openapi/inference.openapi.json): the supported inference API (27 operations). Rules JSON Schema can't express are described in each operation and in `x-omg-*` extensions, which code generators ignore; the extensions are listed in the documents' READMEs beside them. For example, `x-omg-integer-encoding: "json-integer-literal"` records that integers must be JSON integer literals, which ordinary schema validators don't check. @@ -163,7 +163,7 @@ All under `/api/v1`. - `GET /platform/models` also takes `not_in_catalog=` and `not_direct_in=`, to leave out models already in a catalog or assigned to a workspace. - Audit rows name their actor, workspace and target (`actor_name`, `workspace_name`, `target_name`), and key rows their holder (`issued_to_name`), so the dashboard needn't load every user or workspace. -The complete route list, with bodies and responses, is in the [OpenAPI document](#openapi-documents) and the repository's [`docs/management-api.md`](https://github.com/ncecere/open-model-gateway/blob/v0.10.0/docs/management-api.md) and [`docs/governance-api.md`](https://github.com/ncecere/open-model-gateway/blob/v0.10.0/docs/governance-api.md). +The complete route list, with bodies and responses, is in the [OpenAPI document](#openapi-documents) and the repository's [`docs/management-api.md`](https://github.com/bitop-dev/open-model-gateway/blob/v0.10.0/docs/management-api.md) and [`docs/governance-api.md`](https://github.com/bitop-dev/open-model-gateway/blob/v0.10.0/docs/governance-api.md). ## SCIM diff --git a/content/docs/getting-started/try-it-locally.mdx b/content/docs/getting-started/try-it-locally.mdx index f2e0247..1ae1cd6 100644 --- a/content/docs/getting-started/try-it-locally.mdx +++ b/content/docs/getting-started/try-it-locally.mdx @@ -14,7 +14,7 @@ The repository includes a local demo: its own PostgreSQL container, a small Open - Docker with Compose v2 - Rust through `rustup`: the repository pins the compiler (Rust 1.99.1) in `rust-toolchain.toml`, and `rustup` installs it the first time you build - Node.js 22.12 or later, and npm -- A clone of [the repository](https://github.com/ncecere/open-model-gateway) +- A clone of [the repository](https://github.com/bitop-dev/open-model-gateway) ## Start it diff --git a/content/docs/releases/index.mdx b/content/docs/releases/index.mdx index ef62444..a92ccf0 100644 --- a/content/docs/releases/index.mdx +++ b/content/docs/releases/index.mdx @@ -25,7 +25,7 @@ description: Open Model Gateway's releases, what to expect before 1.0, and how r | [v0.2.0](/docs/releases/v0-2-0) | 2026-10-09 | Alerts and notifications, key safety, model compare, SCIM, signing-key refresh, Prometheus metrics, backups, a browser test suite, realtime audio, async jobs, and budget checks that don't slow down with history. Migrations `0011` to `0017`. | | [v0.1.0](/docs/releases/v0-1-0) | 2026-10-08 | The single-enterprise gateway: platform roles, Teams, Projects and personal workspaces, catalogs, price lines, stacked budgets, many workloads and providers, logs, Admin settings and the dashboard. Migrations `0001` to `0010`. | -The full history is in the repository's [commits](https://github.com/ncecere/open-model-gateway/commits/main) and [roadmap](https://github.com/ncecere/open-model-gateway/blob/main/docs/roadmap.md). +The full history is in the repository's [commits](https://github.com/bitop-dev/open-model-gateway/commits/main) and [roadmap](https://github.com/bitop-dev/open-model-gateway/blob/main/docs/roadmap.md). ## Before 1.0 @@ -36,11 +36,11 @@ The full history is in the repository's [commits](https://github.com/ncecere/ope ## How releases are published - Each release is a Git tag, `vX.Y.Z`, on the main branch. -- From v0.3.0, each release publishes a signed container image to `ghcr.io/ncecere/open-model-gateway`, tagged `vX.Y.Z`, `vX.Y` (the newest patch of that minor version) and `latest-release` (the newest release). Images are signed with cosign keyless signing; check the signature (from v0.4.0 use **cosign v3.0 or newer**, since the signature is stored in its bundle format) and deploy by digest. From v0.3.1 the image is distroless, with no shell. See [Container and Compose](/docs/self-hosting/container#release-images). -- Each [GitHub release](https://github.com/ncecere/open-model-gateway/releases) carries the image digest (`open-model-gateway-vX.Y.Z.digest.txt`), an SBOM per platform and `checksums.txt`. +- From v0.3.0, releases publish a signed container image, tagged `vX.Y.Z`, `vX.Y` (the newest patch of that minor version) and `latest-release` (the newest release at that registry path). The releases documented here, through v0.10.0, use `ghcr.io/ncecere/open-model-gateway` and their original signing identity. New images published after the repository transfer will use `ghcr.io/bitop-dev/open-model-gateway` and the `bitop-dev` workflow identity; old images are not moved or re-signed. Follow the target version's GitHub release for the exact path, digest and certificate identity. Images are signed with cosign keyless signing; check the signature (from v0.4.0 use **cosign v3.0 or newer**, since the signature is stored in its bundle format) and deploy by digest. From v0.3.1 the image is distroless, with no shell. See [Container and Compose](/docs/self-hosting/container#release-images). +- Each [GitHub release](https://github.com/bitop-dev/open-model-gateway/releases) carries the image digest (`open-model-gateway-vX.Y.Z.digest.txt`), an SBOM per platform and `checksums.txt`. - Each release's notes are also in the repository, in `docs/releases/` (for example `docs/releases/v0.3.2.md`), and the binary reports its release as the `version` of `gateway_build_info`. -- You can still build the image from the tag with the repository's `Dockerfile`. The manual publishing workflow pushes tested images of `main`, tagged with their full commit SHA, for staging. +- You can still build the image from the tag with the repository's `Dockerfile`. In the v0.10.0 source, the manual publishing workflow pushes tested images of `main`, tagged `sha-`, for staging. ## What's next -From the [roadmap](https://github.com/ncecere/open-model-gateway/blob/main/docs/roadmap.md), planned and not yet built: an OpenRouter video adapter, using uploaded files in chat requests, image edits and image input, content guardrails (designed, not yet built), native batches for Bedrock and Vertex, more of the realtime interface, active health checks, Azure and Google Vertex AI adapters, rolling back configuration changes, requests for model access and access reviews, reconciliation of OpenAI cost exports, and a Terraform provider in its own repository. A plan, not a promise. +From the [roadmap](https://github.com/bitop-dev/open-model-gateway/blob/main/docs/roadmap.md), planned and not yet built: an OpenRouter video adapter, using uploaded files in chat requests, image edits and image input, content guardrails (designed, not yet built), native batches for Bedrock and Vertex, more of the realtime interface, active health checks, Azure and Google Vertex AI adapters, rolling back configuration changes, requests for model access and access reviews, reconciliation of OpenAI cost exports, and a Terraform provider in its own repository. A plan, not a promise. diff --git a/content/docs/releases/v0-10-0.mdx b/content/docs/releases/v0-10-0.mdx index 3500845..aceeab2 100644 --- a/content/docs/releases/v0-10-0.mdx +++ b/content/docs/releases/v0-10-0.mdx @@ -11,8 +11,8 @@ This release publishes OpenAPI 3.1 documents for the management API and the supp Two documents are in the repository at `docs/openapi/`: -- **[Management API](https://github.com/ncecere/open-model-gateway/blob/v0.10.0/docs/openapi/management.openapi.json)**: every management route (251 operations), generated from the gateway's route policies, with each route's access rules, admin-token scopes and error responses. Every documented response is checked against real responses, and request limits are tested over HTTP against a running gateway. -- **[Inference API](https://github.com/ncecere/open-model-gateway/blob/v0.10.0/docs/openapi/inference.openapi.json)**: the supported inference subset (27 operations): models, embeddings, rerank, System One, images, Chat Completions, Responses and Messages (JSON and streaming, tools, usage and refusals), audio, files, batches, the legacy videos route and the realtime WebSocket. The documented examples are replayed through the official OpenAI and Anthropic SDKs. Each protocol keeps its own error format. +- **[Management API](https://github.com/bitop-dev/open-model-gateway/blob/v0.10.0/docs/openapi/management.openapi.json)**: every management route (251 operations), generated from the gateway's route policies, with each route's access rules, admin-token scopes and error responses. Every documented response is checked against real responses, and request limits are tested over HTTP against a running gateway. +- **[Inference API](https://github.com/bitop-dev/open-model-gateway/blob/v0.10.0/docs/openapi/inference.openapi.json)**: the supported inference subset (27 operations): models, embeddings, rerank, System One, images, Chat Completions, Responses and Messages (JSON and streaming, tools, usage and refusals), audio, files, batches, the legacy videos route and the realtime WebSocket. The documented examples are replayed through the official OpenAI and Anthropic SDKs. Each protocol keeps its own error format. **Integers must be JSON integer literals.** Request integers can't have a fraction, an exponent or be `-0` (pagination `offset` accepts `-0` as zero). JSON Schema can't express this, so both documents declare `x-omg-integer-encoding: "json-integer-literal"`; a generic validator accepts `1.0`, but the gateway refuses it. Rules like this that a schema can't state are described in each operation and in the `x-omg-*` extensions, which SDK generators don't use. @@ -91,4 +91,4 @@ With Helm, upgrade the image and chart with `--set migrations.run=true`. See [Up ## Upgrading -The image is `ghcr.io/ncecere/open-model-gateway:v0.10.0@sha256:77a37910d5af8ef26cdacec1f7dac026ba2aee32d9de8fd8ab30c039adbcdbe6`. The [GitHub release](https://github.com/ncecere/open-model-gateway/releases/tag/v0.10.0) has the digest, SBOMs and checksums, and how to verify the signature. See [Upgrades](/docs/self-hosting/upgrades) for the general procedure. +The image is `ghcr.io/ncecere/open-model-gateway:v0.10.0@sha256:77a37910d5af8ef26cdacec1f7dac026ba2aee32d9de8fd8ab30c039adbcdbe6`. The [GitHub release](https://github.com/bitop-dev/open-model-gateway/releases/tag/v0.10.0) has the digest, SBOMs and checksums, and how to verify the signature. See [Upgrades](/docs/self-hosting/upgrades) for the general procedure. diff --git a/content/docs/releases/v0-6-0.mdx b/content/docs/releases/v0-6-0.mdx index d6fa5e8..f075e70 100644 --- a/content/docs/releases/v0-6-0.mdx +++ b/content/docs/releases/v0-6-0.mdx @@ -5,7 +5,7 @@ description: The security release. One outbound address policy, sign-in limits a Released 2026-10-15. Migrations `0038` to `0048`. -This is the security release. Every outbound connection follows one address policy. Sign-in is rate-limited, and people can see and end their own dashboard sessions. The audit log streams to a SIEM, with numbers that let the receiver spot a lost event. People's data can be exported, removed early and put on legal hold, and there's a documented retention period for each kind. File-store master keys can be retired. A new [threat model](https://github.com/ncecere/open-model-gateway/blob/v0.6.0/docs/threat-model.md) maps each threat to the code and tests that address it. +This is the security release. Every outbound connection follows one address policy. Sign-in is rate-limited, and people can see and end their own dashboard sessions. The audit log streams to a SIEM, with numbers that let the receiver spot a lost event. People's data can be exported, removed early and put on legal hold, and there's a documented retention period for each kind. File-store master keys can be retired. A new [threat model](https://github.com/bitop-dev/open-model-gateway/blob/v0.6.0/docs/threat-model.md) maps each threat to the code and tests that address it. Several changes can stop email, sign-in, storage or clients until you act. Read [Before you upgrade](#before-you-upgrade) first. diff --git a/content/docs/releases/v0-6-1.mdx b/content/docs/releases/v0-6-1.mdx index 32000ad..8880885 100644 --- a/content/docs/releases/v0-6-1.mdx +++ b/content/docs/releases/v0-6-1.mdx @@ -25,4 +25,4 @@ Unchanged from [v0.6.0](/docs/releases/v0-6-0#known-limitations). ## Upgrading -The image is `ghcr.io/ncecere/open-model-gateway:v0.6.1@sha256:4125f40b679fdb0ca846a863c131d53459c665b2ab1c41b270af1bcdfa9a9dbe`. The [GitHub release](https://github.com/ncecere/open-model-gateway/releases/tag/v0.6.1) has the digest, SBOMs and checksums, and how to verify the signature. See [Upgrades](/docs/self-hosting/upgrades) for the general procedure. +The image is `ghcr.io/ncecere/open-model-gateway:v0.6.1@sha256:4125f40b679fdb0ca846a863c131d53459c665b2ab1c41b270af1bcdfa9a9dbe`. The [GitHub release](https://github.com/bitop-dev/open-model-gateway/releases/tag/v0.6.1) has the digest, SBOMs and checksums, and how to verify the signature. See [Upgrades](/docs/self-hosting/upgrades) for the general procedure. diff --git a/content/docs/releases/v0-7-0.mdx b/content/docs/releases/v0-7-0.mdx index be52a37..5c9427f 100644 --- a/content/docs/releases/v0-7-0.mdx +++ b/content/docs/releases/v0-7-0.mdx @@ -102,4 +102,4 @@ Unchanged from [v0.6.0](/docs/releases/v0-6-0#known-limitations): independent se ## Upgrading -The image is `ghcr.io/ncecere/open-model-gateway:v0.7.0@sha256:341d104ccb90e5fcda58856240b3b38413bfb0299dfcca532b67302592b200d3`. The [GitHub release](https://github.com/ncecere/open-model-gateway/releases/tag/v0.7.0) has the digest, SBOMs and checksums, and how to verify the signature. See [Upgrades](/docs/self-hosting/upgrades) for the general procedure. +The image is `ghcr.io/ncecere/open-model-gateway:v0.7.0@sha256:341d104ccb90e5fcda58856240b3b38413bfb0299dfcca532b67302592b200d3`. The [GitHub release](https://github.com/bitop-dev/open-model-gateway/releases/tag/v0.7.0) has the digest, SBOMs and checksums, and how to verify the signature. See [Upgrades](/docs/self-hosting/upgrades) for the general procedure. diff --git a/content/docs/releases/v0-7-1.mdx b/content/docs/releases/v0-7-1.mdx index 52c43a1..a500c6c 100644 --- a/content/docs/releases/v0-7-1.mdx +++ b/content/docs/releases/v0-7-1.mdx @@ -44,4 +44,4 @@ Coming from v0.6.1, first read the [v0.7.0 precautions](/docs/releases/v0-7-0#be ## Upgrading -The image is `ghcr.io/ncecere/open-model-gateway:v0.7.1@sha256:8e3fba7871fcb6f6e25dcb7bcb209a18731eb2b3cd7f65c27be7668d9ff831a3`. The [GitHub release](https://github.com/ncecere/open-model-gateway/releases/tag/v0.7.1) has the digest, SBOMs and checksums, and how to verify the signature. See [Upgrades](/docs/self-hosting/upgrades) for the general procedure. +The image is `ghcr.io/ncecere/open-model-gateway:v0.7.1@sha256:8e3fba7871fcb6f6e25dcb7bcb209a18731eb2b3cd7f65c27be7668d9ff831a3`. The [GitHub release](https://github.com/bitop-dev/open-model-gateway/releases/tag/v0.7.1) has the digest, SBOMs and checksums, and how to verify the signature. See [Upgrades](/docs/self-hosting/upgrades) for the general procedure. diff --git a/content/docs/releases/v0-7-2.mdx b/content/docs/releases/v0-7-2.mdx index 8bde96e..5dffea4 100644 --- a/content/docs/releases/v0-7-2.mdx +++ b/content/docs/releases/v0-7-2.mdx @@ -46,4 +46,4 @@ Coming from v0.6.1, first read the [v0.7.0 precautions](/docs/releases/v0-7-0#be ## Upgrading -The image is `ghcr.io/ncecere/open-model-gateway:v0.7.2@sha256:1acdb4bedda74baf5c196913f0823c72ff44a1abfdb04666d94843731e3e0376`. The [GitHub release](https://github.com/ncecere/open-model-gateway/releases/tag/v0.7.2) has the digest, SBOMs and checksums, and how to verify the signature. See [Upgrades](/docs/self-hosting/upgrades) for the general procedure. +The image is `ghcr.io/ncecere/open-model-gateway:v0.7.2@sha256:1acdb4bedda74baf5c196913f0823c72ff44a1abfdb04666d94843731e3e0376`. The [GitHub release](https://github.com/bitop-dev/open-model-gateway/releases/tag/v0.7.2) has the digest, SBOMs and checksums, and how to verify the signature. See [Upgrades](/docs/self-hosting/upgrades) for the general procedure. diff --git a/content/docs/releases/v0-8-0.mdx b/content/docs/releases/v0-8-0.mdx index 3d585f1..90a223b 100644 --- a/content/docs/releases/v0-8-0.mdx +++ b/content/docs/releases/v0-8-0.mdx @@ -142,4 +142,4 @@ Coming from v0.6.1 or earlier, first read the [v0.7.0 precautions](/docs/release ## Upgrading -The image is `ghcr.io/ncecere/open-model-gateway:v0.8.0@sha256:cd42d60638552c6f39a566732f74775d0a3df032ba9c14a058011ecf5296ebda`. The [GitHub release](https://github.com/ncecere/open-model-gateway/releases/tag/v0.8.0) has the digest, SBOMs and checksums, and how to verify the signature. See [Upgrades](/docs/self-hosting/upgrades) for the general procedure. +The image is `ghcr.io/ncecere/open-model-gateway:v0.8.0@sha256:cd42d60638552c6f39a566732f74775d0a3df032ba9c14a058011ecf5296ebda`. The [GitHub release](https://github.com/bitop-dev/open-model-gateway/releases/tag/v0.8.0) has the digest, SBOMs and checksums, and how to verify the signature. See [Upgrades](/docs/self-hosting/upgrades) for the general procedure. diff --git a/content/docs/releases/v0-9-0.mdx b/content/docs/releases/v0-9-0.mdx index c820772..aa636cc 100644 --- a/content/docs/releases/v0-9-0.mdx +++ b/content/docs/releases/v0-9-0.mdx @@ -67,7 +67,7 @@ Neither retries nor affects readiness. When a collector's address is refused by - **Cache controls need a price that covers them.** A native request that uses prompt caching needs a v2 or v3 price that prices cache reads and every cache-write TTL it asks for. - Structured output, strict tools and server tools are still refused. The Messages output limit rises to 16 MiB. -See [Messages](/docs/api/messages) and the repository's [Claude Code setup](https://github.com/ncecere/open-model-gateway/blob/v0.9.0/docs/claude-code.md). +See [Messages](/docs/api/messages) and the repository's [Claude Code setup](https://github.com/bitop-dev/open-model-gateway/blob/v0.9.0/docs/claude-code.md). ## Route history and previews @@ -89,7 +89,7 @@ Platform Admins can upload closed **Anthropic Cost Report** JSON periods, map th - **Local endpoint approvals in special-use ranges stop startup.** v0.8.0 warned; now `serve` refuses to start if `GATEWAY_LOCAL_UPSTREAMS` approves an address in `198.18.0.0/15`, `2001:2::/48`, `192.0.0.0/24`, `192.88.99.0/24`, `192.0.2.0/24`, `198.51.100.0/24`, `203.0.113.0/24`, `2001:db8::/32`, `3fff::/20` or any of `fd00:ec2::/32` (over HTTP or HTTPS). Addresses with an IPv4 address inside are judged by that address. The error names each approval and the setting. Replace the address with the server's real public or private address, or remove the approval. Only `serve` is affected; a replica that fails never becomes ready, so a rolling deployment keeps the old replicas. - **The runtime role loses `TEMPORARY`.** `grants apply` now revokes it from `PUBLIC` and from the runtime role on the gateway's database, and `grants verify` checks that the runtime role can't create a temporary table. Any other role relying on PUBLIC's default `TEMPORARY` loses it too: use a dedicated database for the gateway. -- **New chart-managed CloudNativePG clusters restrict database access.** A fresh install revokes PUBLIC `CONNECT` on `postgres` and `template1`, and PUBLIC `TEMPORARY` on the application database. Existing clusters and external databases are unchanged; the repository documents a [manual fix for existing clusters](https://github.com/ncecere/open-model-gateway/blob/v0.9.0/docs/postgresql-ha.md#existing-cnpg-cluster-acl-remediation-315). +- **New chart-managed CloudNativePG clusters restrict database access.** A fresh install revokes PUBLIC `CONNECT` on `postgres` and `template1`, and PUBLIC `TEMPORARY` on the application database. Existing clusters and external databases are unchanged; the repository documents a [manual fix for existing clusters](https://github.com/bitop-dev/open-model-gateway/blob/v0.9.0/docs/postgresql-ha.md#existing-cnpg-cluster-acl-remediation-315). - **Development-only HTTP exports go only to loopback.** With `GATEWAY_ENV=development`, plain-HTTP OTLP traces, metrics and logs and audit webhooks and OTLP connect only if every resolved address is loopback. Use HTTPS to export to another host. Production installations never allowed plain HTTP and are unaffected. - **Another owner's personal workspace returns `404`** on workspace routes, the same as an unknown id, including for Platform Admins and Auditors (was `403`). - **Additive fields** on alert deliveries, workspaces (`discoverable`) and deployments (`revision`). Consumers that reject unknown fields need updating. @@ -163,4 +163,4 @@ Coming from an earlier release, first follow the [v0.8.0 upgrade guide](/docs/re ## Upgrading -The image is `ghcr.io/ncecere/open-model-gateway:v0.9.0@sha256:fb4ac91bae8aeeed8da5f1203d610c03c0202b60fe236db69e2470a2d816fb39`. The [GitHub release](https://github.com/ncecere/open-model-gateway/releases/tag/v0.9.0) has the digest, SBOMs and checksums, and how to verify the signature. See [Upgrades](/docs/self-hosting/upgrades) for the general procedure. +The image is `ghcr.io/ncecere/open-model-gateway:v0.9.0@sha256:fb4ac91bae8aeeed8da5f1203d610c03c0202b60fe236db69e2470a2d816fb39`. The [GitHub release](https://github.com/bitop-dev/open-model-gateway/releases/tag/v0.9.0) has the digest, SBOMs and checksums, and how to verify the signature. See [Upgrades](/docs/self-hosting/upgrades) for the general procedure. diff --git a/content/docs/releases/v0-9-1.mdx b/content/docs/releases/v0-9-1.mdx index 91940f2..0558585 100644 --- a/content/docs/releases/v0-9-1.mdx +++ b/content/docs/releases/v0-9-1.mdx @@ -36,4 +36,4 @@ Coming from an earlier release, first follow the [v0.9.0 upgrade guide](/docs/re ## Upgrading -The image is `ghcr.io/ncecere/open-model-gateway:v0.9.1@sha256:da03b565093fded73b6ddbc636d56b60811b4c5dcbfc4956ce62bf4efe0cb819`. The [GitHub release](https://github.com/ncecere/open-model-gateway/releases/tag/v0.9.1) has the digest, SBOMs and checksums, and how to verify the signature. See [Upgrades](/docs/self-hosting/upgrades) for the general procedure. +The image is `ghcr.io/ncecere/open-model-gateway:v0.9.1@sha256:da03b565093fded73b6ddbc636d56b60811b4c5dcbfc4956ce62bf4efe0cb819`. The [GitHub release](https://github.com/bitop-dev/open-model-gateway/releases/tag/v0.9.1) has the digest, SBOMs and checksums, and how to verify the signature. See [Upgrades](/docs/self-hosting/upgrades) for the general procedure. diff --git a/content/docs/releases/v0-9-2.mdx b/content/docs/releases/v0-9-2.mdx index 96fff3c..2c5640f 100644 --- a/content/docs/releases/v0-9-2.mdx +++ b/content/docs/releases/v0-9-2.mdx @@ -26,4 +26,4 @@ Coming from an earlier release, first follow the [v0.9.1 upgrade guide](/docs/re ## Upgrading -The image is `ghcr.io/ncecere/open-model-gateway:v0.9.2@sha256:c4bb844addeebeadfe3e71c9f756c22e55eccf1d9474958995436e64a43f4b44`. The [GitHub release](https://github.com/ncecere/open-model-gateway/releases/tag/v0.9.2) has the digest, SBOMs and checksums, and how to verify the signature. See [Upgrades](/docs/self-hosting/upgrades) for the general procedure. +The image is `ghcr.io/ncecere/open-model-gateway:v0.9.2@sha256:c4bb844addeebeadfe3e71c9f756c22e55eccf1d9474958995436e64a43f4b44`. The [GitHub release](https://github.com/bitop-dev/open-model-gateway/releases/tag/v0.9.2) has the digest, SBOMs and checksums, and how to verify the signature. See [Upgrades](/docs/self-hosting/upgrades) for the general procedure. diff --git a/content/docs/releases/v0-9-3.mdx b/content/docs/releases/v0-9-3.mdx index e50f425..3f91064 100644 --- a/content/docs/releases/v0-9-3.mdx +++ b/content/docs/releases/v0-9-3.mdx @@ -56,4 +56,4 @@ Coming from an earlier release, first follow the [v0.9.2 upgrade guide](/docs/re ## Upgrading -The image is `ghcr.io/ncecere/open-model-gateway:v0.9.3@sha256:b345e16645b0dd145bb3c9562d13d1c09b9e782fbf7874fad4af088482256d45`. The [GitHub release](https://github.com/ncecere/open-model-gateway/releases/tag/v0.9.3) has the digest, SBOMs and checksums, and how to verify the signature. See [Upgrades](/docs/self-hosting/upgrades) for the general procedure. +The image is `ghcr.io/ncecere/open-model-gateway:v0.9.3@sha256:b345e16645b0dd145bb3c9562d13d1c09b9e782fbf7874fad4af088482256d45`. The [GitHub release](https://github.com/bitop-dev/open-model-gateway/releases/tag/v0.9.3) has the digest, SBOMs and checksums, and how to verify the signature. See [Upgrades](/docs/self-hosting/upgrades) for the general procedure. diff --git a/content/docs/self-hosting/backups-and-restore.mdx b/content/docs/self-hosting/backups-and-restore.mdx index 59d8724..c85c04d 100644 --- a/content/docs/self-hosting/backups-and-restore.mdx +++ b/content/docs/self-hosting/backups-and-restore.mdx @@ -124,7 +124,7 @@ To recover: 2. Set the recovery target to just before the incident. 3. Promote it, then run the drill checks below before switching over. -Keep the encrypted logical backups as well. Never recover over the live cluster, never run down migrations, and never delete pending or unknown reservations to make numbers add up. See the repository's [HA PostgreSQL guide](https://github.com/ncecere/open-model-gateway/blob/v0.10.0/docs/postgresql-ha.md#backups). +Keep the encrypted logical backups as well. Never recover over the live cluster, never run down migrations, and never delete pending or unknown reservations to make numbers add up. See the repository's [HA PostgreSQL guide](https://github.com/bitop-dev/open-model-gateway/blob/v0.10.0/docs/postgresql-ha.md#backups). ## The restore drill diff --git a/content/docs/self-hosting/container.mdx b/content/docs/self-hosting/container.mdx index 39f72cf..74b8b7f 100644 --- a/content/docs/self-hosting/container.mdx +++ b/content/docs/self-hosting/container.mdx @@ -15,15 +15,19 @@ The image has been distroless since v0.3.1. v0.9.1 moved it from Debian 12 to De ### Release images -From v0.3.0, each release publishes a signed image to `ghcr.io/ncecere/open-model-gateway`, under three tags: +From v0.3.0, releases publish signed images under three tags. The releases described here, through v0.10.0, were published to `ghcr.io/ncecere/open-model-gateway`: | Tag | Points to | |---|---| | `vX.Y.Z`, such as `v0.10.0` | That release. | | `vX.Y`, such as `v0.10` | The newest patch release of that minor version. | -| `latest-release` | The newest release. | +| `latest-release` | The newest release at that registry path. | -Images are signed with cosign keyless signing from the repository's GitHub Actions workflow. Check the signature with **cosign v3.0 or newer** (cosign v2 reports "no signatures found": from v0.4.0, signatures are stored in cosign v3's bundle format), then pin the image by its digest: + + The source now lives at [bitop-dev/open-model-gateway](https://github.com/bitop-dev/open-model-gateway). New images published after the transfer will use `ghcr.io/bitop-dev/open-model-gateway`, with the signing identity `https://github.com/bitop-dev/open-model-gateway/.github/workflows/image.yml@refs/tags/`. Existing images stay at their original registry path and keep their original signing identity; the transfer does not copy or re-sign them. Use the exact image, digest and certificate identity in the target version's [GitHub release](https://github.com/bitop-dev/open-model-gateway/releases). The v0.10.0 examples below deliberately keep `ncecere` for both the image and certificate. + + +Images are signed with cosign keyless signing from the repository's GitHub Actions workflow. Check the signature with **cosign v3.0 or newer** (cosign v2 reports "no signatures found": from v0.4.0, signatures are stored in cosign v3's bundle format), then pin the image by its digest. For v0.10.0: ```sh cosign verify ghcr.io/ncecere/open-model-gateway@sha256:77a37910d5af8ef26cdacec1f7dac026ba2aee32d9de8fd8ab30c039adbcdbe6 \ @@ -44,13 +48,13 @@ Before publishing, release images are scanned for known vulnerabilities (fixable ### Build it yourself ```sh -git clone https://github.com/ncecere/open-model-gateway.git +git clone https://github.com/bitop-dev/open-model-gateway.git cd open-model-gateway git checkout v0.10.0 # the release you want docker build -t open-model-gateway:v0.10.0 . ``` -The repository's manual publishing workflow also pushes a tested image of `main` to `ghcr.io/ncecere/open-model-gateway`, tagged with the full commit SHA, for staging. +In the v0.10.0 source, the manual publishing workflow pushes a tested image of `main` to `ghcr.io/ncecere/open-model-gateway`, tagged `sha-`, for staging. Post-transfer publishing will use `ghcr.io/bitop-dev/open-model-gateway`; check the workflow at the revision you build. | Property | Value | |---|---| diff --git a/content/docs/self-hosting/database-and-migrations.mdx b/content/docs/self-hosting/database-and-migrations.mdx index d913d56..261e644 100644 --- a/content/docs/self-hosting/database-and-migrations.mdx +++ b/content/docs/self-hosting/database-and-migrations.mdx @@ -130,7 +130,7 @@ Some of v0.6.0's migrations take locks worth planning for: `0041` rewrites the s ## Highly available PostgreSQL -The repository's [HA PostgreSQL guide](https://github.com/ncecere/open-model-gateway/blob/v0.10.0/docs/postgresql-ha.md), new in v0.5.0, is for running two or more replicas on a primary with at least one standby. In short: +The repository's [HA PostgreSQL guide](https://github.com/bitop-dev/open-model-gateway/blob/v0.10.0/docs/postgresql-ha.md), new in v0.5.0, is for running two or more replicas on a primary with at least one standby. In short: - **The gateway has no failover logic of its own.** It reaches the primary through a host name that moves on failover. While no primary is reachable it refuses new work (`503 accounting_unavailable`, or `504` if a commit hangs) rather than serving it unaccounted. Requests already running keep their holds and are reconciled as unknown. - **Use a synchronous standby that can't silently become asynchronous.** With asynchronous replication a failover can lose recent admissions, settlements and management changes, such as a key revocation. A primary failover with the chart's legacy two-instance setting lost 16 acknowledged requests' accounting rows. The guide recommends three instances with a required, quorum-based policy; for the chart, see [Production durability policy](/docs/self-hosting/kubernetes#production-durability-policy). diff --git a/content/docs/self-hosting/kubernetes.mdx b/content/docs/self-hosting/kubernetes.mdx index c4ac109..a7e5ebc 100644 --- a/content/docs/self-hosting/kubernetes.mdx +++ b/content/docs/self-hosting/kubernetes.mdx @@ -28,7 +28,7 @@ Other secrets, such as an SMTP password, an alert webhook signing secret, the au - **External** (default): point the chart's database secrets at your own PostgreSQL 17: a managed HA cluster, Patroni, or a CNPG `Cluster` you manage outside the chart. - **Chart-managed CloudNativePG**: the chart renders a CNPG `Cluster` (anti-affinity across nodes) and `Pooler` (PgBouncer, transaction mode) for you, using roles backed by Secrets you pre-create. The chart never writes a password into rendered YAML. By default the cluster has two instances with the legacy `minSyncReplicas: 1` and `maxSyncReplicas: 1`, which can fall back to asynchronous replication and lose acknowledged writes in a failover. For production, use the [durability policy](#production-durability-policy) below. -For failover, replication and sizing, see the repository's [HA PostgreSQL guide](https://github.com/ncecere/open-model-gateway/blob/v0.10.0/docs/postgresql-ha.md) and [Database and migrations](/docs/self-hosting/database-and-migrations#highly-available-postgresql). +For failover, replication and sizing, see the repository's [HA PostgreSQL guide](https://github.com/bitop-dev/open-model-gateway/blob/v0.10.0/docs/postgresql-ha.md) and [Database and migrations](/docs/self-hosting/database-and-migrations#highly-available-postgresql). ### Production durability policy @@ -78,7 +78,7 @@ Before v0.5.0 a chart-managed database needed two steps. That is no longer neces From v0.9.0, a **new** chart-managed cluster restricts database access when it is first created: the runtime role and `PUBLIC` lose `CONNECT` on `postgres` and `template1`, and `TEMPORARY` on the gateway's database. CloudNativePG's own replication, monitoring and pooler roles keep their access. The application database's `CONNECT` stays; table privileges still come only from `grants apply`. -This runs once, at the cluster's first initialization. It doesn't change an existing cluster, a restored one or an external database, and a chart upgrade never reruns it. On a cluster created before v0.9.0, a strict `grants verify` can fail on `maintenance database access`. Don't recreate the cluster or its volumes to fix it: follow the repository's reviewed [manual remediation](https://github.com/ncecere/open-model-gateway/blob/v0.10.0/docs/postgresql-ha.md#existing-cnpg-cluster-acl-remediation-315), run as a PostgreSQL superuser with every gateway stopped. +This runs once, at the cluster's first initialization. It doesn't change an existing cluster, a restored one or an external database, and a chart upgrade never reruns it. On a cluster created before v0.9.0, a strict `grants verify` can fail on `maintenance database access`. Don't recreate the cluster or its volumes to fix it: follow the repository's reviewed [manual remediation](https://github.com/bitop-dev/open-model-gateway/blob/v0.10.0/docs/postgresql-ha.md#existing-cnpg-cluster-acl-remediation-315), run as a PostgreSQL superuser with every gateway stopped. ## Migration Job and runtime grants @@ -177,7 +177,7 @@ networkPolicy: `cnpg.cluster.smartShutdownTimeout` (default 15 seconds, new in v0.5.0) is how long a stopping primary waits for clients before a fast shutdown. CloudNativePG's own default is 180 seconds. The pooler's connections and each replica's `LISTEN` session never close on their own, so with 180 seconds a failover kept writes down for about three minutes on the homelab cluster. -With 15 seconds, at 60 requests a second with three gateway replicas and two database instances, the standby was promoted in 18 seconds. About 22 seconds later, writes stalled again while the old primary rejoined as the synchronous standby. That second outage is not yet explained (#149). +With 15 seconds, at 60 requests a second with three gateway replicas and two database instances, the standby was promoted in 18 seconds. About 22 seconds later, writes stalled again while the old primary rejoined as the synchronous standby. [Gateway #149](https://github.com/bitop-dev/open-model-gateway/issues/149) closed after measurement and source analysis identified this as legacy failover behaviour; the legacy policy can also drop the synchronous quorum to zero and lose acknowledged writes. Use the explicit [production durability policy](#production-durability-policy), not the instance count alone. Requests interrupted by a failover keep their holds and are reconciled as unknown, as long as their reservation reached the promoted standby. A later drill with the legacy two-instance setup lost 16 acknowledged requests' accounting rows, which reconciliation can't recover. Drain timing is no durability safeguard: use the [production durability policy](#production-durability-policy) and check it. diff --git a/content/docs/self-hosting/scaling.mdx b/content/docs/self-hosting/scaling.mdx index 00f0294..f39e7ed 100644 --- a/content/docs/self-hosting/scaling.mdx +++ b/content/docs/self-hosting/scaling.mdx @@ -71,16 +71,16 @@ From v0.5.0 the project tests on its homelab Kubernetes cluster: CloudNativePG 1 **Faults.** Under every fault tested (graceful and hard gateway kills, streams cut midway, a primary failover under load), interrupted attempts kept their holds and were reconciled as unknown. Across 117,256 attempts no reservation stayed pending, nothing was charged twice, and `budget verify` and `history verify` were clean. In v0.6.0, restarting the PgBouncer Pooler under load failed 2 of 5,400 requests, and dropping every replica's `LISTEN` connection failed none. For failover timing, see [Kubernetes](/docs/self-hosting/kubernetes#failover-timing). -**A slow commit no longer stalls the pool.** Before v0.5.0, every successful request refreshed the same routing-health row every 30 seconds. Behind a slow commit they all queued on it, each holding a pooled connection. Now one task per replica refreshes it, and skips it while it is busy (#132). +**A slow commit no longer stalls the pool.** Before v0.5.0, every successful request refreshed the same routing-health row every 30 seconds. Behind a slow commit they all queued on it, each holding a pooled connection. Now one task per replica refreshes it, and skips it while it is busy ([gateway #132](https://github.com/bitop-dev/open-model-gateway/issues/132)). ## Known limits -- **No certified capacity number.** About half the steady-load runs still hit stalls of 17–40 seconds, sometimes without recovering (#132). Clean runs held 100–150 requests a second with p99 under 650 ms. -- **A second write outage after a two-instance failover** is still open (#149), and a primary failover with the legacy two-instance replication setting lost 16 acknowledged requests' accounting rows. Run three database instances with the [durability policy](/docs/self-hosting/kubernetes#production-durability-policy) added in v0.9.3: in the project's drill it lost nothing, at the cost of a write outage of about 34 seconds. +- **No certified capacity number.** About half the steady-load runs still hit stalls of 17–40 seconds, sometimes without recovering ([gateway #132](https://github.com/bitop-dev/open-model-gateway/issues/132)). Clean runs held 100–150 requests a second with p99 under 650 ms. +- **A second write outage after a two-instance failover** was investigated in [gateway #149](https://github.com/bitop-dev/open-model-gateway/issues/149), now closed. The legacy two-instance replication setting can drop its synchronous quorum to zero; a primary failover lost 16 acknowledged requests' accounting rows. Run three database instances with the explicit [durability policy](/docs/self-hosting/kubernetes#production-durability-policy) added in v0.9.3, rather than increasing the instance count alone: in the project's drill it lost nothing, at the cost of a write outage of about 34 seconds. - **The chart's default database sizing is too small for load.** Size it for yours. - One workspace or one key still tops out at a few hundred admissions a second, by design ([above](#per-workspace-and-key-ceiling)). -The repository's [HA PostgreSQL guide](https://github.com/ncecere/open-model-gateway/blob/v0.10.0/docs/postgresql-ha.md) has the details and what hasn't been measured yet. +The repository's [HA PostgreSQL guide](https://github.com/bitop-dev/open-model-gateway/blob/v0.10.0/docs/postgresql-ha.md) has the details and what hasn't been measured yet. ## An optional reporting replica diff --git a/content/docs/self-hosting/security.mdx b/content/docs/self-hosting/security.mdx index c5b7928..5f62dd4 100644 --- a/content/docs/self-hosting/security.mdx +++ b/content/docs/self-hosting/security.mdx @@ -126,7 +126,7 @@ These checks find known issues in what the project depends on. They are not a se ## The threat model -The repository's [threat model](https://github.com/ncecere/open-model-gateway/blob/v0.10.0/docs/threat-model.md) lists threats by area (tenancy, keys and sessions, sign-in, SCIM, accounting, provider credentials and egress, file store, caches, batches and realtime, the dashboard, supply chain, operator actions, audit and retention). For each it names the code and tests that address it, and what remains. It is not a certification or a penetration test. +The repository's [threat model](https://github.com/bitop-dev/open-model-gateway/blob/v0.10.0/docs/threat-model.md) lists threats by area (tenancy, keys and sessions, sign-in, SCIM, accounting, provider credentials and egress, file store, caches, batches and realtime, the dashboard, supply chain, operator actions, audit and retention). For each it names the code and tests that address it, and what remains. It is not a certification or a penetration test. ### Residual risks @@ -165,4 +165,4 @@ As of v0.10.0: there is no certified capacity number; IdP-initiated (back-channe ## Reporting a vulnerability -Follow the repository's [security policy](https://github.com/ncecere/open-model-gateway/blob/main/SECURITY.md) (`SECURITY.md`) and report privately; don't open a public issue. +Follow the repository's [security policy](https://github.com/bitop-dev/open-model-gateway/blob/main/SECURITY.md) (`SECURITY.md`) and report privately; don't open a public issue. diff --git a/lib/site.ts b/lib/site.ts index 8202dc3..697fde4 100644 --- a/lib/site.ts +++ b/lib/site.ts @@ -11,13 +11,13 @@ export const productSite = 'https://omg.bitop.dev'; /** The docs' own repository: "Edit on GitHub" links point here. */ export const gitConfig = { - user: 'ncecere', + user: 'bitop-dev', repo: 'omg-docs', branch: 'main', }; /** The product's repository. */ -export const productRepo = 'https://github.com/ncecere/open-model-gateway'; +export const productRepo = 'https://github.com/bitop-dev/open-model-gateway'; /** The Open Model Gateway release these docs describe. */ export const productVersion = 'v0.10.0'; @@ -29,6 +29,8 @@ export const productReleaseDate = '2026-11-02'; * That release's container image digest (the multi-arch index), verified against the * GitHub release's digest asset and the registry. Deploy as * `ghcr.io/ncecere/open-model-gateway:@`. + * v0.10.0 predates the transfer: its registry path and signing identity stay + * under ncecere even though repository and edit links now use bitop-dev. */ export const productImageDigest = 'sha256:77a37910d5af8ef26cdacec1f7dac026ba2aee32d9de8fd8ab30c039adbcdbe6'; diff --git a/package.json b/package.json index 6e0db7a..634e00a 100644 --- a/package.json +++ b/package.json @@ -12,6 +12,7 @@ "build": "next build", "postbuild": "node scripts/check-names.mjs", "check:links": "node scripts/check-links.mjs", + "test:origins": "node --experimental-strip-types --test scripts/origins.test.mjs", "typecheck": "next typegen && tsc --noEmit", "start": "serve out", "screenshots": "node scripts/import-screenshots.mjs", diff --git a/scripts/origins.test.mjs b/scripts/origins.test.mjs new file mode 100644 index 0000000..c2384ec --- /dev/null +++ b/scripts/origins.test.mjs @@ -0,0 +1,84 @@ +import assert from 'node:assert/strict'; +import { readFileSync, readdirSync } from 'node:fs'; +import { join } from 'node:path'; +import { test } from 'node:test'; +import { editUrl, productRepo, productVersion, productImageDigest } from '../lib/site.ts'; + +const root = new URL('../', import.meta.url); +const read = (path) => readFileSync(new URL(path, root), 'utf8'); +const historicalImage = 'ghcr.io/ncecere/open-model-gateway'; +const historicalIdentity = 'https://github.com/ncecere/open-model-gateway/.github/workflows/image.yml@refs/tags/v0.10.0'; +const digest = 'sha256:77a37910d5af8ef26cdacec1f7dac026ba2aee32d9de8fd8ab30c039adbcdbe6'; +const historicalDigests = { + 'v0.3.0': '', + 'v0.6.1': 'sha256:4125f40b679fdb0ca846a863c131d53459c665b2ab1c41b270af1bcdfa9a9dbe', + 'v0.7.0': 'sha256:341d104ccb90e5fcda58856240b3b38413bfb0299dfcca532b67302592b200d3', + 'v0.7.1': 'sha256:8e3fba7871fcb6f6e25dcb7bcb209a18731eb2b3cd7f65c27be7668d9ff831a3', + 'v0.7.2': 'sha256:1acdb4bedda74baf5c196913f0823c72ff44a1abfdb04666d94843731e3e0376', + 'v0.8.0': 'sha256:cd42d60638552c6f39a566732f74775d0a3df032ba9c14a058011ecf5296ebda', + 'v0.9.0': 'sha256:fb4ac91bae8aeeed8da5f1203d610c03c0202b60fe236db69e2470a2d816fb39', + 'v0.9.1': 'sha256:da03b565093fded73b6ddbc636d56b60811b4c5dcbfc4956ce62bf4efe0cb819', + 'v0.9.2': 'sha256:c4bb844addeebeadfe3e71c9f756c22e55eccf1d9474958995436e64a43f4b44', + 'v0.9.3': 'sha256:b345e16645b0dd145bb3c9562d13d1c09b9e782fbf7874fad4af088482256d45', + 'v0.10.0': digest, +}; + +test('navigation and edit links use the transferred repositories', () => { + assert.equal(productRepo, 'https://github.com/bitop-dev/open-model-gateway'); + assert.equal(editUrl('content/docs/self-hosting/container.mdx'), + 'https://github.com/bitop-dev/omg-docs/blob/main/content/docs/self-hosting/container.mdx'); +}); + +test('docs publishing and image metadata use the organization package', () => { + const workflow = read('.github/workflows/publish.yaml'); + const tags = [...workflow.matchAll(/^\s+(ghcr\.io\/[^\r\n]+)$/gm)].map((match) => match[1]); + assert.deepEqual(tags, [ + 'ghcr.io/bitop-dev/omg-docs:${{ github.sha }}', + 'ghcr.io/bitop-dev/omg-docs:latest', + ]); + assert.match(read('Dockerfile'), /org\.opencontainers\.image\.source="https:\/\/github\.com\/bitop-dev\/omg-docs"/); + assert.match(read('README.md'), /ghcr\.io\/bitop-dev\/omg-docs:/); + assert.match(read('README.md'), /ghcr\.io\/bitop-dev\/omg-docs:latest/); +}); + +test('v0.10.0 pull examples and signature identity remain historical', () => { + assert.equal(productVersion, 'v0.10.0'); + assert.equal(productImageDigest, digest); + const page = read('content/docs/self-hosting/container.mdx'); + assert.ok(page.includes(`cosign verify ${historicalImage}@${digest}`)); + assert.equal(page.match(/--certificate-identity\s+(\S+)/)?.[1], historicalIdentity); + assert.ok(page.includes('--certificate-oidc-issuer https://token.actions.githubusercontent.com')); + // Pull, migrate, provision-user and Compose all use the same released bytes. + assert.equal(page.split(`${historicalImage}:v0.10.0@${digest}`).length - 1, 4); + assert.ok(!page.includes('ghcr.io/bitop-dev/open-model-gateway:v0.10.0')); +}); + +test('historical release pages keep their complete original image references', () => { + for (const name of readdirSync(new URL('content/docs/releases/', root))) { + if (!/^v[\d-]+\.mdx$/.test(name)) continue; + const page = read(`content/docs/releases/${name}`); + const version = name.replace('.mdx', '').replaceAll('-', '.'); + const expected = Object.hasOwn(historicalDigests, version) + ? [`${historicalImage}:${version}${historicalDigests[version] ? `@${historicalDigests[version]}` : ''}`] + : []; + assert.deepEqual([...page.matchAll(/ghcr\.io\/[^\s`]+/g)].map((match) => match[0]), expected, name); + } +}); + +test('source links move while the exact historical signing identity stays', () => { + function check(path) { + for (const match of read(path).matchAll(/(?:https:\/\/)?github\.com\/ncecere\/[^\s`'"<>\)]+/g)) { + assert.equal(match[0], historicalIdentity, `${path}: old repository link`); + } + } + function walk(path) { + for (const entry of readdirSync(new URL(`${path}/`, root), { withFileTypes: true })) { + const child = join(path, entry.name); + if (entry.isDirectory()) walk(child); + else if (/\.(mdx?|tsx?|css)$/.test(entry.name)) check(child); + } + } + for (const path of ['content', 'lib', 'app', 'components']) walk(path); + check('README.md'); + check('Dockerfile'); +});