mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-11-17 21:11:54 +00:00
Compare commits
1 Commits
fix/usage-
...
fix/execut
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a24a7fcdd9 |
21
.env.example
21
.env.example
@@ -732,13 +732,6 @@ ALLOW_API_KEY_REVEAL=false
|
||||
# Used by: src/middleware/promptInjectionGuard.ts — extends injection guard.
|
||||
# PII_REDACTION_ENABLED=false
|
||||
|
||||
# Reversible PII vault (needs PII_REDACTION_ENABLED=true). Request PII becomes per-request
|
||||
# surrogate tokens such as <<PII_EMAIL_QWERTYUI_1>> instead of [EMAIL_REDACTED]; the chat
|
||||
# handler restores the original values in 2xx responses (SSE and JSON). Error bodies keep the
|
||||
# tokens. A DB override on the dashboard toggle wins over this value.
|
||||
# Used by: src/lib/pii/requestTokenVaultScope.ts.
|
||||
# PII_REVERSIBLE_VAULT_ENABLED=false
|
||||
|
||||
# Redacts well-known API-key / secret-token patterns (OpenAI, Anthropic, GitHub,
|
||||
# Slack, etc.) from request/response payloads before they reach providers/clients.
|
||||
# Opt-in; mirrors PII_REDACTION_ENABLED. Used by: src/lib/guardrails/credentialMasker.ts.
|
||||
@@ -1505,11 +1498,6 @@ PROVIDER_LIMITS_SYNC_SPACING_MS=1500
|
||||
# Used by: src/lib/env/backgroundServices.ts, src/lib/initCloudSync.ts
|
||||
# Useful for: CI builds, test environments, or resource-constrained containers.
|
||||
# OMNIROUTE_DISABLE_BACKGROUND_SERVICES=false
|
||||
# Source directory for the explicit --prepare Video Bridge validation command.
|
||||
# Must be an absolute directory containing storage.sqlite. The source is opened
|
||||
# read-only; copied credentials and test keys stay in a private temporary directory.
|
||||
# Used only by: scripts/ad-hoc/video-live-isolation.ts (not normal server startup).
|
||||
# OMNIROUTE_VIDEO_LIVE_SOURCE_DIR=
|
||||
|
||||
# Headless mode (R0.1): boot only the proxy engine (/v1/*, /api/monitoring/health,
|
||||
# auth). Optional boot subsystems are skipped and /dashboard + /home answer 404.
|
||||
@@ -3556,11 +3544,6 @@ APP_LOG_TO_FILE=true
|
||||
# Intentional transformations require an exact reviewed entry in
|
||||
# config/release/changelog-reconciliations.json; there is no runtime bypass.
|
||||
# CHANGELOG_BASE_REF=origin/release/v0.0.0
|
||||
# check-migration-numbering.mjs: explicit base ref for the comparison with the base
|
||||
# (defaults in CI to the PR merge ref's first parent / merge_group.base_sha / merge-base).
|
||||
# MIGRATION_BASE_REF=origin/release/v0.0.0
|
||||
# Test-only: stand-in for scripts/check/migration-commutation.ts in the gate's tests.
|
||||
# MIGRATION_COMMUTATION_SCRIPT=
|
||||
|
||||
# ── Remote audio provider nodes ──
|
||||
# Used by: src/app/api/v1/_shared/audioProviderNodes.ts — lets the /v1/audio/*
|
||||
@@ -3839,10 +3822,6 @@ APP_LOG_TO_FILE=true
|
||||
# ELECTRON_SMOKE_STREAM_LOGS=0
|
||||
# #7592: second launch against the same DATA_DIR must pick the native driver.
|
||||
# ELECTRON_SMOKE_COLD_RESTART=0
|
||||
# Coverage capture (scripts/quality/coverage-node-register.mjs, coverage-vitest-provider.mjs):
|
||||
# repository root the frozen coverage source scope is resolved against. Set by the quality
|
||||
# harness only; leave unset in production deployments.
|
||||
# OMNI_COVERAGE_ROOT=
|
||||
|
||||
# Playground Studio
|
||||
# Default model used by the improve-prompt route (optional; falls back to model in request body).
|
||||
|
||||
24
.gitattributes
vendored
24
.gitattributes
vendored
@@ -9,27 +9,3 @@
|
||||
# This file must stay LF too: git parses it as-is, and a trailing CR would
|
||||
# corrupt every pattern (e.g. "*.sh\r" matches nothing).
|
||||
.gitattributes text eol=lf
|
||||
|
||||
# Generated files: GitHub collapses their diffs (linguist-generated) so a review shows the
|
||||
# source change, not thousands of regenerated lines. Each one is rewritten by its generator
|
||||
# in one refresh at release (release:refresh-derived) or a nightly refresh PR, never by a
|
||||
# feature PR (plan 2026-11-13; config/quality/derived-paths/generated.json is the guard).
|
||||
# The collapse is display-only: the file still diffs, merges and blames normally.
|
||||
# Deliberately NOT marked: the generated skills/*/SKILL.md and the docs/i18n/*/llm.txt mirrors
|
||||
# are agent-instruction surface (AGENTS.md → Review focus) whose diffs must stay visible.
|
||||
docs/reference/PROVIDER_REFERENCE.md linguist-generated=true
|
||||
docs/diagrams/readme-hero.svg linguist-generated=true
|
||||
docs/diagrams/free-tier-budget.svg linguist-generated=true
|
||||
docs/diagrams/works-zero-config.svg linguist-generated=true
|
||||
docs/diagrams/promise-pillars.svg linguist-generated=true
|
||||
docs/diagrams/why-pain-fix.svg linguist-generated=true
|
||||
docs/diagrams/tier-cascade.svg linguist-generated=true
|
||||
docs/diagrams/strategies-grid.svg linguist-generated=true
|
||||
docs/diagrams/resilience-layers.svg linguist-generated=true
|
||||
docs/diagrams/comparison-table.svg linguist-generated=true
|
||||
docs/diagrams/privacy-local.svg linguist-generated=true
|
||||
docs/diagrams/cli-terminal.svg linguist-generated=true
|
||||
docs/diagrams/compression-pipeline.svg linguist-generated=true
|
||||
skills/*/references/** linguist-generated=true
|
||||
# Translation state (source/target/section hashes written by scripts/i18n/run-translation.mjs).
|
||||
.i18n-state.json linguist-generated=true
|
||||
|
||||
2
.github/PULL_REQUEST_TEMPLATE/feature.md
vendored
2
.github/PULL_REQUEST_TEMPLATE/feature.md
vendored
@@ -33,7 +33,7 @@ Vitest, the 60% coverage gate, and the production build all run in CI on this PR
|
||||
- [ ] `npm run lint`
|
||||
- [ ] New production code ships with new automated tests in this PR
|
||||
- [ ] Docs updated for every new endpoint, env var, CLI command, or setting
|
||||
- [ ] New UI/CLI strings added to `en.json` only (other locales are completed at release)
|
||||
- [ ] New UI strings added to the i18n catalogs
|
||||
|
||||
## Tests Added Or Updated
|
||||
|
||||
|
||||
1
.github/workflows/base-ci-repair.yml
vendored
1
.github/workflows/base-ci-repair.yml
vendored
@@ -19,7 +19,6 @@ jobs:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
|
||||
with:
|
||||
fetch-depth: 0
|
||||
persist-credentials: false
|
||||
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020
|
||||
with:
|
||||
node-version: "24"
|
||||
|
||||
6
.github/workflows/build.yml
vendored
6
.github/workflows/build.yml
vendored
@@ -31,12 +31,12 @@ jobs:
|
||||
free -h
|
||||
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
||||
uses: actions/checkout@v7
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
|
||||
uses: actions/setup-node@v7
|
||||
with:
|
||||
node-version: "24"
|
||||
cache: npm
|
||||
@@ -65,7 +65,7 @@ jobs:
|
||||
tar -czf omniroute-build.tar.gz .build dist
|
||||
|
||||
- name: Upload build artifact
|
||||
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: omniroute-build
|
||||
path: omniroute-build.tar.gz
|
||||
|
||||
320
.github/workflows/ci.yml
vendored
320
.github/workflows/ci.yml
vendored
@@ -10,10 +10,7 @@ on:
|
||||
# each held up to 30 of the account's 40 hosted job slots — the queue that made PR
|
||||
# checks wait for hours. `main` keeps it: the release squash is the one push that
|
||||
# lands code nobody validated as a PR into main.
|
||||
# omni-queue/** (2026-11-13): the omni-queue merge-queue candidates (base + the batch's
|
||||
# merge commits, pushed by the omni-queue App) run the full profile here, like merge_group.
|
||||
# Each candidate is a fresh ref (no force-push), so cancel-in-progress never cancels one.
|
||||
branches: [main, "omni-queue/**"]
|
||||
branches: [main]
|
||||
pull_request:
|
||||
branches: [main, "release/**"]
|
||||
types: [opened, synchronize, reopened, ready_for_review, converted_to_draft, edited]
|
||||
@@ -65,30 +62,20 @@ jobs:
|
||||
testsOnly: ${{ steps.classify.outputs.testsOnly }}
|
||||
# Exposure only (one-CI-policy step 1, RFC #8084): no job depends on it yet.
|
||||
domains: ${{ steps.classify.outputs.domains }}
|
||||
# omni-queue candidate base (the merge_group.base_sha of a push to omni-queue/**);
|
||||
# empty on every other event.
|
||||
candidateBase: ${{ steps.candidate.outputs.BASE_SHA }}
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
|
||||
with:
|
||||
persist-credentials: false
|
||||
fetch-depth: 0
|
||||
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
|
||||
- uses: actions/setup-node@v7
|
||||
with:
|
||||
package-manager-cache: false
|
||||
node-version: ${{ env.CI_NODE_VERSION }}
|
||||
- name: Validate gate inventory
|
||||
run: npm run check:gate-manifest
|
||||
# github.event.before is all zeros on a new omni-queue/** branch; the candidate names its
|
||||
# base in the Omni-Queue-Base trailer of its top merge commit (a base-check candidate is
|
||||
# its own base). Fails closed when a batch candidate carries no valid base.
|
||||
- name: Resolve the omni-queue candidate base
|
||||
id: candidate
|
||||
if: startsWith(github.ref, 'refs/heads/omni-queue/')
|
||||
run: node scripts/merge-queue/candidate-base.mjs >> "$GITHUB_OUTPUT"
|
||||
- name: Validate recurring free catalog evidence
|
||||
env:
|
||||
BASE_SHA: ${{ steps.candidate.outputs.BASE_SHA || github.event.pull_request.base.sha || github.event.merge_group.base_sha || github.event.before }}
|
||||
BASE_SHA: ${{ github.event.pull_request.base.sha || github.event.merge_group.base_sha || github.event.before }}
|
||||
run: npm run check:free-catalog-evidence
|
||||
|
||||
# Refuse a PR that targets its own head branch before spending anything on it. #8912 has
|
||||
@@ -142,11 +129,11 @@ jobs:
|
||||
API_KEY_SECRET: ci-lint-api-key-secret-long
|
||||
DISABLE_SQLITE_AUTO_BACKUP: "true"
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
||||
- uses: actions/checkout@v7
|
||||
with:
|
||||
fetch-depth: 0
|
||||
persist-credentials: false
|
||||
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
|
||||
- uses: actions/setup-node@v7
|
||||
with:
|
||||
package-manager-cache: false
|
||||
node-version: ${{ env.CI_NODE_VERSION }}
|
||||
@@ -175,7 +162,7 @@ jobs:
|
||||
run: npm run lint:json
|
||||
- name: Upload ESLint results
|
||||
if: always()
|
||||
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: eslint-results
|
||||
path: .artifacts/eslint-results.json
|
||||
@@ -185,11 +172,9 @@ jobs:
|
||||
# open-sse → src edge ceiling (metrics.boundaryOpenSseToSrc). On PRs it is base-relative
|
||||
# like check:file-size (#8522): max(ceiling, edges on the PR base), so drift other merges
|
||||
# added after the seed does not red an innocent PR. push → main stays absolute.
|
||||
# omni-queue/** candidates are judged like a PR, against the candidate base: the absolute
|
||||
# ceiling would red every candidate of a base that drifted, and blame the batch for it.
|
||||
- name: Boundary ratchet (open-sse → src)
|
||||
env:
|
||||
PR_BASE_SHA: ${{ github.event.pull_request.base.sha || needs.changes.outputs.candidateBase }}
|
||||
PR_BASE_SHA: ${{ github.event.pull_request.base.sha }}
|
||||
run: |
|
||||
if [ -n "${PR_BASE_SHA:-}" ]; then
|
||||
npm run check:boundary:ratchet -- --base-ref "$PR_BASE_SHA"
|
||||
@@ -205,11 +190,7 @@ jobs:
|
||||
- run: npm run check:deps
|
||||
- run: npm run check:file-size
|
||||
- run: npm run check:error-helper
|
||||
- name: Migration numbering and commutation
|
||||
# Runs even if an earlier gate in this job failed: it is the check that keeps a
|
||||
# migration from being re-applied or skipped on a user's database.
|
||||
if: ${{ !cancelled() }}
|
||||
run: npm run check:migration-numbering
|
||||
- run: npm run check:migration-numbering
|
||||
- run: npm run check:public-creds
|
||||
- run: npm run check:db-rules
|
||||
- run: npm run check:known-symbols
|
||||
@@ -228,14 +209,6 @@ jobs:
|
||||
run: |
|
||||
printf '%s' "$PR_BODY" > "$RUNNER_TEMP/pr-body.md"
|
||||
npm run check:ai-attribution -- --range "$PR_BASE_SHA..$PR_HEAD_SHA" --pr-title "$PR_TITLE" --pr-body-file "$RUNNER_TEMP/pr-body.md"
|
||||
# omni-queue/** candidates land fast-forward: the contributors' own commits enter the
|
||||
# release as they are (no squash rewrites their messages), so the same range check runs on
|
||||
# the candidate, from its base (Omni-Queue-Base) to the pushed head.
|
||||
- name: "AI attribution in the omni-queue candidate range (Hard Rule #16)"
|
||||
if: github.event_name == 'push' && startsWith(github.ref, 'refs/heads/omni-queue/')
|
||||
env:
|
||||
CANDIDATE_BASE: ${{ needs.changes.outputs.candidateBase }}
|
||||
run: npm run check:ai-attribution -- --range "$CANDIDATE_BASE..$GITHUB_SHA"
|
||||
# A test parked in vitest.config.ts's exclude list does not run, and looks like
|
||||
# coverage to whoever reads the tree. 62 files accumulated behind a comment pointing
|
||||
# at #8618 — closed in August while the list grew to 62; 51 of them passed when
|
||||
@@ -253,11 +226,6 @@ jobs:
|
||||
# means a push to `main` catches the drift at the source instead of the next cycle
|
||||
# inheriting it.
|
||||
- run: npm run check:agent-skills-sync
|
||||
# Generated artifacts (plan 2026-11-13, owner decision 2026-11-14): release mode compares
|
||||
# every README SVG and e2e-timings.json with its generator; pr mode only the ones the PR
|
||||
# edited, and every one when the diff base does not resolve. Here because this job has
|
||||
# the full history (fetch-depth: 0) the shallow test-unit checkout lacks. ~70 s.
|
||||
- run: npm run check:generated-artifacts
|
||||
# WS1.7 (v3.8.49 plan): Dockerfile lint (hadolint, pinned by digest).
|
||||
# failure-threshold=error keeps the 5 pre-existing warnings (DL3008/DL3003/
|
||||
# DL3016 version pinning / WORKDIR) visible without blocking; any ERROR fails.
|
||||
@@ -310,10 +278,10 @@ jobs:
|
||||
contents: read
|
||||
security-events: read
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
||||
- uses: actions/checkout@v7
|
||||
with:
|
||||
persist-credentials: false
|
||||
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
|
||||
- uses: actions/setup-node@v7
|
||||
with:
|
||||
package-manager-cache: false
|
||||
node-version: ${{ env.CI_NODE_VERSION }}
|
||||
@@ -339,20 +307,19 @@ jobs:
|
||||
# SKIPPED (shard flaky). Nesse caso collect-metrics pula coverage.* (ausente sem
|
||||
# erro) e o ratchet roda com --allow-missing — as métricas determinísticas
|
||||
# (eslint/complexity/cognitive) seguem BLOQUEANTES.
|
||||
- uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8
|
||||
- uses: actions/download-artifact@v8
|
||||
continue-on-error: true
|
||||
with:
|
||||
name: coverage-report
|
||||
path: coverage/
|
||||
# Prefer lint job's ESLint JSON (one inventory, two consumers).
|
||||
- name: Download ESLint results
|
||||
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8
|
||||
continue-on-error: true
|
||||
uses: actions/download-artifact@v8
|
||||
with:
|
||||
name: eslint-results
|
||||
path: .artifacts/
|
||||
- run: npm run quality:collect
|
||||
env:
|
||||
ESLINT_RESULTS_JSON: .artifacts/eslint-results.json
|
||||
# Catraca: falha se qualquer métrica regredir vs quality-baseline.json (commitado).
|
||||
# Hoje: contagem de warnings do ESLint. Fase 4 estende com cobertura (lida do
|
||||
# coverage mergeado). Tamanho de arquivo e duplicação têm gates dedicados.
|
||||
@@ -397,7 +364,7 @@ jobs:
|
||||
run: cat .artifacts/quality-ratchet.md >> "$GITHUB_STEP_SUMMARY"
|
||||
- name: Upload ratchet report
|
||||
if: always()
|
||||
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: quality-ratchet
|
||||
path: .artifacts/quality-ratchet.md
|
||||
@@ -410,9 +377,8 @@ jobs:
|
||||
# steps stay ADVISORY via step-level continue-on-error (scanner install,
|
||||
# vuln/osv ratchet, OpenAPI/oasdiff breaking-change, circular-deps/dpdm): they
|
||||
# depend on external binaries/state that may legitimately self-skip, so they must
|
||||
# never block. Most blocking gates SKIP (exit 0) when their binary/plugin is absent;
|
||||
# the osv vuln ratchet instead fails as INCOMPLETE (exit 2) on a missing measurement.
|
||||
# Otherwise only a measured regression on the SAME metric the baseline froze
|
||||
# never block. The blocking gates themselves SKIP (exit 0) when their binary/plugin
|
||||
# is absent — only a measured regression on the SAME metric the baseline froze
|
||||
# blocks. The CodeQL ratchet was PROMOTED to the quality-gate job (v3.8.26).
|
||||
# SonarQube needs SONAR_TOKEN/SONAR_HOST_URL secrets.
|
||||
quality-extended:
|
||||
@@ -427,11 +393,11 @@ jobs:
|
||||
# fetch-depth: 0 — the OpenAPI breaking-change gate (oasdiff) reads the base
|
||||
# spec via `git show <base_ref>:docs/openapi.yaml`; a shallow clone
|
||||
# would lack the base ref and the gate would self-skip (base-unresolved).
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
||||
- uses: actions/checkout@v7
|
||||
with:
|
||||
persist-credentials: false
|
||||
fetch-depth: 0
|
||||
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
|
||||
- uses: actions/setup-node@v7
|
||||
with:
|
||||
package-manager-cache: false
|
||||
node-version: ${{ env.CI_NODE_VERSION }}
|
||||
@@ -506,11 +472,9 @@ jobs:
|
||||
- name: Secret scan (gitleaks, ratchet, blocking)
|
||||
run: npm run check:secrets -- --ratchet
|
||||
# BLOCKING ratchet (v3.8.27 cycle-end): vulnCount must not regress vs the
|
||||
# baseline. --ratchet exits 1 on a measured regression (measured > baseline)
|
||||
# and exits 2 (INCOMPLETE) when osv-scanner is absent, its run fails or its
|
||||
# report is invalid — a missing measurement is never a pass. An install
|
||||
# failure in the advisory-scanner step above surfaces here as
|
||||
# `vulnCount=INCOMPLETE reason=binary-absent`. See the CVE-variance note in
|
||||
# baseline. --ratchet exits 1 on a measured regression (measured > baseline);
|
||||
# it SKIPs (exit 0) when osv-scanner is absent or osv.dev is unreachable (a
|
||||
# missing/failed measurement never blocks). See the CVE-variance note in
|
||||
# docs/security/SUPPLY_CHAIN.md — a newly-disclosed CVE on an unchanged dep can
|
||||
# red this gate; the fix is to bump the dep or re-baseline metrics.vulnCount.
|
||||
- name: Vulnerability ratchet (osv-scanner, ratchet, blocking)
|
||||
@@ -521,8 +485,16 @@ jobs:
|
||||
# an absent baseline are INCOMPLETE, never zero findings or acceptance.
|
||||
- name: Workflow lint (actionlint+zizmor, ratchet, blocking)
|
||||
run: npm run check:workflows -- --ratchet
|
||||
# Pin comparison to the event's commits; missing tools/base/report fail closed.
|
||||
# OpenAPI breaking-change detection (oasdiff). Diffs the PR's public API
|
||||
# contract (docs/openapi.yaml) against the base branch's spec.
|
||||
# BLOCKING ratchet (Fase 9 Onda 0): reads metrics.openapiBreaking.value and
|
||||
# exits 1 ONLY on a measured regression (count > baseline). It SKIPs (exit 0)
|
||||
# when oasdiff is absent or the base spec can't be resolved — a missing
|
||||
# measurement never blocks. BASE_REF is read by the script from the env
|
||||
# (never interpolated into a shell body) — workflow-injection-safe.
|
||||
- name: OpenAPI breaking-change (oasdiff, ratchet, blocking)
|
||||
env:
|
||||
BASE_REF: ${{ github.base_ref }}
|
||||
run: npm run check:openapi-breaking -- --ratchet
|
||||
|
||||
docs-sync-strict:
|
||||
@@ -534,14 +506,10 @@ jobs:
|
||||
# Run when docs OR code change: API/route code can break doc/OpenAPI contract gates.
|
||||
if: ${{ github.event_name != 'pull_request' || ((github.event.pull_request.draft == false || needs.changes.outputs.queueCandidate == 'true') && (needs.changes.outputs.docs == 'true' || needs.changes.outputs.code == 'true')) }}
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
||||
- uses: actions/checkout@v7
|
||||
with:
|
||||
# Depth 2: on a pull_request the checkout is GitHub's merge commit, and its first
|
||||
# parent is the base the PR was merged onto. check:docs-counts (inside check:docs-all)
|
||||
# runs in `pr` mode on feature PRs and diffs the managed numbers against that base.
|
||||
fetch-depth: 2
|
||||
persist-credentials: false
|
||||
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
|
||||
- uses: actions/setup-node@v7
|
||||
with:
|
||||
package-manager-cache: false
|
||||
node-version: ${{ env.CI_NODE_VERSION }}
|
||||
@@ -549,17 +517,7 @@ jobs:
|
||||
with:
|
||||
# PR acceleration is not release-candidate provenance.
|
||||
cache: ${{ github.event_name == 'pull_request' }}
|
||||
# Plan 2026-11-13 (derived numbers are written at release): on a feature PR the counts gate
|
||||
# judges only the managed numbers the PR itself edited (diff against BASE_SHA, or the merge
|
||||
# commit's first parent when the base moved), never a base that is behind the live code by
|
||||
# design. The release PR (release/v* → main) and pushes keep the strict comparison.
|
||||
# A manual dispatch on a feature branch (`gh workflow run ci.yml --ref <branch>`) runs in pr
|
||||
# mode too: with no PR to diff, the gate checks content invariants only. Dispatch on main or
|
||||
# release/v* stays strict (empty mode = automatic = release).
|
||||
- run: npm run check:docs-all
|
||||
env:
|
||||
BASE_SHA: ${{ github.event.pull_request.base.sha || github.event.merge_group.base_sha }}
|
||||
OMNIROUTE_GATE_MODE: ${{ github.event_name == 'workflow_dispatch' && github.ref_name != 'main' && !startsWith(github.ref_name, 'release/v') && 'pr' || '' }}
|
||||
# Previously-orphaned contract gates (existed as files, never wired anywhere).
|
||||
# All exit 0 today: cli-i18n is a hard gate, openapi-coverage is a ratchet
|
||||
# (floor ~36), openapi-security-tiers is advisory (Hard Rules #15/#17).
|
||||
@@ -588,19 +546,15 @@ jobs:
|
||||
# and every mirror PR collided on `.i18n-state.json`. Mirrors are refreshed in a batch
|
||||
# `npm run i18n:run` after merge; the push run below, the nightly Release-Green and the
|
||||
# release cut keep the strict verdict, so stale mirrors still cannot ship in a release.
|
||||
#
|
||||
# omni-queue/** candidates take the pull-request path, against the candidate base: the
|
||||
# strict verdict fails on drift the base already carries, which would red every candidate
|
||||
# and blame the batch. The strict run stays on main, merge_group and workflow_dispatch.
|
||||
- name: Base checkout for the i18n drift baseline (PR / omni-queue candidate)
|
||||
if: ${{ github.event_name == 'pull_request' || startsWith(github.ref, 'refs/heads/omni-queue/') }}
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
||||
- name: Base checkout for the i18n drift baseline (PR only)
|
||||
if: ${{ github.event_name == 'pull_request' }}
|
||||
uses: actions/checkout@v7
|
||||
with:
|
||||
ref: ${{ github.event.pull_request.base.sha || needs.changes.outputs.candidateBase }}
|
||||
ref: ${{ github.event.pull_request.base.sha }}
|
||||
path: .i18n-base
|
||||
persist-credentials: false
|
||||
- name: i18n docs drift (PR / omni-queue candidate — advisory, mirrors are refreshed after merge)
|
||||
if: ${{ github.event_name == 'pull_request' || startsWith(github.ref, 'refs/heads/omni-queue/') }}
|
||||
- name: i18n docs drift (PR — advisory, mirrors are refreshed after merge)
|
||||
if: ${{ github.event_name == 'pull_request' }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
node scripts/i18n/check-translation-drift.mjs --root .i18n-base --json --warn > /tmp/i18n-base-drift.json
|
||||
@@ -609,7 +563,7 @@ jobs:
|
||||
echo "::notice title=i18n mirrors pending::This PR changes English docs whose 66 mirrors are now stale. Nothing to do here: the mirrors are refreshed in the post-merge i18n batch."
|
||||
fi
|
||||
- name: i18n docs drift (sources changed since their translation)
|
||||
if: ${{ github.event_name != 'pull_request' && !startsWith(github.ref, 'refs/heads/omni-queue/') }}
|
||||
if: ${{ github.event_name != 'pull_request' }}
|
||||
run: node scripts/i18n/check-translation-drift.mjs
|
||||
|
||||
docs-lint:
|
||||
@@ -624,10 +578,10 @@ jobs:
|
||||
# existing doc corpus is brought up to style. Promote to blocking once it converges.
|
||||
continue-on-error: true
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
||||
- uses: actions/checkout@v7
|
||||
with:
|
||||
persist-credentials: false
|
||||
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
|
||||
- uses: actions/setup-node@v7
|
||||
with:
|
||||
package-manager-cache: false
|
||||
node-version: ${{ env.CI_NODE_VERSION }}
|
||||
@@ -636,7 +590,7 @@ jobs:
|
||||
- name: Vale prose lint (Microsoft style, advisory)
|
||||
# Non-fatal: a Vale/reviewdog setup error must not turn this advisory job red.
|
||||
continue-on-error: true
|
||||
uses: errata-ai/vale-action@518a9136acc6e6668ce7c00d367051e0941e87ff # reviewdog
|
||||
uses: errata-ai/vale-action@reviewdog
|
||||
with:
|
||||
files: docs
|
||||
fail_on_error: false
|
||||
@@ -651,30 +605,15 @@ jobs:
|
||||
# drafts (ciclo v3.8.44: 123 runs pesados re-disparados por merges na release, 88 cancelados).
|
||||
# UI keys move with dashboard code OR message catalogs.
|
||||
if: ${{ github.event_name != 'pull_request' || ((github.event.pull_request.draft == false || needs.changes.outputs.queueCandidate == 'true') && (needs.changes.outputs.i18n == 'true' || needs.changes.outputs.code == 'true')) }}
|
||||
# Two modes (plan "derived numbers and texts resolved only at release", 2026-11-13; the
|
||||
# scripts resolve it themselves through scripts/check/lib/gateMode.mjs, nothing to set here):
|
||||
# pr — a feature PR (and a merge_group / omni-queue batch). The PR adds keys to en.json
|
||||
# only, so the completeness gates (value drift, new-key coverage, key completeness
|
||||
# UI + CLI, translation ratio) print `SKIP reason=pr-mode` and exit 0. Coverage
|
||||
# floor and ICU compilation still run: they judge what the PR wrote. That the PR
|
||||
# leaves the other locales alone is enforced by PR Test Policy →
|
||||
# check:pr-derived-paths (config/quality/derived-paths/translation.json). A PR
|
||||
# that does change locale catalogs (translation wave, release refresh) gets each
|
||||
# changed catalog judged against the merge base by the key-completeness steps
|
||||
# (lost keys or translations, new markers, broken placeholders).
|
||||
# release — the release PR (release/v* → main), pushes to main, workflow_dispatch: every
|
||||
# gate strict, as before; the diff-aware ones get BASE_REF=origin/main on the
|
||||
# release PR, so they judge the whole cycle after the release refresh
|
||||
# (syncUiKeys in scripts/i18n/sync-ui-keys.mjs) completed the catalogs.
|
||||
steps:
|
||||
# fetch-depth: 0 — the value-drift gate diffs en.json against the merge base to
|
||||
# find rewritten English strings. On a shallow clone the base ref is missing and
|
||||
# the gate self-skips (base-unresolved), so it would never actually run.
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
||||
- uses: actions/checkout@v7
|
||||
with:
|
||||
persist-credentials: false
|
||||
fetch-depth: 0
|
||||
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
|
||||
- uses: actions/setup-node@v7
|
||||
with:
|
||||
package-manager-cache: false
|
||||
node-version: ${{ env.CI_NODE_VERSION }}
|
||||
@@ -682,13 +621,7 @@ jobs:
|
||||
with:
|
||||
# PR acceleration is not release-candidate provenance.
|
||||
cache: ${{ github.event_name == 'pull_request' }}
|
||||
# Both modes: a 65 % floor per locale is far from what one cycle of en.json-only keys
|
||||
# moves (every locale measured 100 % on 2026-11-13; the largest recorded cycle added
|
||||
# ~1,352 keys, ≈ 8 points on today's 15,249), so it only trips on a truncated or
|
||||
# broken catalog.
|
||||
- name: i18n UI coverage floor (≥ 65 % per locale)
|
||||
run: node scripts/i18n/check-ui-keys-coverage.mjs --threshold=65
|
||||
# Both modes: compiles the en.json the PR edits (and every catalog) with IntlMessageFormat.
|
||||
- run: node scripts/i18n/check-ui-keys-coverage.mjs --threshold=65
|
||||
- name: i18n ICU compilation (all UI catalogs)
|
||||
run: npm run check:ui-icu
|
||||
# Real-translation ratchet: a leaf copied verbatim from en.json passes key
|
||||
@@ -696,12 +629,12 @@ jobs:
|
||||
# Blocking since PR-4 retranslated the verbatim-English backlog: the share of
|
||||
# untranslated leaves per locale may only fall (ratchet baseline in
|
||||
# config/quality/i18n-translation-baseline.json; `npm run i18n:check-ratio:update`).
|
||||
- name: i18n real-translation ratio (release mode)
|
||||
- name: i18n real-translation ratio
|
||||
run: node scripts/i18n/check-translation-ratio.mjs
|
||||
# #8463: a rewritten English value used to leave its 39 translations behind
|
||||
# silently (googleOAuthWarning shipped wrong copy in 39 locales for months).
|
||||
# Key parity above cannot see it — a stale translation counts as covered.
|
||||
- name: i18n UI value drift (stale translations, release mode)
|
||||
- name: i18n UI value drift (stale translations)
|
||||
env:
|
||||
BASE_REF: ${{ github.base_ref && format('origin/{0}', github.base_ref) || '' }}
|
||||
run: node scripts/i18n/check-ui-value-drift.mjs
|
||||
@@ -711,7 +644,7 @@ jobs:
|
||||
# locale, and 11 absent keys out of ~13,000 leaves coverage at 99.9%. Incident: the
|
||||
# Phase 3 canvas keys were translated across the 42 locales that existed, then the EU
|
||||
# batch (#13044) took the repo to 51 and the nine newcomers shipped untranslated.
|
||||
- name: i18n new-key coverage (a new key must reach every locale, release mode)
|
||||
- name: i18n new-key coverage (a new key must reach every locale)
|
||||
env:
|
||||
BASE_REF: ${{ github.base_ref && format('origin/{0}', github.base_ref) || '' }}
|
||||
run: node scripts/i18n/check-new-key-coverage.mjs
|
||||
@@ -721,14 +654,13 @@ jobs:
|
||||
# adding keys — the batch PR adds no key itself, so the new-key gate stays silent and
|
||||
# 43 absent keys out of ~13,000 still read 99.7 % coverage. Incident 2026-09-15:
|
||||
# batch 1 (#13044) landed 43 keys short in nine locales, batch 2 (#13660) 10 keys short
|
||||
# in eight. Fix (release refresh or translation wave, never a feature PR):
|
||||
# `sync-ui-keys --locale=<codes> --translate-markers`.
|
||||
- name: i18n key completeness (every en.json key in every locale; pr mode — changed catalogs)
|
||||
# in eight. Fix is `sync-ui-keys --locale=<codes> --translate-markers`.
|
||||
- name: i18n key completeness (every locale carries every en.json key)
|
||||
run: node scripts/i18n/check-key-completeness.mjs
|
||||
# Same gate for the CLI catalogs (bin/cli/locales). check:cli-i18n only compares
|
||||
# pt-BR / zh-CN / zh-TW; 38 locales shipped with 1–24 of 830 keys for months
|
||||
# (audit 2026-09-16) and the CLI silently fell back to English for them.
|
||||
- name: i18n key completeness (CLI catalogs; pr mode — changed catalogs)
|
||||
- name: i18n key completeness (CLI catalogs)
|
||||
run: node scripts/i18n/check-key-completeness.mjs --catalog=cli
|
||||
|
||||
# #8038: cheap glossary/protected-terms consistency gate —
|
||||
@@ -742,10 +674,10 @@ jobs:
|
||||
needs: changes
|
||||
if: ${{ github.event_name != 'pull_request' || ((github.event.pull_request.draft == false || needs.changes.outputs.queueCandidate == 'true') && (needs.changes.outputs.i18n == 'true' || needs.changes.outputs.code == 'true')) }}
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
||||
- uses: actions/checkout@v7
|
||||
with:
|
||||
persist-credentials: false
|
||||
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
|
||||
- uses: actions/setup-node@v7
|
||||
with:
|
||||
package-manager-cache: false
|
||||
node-version: ${{ env.CI_NODE_VERSION }}
|
||||
@@ -771,10 +703,10 @@ jobs:
|
||||
if: ${{ github.event_name != 'pull_request' || ((github.event.pull_request.draft == false || needs.changes.outputs.queueCandidate == 'true') && needs.changes.outputs.i18n == 'true') }}
|
||||
continue-on-error: true
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
||||
- uses: actions/checkout@v7
|
||||
with:
|
||||
persist-credentials: false
|
||||
- uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7
|
||||
- uses: actions/setup-python@v7
|
||||
with:
|
||||
python-version: "3.12"
|
||||
- name: Validate all languages
|
||||
@@ -798,7 +730,7 @@ jobs:
|
||||
exit "$FAIL"
|
||||
- name: Upload results
|
||||
if: always()
|
||||
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: i18n-results
|
||||
path: i18n-results/
|
||||
@@ -809,28 +741,16 @@ jobs:
|
||||
if: ${{ github.event_name == 'pull_request' && (github.event.pull_request.draft == false || needs.changes.outputs.queueCandidate == 'true') }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
||||
- uses: actions/checkout@v7
|
||||
with:
|
||||
persist-credentials: false
|
||||
fetch-depth: 0
|
||||
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
|
||||
- uses: actions/setup-node@v7
|
||||
with:
|
||||
package-manager-cache: false
|
||||
node-version: ${{ env.CI_NODE_VERSION }}
|
||||
- name: Fetch base branch
|
||||
run: git fetch --no-tags origin "${GITHUB_BASE_REF}"
|
||||
# Plan 2026-11-13 (derived files are written at release): translation mirrors, the
|
||||
# non-English UI/CLI catalogs, generated docs and quality baselines each have ONE writer
|
||||
# (a translation wave, `release:refresh-derived`, a nightly refresh PR). A feature PR that
|
||||
# carries its own copy conflicts with every sibling that does the same (48 open PRs edited
|
||||
# the same ~43 locale catalogs on 2026-11-13). Families + writer branches:
|
||||
# config/quality/derived-paths/*.json. The diff base is the freshly fetched origin/<base>,
|
||||
# not the event's base SHA: on a fast base the merge ref is newer than that SHA and the
|
||||
# base's own commits would be judged as the PR's.
|
||||
# Blocking since 2026-11-15 (owner decision): the two one-time passes over the open PRs
|
||||
# (plan section 8 + the derived-families pass) restored the derived files they carried.
|
||||
- name: Derived files stay out of feature PRs
|
||||
run: npm run check:pr-derived-paths
|
||||
- name: Validate source changes include tests
|
||||
run: node scripts/check/check-pr-test-policy.mjs --summary-file .artifacts/pr-test-policy.md
|
||||
# Anti test-masking: flag net assert removal / new assert.ok(true) in changed tests.
|
||||
@@ -863,8 +783,7 @@ jobs:
|
||||
# reaches the self-hosted runner (push / dispatch events are own-origin by
|
||||
# definition). Any failure path (VM down, var unset/false) also falls back to
|
||||
# ubuntu-latest.
|
||||
# omni-queue/** candidates contain fork code: they never reach the self-hosted slot either.
|
||||
runs-on: ${{ (vars.USE_VPS_RUNNER == 'true' && vars.USE_VPS_BUILD_RUNNER == 'true' && github.event_name != 'merge_group' && github.event_name != 'pull_request' && !startsWith(github.ref, 'refs/heads/omni-queue/')) && fromJSON('["self-hosted","omni-build"]') || 'ubuntu-latest' }}
|
||||
runs-on: ${{ (vars.USE_VPS_RUNNER == 'true' && vars.USE_VPS_BUILD_RUNNER == 'true' && github.event_name != 'merge_group' && github.event_name != 'pull_request') && fromJSON('["self-hosted","omni-build"]') || 'ubuntu-latest' }}
|
||||
needs: changes
|
||||
# Capacity is owned by the ONE omni-build runner slot (#12048), also used by
|
||||
# Docker amd64. Do not add another worker with that label on the same host
|
||||
@@ -879,10 +798,10 @@ jobs:
|
||||
cancel-in-progress: false
|
||||
if: ${{ github.event_name != 'pull_request' || (needs.changes.outputs.code == 'true' && (github.event.pull_request.draft == false || needs.changes.outputs.queueCandidate == 'true')) }}
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
||||
- uses: actions/checkout@v7
|
||||
with:
|
||||
persist-credentials: false
|
||||
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
|
||||
- uses: actions/setup-node@v7
|
||||
with:
|
||||
package-manager-cache: false
|
||||
node-version: ${{ env.CI_NODE_VERSION }}
|
||||
@@ -905,7 +824,7 @@ jobs:
|
||||
# tests/unit/ci-build-bundler-webpack.test.ts and heavy-build-queue.test.ts.
|
||||
- run: npm run build
|
||||
env:
|
||||
OMNIROUTE_USE_TURBOPACK: ${{ (vars.USE_VPS_RUNNER == 'true' && vars.USE_VPS_BUILD_RUNNER == 'true' && github.event_name != 'merge_group' && github.event_name != 'pull_request' && !startsWith(github.ref, 'refs/heads/omni-queue/')) && '1' || '0' }}
|
||||
OMNIROUTE_USE_TURBOPACK: ${{ (vars.USE_VPS_RUNNER == 'true' && vars.USE_VPS_BUILD_RUNNER == 'true' && github.event_name != 'merge_group' && github.event_name != 'pull_request') && '1' || '0' }}
|
||||
- name: Verify colocated compression worker
|
||||
run: node --import tsx/esm --test tests/integration/compression-worker-standalone.int.test.ts
|
||||
env:
|
||||
@@ -927,7 +846,7 @@ jobs:
|
||||
--exclude='.build/next/cache' \
|
||||
.build/next
|
||||
- name: Upload Next.js build for downstream jobs
|
||||
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: next-build
|
||||
path: ${{ runner.temp }}/e2e-build.tar.gz
|
||||
@@ -944,10 +863,10 @@ jobs:
|
||||
env:
|
||||
JWT_SECRET: ci-build-secret-with-sufficient-length-for-validation
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
||||
- uses: actions/checkout@v7
|
||||
with:
|
||||
persist-credentials: false
|
||||
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
|
||||
- uses: actions/setup-node@v7
|
||||
with:
|
||||
package-manager-cache: false
|
||||
node-version: ${{ env.CI_NODE_VERSION }}
|
||||
@@ -957,7 +876,7 @@ jobs:
|
||||
cache: ${{ github.event_name == 'pull_request' }}
|
||||
- run: npm run check:node-runtime
|
||||
- name: Download Next.js build artifact
|
||||
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8
|
||||
uses: actions/download-artifact@v8
|
||||
with:
|
||||
name: next-build
|
||||
# Workspace-relative on purpose: the matrix below includes windows-latest, whose
|
||||
@@ -1046,10 +965,10 @@ jobs:
|
||||
JWT_SECRET: ci-build-secret-with-sufficient-length-for-validation
|
||||
CSC_IDENTITY_AUTO_DISCOVERY: "false"
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
||||
- uses: actions/checkout@v7
|
||||
with:
|
||||
persist-credentials: false
|
||||
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
|
||||
- uses: actions/setup-node@v7
|
||||
with:
|
||||
package-manager-cache: false
|
||||
node-version: ${{ env.CI_NODE_VERSION }}
|
||||
@@ -1059,7 +978,7 @@ jobs:
|
||||
cache: ${{ github.event_name == 'pull_request' }}
|
||||
- run: npm run check:node-runtime
|
||||
- name: Download Next.js build artifact
|
||||
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8
|
||||
uses: actions/download-artifact@v8
|
||||
with:
|
||||
name: next-build
|
||||
# Workspace-relative on purpose: the matrix below includes windows-latest, whose
|
||||
@@ -1106,12 +1025,8 @@ jobs:
|
||||
# own-origin pull requests into the dedicated `omni-ci` slots (omniroute-113-3/-4/-8,
|
||||
# 12G/16G and 4 CPUs each — a hosted runner's profile) while the setup-node cost is
|
||||
# re-measured. Default off; forks, merge_group and push always stay hosted.
|
||||
runs-on: ${{ (vars.USE_VPS_TEST_RUNNER == 'true' && github.event_name != 'merge_group' && github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository && !startsWith(github.head_ref, 'omni-queue/')) && fromJSON('["self-hosted","omni-ci"]') || 'ubuntu-latest' }}
|
||||
# 35, not 25 (2026-11-14): the suite grew into the ceiling. Over 72 green shard jobs of
|
||||
# one day the mean was 19 min and the slowest 24; 19 of them (26%) ended within 3 min of
|
||||
# the limit. A shard whose steps had all passed (tests 19 min, raw coverage upload 4 min)
|
||||
# died as job-timeout `cancelled` (run 43651743993) and failed Gate / CI until a re-run.
|
||||
timeout-minutes: 35
|
||||
runs-on: ${{ (vars.USE_VPS_TEST_RUNNER == 'true' && github.event_name != 'merge_group' && github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) && fromJSON('["self-hosted","omni-ci"]') || 'ubuntu-latest' }}
|
||||
timeout-minutes: 25
|
||||
# needs: changes (not build) — this job never downloads the next-build artifact;
|
||||
# gating it on Build only serialized ~20min of wall-clock for nothing. Jobs that
|
||||
# DO consume the artifact (e2e, package-artifact, electron-package-smoke) keep
|
||||
@@ -1137,10 +1052,10 @@ jobs:
|
||||
df -h /
|
||||
sudo rm -rf /usr/share/dotnet /opt/ghc /usr/local/.ghcup
|
||||
df -h /
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
||||
- uses: actions/checkout@v7
|
||||
with:
|
||||
persist-credentials: false
|
||||
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
|
||||
- uses: actions/setup-node@v7
|
||||
with:
|
||||
package-manager-cache: false
|
||||
node-version: ${{ env.CI_NODE_VERSION }}
|
||||
@@ -1181,7 +1096,7 @@ jobs:
|
||||
npm run test:unit:ci:shard
|
||||
- name: Upload raw shard coverage
|
||||
if: always()
|
||||
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: coverage-shard-${{ matrix.shard }}
|
||||
path: coverage-shard/*.json
|
||||
@@ -1202,10 +1117,10 @@ jobs:
|
||||
# gh workflow run ci.yml --ref <branch>.
|
||||
if: ${{ github.event_name != 'pull_request' || (needs.changes.outputs.code == 'true' && needs.changes.outputs.queueCandidate == 'true') }}
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
||||
- uses: actions/checkout@v7
|
||||
with:
|
||||
persist-credentials: false
|
||||
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
|
||||
- uses: actions/setup-node@v7
|
||||
with:
|
||||
package-manager-cache: false
|
||||
node-version: ${{ env.CI_NODE_VERSION }}
|
||||
@@ -1237,7 +1152,7 @@ jobs:
|
||||
# own-origin pull requests into the dedicated `omni-ci` slots (omniroute-113-3/-4/-8,
|
||||
# 12G/16G and 4 CPUs each — a hosted runner's profile) while the setup-node cost is
|
||||
# re-measured. Default off; forks, merge_group and push always stay hosted.
|
||||
runs-on: ${{ (vars.USE_VPS_TEST_RUNNER == 'true' && github.event_name != 'merge_group' && github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository && !startsWith(github.head_ref, 'omni-queue/')) && fromJSON('["self-hosted","omni-ci"]') || 'ubuntu-latest' }}
|
||||
runs-on: ${{ (vars.USE_VPS_TEST_RUNNER == 'true' && github.event_name != 'merge_group' && github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) && fromJSON('["self-hosted","omni-ci"]') || 'ubuntu-latest' }}
|
||||
timeout-minutes: 15
|
||||
# needs: changes (not build) — no artifact consumed; see test-unit note.
|
||||
needs: changes
|
||||
@@ -1247,10 +1162,10 @@ jobs:
|
||||
API_KEY_SECRET: ci-test-api-key-secret-long
|
||||
DISABLE_SQLITE_AUTO_BACKUP: "true"
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
||||
- uses: actions/checkout@v7
|
||||
with:
|
||||
persist-credentials: false
|
||||
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
|
||||
- uses: actions/setup-node@v7
|
||||
with:
|
||||
package-manager-cache: false
|
||||
node-version: ${{ env.CI_NODE_VERSION }}
|
||||
@@ -1270,9 +1185,7 @@ jobs:
|
||||
# Trunk Flaky Tests upload — advisory (never blocks), own-origin only (fork PRs
|
||||
# have no TRUNK_TOKEN). Pinned by SHA (tag v2.1.2).
|
||||
- name: Upload test results to Trunk (advisory)
|
||||
# Not on omni-queue/** candidates: their tree carries fork code, and Trunk would gain a
|
||||
# branch per candidate.
|
||||
if: ${{ always() && !startsWith(github.ref, 'refs/heads/omni-queue/') && !startsWith(github.head_ref, 'omni-queue/') && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) }}
|
||||
if: ${{ always() && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) }}
|
||||
continue-on-error: true
|
||||
uses: trunk-io/analytics-uploader@a86313c7029d22e6ea2d5c346060a224d90053dc # v2.1.6
|
||||
with:
|
||||
@@ -1298,13 +1211,7 @@ jobs:
|
||||
# 28–31 min (download 4 min, merge+report+gate 18 min, Codecov ≤5 min) and two of six
|
||||
# died at exactly 30 min as job-timeout `cancelled` (jobs 118735970655, 118737111780),
|
||||
# failing Quality Ratchet / PR Coverage Comment / Gate / CI until a re-run.
|
||||
# 75 on an omni-queue/** candidate (2026-11-14): the same step was cancelled at the 45-minute
|
||||
# ceiling on a candidate (run 43614500902), and for the queue a timed-out job costs a second
|
||||
# full CI and then pauses the base. Every other event keeps 45.
|
||||
# 60, not 45 (2026-11-14): grown into again. Two PRs of one day died at exactly 45 min as
|
||||
# job-timeout `cancelled` (runs 43619286507, 43625515181); the re-run that passed took
|
||||
# 39m45s.
|
||||
timeout-minutes: ${{ startsWith(github.ref, 'refs/heads/omni-queue/') && 75 || 60 }}
|
||||
timeout-minutes: 45
|
||||
needs: test-unit
|
||||
if: ${{ !cancelled() && needs.test-unit.result == 'success' }}
|
||||
env:
|
||||
@@ -1319,10 +1226,10 @@ jobs:
|
||||
df -h /
|
||||
sudo rm -rf /usr/local/lib/android /usr/share/dotnet /opt/ghc /usr/local/.ghcup
|
||||
df -h /
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
||||
- uses: actions/checkout@v7
|
||||
with:
|
||||
persist-credentials: false
|
||||
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
|
||||
- uses: actions/setup-node@v7
|
||||
with:
|
||||
package-manager-cache: false
|
||||
node-version: ${{ env.CI_NODE_VERSION }}
|
||||
@@ -1331,7 +1238,7 @@ jobs:
|
||||
# PR acceleration is not release-candidate provenance.
|
||||
cache: ${{ github.event_name == 'pull_request' }}
|
||||
- name: Download all shard coverage
|
||||
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8
|
||||
uses: actions/download-artifact@v8
|
||||
with:
|
||||
pattern: coverage-shard-*
|
||||
path: coverage-shards/
|
||||
@@ -1402,9 +1309,7 @@ jobs:
|
||||
- name: Upload coverage to Codecov (informational)
|
||||
# Push/merge-queue only: on a PR it cost ~5 min of the job for an informational
|
||||
# patch-coverage note, and the PR no longer writes lcov.info (see the merge step).
|
||||
# Not on omni-queue/** candidates either: fork code ran in this job before the token
|
||||
# step, and Codecov would gain a branch per candidate.
|
||||
if: ${{ always() && github.event_name != 'pull_request' && !startsWith(github.ref, 'refs/heads/omni-queue/') }}
|
||||
if: ${{ always() && github.event_name != 'pull_request' }}
|
||||
# Informational means informational: its own ceiling and continue-on-error, so a
|
||||
# stalled upload can neither eat the job's budget nor turn a green job cancelled.
|
||||
timeout-minutes: 5
|
||||
@@ -1421,7 +1326,7 @@ jobs:
|
||||
fail_ci_if_error: false
|
||||
- name: Upload coverage artifacts
|
||||
if: always()
|
||||
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: coverage-report
|
||||
path: |
|
||||
@@ -1437,13 +1342,12 @@ jobs:
|
||||
# Temporarily opt-in: the private project currently has no Sonar quota.
|
||||
# Re-enable without another code change by setting the repository Actions
|
||||
# variable SONARQUBE_ENABLED=true after quota/project access is restored.
|
||||
# Never on omni-queue/** candidates: the job env carries SONAR_TOKEN next to fork code.
|
||||
if: ${{ vars.SONARQUBE_ENABLED == 'true' && !cancelled() && needs.test-coverage.result == 'success' && !startsWith(github.ref, 'refs/heads/omni-queue/') && !startsWith(github.head_ref, 'omni-queue/') }}
|
||||
if: ${{ vars.SONARQUBE_ENABLED == 'true' && !cancelled() && needs.test-coverage.result == 'success' }}
|
||||
env:
|
||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
||||
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
||||
- uses: actions/checkout@v7
|
||||
with:
|
||||
persist-credentials: false
|
||||
fetch-depth: 0
|
||||
@@ -1451,7 +1355,7 @@ jobs:
|
||||
# lcov.info directly — download into coverage/ so it lands at coverage/lcov.info,
|
||||
# where sonar.javascript.lcov.reportPaths expects it (path: . left the Sonar
|
||||
# new-code coverage at 0% every scan).
|
||||
- uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8
|
||||
- uses: actions/download-artifact@v8
|
||||
with:
|
||||
name: coverage-report
|
||||
path: coverage/
|
||||
@@ -1475,7 +1379,7 @@ jobs:
|
||||
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
|
||||
- name: SonarQube Scan
|
||||
if: ${{ github.event_name == 'pull_request' && env.SONAR_TOKEN != '' && env.SONAR_HOST_URL != '' }}
|
||||
uses: SonarSource/sonarqube-scan-action@e805d875275f728fac1885b413934be6d7c63f65 # v8
|
||||
uses: SonarSource/sonarqube-scan-action@v8
|
||||
env:
|
||||
SONAR_TOKEN: ${{ env.SONAR_TOKEN }}
|
||||
SONAR_HOST_URL: ${{ env.SONAR_HOST_URL }}
|
||||
@@ -1502,7 +1406,7 @@ jobs:
|
||||
- name: Download coverage artifact
|
||||
if: ${{ needs.test-coverage.result != 'cancelled' }}
|
||||
continue-on-error: true
|
||||
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8
|
||||
uses: actions/download-artifact@v8
|
||||
with:
|
||||
name: coverage-report
|
||||
path: .
|
||||
@@ -1531,7 +1435,7 @@ jobs:
|
||||
echo "This PR changes production code in \`src/\`, \`open-sse/\`, \`electron/\`, or \`bin/\` without accompanying automated tests."
|
||||
fi
|
||||
} > .artifacts/pr-coverage-comment.md
|
||||
- uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9
|
||||
- uses: actions/github-script@v9
|
||||
with:
|
||||
script: |
|
||||
const fs = require("fs");
|
||||
@@ -1590,10 +1494,10 @@ jobs:
|
||||
DISABLE_SQLITE_AUTO_BACKUP: "true"
|
||||
OMNIROUTE_PLAYWRIGHT_SKIP_BUILD: "1"
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
||||
- uses: actions/checkout@v7
|
||||
with:
|
||||
persist-credentials: false
|
||||
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
|
||||
- uses: actions/setup-node@v7
|
||||
with:
|
||||
package-manager-cache: false
|
||||
node-version: ${{ env.CI_NODE_VERSION }}
|
||||
@@ -1611,7 +1515,7 @@ jobs:
|
||||
restore-keys: playwright-chromium-${{ runner.os }}-
|
||||
- run: npx playwright install --with-deps chromium
|
||||
- name: Download Next.js build artifact
|
||||
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8
|
||||
uses: actions/download-artifact@v8
|
||||
with:
|
||||
name: next-build
|
||||
# Workspace-relative on purpose: the matrix below includes windows-latest, whose
|
||||
@@ -1643,9 +1547,7 @@ jobs:
|
||||
fi
|
||||
# WS5.2/5.3: Trunk Flaky Tests upload — advisory, own-origin only, SHA-pinned.
|
||||
- name: Upload test results to Trunk (advisory)
|
||||
# Not on omni-queue/** candidates: their tree carries fork code, and Trunk would gain a
|
||||
# branch per candidate.
|
||||
if: ${{ always() && !startsWith(github.ref, 'refs/heads/omni-queue/') && !startsWith(github.head_ref, 'omni-queue/') && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) }}
|
||||
if: ${{ always() && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) }}
|
||||
continue-on-error: true
|
||||
uses: trunk-io/analytics-uploader@a86313c7029d22e6ea2d5c346060a224d90053dc # v2.1.6
|
||||
with:
|
||||
@@ -1674,10 +1576,10 @@ jobs:
|
||||
DATA_DIR: /tmp/omniroute-ci-${{ matrix.shard }}
|
||||
DISABLE_SQLITE_AUTO_BACKUP: "true"
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
||||
- uses: actions/checkout@v7
|
||||
with:
|
||||
persist-credentials: false
|
||||
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
|
||||
- uses: actions/setup-node@v7
|
||||
with:
|
||||
package-manager-cache: false
|
||||
node-version: ${{ env.CI_NODE_VERSION }}
|
||||
@@ -1702,10 +1604,10 @@ jobs:
|
||||
API_KEY_SECRET: ci-test-api-key-secret-long
|
||||
DISABLE_SQLITE_AUTO_BACKUP: "true"
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
||||
- uses: actions/checkout@v7
|
||||
with:
|
||||
persist-credentials: false
|
||||
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
|
||||
- uses: actions/setup-node@v7
|
||||
with:
|
||||
package-manager-cache: false
|
||||
node-version: ${{ env.CI_NODE_VERSION }}
|
||||
@@ -1736,10 +1638,10 @@ jobs:
|
||||
API_KEY_SECRET: ci-test-api-key-secret-long
|
||||
DISABLE_SQLITE_AUTO_BACKUP: "true"
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
||||
- uses: actions/checkout@v7
|
||||
with:
|
||||
persist-credentials: false
|
||||
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
|
||||
- uses: actions/setup-node@v7
|
||||
with:
|
||||
package-manager-cache: false
|
||||
node-version: ${{ env.CI_NODE_VERSION }}
|
||||
@@ -1771,10 +1673,10 @@ jobs:
|
||||
API_KEY_SECRET: ci-test-api-key-secret-long
|
||||
DISABLE_SQLITE_AUTO_BACKUP: "true"
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
||||
- uses: actions/checkout@v7
|
||||
with:
|
||||
persist-credentials: false
|
||||
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
|
||||
- uses: actions/setup-node@v7
|
||||
with:
|
||||
package-manager-cache: false
|
||||
node-version: ${{ env.CI_NODE_VERSION }}
|
||||
@@ -1786,11 +1688,13 @@ jobs:
|
||||
- run: npm run test:protocols:e2e
|
||||
|
||||
admission-verdict:
|
||||
# Only requested candidates receive the required check name. An ordinary draft
|
||||
# deliberately skips its producer jobs and must not create a failed admission.
|
||||
# Classifier failures still reach the gate; queue metadata edits keep their own name.
|
||||
name: ${{ (github.event_name == 'pull_request' && github.event.action == 'edited' && github.event.pull_request.user.login == 'mergify[bot]' && startsWith(github.head_ref, 'mergify/merge-queue/') && github.event.pull_request.head.repo.id == github.event.repository.id) && 'Gate / CI (queue-draft edit)' || (github.event_name != 'pull_request' || github.event.pull_request.draft == false || needs.changes.outputs.queueCandidate == 'true' || needs.changes.result != 'success') && 'Gate / CI' || 'Admission not requested / CI' }}
|
||||
if: ${{ always() && !(github.event_name == 'pull_request' && github.event.action == 'edited' && github.event.pull_request.user.login == 'mergify[bot]' && startsWith(github.head_ref, 'mergify/merge-queue/') && github.event.pull_request.head.repo.id == github.event.repository.id) && (github.event_name != 'pull_request' || github.event.pull_request.draft == false || needs.changes.outputs.queueCandidate == 'true' || needs.changes.result != 'success') }}
|
||||
# A queue-draft edit run must not leave a check named "Gate / CI" on the draft: Mergify
|
||||
# read that skipped check as a finished non-success and dequeued the PR (#18961 on
|
||||
# 2026-11-04) before the real run reported. Every other run keeps the exact name.
|
||||
name: ${{ (github.event_name == 'pull_request' && github.event.action == 'edited' && github.event.pull_request.user.login == 'mergify[bot]' && startsWith(github.head_ref, 'mergify/merge-queue/') && github.event.pull_request.head.repo.id == github.event.repository.id) && 'Gate / CI (queue-draft edit)' || 'Gate / CI' }}
|
||||
# Runs on every candidate; only a Mergify queue-draft description edit skips it (see the
|
||||
# workflow concurrency note): that draft is never what branch protection merges.
|
||||
if: ${{ always() && !(github.event_name == 'pull_request' && github.event.action == 'edited' && github.event.pull_request.user.login == 'mergify[bot]' && startsWith(github.head_ref, 'mergify/merge-queue/') && github.event.pull_request.head.repo.id == github.event.repository.id) }}
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 5
|
||||
needs:
|
||||
@@ -1867,7 +1771,7 @@ jobs:
|
||||
steps:
|
||||
- name: Download i18n results
|
||||
continue-on-error: true
|
||||
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8
|
||||
uses: actions/download-artifact@v8
|
||||
with:
|
||||
pattern: i18n-*
|
||||
path: results
|
||||
|
||||
4
.github/workflows/claude.yml
vendored
4
.github/workflows/claude.yml
vendored
@@ -30,14 +30,14 @@ jobs:
|
||||
actions: read # Required for Claude to read CI results on PRs
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
||||
uses: actions/checkout@v7
|
||||
with:
|
||||
persist-credentials: false
|
||||
fetch-depth: 1
|
||||
|
||||
- name: Run Claude Code
|
||||
id: claude
|
||||
uses: anthropics/claude-code-action@61a9c274fa7110a66dfafc1bbbced03833eb25fe # v1
|
||||
uses: anthropics/claude-code-action@v1
|
||||
with:
|
||||
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
|
||||
|
||||
|
||||
11
.github/workflows/deploy-vps.yml
vendored
11
.github/workflows/deploy-vps.yml
vendored
@@ -12,15 +12,8 @@ permissions:
|
||||
jobs:
|
||||
deploy:
|
||||
if: >-
|
||||
(github.event_name == 'workflow_dispatch' ||
|
||||
(github.event.workflow_run.conclusion == 'success' &&
|
||||
github.event.workflow_run.head_repository.id == github.event.repository.id &&
|
||||
contains(fromJSON('["push","release","workflow_dispatch"]'), github.event.workflow_run.event) &&
|
||||
(github.event.workflow_run.head_branch == 'main' ||
|
||||
startsWith(github.event.workflow_run.head_branch, 'release/v') ||
|
||||
startsWith(github.event.workflow_run.head_branch, 'v'))))
|
||||
(github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success')
|
||||
&& vars.DEPLOY_ENABLED == 'true'
|
||||
&& !startsWith(github.event.workflow_run.head_branch, 'omni-queue/') && !startsWith(github.ref, 'refs/heads/omni-queue/')
|
||||
name: Deploy OmniRoute to VPS
|
||||
runs-on: ubuntu-latest
|
||||
# Bound a hung SSH session to an hour instead of GitHub's 6-hour default; the deploy
|
||||
@@ -52,7 +45,7 @@ jobs:
|
||||
|
||||
- name: Deploy via SSH
|
||||
if: steps.reach.outputs.reachable == 'true'
|
||||
uses: appleboy/ssh-action@0ff4204d59e8e51228ff73bce53f80d53301dee2 # v1
|
||||
uses: appleboy/ssh-action@v1
|
||||
with:
|
||||
host: ${{ secrets.VPS_HOST }}
|
||||
username: ${{ secrets.VPS_USER }}
|
||||
|
||||
85
.github/workflows/docker-org-mirror.yml
vendored
85
.github/workflows/docker-org-mirror.yml
vendored
@@ -1,85 +0,0 @@
|
||||
name: Mirror Docker image to the Docker Hub org
|
||||
|
||||
# Copies a published release from ghcr.io/cheaper-inference/omniroute to the Cheaper Inference
|
||||
# Docker Hub organization (cheaperinference/omniroute). The legacy diegosouzapw/omniroute keeps
|
||||
# receiving the same images from docker-publish.yml: Docker Hub cannot move a repository between
|
||||
# namespaces, so its pull history stays there and both are published in parallel.
|
||||
#
|
||||
# Two entry points:
|
||||
# - workflow_call from docker-publish.yml, right after a release's manifests are created;
|
||||
# - workflow_dispatch to (re)publish an already released version to the org only, for example
|
||||
# once the org owner provides the credentials. It copies the existing images and does not
|
||||
# rebuild anything (minutes, not the ~2 h of a docker-publish dispatch).
|
||||
#
|
||||
# Without the DOCKERHUB_ORG_USERNAME / DOCKERHUB_ORG_TOKEN secrets the job skips with a warning
|
||||
# annotation and a job-summary line and stays green (scripts/ci/docker-org-mirror.mjs).
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
version:
|
||||
description: "Released version to mirror (e.g. 3.8.54)"
|
||||
required: true
|
||||
type: string
|
||||
promote_latest:
|
||||
description: "Also move :latest and :latest-web on the org repository"
|
||||
required: false
|
||||
type: boolean
|
||||
default: false
|
||||
secrets:
|
||||
DOCKERHUB_ORG_USERNAME:
|
||||
required: false
|
||||
DOCKERHUB_ORG_TOKEN:
|
||||
required: false
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
version:
|
||||
description: "Released version to mirror (e.g. 3.8.54)"
|
||||
required: true
|
||||
type: string
|
||||
promote_latest:
|
||||
description: "Also move :latest and :latest-web (only when this is the highest stable version)"
|
||||
required: false
|
||||
type: boolean
|
||||
default: false
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
mirror:
|
||||
name: Copy release to cheaperinference/omniroute
|
||||
runs-on: ${{ vars.DOCKER_AMD64_RUNNER == 'blacksmith' && 'blacksmith-2vcpu-ubuntu-2404' || 'ubuntu-latest' }}
|
||||
timeout-minutes: 45
|
||||
permissions:
|
||||
contents: read
|
||||
env:
|
||||
HAS_ORG_CREDENTIALS: ${{ secrets.DOCKERHUB_ORG_USERNAME != '' && secrets.DOCKERHUB_ORG_TOKEN != '' }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
||||
with:
|
||||
persist-credentials: false
|
||||
fetch-depth: 1
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@f87e5991a6d7451dcb8d9637bfbc97413f497069 # v4
|
||||
|
||||
- name: Copy the release images
|
||||
env:
|
||||
VERSION: ${{ inputs.version }}
|
||||
PROMOTE_LATEST: ${{ inputs.promote_latest && 'true' || 'false' }}
|
||||
DOCKERHUB_ORG_USERNAME: ${{ secrets.DOCKERHUB_ORG_USERNAME }}
|
||||
DOCKERHUB_ORG_TOKEN: ${{ secrets.DOCKERHUB_ORG_TOKEN }}
|
||||
run: node scripts/ci/docker-org-mirror.mjs
|
||||
|
||||
- name: Update the org repository description
|
||||
if: env.HAS_ORG_CREDENTIALS == 'true' && inputs.promote_latest
|
||||
continue-on-error: true
|
||||
uses: peter-evans/dockerhub-description@1b9a80c056b620d92cedb9d9b5a223409c68ddfa # v5
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_ORG_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_ORG_TOKEN }}
|
||||
repository: cheaperinference/omniroute
|
||||
short-description: "OmniRoute — Unified AI proxy. Route any LLM through one endpoint."
|
||||
readme-filepath: ./README.md
|
||||
64
.github/workflows/docker-publish.yml
vendored
64
.github/workflows/docker-publish.yml
vendored
@@ -82,7 +82,7 @@ jobs:
|
||||
GHCR_IMAGE_NAME: ghcr.io/cheaper-inference/omniroute
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
||||
uses: actions/checkout@v7
|
||||
with:
|
||||
persist-credentials: false
|
||||
# Control scripts come from this workflow ref, not an older release tag.
|
||||
@@ -106,10 +106,10 @@ jobs:
|
||||
run: node scripts/ci/blacksmith-budget.mjs
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@f87e5991a6d7451dcb8d9637bfbc97413f497069 # v4
|
||||
uses: docker/setup-buildx-action@v4
|
||||
|
||||
- name: Login to GitHub Container Registry
|
||||
uses: docker/login-action@81c6f93d4bc991e510b342a00b419b3bb4efc5c6 # v4.7.0
|
||||
uses: docker/login-action@v4.7.0
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
@@ -299,7 +299,7 @@ jobs:
|
||||
GHCR_IMAGE_NAME: ghcr.io/cheaper-inference/omniroute
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
||||
uses: actions/checkout@v7
|
||||
with:
|
||||
persist-credentials: false
|
||||
ref: ${{ github.event_name == 'workflow_dispatch' && format('refs/tags/v{0}', inputs.version) || '' }}
|
||||
@@ -310,16 +310,16 @@ jobs:
|
||||
run: docker info
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@f87e5991a6d7451dcb8d9637bfbc97413f497069 # v4
|
||||
uses: docker/setup-buildx-action@v4
|
||||
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@81c6f93d4bc991e510b342a00b419b3bb4efc5c6 # v4.7.0
|
||||
uses: docker/login-action@v4.7.0
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Login to GitHub Container Registry
|
||||
uses: docker/login-action@81c6f93d4bc991e510b342a00b419b3bb4efc5c6 # v4.7.0
|
||||
uses: docker/login-action@v4.7.0
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
@@ -332,7 +332,7 @@ jobs:
|
||||
# (tests/unit/docker-publish-build-heap-14325.test.ts).
|
||||
- name: Build and push platform image by digest
|
||||
id: build
|
||||
uses: docker/build-push-action@c3c9e263c25d99ce0380d002d59b67737d91b0dc # v7
|
||||
uses: docker/build-push-action@v7
|
||||
with:
|
||||
context: .
|
||||
target: runner-base
|
||||
@@ -352,7 +352,7 @@ jobs:
|
||||
|
||||
- name: Build and push WEB platform image by digest
|
||||
id: build-web
|
||||
uses: docker/build-push-action@c3c9e263c25d99ce0380d002d59b67737d91b0dc # v7
|
||||
uses: docker/build-push-action@v7
|
||||
with:
|
||||
context: .
|
||||
target: runner-web
|
||||
@@ -406,7 +406,7 @@ jobs:
|
||||
touch "/tmp/digests/web/${DIGEST_WEB#sha256:}"
|
||||
|
||||
- name: Upload base digests
|
||||
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: digests-base-${{ matrix.arch }}
|
||||
path: /tmp/digests/base/*
|
||||
@@ -414,7 +414,7 @@ jobs:
|
||||
retention-days: 1
|
||||
|
||||
- name: Upload web digests
|
||||
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: digests-web-${{ matrix.arch }}
|
||||
path: /tmp/digests/web/*
|
||||
@@ -549,7 +549,7 @@ jobs:
|
||||
PROMOTE_LATEST: ${{ needs.prepare.outputs.promote_latest }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
||||
uses: actions/checkout@v7
|
||||
with:
|
||||
persist-credentials: false
|
||||
# Manifest validation must use the current workflow's helper on backfills.
|
||||
@@ -557,30 +557,30 @@ jobs:
|
||||
fetch-depth: 1
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@f87e5991a6d7451dcb8d9637bfbc97413f497069 # v4
|
||||
uses: docker/setup-buildx-action@v4
|
||||
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@81c6f93d4bc991e510b342a00b419b3bb4efc5c6 # v4.7.0
|
||||
uses: docker/login-action@v4.7.0
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Login to GitHub Container Registry
|
||||
uses: docker/login-action@81c6f93d4bc991e510b342a00b419b3bb4efc5c6 # v4.7.0
|
||||
uses: docker/login-action@v4.7.0
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Download base digests
|
||||
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8
|
||||
uses: actions/download-artifact@v8
|
||||
with:
|
||||
pattern: digests-base-*
|
||||
path: /tmp/digests/base
|
||||
merge-multiple: true
|
||||
|
||||
- name: Download web digests
|
||||
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8
|
||||
uses: actions/download-artifact@v8
|
||||
with:
|
||||
pattern: digests-web-*
|
||||
path: /tmp/digests/web
|
||||
@@ -824,7 +824,7 @@ jobs:
|
||||
- name: Generate CycloneDX SBOM (image, advisory)
|
||||
if: needs.prepare.outputs.version != 'main'
|
||||
continue-on-error: true
|
||||
uses: anchore/sbom-action@e22c389904149dbc22b58101806040fa8d37a610 # v0
|
||||
uses: anchore/sbom-action@v0
|
||||
with:
|
||||
image: ${{ env.GHCR_IMAGE_NAME }}:${{ env.VERSION }}
|
||||
format: cyclonedx-json
|
||||
@@ -880,7 +880,7 @@ jobs:
|
||||
- name: Upload Trivy SARIF to Security tab
|
||||
if: needs.prepare.outputs.version != 'main'
|
||||
continue-on-error: true
|
||||
uses: github/codeql-action/upload-sarif@33d7b85da1a04171e211befe2c739303b9a4c066 # v4.39.3
|
||||
uses: github/codeql-action/upload-sarif@v4.39.3
|
||||
with:
|
||||
sarif_file: trivy-results.sarif
|
||||
category: trivy-image
|
||||
@@ -889,7 +889,7 @@ jobs:
|
||||
# Only refresh README/description when we actually promote :latest
|
||||
# (avoids overwriting from main, next, or back-fill builds).
|
||||
if: needs.prepare.outputs.promote_latest == 'true'
|
||||
uses: peter-evans/dockerhub-description@1b9a80c056b620d92cedb9d9b5a223409c68ddfa # v5
|
||||
uses: peter-evans/dockerhub-description@v5
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
@@ -897,30 +897,6 @@ jobs:
|
||||
short-description: "OmniRoute — Unified AI proxy. Route any LLM through one endpoint."
|
||||
readme-filepath: ./README.md
|
||||
|
||||
# Second Docker Hub repository, owned by the Cheaper Inference organization. Docker Hub cannot
|
||||
# move a repository between namespaces, so diegosouzapw/omniroute (and its pull history) keeps
|
||||
# receiving every image above and the release is copied here from GHCR, same manifests.
|
||||
# Released versions only (not main/next). Without the DOCKERHUB_ORG_* secrets the called job
|
||||
# skips with a warning and stays green, so a missing org credential never blocks a release;
|
||||
# republish later with a workflow_dispatch of docker-org-mirror.yml (copy only, no rebuild).
|
||||
mirror-org-dockerhub:
|
||||
name: Mirror to the Docker Hub org
|
||||
needs: [prepare, merge]
|
||||
if: >-
|
||||
!cancelled() && github.event_name != 'schedule' &&
|
||||
needs.merge.result == 'success' &&
|
||||
needs.prepare.outputs.version != 'main' && needs.prepare.outputs.version != 'next' &&
|
||||
(github.event_name != 'schedule' || github.repository == 'cheaper-inference/OmniRoute')
|
||||
permissions:
|
||||
contents: read
|
||||
uses: ./.github/workflows/docker-org-mirror.yml
|
||||
with:
|
||||
version: ${{ needs.prepare.outputs.version }}
|
||||
promote_latest: ${{ needs.prepare.outputs.promote_latest == 'true' }}
|
||||
secrets:
|
||||
DOCKERHUB_ORG_USERNAME: ${{ secrets.DOCKERHUB_ORG_USERNAME }}
|
||||
DOCKERHUB_ORG_TOKEN: ${{ secrets.DOCKERHUB_ORG_TOKEN }}
|
||||
|
||||
# #14560: alert when the only omni-build runner goes offline. Mirrors the
|
||||
# nightly-release-green issue loop: open a deduplicated tracking issue when
|
||||
# no online runner carries the label, comment with fresh evidence while it
|
||||
|
||||
27
.github/workflows/electron-release.yml
vendored
27
.github/workflows/electron-release.yml
vendored
@@ -6,7 +6,7 @@ on:
|
||||
- "v*"
|
||||
# A dispatch builds the ref it is dispatched ON (`gh workflow run … --ref v3.8.50` rebuilds
|
||||
# that tag; `--ref main` builds the repaired line). The ref is deliberately NOT an input:
|
||||
# CodeQL flags an input-controlled checkout next to a dependency cache on the default branch as
|
||||
# CodeQL flags an input-controlled checkout next to the npm cache on the default branch as
|
||||
# cache poisoning (actions/cache-poisoning/poisonable-step), and `github.ref` is trusted.
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
@@ -36,7 +36,7 @@ jobs:
|
||||
version: ${{ steps.validate.outputs.version }}
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
||||
uses: actions/checkout@v7
|
||||
with:
|
||||
persist-credentials: false
|
||||
fetch-depth: 0
|
||||
@@ -83,14 +83,13 @@ jobs:
|
||||
contents: read
|
||||
actions: read # find + download the CI run's next-build artifact for this SHA (as npm-publish does)
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
||||
- uses: actions/checkout@v7
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
|
||||
uses: actions/setup-node@v7
|
||||
with:
|
||||
node-version: 24
|
||||
package-manager-cache: false
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
@@ -157,7 +156,7 @@ jobs:
|
||||
run: node scripts/build/standaloneBundle.mjs pack --out web-bundle.tar.gz
|
||||
|
||||
- name: Upload shared web bundle
|
||||
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: web-standalone-bundle
|
||||
# compression-level 0: the payload is already a deterministic tar.gz;
|
||||
@@ -213,14 +212,14 @@ jobs:
|
||||
arch: x64,arm64
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
||||
- uses: actions/checkout@v7
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
|
||||
uses: actions/setup-node@v7
|
||||
with:
|
||||
node-version: 24
|
||||
package-manager-cache: false
|
||||
cache: npm
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
@@ -280,7 +279,7 @@ jobs:
|
||||
# Stage 8: inverse of the fallback step above — runs exactly when the
|
||||
# shared `web-build` job produced the bundle.
|
||||
if: needs.web-build.result == 'success'
|
||||
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8
|
||||
uses: actions/download-artifact@v8
|
||||
with:
|
||||
name: web-standalone-bundle
|
||||
|
||||
@@ -398,7 +397,7 @@ jobs:
|
||||
.build/optional-packs release-assets
|
||||
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: electron-${{ matrix.platform }}
|
||||
path: release-assets/
|
||||
@@ -421,7 +420,7 @@ jobs:
|
||||
contents: write # softprops/action-gh-release creates the GitHub Release
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
||||
uses: actions/checkout@v7
|
||||
with:
|
||||
persist-credentials: false
|
||||
fetch-depth: 0
|
||||
@@ -435,7 +434,7 @@ jobs:
|
||||
# ARM dmg. Downloading into per-artifact subdirectories keeps both, so they can be
|
||||
# merged on purpose instead of by luck.
|
||||
- name: Download all artifacts
|
||||
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8
|
||||
uses: actions/download-artifact@v8
|
||||
with:
|
||||
path: artifacts
|
||||
|
||||
@@ -477,7 +476,7 @@ jobs:
|
||||
run: ls -la release-assets/
|
||||
|
||||
- name: Create Release
|
||||
uses: softprops/action-gh-release@8a0cd651e5b2365bd640854a3fa5dfc70e4875f3 # v3
|
||||
uses: softprops/action-gh-release@v3
|
||||
with:
|
||||
tag_name: ${{ needs.validate.outputs.version }}
|
||||
draft: false
|
||||
|
||||
47
.github/workflows/i18n-mirror-refresh.yml
vendored
47
.github/workflows/i18n-mirror-refresh.yml
vendored
@@ -11,10 +11,7 @@ name: i18n mirror refresh
|
||||
# hand-edited and stale mirrors);
|
||||
# 3. translate them: the LLM chain first when the backend secrets are configured (model, then
|
||||
# OMNIROUTE_TRANSLATION_FALLBACK_MODELS, then a re-split, then Google as the last resort),
|
||||
# otherwise the structure-safe Google engine alone. The docs/i18n/<locale>/llm.txt mirrors
|
||||
# are exact copies, not translations (run-translation and the drift check skip them):
|
||||
# when the root llm.txt moved, scripts/i18n/sync-llm-mirrors.mjs rewrites them in the
|
||||
# same run, since feature PRs edit only the root llm.txt;
|
||||
# otherwise the structure-safe Google engine alone;
|
||||
# 4. `npm run check:docs-all` + the drift check must both pass; then the mirrors are committed
|
||||
# to the fixed branch `chore/i18n-mirror-refresh` (force-reset from the target every run)
|
||||
# and one PR is opened, or the open one is updated by the force-push;
|
||||
@@ -142,40 +139,22 @@ jobs:
|
||||
.map((x) => x.rel).filter(Boolean);
|
||||
process.stdout.write([...new Set(rels)].sort().join(","));
|
||||
')
|
||||
# llm.txt mirrors are exact copies of the root llm.txt (not in the drift report):
|
||||
# count the ones the sync would rewrite, without writing.
|
||||
LLM_STALE=$(node --input-type=module -e '
|
||||
import { syncLlmMirrors } from "./scripts/i18n/sync-llm-mirrors.mjs";
|
||||
const r = await syncLlmMirrors({ dryRun: true });
|
||||
process.stdout.write(String(r.updated));
|
||||
')
|
||||
if [ "$LLM_STALE" -gt 0 ]; then
|
||||
echo "llm=true" >> "$GITHUB_OUTPUT"
|
||||
echo "Stale llm.txt mirrors: $LLM_STALE" >> "$GITHUB_STEP_SUMMARY"
|
||||
else
|
||||
echo "llm=false" >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
if [ -z "$FILES" ]; then
|
||||
echo "No drifted mirrors — nothing to refresh." >> "$GITHUB_STEP_SUMMARY"
|
||||
echo "files=" >> "$GITHUB_OUTPUT"
|
||||
else
|
||||
echo "Drifted sources: \`${FILES//,/\`, \`}\`" >> "$GITHUB_STEP_SUMMARY"
|
||||
echo "files=$FILES" >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
if [ -z "$FILES" ] && [ "$LLM_STALE" -eq 0 ]; then
|
||||
echo "No drifted mirrors — nothing to refresh." >> "$GITHUB_STEP_SUMMARY"
|
||||
echo "refresh=false" >> "$GITHUB_OUTPUT"
|
||||
else
|
||||
echo "refresh=true" >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
|
||||
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
|
||||
if: steps.drift.outputs.refresh == 'true'
|
||||
if: steps.drift.outputs.files != ''
|
||||
with:
|
||||
package-manager-cache: false
|
||||
node-version: "24"
|
||||
|
||||
- uses: ./.github/actions/npm-ci-retry
|
||||
if: steps.drift.outputs.refresh == 'true'
|
||||
if: steps.drift.outputs.files != ''
|
||||
env:
|
||||
ONNXRUNTIME_NODE_INSTALL: "skip"
|
||||
|
||||
@@ -233,17 +212,12 @@ jobs:
|
||||
exit "$RC"
|
||||
fi
|
||||
|
||||
- name: Sync the llm.txt mirrors
|
||||
if: steps.drift.outputs.llm == 'true'
|
||||
run: node scripts/i18n/sync-llm-mirrors.mjs
|
||||
|
||||
- name: Check the refreshed mirrors
|
||||
if: steps.drift.outputs.refresh == 'true'
|
||||
if: steps.drift.outputs.files != ''
|
||||
run: |
|
||||
set -uo pipefail
|
||||
FAILED=0
|
||||
# Derived files are refreshed at release (plan 2026-11-13): sources only, base drift excused.
|
||||
OMNIROUTE_GATE_MODE="pr" npm run check:docs-all 2>&1 | tee "$RUNNER_TEMP/docs-all.log"
|
||||
npm run check:docs-all 2>&1 | tee "$RUNNER_TEMP/docs-all.log"
|
||||
DOCS_RC=${PIPESTATUS[0]}
|
||||
node scripts/i18n/check-translation-drift.mjs --json --warn > "$RUNNER_TEMP/drift-after.json"
|
||||
# Drift left by the failed units of a partial run is excused; any other drift blocks.
|
||||
@@ -282,7 +256,7 @@ jobs:
|
||||
exit "$FAILED"
|
||||
|
||||
- name: Commit and open or update the refresh PR
|
||||
if: steps.drift.outputs.refresh == 'true'
|
||||
if: steps.drift.outputs.files != ''
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.I18N_REFRESH_TOKEN || github.token }}
|
||||
REPO: ${{ github.repository }}
|
||||
@@ -290,12 +264,9 @@ jobs:
|
||||
ENGINE: ${{ steps.translate.outputs.engine }}
|
||||
PARTIAL: ${{ steps.translate.outputs.partial }}
|
||||
FILES: ${{ steps.drift.outputs.files }}
|
||||
LLM: ${{ steps.drift.outputs.llm }}
|
||||
RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
SOURCES="$FILES"
|
||||
if [ "${LLM:-}" = "true" ]; then SOURCES="${SOURCES:+$SOURCES,}llm.txt"; fi
|
||||
git add -A docs/i18n .i18n-state.json
|
||||
if git diff --cached --quiet; then
|
||||
echo "Translation produced no change — nothing to commit." >> "$GITHUB_STEP_SUMMARY"
|
||||
@@ -316,7 +287,7 @@ jobs:
|
||||
git -c user.name="github-actions[bot]" \
|
||||
-c user.email="41898282+github-actions[bot]@users.noreply.github.com" \
|
||||
commit --quiet -m "$PR_TITLE" \
|
||||
-m "Engine: ${ENGINE:-none}. Sources: ${SOURCES//,/, }. ${COUNT} mirror file(s).${NOTE}" \
|
||||
-m "Engine: ${ENGINE}. Sources: ${FILES//,/, }. ${COUNT} mirror file(s).${NOTE}" \
|
||||
-m "Run: ${RUN_URL}"
|
||||
gh auth setup-git
|
||||
# Fixed branch, reset from the target on every run: the open PR always shows exactly
|
||||
@@ -328,7 +299,7 @@ jobs:
|
||||
echo
|
||||
echo "- Target: \`${BASE}\`"
|
||||
echo "- Engine: \`${ENGINE}\` (LLM chain first, Google as the last resort; \`google\` when no LLM backend is configured)"
|
||||
echo "- Drifted sources: \`${SOURCES//,/\`, \`}\`"
|
||||
echo "- Drifted sources: \`${FILES//,/\`, \`}\`"
|
||||
echo "- Mirror files changed: ${COUNT}"
|
||||
echo
|
||||
echo "\`npm run check:docs-all\` and \`check-translation-drift.mjs\` passed on the refreshed tree before this PR was opened."
|
||||
|
||||
10
.github/workflows/mutation-redundancy.yml
vendored
10
.github/workflows/mutation-redundancy.yml
vendored
@@ -3,7 +3,7 @@ name: Mutation Redundancy (disableBail, on-demand)
|
||||
# (nightly-mutation.yml) bails on the first kill, so `killedBy` lists only the FIRST
|
||||
# killer — 🟠 redundant is understated and 🟢 unique overstated (see the caveat in
|
||||
# scripts/quality/mutation-radiography.mjs). This workflow re-runs the SAME combo +
|
||||
# chatCore leaf batches with stryker.disablebail.mjs (disableBail:true, incremental:false)
|
||||
# chatCore leaf batches with stryker.disablebail.json (disableBail:true, incremental:false)
|
||||
# so `killedBy` lists EVERY killer. Feed the uploaded reports to
|
||||
# `node scripts/quality/mutation-radiography.mjs --candidates mutation-nobail-*/mutation.json`
|
||||
# to get the accurate R1 prune-candidate list (🔴 empty ∪ 🟠 redundant) for human review.
|
||||
@@ -41,10 +41,10 @@ jobs:
|
||||
mutate: "open-sse/handlers/chatCore/telemetryHelpers.ts,open-sse/handlers/chatCore/memorySkillsInjection.ts,open-sse/handlers/chatCore/semanticCache.ts"
|
||||
timeout-minutes: 300
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
||||
- uses: actions/checkout@v7
|
||||
with:
|
||||
persist-credentials: false
|
||||
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
|
||||
- uses: actions/setup-node@v7
|
||||
with:
|
||||
node-version: "24"
|
||||
cache: npm
|
||||
@@ -54,10 +54,10 @@ jobs:
|
||||
- name: Run Stryker (disableBail)
|
||||
env:
|
||||
BATCH_MUTATE: ${{ matrix.batch.mutate }}
|
||||
run: npx stryker run --config-file stryker.disablebail.mjs --mutate "$BATCH_MUTATE"
|
||||
run: npx stryker run --config-file stryker.disablebail.json --mutate "$BATCH_MUTATE"
|
||||
- name: Upload mutation report
|
||||
if: always()
|
||||
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: mutation-nobail-${{ matrix.batch.name }}
|
||||
path: reports/mutation/
|
||||
|
||||
11
.github/workflows/nightly-compat.yml
vendored
11
.github/workflows/nightly-compat.yml
vendored
@@ -19,6 +19,7 @@ on:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
issues: write
|
||||
|
||||
concurrency:
|
||||
group: nightly-compat
|
||||
@@ -32,7 +33,7 @@ jobs:
|
||||
outputs:
|
||||
target: ${{ steps.branch.outputs.target }}
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
||||
- uses: actions/checkout@v7
|
||||
with:
|
||||
fetch-depth: 0
|
||||
persist-credentials: false
|
||||
@@ -63,11 +64,11 @@ jobs:
|
||||
timeout-minutes: 25
|
||||
needs: resolve-branch
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
||||
- uses: actions/checkout@v7
|
||||
with:
|
||||
ref: ${{ needs.resolve-branch.outputs.target }}
|
||||
persist-credentials: false
|
||||
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
|
||||
- uses: actions/setup-node@v7
|
||||
with:
|
||||
node-version: "26"
|
||||
cache: npm
|
||||
@@ -104,11 +105,11 @@ jobs:
|
||||
DISABLE_SQLITE_AUTO_BACKUP: "true"
|
||||
TEST_SHARD: ${{ matrix.shard }}/4
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
||||
- uses: actions/checkout@v7
|
||||
with:
|
||||
ref: ${{ needs.resolve-branch.outputs.target }}
|
||||
persist-credentials: false
|
||||
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
|
||||
- uses: actions/setup-node@v7
|
||||
with:
|
||||
node-version: ${{ matrix.node }}
|
||||
cache: npm
|
||||
|
||||
216
.github/workflows/nightly-derived-refresh.yml
vendored
216
.github/workflows/nightly-derived-refresh.yml
vendored
@@ -1,216 +0,0 @@
|
||||
name: Nightly derived refresh
|
||||
|
||||
# Plan "derived numbers and texts resolved only at release" (2026-11-13). A feature PR never
|
||||
# writes a value that depends on the state of its base — provider / migration / MCP-tool counts,
|
||||
# the version claims, the README SVG numbers, the facts snapshot (docs/reference/
|
||||
# derived-facts.json). `npm run release:refresh-derived` recomputes all of them in one pass; the
|
||||
# release runs it, and between releases this workflow runs it once a day on the highest
|
||||
# release/vX.Y.Z and keeps ONE pull request open with the result, so the docs never fall more
|
||||
# than a day behind the code. The counts gate lets this PR edit managed numbers because
|
||||
# `chore/derived-*` is a writer branch (scripts/check/lib/derivedClaimsDiff.mjs).
|
||||
#
|
||||
# It never merges, and it skips a branch under release-freeze (Hard Rule #21): during a release
|
||||
# the captain runs the refresh in the release itself.
|
||||
#
|
||||
# Branch chore/derived-refresh belongs to this robot, the same mechanism as the UI Kit upstream
|
||||
# watch (scripts/ci/ui-kit-sync-pr.sh): every run rebuilds it as ONE commit on top of the release
|
||||
# tip and pushes with --force-with-lease pinned to the SHA it read, so a commit pushed after that
|
||||
# read is never overwritten; and an open PR whose branch tip was pushed by someone else (a hand
|
||||
# fix) is left alone until it is merged or closed.
|
||||
#
|
||||
# PR token: DERIVED_REFRESH_PR_TOKEN when set (fine-grained token on this repository, Contents
|
||||
# and Pull requests: write), else I18N_REFRESH_TOKEN — the robot token the i18n mirror refresh
|
||||
# already opens its PR with (same scopes, same purpose; owner decision 2026-11-13). This repository
|
||||
# does not let GITHUB_TOKEN create PRs, and a branch pushed or a PR opened with GITHUB_TOKEN
|
||||
# does not trigger CI, so the refresh PR would sit without checks. With neither secret the branch
|
||||
# is still pushed (with GITHUB_TOKEN) and the run summary says to open the PR by hand.
|
||||
#
|
||||
# Secrets and event values reach the scripts only through `env:`.
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "37 1 * * *" # 01:37 UTC daily, a slot no other workflow uses
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
concurrency:
|
||||
group: nightly-derived-refresh
|
||||
cancel-in-progress: false
|
||||
|
||||
jobs:
|
||||
refresh:
|
||||
name: Refresh derived numbers on the active release branch
|
||||
if: ${{ github.event_name != 'schedule' || github.repository == 'cheaper-inference/OmniRoute' }}
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 45
|
||||
permissions:
|
||||
contents: write # push chore/derived-refresh when no PR token is configured
|
||||
pull-requests: write # find, update and retarget the refresh PR
|
||||
issues: read # release-freeze and base-red lookups
|
||||
env:
|
||||
REFRESH_BRANCH: chore/derived-refresh
|
||||
BOT_NAME: github-actions[bot]
|
||||
BOT_EMAIL: 41898282+github-actions[bot]@users.noreply.github.com
|
||||
steps:
|
||||
- name: Resolve the active release branch and the release freeze
|
||||
id: base
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
BASE=$(gh api "repos/$GITHUB_REPOSITORY/branches" --paginate --jq '.[].name' \
|
||||
| grep -E '^release/v[0-9]+\.[0-9]+\.[0-9]+$' | sort -V | tail -1)
|
||||
[ -n "$BASE" ] || { echo "no release/vX.Y.Z branch" >&2; exit 1; }
|
||||
# A freeze issue is titled "🔒 release-freeze: vX.Y.Z in progress"; v3.8.5 must not
|
||||
# match v3.8.52, and a freeze that names no version freezes everything.
|
||||
VER_RE=$(printf '%s' "${BASE#release/}" | sed 's/\./\\./g')
|
||||
FROZEN=""
|
||||
while IFS=$'\t' read -r NUM TITLE; do
|
||||
[ -n "$NUM" ] || continue
|
||||
if printf '%s' "$TITLE" | grep -qE "(^|[^0-9.])${VER_RE}([^0-9]|$)" \
|
||||
|| ! printf '%s' "$TITLE" | grep -qE 'v[0-9]+\.[0-9]+\.[0-9]+'; then
|
||||
FROZEN="#$NUM"
|
||||
fi
|
||||
done < <(gh issue list --repo "$GITHUB_REPOSITORY" --label release-freeze --state open \
|
||||
--json number,title --jq '.[] | "\(.number)\t\(.title)"')
|
||||
RED=$(gh issue list --repo "$GITHUB_REPOSITORY" --state open \
|
||||
--search "Release branch not green: $BASE in:title" --json number --jq '.[0].number // empty')
|
||||
{
|
||||
echo "branch=$BASE"
|
||||
echo "skip=$([ -n "$FROZEN" ] && echo true || echo false)"
|
||||
echo "red=$RED"
|
||||
} >> "$GITHUB_OUTPUT"
|
||||
if [ -n "$FROZEN" ]; then
|
||||
echo "::notice::$BASE is under release-freeze ($FROZEN) — the release refreshes it."
|
||||
echo "Skipped: \`$BASE\` is under release-freeze ($FROZEN)." >> "$GITHUB_STEP_SUMMARY"
|
||||
else
|
||||
echo "Target branch: \`$BASE\` (base-red: ${RED:-none})" >> "$GITHUB_STEP_SUMMARY"
|
||||
fi
|
||||
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
if: steps.base.outputs.skip == 'false'
|
||||
with:
|
||||
ref: ${{ steps.base.outputs.branch }}
|
||||
fetch-depth: 1
|
||||
persist-credentials: false
|
||||
|
||||
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
|
||||
if: steps.base.outputs.skip == 'false'
|
||||
with:
|
||||
package-manager-cache: false
|
||||
node-version: "24"
|
||||
|
||||
- uses: ./.github/actions/npm-ci-retry
|
||||
if: steps.base.outputs.skip == 'false'
|
||||
with:
|
||||
cache: false
|
||||
|
||||
- name: Refresh derived numbers
|
||||
if: steps.base.outputs.skip == 'false'
|
||||
run: npm run release:refresh-derived -- --profile=nightly
|
||||
|
||||
- name: Commit, push and open or update the refresh PR
|
||||
if: steps.base.outputs.skip == 'false'
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.DERIVED_REFRESH_PR_TOKEN || secrets.I18N_REFRESH_TOKEN || github.token }}
|
||||
HAS_PR_TOKEN: ${{ secrets.DERIVED_REFRESH_PR_TOKEN != '' || secrets.I18N_REFRESH_TOKEN != '' }}
|
||||
BASE: ${{ steps.base.outputs.branch }}
|
||||
BASE_RED_ISSUE: ${{ steps.base.outputs.red }}
|
||||
RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
TITLE="chore(docs): refresh derived numbers on ${BASE}"
|
||||
git add -A
|
||||
if git diff --cached --quiet; then
|
||||
echo "Every derived number on \`$BASE\` already matches the live code." >> "$GITHUB_STEP_SUMMARY"
|
||||
# A refresh PR left open from an earlier run now carries values the base no longer
|
||||
# needs (the code moved back, or the release refreshed itself): close it so it cannot
|
||||
# be merged by mistake. A tip pushed by someone else is only reported.
|
||||
STALE=$(gh pr list --repo "$GITHUB_REPOSITORY" --head "$REFRESH_BRANCH" --state open \
|
||||
--json number --jq '.[0].number // empty')
|
||||
if [ -n "$STALE" ]; then
|
||||
git fetch -q --depth=1 origin "$REFRESH_BRANCH"
|
||||
if [ "$(git log -1 --format=%ae FETCH_HEAD)" = "$BOT_EMAIL" ]; then
|
||||
gh pr close "$STALE" --repo "$GITHUB_REPOSITORY" \
|
||||
--comment "Closed by the nightly derived refresh: \`$BASE\` already matches the live code (${RUN_URL})." > /dev/null
|
||||
echo "Closed the stale refresh PR #$STALE." >> "$GITHUB_STEP_SUMMARY"
|
||||
else
|
||||
echo "Refresh PR #$STALE is no longer needed but has commits pushed by hand; left open." >> "$GITHUB_STEP_SUMMARY"
|
||||
fi
|
||||
fi
|
||||
exit 0
|
||||
fi
|
||||
CHANGED=$(git diff --cached --name-only)
|
||||
COUNT=$(printf '%s\n' "$CHANGED" | wc -l | tr -d ' ')
|
||||
|
||||
gh auth setup-git
|
||||
OPEN_PR=$(gh pr list --repo "$GITHUB_REPOSITORY" --head "$REFRESH_BRANCH" --state open \
|
||||
--json number,baseRefName --jq '.[0] | select(.) | "\(.number) \(.baseRefName)"')
|
||||
REMOTE_SHA=$(git ls-remote --heads origin "$REFRESH_BRANCH" | cut -f1)
|
||||
if [ -n "$OPEN_PR" ] && [ -n "$REMOTE_SHA" ]; then
|
||||
git fetch -q --depth=1 origin "$REFRESH_BRANCH"
|
||||
if [ "$(git log -1 --format=%ae FETCH_HEAD)" != "$BOT_EMAIL" ]; then
|
||||
echo "PR #${OPEN_PR%% *} has commits pushed by hand; not overwriting them." >> "$GITHUB_STEP_SUMMARY"
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
|
||||
# CI bot commit: the bot identity is the author, no Co-Authored-By trailer.
|
||||
git switch -q -c "$REFRESH_BRANCH"
|
||||
git -c user.name="$BOT_NAME" -c user.email="$BOT_EMAIL" commit -q -m "$TITLE" \
|
||||
-m "npm run release:refresh-derived -- --profile=nightly on ${BASE}: ${COUNT} file(s)." \
|
||||
-m "Run: ${RUN_URL}"
|
||||
# One commit on top of the release tip, every run. The lease refuses to overwrite a
|
||||
# commit somebody pushed to the branch after REMOTE_SHA was read.
|
||||
git push -q --force-with-lease="${REFRESH_BRANCH}:${REMOTE_SHA}" origin "HEAD:refs/heads/${REFRESH_BRANCH}"
|
||||
|
||||
if [ "$HAS_PR_TOKEN" != "true" ]; then
|
||||
{
|
||||
echo "\`$REFRESH_BRANCH\` is pushed with ${COUNT} refreshed file(s), but no PR was opened:"
|
||||
echo "neither \`DERIVED_REFRESH_PR_TOKEN\` nor \`I18N_REFRESH_TOKEN\` is set. Open it from that branch against \`$BASE\`."
|
||||
} >> "$GITHUB_STEP_SUMMARY"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
{
|
||||
if [ -n "${BASE_RED_ISSUE:-}" ]; then printf '⚠️ base-red inherited: #%s\n\n' "$BASE_RED_ISSUE"; fi
|
||||
echo "## Summary"
|
||||
echo
|
||||
echo "Nightly refresh of the derived numbers on \`$BASE\`: \`npm run release:refresh-derived -- --profile=nightly\` recomputed the provider, migration and MCP-tool counts, the version claims, the README SVG numbers and the facts snapshot from the live code (${RUN_URL})."
|
||||
echo
|
||||
echo "Feature PRs no longer write these values; this PR (and the release itself) does. The branch \`$REFRESH_BRANCH\` is rebuilt from \`$BASE\` on every run, so a later run replaces this commit."
|
||||
echo
|
||||
echo "## Files (${COUNT})"
|
||||
echo
|
||||
# shellcheck disable=SC2016 # the backticks are Markdown code spans, not substitutions
|
||||
printf '%s\n' "$CHANGED" | head -200 | sed 's/^/- `/; s/$/`/'
|
||||
echo
|
||||
echo "## Before merge"
|
||||
echo
|
||||
echo "- [ ] CI is green, or every red check is inherited from the base."
|
||||
echo "- [ ] The diff only touches derived numbers (no prose rewrites)."
|
||||
# Agent-instruction surfaces are never merged without the owner's explicit approval
|
||||
# (AGENTS.md → Review focus), even when the diff is digits only.
|
||||
if printf '%s\n' "$CHANGED" | grep -qE '(^|/)(AGENTS|CLAUDE|GEMINI)\.md$|(^|/)llm\.txt$|^skills/.*/SKILL\.md$'; then
|
||||
echo "- [ ] **Agent-instruction surface touched** (AGENTS.md / llm.txt / SKILL.md): needs the owner's explicit approval before merge."
|
||||
fi
|
||||
} > "$RUNNER_TEMP/pr-body.md"
|
||||
|
||||
if [ -z "$OPEN_PR" ]; then
|
||||
URL=$(gh pr create --repo "$GITHUB_REPOSITORY" --base "$BASE" --head "$REFRESH_BRANCH" \
|
||||
--title "$TITLE" --body-file "$RUNNER_TEMP/pr-body.md")
|
||||
echo "Opened $URL" >> "$GITHUB_STEP_SUMMARY"
|
||||
else
|
||||
NUM="${OPEN_PR%% *}"
|
||||
OLD_BASE="${OPEN_PR#* }"
|
||||
gh pr edit "$NUM" --repo "$GITHUB_REPOSITORY" --base "$BASE" --title "$TITLE" \
|
||||
--body-file "$RUNNER_TEMP/pr-body.md" > /dev/null
|
||||
if [ "$OLD_BASE" != "$BASE" ]; then
|
||||
# `gh pr edit --base` can fail silently: verify the retarget (Hard Rule #21).
|
||||
NEW_BASE=$(gh pr view "$NUM" --repo "$GITHUB_REPOSITORY" --json baseRefName --jq .baseRefName)
|
||||
[ "$NEW_BASE" = "$BASE" ] || { echo "::error::retarget of #$NUM to $BASE did not apply"; exit 1; }
|
||||
fi
|
||||
echo "Updated #$NUM" >> "$GITHUB_STEP_SUMMARY"
|
||||
fi
|
||||
10
.github/workflows/nightly-llm-security.yml
vendored
10
.github/workflows/nightly-llm-security.yml
vendored
@@ -16,10 +16,10 @@ jobs:
|
||||
# two listeners, jobs ≤ ~6 GB). Falls back to hosted when USE_VPS_RUNNER is off.
|
||||
runs-on: ${{ (vars.USE_VPS_RUNNER == 'true' && fromJSON('["self-hosted","omni-light"]')) || 'ubuntu-latest' }}
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
||||
- uses: actions/checkout@v7
|
||||
with:
|
||||
persist-credentials: false
|
||||
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
|
||||
- uses: actions/setup-node@v7
|
||||
with: { node-version: "24", cache: npm }
|
||||
# Fresh runtime state per run (same contract as nightly-schemathesis.yml). The
|
||||
# omni-light runner keeps a persistent $HOME, so the server used to boot on
|
||||
@@ -108,11 +108,11 @@ jobs:
|
||||
echo "run=false" >> "$GITHUB_OUTPUT"
|
||||
echo "::notice::PROMPTFOO_PROVIDER_KEY not set — skipping garak probes (advisory)."
|
||||
fi
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
||||
- uses: actions/checkout@v7
|
||||
with:
|
||||
persist-credentials: false
|
||||
if: steps.gate.outputs.run == 'true'
|
||||
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
|
||||
- uses: actions/setup-node@v7
|
||||
if: steps.gate.outputs.run == 'true'
|
||||
with: { node-version: "24", cache: npm }
|
||||
# Same isolation as the promptfoo job above: a fresh DATA_DIR per run, never the
|
||||
@@ -157,7 +157,7 @@ jobs:
|
||||
echo "::error::Test server did not come up on 21779 in 120s — see server.log."
|
||||
tail -40 server.log || true
|
||||
exit 1
|
||||
- uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7
|
||||
- uses: actions/setup-python@v7
|
||||
if: steps.gate.outputs.run == 'true'
|
||||
with: { python-version: "3.12" }
|
||||
- run: pip install garak
|
||||
|
||||
18
.github/workflows/nightly-mutation.yml
vendored
18
.github/workflows/nightly-mutation.yml
vendored
@@ -15,7 +15,7 @@ jobs:
|
||||
# Mutation testing is expensive. History of the budget:
|
||||
# - Full 8-module set TIMED OUT at the 180min cap (run 27705123780 = exactly 180min).
|
||||
# The two god-files chatCore.ts/combo.ts dominated ~2/3 of the mutants and were
|
||||
# removed from stryker.conf.mjs `mutate`.
|
||||
# removed from stryker.conf.json `mutate`.
|
||||
# - The remaining 6 modules in 3 batches: auth.ts and accountFallback.ts are large; the
|
||||
# a (auth+publicCreds) and b (accountFallback+error) batches still ran near the 180min
|
||||
# cap (the perTest dry-run over ~130 covering test files is itself costly), so the two
|
||||
@@ -29,7 +29,7 @@ jobs:
|
||||
# tests (no mock.module — fetch-override + crafted inputs + temp-DATA_DIR) for telemetryHelpers
|
||||
# + memorySkillsInjection + semanticCache (its cache-HIT block now has a setCachedResponse
|
||||
# fixture) as batch i — ALL 15/15 chatCore leaves are now mutated. See
|
||||
# the comment above MUTATE in stryker.conf.mjs.
|
||||
# _mutate_godfiles_excluded_comment in stryker.conf.json.
|
||||
# 9 PARALLEL batches, each overriding the mutate set via `--mutate` (Stryker 9 CLI:
|
||||
# `-m, --mutate <comma-list>`; the conf's `mutate[]` remains the local-run default/union).
|
||||
# - Cold-seeding budget (per-batch `timeout-minutes: ${{ matrix.batch.timeout || 180 }}`):
|
||||
@@ -48,7 +48,7 @@ jobs:
|
||||
# sub-batch's own incremental cache, after which nightlies re-test only changed mutants.
|
||||
# Full coverage every night in parallel; wall-clock = the slowest batch's cold run until seeded.
|
||||
# Runs at stryker concurrency=4 with per-process DATA_DIR isolation
|
||||
# (tests/_setup/isolateDataDir.ts) — see the concurrency comment in stryker.conf.mjs.
|
||||
# (tests/_setup/isolateDataDir.ts) — see _concurrency_comment in stryker.conf.json.
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
@@ -105,10 +105,10 @@ jobs:
|
||||
# scripts/quality/mutation-radiography.mjs both merge per file).
|
||||
timeout-minutes: ${{ matrix.batch.timeout || 180 }}
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
||||
- uses: actions/checkout@v7
|
||||
with:
|
||||
persist-credentials: false
|
||||
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
|
||||
- uses: actions/setup-node@v7
|
||||
with:
|
||||
node-version: "24"
|
||||
cache: npm
|
||||
@@ -129,7 +129,7 @@ jobs:
|
||||
run: npx stryker run --mutate "$BATCH_MUTATE"
|
||||
- name: Upload mutation report
|
||||
if: always()
|
||||
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: mutation-report-${{ matrix.batch.name }}
|
||||
path: reports/mutation/
|
||||
@@ -151,14 +151,14 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 15
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
||||
- uses: actions/checkout@v7
|
||||
with:
|
||||
persist-credentials: false
|
||||
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
|
||||
- uses: actions/setup-node@v7
|
||||
with:
|
||||
node-version: "24"
|
||||
- name: Download all mutation reports
|
||||
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8
|
||||
uses: actions/download-artifact@v8
|
||||
with:
|
||||
pattern: mutation-report-*
|
||||
path: reports/all
|
||||
|
||||
6
.github/workflows/nightly-property.yml
vendored
6
.github/workflows/nightly-property.yml
vendored
@@ -11,10 +11,10 @@ jobs:
|
||||
if: ${{ github.event_name != 'schedule' || github.repository == 'cheaper-inference/OmniRoute' }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
||||
- uses: actions/checkout@v7
|
||||
with:
|
||||
persist-credentials: false
|
||||
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
|
||||
- uses: actions/setup-node@v7
|
||||
with:
|
||||
node-version: "24"
|
||||
cache: npm
|
||||
@@ -26,7 +26,7 @@ jobs:
|
||||
run: FC_SEED=random FC_NUM_RUNS=2000 npm run test:property
|
||||
- name: Open issue on failure
|
||||
if: failure()
|
||||
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9
|
||||
uses: actions/github-script@v9
|
||||
with:
|
||||
script: |
|
||||
await github.rest.issues.create({
|
||||
|
||||
46
.github/workflows/nightly-release-green.yml
vendored
46
.github/workflows/nightly-release-green.yml
vendored
@@ -134,16 +134,12 @@ jobs:
|
||||
JWT_SECRET: ci-nightly-secret-with-sufficient-length-for-validation
|
||||
API_KEY_SECRET: ci-nightly-api-key-secret-long
|
||||
DISABLE_SQLITE_AUTO_BACKUP: "true"
|
||||
# Same gate mode as the observer's own HARD gates (withHardGateMode in
|
||||
# validate-release-green.mjs): these results feed its verdict through --suites-from.
|
||||
# Release-mode assertions (e.g. locale key parity) belong to the release cut.
|
||||
OMNIROUTE_GATE_MODE: "pr"
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
||||
- uses: actions/checkout@v7
|
||||
with:
|
||||
ref: ${{ needs.resolve-target.outputs.sha }}
|
||||
persist-credentials: false
|
||||
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
|
||||
- uses: actions/setup-node@v7
|
||||
with:
|
||||
node-version: ${{ needs.resolve-target.outputs.node-version }}
|
||||
cache: npm
|
||||
@@ -174,7 +170,7 @@ jobs:
|
||||
exit "$code"
|
||||
- name: Upload the suite result
|
||||
if: always()
|
||||
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: release-green-suite-${{ github.run_attempt }}-${{ matrix.name }}
|
||||
path: suite-results/
|
||||
@@ -205,7 +201,7 @@ jobs:
|
||||
API_KEY_SECRET: ci-nightly-api-key-secret-long
|
||||
DISABLE_SQLITE_AUTO_BACKUP: "true"
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
||||
- uses: actions/checkout@v7
|
||||
with:
|
||||
fetch-depth: 0
|
||||
persist-credentials: false
|
||||
@@ -265,7 +261,7 @@ jobs:
|
||||
id: revision
|
||||
run: echo "sha=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
|
||||
- uses: actions/setup-node@v7
|
||||
with:
|
||||
node-version: ${{ needs.resolve-target.outputs.node-version || '24' }}
|
||||
cache: npm
|
||||
@@ -275,7 +271,7 @@ jobs:
|
||||
- name: Collect the hosted suite results
|
||||
if: github.event_name != 'push'
|
||||
continue-on-error: true
|
||||
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8
|
||||
uses: actions/download-artifact@v8
|
||||
with:
|
||||
# A partial re-run cannot reuse receipts from an earlier attempt;
|
||||
# rerun all suite jobs for a new complete observation of the same tip.
|
||||
@@ -411,7 +407,7 @@ jobs:
|
||||
- name: Upload report artifact
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: release-green-report
|
||||
path: |
|
||||
@@ -477,16 +473,12 @@ jobs:
|
||||
JWT_SECRET: ci-nightly-secret-with-sufficient-length-for-validation
|
||||
API_KEY_SECRET: ci-nightly-api-key-secret-long
|
||||
DISABLE_SQLITE_AUTO_BACKUP: "true"
|
||||
# Same gate mode as the observer's own HARD gates (withHardGateMode in
|
||||
# validate-release-green.mjs): these results feed its verdict through --suites-from.
|
||||
# Release-mode assertions (e.g. locale key parity) belong to the release cut.
|
||||
OMNIROUTE_GATE_MODE: "pr"
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
||||
- uses: actions/checkout@v7
|
||||
with:
|
||||
ref: ${{ needs.resolve-main.outputs.sha }}
|
||||
persist-credentials: false
|
||||
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
|
||||
- uses: actions/setup-node@v7
|
||||
with:
|
||||
node-version: ${{ needs.resolve-target.outputs.node-version }}
|
||||
cache: npm
|
||||
@@ -517,7 +509,7 @@ jobs:
|
||||
exit "$code"
|
||||
- name: Upload the suite result
|
||||
if: always()
|
||||
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: main-green-suite-${{ github.run_attempt }}-${{ matrix.name }}
|
||||
path: suite-results/
|
||||
@@ -554,7 +546,7 @@ jobs:
|
||||
API_KEY_SECRET: ci-nightly-api-key-secret-long
|
||||
DISABLE_SQLITE_AUTO_BACKUP: "true"
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
||||
- uses: actions/checkout@v7
|
||||
with:
|
||||
ref: ${{ github.event_name == 'push' && github.sha || needs.resolve-main.outputs.sha || 'main' }}
|
||||
fetch-depth: 0
|
||||
@@ -565,7 +557,7 @@ jobs:
|
||||
run: echo "sha=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT"
|
||||
|
||||
# hostedSuiteIdentity compares nodeVersion exactly, so match the hosted suites' runtime.
|
||||
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
|
||||
- uses: actions/setup-node@v7
|
||||
with:
|
||||
node-version: ${{ needs.resolve-target.outputs.node-version || '24' }}
|
||||
cache: npm
|
||||
@@ -575,7 +567,7 @@ jobs:
|
||||
- name: Collect the hosted suite results
|
||||
if: github.event_name != 'push'
|
||||
continue-on-error: true
|
||||
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8
|
||||
uses: actions/download-artifact@v8
|
||||
with:
|
||||
# A partial re-run cannot reuse receipts from an earlier attempt;
|
||||
# rerun all suite jobs for a new complete observation of the same tip.
|
||||
@@ -691,7 +683,7 @@ jobs:
|
||||
- name: Upload report artifact
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: main-green-report
|
||||
path: |
|
||||
@@ -741,7 +733,7 @@ jobs:
|
||||
contents: write
|
||||
pull-requests: write
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
||||
- uses: actions/checkout@v7
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
@@ -776,7 +768,7 @@ jobs:
|
||||
git checkout "$TARGET"
|
||||
git log -1 --oneline
|
||||
|
||||
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
|
||||
- uses: actions/setup-node@v7
|
||||
with:
|
||||
node-version: "24"
|
||||
cache: npm
|
||||
@@ -872,12 +864,12 @@ jobs:
|
||||
permissions:
|
||||
contents: read
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
||||
- uses: actions/checkout@v7
|
||||
with:
|
||||
fetch-depth: 1
|
||||
persist-credentials: false
|
||||
|
||||
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
|
||||
- uses: actions/setup-node@v7
|
||||
with:
|
||||
node-version: "24"
|
||||
cache: npm
|
||||
@@ -893,7 +885,7 @@ jobs:
|
||||
|
||||
- name: Upload headroom report
|
||||
if: always()
|
||||
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: baseline-headroom-${{ github.run_id }}
|
||||
path: reports/quality/headroom.*
|
||||
|
||||
20
.github/workflows/nightly-resilience.yml
vendored
20
.github/workflows/nightly-resilience.yml
vendored
@@ -13,10 +13,10 @@ jobs:
|
||||
name: Heap-growth gate
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
||||
- uses: actions/checkout@v7
|
||||
with:
|
||||
persist-credentials: false
|
||||
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
|
||||
- uses: actions/setup-node@v7
|
||||
with:
|
||||
node-version: "24"
|
||||
cache: npm
|
||||
@@ -30,10 +30,10 @@ jobs:
|
||||
name: Resilience chaos (fault injection)
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
||||
- uses: actions/checkout@v7
|
||||
with:
|
||||
persist-credentials: false
|
||||
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
|
||||
- uses: actions/setup-node@v7
|
||||
with:
|
||||
node-version: "24"
|
||||
cache: npm
|
||||
@@ -52,10 +52,10 @@ jobs:
|
||||
# received a shutdown signal").
|
||||
runs-on: ${{ (vars.USE_VPS_RUNNER == 'true' && fromJSON('["self-hosted","omni-light"]')) || 'ubuntu-latest' }}
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
||||
- uses: actions/checkout@v7
|
||||
with:
|
||||
persist-credentials: false
|
||||
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
|
||||
- uses: actions/setup-node@v7
|
||||
with:
|
||||
node-version: "24"
|
||||
cache: npm
|
||||
@@ -104,7 +104,7 @@ jobs:
|
||||
tail -40 server.log || true
|
||||
exit 1
|
||||
- name: Install k6
|
||||
uses: grafana/setup-k6-action@43b9fc21641a76002687994433dd586f56e791b1 # v1
|
||||
uses: grafana/setup-k6-action@v1
|
||||
- name: Run k6 soak
|
||||
run: k6 run tests/load/k6-soak.js
|
||||
env:
|
||||
@@ -206,10 +206,10 @@ jobs:
|
||||
# silent wait because Playwright discards webServer stdout by default.
|
||||
OMNIROUTE_PLAYWRIGHT_WEB_SERVER_STDOUT: "pipe"
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
||||
- uses: actions/checkout@v7
|
||||
with:
|
||||
persist-credentials: false
|
||||
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
|
||||
- uses: actions/setup-node@v7
|
||||
with:
|
||||
node-version: "24"
|
||||
cache: npm
|
||||
@@ -228,7 +228,7 @@ jobs:
|
||||
env:
|
||||
ONNXRUNTIME_NODE_INSTALL: "skip"
|
||||
- name: Cache Playwright browsers
|
||||
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
|
||||
uses: actions/cache@v6.1.0
|
||||
with:
|
||||
path: ~/.cache/ms-playwright
|
||||
key: playwright-chromium-${{ runner.os }}-${{ hashFiles('package-lock.json') }}
|
||||
|
||||
8
.github/workflows/nightly-schemathesis.yml
vendored
8
.github/workflows/nightly-schemathesis.yml
vendored
@@ -19,10 +19,10 @@ jobs:
|
||||
# old 30-minute cap cancelled the job before the probes started (run 38982564979).
|
||||
timeout-minutes: 120
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
||||
- uses: actions/checkout@v7
|
||||
with:
|
||||
persist-credentials: false
|
||||
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
|
||||
- uses: actions/setup-node@v7
|
||||
with: { node-version: "24", cache: npm }
|
||||
- name: Prepare isolated runtime state
|
||||
id: runtime
|
||||
@@ -69,7 +69,7 @@ jobs:
|
||||
done
|
||||
echo "::error::OmniRoute did not become healthy after 30 attempts; see server.log."
|
||||
exit 1
|
||||
- uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7
|
||||
- uses: actions/setup-python@v7
|
||||
with: { python-version: "3.12" }
|
||||
- name: Install schemathesis
|
||||
run: pip install schemathesis
|
||||
@@ -101,7 +101,7 @@ jobs:
|
||||
fi
|
||||
- name: Upload schemathesis report
|
||||
if: always()
|
||||
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: schemathesis-report
|
||||
path: |
|
||||
|
||||
36
.github/workflows/npm-publish.yml
vendored
36
.github/workflows/npm-publish.yml
vendored
@@ -77,7 +77,7 @@ jobs:
|
||||
packages: write # publish to npm.pkg.github.com
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
||||
uses: actions/checkout@v7
|
||||
with:
|
||||
persist-credentials: false
|
||||
# Need full tag history to compare against highest semver when
|
||||
@@ -85,11 +85,10 @@ jobs:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
|
||||
uses: actions/setup-node@v7
|
||||
with:
|
||||
node-version: ${{ env.NPM_PUBLISH_NODE_VERSION }}
|
||||
registry-url: https://registry.npmjs.org
|
||||
package-manager-cache: false
|
||||
|
||||
- name: Install dependencies (skip scripts to avoid heavy build)
|
||||
run: npm install --ignore-scripts --no-audit --no-fund
|
||||
@@ -269,7 +268,7 @@ jobs:
|
||||
|
||||
- name: Upload SBOM (npm) as workflow artifact
|
||||
if: steps.resolve.outputs.skip != 'true'
|
||||
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: sbom-npm
|
||||
path: sbom-npm.cdx.json
|
||||
@@ -355,7 +354,7 @@ jobs:
|
||||
|
||||
- name: Hand the tarball to the hosted publish job
|
||||
if: steps.resolve.outputs.skip != 'true'
|
||||
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: npm-tarball
|
||||
path: omniroute-${{ steps.resolve.outputs.version }}.tgz
|
||||
@@ -397,17 +396,16 @@ jobs:
|
||||
id-token: write # npm provenance — the whole reason this job is separate
|
||||
steps:
|
||||
- name: Download the tarball the publish job proved
|
||||
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8
|
||||
uses: actions/download-artifact@v8
|
||||
with:
|
||||
name: npm-tarball
|
||||
path: .
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
|
||||
uses: actions/setup-node@v7
|
||||
with:
|
||||
node-version: ${{ env.NPM_PUBLISH_NODE_VERSION }}
|
||||
registry-url: https://registry.npmjs.org
|
||||
package-manager-cache: false
|
||||
|
||||
- name: Ensure npm supports staged publishing
|
||||
run: |
|
||||
@@ -496,18 +494,17 @@ jobs:
|
||||
id-token: write # npm provenance
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
||||
uses: actions/checkout@v7
|
||||
with:
|
||||
persist-credentials: false
|
||||
fetch-depth: 0
|
||||
# Full history needed for auto-bump: git diff against previous release tag
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
|
||||
uses: actions/setup-node@v7
|
||||
with:
|
||||
node-version: ${{ env.NPM_PUBLISH_NODE_VERSION }}
|
||||
registry-url: https://registry.npmjs.org
|
||||
package-manager-cache: false
|
||||
|
||||
- name: Auto-bump plugin version if plugin changed since last release
|
||||
id: bump
|
||||
@@ -537,10 +534,8 @@ jobs:
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# 3) Check if plugin dir actually changed since that tag. The step runs inside the
|
||||
# plugin folder and git resolves pathspecs against the current directory, so the
|
||||
# folder is "." here (the repo-root path matched nothing and no change was ever seen).
|
||||
if git diff --quiet "$PREV_TAG" -- .; then
|
||||
# 3) Check if plugin dir actually changed since that tag
|
||||
if git diff --quiet "$PREV_TAG" -- "@omniroute/opencode-plugin/"; then
|
||||
echo "⏭️ No plugin changes since $PREV_TAG — nothing to publish."
|
||||
echo "bumped=false" >> "$GITHUB_OUTPUT"
|
||||
exit 0
|
||||
@@ -588,18 +583,17 @@ jobs:
|
||||
id-token: write # npm provenance
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
||||
uses: actions/checkout@v7
|
||||
with:
|
||||
persist-credentials: false
|
||||
fetch-depth: 0
|
||||
# Full history needed for auto-bump: git diff against previous release tag
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
|
||||
uses: actions/setup-node@v7
|
||||
with:
|
||||
node-version: ${{ env.NPM_PUBLISH_NODE_VERSION }}
|
||||
registry-url: https://registry.npmjs.org
|
||||
package-manager-cache: false
|
||||
|
||||
- name: Auto-bump plugin-v2 version if plugin-v2 changed since last release
|
||||
id: bump
|
||||
@@ -629,10 +623,8 @@ jobs:
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# 3) Check if plugin-v2 dir actually changed since that tag. The step runs inside the
|
||||
# plugin folder and git resolves pathspecs against the current directory, so the
|
||||
# folder is "." here (the repo-root path matched nothing and no change was ever seen).
|
||||
if git diff --quiet "$PREV_TAG" -- .; then
|
||||
# 3) Check if plugin-v2 dir actually changed since that tag
|
||||
if git diff --quiet "$PREV_TAG" -- "@omniroute/opencode-plugin-v2/"; then
|
||||
echo "⏭️ No plugin-v2 changes since $PREV_TAG — nothing to publish."
|
||||
echo "bumped=false" >> "$GITHUB_OUTPUT"
|
||||
exit 0
|
||||
|
||||
262
.github/workflows/omni-queue.yml
vendored
262
.github/workflows/omni-queue.yml
vendored
@@ -1,262 +0,0 @@
|
||||
name: omni-queue
|
||||
|
||||
# OmniRoute's own merge queue (docs/ops/OMNI_QUEUE.md). One idempotent tick composes the next
|
||||
# batch of approved PRs on top of a release branch, pushes it as a fresh omni-queue/** candidate
|
||||
# (ci.yml + quality.yml run their full profile there), reads the candidate's checks and lands it
|
||||
# (or, in shadow mode, records what it would land). State lives on the omni-queue-state branch.
|
||||
#
|
||||
# Security posture (also the .zizmor.yml justification for pull_request_target/workflow_run):
|
||||
# • No job ever checks out or runs PR code. Both jobs check out the DEFAULT branch (sparse:
|
||||
# scripts/merge-queue + config/merge-queue only) and run zero-dependency Node scripts —
|
||||
# no npm ci, no third-party install scripts next to the App token. The queue touches PR
|
||||
# content only as git objects (merge-tree/commit-tree in a scratch bare repository).
|
||||
# • Which copy of THIS file runs: schedule, workflow_run and pull_request_target use the
|
||||
# default branch's copy (pull_request_target has done so since 2025-12-08, whatever the PR's
|
||||
# base); workflow_dispatch uses the dispatched ref. The scripts ALWAYS come from the default
|
||||
# branch (explicit checkout ref), so nothing works until scripts/merge-queue is there.
|
||||
# • Public repositories block pull_request_target by default from 2026-12-02 unless an Actions
|
||||
# policy allows this workflow file (docs/ops/OMNI_QUEUE.md → "Actions event policy"). A
|
||||
# blocked approval job fails closed: no approval status, so nothing becomes eligible.
|
||||
# • Writes use a GitHub App installation token minted per job with the minimum permissions
|
||||
# (the GITHUB_TOKEN cannot be used: refs it pushes do not trigger the candidate's CI).
|
||||
# • Both jobs run in the `omni-queue` environment, which holds the App's credentials and the
|
||||
# owner's OMNI_QUEUE_LAND_TOKEN and admits the default branch only, by its exact name: a
|
||||
# workflow on a candidate branch cannot read them. The App writes omni-queue/land, the status release rulesets
|
||||
# require, so its private key is the root of trust. The land token reaches the tick only.
|
||||
# • action=bless (the explicit emergency exit): the tick writes omni-queue/land on ONE commit
|
||||
# for a hotfix, sync-back or base repair, after checking that both the dispatcher
|
||||
# (github.actor) and whoever triggered the run (github.triggering_actor, the re-runner of a
|
||||
# re-run) are in config.approvers; the maintainer then lands it himself.
|
||||
# • Kill switch: every job is inert unless the repository variable OMNI_QUEUE_ENABLED is
|
||||
# 'true'. Forks never inherit repository variables.
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "*/5 * * * *"
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
base:
|
||||
description: "Release branch to act on (default: every managed base with queue work)"
|
||||
required: false
|
||||
type: string
|
||||
action:
|
||||
description: "tick = one normal tick; pause/resume = toggle a base; dry-run = decide and print, write nothing; bless = write omni-queue/land on one commit (needs base, sha, reason)"
|
||||
required: false
|
||||
default: tick
|
||||
type: choice
|
||||
options:
|
||||
- tick
|
||||
- pause
|
||||
- resume
|
||||
- dry-run
|
||||
- bless
|
||||
reason:
|
||||
description: "Free-text reason recorded with pause/resume/bless (required for bless)"
|
||||
required: false
|
||||
type: string
|
||||
sha:
|
||||
description: "bless only: full 40-hex SHA of the commit that receives omni-queue/land"
|
||||
required: false
|
||||
type: string
|
||||
# A candidate's CI finished: tick right away instead of waiting for the next cron slot.
|
||||
workflow_run:
|
||||
workflows: ["CI", "Quality Gates"]
|
||||
types: [completed]
|
||||
branches: ["omni-queue/**"]
|
||||
# Label changes bind/withdraw approvals (job `approval`); the listed actions wake the tick.
|
||||
# This trigger fires for EVERY pull request, and each job mints an App token: the jobs' `if:`
|
||||
# keep only the events the queue cares about (see both jobs).
|
||||
pull_request_target:
|
||||
types: [labeled, unlabeled, synchronize, closed]
|
||||
|
||||
permissions: {}
|
||||
|
||||
jobs:
|
||||
# Binds a label approval to the exact head SHA (commit status omni-queue/approval or
|
||||
# omni-queue/protected-approval). Deliberately outside the tick's concurrency group: GitHub
|
||||
# replaces a pending run of a group, and an approval must never be dropped that way. Its own
|
||||
# group is keyed on PR AND label: two runs for the same label never interleave their label
|
||||
# re-read and status write (a stale `failure` after a newer `success`), and a pending run can
|
||||
# only be replaced by a newer event on the same label, whose run re-reads the current labels.
|
||||
# An unrelated label (skipped by the `if:` below), or the other approval label, has its own
|
||||
# group and replaces nothing.
|
||||
# (github.event.number = the PR number of a pull_request_target payload.)
|
||||
#
|
||||
# Only the two approval labels start it (`label` and `protectedApprovalLabel` of
|
||||
# config/merge-queue/config.json). An `if:` cannot read that file, so the names are repeated
|
||||
# here: rename a label in BOTH places (tests/unit/merge-queue/workflows.test.mjs compares them).
|
||||
# Only pull requests into a release/v* branch: the queue manages release bases only, and the
|
||||
# filter keeps the job from minting an App token for every other pull request.
|
||||
approval:
|
||||
name: Approval
|
||||
if: >-
|
||||
vars.OMNI_QUEUE_ENABLED == 'true'
|
||||
&& (github.event_name != 'schedule' || github.repository == 'cheaper-inference/OmniRoute')
|
||||
&& github.event_name == 'pull_request_target'
|
||||
&& startsWith(github.event.pull_request.base.ref, 'release/v')
|
||||
&& (github.event.action == 'labeled' || github.event.action == 'unlabeled')
|
||||
&& (github.event.label.name == 'omni-queue' || github.event.label.name == 'protected-approved')
|
||||
runs-on: ubuntu-latest
|
||||
# Secrets and branch policy of the environment, without a deployment record per run.
|
||||
environment:
|
||||
name: omni-queue
|
||||
deployment: false
|
||||
timeout-minutes: 5
|
||||
concurrency:
|
||||
group: omni-queue-approval-${{ github.event.number }}-${{ github.event.label.name }}
|
||||
cancel-in-progress: false
|
||||
permissions:
|
||||
contents: read
|
||||
steps:
|
||||
- name: Mint the omni-queue App token
|
||||
id: app-token
|
||||
uses: actions/create-github-app-token@64ab729a6294000f5aa4a4bc0b73d1f32bc45510 # v3.3.0
|
||||
with:
|
||||
client-id: ${{ secrets.OMNI_QUEUE_APP_CLIENT_ID }}
|
||||
private-key: ${{ secrets.OMNI_QUEUE_APP_PRIVATE_KEY }}
|
||||
permission-contents: read
|
||||
permission-pull-requests: read
|
||||
permission-issues: write
|
||||
permission-statuses: write
|
||||
# The default branch's orchestrator, never the PR's code.
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
ref: ${{ github.event.repository.default_branch }}
|
||||
persist-credentials: false
|
||||
sparse-checkout: |
|
||||
scripts/merge-queue
|
||||
config/merge-queue
|
||||
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
|
||||
with:
|
||||
package-manager-cache: false
|
||||
node-version: "24"
|
||||
- name: Bind the label to the head SHA
|
||||
env:
|
||||
OMNI_QUEUE_TOKEN: ${{ steps.app-token.outputs.token }}
|
||||
run: node scripts/merge-queue/approve.mjs
|
||||
|
||||
tick:
|
||||
name: Tick
|
||||
needs: approval
|
||||
# !cancelled() (not always()): the approval job is skipped on every event but an approval
|
||||
# label change, and an operator who cancels the run mid-incident must stop the tick too.
|
||||
#
|
||||
# A pull request event starts a tick only when it can change what the queue does: the
|
||||
# event's label is an approval label or one of config.json's `blockLabels`, the pull request
|
||||
# carries the queue label, or a merge moved a base. Anything else (a label on, or a push to,
|
||||
# a pull request that is not queued) starts nothing; the 5-minute cron stays the safety net.
|
||||
# Same label literals as config/merge-queue/config.json: rename in BOTH places. And only a
|
||||
# pull request into a release/v* branch, like the approval job: the queue manages release
|
||||
# bases only, and no App token is minted for any other pull request.
|
||||
if: >-
|
||||
!cancelled()
|
||||
&& vars.OMNI_QUEUE_ENABLED == 'true'
|
||||
&& (github.event_name != 'schedule' || github.repository == 'cheaper-inference/OmniRoute')
|
||||
&& (needs.approval.result == 'success' || needs.approval.result == 'skipped')
|
||||
&& (github.event_name != 'pull_request_target'
|
||||
|| (startsWith(github.event.pull_request.base.ref, 'release/v')
|
||||
&& (github.event.label.name == 'omni-queue'
|
||||
|| github.event.label.name == 'protected-approved'
|
||||
|| github.event.label.name == 'hold'
|
||||
|| github.event.label.name == 'hold-vps'
|
||||
|| github.event.label.name == 'do-not-merge'
|
||||
|| github.event.label.name == 'wip'
|
||||
|| contains(github.event.pull_request.labels.*.name, 'omni-queue')
|
||||
|| (github.event.action == 'closed' && github.event.pull_request.merged == true))))
|
||||
runs-on: ubuntu-latest
|
||||
# Secrets and branch policy of the environment, without a deployment record per run.
|
||||
environment:
|
||||
name: omni-queue
|
||||
deployment: false
|
||||
timeout-minutes: 30
|
||||
# ONE writer of queue state at a time, across every base and every trigger. Never cancel a
|
||||
# running tick (it may be between a push and the state save that records it); GitHub keeps
|
||||
# at most one pending tick, which is all a level-triggered tick needs.
|
||||
concurrency:
|
||||
group: omni-queue-tick
|
||||
cancel-in-progress: false
|
||||
permissions:
|
||||
contents: read
|
||||
steps:
|
||||
- name: Mint the omni-queue App token
|
||||
id: app-token
|
||||
uses: actions/create-github-app-token@64ab729a6294000f5aa4a4bc0b73d1f32bc45510 # v3.3.0
|
||||
with:
|
||||
client-id: ${{ secrets.OMNI_QUEUE_APP_CLIENT_ID }}
|
||||
private-key: ${{ secrets.OMNI_QUEUE_APP_PRIVATE_KEY }}
|
||||
permission-contents: write
|
||||
# GitHub refuses a push by an App token that creates or updates a file under
|
||||
# .github/workflows/ without this scope. A candidate's merge commits (parent 1 = base)
|
||||
# and the fast-forward landing carry any workflow change of a batched PR — ci.yml and
|
||||
# quality.yml change almost daily here — so without it every such batch fails to push.
|
||||
permission-workflows: write
|
||||
permission-pull-requests: write
|
||||
permission-issues: write
|
||||
# omni-queue/land: on a candidate or the PR heads before a landing, on one commit for a
|
||||
# bless, and withdrawn (failure) when a landing does not complete.
|
||||
permission-statuses: write
|
||||
permission-checks: read
|
||||
permission-actions: read
|
||||
# The default branch's orchestrator, never the PR's code.
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
ref: ${{ github.event.repository.default_branch }}
|
||||
persist-credentials: false
|
||||
sparse-checkout: |
|
||||
scripts/merge-queue
|
||||
config/merge-queue
|
||||
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
|
||||
with:
|
||||
package-manager-cache: false
|
||||
node-version: "24"
|
||||
# The App's bot user (<id>+<slug>[bot] noreply). It authors queue merge commits unless
|
||||
# config.landing.actor is "owner" (then landing.identity does: tick.createTickDeps).
|
||||
- name: Resolve the bot identity
|
||||
id: identity
|
||||
env:
|
||||
GH_TOKEN: ${{ steps.app-token.outputs.token }}
|
||||
APP_SLUG: ${{ steps.app-token.outputs.app-slug }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
if [[ ! "$APP_SLUG" =~ ^[a-z0-9][a-z0-9-]*$ ]]; then
|
||||
echo "::error::unexpected App slug"; exit 1
|
||||
fi
|
||||
login="${APP_SLUG}[bot]"
|
||||
id="$(gh api "/users/${login}" --jq .id)"
|
||||
if [[ ! "$id" =~ ^[0-9]+$ ]]; then
|
||||
echo "::error::could not resolve the user id of ${login}"; exit 1
|
||||
fi
|
||||
{
|
||||
echo "name=${login}"
|
||||
echo "email=${id}+${login}@users.noreply.github.com"
|
||||
} >> "$GITHUB_OUTPUT"
|
||||
# Inputs travel through env and are assembled into an argv array: no expression is ever
|
||||
# expanded inside the script body. Scheduled, workflow_run and pull_request_target ticks
|
||||
# pass no base (the tick discovers the bases with work). The owner's land token is used
|
||||
# only by the landing itself when config.landing.actor is "owner" (never printed).
|
||||
# GITHUB_ACTOR and GITHUB_TRIGGERING_ACTOR are the runner's own default variables, named
|
||||
# here because a bless is checked against both: the original dispatcher, whose inputs a
|
||||
# re-run keeps, and whoever triggered this run (the re-runner of a re-run).
|
||||
- name: Run one queue tick
|
||||
env:
|
||||
OMNI_QUEUE_TOKEN: ${{ steps.app-token.outputs.token }}
|
||||
OMNI_QUEUE_LAND_TOKEN: ${{ secrets.OMNI_QUEUE_LAND_TOKEN }}
|
||||
OMNI_QUEUE_BOT_NAME: ${{ steps.identity.outputs.name }}
|
||||
OMNI_QUEUE_BOT_EMAIL: ${{ steps.identity.outputs.email }}
|
||||
GITHUB_ACTOR: ${{ github.actor }}
|
||||
GITHUB_TRIGGERING_ACTOR: ${{ github.triggering_actor }}
|
||||
EVENT_NAME: ${{ github.event_name }}
|
||||
INPUT_BASE: ${{ inputs.base }}
|
||||
INPUT_ACTION: ${{ inputs.action }}
|
||||
INPUT_REASON: ${{ inputs.reason }}
|
||||
INPUT_SHA: ${{ inputs.sha }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
args=()
|
||||
if [ "$EVENT_NAME" = "workflow_dispatch" ]; then
|
||||
if [ -n "${INPUT_BASE:-}" ]; then args+=(--base "$INPUT_BASE"); fi
|
||||
args+=(--action "${INPUT_ACTION:-tick}")
|
||||
if [ -n "${INPUT_REASON:-}" ]; then args+=(--reason "$INPUT_REASON"); fi
|
||||
if [ -n "${INPUT_SHA:-}" ]; then args+=(--sha "$INPUT_SHA"); fi
|
||||
fi
|
||||
node scripts/merge-queue/tick.mjs "${args[@]}"
|
||||
31
.github/workflows/opencode-plugin-ci.yml
vendored
31
.github/workflows/opencode-plugin-ci.yml
vendored
@@ -6,13 +6,11 @@ on:
|
||||
paths:
|
||||
- "@omniroute/opencode-plugin/**"
|
||||
- "@omniroute/opencode-plugin-v2/**"
|
||||
- ".github/workflows/opencode-plugin-ci.yml"
|
||||
pull_request:
|
||||
branches: [main, "release/**"]
|
||||
paths:
|
||||
- "@omniroute/opencode-plugin/**"
|
||||
- "@omniroute/opencode-plugin-v2/**"
|
||||
- ".github/workflows/opencode-plugin-ci.yml"
|
||||
types: [opened, synchronize, reopened, ready_for_review]
|
||||
workflow_dispatch:
|
||||
|
||||
@@ -34,16 +32,17 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
node: ["22.23.4", "24.22.1"]
|
||||
node: ["22", "24"]
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
||||
- uses: actions/checkout@v7
|
||||
with:
|
||||
persist-credentials: false
|
||||
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
|
||||
- uses: actions/setup-node@v7
|
||||
with:
|
||||
node-version: ${{ matrix.node }}
|
||||
package-manager-cache: false
|
||||
- run: npm ci --no-audit --no-fund
|
||||
cache: npm
|
||||
cache-dependency-path: "@omniroute/opencode-plugin/package-lock.json"
|
||||
- run: npm install --no-audit --no-fund
|
||||
- run: npm run build
|
||||
- run: npm test
|
||||
|
||||
@@ -53,18 +52,19 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
node: ["22.23.4", "24.22.1"]
|
||||
node: ["22", "24"]
|
||||
defaults:
|
||||
run:
|
||||
working-directory: "@omniroute/opencode-plugin-v2"
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
||||
- uses: actions/checkout@v7
|
||||
with:
|
||||
persist-credentials: false
|
||||
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
|
||||
- uses: actions/setup-node@v7
|
||||
with:
|
||||
node-version: ${{ matrix.node }}
|
||||
package-manager-cache: false
|
||||
cache: npm
|
||||
cache-dependency-path: "@omniroute/opencode-plugin-v2/package-lock.json"
|
||||
- run: npm ci --no-audit --no-fund
|
||||
- run: npm run build
|
||||
- run: npm test
|
||||
@@ -74,17 +74,16 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [test, test-v2]
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
||||
- uses: actions/checkout@v7
|
||||
with:
|
||||
persist-credentials: false
|
||||
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
|
||||
- uses: actions/setup-node@v7
|
||||
with:
|
||||
node-version: "24.22.1"
|
||||
package-manager-cache: false
|
||||
node-version: "22"
|
||||
- name: Build plugin-v2 artifact
|
||||
working-directory: "@omniroute/opencode-plugin-v2"
|
||||
run: npm ci --no-audit --no-fund && npm run build
|
||||
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
|
||||
- uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: opencode-plugin-v2-dist
|
||||
path: "@omniroute/opencode-plugin-v2/dist"
|
||||
|
||||
26
.github/workflows/opencode-provider-ci.yml
vendored
26
.github/workflows/opencode-provider-ci.yml
vendored
@@ -2,15 +2,13 @@ name: opencode-provider CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main, "release/**"]
|
||||
branches: [main, release/v3.8.0]
|
||||
paths:
|
||||
- "@omniroute/opencode-provider/**"
|
||||
- ".github/workflows/opencode-provider-ci.yml"
|
||||
pull_request:
|
||||
branches: [main, "release/**"]
|
||||
branches: [main, release/v3.8.0]
|
||||
paths:
|
||||
- "@omniroute/opencode-provider/**"
|
||||
- ".github/workflows/opencode-provider-ci.yml"
|
||||
types: [opened, synchronize, reopened, ready_for_review]
|
||||
workflow_dispatch:
|
||||
|
||||
@@ -32,15 +30,16 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
node: ["22.23.4", "24.22.1"]
|
||||
node: ["20", "22", "24"]
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
||||
- uses: actions/checkout@v7
|
||||
with:
|
||||
persist-credentials: false
|
||||
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
|
||||
- uses: actions/setup-node@v7
|
||||
with:
|
||||
node-version: ${{ matrix.node }}
|
||||
package-manager-cache: false
|
||||
cache: npm
|
||||
cache-dependency-path: "@omniroute/opencode-provider/package-lock.json"
|
||||
- run: npm ci
|
||||
- run: npm test
|
||||
|
||||
@@ -49,16 +48,17 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
needs: test
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
||||
- uses: actions/checkout@v7
|
||||
with:
|
||||
persist-credentials: false
|
||||
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
|
||||
- uses: actions/setup-node@v7
|
||||
with:
|
||||
node-version: "24.22.1"
|
||||
package-manager-cache: false
|
||||
node-version: "20"
|
||||
cache: npm
|
||||
cache-dependency-path: "@omniroute/opencode-provider/package-lock.json"
|
||||
- run: npm ci
|
||||
- run: npm run build
|
||||
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
|
||||
- uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: opencode-provider-dist
|
||||
path: "@omniroute/opencode-provider/dist"
|
||||
|
||||
107
.github/workflows/quality.yml
vendored
107
.github/workflows/quality.yml
vendored
@@ -5,9 +5,7 @@ on:
|
||||
# release/** pushes are covered by the PR run of each change plus Release-Green on the
|
||||
# merged combination (see ci.yml for the 2026-10-18 measurement); the per-push run here
|
||||
# only ever queued hosted slots and was cancelled by the next merge.
|
||||
# omni-queue/** (2026-11-13): omni-queue merge-queue candidates run the full profile, like
|
||||
# merge_group (see ci.yml).
|
||||
branches: [main, "omni-queue/**"]
|
||||
branches: [main]
|
||||
pull_request:
|
||||
branches: [main, "release/**"]
|
||||
types: [opened, synchronize, reopened, ready_for_review, converted_to_draft, edited]
|
||||
@@ -41,17 +39,6 @@ jobs:
|
||||
if: ${{ !(github.event_name == 'pull_request' && github.event.action == 'edited' && github.event.pull_request.user.login == 'mergify[bot]' && startsWith(github.head_ref, 'mergify/merge-queue/') && github.event.pull_request.head.repo.id == github.event.repository.id) }}
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
# Match the official Mergify App and both repository IDs from GitHub's
|
||||
# event. A contributor-controlled branch prefix alone grants no exception.
|
||||
queueCandidate: >-
|
||||
${{ github.event_name == 'pull_request' && github.event.pull_request.draft == true &&
|
||||
github.event.pull_request.user.id == 37929162 &&
|
||||
github.event.pull_request.user.login == 'mergify[bot]' &&
|
||||
github.event.pull_request.user.type == 'Bot' &&
|
||||
startsWith(github.head_ref, 'mergify/merge-queue/') &&
|
||||
github.event.repository.id > 0 &&
|
||||
github.event.pull_request.head.repo.id == github.event.repository.id &&
|
||||
github.event.pull_request.base.repo.id == github.event.repository.id }}
|
||||
code: ${{ steps.classify.outputs.code }}
|
||||
docs: ${{ steps.classify.outputs.docs }}
|
||||
i18n: ${{ steps.classify.outputs.i18n }}
|
||||
@@ -59,30 +46,20 @@ jobs:
|
||||
testsOnly: ${{ steps.classify.outputs.testsOnly }}
|
||||
# Exposure only (one-CI-policy step 1, RFC #8084): no job depends on it yet.
|
||||
domains: ${{ steps.classify.outputs.domains }}
|
||||
# omni-queue candidate base (the merge_group.base_sha of a push to omni-queue/**);
|
||||
# empty on every other event.
|
||||
candidateBase: ${{ steps.candidate.outputs.BASE_SHA }}
|
||||
# "self" on an omni-queue base-check candidate (the bare base), "trailer" on a batch.
|
||||
candidateSource: ${{ steps.candidate.outputs.SOURCE }}
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
||||
- uses: actions/checkout@v7
|
||||
with:
|
||||
persist-credentials: false
|
||||
fetch-depth: 0
|
||||
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
|
||||
- uses: actions/setup-node@v7
|
||||
with:
|
||||
package-manager-cache: false
|
||||
node-version: ${{ env.CI_NODE_VERSION }}
|
||||
- name: Validate gate inventory
|
||||
run: npm run check:gate-manifest
|
||||
# Same as ci.yml: a new omni-queue/** branch has no usable github.event.before.
|
||||
- name: Resolve the omni-queue candidate base
|
||||
id: candidate
|
||||
if: startsWith(github.ref, 'refs/heads/omni-queue/')
|
||||
run: node scripts/merge-queue/candidate-base.mjs >> "$GITHUB_OUTPUT"
|
||||
- name: Validate recurring free catalog evidence
|
||||
env:
|
||||
BASE_SHA: ${{ steps.candidate.outputs.BASE_SHA || github.event.pull_request.base.sha || github.event.merge_group.base_sha || github.event.before }}
|
||||
BASE_SHA: ${{ github.event.pull_request.base.sha || github.event.merge_group.base_sha || github.event.before }}
|
||||
run: npm run check:free-catalog-evidence
|
||||
- id: classify
|
||||
env:
|
||||
@@ -114,14 +91,10 @@ jobs:
|
||||
if: ${{ github.event_name != 'pull_request' || ((github.event.pull_request.draft == false || startsWith(github.head_ref, 'mergify/merge-queue/')) && (needs.changes.outputs.docs == 'true' || needs.changes.outputs.code == 'true')) }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
||||
- uses: actions/checkout@v7
|
||||
with:
|
||||
# Depth 2: on a pull_request the checkout is GitHub's merge commit, and its first
|
||||
# parent is the base the PR was merged onto. check:docs-counts (inside check:docs-all)
|
||||
# runs in `pr` mode on feature PRs and diffs the managed numbers against that base.
|
||||
fetch-depth: 2
|
||||
persist-credentials: false
|
||||
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
|
||||
- uses: actions/setup-node@v7
|
||||
with:
|
||||
package-manager-cache: false
|
||||
node-version: ${{ env.CI_NODE_VERSION }}
|
||||
@@ -131,15 +104,7 @@ jobs:
|
||||
cache: ${{ github.event_name == 'pull_request' }}
|
||||
# One walk of src/app/api for openapi-routes + docs-symbols (both still fail independently).
|
||||
- run: npm run check:api-docs-refs
|
||||
# Plan 2026-11-13 (derived numbers are written at release): on a feature PR the counts gate
|
||||
# judges only the managed numbers the PR itself edited (diff against BASE_SHA, or the merge
|
||||
# commit's first parent when the base moved), never a base that is behind the live code by
|
||||
# design. Push and dispatch on main or release/v* keep the strict release comparison; a
|
||||
# dispatch on a feature branch runs in pr mode (no PR to diff: content invariants only).
|
||||
- name: Docs accuracy (fabricated-docs + i18n mirrors, strict)
|
||||
env:
|
||||
BASE_SHA: ${{ github.event.pull_request.base.sha || github.event.merge_group.base_sha }}
|
||||
OMNIROUTE_GATE_MODE: ${{ github.event_name == 'workflow_dispatch' && github.ref_name != 'main' && !startsWith(github.ref_name, 'release/v') && 'pr' || '' }}
|
||||
run: npm run check:docs-all
|
||||
|
||||
fast-gates:
|
||||
@@ -172,11 +137,11 @@ jobs:
|
||||
API_KEY_SECRET: ci-lint-api-key-secret-long
|
||||
DISABLE_SQLITE_AUTO_BACKUP: "true"
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
||||
- uses: actions/checkout@v7
|
||||
with:
|
||||
fetch-depth: 0
|
||||
persist-credentials: false
|
||||
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
|
||||
- uses: actions/setup-node@v7
|
||||
with:
|
||||
package-manager-cache: false
|
||||
node-version: ${{ env.CI_NODE_VERSION }}
|
||||
@@ -239,7 +204,7 @@ jobs:
|
||||
run: bash scripts/ci/install-workflow-scanners.sh
|
||||
- name: Forgotten sibling tests (advisory)
|
||||
env:
|
||||
GITHUB_BASE_SHA: ${{ github.event.pull_request.base.sha || needs.changes.outputs.candidateBase }}
|
||||
GITHUB_BASE_SHA: ${{ github.event.pull_request.base.sha }}
|
||||
run: |
|
||||
node scripts/quality/build-test-impact-map.mjs
|
||||
node scripts/check/check-forgotten-sibling-tests.mjs \
|
||||
@@ -248,7 +213,7 @@ jobs:
|
||||
cat forgotten-sibling-tests.md >> "$GITHUB_STEP_SUMMARY"
|
||||
- name: Upload forgotten sibling report
|
||||
if: always()
|
||||
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: forgotten-sibling-tests
|
||||
path: |
|
||||
@@ -267,10 +232,7 @@ jobs:
|
||||
# #8522: base-relative file-size mode on PR events — inherited drift (base
|
||||
# already over frozen cap) must not red an innocent PR. Unset on
|
||||
# workflow_dispatch (no PR base) → absolute comparison.
|
||||
# omni-queue/** candidates: the candidate base, so every base-relative gate below
|
||||
# judges the batch like a PR (a drifted base must not red every candidate).
|
||||
PR_BASE_SHA: ${{ github.event.pull_request.base.sha || needs.changes.outputs.candidateBase }}
|
||||
# Other checks may use this local ref; OpenAPI reads immutable event commits.
|
||||
PR_BASE_SHA: ${{ github.event.pull_request.base.sha }}
|
||||
BASE_REF: ${{ github.base_ref && format('origin/{0}', github.base_ref) || '' }}
|
||||
run: |
|
||||
set -uo pipefail
|
||||
@@ -340,8 +302,8 @@ jobs:
|
||||
echo "::endgroup::"
|
||||
# #10134: TS7 zero-new-diagnostics ratchet — folded into this non-fail-fast
|
||||
# loop (never a separate blocking step) so an earlier red gate cannot abort
|
||||
# the job and mask it (#8542 mechanism). PRs and omni-queue candidates only:
|
||||
# the base-relative comparison needs a base SHA (empty on workflow_dispatch).
|
||||
# the job and mask it (#8542 mechanism). PR-only: the base-relative
|
||||
# comparison needs the PR base SHA (empty on workflow_dispatch).
|
||||
if [ -n "${PR_BASE_SHA:-}" ]; then
|
||||
echo "::group::check:ts7-diagnostics-ratchet"
|
||||
npm run check:ts7-diagnostics-ratchet -- --base-ref "$PR_BASE_SHA" || failed+=("ts7-diagnostics-ratchet")
|
||||
@@ -382,21 +344,7 @@ jobs:
|
||||
- name: Impacted unit tests (TIA subset; blocking)
|
||||
env:
|
||||
GITHUB_BASE_REF: ${{ github.base_ref }}
|
||||
# omni-queue/** candidates: select against the batch base, not HEAD~1.
|
||||
GITHUB_BASE_SHA: ${{ needs.changes.outputs.candidateBase }}
|
||||
CANDIDATE_SOURCE: ${{ needs.changes.outputs.candidateSource }}
|
||||
run: |
|
||||
# omni-queue base-check (the bare base, its own base): a base-relative selection is
|
||||
# empty, so a test that fails in a red batch's subset could never fail here and the
|
||||
# queue's base-red comparison (same check, same test) would blame the batch. Run the
|
||||
# whole unit suite instead.
|
||||
if [ "${CANDIDATE_SOURCE:-}" = "self" ]; then
|
||||
echo "__OMNI_QUEUE_BASE_CHECK__" > tia-selection.txt
|
||||
echo "TIA selection: omni-queue base-check — full unit suite" >> "$GITHUB_STEP_SUMMARY"
|
||||
RC=0
|
||||
npm run test:unit:ci || RC=$?
|
||||
exit $RC
|
||||
fi
|
||||
git fetch --no-tags origin "$GITHUB_BASE_REF" || true
|
||||
# The advisory sibling-test step generates the same map earlier in this job.
|
||||
[ -f config/quality/test-impact-map.json ] || node scripts/quality/build-test-impact-map.mjs
|
||||
@@ -447,7 +395,7 @@ jobs:
|
||||
# audited against ci.yml test-unit failures on the same commit (gate moves need this data).
|
||||
- name: Upload TIA selection (shadow evidence)
|
||||
if: always()
|
||||
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: tia-selection
|
||||
path: tia-selection.txt
|
||||
@@ -468,8 +416,7 @@ jobs:
|
||||
name: No new ESLint warnings
|
||||
needs: changes
|
||||
if: ${{ github.event_name != 'pull_request' || ((github.event.pull_request.draft == false || startsWith(github.head_ref, 'mergify/merge-queue/')) && needs.changes.outputs.code == 'true') }}
|
||||
# omni-queue/** candidates contain fork code: never on the self-hosted pool.
|
||||
runs-on: ${{ (vars.USE_VPS_RUNNER == 'true' && github.event_name != 'merge_group' && !startsWith(github.ref, 'refs/heads/omni-queue/') && !startsWith(github.head_ref, 'omni-queue/') && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && fromJSON('["self-hosted","omni-light"]')) || 'ubuntu-latest' }}
|
||||
runs-on: ${{ (vars.USE_VPS_RUNNER == 'true' && github.event_name != 'merge_group' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && fromJSON('["self-hosted","omni-light"]')) || 'ubuntu-latest' }}
|
||||
# 2026-08-30: a cold full lint with the eslint-plugin-react-hooks 7 compiler rules is
|
||||
# killed on the 7 GB hosted runner without a message (status null → exit 1, the
|
||||
# JSON never written); the box lints it in ~12 min with the heap below.
|
||||
@@ -480,10 +427,10 @@ jobs:
|
||||
contents: read
|
||||
security-events: read
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
||||
- uses: actions/checkout@v7
|
||||
with:
|
||||
persist-credentials: false
|
||||
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
|
||||
- uses: actions/setup-node@v7
|
||||
with:
|
||||
package-manager-cache: false
|
||||
node-version: ${{ env.CI_NODE_VERSION }}
|
||||
@@ -564,25 +511,19 @@ jobs:
|
||||
with:
|
||||
# PR acceleration is not release-candidate provenance.
|
||||
cache: ${{ github.event_name == 'pull_request' }}
|
||||
# omni-queue/** candidates compare against their batch base (no `needs: changes` here:
|
||||
# this job must keep running on a queue-draft edit run).
|
||||
- name: Resolve the omni-queue candidate base
|
||||
id: candidate
|
||||
if: startsWith(github.ref, 'refs/heads/omni-queue/')
|
||||
run: node scripts/merge-queue/candidate-base.mjs >> "$GITHUB_OUTPUT"
|
||||
- name: CHANGELOG integrity (nenhum bullet da base pode sumir no merge-result)
|
||||
env:
|
||||
CHANGELOG_BASE_REF: ${{ steps.candidate.outputs.BASE_SHA }}
|
||||
run: npm run check:changelog-integrity
|
||||
- name: Agent-skills generator sync (SKILL.md gerado ≡ catálogo)
|
||||
run: npm run check:agent-skills-sync
|
||||
|
||||
admission-verdict:
|
||||
# Only requested candidates receive the required check name. An ordinary draft
|
||||
# deliberately skips its producer jobs and must not create a failed admission.
|
||||
# Classifier failures still reach the gate; queue metadata edits keep their own name.
|
||||
name: ${{ (github.event_name == 'pull_request' && github.event.action == 'edited' && github.event.pull_request.user.login == 'mergify[bot]' && startsWith(github.head_ref, 'mergify/merge-queue/') && github.event.pull_request.head.repo.id == github.event.repository.id) && 'Gate / Quality (queue-draft edit)' || (github.event_name != 'pull_request' || github.event.pull_request.draft == false || needs.changes.outputs.queueCandidate == 'true' || needs.changes.result != 'success') && 'Gate / Quality' || 'Admission not requested / Quality' }}
|
||||
if: ${{ always() && !(github.event_name == 'pull_request' && github.event.action == 'edited' && github.event.pull_request.user.login == 'mergify[bot]' && startsWith(github.head_ref, 'mergify/merge-queue/') && github.event.pull_request.head.repo.id == github.event.repository.id) && (github.event_name != 'pull_request' || github.event.pull_request.draft == false || needs.changes.outputs.queueCandidate == 'true' || needs.changes.result != 'success') }}
|
||||
# A queue-draft edit run must not leave a check named "Gate / Quality" on the draft: Mergify
|
||||
# read that skipped check as a finished non-success and dequeued the PR (#18961 on
|
||||
# 2026-11-04) before the real run reported. Every other run keeps the exact name.
|
||||
name: ${{ (github.event_name == 'pull_request' && github.event.action == 'edited' && github.event.pull_request.user.login == 'mergify[bot]' && startsWith(github.head_ref, 'mergify/merge-queue/') && github.event.pull_request.head.repo.id == github.event.repository.id) && 'Gate / Quality (queue-draft edit)' || 'Gate / Quality' }}
|
||||
# Runs on every candidate; only a Mergify queue-draft description edit skips it (see the
|
||||
# workflow concurrency note): that draft is never what branch protection merges.
|
||||
if: ${{ always() && !(github.event_name == 'pull_request' && github.event.action == 'edited' && github.event.pull_request.user.login == 'mergify[bot]' && startsWith(github.head_ref, 'mergify/merge-queue/') && github.event.pull_request.head.repo.id == github.event.repository.id) }}
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 5
|
||||
needs:
|
||||
|
||||
4
.github/workflows/radar-export.yml
vendored
4
.github/workflows/radar-export.yml
vendored
@@ -44,10 +44,10 @@ jobs:
|
||||
permissions:
|
||||
contents: write # gh release upload — clobra o asset estável do export
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
||||
- uses: actions/checkout@v7
|
||||
with:
|
||||
persist-credentials: false # publish usa GH_TOKEN via gh release, não a credencial do checkout
|
||||
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
|
||||
- uses: actions/setup-node@v7
|
||||
with:
|
||||
node-version: ${{ env.CI_NODE_VERSION }}
|
||||
cache: npm
|
||||
|
||||
6
.github/workflows/release-acceptance.yml
vendored
6
.github/workflows/release-acceptance.yml
vendored
@@ -18,10 +18,10 @@ jobs:
|
||||
if: github.event_name != 'pull_request'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5
|
||||
- uses: actions/checkout@v5
|
||||
with:
|
||||
persist-credentials: false
|
||||
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
|
||||
- uses: actions/setup-node@v7
|
||||
with:
|
||||
node-version-file: ".node-version"
|
||||
cache: npm
|
||||
@@ -35,7 +35,7 @@ jobs:
|
||||
--manifests tests/fixtures/release-acceptance/shadow-manifests \
|
||||
--out release-acceptance-report.json
|
||||
continue-on-error: true
|
||||
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
|
||||
- uses: actions/upload-artifact@v4
|
||||
if: always()
|
||||
with:
|
||||
name: release-acceptance-report
|
||||
|
||||
6
.github/workflows/scorecard.yml
vendored
6
.github/workflows/scorecard.yml
vendored
@@ -33,19 +33,19 @@ jobs:
|
||||
contents: read
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
||||
uses: actions/checkout@v7
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Run analysis
|
||||
uses: ossf/scorecard-action@fa7117db83c52d787ae5a89f350999701505d78e # v2.5.0
|
||||
uses: ossf/scorecard-action@v2.5.0
|
||||
with:
|
||||
results_file: results.sarif
|
||||
results_format: sarif
|
||||
publish_results: true
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: SARIF file
|
||||
path: results.sarif
|
||||
|
||||
2
.github/workflows/semgrep.yml
vendored
2
.github/workflows/semgrep.yml
vendored
@@ -16,7 +16,7 @@ jobs:
|
||||
semgrep:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: semgrep/semgrep@sha256:3db5c7af55eb1f512eac0abf0ab69a97b52c74b5e9a27314c221aee1a78d7ab2 # latest resolved 2026-10-25
|
||||
image: semgrep/semgrep
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
|
||||
6
.github/workflows/test-quarantine.yml
vendored
6
.github/workflows/test-quarantine.yml
vendored
@@ -19,10 +19,10 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 20
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
||||
- uses: actions/checkout@v7
|
||||
with:
|
||||
persist-credentials: false
|
||||
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
|
||||
- uses: actions/setup-node@v7
|
||||
with:
|
||||
node-version-file: .node-version
|
||||
cache: npm
|
||||
@@ -53,7 +53,7 @@ jobs:
|
||||
run: npx --no-install vitest run --config vitest.quarantine.config.ts --reporter=default --reporter=json --outputFile.json=.artifacts/quarantine/results.json
|
||||
- name: Preserve measured failures and issue evidence
|
||||
if: always()
|
||||
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: quarantine-${{ github.sha }}-${{ github.run_attempt }}
|
||||
path: .artifacts/quarantine/
|
||||
|
||||
6
.github/workflows/wiki-sync.yml
vendored
6
.github/workflows/wiki-sync.yml
vendored
@@ -37,12 +37,10 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repo
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
||||
with:
|
||||
persist-credentials: false
|
||||
uses: actions/checkout@v7
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
|
||||
uses: actions/setup-node@v7
|
||||
with:
|
||||
node-version: "24"
|
||||
|
||||
|
||||
@@ -13,8 +13,7 @@ sh scripts/check/check-git-identity.sh
|
||||
# session's changes, and never download a missing tool during a commit.
|
||||
npx --no-install lint-staged --no-stash
|
||||
node scripts/quality/gate-manifest.mjs
|
||||
# --mode=pr: judge what this commit does; mirrors the base left stale are the translation wave's job
|
||||
node scripts/check/check-docs-sync.mjs --mode=pr
|
||||
node scripts/check/check-docs-sync.mjs
|
||||
npm run check:any-budget:t11
|
||||
# kit type scale (#19066 block 7): sizes under 12 px and font-bold may only go down
|
||||
node scripts/check/check-type-scale-ratchet.mjs --ratchet --quiet
|
||||
|
||||
71
.zizmor.yml
71
.zizmor.yml
@@ -58,34 +58,47 @@
|
||||
# per-rule entry with a justification comment.
|
||||
rules:
|
||||
dangerous-triggers:
|
||||
# workflow_run only starts the deploy after a successful push/release/dispatch
|
||||
# in this repository on main, release/v*, or version refs (deploy-vps.yml `if:`).
|
||||
# The privileged job neither checks out that run's code nor downloads its
|
||||
# artifacts. workflow_dispatch and DEPLOY_ENABLED remain operator controls.
|
||||
# Keep this one event-specific exception under release review.
|
||||
#
|
||||
# omni-queue.yml (the omni-queue merge queue) uses `pull_request_target`
|
||||
# (labeled/unlabeled/synchronize/closed) and `workflow_run` (CI / Quality Gates
|
||||
# completed on omni-queue/**) only to bind label approvals and to wake its tick.
|
||||
# Not exploitable:
|
||||
# • No checkout of PR code, ever: both jobs check out the DEFAULT branch
|
||||
# (sparse: scripts/merge-queue + config/merge-queue, persist-credentials:
|
||||
# false) and run zero-dependency Node scripts (no npm ci). PR content is
|
||||
# handled only as git objects and through the REST API.
|
||||
# • No expression is expanded inside a `run:` body; event data and dispatch
|
||||
# inputs reach the scripts through `env:` only.
|
||||
# • Writes use a GitHub App installation token minted per job with minimum
|
||||
# permissions (approval: statuses/issues write; tick: contents, workflows,
|
||||
# pull-requests, issues, statuses write + checks/actions read — workflows
|
||||
# write only because GitHub refuses an App push of a commit that touches
|
||||
# .github/workflows/**, which a batched PR's merge commit may carry;
|
||||
# statuses write for the omni-queue/land status release rulesets require).
|
||||
# • The App key and the owner's OMNI_QUEUE_LAND_TOKEN live in the
|
||||
# `omni-queue` environment (default branch only, by its exact name); both
|
||||
# jobs run in it and only for pull requests into release/v*; the land
|
||||
# token reaches the tick step only.
|
||||
# • Kill switch: every job requires vars.OMNI_QUEUE_ENABLED == 'true'.
|
||||
# Accepted risk, re-review at the next release cycle (added 2026-11-13).
|
||||
# deploy-vps.yml uses `on: workflow_run` (after "Publish to Docker Hub").
|
||||
# zizmor flags workflow_run as "almost always used insecurely", but this one
|
||||
# is guarded and not exploitable:
|
||||
# • The deploy job is gated on `github.event.workflow_run.conclusion ==
|
||||
# 'success'` (deploy-vps.yml job `if:`, L15), so it only runs after a
|
||||
# successful, trusted upstream run — never on a forked/PR-triggered
|
||||
# failure.
|
||||
# • It does NOT checkout or execute untrusted code: the deploy runs over SSH
|
||||
# using repository secrets; there is no `actions/checkout` of an attacker
|
||||
# ref in the privileged context.
|
||||
# Accepted risk, re-review at the next release cycle (added 2026-06-15).
|
||||
ignore:
|
||||
- deploy-vps.yml
|
||||
- omni-queue.yml
|
||||
|
||||
cache-poisoning:
|
||||
# zizmor's cache-poisoning audit flags `actions/setup-node` (cache: npm) and
|
||||
# `actions/cache` steps that populate a cache which a later artifact-publishing
|
||||
# job could consume — the attack is: a fork PR seeds a poisoned cache that a
|
||||
# trusted publish run then restores and ships. None of the four entries below
|
||||
# are exploitable in that way:
|
||||
#
|
||||
# • electron-release.yml / npm-publish.yml — PUBLISH workflows that trigger
|
||||
# ONLY on trusted events: `push: tags v*` + `workflow_dispatch` (electron)
|
||||
# and `release: [released]` + `workflow_dispatch` + `workflow_call`
|
||||
# (npm). They NEVER run on a `pull_request` from a fork, so an untrusted
|
||||
# ref can never populate the npm/node_modules cache they restore. The
|
||||
# cache key is `hashFiles('package-lock.json')` / `runner.os-node-…`, a
|
||||
# first-party, lockfile-pinned key on trusted events.
|
||||
#
|
||||
# • opencode-plugin-ci.yml / opencode-provider-ci.yml — CI-only workflows
|
||||
# (lint/test of the two opencode packages). They DO run on `pull_request`,
|
||||
# but (a) they publish NO artifacts — there is no downstream publish job
|
||||
# that restores their cache, and (b) GitHub Actions cache is branch-scoped:
|
||||
# a fork-PR run writes to a PR-isolated cache that base-branch / release
|
||||
# runs cannot read. The `cache: npm` here only speeds up `npm ci` within
|
||||
# the same ephemeral CI run.
|
||||
#
|
||||
# Accepted risk (first-party caching on trusted/isolated events), re-review at
|
||||
# the next release cycle (added 2026-06-16).
|
||||
ignore:
|
||||
- electron-release.yml
|
||||
- npm-publish.yml
|
||||
- opencode-plugin-ci.yml
|
||||
- opencode-provider-ci.yml
|
||||
|
||||
@@ -119,16 +119,6 @@ export function isFlatTierId(id: string): boolean {
|
||||
return baseIdOf(id) !== undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* The bare master auto router (`auto`, served as `owned_by: "combo"`).
|
||||
* It is a routing entry point, not a ranked model: it always publishes
|
||||
* and never takes a per-owner showcase slot. The `auto/*` variants stay
|
||||
* subject to the cap.
|
||||
*/
|
||||
export function isMasterAutoRouter(entry: OmniRouteRawModelEntry): boolean {
|
||||
return entry.id === "auto" && entry.owned_by === "combo";
|
||||
}
|
||||
|
||||
/**
|
||||
* Pick the showcase ids: per `owned_by` group (prefix before `/`, else
|
||||
* `"unknown"`), newest `release_date` first (unknown = oldest), then
|
||||
@@ -142,7 +132,6 @@ export function selectShowcaseIds(
|
||||
const groups = new Map<string, OmniRouteRawModelEntry[]>();
|
||||
for (const entry of entries) {
|
||||
if (!entry || typeof entry.id !== "string" || entry.id.length === 0) continue;
|
||||
if (isMasterAutoRouter(entry)) continue;
|
||||
const owner = ownerKeyOf(entry);
|
||||
const list = groups.get(owner);
|
||||
if (list) list.push(entry);
|
||||
@@ -180,7 +169,6 @@ export function passesWhatServes(
|
||||
// The raw gateway row may carry a lifecycle hint the typed entry does
|
||||
// not declare (it already flows through the fetcher untouched).
|
||||
if (readEntryStatus(entry) === "deprecated") return false;
|
||||
if (isMasterAutoRouter(entry)) return true;
|
||||
if (isFlatTierId(entry.id)) return false;
|
||||
if (isFreshModel(entry, nowMs, windowMs)) {
|
||||
if (freshKept !== undefined) return freshKept.has(entry.id);
|
||||
@@ -209,7 +197,6 @@ export function selectFreshKeptIds(
|
||||
if (!entry || typeof entry.id !== "string" || entry.id.length === 0) continue;
|
||||
if (readEntryStatus(entry) === "deprecated") continue;
|
||||
if (isFlatTierId(entry.id)) continue;
|
||||
if (isMasterAutoRouter(entry)) continue;
|
||||
if (visibleFilter !== undefined) {
|
||||
if (matchesModelFilter(entry.id, visibleFilter)) continue;
|
||||
}
|
||||
|
||||
@@ -1010,66 +1010,3 @@ describe("disambiguation stays unique across groups", () => {
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
describe("master auto router is pinned outside the per-owner cap (#19016)", () => {
|
||||
// Rows as GET /v1/models serves the built-in auto combos: owned_by "combo",
|
||||
// no release_date, bare `auto` with the lowest context_length.
|
||||
function autoRows(): Array<Record<string, unknown>> {
|
||||
const variants = Array.from({ length: 20 }, (_v, i) => ({
|
||||
id: `auto/variant-${i}`,
|
||||
object: "model",
|
||||
owned_by: "combo",
|
||||
context_length: 128000 + i,
|
||||
}));
|
||||
return [{ id: "auto", object: "model", owned_by: "combo", context_length: 32000 }, ...variants];
|
||||
}
|
||||
|
||||
async function keysFor(opts: Record<string, unknown>): Promise<string[]> {
|
||||
const result = await collectCatalog(
|
||||
{ ...baseOpts, ...opts } as never,
|
||||
{ fetcher: async () => autoRows() as never, combosFetcher: async () => [] } as never
|
||||
);
|
||||
return [...result.entries.keys()];
|
||||
}
|
||||
|
||||
it("publishes the bare auto row while auto/* variants stay capped", async () => {
|
||||
const keys = await keysFor({});
|
||||
assert.ok(keys.includes("omniroute/auto"), "bare auto must be published");
|
||||
const variants = keys.filter((k) => k.startsWith("omniroute/auto/"));
|
||||
assert.equal(variants.length, 10, "auto/* variants keep the per-owner cap");
|
||||
});
|
||||
|
||||
it("does not let the pinned auto consume a showcase slot", async () => {
|
||||
const keys = await keysFor({ showcasePerOwner: 3 });
|
||||
assert.ok(keys.includes("omniroute/auto"));
|
||||
assert.equal(keys.filter((k) => k.startsWith("omniroute/auto/")).length, 3);
|
||||
});
|
||||
|
||||
it("hiddenModels still wins over the pin", async () => {
|
||||
assert.ok(!(await keysFor({ hiddenModels: ["auto"] })).includes("omniroute/auto"));
|
||||
});
|
||||
|
||||
it("combos:false still drops it", async () => {
|
||||
assert.ok(!(await keysFor({ combos: false })).includes("omniroute/auto"));
|
||||
});
|
||||
|
||||
it("an exact visibleModels pin still publishes it", async () => {
|
||||
assert.ok((await keysFor({ visibleModels: ["auto"] })).includes("omniroute/auto"));
|
||||
});
|
||||
|
||||
it("a capability preset still drops it", async () => {
|
||||
assert.ok(!(await keysFor({ visionOnly: true })).includes("omniroute/auto"));
|
||||
});
|
||||
|
||||
it("only the combo-owned bare auto is pinned", async () => {
|
||||
const rows = [
|
||||
...autoRows(),
|
||||
{ id: "auto", object: "model", owned_by: "other", context_length: 1 },
|
||||
];
|
||||
const result = await collectCatalog(
|
||||
baseOpts as never,
|
||||
{ fetcher: async () => rows as never, combosFetcher: async () => [] } as never
|
||||
);
|
||||
assert.ok(result.entries.has("omniroute/auto"));
|
||||
});
|
||||
});
|
||||
|
||||
4
@omniroute/opencode-plugin/package-lock.json
generated
4
@omniroute/opencode-plugin/package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "@omniroute/opencode-plugin",
|
||||
"version": "0.2.2",
|
||||
"version": "0.2.1",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@omniroute/opencode-plugin",
|
||||
"version": "0.2.2",
|
||||
"version": "0.2.1",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"zod": "^4.6.7"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@omniroute/opencode-plugin",
|
||||
"version": "0.2.2",
|
||||
"version": "0.2.1",
|
||||
"description": "OpenCode plugin for the OmniRoute AI Gateway. Drives dynamic model discovery, /connect auth flow, and multi-instance OmniRoute providers via the official @opencode-ai/plugin contract.",
|
||||
"type": "module",
|
||||
"main": "./dist/index.js",
|
||||
|
||||
26
AGENTS.md
26
AGENTS.md
@@ -29,7 +29,7 @@ Running tests: see [Testing](#testing) below (run the most focused test for chan
|
||||
|
||||
## Project at a Glance
|
||||
|
||||
**OmniRoute** — unified AI proxy/router. One endpoint, hundreds of LLM providers, auto-fallback.
|
||||
**OmniRoute** — unified AI proxy/router. One endpoint, 393 LLM providers, auto-fallback.
|
||||
|
||||
- API Routes — `src/app/api/v1/` (Next.js App Router entry points)
|
||||
- Handlers — `open-sse/handlers/` (request processing: chat, embeddings, etc)
|
||||
@@ -37,15 +37,14 @@ Running tests: see [Testing](#testing) below (run the most focused test for chan
|
||||
- Translators — `open-sse/translator/` (format conversion OpenAI↔Claude↔Gemini)
|
||||
- Transformer — `open-sse/transformer/` (Responses API ↔ Chat Completions)
|
||||
- Services — `open-sse/services/` (combo routing, rate limits, caching, etc)
|
||||
- Database — `src/lib/db/` (SQLite domain modules, versioned migrations in `src/lib/db/migrations/`)
|
||||
- MCP Server — `open-sse/mcp-server/` (canonical tools + memory/skill/GitHub/pool/gamification/plugin/Notion/Obsidian/local-corpus/RTK modules; 3 transports: stdio / SSE / Streamable HTTP; scope-based access)
|
||||
- Database — `src/lib/db/` (SQLite domain modules, 236 migrations)
|
||||
- Domain/Policy — `src/domain/` (policy engine, cost rules, fallback logic)
|
||||
- MCP Server — `open-sse/mcp-server/` (110 tools: 45 canonical + memory/skill/GitHub/pool/gamification/plugin/Notion/Obsidian/local-corpus/RTK modules; 3 transports: stdio / SSE / Streamable HTTP; 33 scopes)
|
||||
- A2A Server — `src/lib/a2a/` (JSON-RPC 2.0 agent protocol)
|
||||
- Skills — `src/lib/skills/` (extensible skill framework); Memory — `src/lib/memory/` (persistent conversational memory)
|
||||
|
||||
Monorepo: `src/` (Next.js 16 app), `open-sse/` (streaming engine workspace), `electron/` (desktop app), `tests/`, `bin/` (CLI entry point).
|
||||
|
||||
Counts (providers, migrations, MCP tools and scopes, routing strategies, scoring factors, mode packs) are derived values: read them with `npm run facts` (one value: `npm run facts -- --key=providers`), never from prose. Feature PRs do not write them; `npm run release:refresh-derived` rewrites the docs at release.
|
||||
|
||||
---
|
||||
|
||||
## Request Pipeline
|
||||
@@ -64,7 +63,7 @@ Client → /v1/chat/completions (Next.js route)
|
||||
|
||||
API routes follow a consistent pattern: `Route → CORS preflight → Zod body validation → Optional auth (extractApiKey/isValidApiKey) → API key policy enforcement → Handler delegation (open-sse)`. No global Next.js middleware — interception is route-specific.
|
||||
|
||||
**Combo routing** (`open-sse/services/combo.ts`): the public strategies are `ROUTING_STRATEGY_VALUES` in `src/shared/constants/routingStrategies.ts` (`quota-share` is internal). Each target calls `handleSingleModel()` (wraps `handleChatCore()` with per-target error handling + circuit breaker checks); the `fusion` strategy instead fans out to a panel of models in parallel and a judge model synthesizes one final answer (`open-sse/services/fusion.ts`). Auto-Combo scoring (`DEFAULT_WEIGHTS` in `open-sse/services/autoCombo/scoring.ts`) + full strategy table: `docs/routing/AUTO-COMBO.md`; the 3 resilience layers: `docs/architecture/RESILIENCE_GUIDE.md`.
|
||||
**Combo routing** (`open-sse/services/combo.ts`): 21 public strategies (priority, weighted, fill-first, round-robin, p2c, random, least-used, cost-optimized, reset-aware, reset-window, expiry-first, headroom, quota-weighted, strict-random, auto, lkgp, context-optimized, cache-optimized, context-relay, fusion, pipeline). Each target calls `handleSingleModel()` (wraps `handleChatCore()` with per-target error handling + circuit breaker checks); the `fusion` strategy instead fans out to a panel of models in parallel and a judge model synthesizes one final answer (`open-sse/services/fusion.ts`). 16-factor Auto-Combo scoring + full strategy table: `docs/routing/AUTO-COMBO.md`; the 3 resilience layers: `docs/architecture/RESILIENCE_GUIDE.md`.
|
||||
|
||||
---
|
||||
|
||||
@@ -177,9 +176,6 @@ Documentation must describe verified behavior, not plausible behavior.
|
||||
`path/to/file.ts:line` to an invented signature.
|
||||
4. Run `npm run check:docs-all` for edits under `docs/`; it includes the fabricated-docs
|
||||
validation.
|
||||
5. Edit only the English source. Never commit `docs/i18n/**` mirrors, `llm.txt` mirrors or
|
||||
`.i18n-state.json` in a feature PR: the translation wave (`/i18n-waves`, `docs/i18n-*`
|
||||
branches) and the release rewrite them (`docs/guides/I18N.md`).
|
||||
|
||||
---
|
||||
|
||||
@@ -204,7 +200,7 @@ Full step-by-step recipes: [`docs/architecture/MODIFICATION_SCENARIOS.md`](docs/
|
||||
For any non-trivial change, read the matching deep-dive first:
|
||||
|
||||
- Repo navigation — `docs/architecture/REPOSITORY_MAP.md` · Architecture — `docs/architecture/ARCHITECTURE.md` · Engineering reference — `docs/architecture/CODEBASE_DOCUMENTATION.md`
|
||||
- Auto-Combo (scoring factors, strategy table) — `docs/routing/AUTO-COMBO.md` · Reasoning replay — `docs/routing/REASONING_REPLAY.md`
|
||||
- Auto-Combo (16-factor scoring, 21 strategies) — `docs/routing/AUTO-COMBO.md` · Reasoning replay — `docs/routing/REASONING_REPLAY.md`
|
||||
- Resilience (3 mechanisms + debugging) — `docs/architecture/RESILIENCE_GUIDE.md`
|
||||
- Modification recipes — `docs/architecture/MODIFICATION_SCENARIOS.md`
|
||||
- Skills framework — `docs/frameworks/SKILLS.md` · Radar (free-model catalog overlay) — `docs/frameworks/RADAR.md` · Memory system (FTS5 + Qdrant) — `docs/frameworks/MEMORY.md`
|
||||
@@ -364,12 +360,8 @@ OmniRoute has **~90 quality-gate scripts** (`scripts/check/` + `scripts/quality/
|
||||
- Gates in jobs `lint` + `docs-sync-strict`: pass/fail policy gates —
|
||||
fix the violation or add an allowlist entry with a justification comment + tracking issue.
|
||||
- Gates in job `quality-gate`: ratchet — metrics (ESLint warnings, code coverage, duplication,
|
||||
complexity) must not regress vs `quality-baseline.json`. A feature PR never banks an
|
||||
improvement (`--update` runs at release); a regression still fails.
|
||||
- Generated files and derived baselines (`docs/reference/PROVIDER_REFERENCE.md`, the README SVGs,
|
||||
the generated `skills/*/SKILL.md` + `references/`, `config/quality/e2e-timings.json`) are written
|
||||
by the release refresh, not by feature PRs — `check:pr-derived-paths` flags a PR that carries
|
||||
them. See `docs/architecture/QUALITY_GATES.md` → "Generated files and derived baselines".
|
||||
complexity) must not regress vs `quality-baseline.json`. Update via
|
||||
`npm run quality:ratchet -- --update` when a metric genuinely improves.
|
||||
- Job `test-vitest` runs `npm run test:vitest` (MCP tools, autoCombo, cache) — blocking.
|
||||
`test:vitest:ui` has been blocking since PR #7127.
|
||||
- **Velocity phase (2026-08-30 → v4.0)**: every numeric baseline is loosened by 20% and `--require-tighten` is advisory (`quality-baseline.json` → `_policy`); the nightly `baseline-headroom` job tracks how much of the budget is left in the issue "📈 Baseline headroom". See `docs/architecture/QUALITY_GATES.md` → "Velocity phase".
|
||||
@@ -392,7 +384,7 @@ is a short form, its complete binding text, rationale and incident history are i
|
||||
6. Never silently swallow errors in SSE streams
|
||||
7. Always validate inputs with Zod schemas
|
||||
8. Always include tests when changing production code
|
||||
9. Coverage must not regress below the baseline frozen in `quality-baseline.json` (ratchet); absolute floor is 60% (statements/lines/functions/branches). The baseline is tightened with `npm run quality:ratchet -- --update` at release, never inside a feature PR. See `docs/architecture/QUALITY_GATES.md`.
|
||||
9. Coverage must not regress below the baseline frozen in `quality-baseline.json` (ratchet); absolute floor is 60% (statements/lines/functions/branches). Update the baseline via `npm run quality:ratchet -- --update` only when coverage genuinely improves. See `docs/architecture/QUALITY_GATES.md`.
|
||||
10. Never bypass Husky hooks (`--no-verify`, `--no-gpg-sign`) without explicit operator approval.
|
||||
11. Never embed public upstream OAuth client_id/secret or Firebase Web keys as string literals — always go through `resolvePublicCred()` (`open-sse/utils/publicCreds.ts`). See `docs/security/PUBLIC_CREDS.md`.
|
||||
12. Never return raw `err.stack` / `err.message` in HTTP / SSE / executor responses — always route through `buildErrorBody()` or `sanitizeErrorMessage()` (`open-sse/utils/error.ts`). See `docs/security/ERROR_SANITIZATION.md`.
|
||||
|
||||
@@ -90,10 +90,6 @@
|
||||
- **feat(cli):** run `omniroute serve --tray` as a detached desktop process after server and tray readiness, with graphical login auto-start support.
|
||||
- **feat(routing):** add client-, provider-, and model-neutral exclusive managed session connection leases with API-key-bound generation fencing, durable SQLite ownership, explicit allowlist policy, and bounded 429 capacity retry semantics.
|
||||
|
||||
## [3.8.55] — TBD
|
||||
|
||||
---
|
||||
|
||||
## [3.8.54] — TBD
|
||||
|
||||
---
|
||||
|
||||
@@ -318,7 +318,7 @@ src/ # TypeScript (.ts / .tsx)
|
||||
├── mitm/ # MITM proxy (cert, DNS, target routing)
|
||||
├── shared/
|
||||
│ ├── components/ # React components (.tsx)
|
||||
│ ├── constants/ # Provider definitions (329), MCP scopes, 22 routing strategies
|
||||
│ ├── constants/ # Provider definitions (329), MCP scopes, 21 routing strategies
|
||||
│ ├── utils/ # Circuit breaker, sanitizer, auth helpers
|
||||
│ └── validation/ # Zod v4 schemas
|
||||
└── sse/ # SSE proxy pipeline
|
||||
|
||||
59
README.md
59
README.md
@@ -9,7 +9,7 @@
|
||||
|
||||
**Created by [Diego Souza](https://github.com/diegosouzapw)**
|
||||
|
||||
<img src="./docs/diagrams/readme-hero.svg" width="100%" alt="OmniRoute — Never stop coding. Every AI tool → 394 providers — 150+ free — through one endpoint. Claude Code, Codex, Cursor, Cline, Copilot & Antigravity into FREE Claude / GPT / Gemini with auto-fallback. RTK + Caveman stacked compression saves 15–95% tokens (~89% avg) — never hit limits. 394 AI providers · 150+ free tiers · ~1.62B free tokens/mo · 22 routing strategies · $0 to start."/>
|
||||
<img src="./docs/diagrams/readme-hero.svg" width="100%" alt="OmniRoute — Never stop coding. Every AI tool → 393 providers — 150+ free — through one endpoint. Claude Code, Codex, Cursor, Cline, Copilot & Antigravity into FREE Claude / GPT / Gemini with auto-fallback. RTK + Caveman stacked compression saves 15–95% tokens (~89% avg) — never hit limits. 393 AI providers · 150+ free tiers · ~1.62B free tokens/mo · 21 routing strategies · $0 to start."/>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
|
||||
</h3>
|
||||
|
||||
[](https://github.com/diegosouzapw/OmniRoute)
|
||||
[](https://github.com/diegosouzapw/OmniRoute)
|
||||
<a href="https://trendshift.io/repositories/23589" target="_blank"><img src="https://trendshift.io/api/badge/repositories/23589" alt="diegosouzapw%2FOmniRoute | Trendshift" style="width: 250px; height: 55px;" width="250" height="55"/></a>
|
||||
[](https://www.star-history.com/diegosouzapw/omniroute)
|
||||
[](https://olud.ai/project/diegosouzapw-omniroute.html)
|
||||
@@ -48,14 +48,14 @@
|
||||
|
||||
**👋 Follow the maintainer — get new providers, releases & tips first:**
|
||||
|
||||
[](https://www.linkedin.com/in/diegosouzapw/)
|
||||
[](https://github.com/diegosouzapw)
|
||||
[](https://www.linkedin.com/in/diegosouzapw/)
|
||||
[](https://github.com/diegosouzapw)
|
||||
|
||||
[](https://discord.gg/U47eFqAXCn)
|
||||
[](https://t.me/omnirouteOficial)
|
||||
[](https://chat.whatsapp.com/FvuCbrpZmQ6I85n2vW5QIC?s=cl&p=a&mlu=4)
|
||||
[](https://chat.whatsapp.com/KWgatljAjmbELQory59Oti?s=cl&p=a&mlu=4)
|
||||
[](https://omniroute.online)
|
||||
[](https://discord.gg/U47eFqAXCn)
|
||||
[](https://t.me/omnirouteOficial)
|
||||
[](https://chat.whatsapp.com/FvuCbrpZmQ6I85n2vW5QIC?s=cl&p=a&mlu=4)
|
||||
[](https://chat.whatsapp.com/KWgatljAjmbELQory59Oti?s=cl&p=a&mlu=4)
|
||||
[](https://omniroute.online)
|
||||
|
||||
**Questions, provider tips, roadmap & support → [Discord](https://discord.gg/U47eFqAXCn) · [Telegram](https://t.me/omnirouteOficial) · WhatsApp [🌍 Global](https://chat.whatsapp.com/FvuCbrpZmQ6I85n2vW5QIC?s=cl&p=a&mlu=4) / [🇧🇷 Brasil](https://chat.whatsapp.com/KWgatljAjmbELQory59Oti?s=cl&p=a&mlu=4) / [📢 Official Channel](https://whatsapp.com/channel/0029VbDwC7A3wtb5PN6a5t2R) / [Portal](https://portal.sthub.com.br/communities/groups/st-hub/channels/Omniroute-World-8kRjmK)**
|
||||
|
||||
@@ -65,9 +65,9 @@
|
||||
|
||||
<div align="center">
|
||||
|
||||
| | v3.8.50 | **v3.8.51** | `v3.8.55+` |
|
||||
| | v3.8.50 | **v3.8.51** | `v3.8.54+` |
|
||||
| ------------------------- | :-----------------------: | :---------: | :-------------------: |
|
||||
| 🌐 Providers | 352 | **358** | 394 |
|
||||
| 🌐 Providers | 352 | **358** | 393 |
|
||||
| 🧠 Unique chat model IDs | 1320 | **1374** | 1491 |
|
||||
| 🖼️ Modality Bridge | 🆕 vision + audio + video | ✓ | ✓ |
|
||||
| 📡 Radar free catalog | 🆕 opt-in | ✓ | ✓ |
|
||||
@@ -108,7 +108,7 @@
|
||||
<tr>
|
||||
<td align="right"><b>⚙️ Features</b></td>
|
||||
<td align="center"><a href="#-combos--the-flagship">🎯 Combos</a></td>
|
||||
<td align="center"><a href="#-394-ai-providers--153-catalog-marked-free">🌐 Providers</a></td>
|
||||
<td align="center"><a href="#-393-ai-providers--153-catalog-marked-free">🌐 Providers</a></td>
|
||||
<td align="center"><a href="#-full-cli--a2a--mcp">🔌 CLI & MCP</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -244,7 +244,7 @@ curl http://localhost:20128/v1/chat/completions \
|
||||
|
||||
</div>
|
||||
|
||||
<img src="./docs/diagrams/promise-pillars.svg" width="100%" alt="The Promise — One endpoint and 394 providers. Automatic fallback keeps routing while another healthy target is available. Six pillars: resilient fallback across 394 providers · up to 95% token savings on eligible workloads · $0 to start with 150+ free tiers and 51 recurring/keyless free-forever providers · 39 CLI/agent integrations through one config · OpenAI, Claude, Gemini and Responses API compatibility at /v1 · production controls including circuit breakers, TLS stealth, MCP 110 tools, A2A, memory, guardrails, evals and 56,000+ static test declarations across 7,800+ tracked test files."/>
|
||||
<img src="./docs/diagrams/promise-pillars.svg" width="100%" alt="The Promise — One endpoint and 393 providers. Automatic fallback keeps routing while another healthy target is available. Six pillars: resilient fallback across 393 providers · up to 95% token savings on eligible workloads · $0 to start with 150+ free tiers and 51 recurring/keyless free-forever providers · 39 CLI/agent integrations through one config · OpenAI, Claude, Gemini and Responses API compatibility at /v1 · production controls including circuit breakers, TLS stealth, MCP 110 tools, A2A, memory, guardrails, evals and 56,000+ static test declarations across 7,800+ tracked test files."/>
|
||||
|
||||
<br/>
|
||||
<br/>
|
||||
@@ -259,7 +259,7 @@ curl http://localhost:20128/v1/chat/completions \
|
||||
|
||||
<div align="center">
|
||||
|
||||
<img src="./docs/diagrams/tier-cascade.svg" width="100%" alt="OmniRoute request flow: your IDE or CLI (Claude Code, Cursor, Cline…) calls one local endpoint (http://localhost:20128/v1); the OmniRoute Smart Router (RTK + Caveman compression, 22 routing strategies, circuit breakers, TLS stealth, MCP, A2A, guardrails) can fall back across 4 provider tiers while an eligible healthy target remains — Tier 1 Subscription, Tier 2 API Key, Tier 3 Cheap and Tier 4 Free."/>
|
||||
<img src="./docs/diagrams/tier-cascade.svg" width="100%" alt="OmniRoute request flow: your IDE or CLI (Claude Code, Cursor, Cline…) calls one local endpoint (http://localhost:20128/v1); the OmniRoute Smart Router (RTK + Caveman compression, 21 routing strategies, circuit breakers, TLS stealth, MCP, A2A, guardrails) can fall back across 4 provider tiers while an eligible healthy target remains — Tier 1 Subscription, Tier 2 API Key, Tier 3 Cheap and Tier 4 Free."/>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -350,7 +350,7 @@ curl http://localhost:20128/v1/chat/completions \
|
||||
|
||||
</div>
|
||||
|
||||
<img src="./docs/diagrams/strategies-grid.svg" width="100%" alt="Animated examples for 18 of the 22 combo routing strategies — one tile per strategy: priority, fill-first, weighted, round-robin, p2c, least-used, random, strict-random, cost-optimized, headroom, reset-window, reset-aware, context-relay, context-optimized, lkgp, auto, fusion, pipeline. cache-optimized, quota-weighted, expiry-first and jev are not animated; the table below describes all 22."/>
|
||||
<img src="./docs/diagrams/strategies-grid.svg" width="100%" alt="Animated examples for 18 of the 21 combo routing strategies — one tile per strategy: priority, fill-first, weighted, round-robin, p2c, least-used, random, strict-random, cost-optimized, headroom, reset-window, reset-aware, context-relay, context-optimized, lkgp, auto, fusion, pipeline. cache-optimized, quota-weighted and expiry-first are not animated; the table below describes all 21."/>
|
||||
|
||||
> A **combo** is a chain of models OmniRoute routes across **automatically**. If quota runs out, a provider fails, or costs spike, the combo can move to the next eligible healthy model. 🛡️
|
||||
|
||||
@@ -374,9 +374,9 @@ No combo to create. Set your model to `auto` (or a variant) and OmniRoute builds
|
||||
|
||||
##
|
||||
|
||||
### 🔀 Or build your own — 22 routing strategies
|
||||
### 🔀 Or build your own — 21 routing strategies
|
||||
|
||||
All **22** strategies — mix & match per combo step:
|
||||
All **21** strategies — mix & match per combo step:
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
@@ -489,11 +489,6 @@ All **22** strategies — mix & match per combo step:
|
||||
<td nowrap><code>expiry-first</code></td>
|
||||
<td>Spend the account whose quota would expire unused first — highest leftover with the nearest reset wins ⏳</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">22</td>
|
||||
<td nowrap><code>jev</code></td>
|
||||
<td>Your ranked list; TypeSafe Jev picks which entries run per request, falling back to your order (opt-in flag) ⚖️</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<sub>The Auto-Combo engine scores every candidate on **16 factors** (health, quota, cost, latency, task fit, quality, session availability…) — see [`docs/routing/AUTO-COMBO.md`](docs/routing/AUTO-COMBO.md).</sub>
|
||||
@@ -514,7 +509,7 @@ All **22** strategies — mix & match per combo step:
|
||||
|
||||
</div>
|
||||
|
||||
<img src="./docs/diagrams/comparison-table.svg" width="100%" alt="What sets OmniRoute apart — a dated feature snapshot vs 9router, OpenRouter, CLIProxyAPI and LiteLLM across 13 capabilities. OmniRoute: 394 providers, 150+ free tiers built in, 22 routing strategies, 12-engine token compression, built-in MCP server with 110 tools, A2A agent protocol, persistent memory, guardrails, cloud agents, TLS fingerprint stealth, Desktop/Termux/PWA and 67 i18n UI locales. OmniRoute is MIT-licensed and self-hostable. Competitor capabilities and counts may change; see the linked methodology."/>
|
||||
<img src="./docs/diagrams/comparison-table.svg" width="100%" alt="What sets OmniRoute apart — a dated feature snapshot vs 9router, OpenRouter, CLIProxyAPI and LiteLLM across 13 capabilities. OmniRoute: 393 providers, 150+ free tiers built in, 21 routing strategies, 12-engine token compression, built-in MCP server with 110 tools, A2A agent protocol, persistent memory, guardrails, cloud agents, TLS fingerprint stealth, Desktop/Termux/PWA and 67 i18n UI locales. OmniRoute is MIT-licensed and self-hostable. Competitor capabilities and counts may change; see the linked methodology."/>
|
||||
|
||||
<sub>📊 Full methodology & per-feature detail vs 9router, OpenRouter, CLIProxyAPI & LiteLLM → [`docs/comparison/OMNIROUTE_VS_ALTERNATIVES.md`](docs/comparison/OMNIROUTE_VS_ALTERNATIVES.md)</sub>
|
||||
|
||||
@@ -593,7 +588,7 @@ the current catalog at **[radar.omniroute.online/planos](https://radar.omniroute
|
||||
|
||||
</div>
|
||||
|
||||
> Recent highlights from **v3.8.20 → v3.8.55**. Full history in [`CHANGELOG.md`](CHANGELOG.md).
|
||||
> Recent highlights from **v3.8.20 → v3.8.54**. Full history in [`CHANGELOG.md`](CHANGELOG.md).
|
||||
|
||||
- **⚖️ `quota-weighted` routing** — the 20th combo strategy skips exhausted accounts, then draws among the rest in proportion to leftover quota ÷ in-flight load, keeping existing conversations pinned. → [Auto-Combo](docs/routing/AUTO-COMBO.md)
|
||||
- **🧰 Headless mode** — `omniroute serve --headless` (or `OMNIROUTE_HEADLESS=1`) runs only the `/v1/*` proxy engine, with the dashboard and dashboard-only subsystems off. → [Headless Mode](docs/guides/HEADLESS.md)
|
||||
@@ -618,7 +613,7 @@ the current catalog at **[radar.omniroute.online/planos](https://radar.omniroute
|
||||
- **🖼️ New endpoints** — `/v1/ocr` (Mistral OCR) and `/v1/audio/translations` (Whisper-style) round out the media surface. → [API Reference](docs/reference/API_REFERENCE.md)
|
||||
- **🎨 Image / video / audio generation** — one API for media: xAI Grok Imagine & Novita AI video, ComfyUI, Magnific, Adobe Firefly, Segmind, and speech providers such as ElevenLabs. → [API Reference](docs/reference/API_REFERENCE.md)
|
||||
- **🌍 Deployment & ops** — reverse-proxy `basePath`, browser-language auto-detect, per-key device tracking, root-less MITM trust, zh-TW localization. → [Environment](docs/reference/ENVIRONMENT.md)
|
||||
- **🤝 More providers & agents** — cloud agents (Codex Cloud, Cursor, Devin, Jules), Grok Build (xAI) with browser + OAuth login, Ollama first-class card, Claude Opus 5 & Sonnet 5, Kimi official partnership (Code/Web/Moonshot), Zed, Requesty, SenseNova, Yuanbao, Agnes AI… and a refreshed **394-provider catalog**. → [Providers](docs/reference/PROVIDER_REFERENCE.md)
|
||||
- **🤝 More providers & agents** — cloud agents (Codex Cloud, Cursor, Devin, Jules), Grok Build (xAI) with browser + OAuth login, Ollama first-class card, Claude Opus 5 & Sonnet 5, Kimi official partnership (Code/Web/Moonshot), Zed, Requesty, SenseNova, Yuanbao, Agnes AI… and a refreshed **393-provider catalog**. → [Providers](docs/reference/PROVIDER_REFERENCE.md)
|
||||
- **📡 Routing transparency** — every response carries an `X-OmniRoute-Decision` header naming the strategy/provider/latency that served it, a new `cache-optimized` combo strategy + Auto-Combo `cacheAffinity` factor route repeat requests back to the connection holding the cached prefix, and a read-only `/v1/auto-combo/{channel}/candidates` endpoint exposes an `auto/*` channel's live candidate pool. → [Auto-Combo](docs/routing/AUTO-COMBO.md)
|
||||
- **⚡ Local performance & infra** — one-click local Redis, Cloudflare Workers / Deno Deploy relay deployers, Bifrost & Mux as supervised embedded services. → [Embedded Services](docs/frameworks/EMBEDDED-SERVICES.md)
|
||||
- **🧩 Also in the box** — plugin framework + marketplace, Omni/Agent/GitHub skills frameworks, Obsidian vault integration (22 MCP tools), OpenAI-compatible Batch & Files APIs, semantic response cache, gamification with leaderboards, ACP agent discovery (15 built-in agents), scheduled log export to BigQuery, `auto/chaos` parallel multi-model fan-out, a Telegram bot bridge, an in-app version manager and LMArena-ELO free-provider rankings. → [Docs](docs/README.md)
|
||||
@@ -702,11 +697,11 @@ of your shell history. → [CLI Integrations](docs/guides/CLI-INTEGRATIONS.md)
|
||||
|
||||
<div align="center">
|
||||
|
||||
## 🌐 394 AI Providers — 153 Catalog-Marked Free
|
||||
## 🌐 393 AI Providers — 153 Catalog-Marked Free
|
||||
|
||||
</div>
|
||||
|
||||
> **394 registered providers** across the canonical chat, media, search, local, cloud-agent and system collections, including **153 carrying `hasFree: true` discovery metadata**. The chat model registry covers **239 providers / 3,059 distinct provider-model pairs / 1,475 raw model IDs**; the separate free-budget catalog has **465 per-model rows**, **34 recurring pools** and **51 recurring/keyless free-forever providers**. These are different denominators by design; definitions and pool-deduped calculations live in the [Provider Reference](docs/reference/PROVIDER_REFERENCE.md) and [Free Tiers](docs/reference/FREE_TIERS.md).
|
||||
> **393 registered providers** across the canonical chat, media, search, local, cloud-agent and system collections, including **153 carrying `hasFree: true` discovery metadata**. The chat model registry covers **239 providers / 3,059 distinct provider-model pairs / 1,475 raw model IDs**; the separate free-budget catalog has **465 per-model rows**, **34 recurring pools** and **51 recurring/keyless free-forever providers**. These are different denominators by design; definitions and pool-deduped calculations live in the [Provider Reference](docs/reference/PROVIDER_REFERENCE.md) and [Free Tiers](docs/reference/FREE_TIERS.md).
|
||||
|
||||
<div align="center">
|
||||
|
||||
@@ -929,9 +924,7 @@ Expose OmniRoute over **MCP**, **A2A**, a **REST API**, **webhooks** or a **remo
|
||||
|
||||
```bash
|
||||
# Give Claude Code the full OmniRoute toolset over MCP:
|
||||
omniroute mcp enable --transport streamable-http
|
||||
claude mcp add --transport http omniroute http://localhost:20128/api/mcp/stream \
|
||||
--header "Authorization: Bearer <api-key-with-manage-scope>"
|
||||
claude mcp add-server omniroute --type http --url http://localhost:20128/api/mcp/stream
|
||||
```
|
||||
|
||||
<sub>📖 [MCP Server](docs/frameworks/MCP-SERVER.md) · [A2A Server](docs/frameworks/A2A-SERVER.md) · [Agent Protocols](docs/frameworks/AGENT_PROTOCOLS_GUIDE.md)</sub>
|
||||
@@ -1043,7 +1036,7 @@ omniroute
|
||||
```
|
||||
|
||||
> 💡 See `npm warn ERESOLVE` or peer-dep warnings? [They're harmless](docs/guides/TROUBLESHOOTING.md#npm-install-warnings-eresolve--peer--deprecated).
|
||||
> **Using npm 11 or later?** npm may block package lifecycle scripts unless they are allowed. OmniRoute's `postinstall` (`node scripts/build/postinstall.mjs`) is required to prepare its native runtime files. Allow the packages named in npm's warning when installing globally. For the package set reported by OmniRoute 3.8.55:
|
||||
> **Using npm 11 or later?** npm may block package lifecycle scripts unless they are allowed. OmniRoute's `postinstall` (`node scripts/build/postinstall.mjs`) is required to prepare its native runtime files. Allow the packages named in npm's warning when installing globally. For the package set reported by OmniRoute 3.8.54:
|
||||
>
|
||||
> ```bash
|
||||
> npm install -g --allow-scripts=omniroute,keytar,onnxruntime-node,@parcel/watcher,@swc/core,protobufjs,esbuild omniroute
|
||||
@@ -1325,7 +1318,7 @@ Métricas canônicas em 2026-10-18: **1.976 vídeos únicos** · **20.220.289 vi
|
||||
<tr><td nowrap><b>Runtime</b></td><td>Node.js 22.x / 24.x LTS — <code>>=22.22.2 <23 || >=24.0.0 <27</code></td></tr>
|
||||
<tr><td nowrap><b>Language</b></td><td>TypeScript 6.0 — <b>100% TypeScript</b> across <code>src/</code> and <code>open-sse/</code> (zero <code>any</code> in core since v2.0)</td></tr>
|
||||
<tr><td nowrap><b>Framework</b></td><td>Next.js 16 + React 19 + Tailwind CSS 4</td></tr>
|
||||
<tr><td nowrap><b>Database</b></td><td>better-sqlite3 (SQLite, WAL journaling) + LowDB (JSON legacy) — 147 domain modules, 240 migrations</td></tr>
|
||||
<tr><td nowrap><b>Database</b></td><td>better-sqlite3 (SQLite, WAL journaling) + LowDB (JSON legacy) — 147 domain modules, 236 migrations</td></tr>
|
||||
<tr><td nowrap><b>Memory</b></td><td>SQLite FTS5 full-text + int8-quantized vector embeddings, typed decay</td></tr>
|
||||
<tr><td nowrap><b>Schemas</b></td><td>Zod 4 — MCP tool I/O validation + API contracts</td></tr>
|
||||
<tr><td nowrap><b>Protocols</b></td><td>MCP (stdio / HTTP / SSE) + A2A v0.3 (JSON-RPC 2.0 + SSE)</td></tr>
|
||||
@@ -1838,7 +1831,7 @@ MIT License - see [LICENSE](LICENSE) for details.
|
||||
|
||||
**[⬆ Back to top](#-omniroute)** · Built with ❤️ for the open-source AI community.
|
||||
|
||||
<sub>Created by <a href="https://github.com/diegosouzapw">Diego Souza</a> · OmniRoute v3.8.55 · Node ≥22.22.2 · MIT License · <a href="https://omniroute.online">omniroute.online</a></sub>
|
||||
<sub>Created by <a href="https://github.com/diegosouzapw">Diego Souza</a> · OmniRoute v3.8.54 · Node ≥22.22.2 · MIT License · <a href="https://omniroute.online">omniroute.online</a></sub>
|
||||
|
||||
</div>
|
||||
<!-- GitHub Discussions enabled for community Q&A -->
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
If you discover a security vulnerability in OmniRoute, please report it responsibly:
|
||||
|
||||
1. **DO NOT** open a public GitHub issue
|
||||
2. Use [GitHub Security Advisories](https://github.com/cheaper-inference/OmniRoute/security/advisories/new)
|
||||
2. Use [GitHub Security Advisories](https://github.com/diegosouzapw/OmniRoute/security/advisories/new)
|
||||
3. Include: description, reproduction steps, and potential impact
|
||||
|
||||
## Response Timeline
|
||||
@@ -38,7 +38,7 @@ After 3.8.59 the next version is **3.9.0**, which opens the long-term support li
|
||||
whichever is later**. The resulting end date is recorded in the 3.9.0 release notes and in
|
||||
[`ROADMAP.md`](ROADMAP.md) when the cut happens.
|
||||
- **Reporting a vulnerability in the LTS line:** same channel as any other version —
|
||||
a private [GitHub Security Advisory](https://github.com/cheaper-inference/OmniRoute/security/advisories/new),
|
||||
a private [GitHub Security Advisory](https://github.com/diegosouzapw/OmniRoute/security/advisories/new),
|
||||
never a public issue. Say which version you tested (for example `3.9.2`); fixes land on
|
||||
`stable/v3` and are forward-ported to v4.
|
||||
- **Security baseline at the LTS cut:** measured scanner state, route-guard and
|
||||
|
||||
@@ -99,29 +99,16 @@ function resolveMigrationsDir(rootDir) {
|
||||
return candidates.find((candidate) => fs.existsSync(candidate)) || null;
|
||||
}
|
||||
|
||||
// Numeric order of the digit prefix, mirroring the runner's compareMigrationVersions():
|
||||
// legacy `NNN_` files and timestamped `YYYYMMDDHHMMSS_` files share the directory, and as
|
||||
// text `20261113120000_x.sql` would list before `235_y.sql`. Arbitrary precision (no
|
||||
// Number), file name as the tie-break. Kept local: this file runs under plain node.
|
||||
function compareMigrationFileNames(a, b) {
|
||||
const left = a.version.replace(/^0+(?=\d)/, "");
|
||||
const right = b.version.replace(/^0+(?=\d)/, "");
|
||||
if (left.length !== right.length) return left.length < right.length ? -1 : 1;
|
||||
if (left !== right) return left < right ? -1 : 1;
|
||||
if (a.file === b.file) return 0;
|
||||
return a.file < b.file ? -1 : 1;
|
||||
}
|
||||
|
||||
function readMigrationFiles(migrationsDir) {
|
||||
if (!migrationsDir) return [];
|
||||
return fs
|
||||
.readdirSync(migrationsDir)
|
||||
.filter((file) => /^\d+_.+\.sql$/.test(file))
|
||||
.sort()
|
||||
.map((file) => {
|
||||
const [, version, name] = file.match(/^(\d+)_(.+)\.sql$/) || [];
|
||||
return { version, name, file };
|
||||
})
|
||||
.sort(compareMigrationFileNames);
|
||||
});
|
||||
}
|
||||
|
||||
async function checkDatabase(dbPath, rootDir) {
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
- **feat(systemone):** `POST /v1/systemone` can serve `ollama-local/<model>` decisions models on the local Ollama of the existing `ollama-local` connection (its base URL, default `http://localhost:11434/v1`, never a request field), with Ollama's own limits checked before any upstream call (2–26 candidates per choice/score question, at most 64 questions, no chat sampling fields, raw base64 images only, 64 KiB / 32 MiB body cap); opt-in through the `SYSTEMONE_OLLAMA_LOCAL_BACKEND_ENABLED` feature flag (default off) ([#14667](https://github.com/diegosouzapw/OmniRoute/pull/14667)) — thanks @PixmaNts
|
||||
@@ -1 +0,0 @@
|
||||
- **feat(routing):** new `jev` combo strategy — you order the providers, one TypeSafe System One `choice` call admits the winner plus up to 4 fallbacks (options at or above 0.15 confidence) for each request; a missing key, timeout or low confidence falls open to your own order, live session pins skip the call, and the combo editor shows a privacy note because the latest user message is sent to TypeSafe. The TypeSafe call is opt-in through the `COMBO_JEV_STRATEGY_ENABLED` feature flag (default off): a stored TypeSafe key alone never sends traffic, and with the flag off a jev combo keeps your order ([#15279](https://github.com/diegosouzapw/OmniRoute/pull/15279)) — thanks @miguelenes
|
||||
@@ -1 +0,0 @@
|
||||
- Use registered local-provider URLs for model discovery and synchronized embedding routes, and align Docker Model Runner's default with its engine-neutral OpenAI endpoint. Docker Model Runner embedding requests now accept keyless connections while preserving configured credentials and per-model capability checks. (#16670)
|
||||
@@ -1 +0,0 @@
|
||||
- **feat(systemone):** `POST /v1/systemone` can serve TypeSafe Jev and Cloudflare Clef / Clef-flash on Cloudflare Workers AI through the existing `cloudflare-ai` connection (`cloudflare-ai/jev`, `cloudflare-ai/clef`, `cloudflare-ai/clef-flash`, alias `cf/`), as a new `systemOneRegistry` backend, opt-in through the `SYSTEMONE_CLOUDFLARE_BACKEND_ENABLED` feature flag (default off) ([#16676](https://github.com/diegosouzapw/OmniRoute/pull/16676)) — thanks @xiaoyaner0201
|
||||
@@ -1 +0,0 @@
|
||||
- feat(codex): add global and per-connection Ultrafast defaults scoped to GPT-6 Astra and GPT-6.1 Sol, while preserving explicit request and API-key precedence. (#16678)
|
||||
@@ -1 +0,0 @@
|
||||
- **feat(dashboard):** "New models" inbox — model sync records each provider's listing (first sync seeds a baseline) and the Providers toolbar shows newly added models with an unread badge, grouped by provider, with mark-as-read ([#16864](https://github.com/diegosouzapw/OmniRoute/pull/16864)) — thanks @ErfanBagheri404
|
||||
@@ -1 +0,0 @@
|
||||
- **feat(search):** Keenable web search and fetch provider (`keenable-search`, alias `keenable`): keyless by default, with an optional API key that only lifts the per-IP rate limits. Serves `/v1/search` (web only, fallback-only so it never displaces a configured paid provider) and `/v1/web/fetch` (Markdown only, capped at 100,000 characters) ([#17920](https://github.com/diegosouzapw/OmniRoute/pull/17920)) — thanks @ilya-bogin-keenable
|
||||
@@ -1 +0,0 @@
|
||||
- **feat(dashboard):** "Quota check" toggle for OpenAI- and Anthropic-compatible nodes reads a standard `/credits` balance into Provider Limits; `anthropic-compatible-*` keys now use the configurable quota fetcher, which goes through the SSRF-guarded outbound fetch ([#18350](https://github.com/cheaper-inference/OmniRoute/pull/18350)) — thanks @MWGE22629
|
||||
@@ -1 +0,0 @@
|
||||
- **feat(audio):** Cloudflare Workers AI Deepgram Nova-3 transcription (`cf/@cf/deepgram/nova-3`) with opt-in speaker diarization and `verbose_json` words, per-speaker segments and `num_speakers` ([#18352](https://github.com/cheaper-inference/OmniRoute/pull/18352)) — thanks @LeandroTechify
|
||||
@@ -1 +0,0 @@
|
||||
- **feat(providers):** custom JSON API provider nodes — an OpenAI-compatible node with `apiType: "custom-json"` fills a JSON request template (`{{prompt}}`, `{{messages}}`, `{{model}}`, `{{request.<path>}}`; substitution only) for any JSON business endpoint, reads the reply from a response path and returns it in the client's format; business requests are never replayed (no retry, no account or combo fallback). API-only for now, see `docs/guides/CUSTOM_JSON_API.md` ([#18353](https://github.com/cheaper-inference/OmniRoute/pull/18353)) — thanks @lyccccy
|
||||
@@ -1 +0,0 @@
|
||||
- **feat(dashboard):** the OpenAI-compatible Add and Edit provider modals offer the **Custom JSON API** type — HTTP method, auth (bearer, API key header or none), a request-template editor with simple fields or full JSON, the response path and a "Send test request" button — validated in the browser with the same schema the server uses ([#18359](https://github.com/cheaper-inference/OmniRoute/pull/18359)) — thanks @lyccccy
|
||||
@@ -1 +0,0 @@
|
||||
- **feat(routing):** add endpoint-specific combo routes with independent targets, strategies and config for Chat, search/fetch, embeddings, rerank, images, video, music, OCR and audio surfaces. `/v1/search`, `/v1/web/fetch`, `/v1/music/generations`, `/v1/music`, `/v1/sound-generation` and `/v1/ocr` resolve saved combo names while preserving native response contracts, account pins and caller key scopes. Mixed combinations filter incompatible targets before credential selection. Related to #10274; fixes #17858.
|
||||
@@ -1 +0,0 @@
|
||||
- **feat(pii):** opt-in reversible PII vault (`PII_REVERSIBLE_VAULT_ENABLED`, default off, needs `PII_REDACTION_ENABLED`): request PII becomes per-request surrogate tokens instead of irreversible placeholders, and the chat handler restores the original values in 2xx responses (SSE split across events and JSON, tool arguments and reasoning included). Providers, fusion judges, logs and caches only see tokens; error bodies keep the tokens; memory, idempotency and semantic-cache writes are skipped for masked turns ([#19326](https://github.com/cheaper-inference/OmniRoute/pull/19326), builds on [#18017](https://github.com/cheaper-inference/OmniRoute/pull/18017)) — thanks @Ardem2025
|
||||
@@ -1 +0,0 @@
|
||||
- **feat(db):** New migrations are named `YYYYMMDDHHMMSS_description.sql` (UTC, `npm run db:new-migration -- <description>`) instead of the next number, so parallel PRs no longer collide. The numbered migrations (`001`–`241`) stay frozen. The runner orders by the numeric value of the prefix. Against the base, the migration gate refuses deleted merged migrations and unsafe renames, and runs a commutation check on out-of-order and edited migrations. Release-Green applies every migration to an empty database and compares with the latest release tag. The order of `RENAMED_MIGRATION_COMPATIBILITY` entries no longer matters: a database whose old PR rows block each other's slots boots instead of stopping with `Cannot reconcile` ([#20169](https://github.com/cheaper-inference/OmniRoute/pull/20169))
|
||||
@@ -1 +0,0 @@
|
||||
- **feat(docker):** releases are also published to the Cheaper Inference Docker Hub organization (`cheaperinference/omniroute`) next to `diegosouzapw/omniroute`, which keeps its pull history and every image; without the org credentials the copy is skipped with a warning, and `docker-org-mirror.yml` republishes a released version later. The desktop app now auto-updates from `cheaper-inference/OmniRoute` ([#20344](https://github.com/cheaper-inference/OmniRoute/pull/20344))
|
||||
@@ -1 +0,0 @@
|
||||
- **feat(analytics):** split the summary into total tokens, total input, input excluding cache reads, and cached input, with explicit incomplete-data handling and localized explanations while preserving provider accounting.
|
||||
@@ -1 +0,0 @@
|
||||
- **test(sse):** Distinguish malformed SSE from valid upstream error frames in the non-streaming regression suites, and verify both initial and fallback errors retain their status, diagnostic and receipt.
|
||||
@@ -1 +0,0 @@
|
||||
- **fix(ci):** Audit all five independent lockfiles with explicit incomplete results, reject missing/invalid OSV measurements, align OpenCode CI with supported Node releases, and reproduce plugin installs from their lockfiles.
|
||||
@@ -1 +0,0 @@
|
||||
- **fix(ci):** Compare OpenAPI contracts against immutable event commits, preventing false removals after the base advances and rejecting incomplete required measurements.
|
||||
@@ -1 +0,0 @@
|
||||
- **fix(ci):** Execute a versioned Release-Green static profile with audit, mutation and i18n checks; reject incomplete scanner measurements and report terminal test failures ahead of expected fixture errors.
|
||||
@@ -1 +0,0 @@
|
||||
- Restore the approved Video Bridge FU-07 material-gain thresholds and fail closed on unbound or incomplete FU-07/FU-09 evidence; require independent candidate/corpus/model-revision-bound receipts, preserve digest-only observations, and expose conservative advanced-policy readiness without automatically promoting experimental modes.
|
||||
@@ -1 +0,0 @@
|
||||
- **fix(ci):** Verify retained release-acceptance evidence against its declared SHA-256 instead of trusting hash syntax alone; missing, changed or unsafe file references remain unverified. Supplied-plan reports explicitly do not certify the complete release pipeline (#17856).
|
||||
@@ -1 +0,0 @@
|
||||
- fix(sse): Codex mid-request 429 failover now selects the replacement account through the quota preflight, so it no longer rotates onto a quota-exhausted account (#18425)
|
||||
@@ -1 +0,0 @@
|
||||
- **fix(providers):** `/v1/models` no longer advertises the local-CLI no-auth providers `auggie` (`aug/*`) and `zcode` (`zc/*`) when their binary cannot be resolved on the host running the server (`AUGGIE_BIN`/`ZCODE_BIN` override, installer paths, PATH); the check runs once per catalog build with a 60 s cache, an explicit connection row keeps the provider listed, and `devin-cli-agentic` / `codex-app-server` stay listed ([#18753](https://github.com/cheaper-inference/OmniRoute/issues/18753))
|
||||
@@ -1 +0,0 @@
|
||||
- fix(dashboard): provider quota "Resets in" countdowns now follow a shared 30-second clock instead of being frozen by React Compiler memoization (#18772)
|
||||
@@ -1 +0,0 @@
|
||||
- fix(providers): always publish the bare master `auto` router in the OpenCode v2 plugin default view instead of dropping it through the per-owner showcase cap (#19016)
|
||||
@@ -1 +0,0 @@
|
||||
- **fix(usage):** Preserve reported, estimated and unknown token evidence through streaming, accounting, exports and dashboards. Keep provider totals and native client projections, meter Gemini receipts in quota callbacks, and distinguish unknown cache usage from reported zero. Existing BigQuery destinations can add the two nullable evidence columns when auto-create is enabled and the schema update passes its etag precondition. ([#20054](https://github.com/cheaper-inference/OmniRoute/pull/20054)) — thanks @KiaroSama
|
||||
@@ -1 +0,0 @@
|
||||
- **fix(mcp):** `npm run test:vitest` no longer writes MCP audit rows into the developer's `~/.omniroute/storage.sqlite`: both Vitest configs run with a throwaway `DATA_DIR`, and the MCP audit refuses the home database in a test context without `DATA_DIR` (opt back in with `OMNIROUTE_ALLOW_DEFAULT_DATA_DIR=1`) ([#20252](https://github.com/cheaper-inference/OmniRoute/pull/20252))
|
||||
@@ -1 +0,0 @@
|
||||
- **fix(dashboard):** UI kit conformance defects from the 2026-11-15 review: page titles on small screens (kit `PageHeader` on 30 routes), dead and untranslated breadcrumb segments, keyboard access and accessible names for tables, `progressbar` semantics on 41 bars, kit popovers and tooltips in place of hand-positioned ones, colour classes that generated no CSS, and typography classes the kit overrides ([#20313](https://github.com/cheaper-inference/OmniRoute/pull/20313))
|
||||
@@ -1 +0,0 @@
|
||||
- **fix(ci):** the OpenCode plugin publish jobs detect plugin changes again (the bump step compared a repo-root path from inside the plugin folder and never saw a change), so `@omniroute/opencode-plugin` 0.2.2 and `@omniroute/opencode-plugin-v2` 0.1.1 ship the code that changed since July and October ([#20373](https://github.com/cheaper-inference/OmniRoute/pull/20373))
|
||||
@@ -1 +0,0 @@
|
||||
- **fix(sse):** the chat ingest byte budget now charges every chunk of a body sent without Content-Length and the decoded size of compressed bodies, and decompression stops at the budget room instead of expanding first
|
||||
@@ -1 +0,0 @@
|
||||
- Build the Bedrock client cache key with the shared opaque-token fingerprint helper (byte-identical digest) instead of an inline sha256 over the API key.
|
||||
@@ -1 +0,0 @@
|
||||
- Persist only the `apiKeyHealth` slice when a key changes health, so request-local values no longer land on the shared connection, and stop the rotator from handing back a sticky key that is in 429 cooldown.
|
||||
@@ -1 +0,0 @@
|
||||
- Resolve the MCP compression-store principal from the key the transport authenticated, and stop falling back to the environment key for HTTP callers.
|
||||
@@ -1 +0,0 @@
|
||||
- Keep the `private_key` credential pattern linear, so a body of repeated PEM BEGIN headers no longer blocks the event loop when credential redaction is on.
|
||||
@@ -1 +0,0 @@
|
||||
- Run request-blocking plugin hooks on every call, so a hook that denies or rewrites a request still applies above the per-plugin rate limit, which now covers fire-and-forget hooks only.
|
||||
@@ -1 +0,0 @@
|
||||
- Keep replayed tool-call reasoning inside the API key and session that produced it, so a reused tool call id such as `call_0` cannot return another caller's reasoning.
|
||||
@@ -1 +0,0 @@
|
||||
- Accept a caller-supplied SearXNG `provider_options.baseUrl` only for public hosts, on every hop and DNS answer; loopback and LAN instances are configured on the stored connection.
|
||||
@@ -1 +0,0 @@
|
||||
- Require a dashboard session or a manage-scoped key on `/api/agent-skills/generate`, `/api/skills/marketplace/install` and `/api/skills/skillssh/install` even when login is disabled.
|
||||
@@ -1 +0,0 @@
|
||||
- **fix(sse):** token counting no longer blocks the event loop on long runs of one character class or heavy CJK input; it switches to a linear estimate and keeps the exact count for ordinary text
|
||||
@@ -1 +0,0 @@
|
||||
- Return the shared provider accounts in the usage command JSON (`?format=json`) only to keys with `self:account-quota` or a management scope, the same rule `/v1/me/status` uses; other keys get their personal quota only (thanks @Witroch4).
|
||||
@@ -1 +0,0 @@
|
||||
- **fix(quality):** the test impact map is written one entry per line inside `sources`/`artifacts` and read line by line from a Buffer (`readTestImpactMap`), so `check-forgotten-sibling-tests` and `select-impacted-tests` no longer hit V8's 512 MiB string limit. The release map had reached 536.8 MB, 77 KB under the ceiling, and PRs that added tests failed Fast Quality Gates with "Cannot create a string longer than 0x1fffffe8 characters" (#19329).
|
||||
@@ -1 +0,0 @@
|
||||
- **test(dashboard):** move the #19337 "forwards supportsVision and max_output_tokens" case to the no-connection import block. Since #19254 a provider with a connection imports through the model sync, so the case never reached `POST /api/provider-models` and kept `release/v3.8.54` red (#19329).
|
||||
@@ -1 +0,0 @@
|
||||
- **chore(ci):** omni-queue, OmniRoute's own merge queue in GitHub Actions (batches of approved PRs validated by one CI run, bisection, base-red detection, fast-forward landing of the tested tree), shipped inert and in shadow mode; runbook in `docs/ops/OMNI_QUEUE.md` and the release ruleset template applied by `scripts/merge-queue/apply-ruleset.mjs`.
|
||||
@@ -1 +0,0 @@
|
||||
- **fix(dashboard):** clear the request detail "copied" reset timers on unmount. Left running, the 2 s timer fired after the sheet (and, in Vitest, jsdom) was gone and threw "window is not defined" as an unhandled error, failing the whole UI job while every test passed (#19329).
|
||||
@@ -1,2 +0,0 @@
|
||||
- **test(video):** document the explicit source directory for isolated live validation, keep private preparation under the same `/tmp` root required by both consumers even when the runner overrides `TMPDIR`, and parse source environment files with Node's native parser instead of an undeclared dependency ([#16083](https://github.com/diegosouzapw/OmniRoute/pull/16083)).
|
||||
- Reject preloaded database bindings before private preparation mutates client keys, authenticate the isolated STT owner explicitly, and enforce one-shot dispatch even for concurrent requests. Component errors use the canonical sanitized envelope.
|
||||
@@ -1 +0,0 @@
|
||||
- **quality:** add an exact-commit production-source inventory and independent verifier for the unified-coverage denominator, including never-imported sources and rejecting reduced or forged scope receipts. This is inventory infrastructure only; coverage collectors, CI thresholds, and release acceptance are unchanged ([#16177](https://github.com/diegosouzapw/OmniRoute/pull/16177)).
|
||||
@@ -1 +0,0 @@
|
||||
- **docs:** Document the live API-key, resolved-target and combo-routing surfaces separately from the reserved domain policy/combo/container contracts ([#17337](https://github.com/cheaper-inference/OmniRoute/pull/17337), refs #17187)
|
||||
@@ -1 +0,0 @@
|
||||
- **ci(workflows):** the VPS deploy now accepts a `workflow_run` only from this repository, a trusted event and a release ref, publishing and opencode workflows no longer restore a package-manager cache, and the Semgrep image is pinned by digest ([#18165](https://github.com/cheaper-inference/OmniRoute/pull/18165))
|
||||
@@ -1 +0,0 @@
|
||||
- **ci:** pin every remaining GitHub Action in `.github/workflows` to the commit SHA of its tag (tag kept as a comment for Dependabot), drop the unused checkout credential in `base-ci-repair` and `wiki-sync`, and remove the redundant workflow-level `issues: write` from `nightly-compat` — zizmor findings 216 → 13 ([#19321](https://github.com/cheaper-inference/OmniRoute/pull/19321))
|
||||
@@ -1 +0,0 @@
|
||||
- **chore(release):** stop feature PRs from writing values that depend on the base. The `package.json` description (and `flake.nix`) now say "hundreds of providers" instead of the exact count, and the docs-counts gate rejects a provider count there instead of requiring the live one (25 open PRs conflicted on that line alone). Stryker's `tap.testFiles` is no longer a hand-kept list: `stryker.conf.json` became `stryker.conf.mjs`, which computes the list at load time from `mutate` with the same import rule `check:mutation-test-coverage --strict` enforces (shared in `scripts/quality/mutation-test-files.mjs`); the 109 former entries the rule does not select stay pinned, so the resolved list matches the old 775 unique paths exactly. `stryker.disablebail.json` became `stryker.disablebail.mjs`, which spreads the base config — Stryker 10 ignored its `"extends"` key, so the redundancy run never got the base config. ([#20157](https://github.com/cheaper-inference/OmniRoute/pull/20157))
|
||||
@@ -1 +0,0 @@
|
||||
- **feat(ci):** derived numbers are resolved at release, not in every PR. `check:docs-counts` gains a `pr` mode for feature PRs (diff against the PR base: it fails only a managed number the PR wrote or a required claim it removed, never a base that moved) and keeps today's strict comparison as the `release` mode; a facts-collection timeout is now an infrastructure error (exit 2) instead of a false drift. New `npm run facts` (every derived number as JSON), the committed snapshot `docs/reference/derived-facts.json` that the README SVG generators read, and `npm run release:refresh-derived [--check]`, which rewrites every derived value in one pass. Release-Green reports the strict view as drift instead of opening a base-red, and a nightly workflow keeps one `chore/derived-refresh` PR with the refreshed values. ([#20161](https://github.com/cheaper-inference/OmniRoute/pull/20161))
|
||||
@@ -1 +0,0 @@
|
||||
- **chore(docs):** the agent-instruction files no longer carry derived counts. `AGENTS.md`, `llm.txt` (and its 66 mirrors), the bs `AGENTS.md` fork, `open-sse/services/AGENTS.md`, `agentSkills.ts`, `skills/README.md` and the skills point to the source (`ROUTING_STRATEGY_VALUES`, `DEFAULT_WEIGHTS`, the migrations directory) and to `npm run facts` instead of provider, migration, MCP-tool, scope, strategy, scoring-factor and mode-pack counts that every provider PR rewrote (on 2026-11-13, 37 open PRs edited the count lines of `AGENTS.md` and 36 those of `llm.txt`). A new STRICT invariant in `check:docs-counts` keeps a count from coming back, in both gate modes. ([#20162](https://github.com/cheaper-inference/OmniRoute/pull/20162))
|
||||
@@ -1 +0,0 @@
|
||||
- **chore(ci):** derived files get one writer. The new `check:pr-derived-paths` (job PR Test Policy) flags a feature PR that carries files a refresh owns — the families in `config/quality/derived-paths/*.json` — and allows writer branches (`release/v*`, `docs/i18n-*`, `chore/i18n-*`, `chore/derived-*`) and PRs that touch one family only; it runs advisory (`--warn`, with a check annotation) until the open PRs are cleaned up. `scripts/check/lib/gateMode.mjs` resolves the `pr`/`release` mode every derived-content gate shares (`--mode`, then `OMNIROUTE_GATE_MODE`, then the Actions event). `check:test-masking` lists the gate-mode conditional skips in a report-only block.
|
||||
@@ -1 +0,0 @@
|
||||
- **chore(i18n):** translation mirrors are derived files: a feature PR edits only the English source, and the `docs/i18n/**` mirrors are rewritten by the translation wave and the release. `check:docs-sync` skips the 66 `llm.txt` mirror copies and the translated `CHANGELOG.md` checks in PR mode (strict in release mode, and in PR mode for a writer branch or, when the diff base resolves, a change that edits mirrors; in PR mode the `llm.txt` mirrors must still agree with each other or with the root, so a hand edit fails even in a depth-1 checkout); the pre-commit hook runs it with `--mode=pr`; the scheduled `i18n-mirror-refresh.yml` now also syncs stale `llm.txt` mirrors; six mirror-content unit tests assert only up-to-date mirrors in PR mode through `tests/_helpers/mirrorFreshness.ts`; `scripts/i18n/sync-llm-mirrors.mjs` exports `syncLlmMirrors()` and gains `--dry-run`
|
||||
@@ -1 +0,0 @@
|
||||
- **chore(i18n):** a feature PR now adds or rewrites UI and CLI strings in `en.json` only; the other locales are completed once per release. The completeness gates (`check-key-completeness` UI and CLI, `check-new-key-coverage`, `check-ui-value-drift`, `check-translation-ratio`, the locale-parity part of `check:cli-i18n`) and the parity assertions of `cli-i18n-catalog`, `i18n-pt-br` and `i18n-vi-completeness` skip in pr mode and stay strict in release mode (release PR, pushes to main, local runs). `config/quality/derived-paths/translation.json` declares the translation family for `check:pr-derived-paths`. `sync-ui-keys.mjs` gains the programmatic `syncUiKeys()` for `release:refresh-derived`, plus `--rewritten-since=<ref>` (re-queues translations of rewritten English) and explicit `--prune-extra` / `--keep-extra`
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user