Compare commits

..

821 Commits

Author SHA1 Message Date
diegosouzapw
90481eb9b3 fix(security): keep shared provider accounts out of the usage command JSON for client keys
GET /api/usage/om-usage?format=json returned every active provider connection
(ids, plans, raw quota windows, resets) to any key with allowUsageCommand.
provider/providers are now returned only to keys with self:account-quota or a
management scope, the rule /v1/me/status already applies; other keys get their
personal quota only. Missing scopes fail closed.

Co-authored-by: Witroch4 <175152067+Witroch4@users.noreply.github.com>
2026-11-17 12:35:55 -03:00
Diego Rodrigues de Sa e Souza
4b9fc08ad6 fix(ci): run the Release-Green hosted suites in pr gate mode (#20338)
* fix(ci): run the Release-Green hosted suites in pr gate mode

validate-release-green gives its own HARD gates OMNIROUTE_GATE_MODE=pr
(plan "derived numbers and texts resolved only at release"), but the
unit/integration/vitest results it reads through --suites-from come from
the hosted `suites` and `main-suites` jobs, which set no mode. A scheduled
run resolves to release mode there, so the locale-parity tests fail on
every key a feature PR adds to en.json: on 2026-11-16 unit-1/unit-4
failed "should contain every key present in en.json" after #19538, and
base-red #19329 stayed open.

Set the same pr mode on both suite jobs. Release-mode assertions stay with
the release cut.

* test(ci): describe the locale-parity tests without naming their helper path

tests/unit/locale-parity-mode.test.ts counts every test file whose text
mentions the helper path as a user of the mode-conditional skip helper.
The new hosted-suites test only named it in a comment and was flagged as
an unlisted user (Unit Tests 7/8). It does not use the helper, so the
comment is reworded instead of widening the allowlist.
2026-11-17 08:21:23 -03:00
Diego Rodrigues de Sa e Souza
e23b439525 fix(i18n): v3.8.55 base-red — translate the refresh's __MISSING__ markers; decouple the refresh real-plan tests (#20395)
* test(release): refresh real-plan fixture drops lines that repeat the migration count by coincidence

The two 'real gate plan' tests copy the live README and the fa/pt-BR mirrors. After the v3.8.54 refresh the count (240) also appears in the PR census ('240 by Dependabot'), and fa writes the migrations count in Persian digits, so the mirror carry is ambiguous and the refresh correctly asks for a manual edit; both tests failed on release/v3.8.55 6bb0d350 in pr and release mode.

The fixture keeps the real files and drops only the lines, other than the database row (better-sqlite3 + LowDB), that show the current count in ASCII, Persian or Arabic-Indic digits. The mirror check now asserts the mirror changed against that input AND carries the new count. Nothing else changes.

* chore(i18n): translate the UI keys the v3.8.55 refresh left as __MISSING__ markers

The v3.8.55 cut (6bb0d350) ran release:refresh-derived without a translation backend, so syncUiKeys left the cycle's new and rewritten UI keys as __MISSING__:<en> in 65 locales (1,782 values). The UI fell back to English, but i18n-vi-completeness and the release-mode ratio gate failed on the base.

Translated with scripts/i18n/translate-new-keys.sh (route codex/gpt-5.6-sol-low, 2 workers). Also: 496 falNative values that were a bare "__MISSING__" (no English, shown literally because the runtime only recognises the __MISSING__: prefix) became markers and were translated; the zh-CN/zh-TW glossary normaliser fixed breadcrumbs.mediaProviders; Filipino leaves still identical to English were retranslated (ratio 4.0% -> 3.0%, baseline 3.3%). Audit: 2,402 changed values, none with model chatter, a placeholder or tag mismatch, or a leftover marker.

* docs(changelog): fragment for the v3.8.55 base-red fix

* docs(changelog): number the base-red fragment after PR #20395

* test(check): strategy-count real-tree test takes the version from the facts snapshot too

After the v3.8.55 bump llm.txt states v3.8.55 while the test fixture says 3.8.54, so planDerivedRewrites also planned a version rewrite of llm.txt and 'llm.txt must not be rewritten' failed for a reason unrelated to strategy counts (Unit Tests 2/8 of #20395, run 43996522143). The test already reads the strategy count from docs/reference/derived-facts.json; it now reads the version from there as well.
2026-11-17 02:30:42 -03:00
diegosouzapw
6bb0d35021 chore(release): bump to v3.8.55 — changelog, docs, version sync
Opens the v3.8.55 cycle at the v3.8.54 freeze (#20389), cut from the frozen
tip e9c9f1dd (parallel-cycle model, /generate-release 0a.0b):

- package.json, open-sse, electron and docs/openapi.yaml at 3.8.55; lockfiles
- CHANGELOG: new "## [3.8.55] — TBD" section, mirrored to the 66 locales
- README.md / llm.txt current-version claims and their 66 mirrors
- release:refresh-derived --profile=release: provider reference, derived
  facts, managed numbers and the 1,782 missing UI keys (marked __MISSING__
  for the release translation wave); --check exits 0
2026-11-16 18:57:51 -03:00
Diego Rodrigues de Sa e Souza
e9c9f1dd84 fix(ci): OpenCode plugin publish jobs detect plugin changes again (#20373)
The bump step runs inside the plugin folder, where git resolved the repo-root pathspec to a folder that does not exist, so every release logged 'no plugin changes'. Compare '-- .' instead, and bump @omniroute/opencode-plugin to 0.2.2 for the changes that predate v3.8.53. Merged by owner decision before the gates finished.
2026-11-16 14:27:25 -03:00
Diego Rodrigues de Sa e Souza
8c60cc2d6e feat(release): refresh-derived verifies the generated files after it writes (#20310)
* feat(release): refresh-derived verifies the generated files after it writes

Agreed between the phase-1 and phase-4/5 owners of the plan 2026-11-13 and approved by the owner on 2026-11-15: release:refresh-derived ends with a verify-generated step that runs check:generated-artifacts (README SVGs, e2e-timings.json) and check:agent-skills-sync (generated SKILL.md) in release mode once the refresh has written. A generated file that still differs from its generator fails the step (exit 2). The step is skipped in --check (nothing reached the disk) and when --only leaves it out (a partial refresh leaves the other artifacts alone). refreshDerived() takes an injectable runNode for the tests.

* docs(changelog): number the refresh fragment after PR #20310
2026-11-16 10:08:35 -03:00
Diego Rodrigues de Sa e Souza
3a50632917 feat(docker): publish releases to the cheaperinference Docker Hub org; Electron updates from cheaper-inference (#20344)
Docker Hub cannot move a repository between namespaces, so diegosouzapw/omniroute keeps its pull history and every image, and each released version is copied from GHCR to cheaperinference/omniroute by the new docker-org-mirror workflow (no rebuild). Without the DOCKERHUB_ORG_* secrets the job stays green with a visible skip warning; a workflow_dispatch of docker-org-mirror.yml republishes a released version later. electron-builder now publishes and auto-updates from cheaper-inference/OmniRoute; older installs keep updating through GitHub's rename redirect.
2026-11-16 10:03:23 -03:00
Diego Rodrigues de Sa e Souza
3a5f120a57 Merge pull request #20334 from cheaper-inference/fix/merge-train4-20261116
chore(release): merge train 4 of 3 PRs for v3.8.54 (2026-11-16)
2026-11-16 08:25:32 -03:00
diegosouzapw
f24848b4ec Merge PR #20274 (docs/readme-claude-mcp-add) into merge train 4 2026-11-16 03:49:04 -03:00
diegosouzapw
4f94f1cd86 Merge PR #20322 (feat/omni-queue-cutover-2a) into merge train 4 2026-11-16 03:48:54 -03:00
diegosouzapw
70ea2f2303 Merge PR #20313 (fix/ui-kit-defects-1115) into merge train 4 2026-11-16 03:48:44 -03:00
diegosouzapw
882cf39c02 docs(design-system): record the rules the UI review guards enforce
- Rule 4 said Tailwind utilities win over the kit. That is not true for
  typography: ci-typography.css is unlayered, so weight, tracking and
  leading classes are dead on headings, table cells and buttons, and
  font-mono is dead on th, td, button, input and textarea.
- New rules 8 to 11 name the guards added in this PR: theme colour
  names, the card class, chart ink, colour alpha, table names, keyboard
  rows and frames, progress semantics, kit overlays, and where the Input
  adapter sends className.
- The adapters list gains InteractiveTableRow and CodePreview.
- "Adding a screen" no longer tells authors to add keys to pt-BR.json and
  vi.json: a feature PR touches en.json only, and a test over a real
  non-English catalog loads it with the runtime English fallback.
2026-11-16 00:24:23 -03:00
diegosouzapw
f222899a8e fix(dashboard): close the custom range panel when the range is cleared from its trigger
The custom range button is the trigger of the picker's kit Popover, and
the "x" that clears an applied range sits inside it. Radix does not
dismiss on a press inside the trigger and the "x" stops the click that
would toggle it, so the panel stayed open on the dates that had just
been cleared and "Apply" brought the range back. The hand-made panel
closed on any press outside it.

The "x" now closes the panel together with the range.

Found by the independent review of #20313.
2026-11-15 23:54:44 -03:00
diegosouzapw
c7738ceae0 fix(dashboard): keep the provider picker matching an upper-case query in a Turkish locale
The "add provider" picker moved to the kit SearchableSelect, which
lowercases the query with the browser locale and does a substring match
on label + keywords. In a Turkish-locale browser "OPENAI" lowercases to
"openaı" (dotless ı), which is not in "openai", so the list came back
empty. The hand-made search it replaced folded both sides.

The option keywords now carry the folded name and its dotless spelling
(searchKeywordsFor in turkishText.ts). A query typed with accents still
does not match: the kit has no filter hook, and the comment says so.

Found by the independent review of #20313.
2026-11-15 23:52:24 -03:00
Diego Rodrigues de Sa e Souza
225bedf8b5 fix(ci): report i18n docs drift as DRIFT in Release-Green (#20312)
The --full-ci observer ran `npm run i18n:check` as a HARD item. Feature
PRs no longer ship docs mirrors (the translation wave refreshes them at
release), so between releases the mirrors are stale by design and the
scheduled Release-Green reopened base-red #19329 with
"docs-sync-strict -> npm run i18n:check: FAIL — drift detected" on every
run since 2026-11-14.

Declare the gate as drift in the static profile, like check:circular-deps.
It still runs the same strict command (drift items do not get the pr gate
mode) and the result stays visible in the drift bucket; it just no longer
opens a base-red. The release cut keeps the strict verdict. The other
i18n gates (UI coverage, ICU, ratio) stay HARD.
2026-11-15 23:02:56 -03:00
diegosouzapw
21757ee751 test(dashboard): follow the update-step icons into UpdateProgressDialog
The amber-warning guard read the update-step <Icon name="warning"> from
HomePageClient.tsx. The update progress is now the kit dialog in
UpdateProgressDialog.tsx and the step icons moved with it, so the guard
found nothing. It reads the new file; both assertions (the warning token,
no bare text-yellow-500) are unchanged.
2026-11-15 21:54:55 -03:00
diegosouzapw
dcebd71065 test(dashboard): load the Chinese catalog with the runtime English fallback
The access-token settings test mounts the real zh-CN catalog with an
onError that throws. The CodePreview adapter now reads new common.* keys
that exist only in en.json until the translation wave runs, so the raw
catalog threw MISSING_MESSAGE and the tab never rendered.

The test now builds its messages the way src/i18n/request.ts does
(deepMergeFallback over the English catalog), as
analytics-token-breakdown.test.tsx already does. A key missing from both
catalogs still throws, and every Chinese string the test asserts is
unchanged.
2026-11-15 21:46:29 -03:00
diegosouzapw
dfff7f79c7 docs(changelog): add the fragment for the dashboard kit conformance defects 2026-11-15 21:19:28 -03:00
diegosouzapw
faa65df154 docs(ci): three omni-queue runbook sentences about withdrawals
docs/ops/OMNI_QUEUE.md:

- "Before a mode change or a stop", step 1: "history records no landed
  event" was too strong for the pause case. After a pause and a resume
  in live mode the next tick finds the candidate at the tip and records
  `landed`; only a base that then runs in shadow records none. The step
  now says both, and says to let the next live tick record a batch that
  is already the tip before pausing or changing the mode.
- Under the shadow table: a shadow tick also stores a withdrawal, when
  GitHub refuses its own withdrawal of a landing-stage batch. Reworded;
  the conclusion stays (every stored withdrawal comes from a batch live
  mode blessed, so a queue that was never live writes none).
- Step 2: a stored withdrawal dropped by the 20-entry limit leaves no
  field behind, so the operator also looks in the history for its error
  event, quoted as the code writes it ("<batchId>: stored withdrawal of
  <landing.statusContext> on <sha12> dropped (20 stored already); its
  newest status may still be success").
- "When the landing does not complete": the creator rule now says the
  rule of the previous commit (a status without a readable creator may
  only add a reason to withdraw, never remove one), and the prose lines
  past 100 columns are rewrapped.
2026-11-15 21:14:59 -03:00
diegosouzapw
e7bfdb0b3e fix(dashboard): drop weight, tracking and leading classes the kit overrides
The kit's ci-typography.css is imported without a layer, so its role
defaults (h1-h6: weight 500, leading 1.1, tracking -0.02em; button and th:
weight 500; td: weight 400) beat every Tailwind utility on those elements,
whatever the specificity. `font-semibold` on an <h3>, a TableCell or a
<button> read as a working style and did nothing.

A TypeScript-AST codemod removed 702 such classes from 266 files, with no
pixel changed: weight, tracking-* and leading-* on native h1-h6; weight and
tracking-* on TableCell, TableHead and SortableTableHead; weight on native
<button> and on the Button adapter. Classes with `!`, sizes, colours,
`uppercase` and `font-mono` stay.

tests/unit/dead-typography-classes.test.ts fails when one of them comes
back on those elements, and its first test fails the day the kit moves
the role defaults into a layer, which is when the guard must be reviewed.
2026-11-15 20:52:15 -03:00
diegosouzapw
7b42e81cb9 fix(ci): an omni-queue land status of unknown origin never hides the App's success
With the previous change, newestAppLandStatus returned the newest
omni-queue/land status among the App's and the unknown-creator ones. A
newer `pending` or `error` whose creator GitHub does not report then
hid the App's own `success`: a stored withdrawal was dropped and a
pause of a landing-stage batch withdrew nothing, where before that
change the `success` was withdrawn.

An unknown-creator status may now only add a reason to withdraw, never
remove one. The status that decides is the App's newest when it is
`success`; else the newest among the App's and the unknown-creator ones
when it is `success`; else nothing is withdrawn (the App's newest, or
the newest unknown one, is returned for the callers' log lines). A
status with a readable creator that is not the App's is still ignored
for both tests. The comments of withdrawAbandoned and retryWithdrawals
say the same.

New tests (tick.test.mjs): the App's `success` under a newer `pending`
or `error` of unknown creator is withdrawn on both paths: a stored
withdrawal (kept with attempts 2 while the write is refused, written on
the next tick) and a pause of a landing-stage batch; the App's
`failure` newer than its `success`, nothing unknown, writes nothing on
both paths. The tests of the previous change (an unknown `success`
alone is withdrawn; another user's status is ignored) stay green. No
test re-aimed.
2026-11-15 20:52:11 -03:00
diegosouzapw
c141c8c998 fix(dashboard): colour chart-toned text with the -ink token
`text-chart-N` paints with the pure chart token, which is picked for bars,
lines and dots and falls under 4.5:1 as text on the light theme. The kit
ships a readable ink for every slot and the bridge exposes it as
`text-chart-N-ink`, but only 16 uses had it against 105 of the pure token.

58 classes in 24 files that colour text (badges, pills, table values, stat
values, links) now use the ink. 47 keep the pure token because they colour
an icon, an icon chip or an SVG stroke, where 3:1 is enough.

tests/unit/chart-ink-for-text.test.ts accepts a bare text-chart-N only on
an icon element, an icon-only wrapper, an `iconColor` prop, an `icon`
property, or in one of five icon-only lookup tables listed with a reason.
2026-11-15 20:52:07 -03:00
diegosouzapw
15b59076d8 fix(dashboard): build translucent colours with color-mix, not a hex alpha suffix
Eight inline styles in seven files glued an 8-bit alpha to a colour string
(`${color}20`, `15`, `40`). The flow palette is `var(--orch-status-…)`, so
the circuit-breaker and cooldown badges of the combo studio produced
`var(--orch-status-error)20`: invalid CSS, and the badges had no
background. The provider icon tiles did the same with the catalog brand
colour, which only works for a 6-digit hex.

All eight now call flowColorAlpha (color-mix in srgb with transparent)
with the percentage the suffix stood for: 15 -> 8%, 20 -> 13%, 40 -> 25%.

tests/unit/color-alpha-concatenation.test.ts covers the helper and fails
on a colour-valued style that glues two hex digits to an interpolation.
2026-11-15 20:52:03 -03:00
diegosouzapw
a1a8e28dbb fix(dashboard): use the Card adapter where the bare card class painted nothing
No stylesheet defines `.card` (the kit classes are `ci-card…`), so the 14
elements written as `<div className="card p-5">` rendered padding only: no
surface, no border, no radius.

The 10 boxes of the search and compression analytics tabs (KPI tile, chart
sections, empty and error states) now render the Card adapter and keep
their padding class. The 4 result tiles of the translator compression
preview already draw their own inset panel (bg-bg-subtle + border), so
they only lose the dead class and look the same.

tests/unit/no-bare-card-class.test.ts fails on a className that carries
the bare `card` token. translator-friendly-compression counted the tiles
through that class and now counts the grid's children.
2026-11-15 20:51:57 -03:00
diegosouzapw
32f960018b fix(dashboard): replace colour classes that generate no CSS
58 class names across 22 files used a colour the theme does not define
(text-text, bg-bg-muted, text-text-secondary, bg-bg-secondary, bg-bg-card,
bg-bg-base, bg-background, bg-surface-muted, text-muted-foreground,
text-danger, bg-bg-main, bg-card-subtle, text-action). Tailwind 4 emits
nothing for them, so progress tracks had no background, muted text kept
the inherited colour and error text was not red.

Each one now uses the bridge name from the @theme inline block of
globals.css (text-text-main, bg-muted, text-text-muted, bg-bg-subtle,
bg-surface, bg-bg, text-error, text-primary).

tests/unit/theme-color-classes.test.ts reads every string literal of
src/app and src/shared and fails on a colour utility whose name is not in
the theme, the default palette or fd-*. No exception list.
2026-11-15 20:51:54 -03:00
diegosouzapw
11b55a96ee fix(dashboard): move hand-positioned popovers and tooltips onto the kit
Four panels opened by local state with `absolute … z-50` and two CSS-hover tooltips
had no portal and no collision handling, so an `overflow: hidden` ancestor clipped
them and they ran off the edge of the screen; two had no Escape or outside-press
handling at all (UI review 2026-11-15, defect 16).

- ClaudeCcDiscoveryInfoButton and SessionPicker: kit Popover.
- CustomRangePicker: kit Popover around its trigger (`open`/`onOpenChange`), instead
  of document mousedown/keydown listeners; UsageAnalytics passes the Custom button.
- ComboDefaultsTab "add provider" combobox: kit SearchableSelect, which covers the
  whole behaviour and adds aria-activedescendant.
- FeatureFlagCard description and CacheTrends bars: the Tooltip adapter, opened by
  keyboard focus as well as hover.

Left as they are, as justified exceptions in the guard: ApiKeyFilterDropdown (the kit
MultiSelectFilter has a different selection model) and HealthAccountTooltip (already
portaled and clamped; a kit HoverCard per capsule made the 200-capsule render about
2.5 times slower).

Guard: tests/unit/hand-positioned-overlays.test.ts.
2026-11-15 20:51:51 -03:00
diegosouzapw
02acdc1adb fix(dashboard): give every progress and quota bar progressbar semantics
41 of the 42 hand-made proportion and quota bars had no role="progressbar", so a
screen reader skipped them (UI review 2026-11-15, defect 13).

- 17 bars that the kit covers natively (8 px, accent or status tone, two-part) are now
  the kit Progress with `tone`/`segments`, a translated accessible name and a spoken
  value. BatchDetailModal reuses ProgressBarBicolor.
- 24 bars the kit cannot draw yet (4/6 px track, series colour, categorical segments)
  keep their drawing and gain role="progressbar", aria-valuemin/max/now and a name.
  QuotaMiniBar, the budget row bar and the home usage bar take the name as a prop.
- Stale workarounds over the kit Progress are removed: the health pool bar and the
  cache meter are no longer hidden behind aria-hidden, the import "fetching" bar is
  the kit indeterminate mode instead of a pulsing fake 60 %, and the indicator is no
  longer recoloured through `[&_.ci-progress__indicator]` classes (kit `tone`).

TeamBudgetCard stays hand-made: it already had the full semantics and drops
aria-valuenow while usage is unpriced, which the kit Progress cannot express.

Guard: tests/unit/progress-bars-have-semantics.test.ts (failed on 42 sites before).
2026-11-15 20:51:49 -03:00
diegosouzapw
db21df242b fix(dashboard): use the kit InfoTooltip and SidebarMenuAction where the exceptions expired
Two `kit-exception:` buttons were kept for gaps the kit has since closed
(0.0.87 and 0.0.106):

- `InfoTooltip` adapter: a native button, justified by "the kit icon
  Button is a 32 px control". The kit has its own `InfoTooltip` (24 px
  target, 16 px icon). The adapter now renders it and keeps `text` and
  `className` for its 33 uses. The trigger is named "More information"
  (translated) and the help text is its description; before, the whole
  help text was both the name and the tooltip, so it was read twice.
- Sidebar pin: a native button over `SidebarMenuButton`, because the kit
  `SidebarMenuAction` used a physical `right`. It uses
  `inset-inline-end` now and reveals itself on row hover or focus
  (`showOnHover`), so the pin is that component and the row's own
  padding and position classes are gone.

The other `kit-exception:` buttons are still valid and are not touched.
2026-11-15 20:51:47 -03:00
diegosouzapw
316834b5ae fix(dashboard): draw the command palette key hints with the kit Kbd
The palette kept four hand-styled `<kbd>` elements (Esc in the search
field, and the navigate / open / close hints in the footer), and
`dashboard-kit-sweep` exempted the file with "moves with the kit Command
palette" — which already happened.

They are the kit `Kbd` now (the two arrows as one `KbdGroup`), and the
exemption is removed, so the sweep covers the palette like every other
file.
2026-11-15 20:51:44 -03:00
diegosouzapw
a6be48f972 fix(dashboard): keep control classes off the Input adapter's wrapper
The `Input` adapter sends `className` to the kit `Field` wrapper and
`inputClassName` to the `<input>`. 36 call sites in 10 files wrote
classes meant for the control in `className`, where they had no effect
or drew a second box:

- `text-sm` and `font-mono` are dropped: the first repeats the kit
  control's 14 px, the second has no effect on an `<input>`.
- `text-xs` moves to `inputClassName`, where it applies.
- `rounded border bg-transparent p-2` is dropped in FalNativeFields
  (5 inputs and 3 selects): it framed the kit control with a second
  border.

Layout classes (`flex-1`, `w-64`, `md:col-span-2`) stay on the wrapper.
A static guard keeps `className` for wrapper layout; the framed
threshold rows in CompressionSettingsTab are its one listed exception.
2026-11-15 20:51:35 -03:00
diegosouzapw
06507b1125 fix(dashboard): pass translated text to kit components that kept English defaults
Kit components draw English text unless the screen passes it. Seven of
them still did, in every locale:

- Toaster: the close button ("Dismiss notification") and the
  screen-reader announcement ("Notification: ...") of every toast.
- SidebarRail: aria-label and native tooltip "Toggle sidebar".
- CodePreview (5 screens): "Copying...", the copy announcement, the copy
  error and the "<language> code" region name. A `CodePreview` adapter
  now fills every label from `common`; the screens import it instead of
  the kit component.
- Alert (3 in api-manager): the dismiss button had no translated name.
- Wizard, through `ModalWizard`: the step list name, the step-link
  prefixes, the completed suffix and Skip.
- LineChart (2) and CalendarHeatmap: `unavailableLabel`.

New keys are in en.json only; existing keys are reused where they exist.
2026-11-15 20:51:32 -03:00
diegosouzapw
c122655263 fix(dashboard): render the home update progress as a kit dialog
The "update in progress" notice on the home page was a hand-made
`fixed inset-0 z-[999]` box: no dialog role, no aria-modal and no focus
trap, so keyboard focus stayed on the page behind it.

It is now `UpdateProgressDialog`, built on the `Modal` adapter (kit
Dialog). It has no close button and ignores outside clicks; Escape does
nothing while the update runs or after it succeeds, and closes a failed
update like the Close button does.
2026-11-15 20:51:28 -03:00
diegosouzapw
275270084a fix(dashboard): translate the scrollbar label of three tables
A kit Table that draws its persistent horizontal scrollbar announces it
with the scrollbarLabel text, and the kit default is the English
"Table". Three tables did not pass one: usage by model and usage by
account (UsageStats) and the banked reset history. They now pass the
translated heading that already sits above each table.

A static guard fails on a kit Table that draws the persistent scrollbar
without scrollbarLabel.

The fourth table the review listed, the OAuth export preview, caps its
height with maxHeight, so the kit does not draw that scrollbar for it.
2026-11-15 20:51:25 -03:00
diegosouzapw
4f74616938 fix(dashboard): single frame for tables the frame guard could not see
The guard that keeps the Card as the only frame around a table saw a
table and a Card in the same JSX tree, or one import apart. Seven double
frames from the UI review escaped it: five in a card made by hand (a
bordered, rounded div or section) and two in a Card two components
above the table.

The guard now treats a card made by hand as a frame and follows the
components rendered below a frame at any depth, in the same file or
imported. On the base it lists ten violations, fixed the way #20181 and
#20213 did, by zeroing the table container border:

- cache page: the 24h trend panel becomes a plain section, like the
  "by provider" section beside it;
- encoder comparison, pricing compare groups, pricing provider
  accordion, webhook deliveries, banked reset history, Cursor model
  usage;
- proxy traffic panel and the skill inspector executions, which the
  review had not listed.

Tables rendered from markdown keep their frame: they are content inside
prose. That is the guard's one recorded exception.

Refs #19620
2026-11-15 20:51:23 -03:00
diegosouzapw
206edb521d fix(dashboard): give every kit table an accessible name
50 of the 74 hand-assembled kit tables had no accessible name. The kit
makes the table container a tab stop while it overflows and names it
only from scrollLabel, a caption or the table's aria-label, so on a
narrow screen a screen reader announced a stop with no name.
scrollbarLabel does not count: it only labels the persistent scrollbar.

43 tables already carried the translated text in scrollbarLabel and now
pass the same text in scrollLabel. The other seven take the heading
that sits above them (usage by model and by account, encoder
comparison, Cursor model usage) or a new English key: the per-provider
models table (providerStats.modelsTable) and the tables rendered from
markdown, which have no title (common.table).

A static guard fails on a kit Table without a name, with no exception
list.
2026-11-15 20:51:21 -03:00
diegosouzapw
ae0b187116 fix(dashboard): make clickable table rows work from the keyboard
Five hand-assembled kit tables opened something on a row click and
nothing on the keyboard: the request logger, the proxy logger, the batch
and batch-file lists and the conversations list. Only the DataTable
adapter handled Enter and Space.

The handling moves out of the adapter into InteractiveTableRow, a thin
adapter over the kit TableRow: the row is a tab stop, Enter and Space
run the same action as a click, and events from a control inside the
row are left to that control. The adapter and the five tables render it.

The provider-stats row keeps its pointer-only click: its disclosure
button is the keyboard path and carries aria-expanded. A static guard
fails on a new <TableRow onClick>.
2026-11-15 20:51:18 -03:00
diegosouzapw
31a02804ae fix(dashboard): stop the breadcrumb trail linking to 404s and translate its segments
The shell draws a breadcrumb on every dashboard page, one crumb per URL segment, and every
crumb but the last was a link. Six route prefixes only group sub-routes and have no page.tsx,
so their crumb answered 404: /dashboard/resilience, /dashboard/system, /dashboard/tools,
/dashboard/gamification, /dashboard/api-manager/<id> and /dashboard/plugins/<name>. And 26
route segments had no label: the trail showed the raw segment, capitalised, in every locale
("Log-export", "Mitm-proxy", "Omni-skills").

A crumb is now a link only when its URL has a page; a page-less prefix is plain text in the
trail. A segment's label comes, in order, from its `breadcrumbs` key, from the sidebar label
of the same route (`sidebar.<i18nKey>`, so /dashboard/log-export reads "Log export" and
follows the reader's locale), or from a sidebar key mapped by segment (the "System" group
title, "MITM Proxy", "1Proxy"). The eight segments no sidebar entry names get new
`breadcrumbs` keys in en.json. A provider id stays as it was.

The rules moved to src/shared/utils/breadcrumbTrail.ts (pure), so
tests/unit/breadcrumb-trail-routes.test.ts can check them against src/app/(dashboard): a
folder that gains or loses its page, or a new route segment without a label, fails there.
tests/unit/ui/adapters/breadcrumbs-trail.test.tsx pins the rendered trail.
dashboard-localization-contract.test.ts reads the label map from its new file.
2026-11-15 20:51:16 -03:00
diegosouzapw
de21f01224 fix(dashboard): give every dashboard route a kit PageHeader
The only title of 30 dashboard routes was the shell one (Header.tsx), which sits in a
`hidden … lg:flex` block: below 1024 px those pages had no heading, on screen or in the
accessibility tree. Three of them also rendered a second <h1> next to the shell title on
desktop (context/combos, costs/teams, providers/chatgpt/connect), and
/dashboard/compression/live had no title at any width.

Each route now opens with the kit PageHeader (compact), carrying the title and description
the shell showed for it, from the same keys (`sidebar.<i18nKey>`, `header.<…Description>`).
The header sits in the page file, or in the route's client component when the layout has a
fixed height, so the content keeps the room it had. The hand-made titles are gone: the
teams header and the conversations SectionHeader became the PageHeader (actions kept), the
Compression Hub card title is an <h2>, the ChatGPT connect page uses the provider name, and
the live compression page gets a title of its own (new `compressionStudio.liveTitle`).

/dashboard/providers and /home get the header from a small component of their own:
providers/page.tsx is frozen in size by a test and home/page.tsx has its data fetch pinned.

Guard: tests/unit/dashboard-page-header-coverage.test.ts walks every dashboard page.tsx that
is not a redirect and requires it to reach a PageHeader through the components it renders;
it also pins `compact`, the single <h1> per page and the shell keys. Two pages stay without
a PageHeader, with the reason recorded there: the onboarding wizard and the 2.5 s
"page moved" notice of system/mitm-proxy.
2026-11-15 20:51:10 -03:00
Kiaro-Sama
5735188066 feat(analytics): separate cached and uncached input totals (#19538)
* feat(analytics): separate cached and uncached input totals

* docs(analytics): document token breakdown functions

* fix(analytics): split token card rendering for complexity gate

* chore: leave translated catalogs, mirrors and generated files to the release refresh

Plan 2026-11-13 (derived values resolved only at release): a feature PR edits only the English
sources (src/i18n/messages/en.json, bin/cli/locales/en.json, the English docs) and the generators'
inputs. The other locale catalogs, the docs/i18n mirrors, .i18n-state.json, PROVIDER_REFERENCE.md,
the generated README SVGs and skills, and config/quality/e2e-timings.json are rewritten once by the
release refresh or a translation wave (config/quality/derived-paths/*.json). This commit restores
those files to the PR's merge base so the PR stops conflicting with every sibling that touched
them; the PR's own changes are untouched. Missing translations fall back to English at runtime
until the release refresh translates them.

---------

Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
2026-11-15 23:42:17 +00:00
diegosouzapw
26169ec897 docs(ci): say what the omni-queue runbook can and cannot promise about withdrawals
docs/ops/OMNI_QUEUE.md:

- The would-land row of the Events table and precondition 9 of the
  cut-over now name both shadow suffixes: "live mode would pause: queue
  refs unprotected (...)" and "<check> could not run (...): live mode
  would fail the tick". The precondition asks that recent would-land
  events carry neither before the mode goes to live.
- "Two cases are only bounded" was wrong for the late-throwing tick:
  the attempts limit only counts ticks that store the landing stage
  again, so while every tick throws before that point (a base that moved
  and a recomposition push that fails each time) the stage stays
  landing, landAttempts is never set, nothing pauses and the status
  stays success. The runbook now says so, that a pause of the base
  withdraws it, and that it is a known limit until the next PR.
- "Before a mode change or a stop", step 1: before pausing, check that
  a batch at stage landing is not already the tip of the base. One that
  did land (push done, state save lost) and meets the pause or a shadow
  tick first gets a failure land status on the base tip and no landed
  event; the runbook says what the operator sees and that nothing needs
  undoing.
- Shadow table: the failure land status is written only as a
  withdrawal, now spelled out under the table: on the commits of a batch
  stored at the landing stage whose newest App status is success or
  cannot be read (withdrawn anyway), and on stored withdrawals.

scripts/merge-queue/tick.mjs: the withdrawAbandoned comment line of
about 120 columns is wrapped, and the note of leaveLandingStage says
"its land status would go" in a dry-run (which withdraws nothing)
instead of "goes".

Test: the dry-run test added in the previous commit ("dry-run in shadow
on a batch stored at the landing stage writes nothing and changes no
state") also asserts the dry-run note wording. No test re-aimed.
2026-11-15 20:26:59 -03:00
diegosouzapw
68fa369d0c fix(ci): withdraw an omni-queue land status of unknown origin
newestAppLandStatus (tick.mjs) skipped an omni-queue/land status whose
creator was missing or null. A `success` of unknown origin was then not
withdrawn by withdrawAbandoned, and retryWithdrawals dropped the stored
entry for it as "nothing of the queue's". The safe direction is the
other one: a withdrawal only ever writes `failure`.

A status without a readable creator (missing, null or empty) now counts
as possibly the App's: when it is the newest among the App's statuses
and the unknown ones and it is `success`, the withdrawal is written,
and a stored entry is kept until that write succeeds. A status with a
readable creator that is not `<appSlug>[bot]` is still ignored.

Runbook: the "When the landing does not complete" paragraphs say how a
status without a readable creator is counted.

New tests (tick.test.mjs): an abandoned landing-stage batch whose only
land status is a `success` with `creator: null` (and with no creator
field) gets `failure` written, a later readable other creator's status
ignored; stored withdrawals of such successes are kept while the write
is refused and written on the next tick, while a readable other
creator's `success` and an unknown `success` under a newer App `failure`
are dropped as before; a dry-run in shadow on a batch stored at the
landing stage writes nothing and leaves the state unchanged (the path
F2 newly reaches; it passed before this change). No test re-aimed.
2026-11-15 20:14:36 -03:00
diegosouzapw
53e6ced762 fix(ci): read the omni-queue candidate chain without a forgeable record separator
firstParentChain (land.mjs) framed the commits of the first-parent chain
with %x1e and skipped any fragment without NULs. A commit message can
hold \x1e, so a planted merge commit with the honest tree, parents and
base trailer, followed by \x1e, a blank line and
"Omni-Queue-Base: <PR head>", passed verifyComposition (trees included)
while candidate-base.mjs, which parses the whole message, resolved the
PR head as the base: the candidate's base-relative gates compared
nothing.

The chain is now read with every field NUL-terminated. A commit message
cannot hold a NUL (git truncates %B at one, so both readers see the same
message), and output that does not split into SHA/parents/message
triples is a composition mismatch instead of being skipped:
"the first-parent chain cannot be read as whole commits" or
"... cannot be read past commit <n>". mergedPrsBetween keeps the commits
read before such a break.

Both readers keep the last Omni-Queue-Base of the trailer block, but a
merge commit with more than one line keyed Omni-Queue-Base, in any
paragraph, is now a mismatch in verifyComposition:
"merge commit <sha12> of #<n> carries <count> Omni-Queue-Base trailers".
The queue never writes two.

Runbook: item 1 of "Before the land status is written" and the
troubleshooting list name the new rule and the new details.

New tests (real git, land.test.mjs): the probe is refused with and
without trees (and resolveCandidateBase is shown to read the PR head
from it); two base trailers in the trailer block, in either order or
the same base twice, and a second one in the body are refused; tampered
chain output (a trailing fragment, a field too many, a record that is
not a commit) is a mismatch; an honest candidate of one PR, a batch of
two and a stacked one still pass. No test re-aimed.
2026-11-15 20:10:14 -03:00
diegosouzapw
432189928e fix(ci): no land-token hint for a rate limit on an omni-queue squash landing
A rate-limit 403 is not an authentication failure (isAuthFailure), but
the place that adds the land-token hint to a failed landing still tested
AUTH_FAILURE_RE alone against the verdict's detail. With actor "owner"
and squash-api, a per-PR merge refused by a 403 rate limit (merge-failed,
detail "#N: 0 PUT ... -> 403: API rate limit exceeded ...") paused with
"check OMNI_QUEUE_LAND_TOKEN" although the token was fine.

That place now uses the same rule as the rest of the tick
(isAuthFailureText): a detail that matches RATE_LIMIT_RE is never an
authentication failure and never gets the hint. The pause itself is
unchanged. The runbook sentence that described the old behaviour now
describes the new one.

New test: squash-api, owner lands, a merge refused with a 403 whose
message is a rate limit (primary and secondary) pauses without the token
hint; the same with a refused credential carries it. No test re-aimed.
2026-11-15 18:36:19 -03:00
diegosouzapw
1745689856 fix(ci): count a failed status read as an omni-queue withdrawal attempt
A stored land-status withdrawal whose status read throws stayed in
landWithdrawals with its attempts unchanged, so the count understated the
retries. A failed read now counts an attempt, exactly as a refused write
does. The entry stays stored and is tried again on the next tick: the
count never drops an entry, the queue never gives up on withdrawing a
blessing.

LandWithdrawal.attempts (contracts.mjs) and the runbook now describe the
field as failed attempts so far (a read that failed or a write that was
refused). The retry log lines say "failed attempts" accordingly.

Re-aimed test: "stored withdrawals are retried on a paused queue; a
refusal counts an attempt, an unreadable status changes nothing" is now
"stored withdrawals are retried on a paused queue; a refusal and an
unreadable status each count an attempt": the unreadable entry is
expected with attempts + 1 instead of untouched.

New test: a stored withdrawal whose land status cannot be read stays
stored, one attempt per tick, nothing written (three ticks, attempts
grows by three, no status written).
2026-11-15 18:33:00 -03:00
diegosouzapw
ffc00a4e11 docs(ci): correct the omni-queue runbook on withdrawals, holds and pauses
Corrections from the whole-branch review, each checked against the code:

- Events, land-rejected: names the release-freeze hold
  ("base-frozen: ...; <batch> waits for the freeze to lift", once per batch),
  which keeps the batch in flight and does not recompose it; the base-moved
  and batch-changed cases say what each recomposes.
- When the landing does not complete: the end-of-tick withdrawal runs in every
  mode, never in a dry-run, for any batch no longer kept at the landing stage;
  the second try in the same tick happens only for a refusal during the
  landing's own revoke; a tick that fails after the landing stage was saved
  has saved that stage, the attempt count and everything before it; the two
  cases that are only bounded are listed (a tick that throws late, and a full
  withdrawal list dropping its oldest entry with an error event).
- squash-api: a failed per-PR merge call, a rate limit included, is caught
  inside landSquashApi and pauses as merge-failed, not retried (and, with
  actor owner, a 403 rate limit there gets the token hint).
- Pause and resume: says what a paused base's ticks still do (stored
  withdrawals, PR snapshot and eligibility, stray ref cleanup, dashboard) and
  that the pause tick withdraws a landing-stage batch's status.

The composition-check sentence (F1) and the cut-over precondition on mode
changes (F2) were corrected in their own commits.
2026-11-15 18:16:04 -03:00
diegosouzapw
4cf7d1c6d7 test(ci): end-to-end negative for the omni-queue queue-refs lock
world.unprotect existed in the queue-world helper and no scenario used it.
Scenario 2d runs on real git, live mode: the queue-refs ruleset stops
enforcing update on omni-queue-state while a batch is green. The candidate is
not blessed, the base does not move, the queue pauses with the
unprotected-refs text and the PR keeps its label. With the rules enforced
again and the queue resumed, the PR is composed again and lands, blessed by
the App.

Tests added (integration/tick-e2e.test.mjs):
- scenario 2d (live): queue refs unprotected, the green batch is not blessed
  and the queue pauses; protected again and resumed, it lands

Tests re-aimed: none.
2026-11-15 18:10:52 -03:00
Diego Rodrigues de Sa e Souza
9c209aff20 Merge pull request #20285 from cheaper-inference/feat/derived-guard-blocking
ci: derived-files guard is blocking; skill inputs count as generator companions
2026-11-15 18:09:13 -03:00
diegosouzapw
a98dba281b fix(ci): keep omni-queue shadow ticks going when a pre-blessing check cannot run
A rules read that throws, or a git error inside the tree recomposition of the
composition check, threw on every tick after the expensive steps. Shadow mode,
which production runs, is newly exposed: both reads are new there.

In shadow mode an error of either check (not a verdict) no longer fails the
tick: the would-land event is recorded with a suffix that names the check and
the error on one line, clipped to 200 characters:
"; composition check could not run (<why>): live mode would fail the tick" or
"; queue refs check could not run (<why>): live mode would fail the tick".
A composition mismatch still pauses in shadow. In live mode nothing changes:
the error propagates and the tick fails closed, nothing blessed.

Tests added (tick.test.mjs):
- shadow: a rules read that throws does not fail the tick: would-land names
  the check and why
- shadow: a git error while recomposing does not fail the tick: would-land
  names the check and why
- live: a git error while recomposing fails the tick: nothing blessed, no
  pause
The live rules-read case is the existing test "a rules read that throws fails
the tick: nothing blessed, no pause" (unchanged).

Tests re-aimed: none.

Runbook: the composition and queue-refs checks and the shadow "Live-mode
locks" bullet give the shadow suffix; a new known limit says a persistent
check error in live fails every tick without a pause or an alert, and how the
operator gets out (pause, fix, resume; removing the label drops the PR from
the batch). The tick.mjs header comment says the same.
2026-11-15 17:58:02 -03:00
diegosouzapw
69ff2d0748 fix(ci): only the App's land statuses decide an omni-queue withdrawal
Both readers of the land status (withdrawAbandoned and retryWithdrawals)
took the newest status of the context whoever created it, while the release
ruleset counts only the App's. After a stranded blessing, a collaborator who
posted pending in omni-queue/land made a pause write nothing and
retryWithdrawals drop the entry, leaving the App's success in force.

Both now read through newestAppLandStatus: only statuses created by
<appSlug>[bot] (the creator github.normalizeStatus carries), the same way
eligibility counts only the App's approval status. The App's newest status
decides: success -> withdraw; anything else, or none -> nothing to withdraw.

The fake GitHub of the tick tests records the creator of the statuses it
writes (the App's bot user for the App's client), and the seeding helpers
diedAfterBlessing and setLand create App statuses unless told otherwise.

Tests added (tick.test.mjs):
- a later status by another user does not hide the App's success: a stored
  withdrawal writes failure, kept until it succeeds (the probe)
- a later status by another user does not hide the App's success from an
  abandoned landing-stage batch
- a success by another user only is not the queue's to withdraw

Test re-aimed:
- "a stored withdrawal for a SHA that is no longer success is dropped
  without a write" is now "a stored withdrawal for a SHA whose newest App
  status is not success is dropped without a write": the superseding pending
  status is the App's (another user's pending is the probe above), and a
  case with a success created only by another user is added.

Runbook: the withdrawal paragraphs say that only the App's statuses count.
2026-11-15 17:44:58 -03:00
diegosouzapw
29b29f1688 fix(ci): withdraw a live blessing in shadow mode too
withdrawAbandoned and retryWithdrawals returned early in shadow. A live tick
that blessed a batch and died, followed by a switch to shadow, left the
candidate with the App's success and no record in the state: the shadow
tick recorded would-land and cleared the batch, and stored landWithdrawals
were never retried.

Both withdrawal paths now run in every mode (never in a dry-run). They only
write failure on a commit whose land status is success, and only live mode
stores a batch at the landing stage or a withdrawal, so a queue that was
never live reads and writes no land status. A shadow tick that finds a batch
stored at the landing stage sends it back to "testing" and withdraws its
status first (leaveLandingInShadow), before it records it as would-land,
drops, recomposes or leaves it on a paused base.

Tests added (tick.test.mjs):
- live -> shadow: a batch a live tick blessed and left at the landing stage
  loses its status on the first shadow tick (the probe)
- live -> shadow on a paused base: a batch left at the landing stage loses
  its status too
- a queue that was never live reads and writes no land status in shadow mode
  (pins the counts)

Test re-aimed:
- "stored withdrawals are never retried in shadow mode nor in a dry-run" is
  now "stored withdrawals are retried in shadow mode too (a queue switched
  from live), never in a dry-run": the shadow half asserts the failure write,
  one status read and the entry gone; the dry-run half is unchanged.

Runbook: a new "Before a mode change or a stop" procedure (pause, check no
batch at stage landing and an empty landWithdrawals, then change), cited by
the kill switch, the rollback and the cut-over preconditions; the shadow
claims about land statuses are corrected.
2026-11-15 17:32:26 -03:00
diegosouzapw
1df1dcc946 fix(ci): pin the Omni-Queue-Base trailer in the omni-queue composition check
verifyComposition checked the PR and head trailers, the parents and the
trees, but not Omni-Queue-Base. The candidate's CI takes its base from that
trailer (candidate-base.mjs), constrained only to be an ancestor: a one-PR
candidate with the honest tree and parents and a base trailer naming the PR
head passed, and CI then compared <PR head>..<candidate>, seeing nothing.

Every merge commit of the candidate's first-parent chain must now carry
Omni-Queue-Base equal to the expected base SHA. A missing or different value
is a mismatch with its own detail, and pauses like the other composition
mismatches.

Tests added (integration/land.test.mjs):
- verifyComposition refuses a candidate whose Omni-Queue-Base trailer is not
  the expected base (the probe, with and without trees; a missing trailer;
  the honest candidate still passes)
- verifyComposition checks the base trailer on every commit of a longer chain

Runbook: the composition check lists the base trailer, says what it does not
compare (subject, the other trailers, author and committer), and the
incident entry names the new mismatch.
2026-11-15 17:21:48 -03:00
diegosouzapw
01736be09e docs(ci): stop the omni-queue runbook from overstating four checks
Task 7 re-review, fix round 2 (docs and one test comment, no behaviour change):

- "Landing paused: the landing was refused": the landing ended with the
  verdict (not-descendant is a local check before any push, not GitHub's
  answer); auth-failed has the same detail format and points to the
  authentication case under Who lands.
- Shadow mode: only the composition and queue-refs checks run in shadow; the
  base-tip and land-token checks are live only.
- Base moved: squash-api refuses any move, forward ones included; merge-ff
  refuses a move anywhere other than towards the candidate. "Nothing is lost"
  is tied to the refused landing, before the merge-ff exception.
- Red candidates items 2 and 5: "one retry" becomes "up to infraRetries
  retries, then an infra pause on the failure after the last one". The
  infra-paused row points to hang-suspected when every run only hit a job time
  limit.
- runbook.test.mjs: the probe comment says it assumes every accepted key is
  also validated, instead of naming a rule that is written nowhere.
2026-11-15 15:42:28 -03:00
diegosouzapw
51081253db docs(ci): tighten the omni-queue runbook wording after review
Task 7 review, fix round 1 (docs and one test comment, no behaviour change):

- Events table, error row: names the landing that was refused, the stored
  withdrawal dropped from a full list and the candidate gone from origin. A new
  Incidents entry, "Landing paused: the landing was refused" (landing <batch>
  failed (<reason>): rejected, not-descendant, merge-failed), makes "each pause
  detail has an entry in Incidents" true.
- Base moved: the push refuses a base that moved anywhere other than towards
  the candidate; with merge-ff a tip between the stored base and the candidate
  still lands the exact tested tree, with no land-rejected.
- Configuration keys: landing.identity is the exception to "a key without a
  default is required".
- Infra retries: "a second failure" holds only for infraRetries 1; the pause
  comes after the last of infraRetries retries (the first failure with 0),
  refs -r1, -r2, ... (Red candidates item 1, the infra-retry and infra-paused
  rows, the Infra failure incident).
- A failed tick saves nothing but an error event.
- Shadow mode: the would-land "live mode would pause: queue refs unprotected"
  suffix and the composition-mismatch pause, linked to the locks section.
- Ruleset examples name <owner>/<rehearsal-repo> instead of the sandbox.
- runbook.test.mjs: the config-key probe relies on every accepted key being
  validated; a key that only sits in an allowlist would be missed.
2026-11-15 15:19:35 -03:00
diegosouzapw
34b8fd3381 docs(ci): omni-queue runbook for the live-mode locks, with event and config tables
docs/ops/OMNI_QUEUE.md catches up with Tasks 1 to 6 of the cut-over part 2:

- New "## Events" table (every EVENT_TYPES entry: when it happens, what the
  operator does) and "## Configuration keys" table (every key validateConfig
  reads, nested ones dotted: type, default, effect). infra-retry,
  pr-skipped-conflict and batch.minSize were named nowhere before.
- New "Before the land status is written": the composition check with the
  tree recomposition, the queue-refs protection read and the live base-tip
  check, with the pause texts as tick.mjs writes them.
- Known limits: "the composition check does not verify trees" and "the queue
  does not check that the queue-refs ruleset exists" are replaced by what is
  still true (bypass actors are not read; the recomposition depends on the
  runner's git, measured in shadow mode).
- Who lands / State: a held batch goes back to testing and its status is
  withdrawn; refused withdrawals are stored in landWithdrawals and retried;
  inFlight.landAttempts and LANDING_ATTEMPTS_LIMIT; a rate-limit 403 is not an
  authentication failure.
- Incidents: base moved before the blessing, base not found, queue refs not
  protected, three landing attempts without a verdict, tree mismatch possibly
  caused by the runner's git.
- App install and cut-over: OMNI_QUEUE_APP_CLIENT_ID replaces OMNI_QUEUE_APP_ID
  as the environment secret; the numeric id only feeds apply-ruleset.mjs
  --app-id. One App per repository that holds its key, stated as a rule, and
  "the key exists in this environment only" added to the preconditions of
  mode: live.
- Rollback: the older code carries landWithdrawals without acting on it; what
  to check before rolling forward again.

tests/unit/merge-queue/runbook.test.mjs fails when either table misses or
invents an entry. Event types come from EVENT_TYPES; config keys are recorded
by running validateConfig on a Proxy that logs every property it reads, so
optional keys (landing.actor) are found without a list typed in the test.

Carried from the Task 6 re-review (comments and one test, no behaviour change):
- tick.mjs header: a missing base pauses the queue.
- land.mjs landMergeFf: a tip between the stored base and the candidate is
  reached by the live tick only in the race after its own tip read.
- tick.test.mjs: live, the base branch does not exist: paused error with the
  "not found: not blessed, not landed" detail, no commit status, no landing.
2026-11-15 14:51:11 -03:00
diegosouzapw
3ccfeff707 fix(ci): bless a batch only when the stored base is the real base tip
Task 6 review finding: a planted BASE passed the tree lock. verifyComposition walks
the first-parent chain back to the stored baseSha, which comes from the state branch.
A record naming a commit E that is not the base tip (carrying a payload), with a
candidate that honestly merges approved, current PR heads onto E, recomposes
correctly, so live merge-ff wrote omni-queue/land = success on the candidate before
landMergeFf refused with base-moved; in that window the blessed candidate could be
pushed by hand as a fast-forward carrying E.

In live mode landOrWouldLand now reads the base tip once at the top (the value the
"already the tip" shortcut already used, now read for squash-api too) and, after the
queue-refs protection check and before the landing-attempts limit and markLanding,
requires it to equal f.baseSha. Otherwise nothing is blessed and the batch takes the
existing base-moved path (land-rejected "base moved: base <b> is at <tip>, expected
<baseSha>; recomposing" and the recompose), now shared through Tick.baseMoved with
the landing's own base-moved result. A base that no longer exists pauses (reason
error, "base <b> not found: not blessed, not landed"), as the landing's "rejected"
did before, instead of a recompose that cannot fetch it. A batch already at the
landing stage is not blessed again; withdrawAbandoned turns the previous tick's
success into failure. Shadow and dry-run behaviour unchanged (dry-run now plans the
recompose). No new event type or config key.

Test fake: world.baseMovesOnLand moves the base inside the fake landings (somebody
merged between the tip read and the push), so tests of the bless-then-refused path
still reach it.

Re-aimed tests (they moved the base before the tick to make the fake landing answer
base-moved after the blessing; that base is now refused before the blessing, so they
move it during the landing instead, assertions unchanged):
- "base moved before landing: push refused → ..." renamed "base moved during the
  landing: push refused → the same PRs are recomposed on the new tip": before,
  h.gh.branches.set(BASE, MANUAL) before the tick; now h.world.baseMovesOnLand =
  MANUAL. Still asserts one landing attempt on BASE0, land-rejected, recomposed on
  MANUAL.
- "landing that does not complete turns the land status into failure": before,
  base set before the tick; now baseMovesOnLand. Still asserts success then failure
  (base-moved) on the candidate and the recompose.
- "a withdrawal refused twice in one tick is stored and retried by the next tick":
  same change; same assertions.
- "at most 20 stored withdrawals, one per SHA: ...": same change; same assertions.

New tests: live merge-ff and squash-api with a stored base that is not the tip (no
createCommitStatus at all, no landing, exact land-rejected detail, recomposed on the
tip); a batch stored at the landing stage whose base moved (not blessed again, the
previous success withdrawn as "batch abandoned"); shadow with a moved base (pinned:
would-land on the stored base, no land-rejected); live dry-run plans the recompose;
end-to-end scenario 5c with the real modules and git (batch composed on E, base
rewound off E: never blessed, recomposed on the tip without E). The case "base tip
equals the stored base blesses and lands" stays covered by "live merge-ff: the
candidate gets the land status from the App before the owner pushes".
2026-11-15 13:51:26 -03:00
diegosouzapw
1374b95fed feat(ci): bless only with the queue refs protected and the candidate tree recomposed
The final review of cut-over part 1 parked one residual risk as the main condition
for live mode: verifyComposition checks the shape of a candidate (first-parent chain,
trailers, second parents) but never the tree of its merge commits. Someone with write
access who is not the queue could plant an in-flight record plus a candidate whose
merge commit names a queued, approved PR with the right parents and trailers and
carries any tree, and the queue would bless and land it. The only barrier was the
queue-refs ruleset, which nothing in the tick checked.

Two independent locks, both evaluated before anything is blessed:

- verifyComposition({ trees: true }) recomposes every merge commit of the chain with
  compose.mergeTree(parents[0], parents[1]), the exact call the composer makes, and
  refuses a commit whose tree differs, or whose parents conflict or share no history
  ("merge commit <sha12> of #<n>: tree <t12>, recomposing gives <r12|conflict>"). The
  tick asks for it in live and in shadow; a failure takes the existing composition
  mismatch pause (reason "error"). mergeTree and haveCommonAncestor are now exported.
- refs-guard.mjs (new) reads the ACTIVE rules of omni-queue-state and of the batch's
  candidate ref through the new github.getBranchRules (GET /rules/branches/<branch>,
  every page, read-only) and lists every creation/update/deletion rule GitHub does not
  enforce. In landOrWouldLand it runs right after the composition check and before the
  landing-attempts limit, at most once per tick, never stored. Live: an unprotected ref
  pauses ("queue refs are not protected (...): not blessed, not landed; apply
  apply-ruleset.mjs --kind queue-refs, then resume"), whatever the attempt count.
  Shadow: never pauses; the would-land detail gets "; live mode would pause: queue refs
  unprotected (...)". Dry-run: reads (GET) and plans. A read error fails the tick (no
  pause, nothing blessed). Bypass actors are not checked (the App token cannot read
  them). The manual bless is unchanged; no new event type or config key.

Fakes default to "protected": the tick fake GitHub (getBranchRules, branchRules map,
gh.unprotect / h.unprotect) and the HTTP fake (GET /rules/branches/<branch>,
fake.branchRules, fake.unprotect, exposed as world.unprotect) answer the queue-refs
rules for omni-queue-state and any omni-queue/ name. The fake verifyComposition
records `trees`.

Re-aimed test (no assertion dropped):
- "a stored batch is checked against its candidate before the would-land and the
  bless": before, the recorded verifyComposition call was {expectedBaseSha,
  candidateSha, prs, treeSha} in shadow and the squash-api call carried the stored
  tree; now the shadow call must also carry trees: true and the squash-api call must
  carry [stored tree, trees: true]. Why: the fake now records the new argument, and
  the test pins that the tick asks for the tree check in shadow and in live.

New tests: refs-guard.test.mjs (4), github getBranchRules (1), real-git
verifyComposition with trees (3: composed batch with a stacked PR and a real
same-file merge, from a fresh scratch repository too; planted tree on the last and on
a middle merge commit; conflicting and unrelated parents), tick (8: live merge-ff and
squash-api pause on a missing update rule; an unprotected candidate ref beats the
attempts limit; shadow note; read error fails the tick; dry-run; a tree mismatch
pauses before the rules read in live and shadow).
2026-11-15 13:33:53 -03:00
diegosouzapw
ebffb9c4dc docs(changelog): number the guard fragment after PR #20285 2026-11-15 13:26:13 -03:00
diegosouzapw
e2858a8418 ci: derived-files guard is blocking; skill inputs count as generator companions
Owner decision 2026-11-15. The section-8 pass and the derived-families pass restored the translated catalogs, docs/i18n mirrors and generated files 67 open PRs carried; 6 known cases remain (an active session's PR, two forks without maintainer edits, two PRs deferred to v3.8.55, and a skills fix). check:pr-derived-paths now runs without --warn in PR Test Policy.

The generated family gains three companions: src/shared/constants/agentSkills.ts, skills/** and docs/openapi.yaml. A skills PR that changes the generator, its catalog or OpenAPI input and regenerates SKILL.md files its own test reads (#19635) is single-family and allowed; a route PR that also regenerates the skill references still fails. QUALITY_GATES.md lists derived-facts.json in the family table and the new companions.
2026-11-15 13:23:03 -03:00
diegosouzapw
53a290900b Merge remote-tracking branch 'origin/release/v3.8.54' into feat/omni-queue-cutover-2a 2026-11-15 13:13:08 -03:00
Diego Rodrigues de Sa e Souza
23b8c4209e fix(usage): preserve streaming usage provenance (#20271)
Cherry-pick of #20054 by KiaroSama onto release/v3.8.54. Reported,
estimated and unknown token evidence now survive streaming, accounting,
exports and dashboards; unknown cache usage is no longer shown as a
reported zero.

Changes from the original branch:
- Derived values (counts in README/AGENTS.md/llm.txt and their mirrors,
  stryker.conf.json) are left to the release refresh.
- The two migrations use the timestamp naming introduced by #20169:
  20261115112344_truthful_usage_evidence and
  20261115112345_daily_usage_evidence, SQL unchanged. Builds of the PR
  ran them as 238/239 and then 239/240; four compatibility entries move
  those ledger rows, and the upgrade test covers both lineages plus the
  release base.
- The chunked impact-map reader is dropped: the base already reads the
  map line by line with readTestImpactMap().

Co-authored-by: KiaroSama <106400900+KiaroSama@users.noreply.github.com>
2026-11-15 12:52:52 -03:00
Diego Rodrigues de Sa e Souza
99cd4883a6 Merge pull request #20277 from cheaper-inference/feat/omni-queue-cutover
feat(ci): omni-queue cut-over part 1 (status door, owner landing, bless, base check, hang handling)
2026-11-15 12:44:13 -03:00
diegosouzapw
09598c4bd7 fix(ci): withdraw the land status of a held batch and retry failed withdrawals
A batch stored at the landing stage (blessed, or about to be) that the
queue holds instead of landing kept its omni-queue/land success for as
long as the hold lasted: withdrawAbandoned skips a batch still at the
landing stage. A release-freeze (holdFrozen) or checks back to pending
now move the batch to stage "testing" without landAttempts
(leaveLandingStage, the manual pause's existing rule), so the same tick's
withdrawAbandoned turns success into failure, later held ticks read
nothing, and markLanding + blessForLanding bless it again (attempt 1)
only right before it lands.

A failure write GitHub refused was only an error event: later ticks
forgot the stray success. withdrawLandStatus now keeps each refused SHA
in the optional state field landWithdrawals (sha, batchId, candidateSha,
why, since, attempts; at most 20, one per SHA, the oldest dropped with an
error event), and retryWithdrawals, right after maybeAutoResume (paused
or not; never in shadow or dry-run), re-reads the newest land status and
writes failure again where it is success. An entry goes when that write
succeeds or the status is no longer success; a refusal counts an
attempt; a failed read leaves it as it is. markLanding (in the save that
precedes the blessing) and a manual bless drop the entry of a commit
blessed on purpose. validateState accepts the field as optional and
refuses a malformed one. No new event type, no new config key.

Re-aimed tests:
- "release-freeze opened during CI: the green batch is held, then lands
  after the freeze": before, one batch never blessed, held then landed.
  Now the same body runs twice; the second run (named "a batch at the
  landing stage held by a release-freeze: its land status turns failure;
  blessed again when the freeze lifts and it lands") stores the batch at
  the landing stage with success first. Every original assertion stays in
  both runs; both now also assert stage "testing" without landAttempts
  while held, and the exact status writes: none while held for the
  never-blessed batch, one withdrawal for the blessed one, then the
  blessing right before the landing.

New tests: checks back to pending (withdrawn, re-blessed as attempt 1),
held for several ticks (one land-status read), a withdrawal refused twice
in one tick (stored, then retried), a stored withdrawal no longer success
(dropped without a write), a state without landWithdrawals, retries on a
paused queue (refusal counts, unreadable status untouched), none in
shadow or dry-run, the 20-entry bound, a head blessed by the current
batch never un-blessed, a manual bless dropping its entry, and
validateState cases in state.test.mjs.
2026-11-15 12:38:55 -03:00
diegosouzapw
ab818cff27 fix(ci): bound a landing error that repeats on every tick
A landing that throws without an auth failure withdraws the blessing and
rethrows, but the stored in-flight batch stayed at stage "landing", and
markLanding returned at once for such a batch. Every later tick blessed,
landed and threw again, forever: a success/failure land status pair per
commit and one error event per tick, with nobody told the queue was stuck.

- markLanding counts each attempt in inFlight.landAttempts and saves it
  before the blessing (1 on the first transition, +1 when the batch is
  already at "landing"; a document of the older code without the field
  counts as 1). A lost save throws before anything is blessed.
- landOrWouldLand, after the composition check and before markLanding:
  a batch at "landing" with landAttempts >= LANDING_ATTEMPTS_LIMIT (3) is
  not blessed or landed again; the queue pauses (pauseLanding, reason
  "error") naming the count and the last recorded error. withdrawAbandoned
  still withdraws any success left behind.
- landAttempts is dropped whenever the stage leaves "landing": the manual
  pause that downgrades the stage and the infraPath retry copy. The base
  check and new batch objects are built fresh and never carried it.
- validateState accepts inFlight.landAttempts only as a non-negative
  integer when present.
- isAuthFailure no longer treats a 403 whose message names a rate limit
  as a credential failure: it is retried like any error without a
  verdict, within the new bound. A 401, and any other 403, still pause.

No new event type, no new config key. No existing test was re-aimed:
every existing assertion holds unchanged.
2026-11-15 12:12:44 -03:00
diegosouzapw
902e644c44 test(ci): end-to-end scenarios for the base check and the hang path on the real modules
Scenarios 11 to 14 of tick-e2e run the real tick, classify, checks, compose,
land and bisect against the fake GitHub without seeding a green base, so a red
batch on a tip with no verdict goes through the base check first:

- 11: red batch on a tip pushed from outside; the bare base is green, then the
  bisection isolates the culprit and the other two land.
- 12: the bare base fails the same job; base-red pause matched by check name
  only, labels kept, and the pause lifts when a repair moves the tip.
- 13: a job cancelled at its time limit on both runs: infra-retry,
  hang-suspected, base check, hang bisection without a retry per segment;
  the culprit comment names the job.
- 14: the base check never gets a CI run; after its retry the verdict is
  stored as timeout and the parked batch is bisected as PR-red.

queue-world gains brokenBases, hangs, failingJob and hangJob, reportChecks
options failureOutput, annotations and extraRuns, and a ciInFlight that knows
a base check from a batch. Failures in the new scenarios have the shape GitHub
Actions gives them here: the test job with only the exit-code annotation, a
hang as a cancelled job with the maximum execution time annotation, and
"Gate / CI" failing with them. Scenarios 1 to 10 keep the previous shape.
2026-11-15 11:54:29 -03:00
diegosouzapw
420ab751b6 chore: leave translated catalogs, mirrors and generated files to the release refresh
Plan 2026-11-13 (derived values resolved only at release): a feature PR edits only the English
sources (src/i18n/messages/en.json, bin/cli/locales/en.json, the English docs) and the generators'
inputs. The other locale catalogs, the docs/i18n mirrors, .i18n-state.json, PROVIDER_REFERENCE.md,
the generated README SVGs and skills, and config/quality/e2e-timings.json are rewritten once by the
release refresh or a translation wave (config/quality/derived-paths/*.json). This commit restores
those files to the PR's merge base so the PR stops conflicting with every sibling that touched
them; the PR's own changes are untouched. Missing translations fall back to English at runtime
until the release refresh translates them.
2026-11-15 11:46:43 -03:00
diegosouzapw
a5afb850ff test(ci): drive the tick tests with the real red classifier
createFakeModules() carried its own copies of classifyRed and
extractSignatures. They matched a key present on one side only, kept the
shard suffix in the check name, counted only startup_failure as
infrastructure and had no aggregate-gate step, so a tick test could take
a route through the state machine that production never takes. The
fake classify module is now the real classifyRed, extractSignatures,
hangSignatures and normalizeCheckName from scripts/merge-queue/classify.mjs
(pure, no I/O). Nothing under scripts/ changes.

The failure annotation runCi reports on a red composition now has the
shape the real extractSignatures reads (path = test file, title = test
name, an assertion message), exported as FAILURE / FAILURE_KEY.

New test, through the tick:
- "a key on one side only never matches; both empty match by check
  name": a red base verdict with a key against a keyless candidate, a
  keyless base against a keyed candidate, and keyless on both sides but
  another check are each pr-red (PR dequeued, no pause, no new base
  check); keyless on both sides with the same check name is a base-red
  pause whose detail says the match was by check name only. Fails with
  the old fake (base-red pause, detail "fake:base-red").

Re-aimed tests:
- "base-red: a red batch with a base-red issue open runs a base-check,
  then pauses": before, the parked signature key was the raw annotation
  title "tests/unit/widget.test.ts"; now it is the real key of the
  realistic annotation, FAILURE_KEY ("<path> <title>", lower-cased).
  The rest of the scenario is unchanged.
- "the fake classifier never redoes a base check that timed out (same
  precedence as the real one)" is now "the harness classifies with the
  real module: a base check that timed out is never redone": before, it
  pinned the fake's precedence to the real one; there is no fake left,
  so it now asserts that each of the four classify functions of the
  harness is the real one, and keeps every earlier assertion (no base
  check started, the PR is the culprit, logged pr-red).

Cleanup: the per-test swaps to the real classify module (hangHarness and
four tests) are gone, since the harness already uses it.

Queue suite: 636 -> 637 tests, all passing.
2026-11-15 11:32:36 -03:00
diegosouzapw
ca1b895327 fix(ci): mint the omni-queue App token with client-id
actions/create-github-app-token deprecates its app-id input. Both jobs
of omni-queue.yml (approval and tick) now pass
client-id: ${{ secrets.OMNI_QUEUE_APP_CLIENT_ID }} (the App's Client ID)
instead of app-id: ${{ secrets.OMNI_QUEUE_APP_ID }}. Nothing else in the
two steps changes. The numeric App id stays an operator-side value of
apply-ruleset.mjs and is no longer a workflow secret.

Tests (workflows.test.mjs):
- re-aimed: "least privilege: no default token scopes, App token scoped
  per job" now asserts the client-id input instead of app-id, and its
  pinned secret set swaps OMNI_QUEUE_APP_ID for OMNI_QUEUE_APP_CLIENT_ID.
- new: "omni-queue.yml: both jobs mint the token with client-id from
  OMNI_QUEUE_APP_CLIENT_ID, never app-id".

The owner must create OMNI_QUEUE_APP_CLIENT_ID in the omni-queue
environment before this lands.
2026-11-15 11:19:45 -03:00
Diego Rodrigues de Sa e Souza
f79a54a491 test(check): isolate the docs-counts infra verdict test from the tree (#20273)
The release-mode infra tests ran the counts gate against the working
tree. A real STRICT drift wins over the infrastructure verdict (exit 1
before exit 2), and since derived values are refreshed only at release,
any feature branch that adds a migration or a provider carries such a
drift by design. On #20271 (two new migrations) both tests failed with
"expected exit 2 (infrastructure), got 1".

Run the gate against an empty temp root, so the only failure left is the
stubbed facts probe. The assertions are unchanged.
2026-11-15 10:45:56 -03:00
Diego Rodrigues de Sa e Souza
36a4ae0d55 fix(api): skip a Chaos Mode provider that has no model instead of sending its id as the model (#20254)
resolveModelId fell back to the provider id when a participant had neither
an override modelId nor a connection default model. A provider id is not a
model name, so every such participant failed upstream with API 400
(cheaper-inference/OmniCopilot#16: thirteen providers, thirteen 400s).

- A participant with no model is not dispatched. It comes back as an error
  that says where to set one. The other participants run as before, in
  parallel and collaborative modes.
- When no participant has a model, the run fails before any upstream
  request.
- docs/guides/CHAOS-MODE.md says that each provider needs a model.
2026-11-15 09:50:38 -03:00
Diego Rodrigues de Sa e Souza
4963fd2c63 fix(mcp): keep Vitest runs out of the developer's ~/.omniroute database (#20252)
* fix(mcp): keep Vitest runs out of the developer's ~/.omniroute database

The node:test runner isolates DATA_DIR through tests/_setup/isolateDataDir.ts,
but Vitest never loaded an equivalent. The MCP audit resolves its own
database path (DATA_DIR, else ~/.omniroute/storage.sqlite) and writes there
whenever that file exists, so every `npm run test:vitest` without DATA_DIR
appended omniroute_test_combo rows from advancedTools.test.ts to the
developer's real database. One install had 202 such rows, all with the
fixture's input hash.

Two guards:
- both Vitest configs set a throwaway DATA_DIR (and OMNIROUTE_PLUGINS_DIR)
  for every worker through test.env, and a global setup removes it at the
  end; a DATA_DIR chosen by the caller wins and is never removed;
- in a test context with no DATA_DIR, the audit refuses the home database,
  the same rule src/lib/dataPaths.ts applies to the main database (#10428),
  with the same OMNIROUTE_ALLOW_DEFAULT_DATA_DIR=1 opt-in.

The new test failed before the fix (no DATA_DIR in Vitest; the audit opened
the home database). End to end, a run of the MCP audit suites with HOME
pointing at a fake install wrote 1 row into its storage.sqlite before the
fix and 0 after.

* docs(changelog): add the fragment for the Vitest DATA_DIR isolation
2026-11-15 09:49:05 -03:00
Diego Rodrigues de Sa e Souza
df68e43042 fix(scripts): restore derived files byte for byte in the strip pass (#20267)
* fix(scripts): restore derived files byte for byte in the strip pass

The strip pass read merge-base and head contents through a helper that
trims its output, so every restored file lost its final newline. The
"restored" blob still differed from the merge base and the PR kept
conflicting on it (stryker.conf.json in the first batch).

Read blobs with a dedicated readBlob() that keeps the exact bytes, and
add a regression test that builds the restore commit from a real git
repository and compares blob ids with the merge base.

* fix(scripts): restore a claim with the base's own text in the strip pass

restoreClaims wrote the parsed base value back as an ASCII number. A
translated mirror that writes the count in native digits (Persian
README: "۲۳۳ مهاجرت") got "233" instead, so the line still differed from
the merge base and the PR kept conflicting on that mirror.

Use the base's exact substring for the claim span. Regression test with
a Persian-digit claim fails on the old code and passes now.
2026-11-15 09:39:55 -03:00
Diego Rodrigues de Sa e Souza
9e66706dd3 fix(sse): alias over-length tool names for OpenAI-format providers with a 64-character limit (#20258)
OpenAI Chat Completions rejects function names over 64 characters
(letters, digits, underscores and dashes), and Azure OpenAI uses the same
schema. MCP tool names from VS Code and Claude Code often exceed it, so
requests failed with a 400 (cheaper-inference/OmniCopilot#27).

- openai declares toolNameMaxLength: 64 in the registry.
- azure-openai and azure-ai have no registry entry; resolveToolNameMaxLength
  gets a built-in 64 for them as a last fallback. A connection
  providerSpecificData.toolNameMaxLength still applies and can lower it.
- Registry still wins over the connection value, as before.
- Two existing tests used openai as the "provider without a limit"
  control; they now use groq (default executor, no limit). Assertions are
  unchanged.

Not covered:
- github: it is GitHub Copilot, whose executor never calls the alias, and
  GitHub Models has no provider entry in this repo.
- Responses-format bodies (openai models routed to /responses, Azure with
  apiType "responses"): normalizeOpenAIToolNames only reads
  tools[].function, so flat tools[].name is not aliased.
2026-11-15 09:33:06 -03:00
diegosouzapw
9e34897317 docs(readme): fix the Claude Code MCP setup command
README.md taught `claude mcp add-server omniroute --type http --url ...`,
which Claude Code does not accept: there is no `add-server` subcommand and
the transport flag is `--transport`. Even with the right syntax the call
would fail, because the HTTP transport is off by default (`mcpTransport`
defaults to stdio) and `/api/mcp/stream` requires a key with the `manage`
or `mcp:connect` scope (`requireManagementAuth(..., { acceptMcpConnectScope })`).

Replace it with the two commands that work: enable the streamable-http
transport, then add the server with `--transport http` and the bearer key.
The same code line is fixed mechanically in the 66 translated README
mirrors; the translated comment above it is left untouched.

Reported in discussion #20128.
2026-11-15 09:33:01 -03:00
diegosouzapw
2b048650d9 fix(ci): omni-queue refs ruleset covers candidate refs at every depth 2026-11-15 08:39:13 -03:00
Diego Rodrigues de Sa e Souza
74afbcbff4 Merge pull request #20264 from cheaper-inference/fix/release-v3.8.54-e2e-combos-expert
fix(dashboard): resolve manual combo models against every configured provider
2026-11-15 08:14:01 -03:00
diegosouzapw
caf59a1d75 docs(ci): omni-queue runbook states the limits of the land-status withdrawal and of the composition check 2026-11-15 08:10:20 -03:00
diegosouzapw
eee9bd155f docs(ci): omni-queue runbook follows the final review fixes
- queue-refs ruleset applied before OMNI_QUEUE_ENABLED is set; the cut-over
  only confirms it, and the configuration the design assumes is listed once
- cut-over steps 8, 9 and 11 bless the pull request head before merging it
- land token needs Workflows: read and write next to Contents and Pull requests
- release rollover order: door, then default branch, then replace the
  environment rule; a default-branch-only policy still serves pull requests
  into other managed bases (rehearsed in the sandbox)
- the production App key is generated for production only, other keys are
  revoked, and a rehearsal repository has its own App
- bless: both actors must be approvers, dispatch through the CLI, what the
  commit check proves; base-red fixes land by bless under the door
- withdrawal of the land status, the composition-mismatch pause, the land
  status is not per base, and what a code rollback needs
2026-11-15 07:54:38 -03:00
diegosouzapw
bf0f18028e fix(ci): omni-queue ruleset template flags must be false, and the blocker hint follows the runbook
The status rule validator accepted do_not_enforce_on_create: true and refused
a strict policy only when it was exactly true, so a non-boolean passed. Both
flags must now be exactly false. Tests cover the three refusals no test
exercised: a status rule without parameters, an unexpected parameter, and a
template that pins an integration_id itself. The hint printed when another
ruleset would reject the landing push now says what the runbook says: remove
those rulesets, the status door replaces them.
2026-11-15 07:48:37 -03:00
diegosouzapw
b39e63862d fix(ci): omni-queue git processes never receive the queue's two tokens
createGit spread process.env into every git child, so OMNI_QUEUE_TOKEN and
OMNI_QUEUE_LAND_TOKEN reached every git process, although credentials travel
through GIT_CONFIG_* already. Both are now removed from the base environment
and from any per-call environment.
2026-11-15 07:46:01 -03:00
diegosouzapw
1f458906d1 fix(ci): omni-queue land status context stays inside omni-queue/ and off the approval contexts
The candidate verdict ignores statuses by the omni-queue/ prefix: a land
status outside it would let a withdrawn (failure) status turn a candidate
red, and one equal to an approval context would make a label approval a
blessing. config.mjs now refuses both; the Zod mirror and the differential
table carry the same rule.
2026-11-15 07:44:06 -03:00
diegosouzapw
2c29e1ba1a fix(ci): omni-queue shadow bisection records a would-land segment as a green base
A shadow bisection composes the next segment on the would-land commit, but
that commit was never recorded green, so a red segment stacked on it paid a
full base check of a commit that had just passed. A would-land inside a
bisection now records its candidate green, as live mode records the landed
tip.
2026-11-15 07:42:26 -03:00
diegosouzapw
893490e2df fix(ci): omni-queue never leaves a success land status on a batch it abandons
Withdrawing the land status was all-or-nothing and could be skipped: a
refused write stopped revokeLanding and skipped the pause, and a tick that
died after blessing left no record, so the next tick recomposed with the
status still in success.

revokeLanding now attempts every commit, never throws, and records a failed
withdrawal in an error event, a note and the rethrown error. The in-flight
stage "landing" is saved before the App blesses (the gate: only a batch at
that stage pays a status read), and at the end of every live tick a batch
stored or marked at that stage that was neither landed nor kept there has
each newest land status read and turned into failure where it is success. A
manual pause puts such a batch back to the testing stage, so its status is
withdrawn until it lands after the resume.
2026-11-15 07:40:19 -03:00
diegosouzapw
9cc93e77ed fix(ci): omni-queue lands only a candidate that is the composition of its stored batch
The tick blessed and landed whatever the stored in-flight record named: a
record with no PR, or a candidate with an extra commit, got the land status.
Before the would-land and the bless, land.verifyComposition now requires a
non-empty batch, the base as an ancestor of the candidate, a first-parent
chain made only of queue merge commits that the stored PRs consume in order
at their heads, and stacked PRs (no merge commit of their own) exactly where
composeCandidate puts them; squash-api also checks the stored tree. A
mismatch blesses and lands nothing, records no would-land, and pauses the
queue with reason "error".
2026-11-15 07:34:25 -03:00
diegosouzapw
15d6eb39c2 fix(ci): omni-queue bless needs both the dispatcher and the triggering actor to be approvers
A re-run keeps the original dispatcher's inputs (sha, reason) and changes only
github.triggering_actor, so an approver re-running a non-approver's failed bless
used to write the land status. The tick now refuses a bless unless GITHUB_ACTOR
and GITHUB_TRIGGERING_ACTOR are both approvers, refuses when either is missing,
and names both in the status and the event when they differ. The workflow passes
github.actor next to github.triggering_actor.
2026-11-15 07:27:56 -03:00
diegosouzapw
1f4e9346f9 chore(ci): omni-queue comments say the environment admits the default branch only 2026-11-15 07:01:35 -03:00
diegosouzapw
5e8ea8ed96 docs(ci): omni-queue environment is a prerequisite of enabling the queue, and runbook wording fixes 2026-11-15 07:01:27 -03:00
diegosouzapw
33aa4b8955 docs(ci): omni-queue runbook for the status door, owner landing, bless and the base-check rules 2026-11-15 05:49:44 -03:00
diegosouzapw
56b92d0226 fix(ci): omni-queue hang evidence is scoped and counted from every run
A hang signature recorded on a base check now matches only a hang of
the candidate on the same check: a base that times out a job never
excuses an ordinary keyless failure of that job (base-red pause before,
pr-red now).

The hang path requires every run of the candidate to have been only job
timeouts. The in-flight retry carries timedOutRuns while that holds;
validateState accepts it as a count, and a document written without it
keeps the old behaviour (pause with reason infra). The hang-suspected
detail and the culprit comment state the real number of timed-out runs.

The culprit comment says the base passes the job only on a green base
verdict, and says nothing about the base without a verdict. The fake
classifier follows the real precedence for timeout and hang verdicts.
2026-11-15 05:35:58 -03:00
diegosouzapw
95c72638ec fix(ci): omni-queue bisects a repeated job timeout instead of pausing
A job that hits its time limit on every attempt is a hanging test, not
the machine. When the infra retries are used up and every failure is
hang-shaped (timed_out, or cancelled with the maximum-execution-time
annotation; never runner loss, startup_failure or a plain cancel), the
tick records hang-suspected and classifies the hang signatures like any
red batch: base check when the base has no verdict, base-red pause when
the bare base fails the same job, otherwise bisection with hang: true,
whose timed-out segments are not retried. The culprit comment names the
job that timed out.

A base check that never produces a verdict (no CI run, or no result
after checksTimeoutMinutes) and has no retry left no longer pauses the
queue: it is recorded as a timeout verdict and the parked batch is
settled (pr-red, the check cannot be redone for the same SHA). The
verdict lookup for a later red batch accepts timeout, so no base check
is started again for that SHA.

A job timeout on the bare base is recorded as a hang signature of the
base check even next to other failures, so a batch that hangs on the
same job is matched to the base instead of being blamed.
2026-11-15 05:21:04 -03:00
diegosouzapw
974140b31a fix(ci): omni-queue checks the bare base for every unverified tip 2026-11-15 05:01:46 -03:00
diegosouzapw
0ec753ddc7 fix(ci): omni-queue environment without deployment records; base filter rationale 2026-11-15 04:48:08 -03:00
diegosouzapw
e9cddb6f81 feat(ci): omni-queue environment, land token and manual bless 2026-11-15 04:41:00 -03:00
diegosouzapw
3b8389597a test(ci): omni-queue diff reports a missing or drifted App bypass on the queue refs ruleset 2026-11-15 04:26:04 -03:00
diegosouzapw
c26aeaf8fb feat(ci): omni-queue status door ruleset and queue refs ruleset 2026-11-15 04:19:23 -03:00
diegosouzapw
43d55480f2 Merge release/v3.8.54 into feat/omni-queue-cutover 2026-11-15 04:09:40 -03:00
diegosouzapw
aa0f7d5ac7 fix(ci): omni-queue withdraws a land status blessed partway 2026-11-15 03:58:18 -03:00
diegosouzapw
ff54d7cf2e Merge release/v3.8.54 into fix/release-v3.8.54-e2e-combos-expert 2026-11-15 03:42:34 -03:00
Diego Rodrigues de Sa e Souza
dffeb109bc Merge pull request #20265 from cheaper-inference/fix/merge-train3b-20261115
chore(release): merge train 3b of 6 PRs for v3.8.54 (2026-11-15)
2026-11-15 03:38:12 -03:00
diegosouzapw
7cf4ca4add feat(ci): omni-queue blesses the candidate and lands as the owner 2026-11-15 02:20:36 -03:00
diegosouzapw
b961bb85ea test(ci): align the omni-queue Coverage ceiling test with #20253
#20166 pins the non-candidate Coverage ceiling at 45 min; #20253 raises it to 60 on the
same line. The train keeps 75 for omni-queue/** candidates and 60 for every other event,
so the test expects 60 for push, pull request and merge_group.
2026-11-15 02:12:33 -03:00
diegosouzapw
a958b56d4c Merge PR #20198 (fix/codeql-1275-bedrock-key-fingerprint) into merge train 3b 2026-11-15 02:03:26 -03:00
diegosouzapw
9788940f44 Merge PR #20253 (fix/release-v3.8.54-ci-job-ceilings) into merge train 3b
# Conflicts:
#	.github/workflows/ci.yml
2026-11-15 02:03:10 -03:00
diegosouzapw
f3025faa37 Merge PR #20215 (fix/release-v3.8.54-e2e-apikey-locators) into merge train 3b 2026-11-15 02:02:04 -03:00
diegosouzapw
392d41a252 Merge PR #20125 (fix/release-v3.8.54-basereds-error-page-boundary) into merge train 3b 2026-11-15 02:02:02 -03:00
diegosouzapw
5907c9028d Merge PR #20166 (feat/omni-queue) into merge train 3b 2026-11-15 02:02:01 -03:00
diegosouzapw
21a5f16608 Merge PR #20169 (feat/db-timestamp-migrations) into merge train 3b 2026-11-15 02:01:59 -03:00
Diego Rodrigues de Sa e Souza
f6cc1c3ee8 Merge pull request #20221 from cheaper-inference/fix/merge-train3-20261114
chore(release): merge train 3a of 6 derived-numbers PRs for v3.8.54 (2026-11-14)
2026-11-15 01:55:58 -03:00
diegosouzapw
d9ebf938dc fix(dashboard): resolve manual combo models against every configured provider
Expert-mode manual model entry answered "Unknown provider prefix." for a
configured provider that has no catalog model for the active capability tab
(a custom OpenAI-compatible node with nothing synced, for example), so the
step was never added and the combo could not be saved.

The capability tabs (c7e79d04ea, PR #19771) narrowed builderProviders to the
providers that have at least one model for the tab. That is right for the
pickers, but manual entry read the same narrowed list, although it exists to
add a model the catalog does not list. It now resolves the typed prefix
against every provider of the builder payload, as it did before; the pickers
keep the narrowed list.

Fixes the E2E "expert mode shows a single-page combo form with manual model
entry" (tests/e2e/combos-flow.spec.ts), red on release/v3.8.54 since that
merge. Adds a jsdom test of the real page that fails without the fix.
2026-11-15 01:33:12 -03:00
diegosouzapw
9e605a3127 feat(ci): omni-queue landing actor, identity and land status context 2026-11-15 00:52:09 -03:00
diegosouzapw
a3fc79c9ab fix(ci): raise the unit shard and Coverage job ceilings
Both jobs were failing gates on time, with every test green.

Unit shard, 25 -> 35 min: over 72 green shard jobs on 2026-11-14 the mean
was 19 min and the slowest 24, and 19 of them (26%) ended within 3 min of
the limit. A shard whose steps had all passed was cancelled at 25 min
(run 43651743993) and failed Gate / CI until a re-run.

Coverage, 45 -> 60 min: two pull requests died at exactly 45 min on the
same day (runs 43619286507 and 43625515181); the re-run that passed took
39m45s.

The Release-Green observer comment that quotes the shard ceiling follows.
2026-11-15 00:42:32 -03:00
diegosouzapw
7b9c961b01 Merge release/v3.8.54 into merge train 3 2026-11-15 00:31:00 -03:00
Diego Rodrigues de Sa e Souza
418cf3439b fix(dashboard): show a disabled button's title in a tooltip (#20220)
* fix(dashboard): show a disabled button's title in a tooltip

The kit gives a disabled or loading button `pointer-events: none`, so the
native `title` of ~93 dashboard buttons whose title is their own name
(icon-only Refresh, Move up, Test all...) never showed while they were
disabled.

The Button adapter now wraps a titled button whose call site passes
`disabled` or `loading` in the Tooltip adapter, once and in every state,
so toggling never remounts the button or drops its focus. The tooltip
opens only while the button is inactive; while enabled the native title
keeps working, so there is one tooltip at a time and the accessible
name/description are unchanged. The Tooltip adapter gains a controlled
`open`/`onOpenChange` passthrough for that.

QuotaCardExpanded's refresh button relied on its own `ml-auto` to sit at
the end of the row; the row now ends at the button (`justify-end`) and
the label takes the free space (`mr-auto`).

Refs #19620

* fix(dashboard): keep ActionBar's grow reaching a titled button

The outer tooltip span was `display: contents`, so ActionBar's direct-child
`[&>*]:grow` (phones) hit no box and titled, disableable buttons stopped
filling the row. Both wrappers are now boxes that take the parent's rule
and pass the growth down (`[&>*]:grow`) to the button.

Also give the new tooltip assertions a 5 s wait so a loaded runner does
not miss the 300 ms open delay.

Refs #19620
2026-11-14 20:29:58 -03:00
diegosouzapw
a5f87b34e1 test(ci): match the frozen base as a whole token in the omni-queue tick fakes
The eligibility fake built a pattern from the base ref and escaped only the
dots (CodeQL js/incomplete-sanitization, alert 1284, the first CodeQL run on
this branch). It now checks that the ref is one whitespace-delimited token of
the freeze issue text, which is what the pattern expressed. Test helper only;
scripts/merge-queue/eligibility.mjs already escapes with escapeRegExp.
2026-11-14 20:08:20 -03:00
diegosouzapw
d9df57dc5a test(db): escape every metacharacter in the gate test's string builders
CodeQL flagged two js/incomplete-sanitization alerts in
check-migration-numbering-base-diff.test.ts. One test built a RegExp from
a migration file name by escaping only the dot. Another built JS string
literals from a fixture by escaping only the quotes, never the backslash.
Today's inputs have neither metacharacters nor backslashes, so the tests
behaved the same, but a future name or fixture could have broken them
silently. The RegExp builder now escapes every metacharacter, and both
literal builders escape backslashes before quotes. The suite still
passes 58/58.
2026-11-14 19:53:35 -03:00
diegosouzapw
376e057697 Merge PR #20173 (feat/derived-strip-open-prs) into merge train 3 2026-11-14 19:36:13 -03:00
diegosouzapw
68c0408c44 Merge PR #20179 (feat/derived-generated-baselines) into merge train 3 2026-11-14 19:36:12 -03:00
diegosouzapw
6c9551940d Merge PR #20177 (feat/derived-i18n-release-mode) into merge train 3 2026-11-14 19:36:11 -03:00
diegosouzapw
f298de9c78 Merge PR #20162 (chore/derived-p2-counts-out-of-instructions) into merge train 3 2026-11-14 19:36:11 -03:00
diegosouzapw
f688acebdb Merge PR #20161 (feat/derived-p1-gate-modes) into merge train 3 2026-11-14 19:36:10 -03:00
diegosouzapw
6cf99a771b Merge PR #20157 (refactor/derived-p0-stryker-description) into merge train 3 2026-11-14 19:36:10 -03:00
diegosouzapw
a655063653 Merge remote-tracking branch 'origin/chore/derived-p2-counts-out-of-instructions' into feat/derived-strip-open-prs 2026-11-14 19:34:15 -03:00
diegosouzapw
85c166c481 chore(quality): allowlist the DOC-01 assert reduction of phase 2 in test-masking
routing-strategy-docs-sync-15159.test.ts goes from 22 to 17 asserts because the agent-instruction
files no longer state the strategy count or an inline list: the per-file "count equals the code"
and "list names every strategy" asserts became "points to ROUTING_STRATEGY_VALUES and carries no
count or list". The AUTO-COMBO.md count and full-table asserts against the code are unchanged, and
the counts gate's STRICT instruction-file invariant fails a count that comes back. Owner-approved;
to be pruned once the release carrying this PR merges to main.
2026-11-14 19:33:57 -03:00
diegosouzapw
b8d756003e docs(db): credit 241_seen_models to #16864, not #18359
The LEGACY_MIGRATION_MAX comment said 241_seen_models.sql came from
#18359. It came from #16864, renumbered from 240 to 241 in merge train 2;
#18359 was stacked on #18353 and carries no migration of its own. The
commit that raised the freeze to 241 (d0ec9e8b) has the same slip in its
message.
2026-11-14 19:32:53 -03:00
diegosouzapw
01741d2784 Merge remote-tracking branch 'origin/release/v3.8.54' into feat/omni-queue 2026-11-14 19:32:33 -03:00
diegosouzapw
4bb013494e test(security): compare the Bedrock cache key with the fingerprint helper
Hashing the test API key inline opened a CodeQL insufficient-password-hash
alert in the test; compare against opaqueTokenFingerprint() instead.
2026-11-14 18:47:46 -03:00
diegosouzapw
8860c9a81c Merge branch 'feat/derived-i18n-release-mode' into feat/derived-generated-baselines
# Conflicts:
#	docs/architecture/QUALITY_GATES.md
#	tests/unit/docs/readme-cli-terminal-svg.test.ts
#	tests/unit/docs/readme-comparison-table-svg.test.ts
#	tests/unit/docs/readme-free-tier-budget-svg.test.ts
#	tests/unit/docs/readme-hero-svg.test.ts
#	tests/unit/docs/readme-promise-pillars-svg.test.ts
#	tests/unit/docs/readme-strategies-grid-svg.test.ts
#	tests/unit/docs/readme-tier-cascade-svg.test.ts
2026-11-14 18:40:27 -03:00
diegosouzapw
5f4f104b85 Merge commit 'd84062cc' into feat/derived-i18n-release-mode
# Conflicts:
#	docs/architecture/QUALITY_GATES.md
2026-11-14 18:38:33 -03:00
diegosouzapw
0733ec8463 Merge remote-tracking branch 'origin/chore/derived-p2-counts-out-of-instructions' into feat/derived-strip-open-prs 2026-11-14 18:36:06 -03:00
diegosouzapw
d84062cc9a Merge remote-tracking branch 'origin/feat/derived-p1-gate-modes' into chore/derived-p2-counts-out-of-instructions 2026-11-14 18:35:57 -03:00
diegosouzapw
a36f922c78 Merge remote-tracking branch 'origin/refactor/derived-p0-stryker-description' into feat/derived-p1-gate-modes
# Conflicts:
#	scripts/check/check-docs-counts-sync.mjs
2026-11-14 18:28:49 -03:00
diegosouzapw
4f086b0ad6 Merge remote-tracking branch 'origin/chore/derived-p2-counts-out-of-instructions' into feat/derived-strip-open-prs 2026-11-14 18:21:43 -03:00
diegosouzapw
ae8eae780e Merge remote-tracking branch 'origin/feat/derived-p1-gate-modes' into chore/derived-p2-counts-out-of-instructions 2026-11-14 18:21:04 -03:00
diegosouzapw
def9c8ce24 Merge branch 'feat/derived-i18n-release-mode' into feat/derived-generated-baselines
# Conflicts:
#	docs/diagrams/README.md
2026-11-14 18:16:50 -03:00
diegosouzapw
600d5811fd Merge remote-tracking branch 'origin/release/v3.8.54' into feat/db-timestamp-migrations 2026-11-14 18:13:59 -03:00
diegosouzapw
8f325a2bf7 Merge remote-tracking branch 'origin/release/v3.8.54' into feat/derived-p1-gate-modes 2026-11-14 18:12:46 -03:00
diegosouzapw
f27a2fba8b Merge remote-tracking branch 'origin/release/v3.8.54' into feat/derived-i18n-release-mode 2026-11-14 18:12:38 -03:00
diegosouzapw
fe7b8a3823 test(security): pin the Bedrock client cache key to a key fingerprint
The cache key must carry the sha256 fingerprint of the API key and never the
key itself. The digest is the same as before the helper, so existing cache
semantics hold.
2026-11-14 17:28:16 -03:00
Diego Rodrigues de Sa e Souza
38dfe75b84 fix(dashboard): single frame for tables in child components hosted by a Card (#20213)
* fix(dashboard): single frame for tables in child components hosted by a Card

Follow-up to #20181 (owner decision of 2026-11-14: the Card is the only
frame around a table). The AST guard only saw a table and a Card written in
the same file; it now follows one level across files: when a parent writes
`<Card>…<Child />…</Card>` with `Child` imported from another dashboard
file, that file's tables are checked as if they sat in that card. On the
base it lists 8 violations, fixed here:

- Cache → Reasoning tab (ReasoningCacheTab, inside the cache page Card):
  the By provider, By model and Recent entries sub-panels lose their border
  and background (titles and spacing kept); their kit Tables get the
  borderless container, and the leftover sticky header patch on the capped
  Recent entries table goes (the kit pins the header).
- Quota share pool card: AllocationTable (inside PoolCard's Card).
- Agent bridge card: ModelMappingTable (inside AgentCard's Card).

Refs #19620

* test(dashboard): cross-file single-frame check follows the hosted component

Review on #20213:
- only the component the parent renders inside its Card (plus same-file
  components it renders by tag) is checked, not every export of its file;
- bordered elements between the child and the Card on the parent side are
  reported too.
Fixtures cover a local helper table, an unhosted sibling export and a
parent-side bordered panel.

Refs #19620

* test(dashboard): cross-file single-frame check tracks each declarator

`export const A = () => …, B = () => …` declares two components in one
statement; only the hosted declarator is checked now (review on #20213).
Regression fixture added.

Refs #19620
2026-11-14 16:47:53 -03:00
diegosouzapw
410c8db3ae fix(ci): an omni-queue resume clears only the pause it saw
Follow-up to the review of the pause/resume confirmation. `resume` reported success as soon
as the base was unpaused, also when it already was, while its dispatch could still be
pending in the tick's concurrency group and later clear a pause recorded in between (a
safety pause). Now the CLI sends nothing for a base that is not paused, and a resume carries
the pause it saw (`expect-pause:<since>`); the tick clears only that pause. A second
dispatch of the same request is therefore harmless, which also covers a retry made after
another request's run was mistaken for ours. The existing test that pinned an empty resume
reason now pins the new format.
2026-11-14 15:50:15 -03:00
diegosouzapw
6e3c1d3f29 test(e2e): anchor the API key locator in the provider specs
The add-connection dialog has a tab list labelled "Add <provider> API Key", so
getByLabel(/api key/i) matched it and the field, and Playwright refused the fill (strict
mode violation, two elements). E2E shard 8/9 is red on the release tip for this (#20212,
run 43614500902). The product is fine; the locator was ambiguous. Same change as in #18345,
which targets main.
2026-11-14 15:41:31 -03:00
Kiaro-Sama
582542ebf2 fix(dashboard): sync recovery boundary fix with current release
Preserve the existing scaffold and regression tests byte-for-byte while
merging release/v3.8.54 at 19197b16c4. Bring in the release dependency
and provider provenance repairs without changing gates or thresholds.

Focused CTA validation: 2 tests passed.
2026-11-14 21:43:16 +03:30
diegosouzapw
a3419c486d fix(ci): longer Coverage ceiling on an omni-queue candidate
The dry run of the candidate profile on this repository (run 43614500902) lost the Coverage
job at its 45-minute ceiling, in "Merge + report + gate". Pull requests already take 32 to
39 minutes there. For the queue a timed-out job is an infra failure: a second full CI, then
a paused base. A push to omni-queue/** now gets 75 minutes; every other event keeps 45.
2026-11-14 14:45:27 -03:00
diegosouzapw
331616ff1f Merge remote-tracking branch 'origin/release/v3.8.54' into feat/omni-queue 2026-11-14 14:12:45 -03:00
diegosouzapw
90fbcaba31 Merge remote-tracking branch 'origin/release/v3.8.54' into refactor/derived-p0-stryker-description
# Conflicts:
#	stryker.conf.json
2026-11-14 14:03:37 -03:00
Diego Rodrigues de Sa e Souza
19197b16c4 fix(dashboard): the Card is the only frame around a table (#20181)
* fix(dashboard): the Card is the only frame around a table

Owner decision of 2026-11-14 (item 3): tables inside a Card no longer draw a
frame of their own, and a bordered sub-panel around a table inside a Card
becomes a plain section.

- Cache → Semantic Cache: the Entries sub-panel loses its border and
  background (title and spacing kept); CacheEntriesTab drops DataTableShell
  for the kit TableLoadingRegion + a borderless Table (search and pagination
  kept, search keeps the kit toolbar width).
- Cache → Prompt Cache: same for the "Breakdown by provider" sub-panel.
- Evals → suites: suites are sections of the card split by hairlines (kit
  plain accordion pattern) instead of bordered boxes; the cases DataTable
  uses framed={false}.
- Provider stats, cost overview (explorer + breakdown tables), resilience
  cooldowns and the other kit Tables found inside a Card get
  containerClassName="rounded-none border-0", the same borderless container
  already used by #20141 and the analytics tables.

The AST guard now also covers Table inside Card, any depth (through
expressions, fragments and .map callbacks), and bordered elements between a
table and its Card. A jsdom test covers the two tables rendered by child
components (semantic cache entries, cooldowns).

Refs #19620

* test(dashboard): single-frame guard reads only static classes; stable translator mock

- The AST guard no longer searches the source text of a dynamic class
  expression: only string literals and the literal parts of a template
  count, so an inactive conditional branch can neither satisfy the
  borderless check nor report a sub-panel (review on #20181). Fixtures added.
- The jsdom test returns one translator for every useTranslations call, so
  the CacheEntriesTab fetch effect settles.

Refs #19620

* chore(ui-kit): sync vendored kit to 0.0.116

Upstream keak-ai/cheaper-inference-ui-kit#204 (closes #203): Table and
DataTable take `maxHeight`; the capped container scrolls on both axes,
pins the header row and takes focus while it overflows. No new dependency.

Refs #19620

* fix(dashboard): scroll tall tables through the kit Table maxHeight

Kit 0.0.116 (keak-ai/cheaper-inference-ui-kit#204) caps a Table with
`maxHeight`: the kit container scrolls both axes, pins the header row and
becomes a focusable, named region while it overflows (WCAG 2.1.1). Our own
scroll boxes never took focus, so keyboard users could not scroll them.

- DataTable adapter: the `<div style={{ maxHeight, overflow: "auto" }}>`
  wrapper is gone; `maxHeight` goes to the kit Table, `!overflow-visible`
  and the sticky/background patch on the header cells are dropped (the kit
  pins and paints the header; `whitespace-nowrap` stays). New required
  `label` prop names the scroll region; the five call sites pass a
  translated string (evals recent runs and suite cases, conductor runners
  and tasks, resilience connections).
- Kit Tables that capped themselves with `max-h-* overflow-y-auto` classes
  or a capped wrapper now take `maxHeight` + a translated `scrollLabel`,
  and lose their `sticky top-0` header patches: reasoning cache entries,
  cache trend, import providers from file, OAuth export preview (the kit
  container border replaces the wrapper's), proxy bulk import preview,
  proxy bulk health check, proxy logger.

Tests: jsdom test for the adapter (capped container is a named tab stop,
no own scroll wrapper, no header patch, borderless when framed={false});
AST guard over the dashboard for class caps, capped wrappers and unnamed
capped tables. design-kit-bridge assertions aligned: the header colour and
the opaque viewport now come from the kit table.

Refs #19620

* test(dashboard): template classes count only when whitespace bounds them

A class written against an interpolation (`border-0${suffix}`) can render
as another class, so the single-frame guard no longer treats it as whole
(review on #20181). Fixtures for interpolations adjacent to `border-0` and
`border` added.

Refs #19620
2026-11-14 13:49:45 -03:00
Diego Rodrigues de Sa e Souza
d286dff670 Merge pull request #16083 from cheaper-inference/test/video-live-receipts-20261009
test(video): isolate VPS live validation and guard STT preflight
2026-11-14 13:48:17 -03:00
diegosouzapw
b5f13c6658 fix(ci): OpenAPI breaking-change gate resolves the base of an omni-queue candidate
The gate pins its comparison to the event's commits. A push that creates a branch has no
`before`, and every omni-queue candidate is such a push, so the gate ended INCOMPLETE
("Missing immutable event base") and the candidate went red: found by the real-repository
dry run of the candidate profile (run 43614500902). On refs/heads/omni-queue/** the base is
now the one the candidate names itself (Omni-Queue-Base, or the commit itself for a
base check), through candidate-base.resolveCandidateBase, which fails closed when the ref
does not name the commit. Every other push keeps event.before.
2026-11-14 13:39:55 -03:00
diegosouzapw
01b6cd1e82 fix(quality): model check:generated-artifacts in the Release-Green static profile
The new lint step would fail release-green-static-profile.test.mjs (Unmodeled workflow command: lint/check:generated-artifacts), the same way the phase-4 step did on #20177. It is a real gate of the lint job, so it is modeled as a hard gate next to check:agent-skills-sync.
2026-11-14 13:13:55 -03:00
diegosouzapw
71406af5c4 Merge branch 'feat/derived-i18n-release-mode' into feat/derived-generated-baselines 2026-11-14 13:09:33 -03:00
diegosouzapw
2452d4c211 fix(quality): model check:pr-derived-paths in the Release-Green static profile
The new PR Test Policy step made release-green-static-profile.test.mjs fail (Unmodeled workflow command: pr-test-policy/check:pr-derived-paths; CI run 43593391660, Unit Tests 2/8). It judges a pull request's own diff and prints SKIP in release mode, so it is listed as an exclusion with that reason, like check:pr-evidence.
2026-11-14 13:08:29 -03:00
diegosouzapw
becdd677a1 fix(ci): omni-queue shadow mode skips the non-approver comment too
Shadow mode writes nothing on a pull request, but the approval job still posted its
"not an approver" comment. In shadow a label from a non-approver is now only logged.
The main() test that pins that comment hands main a live config (setup only; the
assertions are unchanged). The protected-surface comment and two doc comments now say
"protected surfaces": the list also covers workflows and the queue's own code and config.
2026-11-14 13:07:37 -03:00
diegosouzapw
3862c62bf4 Merge branch 'fix/oq-pre-tick' into feat/omni-queue 2026-11-14 13:03:08 -03:00
diegosouzapw
f06cc1a131 Merge branch 'fix/oq-pre-wf' into feat/omni-queue
# Conflicts:
#	docs/ops/OMNI_QUEUE.md
2026-11-14 13:02:48 -03:00
diegosouzapw
c18808c5ca fix(ci): omni-queue saves its state only when it changed, plus an hourly heartbeat
Every tick called store.save, and a save stamps `updatedAt`, so the
document always differed: one commit on `omni-queue-state` per tick, at
least 288 a day per base from the cron alone, although most ticks change
nothing (idle queue, candidate checks still pending).

The tick now compares the document it loaded with the one it ends with,
`updatedAt` aside, and skips the save when they are equal. An unchanged
state is still written as a heartbeat at most once per
STATE_HEARTBEAT_MINUTES (60, exported from tick.mjs), so the age of
`updatedAt` keeps telling an idle queue from a dead one. A missing
document is always written, and so is one whose `updatedAt` cannot be
read or lies in the future.

Why a skipped save is safe:

- Compare-and-swap. The CAS exists so that a write never overwrites a
  concurrent one. A tick with nothing to write cannot lose an update, and
  the version it loaded is thrown away with it; the next tick loads its
  own. A tick that does change the state saves with the version it
  loaded, exactly as before, and still fails on a conflict.
- Side effects. What an unchanged tick does on GitHub (dashboard upsert,
  eligibility comments and label removals, deletion of stray candidate
  refs) already ran before the save in every tick and is not recorded in
  the state. A save conflict never undid it; it only made main() redo the
  tick. With the skip, a concurrent change is picked up by the next tick.
- Ref cleanup. cleanupRefs runs before the save and keeps both the loaded
  in-flight refs and the refs of the new state. deleteSuperseded runs
  after it and deletes the loaded refs that the new state no longer
  names. With an identical document those two sets are equal, so it
  deletes nothing: no ref is removed on the strength of a save that did
  not happen.

The dashboard is still rendered and upserted on every tick (it already
PATCHes only when its body changes). No existing assertion changed.
2026-11-14 12:50:08 -03:00
diegosouzapw
26f9b513f5 fix(ci): start the omni-queue jobs only for pull request events the queue cares about
omni-queue.yml listens to pull_request_target labeled / unlabeled /
synchronize / closed for every pull request of the repository, and both jobs
mint a GitHub App token. Any label on any pull request ran the approval job,
and any of the four actions ran a tick: hundreds of privileged runs a day on
a busy repository, enough to exhaust the App's API quota, and a contributor
could keep ticks running by pushing.

- approval: only when the event's label is `label` or
  `protectedApprovalLabel`.
- tick, on pull_request_target: only when the event's label is one of those
  two or one of `blockLabels`, when the pull request carries the queue label,
  or when the event is `closed` with merged == true (a base moved).
  schedule, workflow_run and workflow_dispatch are unchanged, and so are the
  kill switch, the approval-result tolerance, !cancelled() and both
  concurrency groups.

An `if:` cannot read config/merge-queue/config.json, so the label names are
literals in the workflow. A test parses both job filters and fails when the
literals differ from the config; the runbook says a rename changes both.

Existing tests changed on purpose:
- "the queue never checks out or runs PR code": the assertion that the file
  never names github.event.pull_request now exempts exactly two reads, in the
  tick's `if:` only: `.labels.*.name` and `.merged`. Every other read of the
  pull request payload (and github.head_ref, workflow_run.head) still fails.
- queueContext (test helper): a pull_request_target context now models a
  queued pull request by default (it carries the queue label; a labeled /
  unlabeled action names that label). The kill-switch and approval tests keep
  their assertions unchanged; "the tick runs on every trigger" now holds for
  queue-relevant events, and the new test covers the events that start
  nothing.
2026-11-14 12:47:32 -03:00
diegosouzapw
56a327c727 fix(ci): judge an omni-queue candidate against its base, like a pull request
A push to omni-queue/** has no github.event.pull_request, so the gates that
are base-relative (or advisory) on a pull request ran a candidate in their
absolute / strict mode. A base that drifted mid-cycle would red every
candidate and the queue would blame innocent pull requests. Measured on the
release tip: the strict i18n drift check exits 1 (33 sources, 66 mirrors).

On a candidate these now compare with needs.changes.outputs.candidateBase:

- ci.yml lint: boundary ratchet (--base-ref).
- quality.yml fast-gates: file-size, complexity-ratchets, dead-code, boundary
  and the TS7 diagnostics ratchet (which was skipped without a base).
- ci.yml docs-sync-strict: the i18n docs drift takes the pull-request path
  (base checkout of the candidate base + advisory comparison); the strict
  step no longer runs on a candidate.

Pushes to main, merge_group and workflow_dispatch evaluate to the same
values as before; pull requests keep github.event.pull_request.base.sha.

newCodeMode.resolveMergeBase: on a merge-commit HEAD it compares with HEAD^1
(the live base tip of refs/pull/N/merge). A batch candidate is the base plus
one merge commit per pull request, so that rule judged only the last pull
request of the batch. The two new-code gates now pass the pushed ref, and a
refs/heads/omni-queue/** ref compares with the given base. Every other ref
keeps the first-parent rule. GITHUB_REF joins the runner-owned variables of
check-env-doc-sync (the gates read it; it is not OmniRoute configuration).

Existing assertions changed on purpose (same strictness, new expression):
- tests/unit/build/check-boundary-ratchet.test.ts: the two exact matches of
  the PR_BASE_SHA binding (ci.yml lint, quality.yml fast-gates) now expect
  "github.event.pull_request.base.sha || needs.changes.outputs.candidateBase".
- tests/unit/quality-rail-gate-membership.test.ts: the PR_BASE_SHA regex of
  the TS7 ratchet expects the same expression.
2026-11-14 12:45:19 -03:00
diegosouzapw
8ff7367c8b fix(ci): omni-queue shadow mode is inert for real pull requests
Shadow mode is meant to observe while Mergify keeps landing the same PRs.
It still acted on them:

- the tick removed the queue label and commented when it isolated a
  culprit, when a PR conflicted with the base, when its head was already
  in the base, and on every eligibility action (head changed after the
  label, conflicting, not an approver, protected surface, frozen base);
- the approval job wrote a `failure` status "approval withdrawn" on every
  `unlabeled`, a red status on a healthy PR that the other merge path may
  refuse to merge;
- a PR of the in-flight batch merged by Mergify during the candidate CI
  made the green batch be dropped as "already merged" and recomposed, so
  shadow rarely recorded `would-land`.

In shadow mode only (live mode is unchanged):

- tick.mjs writes to a pull request through two methods, removeLabel and
  the new commentPr, and both are no-ops in shadow. Comments on issues the
  queue owns (base-red notice, divergence, dashboard) keep going through
  comment().
- What live mode would have done is recorded instead. A culprit keeps the
  `culprit-found` event, with "shadow mode: label kept, no comment". A
  base conflict, a head already in the base and an eligibility label
  removal become a new `would-dequeue` event (PR, head, reason).
- A culprit, a base conflict and an already-in-base head are remembered
  per head SHA in state.shadow.processed, like a validated head, so they
  are not batched again (eligibility reason `shadow-processed`). A PR the
  eligibility rules reject is recorded once per head and not marked: it
  stays out by its own reason, and a new approval of that head can still
  queue it.
- A PR that another path merged at the tested head during the candidate
  CI no longer discards a green batch: `would-land` is recorded with
  "merged meanwhile by another path: #N". A PR merged at another head, or
  dropped for any other reason, is handled as before.
- approve.mjs writes nothing for `unlabeled`. This is safe: checked in
  eligibility.approvalFor, the older `success` never counts by itself.
  Without the label the PR is `no-label`; a label put back by a
  non-approver is `label-not-by-approver`; after an approver's new label
  only a status created no earlier than 60 s before that label approves
  the head. A characterization test pins this.

Not changed: the approval job still answers a non-approver's label with
one comment in shadow mode (the runbook says so).

Existing assertions changed on purpose:
- tick.test.mjs "shadow bisection composes later segments…": the culprit
  #3 now keeps its label (was `[]`) and is in shadow.processed (keys were
  1, 2, 4); the test also asserts the culprit-found event and that no
  label removal or comment was written.
Existing tests whose setup (not assertions) changed, because they ran the
committed shadow config while pinning live behaviour:
- approve.test.mjs uses the committed config with mode "live";
- tick.test.mjs "main: the client counts only the App's own comment
  markers" passes a live config through OMNI_QUEUE_CONFIG.
2026-11-14 12:45:03 -03:00
diegosouzapw
727cacafd3 fix(ci): omni-queue counts only the candidate's own push runs in its verdict
The candidate SHA is public. Anybody can publish that commit in a fork, or
on a branch of this repository, and open a pull request whose head is the
candidate. The PR's CI then reports check runs on the same SHA, and the
tick read them as the candidate's:

- readChecks kept every run whose check suite had no head_branch (fork
  PRs) or whose head_branch was the candidate ref (a same-repository PR
  from a branch with that name);
- by cancelling or re-pushing, the PR's author could make the candidate
  red or "infra" (retry, then a paused base), and a later run with the
  same name superseded the candidate's own result in checks.latestByName.

The verdict of a candidate ref now counts only the check runs of the check
suites of push-event workflow runs on that ref for that SHA
(GET /actions/runs?branch=<ref>&event=push&head_sha=<sha>, token already
has actions: read). Every listed run is re-checked for event, branch and
SHA. Anything else on the SHA is ignored: the base's own push, the other
ref of an infra retry, pull_request suites, workflow_dispatch runs, and
check runs of other apps (commit statuses are unchanged). Unknown fails
closed: with no ref, or no push run listed yet, no run counts, the verdict
stays pending and the existing no-CI timeout applies.

Why not strict `headBranch === ref`: checked on the release tip of the
real repository, a check suite carries the branch but not the event, so
the suites of a pull_request run and of a push run on the same branch
look alike. Each workflow run has its own check suite, and
workflow_run.check_suite_id equals check_run.check_suite.id.

github.mjs: check runs carry checkSuiteId; workflow runs carry headBranch
and checkSuiteId.

Tests: the new tick, client and end-to-end tests fail on the previous
code. Existing assertions changed, all additive, because the normalized
shapes gained fields: github.test.mjs expects checkSuiteId on
normalizeCheckRun and headBranch/checkSuiteId on listWorkflowRuns. One
tick test that injects raw check runs now attributes them to the push run
of the candidate ref in its setup; its assertions are untouched.
2026-11-14 12:34:17 -03:00
diegosouzapw
8608f44243 Merge #20207 (slow combo suites) into test/video-live-receipts-20261009 2026-11-14 12:22:08 -03:00
diegosouzapw
e762e8d0c8 test(combo): keep two combo suites off real-time cooldown and first-output waits
combo-responses-sse-failure-fallback took ~344 s and vertex-shared-capacity-429-combo-lockout
~326 s (already on v3.8.53). When a PR's new test files reshuffle the unit shards so both land
in one shard, that shard exceeds its 25-minute job limit and is cancelled (#16083, twice).

- The SSE cancellation test leaves the primary stream open after response.failed, so the combo
  exits it through the per-target first-output deadline; without an explicit value that is the
  cooldown-wait budget + 10 s (310 s). An explicit targetTimeoutMs of 1 s keeps the same path.
- The Vertex lockout file asserts whether a 429 records a model lockout; the default-on
  cooldown-aware re-dispatch (covered by combo-cooldown-retry.test.ts) waited out the 30 s
  Retry-After hint five times per hinted test. The file's combos now opt out of that wait.

All assertions are unchanged: 18/18 and 17/17, now 13 s and 15 s.
2026-11-14 12:20:53 -03:00
diegosouzapw
78d6f03744 fix(ci): omni-queue treats workflows and its own code and config as protected surfaces
The privileged jobs run scripts/merge-queue and read config/merge-queue from the default
branch, and a candidate runs the workflows of its own tree with repository secrets. A PR with
only the queue label could add an approver, switch mode, empty requiredChecks or read a
secret through a workflow. .github/workflows/**, .github/actions/**, scripts/merge-queue/**,
config/merge-queue/** and .mergify.yml now need protected-approved as well.
2026-11-14 12:18:59 -03:00
diegosouzapw
28beeb375e Merge branch 'fix/oq-numbers' into feat/omni-queue 2026-11-14 11:31:44 -03:00
diegosouzapw
8cc05ccf97 fix(security): fingerprint the Bedrock client cache key with the shared helper (CodeQL #1275)
The client cache key hashed the API key with an inline sha256, which CodeQL
flags as js/insufficient-password-hash. opaqueTokenFingerprint() produces the
same digest and is the project's helper for high-entropy token fingerprints.
2026-11-14 10:27:40 -03:00
diegosouzapw
d0ec9e8ba6 fix(db): freeze the old migration series at 241 after 240 and 241 landed
While this PR was open, merge train 2 merged
240_provider_node_custom_json_config.sql (#18353) and 241_seen_models.sql
(#18359) into release/v3.8.54. With the series frozen at 239, the gate
rejected both base files and the compatibility tests' synthetic 240 slot
collided with the real one, so CI went red on the merge ref.

A merged migration is never renamed, so the freeze moves to the highest
old number on the base: LEGACY_MIGRATION_MAX is now 241, and its comment
says to raise it in the same merge if another NNN_ file lands before this
PR does. The tests no longer hard-code the free slot: the timestamp
compatibility test takes the first old number above every real file, and
the numbering tests derive the top and the number above it from
LEGACY_MIGRATION_MAX. The pinned value test now pins 241. The database
guide and the changelog fragment say 001-241, and the conversion recipe
lists 237 to 241 as slots that always need a compatibility entry.
2026-11-14 09:40:09 -03:00
diegosouzapw
553d565ee9 Merge remote-tracking branch 'origin/chore/derived-p2-counts-out-of-instructions' into feat/derived-strip-open-prs 2026-11-14 09:38:41 -03:00
diegosouzapw
b1c084ceed Merge remote-tracking branch 'origin/feat/derived-p1-gate-modes' into chore/derived-p2-counts-out-of-instructions
# Conflicts:
#	AGENTS.md
#	docs/i18n/am/llm.txt
#	docs/i18n/ar/llm.txt
#	docs/i18n/az/llm.txt
#	docs/i18n/bg/llm.txt
#	docs/i18n/bn/llm.txt
#	docs/i18n/bs/AGENTS.md
#	docs/i18n/bs/llm.txt
#	docs/i18n/cs/llm.txt
#	docs/i18n/da/llm.txt
#	docs/i18n/de/llm.txt
#	docs/i18n/el/llm.txt
#	docs/i18n/es/llm.txt
#	docs/i18n/et/llm.txt
#	docs/i18n/fa/llm.txt
#	docs/i18n/fi/llm.txt
#	docs/i18n/fr/llm.txt
#	docs/i18n/ga/llm.txt
#	docs/i18n/gu/llm.txt
#	docs/i18n/ha/llm.txt
#	docs/i18n/he/llm.txt
#	docs/i18n/hi/llm.txt
#	docs/i18n/hr/llm.txt
#	docs/i18n/hu/llm.txt
#	docs/i18n/hy/llm.txt
#	docs/i18n/id/llm.txt
#	docs/i18n/ig/llm.txt
#	docs/i18n/it/llm.txt
#	docs/i18n/ja/llm.txt
#	docs/i18n/ka/llm.txt
#	docs/i18n/km/llm.txt
#	docs/i18n/kn/llm.txt
#	docs/i18n/ko/llm.txt
#	docs/i18n/lt/llm.txt
#	docs/i18n/lv/llm.txt
#	docs/i18n/ml/llm.txt
#	docs/i18n/mr/llm.txt
#	docs/i18n/ms/llm.txt
#	docs/i18n/mt/llm.txt
#	docs/i18n/my/llm.txt
#	docs/i18n/ne/llm.txt
#	docs/i18n/nl/llm.txt
#	docs/i18n/no/llm.txt
#	docs/i18n/or/llm.txt
#	docs/i18n/pa/llm.txt
#	docs/i18n/phi/llm.txt
#	docs/i18n/pl/llm.txt
#	docs/i18n/pt-BR/llm.txt
#	docs/i18n/pt/llm.txt
#	docs/i18n/ro/llm.txt
#	docs/i18n/ru/llm.txt
#	docs/i18n/si/llm.txt
#	docs/i18n/sk/llm.txt
#	docs/i18n/sl/llm.txt
#	docs/i18n/sr/llm.txt
#	docs/i18n/sv/llm.txt
#	docs/i18n/sw/llm.txt
#	docs/i18n/ta/llm.txt
#	docs/i18n/te/llm.txt
#	docs/i18n/th/llm.txt
#	docs/i18n/tr/llm.txt
#	docs/i18n/uk-UA/llm.txt
#	docs/i18n/ur/llm.txt
#	docs/i18n/uz/llm.txt
#	docs/i18n/vi/llm.txt
#	docs/i18n/yo/llm.txt
#	docs/i18n/zh-CN/llm.txt
#	docs/i18n/zh-TW/llm.txt
#	llm.txt
#	open-sse/services/AGENTS.md
#	skills/README.md
#	skills/omni-auth/SKILL.md
#	skills/omni-providers/SKILL.md
#	src/shared/constants/agentSkills.ts
2026-11-14 09:35:10 -03:00
diegosouzapw
7ace790127 fix(ci): align phase 1 with the merged base (snapshot, coverage sentence, tests)
- docs/reference/derived-facts.json: the base merged a provider and the `jev` strategy (394
  providers, 238 migrations, 22 strategies) and regenerated the README SVGs; the snapshot follows,
  so the generators reproduce those SVGs byte for byte.
- docs/routing/AUTO-COMBO.md: the combo-matrix sentence said "all 21 public strategies" — a test
  coverage statement, not the strategy total, but the count extractor reads it as one. The matrix
  has no `jev` test, so "22" would be false; the sentence no longer carries a number.
- validate-release-green test: the --full-ci loop of the base computes the bucket with
  `fullCiKindFor(g.id, results, g.kind)` and builds `gateEnv`; the wiring assertion follows.
- pr-mode strategy test: compares against the snapshot's strategy count instead of the fixture's.
2026-11-14 09:30:10 -03:00
diegosouzapw
64b0a92987 fix(ci): reconcile-changelog counts a PR landed by omni-queue once
merge-ff keeps every contributor commit where a squash leaves one, so the "Commits in the
cycle" figure and the Top 25 ranking would favour a 30-commit PR over five squashed ones.
landingUnits() counts a queue PR once; rankAuthors() and renderSection() use it, and the
table names how many PRs the queue landed. Squash-only cycles render exactly as before;
the scope line keeps the literal non-merge commit count.
2026-11-14 09:25:39 -03:00
diegosouzapw
e5f69f3526 test(video): list the STT stub suite in the Stryker test set
tests/unit/video-live-stt-server.test.ts covers the mutated open-sse/utils/error.ts;
check:mutation-test-coverage --strict requires it in tap.testFiles.
2026-11-14 09:15:54 -03:00
diegosouzapw
2bcd5bf783 Merge remote-tracking branch 'origin/release/v3.8.54' into feat/derived-p1-gate-modes
# Conflicts:
#	package.json
#	scripts/docs/gen-readme-cli-terminal.mjs
#	scripts/docs/gen-readme-comparison-table.mjs
#	scripts/docs/gen-readme-hero.mjs
#	scripts/docs/gen-readme-promise-pillars.mjs
#	scripts/docs/gen-readme-strategies-grid.mjs
#	scripts/docs/gen-readme-tier-cascade.mjs
#	scripts/quality/validate-release-green.mjs
2026-11-14 09:15:41 -03:00
diegosouzapw
e23db27829 Merge remote-tracking branch 'origin/release/v3.8.54' into feat/db-timestamp-migrations 2026-11-14 09:14:07 -03:00
diegosouzapw
a331fd7254 Merge remote-tracking branch 'origin/release/v3.8.54' into feat/omni-queue 2026-11-14 09:12:02 -03:00
diegosouzapw
1ab13a61e5 test(ci): align the deploy-vps omni-queue guard test with the release's new trigger
The release's deploy-vps.yml (#20132) now deploys a workflow_run only when the upstream
run is a same-repository push, release or dispatch. The fixture now carries
head_repository, repository and the upstream event, so the control case is a real deploy
again; the omni-queue head branch is still refused, also for an upstream dispatch.
2026-11-14 09:10:55 -03:00
diegosouzapw
29a1825f77 Merge remote-tracking branch 'origin/release/v3.8.54' into refactor/derived-p0-stryker-description
# Conflicts:
#	package.json
#	stryker.conf.json
2026-11-14 09:09:23 -03:00
diegosouzapw
ecbf84feeb refactor(db): split the compatibility reconcile into small helpers
The order-independent reconcile pushed reconcileRenumberedMigrations() to
a cognitive complexity of 17, over the 15 the complexity ratchet allows
for new code. One pass, the wait-or-stop decision, the mover lookup and
the stop-the-boot error now live in their own functions. No behavior
changes: the reconcile-order tests (differential included) and the other
compatibility and runner suites pass unchanged.
2026-11-14 07:54:31 -03:00
diegosouzapw
899603b2a1 Merge release/v3.8.54 into test/video-live-receipts-20261009 2026-11-14 07:53:37 -03:00
Diego Rodrigues de Sa e Souza
c5c90b955f fix(dashboard): destructive-ghost row deletes and GuardedAction reasons (#20182)
Owner decisions 1 and 4 of 2026-11-14 (follow-up of #19620):

- Hover-only red ghost buttons, decided screen by screen: the nine row/card
  deletes (batch, batch file, Codex profile, quota group, pool, schedule
  window, playground preset, tool, NoAuth account) use the kit
  destructive-ghost variant; chip x's, input clears, form-row x's and
  toolbar/nav actions keep the grey ghost with error ink on hover. The
  #19620 guard now fails on any new hover-only red ghost/outline button
  that is not destructive-ghost or a listed exception.
- A disabled kit button has pointer-events: none, so a title explaining
  why it is disabled never showed. New GuardedAction adapter
  (src/shared/components/GuardedAction.tsx) over the kit GuardedAction,
  with the legacy Button vocabulary; the ten reason-only titles now pass
  as reason (update, file in use, judge model, repeat, set model, max
  columns, TPROXY, budget selection, combo step). Busy states stay
  disabled; general hints stay as title while the action is available.
  New guard test fails on a disabled Button whose title can only be a
  reason.

Refs #19620
2026-11-14 07:33:08 -03:00
Diego Rodrigues de Sa e Souza
405c6bdef7 Merge pull request #20174 from cheaper-inference/fix/merge-train2-20261113
chore(release): merge train 2 of 15 owner PRs for v3.8.54 (2026-11-14)
2026-11-14 07:06:48 -03:00
diegosouzapw
398c79e33b Merge PR #19771 (recut/18731-capability-combo-routes) into merge train 2 2026-11-14 05:37:52 -03:00
diegosouzapw
1f927fad16 chore(release): reconcile train 2 combined migrations and phi coverage
- media-cost-tracking pins the applied migration sequence; #18353 adds 240 and #16864
  adds 241 (renumbered on the train), so both entries join the expected list.
- phi untranslated ratio crossed its +0.5 tolerance once #19328, #19771 and #18359
  added keys together; translate the five translatable new strings.
2026-11-14 05:36:39 -03:00
diegosouzapw
1a0b5f662f docs(changelog): number the phase-5 fragment after PR #20179 2026-11-14 05:32:40 -03:00
diegosouzapw
997c82e560 Merge branch 'feat/derived-i18n-release-mode' into feat/derived-generated-baselines 2026-11-14 05:32:01 -03:00
diegosouzapw
355643ab7a fix(routing): keep chat rejection of search providers in the executor path
The early targetSupportsEndpoint() guard in handleSingleModelChat returned a JSON 400
before the executor ran. That bypassed the #17858 contract the base pins in
chat-search-provider-error.test.ts (an unclassified executor rejection propagates; a
search-provider rejection after keepalive stays SSE 200 with a sanitized error) and also
turned media-only chat targets away with a search-specific message. Search providers are
already rejected in chat by their executors with search_provider_not_chat.
2026-11-14 05:28:38 -03:00
diegosouzapw
27e31d1deb docs(changelog): number the phase-4 fragments after PR #20177 2026-11-14 05:07:12 -03:00
diegosouzapw
9ddd54c536 Merge branch 'feat/derived-i18n-release-mode' into feat/derived-generated-baselines 2026-11-14 05:05:27 -03:00
diegosouzapw
4388959ed6 fix(db): reconcile renamed migrations whatever the order of their entries
reconcileRenumberedMigrations() walked RENAMED_MIGRATION_COMPATIBILITY
once, in array order, and stopped the boot when an entry's target slot
held another migration's row, even when a later entry was about to move
that row away. A database that ran old PR builds, for example with 228
holding usage_history_calculated_cost and 237 holding
call_logs_pending_detail_index, failed on every boot with "Cannot
reconcile 228_usage_history_calculated_cost: target version 237 is
occupied". The base already has entries in that order, and converting the
open NNN_ pull requests to timestamps adds more entries that empty
237-239.

An entry blocked by a row that another eligible entry moves now waits and
is retried after the rest of the pass, until every entry is done. When
nothing waits, the steps and the result are exactly those of the old
single pass. When a real conflict remains (a row no entry moves, or a
swap), the boot stops with exactly the old error, the one for the first
blocked entry, and a warning names the entry that is really stuck.

Tests, each shown failing on the previous code:
- the two blocked pairs from the real entries, through the runner's default list;
- a three-link synthetic chain, a swap and an unmovable blocker;
- a three-row real case where the boot must still stop with the old error;
- a differential against the old pass over every one- and two-row ledger
  from the real entries that can interact (669 identical, 53 that now
  boot and land exactly where the entries put them, 53 still-blocked
  states with the old error);
- every entry source appears once.
The real-boot reproduction also boots now and still fails on the base.
The test joins the guard list that re-runs against a real timestamped
migration. The database guide and the changelog fragment say the order
no longer matters.
2026-11-14 04:40:25 -03:00
diegosouzapw
e48fd302af fix(i18n): pr-mode skip reasons name the contexts that really run release mode
With #20161 the Release-Green HARD items run with OMNIROUTE_GATE_MODE=pr and the strict comparison moves to the release:refresh-derived --check drift item, so the skip text now says: the release PR, pushes to main, local runs.
2026-11-14 04:37:33 -03:00
diegosouzapw
d7ce4a458d Merge remote-tracking branch 'origin/chore/derived-p2-counts-out-of-instructions' into feat/derived-strip-open-prs 2026-11-14 04:25:49 -03:00
diegosouzapw
d8c9817d4f Merge remote-tracking branch 'origin/feat/derived-p1-gate-modes' into chore/derived-p2-counts-out-of-instructions 2026-11-14 04:25:16 -03:00
diegosouzapw
7834d4f095 feat(release): refresh prunes and re-queues UI keys, e2e timings step, i18n gates in pr mode on the train
Contract with the phase-4/5 session (2026-11-14):

- ui-keys: syncUiKeys is called with pruneExtra (keys en.json dropped leave the other catalogs)
  and rewrittenSinceRef (English values rewritten since the last release go back to translation;
  --rewritten-since=<ref>, default origin/main, skipped when unresolvable). The backend translates
  only when OMNIROUTE_TRANSLATION_* is configured, never in --check. The CLI fallback passes
  --rewritten-since when the script supports it.
- e2e-timings: new step that runs syncE2eTimings (phase 5) when the tree ships it; skipped
  otherwise.
- merge-train.sh: i18n:check-keys, i18n:check-keys:cli and i18n:check-ratio run in pr mode — the
  train judges the catalogs its PRs changed against the merge base, and a key that exists only in
  en.json is completed by the release refresh instead of reddening the train.
2026-11-14 04:23:25 -03:00
diegosouzapw
511fb6844c test(quality): keep the locale-parity helper path out of a test-masking fixture
locale-parity-mode.test.ts lists every test that imports tests/_helpers/localeParityMode; the fixture's import line made check-test-masking.test.ts look like a new user.
2026-11-14 04:16:06 -03:00
diegosouzapw
dc50d19a94 Merge release/v3.8.54 into merge train 2 2026-11-14 04:14:53 -03:00
diegosouzapw
635830e7ec docs(changelog): fragment for the derived-files guard and the shared gate mode 2026-11-14 04:12:35 -03:00
diegosouzapw
e7d603a641 feat(release): one-time pass that strips derived values from open PRs
Plan 2026-11-13 (derived numbers resolved only at release), section 8. PRs opened before phases 1
and 2 still write values the release refresh now owns, and the counts gate fails them in pr mode.
scripts/ad-hoc/strip-derived-from-pr.mjs restores, in each PR, only the lines it changed to update
such values back to the PR's merge-base text: the llm.txt mirrors, the Stryker list and the facts
snapshot as whole files; managed values in docs claim by claim (gate extractors); digit-only line
edits in agent-instruction files; the package description value.

Dry-run by default (PR heads fetched into refs/derived-strip/*, removed at the end). --apply
--prs=<list> builds ONE commit on top of each PR head with plumbing (no checkout) and pushes it as
a plain fast-forward to the head branch — never a force-push, never a rewrite of the
contributor's commits; it re-checks the PR (open, same head) right before the push and skips forks
without maintainer edits.
2026-11-14 04:08:13 -03:00
diegosouzapw
a3c9aeb20e ci: run check:generated-artifacts in the lint job; AGENTS.md says feature PRs leave generated files and baselines to the release
Owner decisions 2026-11-14: the edited-artifact comparison runs in job lint (fetch-depth: 0), right after check:agent-skills-sync, so a PR that regenerates a README SVG or e2e-timings.json wrongly fails in CI (the shallow test-unit checkout could not tell). QUALITY_GATES.md no longer says the step is unwired.

AGENTS.md (protected surface, approved by the owner for this PR): the Quality Gates quick reference says a feature PR never banks a ratchet improvement and leaves the generated files and derived baselines to the release refresh; Hard Rule 9 says the coverage baseline is tightened at release. The approved draft also named the nightly banking PR; that job banks only file-size and complexity shrinks (nightly-release-green.yml, bank-ratchet-shrinks), so that mention was dropped. "fails" reads "flags" while the guard is advisory.
2026-11-14 04:07:24 -03:00
diegosouzapw
57a4c5ec2c Merge PR #19328 (feat/system-one-complements-1108) into merge train 2
# Conflicts:
#	README.md
#	docs/diagrams/comparison-table.svg
#	docs/diagrams/readme-hero.svg
#	docs/i18n/am/llm.txt
#	docs/i18n/ar/llm.txt
#	docs/i18n/az/llm.txt
#	docs/i18n/bg/llm.txt
#	docs/i18n/bn/llm.txt
#	docs/i18n/bs/llm.txt
#	docs/i18n/cs/llm.txt
#	docs/i18n/da/llm.txt
#	docs/i18n/de/llm.txt
#	docs/i18n/el/llm.txt
#	docs/i18n/es/llm.txt
#	docs/i18n/et/llm.txt
#	docs/i18n/fa/llm.txt
#	docs/i18n/fi/llm.txt
#	docs/i18n/fr/llm.txt
#	docs/i18n/ga/llm.txt
#	docs/i18n/gu/llm.txt
#	docs/i18n/ha/llm.txt
#	docs/i18n/he/llm.txt
#	docs/i18n/hi/llm.txt
#	docs/i18n/hr/llm.txt
#	docs/i18n/hu/llm.txt
#	docs/i18n/hy/llm.txt
#	docs/i18n/id/llm.txt
#	docs/i18n/ig/llm.txt
#	docs/i18n/it/llm.txt
#	docs/i18n/ja/llm.txt
#	docs/i18n/ka/llm.txt
#	docs/i18n/km/llm.txt
#	docs/i18n/kn/llm.txt
#	docs/i18n/ko/llm.txt
#	docs/i18n/lt/llm.txt
#	docs/i18n/lv/llm.txt
#	docs/i18n/ml/llm.txt
#	docs/i18n/mr/llm.txt
#	docs/i18n/ms/llm.txt
#	docs/i18n/mt/llm.txt
#	docs/i18n/my/llm.txt
#	docs/i18n/ne/llm.txt
#	docs/i18n/nl/llm.txt
#	docs/i18n/no/llm.txt
#	docs/i18n/or/llm.txt
#	docs/i18n/pa/llm.txt
#	docs/i18n/phi/llm.txt
#	docs/i18n/pl/llm.txt
#	docs/i18n/pt-BR/llm.txt
#	docs/i18n/pt/llm.txt
#	docs/i18n/ro/llm.txt
#	docs/i18n/ru/llm.txt
#	docs/i18n/si/llm.txt
#	docs/i18n/sk/llm.txt
#	docs/i18n/sl/llm.txt
#	docs/i18n/sr/llm.txt
#	docs/i18n/sv/llm.txt
#	docs/i18n/sw/llm.txt
#	docs/i18n/ta/llm.txt
#	docs/i18n/te/llm.txt
#	docs/i18n/th/llm.txt
#	docs/i18n/tr/llm.txt
#	docs/i18n/uk-UA/llm.txt
#	docs/i18n/ur/llm.txt
#	docs/i18n/uz/llm.txt
#	docs/i18n/vi/llm.txt
#	docs/i18n/yo/llm.txt
#	docs/i18n/zh-CN/llm.txt
#	docs/i18n/zh-TW/llm.txt
#	docs/reference/FEATURE_FLAGS.md
#	llm.txt
#	scripts/docs/gen-readme-comparison-table.mjs
#	scripts/docs/gen-readme-hero.mjs
#	src/i18n/messages/am.json
#	src/i18n/messages/ar.json
#	src/i18n/messages/az.json
#	src/i18n/messages/bg.json
#	src/i18n/messages/bn.json
#	src/i18n/messages/bs.json
#	src/i18n/messages/cs.json
#	src/i18n/messages/da.json
#	src/i18n/messages/de.json
#	src/i18n/messages/el.json
#	src/i18n/messages/en.json
#	src/i18n/messages/es.json
#	src/i18n/messages/et.json
#	src/i18n/messages/fa.json
#	src/i18n/messages/fi.json
#	src/i18n/messages/fr.json
#	src/i18n/messages/ga.json
#	src/i18n/messages/gu.json
#	src/i18n/messages/ha.json
#	src/i18n/messages/he.json
#	src/i18n/messages/hi.json
#	src/i18n/messages/hr.json
#	src/i18n/messages/hu.json
#	src/i18n/messages/hy.json
#	src/i18n/messages/id.json
#	src/i18n/messages/ig.json
#	src/i18n/messages/it.json
#	src/i18n/messages/ja.json
#	src/i18n/messages/ka.json
#	src/i18n/messages/km.json
#	src/i18n/messages/kn.json
#	src/i18n/messages/ko.json
#	src/i18n/messages/lt.json
#	src/i18n/messages/lv.json
#	src/i18n/messages/ml.json
#	src/i18n/messages/mr.json
#	src/i18n/messages/ms.json
#	src/i18n/messages/mt.json
#	src/i18n/messages/my.json
#	src/i18n/messages/ne.json
#	src/i18n/messages/nl.json
#	src/i18n/messages/no.json
#	src/i18n/messages/or.json
#	src/i18n/messages/pa.json
#	src/i18n/messages/phi.json
#	src/i18n/messages/pl.json
#	src/i18n/messages/pt-BR.json
#	src/i18n/messages/pt.json
#	src/i18n/messages/ro.json
#	src/i18n/messages/ru.json
#	src/i18n/messages/si.json
#	src/i18n/messages/sk.json
#	src/i18n/messages/sl.json
#	src/i18n/messages/sr.json
#	src/i18n/messages/sv.json
#	src/i18n/messages/sw.json
#	src/i18n/messages/ta.json
#	src/i18n/messages/te.json
#	src/i18n/messages/th.json
#	src/i18n/messages/tr.json
#	src/i18n/messages/uk-UA.json
#	src/i18n/messages/ur.json
#	src/i18n/messages/uz.json
#	src/i18n/messages/vi.json
#	src/i18n/messages/yo.json
#	src/i18n/messages/zh-CN.json
#	src/i18n/messages/zh-TW.json
#	src/shared/constants/featureFlagDefinitions.ts
#	tests/unit/feature-flags-settings.test.ts
#	tests/unit/server-owned-tool-loop-flag.test.ts
2026-11-14 04:01:31 -03:00
diegosouzapw
c796cb0718 Merge branch 'feat/derived-i18n-release-mode' into feat/derived-generated-baselines
# Conflicts:
#	scripts/check/check-test-masking.mjs
#	tests/unit/check-test-masking.test.ts
2026-11-14 03:59:40 -03:00
diegosouzapw
8b7c930f2d Merge remote-tracking branch 'origin/release/v3.8.54' into feat/derived-i18n-release-mode 2026-11-14 03:56:54 -03:00
diegosouzapw
9d1ae74409 docs(quality): mode-aware gates in Husky hooks run in pr mode 2026-11-14 03:56:31 -03:00
diegosouzapw
572f47ea7a docs: feature PRs edit only the English source; mirrors belong to the translation wave
AGENTS.md -> Documentation accuracy gains item 5 (protected surface, approved by the owner on 2026-11-14 for this PR). The Bosnian mirror docs/i18n/bs/AGENTS.md follows in the next translation wave: the derived-files guard keeps a feature PR from writing it.
2026-11-14 03:55:37 -03:00
diegosouzapw
e48c88d72f fix(i18n): importing sync-ui-keys no longer loads the local .env into the importer
The .env loader ran at module load, so release:refresh-derived and the tests that import syncUiKeys() got the operator's .env (DATA_DIR, OMNIROUTE_TRANSLATION_*, ...) in their own process. loadDotEnv() is now exported and called by the CLI and by syncUiKeys() only on the translate path, before backendConfig(); the translate concurrency default is read after it, so a value in the .env still applies there.
2026-11-14 03:52:23 -03:00
diegosouzapw
62dc680b40 Merge remote-tracking branch 'origin/release/v3.8.54' into feat/omni-queue
# Conflicts:
#	.zizmor.yml
2026-11-14 03:48:47 -03:00
diegosouzapw
897578ee5c ci: derived-files guard runs advisory until the open-PR cleanup; mirror refresh checks in pr mode
Owner decision 2026-11-14: check:pr-derived-paths starts with --warn and, in GitHub Actions, adds one ::warning annotation per violation so the advisory result is visible on the PR. A one-line PR drops --warn after the one-time cleanup of the open PRs (plan section 8).

i18n-mirror-refresh.yml runs check:docs-all with OMNIROUTE_GATE_MODE="pr", byte-identical to the same line in feat/derived-p1-gate-modes (#20161), so the two branches merge without a conflict.
2026-11-14 03:48:47 -03:00
diegosouzapw
c7f9eafdc5 feat(quality): test-masking lists every gate-mode skip helper, not just releaseOnlyUnlessTouched
The locale-parity helpers (localeParityOptions, localeParityIsReleaseOnly, placeholderParityDeferred) and the mirror-freshness helper (announceMirrorPlan) skip in a feature PR what the release refresh rewrites. countSkips() cannot see them, so the gate now counts each helper (imports excluded) and names it with its effect in the report-only block. The helpers' own unit tests are left out of the list. Report-only, as approved by the owner on 2026-11-14.
2026-11-14 03:46:36 -03:00
diegosouzapw
f4dae1ec0f Merge branch 'fix/oq-cr-reconcile' into feat/omni-queue 2026-11-14 03:44:58 -03:00
diegosouzapw
3d0efa2991 Merge branch 'fix/oq-cr-workflows' into feat/omni-queue 2026-11-14 03:44:54 -03:00
diegosouzapw
af12a90e3d Merge branch 'fix/oq-cr-cli' into feat/omni-queue 2026-11-14 03:44:50 -03:00
diegosouzapw
e98935a3e2 Merge branch 'fix/oq-cr-land' into feat/omni-queue 2026-11-14 03:44:45 -03:00
diegosouzapw
579f2103cf fix(quality): gate-mode skip report ignores the test-masking self-test fixtures
check-test-masking.test.ts quotes releaseOnlyUnlessTouched( as fixture text, so the new
report-only block listed the gate's own test. It now skips the self-test family, the same
exclusion the tautology counters already apply; covered by a new test.

(cherry picked from commit e78c2de871)
2026-11-14 03:44:36 -03:00
diegosouzapw
c78e9d5630 test(quality): keep skip-marker literals out of a test-masking test comment
The comment of the new gate-mode skip tests quoted the skip modifier call and the literal
true skip option; countSkips() reads raw text, so check:test-masking flagged the comment as
two new skips. Reworded without the literals; no assertion changes.

(cherry picked from commit a554be9840)
2026-11-14 03:44:35 -03:00
diegosouzapw
fdafea4710 feat(quality): test-masking reports gate-mode conditional skips instead of a bare OK
Review finding: the README SVG / e2e-timings tests moved from t.skip() to
{ skip: releaseOnlyUnlessTouched(...) }, which countSkips() does not see (it matches only
.skip( and { skip: true }), so check:test-masking answered a plain OK for 13 assertions that
a PR run can skip.

countModeConditionalSkips() counts releaseOnlyUnlessTouched( calls per changed/renamed test
file; a net increase is printed on its own report-only block naming each file and where the
edited-artifact comparison runs in a PR (check:generated-artifacts). It does not fail the
gate: whether a mode-conditional skip should block is the owner's decision. countSkips()
and every existing signal are unchanged.

(cherry picked from commit c20f9d67cb)
2026-11-14 03:44:32 -03:00
diegosouzapw
4674ea6933 Merge branch 'feat/derived-p4b-mirrors' into feat/derived-i18n-release-mode 2026-11-14 03:44:05 -03:00
diegosouzapw
0fad8e2e78 Merge branch 'fix/oq-cr-github' into feat/omni-queue
# Conflicts:
#	docs/ops/OMNI_QUEUE.md
2026-11-14 03:42:43 -03:00
diegosouzapw
6b97652090 Merge branch 'fix/oq-cr-classify' into feat/omni-queue 2026-11-14 03:42:14 -03:00
diegosouzapw
315bae7aa4 Merge branch 'fix/oq-cr-tick' into feat/omni-queue 2026-11-14 03:42:12 -03:00
diegosouzapw
0908b3fdc3 test(merge-queue): clear inherited GIT_* in the candidate-base CLI tests
The fixture spread process.env into its git environment, and main() runs
git through createGit, which also inherits process.env (io.env only
feeds GITHUB_REF). Run from a git hook or wrapper, an inherited GIT_DIR
or GIT_INDEX_FILE would point the fixture's commits and main()'s reads
at the caller's repository. The fixture env is now built at call time
with every inherited GIT_* key cleared (inheritedGitEnvCleared from the
sandbox helper), and runMain drops those keys from process.env for the
duration of the main() call. Test-only change; candidate-base.mjs keeps
inheriting the CI checkout environment on purpose.

Test: a decoy repository set through GIT_DIR / GIT_INDEX_FILE; the CLI
still prints the fixture's base and the decoy's HEAD and index stay
untouched.
2026-11-14 03:29:00 -03:00
diegosouzapw
85f0409f32 docs(ci): omni-queue kill switch is not an immediate stop; close divergence issue before resume
Kill switch and rollback: OMNI_QUEUE_ENABLED is read only in the job
`if`, when a job starts, and nothing in tick.mjs re-checks it before
landing, so a tick already running (and possibly one already pending)
finishes and can still land a green candidate. The runbook called the
flip immediate with "nothing in flight lands". It now says the variable
stops new ticks, and that a real stop means pausing the base and/or
cancelling the in-progress and pending omni-queue runs, then checking
`queue history` and the base tip that nothing landed after the cut
before declaring the rollback done. The "Pause and resume" note points
at the same procedure.

Tree divergence: while the "omni-queue tree divergence: <base>" issue is
open, every squash-api landing pauses the base again (tick.mjs checks
for the issue before each landing), so the recovery steps now close the
issue before `queue resume`.

Addresses CodeRabbit review comments 4570394479 and m14 on PR #20166.
2026-11-14 03:28:33 -03:00
diegosouzapw
35a994e019 fix(merge-queue): keep a newer head's queue label when its old head is the culprit
dequeueCulprit removed the queue label of the tested PR without reading
it again. When the contributor had pushed a new head (and a maintainer
re-approved it) before the red was processed, the label that now
approved the new head was removed, the PR was marked as touched for the
tick, and the culprit comment talked about a head that was gone. The
tick now reads the PR first: if it is open with another head, the label
stays, no comment is posted, and the culprit-found event records "head
moved to <sha12>, label kept". The newer head is then judged by the
normal eligibility rules in the same tick.

Test: tick.test.mjs, singleton culprit whose head moves to an approved
head B before the tick (no removeLabel, no culprit comment, head B is
composed in the same tick).
2026-11-14 03:27:10 -03:00
diegosouzapw
9202cde3f1 fix(ci): serialize omni-queue approval runs per PR and label
The approval job had no concurrency key, so a labeled run and an
unlabeled run for the same PR could interleave their label re-read and
status write: the unlabeled run reads the label as absent, the labeled
run reads it as present and writes success, then the unlabeled run
writes failure. The newest omni-queue/approval status is then failure
while the label is present, and the PR stays blocked until the next
label event.

The job now has
  group: omni-queue-approval-${{ github.event.number }}-${{ github.event.label.name }}
  cancel-in-progress: false
Keyed on the label as well as the PR, because GitHub keeps one pending
run per group and drops the others: a PR-only group would let an
unrelated label event, or the other approval label, replace a pending
"labeled omni-queue" run and lose the approval. A run replaced inside
its own group is superseded by a newer event on the same label, whose
run re-reads the current labels. github.event.number is the PR number of
the pull_request_target payload; it keeps the file free of any
github.event.pull_request reference, which the existing "never checks
out or runs PR code" guard forbids.

Intentional assertion change: workflows.test.mjs asserted
`queue.jobs.approval.concurrency === undefined`, on the premise that
parallel runs converge once approve.mjs re-reads the labels. That
premise is the race above, so the assertion now requires the keyed group
and cancel-in-progress false. The comments in approve.mjs and
omni-queue.yml that described convergence are corrected.

Addresses CodeRabbit review comment m06 on PR #20166.
2026-11-14 03:26:58 -03:00
diegosouzapw
b6c17d3087 fix(merge-queue): pin landing revalidation and admission to the queue's base
A PR retargeted to another managed release branch while its batch was in
CI kept its head and label, so revalidate() passed it: eligibility only
checks that the new base is managed, and its freeze check looked at the
new base. In live merge-ff mode the batch then landed on the old branch,
even under a release-freeze. revalidate() now drops a PR whose fresh
baseRef differs from the queue's base ("base changed to ..."), and
snapshotQueue() skips a fresh snapshot whose baseRef no longer matches
(the list summary can be stale).

Tests: tick.test.mjs, retarget plus freeze on the old base during CI
(nothing lands, land-rejected names the base change), and a stale list
summary at admission (nothing composed).
2026-11-14 03:25:28 -03:00
diegosouzapw
7d8cdb6f2f fix(ci): omni-queue CLI confirms pause/resume and honors OMNI_QUEUE_CONFIG
pause/resume used to dispatch omni-queue.yml and report success at once.
The dispatched run waits in the omni-queue-tick concurrency group, where a
newer (argument-less) tick replaces a pending run, so the pause could be
silently dropped while the CLI said it was requested.

The CLI now confirms delivery against the base's state document on
omni-queue-state: a pause counts once a "paused" event newer than the
newest one read before the dispatch is there and the base is paused; a
resume counts once no pause is left. The watermarks come from GitHub's
data, not the local clock. While waiting it lists the workflow_dispatch
runs of omni-queue.yml created after the request: a run that ends
cancelled is dispatched again, any other non-success conclusion (for
example skipped with the kill switch off) exits 1 at once, and no
confirmation within the timeout (20 min, polled every 10 s) exits 1.
"applied" is printed only after the confirmation. Sleep, timeout and
interval are injectable, so the tests never sleep.

github.mjs gains listWorkflowFileRuns (GET /actions/workflows/<file>/runs,
first page) and the fake GitHub serves that route.

runCli also loads the config from OMNI_QUEUE_CONFIG when no config is
injected, like tick.mjs and approve.mjs, so a sandbox config's label and
bases govern add/remove/status/why; the runbook already said so. The
variable stays a sandbox/test override that the workflow never sets.

Addresses CodeRabbit review comments 4570394491 and m10 on PR #20166.
2026-11-14 03:25:12 -03:00
diegosouzapw
8c2fbe9c0b fix(ci): omni-queue landing-path check reads every page of the branch rules
checkLandingPath read GET /repos/{repo}/rules/branches/{base} with a single
request (per_page=100) and ignored the Link header, so a blocking rule past the
first page was missed and a real apply-ruleset could exit 0. It now uses
gh.paginate, which follows rel="next" and already defaults per_page to 100; the
rule evaluation is unchanged.

Tests (apply-ruleset.test.mjs): the fake gh serves the branch rules as pages
(gh.request only sees the first one; gh.paginate returns all of them). New case
with 100 landing-safe rules on page 1 and a foreign pull_request rule on page 2
expects one blocker (it got zero before the fix). The existing assertion that
the rules endpoint was read now looks for the paginate call instead of a single
request, because the read goes through paginate on purpose.
2026-11-14 03:24:26 -03:00
diegosouzapw
b45c64636e Merge PR #18359 (feat/port-pr-4929-custom-json-dashboard-form) into merge train 2
# Conflicts:
#	src/app/(dashboard)/dashboard/providers/[id]/components/modals/EditCompatibleNodeModal.tsx
2026-11-14 03:22:49 -03:00
diegosouzapw
41f0dabcac fix(ci): omni-queue merge-ff landing push leases the base tip it read
The merge-ff landing push was a plain push without a lease. The local checks
compare the base tip read by ls-remote with the expected base, but a base that
was rewound to an ancestor, or deleted, between that read and the push was not
caught: the push was then a valid fast-forward (bringing the removed commits
back) or a branch creation.

The push now carries --force-with-lease=refs/heads/<base>:<tip read>, with the
refspec still without "+". The ancestry checks keep the update a true
fast-forward; a base that moved forward, was rewound or was deleted after the
read is refused with "[rejected] (stale info)" in --porcelain, which
BASE_MOVED_RE already maps to reason "base-moved". Probed against real git
2.43: a leased fast-forward is accepted even with receive.denyNonFastForwards,
and both the rewind and the deletion produce "stale info" without touching the
ref.

Tests (integration/land.test.mjs, racingGit): new cases for a rewind and a
deletion between the read and the push (both failed before the fix: the push
was accepted). The existing "base moves between the read and the push" case
now expects "stale info" instead of "fetch first" / "non-fast-forward": the
lease refuses the push before git's own fast-forward check, on purpose. The
land.mjs doc comment and the runbook landing-mode row now describe the lease.
2026-11-14 03:22:44 -03:00
diegosouzapw
2d1c72e505 fix(merge-queue): name base-check infra retries with a ref every validator accepts
An infra failure (or timeout) of a base-check built its retry ref with
candidateRef(), which appends the SHA again:
basecheck-<sha12>-r<n>-<sha12>. compose.assertRefNamesSha and
candidate-base.resolveCandidateBase both reject that name, so
pushCandidate threw on every tick and the base stayed wedged on the same
in-flight base-check.

One format now lives in contracts.mjs: baseCheckRef(base, sha, retry)
gives basecheck-<sha12> or basecheck-<sha12>-r<n> (the SHA named once),
and baseCheckSha12(id) is the shared parser that compose.mjs and
candidate-base.mjs use. The tick builds the retry ref with baseCheckRef.

The tick fakes' pushCandidate now applies the real naming rule
(compose.assertRefNamesSha, now exported), so a wedging ref fails the
tick tests instead of passing silently.

Tests: tick.test.mjs drives a base-check infra failure with
infraRetries 1 through to the green retry; contracts, candidate-base and
the compose integration test (real git push) cover the new form and
reject the doubled-SHA name.
2026-11-14 03:22:00 -03:00
diegosouzapw
42fbb5ee5a fix(ci): attribute merge-ff queue landings by PR author in reconcile-changelog
Three CodeRabbit findings on #20166 (scripts/release/reconcile-changelog.mjs):

- m11: a collapsed queue PR was sent to the Dependabot rollup when its
  earliest uncovered commit was bot-authored. Queue rows are now bot or
  human by the PR author (gh login, then the queue trailer author), so a
  human feature PR keeps its bullet and credit and a Dependabot queue PR
  still rolls up.
- m12: readFragments now keeps the queue author (originQueueAuthor) with
  the queue PR number, and reconcile() falls back to the validated queue
  origin for the fragment's PR link and credit when gh has no metadata
  for that PR. gh metadata still wins when present.
- m13: main() read the fragments after collecting extra PR metadata and
  never fetched merge-ff "(#N)" subjects, so a foreign squash merged into
  another base was never in prBy and stayed folded into the queue PR.
  The new collectExtraPrs() helper (fetchPr injected for tests) fetches
  row PRs as before, plus queue.subjectPr and fragment originSubjectPr
  values, and keeps a subject only when its state is MERGED or mergedAt
  is set. fetchPr now requests state,mergedAt.

Tests: three new cases in tests/unit/reconcile-changelog.test.ts and two
new assertions in the merge-queue history-map integration test; all
failed on the previous code. No existing assertion changed.
2026-11-14 03:20:09 -03:00
diegosouzapw
c5145abed3 fix(ci): omni-queue honors server retry waits, dedupes replayed comments, fails closed on truncated file lists
Three CodeRabbit findings on the omni-queue GitHub client (PR #20166):

- retryDelayMs no longer shortens a delay the server asked for (Retry-After or
  x-ratelimit-reset); only the local exponential backoff is capped at
  maxDelayMs. When the server asks for more than maxDelayMs (default 120 s),
  request() throws a GitHubError ("retry after N s (over the ... retry cap)")
  at once instead of sleeping the cap and retrying while still limited; the
  next tick tries again. The existing retryDelayMs assertion that
  "retry-after: 999999" yields maxDelayMs changes on purpose: the server
  delay is now returned as is (999_999_000 ms).

- commentOnce now removes every newer copy of its marker comment written by
  its own login (botLogin, or the author of the comment this call created),
  keeping the lowest id. Before, two POSTs that GitHub applied before
  answering 502 left two duplicates, because only the id returned by the
  last attempt was deleted. A marker comment by another login is never
  deleted.

- The file manifest of a PR fails closed. getPull now carries GitHub's
  changed_files (changedFiles) and listPullFileManifest returns the listed
  entries count beside the paths (listPullFiles keeps its shape).
  snapshotPull sets filesComplete = listed >= changedFiles (false when the
  count is missing), and evaluateEligibility treats an incomplete manifest
  as a protected surface: the PR needs protected-approved
  (protected-approval-missing, detail "file list incomplete"). GitHub stops
  listing at 3,000 files, so a protected path past the cap can no longer
  skip the second approval.

Tests: github.test.mjs (server wait over the cap, two replayed POSTs,
third-party marker kept, manifest count and the 3,000-file cap),
eligibility.test.mjs (incomplete manifest), tick-e2e scenario 8b (a PR
with 3,001 files stays out of the batch). The fake GitHub now reports
changed_files and lists at most 3,000 files per PR, like GitHub; the tick
fakes gain changedFiles and listPullFileManifest.
2026-11-14 03:17:11 -03:00
Diego Rodrigues de Sa e Souza
368013961d Merge pull request #20132 from cheaper-inference/fix/merge-train-20261113
chore(release): merge train of 33 owner PRs for v3.8.54 (2026-11-13)
2026-11-14 03:16:33 -03:00
diegosouzapw
8dd4b89ece fix(merge-queue): reject history events whose prs is not a PR-number list
validateState accepted a history event such as {type: "landed", prs: {}}.
createStateStore.load() then handed it to the tick, and the dashboard
crashed iterating event.prs, which wedged every tick of that base before
the state save. When an event carries prs it must now be an array of
positive safe integers; events without prs are still accepted.

Tests: contracts.test.mjs (validateState cases) and state.test.mjs
(load refuses the document with "history[]").
2026-11-14 03:16:31 -03:00
diegosouzapw
9a23e38023 Merge PR #18353 (feat/port-pr-4929-custom-json-provider-node) into merge train 2
# Conflicts:
#	AGENTS.md
#	src/app/api/provider-nodes/[id]/route.ts
2026-11-14 03:13:00 -03:00
diegosouzapw
ee0b8ef037 fix(ci): omni-queue classify compares tests across shards and skips aggregate gates
CodeRabbit review of #20166 (classify front):

- Base-red matching compared whole per-run keys ("a | b"), so the same
  failing tests grouped into different shards on base and candidate never
  matched and the batch took the PR-red path (culprit / bisection). The
  matcher now builds, per normalized check, the union of failing test/gate
  identifiers of the base check and matches a candidate failure when every
  identifier of its key is in that union. Empty keys keep the name-only
  rule (empty matches empty only).
- The always() gates "Gate / CI" and "Gate / Quality" fail with no test
  named whenever a job they need fails, so a timed-out job plus its gate
  failure was classified PR-red instead of infra. New config key
  aggregateChecks (validated in config.mjs, passed by tick.onRed to every
  classifyRed call) lists them; an aggregate failure with an empty key is
  ignored when any other check failed too. A gate failing alone, or one
  that names its own failure, still blocks.
- validateConfig accepted non-string approvers (null, 123, true) because
  LOGIN_RE.test coerces them; blockLabels had the same gap. Both item
  validators now require typeof string, matching the Zod schema.

No existing assertion changed; the Zod schema in config.test.mjs gains
aggregateChecks to mirror the new required key.
2026-11-14 03:10:34 -03:00
diegosouzapw
e746067440 fix(ci): keep omni-queue/** PR heads off secrets and the self-hosted pool
On a pull_request event github.ref is refs/pull/<n>/merge, so the
`!startsWith(github.ref, 'refs/heads/omni-queue/')` guards only matched
candidate pushes. A same-repository PR opened by hand from a live candidate
ref still received TRUNK_TOKEN (both Trunk upload steps), the SonarQube job
env, and the self-hosted runners (quality.yml lint-guard on omni-light,
ci.yml test-unit and test-vitest on omni-ci).

Each of those expressions now also requires
`!startsWith(github.head_ref, 'omni-queue/')`. head_ref is empty on push and
merge_group, so those events, Mergify queue drafts (mergify/merge-queue/*)
and ordinary same-repository PRs keep their current selection. Only those
guard expressions change in ci.yml and quality.yml.

workflows.test.mjs gains a prContext helper (queueCandidate computed by
ci.yml's own expression) and evaluates runs-on and the service-secret
exposure scan under a ready PR whose head is a candidate branch, with
Mergify, plain PR, push and merge_group controls. labelsOf moved to module
scope and the exposure helper takes a context instead of a ref; no existing
assertion changed.

The scheduledJobs helper now visits every dependency before building the
needs context (needs.map(visit).every(Boolean)): needs.every(visit)
short-circuited and reported later, unvisited dependencies as skipped. A
synthetic workflow test covers it.

Addresses CodeRabbit review comments 4570394463, 4570394472 and m08 on
PR #20166.
2026-11-14 03:07:00 -03:00
diegosouzapw
61d8566911 Merge PR #19771 (recut/18731-capability-combo-routes) into merge train 2
# Conflicts:
#	open-sse/handlers/webFetch.ts
#	src/shared/validation/schemas/apiV1.ts
2026-11-14 02:52:53 -03:00
diegosouzapw
241a0d71e0 Merge PR #16864 (feat/port-pr-3604-new-models-inbox) into merge train 2
# Conflicts:
#	AGENTS.md
2026-11-14 02:46:10 -03:00
diegosouzapw
f0a64508b9 ci: run the migration gate even when an earlier lint gate fails
check:migration-numbering sits in the lint job after
check:provider-asset-provenance. While that one is red on the base, every
step after it is skipped, so the migration gate never ran on PRs. It is
the check that keeps a migration from being re-applied or skipped on a
user's database, so it now runs unless the job was cancelled.
2026-11-14 02:45:16 -03:00
diegosouzapw
3d98ab7a82 Merge PR #18793 (feat/readme-followups-1102) into merge train 2 2026-11-14 02:45:16 -03:00
diegosouzapw
a08e83c87a Merge PR #19641 (recut/17920-keenable-search) into merge train 2 2026-11-14 02:45:14 -03:00
diegosouzapw
4f64190242 Merge PR #19326 (feat/pii-token-vault-wiring-1108) into merge train 2 2026-11-14 02:45:12 -03:00
diegosouzapw
6d191e353c Merge PR #19779 (recut/18546-chatgpt-csp-bridge) into merge train 2 2026-11-14 02:45:10 -03:00
diegosouzapw
d4c413a179 Merge PR #19726 (fix/18425-codex-failover-quota-preflight) into merge train 2 2026-11-14 02:45:08 -03:00
diegosouzapw
ab0af4535d Merge PR #19650 (fix/tokenizer-linear-guard-1110) into merge train 2 2026-11-14 02:45:06 -03:00
diegosouzapw
32991f7050 Merge PR #19637 (fix/chat-ingest-budget-growth-1110) into merge train 2 2026-11-14 02:45:03 -03:00
diegosouzapw
048b4bc2fa Merge PR #17337 (docs/17187-policy-docs-20261020) into merge train 2 2026-11-14 02:45:01 -03:00
diegosouzapw
1471f5b5ec Merge PR #19820 (recut/19206-providers) into merge train 2 2026-11-14 02:44:58 -03:00
diegosouzapw
1cf314adaa Merge PR #19722 (fix/18772-quota-countdown-clock) into merge train 2 2026-11-14 02:44:56 -03:00
diegosouzapw
6dfae9a1ff Merge remote-tracking branch 'origin/feat/derived-p1-gate-modes' into chore/derived-p2-counts-out-of-instructions 2026-11-14 02:18:39 -03:00
diegosouzapw
f7c697fe85 Merge remote-tracking branch 'origin/release/v3.8.54' into feat/derived-p1-gate-modes 2026-11-14 02:18:24 -03:00
diegosouzapw
ec2e88c2a8 Merge remote-tracking branch 'origin/release/v3.8.54' into refactor/derived-p0-stryker-description
# Conflicts:
#	stryker.conf.json
2026-11-14 02:15:49 -03:00
diegosouzapw
154c0de8f2 Merge remote-tracking branch 'origin/feat/derived-p1-gate-modes' into chore/derived-p2-counts-out-of-instructions 2026-11-14 01:54:48 -03:00
diegosouzapw
20f1186a90 ci: the nightly derived refresh opens its PR with I18N_REFRESH_TOKEN when no dedicated token is set
Owner decision 2026-11-13: reuse the robot token the i18n mirror refresh already opens its PR with (Contents + Pull requests: write) instead of waiting for a new secret. DERIVED_REFRESH_PR_TOKEN still wins when set; with neither, the branch is pushed and the run summary says so.
2026-11-14 01:53:43 -03:00
diegosouzapw
db6062e2f8 Merge release/v3.8.54 into merge train 2026-11-14 01:53:05 -03:00
Diego Rodrigues de Sa e Souza
2a6cb25e15 fix(security): require management auth on skill write routes in every mode (#19951)
Security fix; failing checks at merge were the inherited base reds (provider-asset-provenance, useModelImportHandlers, advisory forgotten-sibling-tests crash). Unit shard 3/8 passed 9301/9301 and was cancelled by the job time limit while uploading its coverage artifact.
2026-11-14 00:37:31 -03:00
Diego Rodrigues de Sa e Souza
49a288e557 fix(security): keep a caller SearXNG base URL on public hosts (#19946)
Security fix; failing checks at merge were the inherited base reds (provider-asset-provenance, useModelImportHandlers, advisory forgotten-sibling-tests crash). fal-native-panel failed in CI but passes 20/20 locally with this change and does not touch search.
2026-11-14 00:02:46 -03:00
Diego Rodrigues de Sa e Souza
5dde9878a8 fix(security): send self-dispatching executors through the dispatch guard (#19974)
Security fix; failing checks at merge were the inherited base reds (provider-asset-provenance, useModelImportHandlers, advisory forgotten-sibling-tests crash).
2026-11-14 00:00:52 -03:00
Diego Rodrigues de Sa e Souza
1f2d35cafa fix(security): keep MCP HTTP callers off the env-key principal (#19971)
Security fix; failing checks at merge were the inherited base reds (provider-asset-provenance, useModelImportHandlers, advisory forgotten-sibling-tests crash).
2026-11-14 00:00:37 -03:00
diegosouzapw
e712a6e011 fix(db): keep the migration gate tests green once real timestamped files exist
The final verification found that the first real timestamped migration
would have turned three of the new tests red:
- the generator test checked the real directory with a fixed clock
  (2026-11-13T12:00Z), so any real migration dated later read as "in the
  future". It now uses one second after the newest real stamp;
- two gate e2e tests copied every real migration into their synthetic
  bases, so the fixed synthetic stamps were no longer the newest. The
  synthetic bases now take only the legacy NNN_ files.
Both files honor OMNIROUTE_TEST_MIGRATIONS_SOURCE_DIR and joined the guard
test that re-runs them against a copy holding a real timestamped migration.
Without the fix that guard fails on exactly those three tests.

The self-contained gate e2e copies src with dereference, so a symlinked
checkout can never receive the test's constants.ts writes.

--base-latest-tag:
- in a repository with no pure vX.Y.Z tag (the Enterprise one only carries
  vX.Y.Z-ee.N tags) it compares with the newest -ee tag instead of failing;
- against a tag, every file since it is already merged, so the gate and the
  checker (new --merged-base flag) say "fix forward with a new migration"
  instead of "rename" or "new stamp".

MIGRATION_BASE_REF and MIGRATION_COMMUTATION_SCRIPT (test-only) are
documented in .env.example and ENVIRONMENT.md. CODEBASE_DOCUMENTATION.md
and two test messages no longer talk about sequential numbers. A stale
contract comment in migration-commutation.ts now names C1.
2026-11-13 23:46:52 -03:00
diegosouzapw
368a302a6b docs(changelog): add the fragment for the timestamped migration names 2026-11-13 22:26:35 -03:00
diegosouzapw
f4df1bfa9f fix(db): close the gaps an adversarial review found in the migration gate
Commutation check (scripts/check/migration-commutation.ts, migrationSchemaBoot.ts):
- compares the normalized CREATE TABLE text of every table as well, so CHECK,
  COLLATE, generated columns, AUTOINCREMENT and table options count. Items are
  sorted, so independent ADD COLUMNs still commute. One normalizer (case outside
  literals, whitespace, simple identifiers unquoted) now serves tables, indexes,
  triggers, views and column defaults. A DEFAULT keeps the case of its value, and
  blob hex digits compare case-insensitively;
- a PR migration that fails to apply in a boot no longer reads as an
  infrastructure error: it exits 1 with the path and the file. The hint depends
  on the case. A failure after the whole base means fixing the SQL (or a new
  stamp if it depends on a later migration of the same PR). A failure on a fresh
  install only means a new stamp;
- --must-not-apply <file>: a ledger-insert probe records what the second
  upgraded boot really applied, and a renamed migration that the runner would
  apply again fails the check.

Gate against the base (check-migration-numbering.mjs, migrationBaseDiff.mjs):
- removing a merged migration still fails, with a recipe for reverts (keep the
  file and undo the schema in a new migration). A rename passes only with a
  RENAMED_MIGRATION_COMPATIBILITY entry, identical content and another version.
  It always runs the commutation check, with the new name in --must-not-apply.
  A rename that keeps the version fails, because the runner re-applies it;
- an edited merged migration runs the commutation check and fails if the final
  schema changes;
- an old-format file added below the base's newest old one fails;
- out-of-order, edited or renamed migrations with DML get a warning, since the
  check does not compare data;
- --base-latest-tag compares with the newest vX.Y.Z tag in HEAD's history.
  Release-Green's hard migration-numbering step uses it, so a non-commuting pair
  that lands through a manual merge is still caught.

The runner's collision message matches what the gate accepts and points to
docs/ops/DATABASE_GUIDE.md, which documents all of the above.
2026-11-13 22:22:31 -03:00
Diego Rodrigues de Sa e Souza
e92f3801b3 fix(security): persist only the key-health slice and honor cooldown on sticky keys (#19975)
Security fix; failing checks at merge were the inherited base reds (provider-asset-provenance, useModelImportHandlers, advisory forgotten-sibling-tests crash).
2026-11-13 22:06:12 -03:00
Diego Rodrigues de Sa e Souza
b113ea2cb5 fix(security): keep the private_key credential pattern linear (#19954)
Security fix; failing checks at merge were the inherited base reds (provider-asset-provenance, useModelImportHandlers, advisory forgotten-sibling-tests crash).
2026-11-13 22:06:04 -03:00
Diego Rodrigues de Sa e Souza
808464a3d4 chore(dashboard): sync CI UI Kit to 0.0.115 and adopt destructive-ghost, Progress bands, live Stat and table scroll labels (#20163)
* chore(dashboard): sync vendored CI UI Kit to v0.0.115

Snapshot 940b0d28 (kit 2026-11-13) via scripts/dev/sync-ui-kit.sh latest.
Brings Button destructive-ghost (#197), Progress bands + info tone (#198),
focusable overflowing Table container (#200), Stat animateFrom + warning
tone (#199), notification card/feed, setup-layout aside and benefits footer.
No new runtime dependency.

* feat(dashboard): use the kit destructive-ghost Button for inline deletes

Kit 0.0.110 (#191) added a quiet destructive variant. The Button adapter
maps destructive-ghost onto it, and the 22 ghost buttons that drew error
ink at rest for delete/remove/revoke actions (proxy, API key, invite,
relay token, webhook, connection, cache entry, ACP agent, ...) use it
instead of hand-made text-error/hover:bg-error classes.

A source guard fails on any new ghost Button with error ink at rest;
status-coloured ghost buttons are listed with their reason.

Refs #19620

* feat(combos): count Combo Studio run numbers from the previous value

Kit 0.0.115 (#189) adds Stat animateFrom="previous" and a warning tone.
The run summary numbers were static on purpose because the ticker
restarted from zero on every attempt event; targets and failed attempts
now count on from the number on screen. A run still in progress shows
its outcome in the warning tone instead of the neutral one.

Refs #19620

* feat(usage): draw the Kilo Pass meter with kit Progress bands

Kit 0.0.112 (#190) adds allocation bands with their own tracks and an
info tone. KiloPassMeter drops its hand-made bar: the paid and bonus
pools are kit bands (success and info), each sized by its capacity with
its own used fill and legend, paid credits spent first. Each band is a
named progressbar inside a group named by the meter label; the header
text, legends, remaining, renewal and balance rows are unchanged. A zero
total still draws an empty determinate bar.

Refs #19620

* fix(analytics): name the overflowing table scroll containers

Kit 0.0.114 (#192) makes an overflowing Table container focusable and
exposes it as a region only when it has a name (scrollLabel, caption or
the table aria-label). The analytics tables only passed scrollbarLabel,
which names the persistent scrollbar, so on a phone their containers
would be focusable but unnamed. ModelTable, ApiKeyTable, ProviderTable,
RequestCountTable (new optional tableLabel, set to the section title)
and the Cache Health by-model table now pass scrollLabel.

Refs #19620

* test(combos): the running Combo Studio outcome uses the kit warning tone

design-kit-bridge pinned running = default because the kit Stat had no
warning tone; kit 0.0.115 (#189) added it and the studio now uses it.

Refs #19620

* fix(usage): translate the Kilo Pass band usage text

The kit band valueText (spoken value of each progressbar) was built with
an English "of". It now goes through a new usage.kiloPassBandUsage
message with used/total placeholders, added to all 67 catalogs, with the
English string as fallback. CodeRabbit review on #20163.

Refs #19620
2026-11-13 21:40:29 -03:00
diegosouzapw
2b68445d21 docs(ci): omni-queue runbook records what the sandbox rehearsal proved
- the exact Actions policy (REST payload) the rehearsal ran under
- waiting ticks replacing each other show up as cancelled runs
- the cron is a safety net: a fresh repository may not start it for a long time
- the CLI evaluates with the local config file
2026-11-13 21:27:34 -03:00
diegosouzapw
ed4d5987ef Merge PR #18350 (feat/port-pr-4999-compatible-quota-check) into merge train 2026-11-13 19:55:37 -03:00
diegosouzapw
4627aa57b6 Merge release/v3.8.54 into merge train 2026-11-13 19:55:33 -03:00
diegosouzapw
e0e8d33c75 test(usage): settle providers-route follow-ups in the compatible quota suite
The base guard provider-route-follow-ups-guard requires every test that drives
POST /api/providers to settle its tracked follow-ups after each test.
2026-11-13 19:53:15 -03:00
diegosouzapw
595880a2c7 Merge release/v3.8.54 into feat/port-pr-4999-compatible-quota-check 2026-11-13 19:51:16 -03:00
diegosouzapw
05eecc3196 chore(changelog): name the phase-2 fragment after its PR (#20162) 2026-11-13 19:35:10 -03:00
diegosouzapw
67e3f37b89 docs(ci): omni-queue workflow header matches the current pull_request_target behaviour 2026-11-13 19:34:57 -03:00
diegosouzapw
ca09c043b4 Merge remote-tracking branch 'origin/feat/derived-p1-gate-modes' into chore/derived-p2-counts-out-of-instructions 2026-11-13 19:34:01 -03:00
diegosouzapw
4ae5666148 Merge remote-tracking branch 'origin/release/v3.8.54' into feat/derived-p1-gate-modes 2026-11-13 19:33:43 -03:00
diegosouzapw
9cbdc98c91 docs(ci): omni-queue runbook covers the final behaviour and the pull_request_target policy
- Workflows permission for the App, with the reason
- approval status on the event head, level-triggered jobs, 6 h status window
- skip markers disarmed, stacked PRs, AI attribution over the candidate range
- only runs of the candidate ref count; no CI run after 45 min is a timeout
- PRs already in the base leave the queue
- the Actions policy a public repository needs for pull_request_target from
  December 2, 2026, with incident and cut-over steps
- test: the real workflow never sets the tick's test/sandbox overrides
2026-11-13 19:07:56 -03:00
diegosouzapw
5ab6895a9c chore(ci): integrate omni-queue INT (cross-module gaps and end-to-end tick test) 2026-11-13 19:05:07 -03:00
diegosouzapw
9c1bff2bc2 fix(ci): close omni-queue cross-module gaps and add an end-to-end tick test
- github.listCheckRuns fills headBranch from the commit's check suites, so
  the tick reads only the runs of the candidate ref
- the tick client counts only the App's own comment markers (botLogin)
- landMergeFf receives the in-flight PRs, so stacked PRs count as merged
- composeCandidate's alreadyInBase PRs leave the queue once (labels off,
  one comment per head, pr-dequeued already-in-base); alreadyContained
  PRs land with their batch
- batch-started events carry labeledAt for the dashboard metrics
- checks: no GitHub Actions run 45 min after the push is a timeout with
  reason no-ci-run, handled through the infra path
- approve.mjs is level-triggered: the current label set decides before a
  status is written, always on the head of the event payload
- createTickDeps builds the deps exactly as main() does; GITHUB_API_URL
  and the tests-only OMNI_QUEUE_REMOTE_URL are honoured
- tick-e2e: ten scenarios with the real modules against a fake GitHub
  and a bare origin (compose, land, shadow, bisection, base moved,
  conflicts, approvals, protected paths, release freeze, dry-run)
2026-11-13 19:04:38 -03:00
diegosouzapw
efb75cc91c Merge remote-tracking branch 'origin/feat/derived-p1-gate-modes' into chore/derived-p2-counts-out-of-instructions 2026-11-13 19:03:18 -03:00
diegosouzapw
7592d0a115 chore(changelog): name the phase-1 fragment after its PR (#20161) 2026-11-13 19:02:35 -03:00
diegosouzapw
c41eb0d27e chore(docs): keep the skills table column width (only the three edited rows change) 2026-11-13 18:53:08 -03:00
diegosouzapw
a780923703 feat(ci): agent-instruction files carry no derived counts (invariant)
check:docs-counts drops AGENTS.md, llm.txt, the services guide and the skills from the derived
count checks (README.md and the docs keep them) and adds one STRICT invariant per
agent-instruction file — AGENTS.md, llm.txt, the bs fork (Bosnian patterns), the services guide,
agentSkills.ts, skills/README.md and every skills/*/SKILL.md — that fails any provider,
migration, MCP-tool, scope, strategy, scoring-factor or mode-pack count there, in both gate modes.
It reuses the gate's own claim patterns, now named constants.

Tests: #15159 DOC-01 now proves the instruction files point to the strategy registry and carry
no count or inline list (the AUTO-COMBO.md table is still checked against the code); the skill
provider-count test proves descriptions and generated skills are count-free and that the
invariant rejects a count; the provider-count coverage test checks the skill surfaces through
the invariant. QUALITY_GATES.md documents it; changelog fragment.
2026-11-13 18:50:39 -03:00
diegosouzapw
efe3a6a3fd chore(docs): agent-instruction files point to the source instead of derived counts
Plan 2026-11-13 (derived numbers resolved only at release), phase 2. AGENTS.md, llm.txt and its
66 docs/i18n copies, the bs AGENTS.md fork, open-sse/services/AGENTS.md, agentSkills.ts (and the
three skills generated from it), skills/README.md and the curated skill blocks no longer state the
provider, migration, MCP-tool, MCP-scope, routing-strategy, scoring-factor or mode-pack counts.
They point to the source (ROUTING_STRATEGY_VALUES, DEFAULT_WEIGHTS, src/lib/db/migrations/) and
to `npm run facts`, and AGENTS.md says so once. The inline strategy lists go too: llm.txt's had
already lost `expiry-first`, and the bs fork still said 381 providers, 228 migrations and
20 strategies.

On 2026-11-13, 37 open PRs edited AGENTS.md's count lines and 36 those of llm.txt (dragging the
66 copies); after this change feature PRs have nothing there to edit, and the release refresh
never has to rewrite an agent-instruction file.
2026-11-13 18:50:17 -03:00
diegosouzapw
976e9a568e Merge PR #20155 (fix/deps-hono-4-13-16-1113) into merge train 2026-11-13 18:32:05 -03:00
diegosouzapw
6317ace7f4 chore(changelog): name the phase-0 fragment after its PR (#20157) 2026-11-13 18:22:41 -03:00
diegosouzapw
5568c569c6 Merge remote-tracking branch 'origin/release/v3.8.54' into feat/derived-p1-gate-modes 2026-11-13 18:20:58 -03:00
diegosouzapw
85e751093c chore(release): drop the exact provider count from the package description
The npm description carried the live provider total, so every provider PR
rewrote the same line and 25 open PRs conflicted on it alone. Use a
count-free wording (also in flake.nix, which had drifted to 160+) and turn
the docs-counts check into a STRICT guard that rejects an exact provider
count in the description instead of requiring the live one.
2026-11-13 18:20:46 -03:00
diegosouzapw
7e19cff3bd Merge PR #20156 (fix/release-v3.8.54-basereds-request-logger-timers) into merge train 2026-11-13 18:19:13 -03:00
diegosouzapw
fd5b362f67 Merge PR #19951 (fix/skill-write-routes-auth-1111) stryker fix into merge train 2026-11-13 18:19:11 -03:00
diegosouzapw
a3f1f2da3e test(security): list the skill write route test in the Stryker test files
tests/unit/skill-write-routes-always-protected.test.ts covers src/server/authz/routeGuard.ts, a mutated module, so check:mutation-test-coverage --strict requires it in stryker.conf.json tap.testFiles.
2026-11-13 18:18:19 -03:00
diegosouzapw
f0d448b39b Merge remote-tracking branch 'origin/release/v3.8.54' into refactor/derived-p0-stryker-description 2026-11-13 18:14:40 -03:00
diegosouzapw
10dcb61b4f fix(dashboard): clear the request detail copied-state timers on unmount
StreamSection and RequestLoggerDetail started a 2 s setTimeout to reset their copied flag and never cleared it. When the Vitest worker outlived jsdom by two seconds, the timer fired after teardown and threw "window is not defined" as an unhandled error, so test:vitest:ui exited 1 with every test green (base-red, #19329). A small useTransientFlag hook keeps the timer in a ref and clears it on unmount. Two new tests fail on the old code (one reset timer left pending after unmount) and pass now.
2026-11-13 18:13:52 -03:00
diegosouzapw
bbccd612d2 fix(ci): close the review findings on the derived-numbers phase 1
Adversarial review of this branch, each finding reproduced before the fix:

- Coverage floor in pr mode: the locator read any four slash-separated numbers, so editing the
  provider breaker's HTTP status list in AGENTS.md (`408/500/502/503/504`) failed as "edited a
  managed value". The diff and the rewrite plan now use only tuples that can be percentages;
  the release validator is unchanged.
- Merge train: its detached worktree cannot tell a writer branch (the nightly refresh PR, a
  translation wave) from a feature, so a train boarding one went red on legitimate rewrites. The
  gate honours OMNIROUTE_GATE_BATCH=1 (skip the managed-value diff, like merge_group) and the
  train declares itself a batch.
- workflow_dispatch on a feature branch ran the docs jobs in strict release mode, red by design:
  those steps now set OMNIROUTE_GATE_MODE=pr when the dispatch is not on main or release/v*.
- i18n-mirror-refresh (schedule) ran check:docs-all in release mode and stopped opening the
  mirror PR whenever the base was behind the code: its docs check runs in pr mode (same line as
  the phase-4 PR, coordinated with that session).
- Nightly refresh: a run with no diff now closes the robot's stale refresh PR (a hand-pushed
  tip is only reported).
- Refresh: the plan lists the README mirrors' database row before README.md, so mirrors were
  rewritten first, the relay found nothing to carry and 66 locales turned into drifted targets.
  Sources now go first, a mirror the plan rewrote counts its rewrites as carried (local digits
  included), and a mirror is certified in sync only when every change reached it; a locale that
  was already stale keeps its source hash.
- The snapshot test judged release-only checks (provider reference vs live modules) against the
  snapshot, which a provider PR that regenerates PROVIDER_REFERENCE.md would break; it now judges
  the derived and invariant checks only, with a floor on how many it judges.
2026-11-13 18:13:10 -03:00
diegosouzapw
e6357e852c fix(deps): bump hono to 4.13.18 past five new advisories
Raises the hono override floor from ^4.13.13 to ^4.13.16, the first fixed
version, and moves the lockfile to 4.13.18.
2026-11-13 18:04:15 -03:00
diegosouzapw
fdd410a7ee fix(ci): reconcile the static profile audit:deps entry with the audit script on the merge train
#18154 pins the old inline npm audit command for audit:deps in config/quality/release-green-static-profile.json; #18156 moves package.json audit:deps to node scripts/quality/audit-dependencies.mjs. Each PR is green alone; combined, validateFullCiProfile rejects the stale pin (Invalid or stale full static gate: audit:deps). Point the pin at the new entrypoint. tests/unit/build/release-green-static-profile.test.mjs: 15/15.
2026-11-13 18:00:09 -03:00
diegosouzapw
942f9419f0 Merge release/v3.8.54 (82f60e5ef6) into merge train 2026-11-13 17:59:27 -03:00
diegosouzapw
e78c2de871 fix(quality): gate-mode skip report ignores the test-masking self-test fixtures
check-test-masking.test.ts quotes releaseOnlyUnlessTouched( as fixture text, so the new
report-only block listed the gate's own test. It now skips the self-test family, the same
exclusion the tautology counters already apply; covered by a new test.
2026-11-13 15:40:32 -03:00
diegosouzapw
a554be9840 test(quality): keep skip-marker literals out of a test-masking test comment
The comment of the new gate-mode skip tests quoted the skip modifier call and the literal
true skip option; countSkips() reads raw text, so check:test-masking flagged the comment as
two new skips. Reworded without the literals; no assertion changes.
2026-11-13 15:37:43 -03:00
diegosouzapw
a02033826c docs(i18n): contributor docs and the PR template follow the en.json-only rule
The contribution golden path still told feature PRs to keep the en/pt-BR
CLI catalogs aligned and put i18n:sync-ui:dry and a release-mode value-drift
run in the local loop, which reports every key the cycle added and pushes
the author to edit locales. The feature PR template asked for strings in
"the i18n catalogs", and the translate-new-keys.sh header said a branch that
adds keys must translate them before its PR opens.

Now: a feature PR edits en.json only and previews CI with --mode=pr; the
template asks for en.json only; translate-new-keys.sh names its callers
(release refresh, translation waves). I18N.md and QUALITY_GATES.md document
the changed-catalog judgment of pr mode, the placeholder-rename case (prefer
a new key) and localeParityMode.ts as the only sanctioned mode-conditional
skip; the ci.yml i18n UI Coverage comments and step names say the same.
2026-11-13 15:35:16 -03:00
diegosouzapw
d9a37a2a95 docs(quality): describe where the edited-artifact check really runs
Review findings: docs/diagrams/README.md (12 rows + the workflow note) and DESIGN_SYSTEM.md
still said a stale SVG fails test-unit in every PR, and QUALITY_GATES.md promised 'only an
SVG the PR edits' in test-unit, where the shallow PR checkout has no base, and called release
mode byte-for-byte identical although check:agent-skills-sync prints one added mode line.

The docs now say: release mode fails a stale SVG; in a PR, check:generated-artifacts (full
history, fail-closed) judges an edited SVG; the unit tests skip with base-unresolved in
test-unit; release mode adds at most one mode line; the new check is not wired into ci.yml
yet. The changelog fragment mentions the new check and the test-masking report.
2026-11-13 15:24:46 -03:00
diegosouzapw
c20f9d67cb feat(quality): test-masking reports gate-mode conditional skips instead of a bare OK
Review finding: the README SVG / e2e-timings tests moved from t.skip() to
{ skip: releaseOnlyUnlessTouched(...) }, which countSkips() does not see (it matches only
.skip( and { skip: true }), so check:test-masking answered a plain OK for 13 assertions that
a PR run can skip.

countModeConditionalSkips() counts releaseOnlyUnlessTouched( calls per changed/renamed test
file; a net increase is printed on its own report-only block naming each file and where the
edited-artifact comparison runs in a PR (check:generated-artifacts). It does not fail the
gate: whether a mode-conditional skip should block is the owner's decision. countSkips()
and every existing signal are unchanged.
2026-11-13 15:20:15 -03:00
diegosouzapw
3310d89b94 feat(db): compare migrations with the base and check that out-of-order ones commute
On pull_request, pull_request_target and merge_group runs the numbering gate
now compares src/lib/db/migrations with the base (the first parent of the
merge ref, merge_group.base_sha, or the merge-base with origin/<base>), and
fails closed when no base can be resolved:

- a migration that exists on the base and is gone or renamed fails: users
  already ran it, and a renamed file would run again;
- a migration whose content changed on the base is a warning annotation;
- a timestamped migration added with a timestamp not newer than the base's
  newest runs scripts/check/migration-commutation.ts, which builds an upgraded
  database (base, then the PR) and a fresh one (everything in order) through
  the real install path and compares tables and columns (column order
  ignored), UNIQUE/PRIMARY KEY/FOREIGN KEY constraints, indexes, triggers and
  views. The gate fails only if they differ and asks to regenerate the name.

The gate also rejects every directory entry that is not a regular, valid .sql
file (directories, symlinks, .SQL, trailing spaces, backups), never lets
KNOWN_GAPS release the first or last legacy file, and gives each anomaly its
own hint. The generator re-reads the directory after writing and moves on if
another file took the same second, and checks "not in the future" against the
real clock even with --now.

DATABASE_GUIDE covers converting an open PR's NNN migration (including the
compatibility entry), never deleting or renaming a merged migration, never
backporting a timestamped file to a branch older than the cutover, and what
the gate does against the base.
2026-11-13 15:18:51 -03:00
diegosouzapw
6c23b070ed fix(db): let renamed migrations reach a timestamped slot, harden ordering tests
RENAMED_MIGRATION_COMPATIBILITY could not express "240_x became <stamp>_x":
reconciliation required the old slot to be taken by another file, and the
legacy series is frozen at 239, so slot 240 stays empty and a database that
ran the PR build would apply the migration a second time. An entry whose
destination is a 14-digit timestamp is now eligible when no file on disk is
(fromVersion, fromName) any more. Entries with a three-digit destination keep
the original rule; none of the current 107 entries changes behaviour.

The runner's collision error and the fresh-database hint now say to rename
only a migration that is not merged yet, and otherwise to create a new one.
compareMigrationVersions treats a NULL ledger version as "".

The ordering, runner and fresh-database tests no longer assume the real tree
has no timestamped migration: synthetic stamps sort after every real one and
the assertions are scoped to them. A guard test re-runs those files, and the
numbering gate tests, against a copy of the real directory that already holds
a timestamped migration. Release-Green runs check:migration-numbering before
the fresh-database step.
2026-11-13 15:16:23 -03:00
diegosouzapw
e6b75f7471 feat(ci): check:generated-artifacts judges an edited generated file with full history
Review finding: in PR CI the README SVG byte comparison and the e2e-timings completeness
never ran, not even for an SVG the PR edited. test-unit checks out a shallow merge ref with
no base, so resolvePrDiffBase() returns null and releaseOnlyUnlessTouched() skipped
(reason=base-unresolved). A PR allowed by the generated family's companions (generator +
regenerated SVG) passed with a wrong or hand-edited SVG.

- scripts/check/check-generated-artifacts.mjs (npm run check:generated-artifacts): the 12
  README diagrams plus the e2e timings seed. release = every artifact strict (what the unit
  tests check); pr = only the artifacts the change edits; pr without a diff base = every
  artifact strict (fail-closed). Meant for a job with fetch-depth: 0 (the lint job, next to
  check:agent-skills-sync); wiring it there is requested from the job's owner.
- resolveDerivedScope() gains onUnresolved: "skip" (default, unit tests) | "strict".
- The unit tests' base-unresolved skip reason now names the check that owns the comparison.
- gate-manifest: new alias, separately-invoked.
2026-11-13 15:15:33 -03:00
diegosouzapw
5ffce6416f feat(i18n): syncUiKeys rejects unknown locales; a dry run lists the compact catalogs
Two gaps of the programmatic API the release refresh calls:

- a locale code outside the set it would process (typo, missing from
  config/i18n.json, no catalog file, or en) was dropped silently and the
  run reported nothing to do; it now throws before writing anything;
- a dry run left out the src/i18n/global-error-messages/*.json files a real
  run writes (2 listed vs 5 written in the review fixture). The compact
  catalogs are now rendered in memory (renderGlobalErrorCatalog, extracted
  from generate-global-error-messages.mjs, whose output is unchanged), so
  dry and real runs report the same changedFiles.
2026-11-13 15:12:19 -03:00
diegosouzapw
5df6400189 fix(ci): check AI attribution over the omni-queue candidate range
merge-ff landing keeps the contributors' commits as they are (no squash
rewrites their messages), so the Hard Rule #16 range check that PRs run
also runs on every omni-queue/** candidate, from its Omni-Queue-Base to the
pushed head. The step name is quoted so YAML keeps the full name.
2026-11-13 15:12:11 -03:00
diegosouzapw
013c396914 test(i18n): placeholder parity leaves English the PR rewrote to the release refresh
A feature PR that renames a placeholder in en.json only ({count} rows ->
{rows} rows), which is what the new rule tells it to do, failed two unit
tests in pr mode: "every locale keeps the placeholders and tags its English
source defines" and "Vietnamese locale preserves every ICU placeholder
name". Correcting the translations instead is refused by
check:pr-derived-paths, so the PR had no way out (review of 2026-11-13).

tests/_helpers/localeParityMode.ts gains placeholderParityDeferred(key). In
release mode it defers nothing. In pr mode it defers the UI keys whose
English value changed since the merge base, which is the set
syncUiKeys({ rewrittenSinceRef }) marks and retranslates at release; every
other key is still judged. When the merge base cannot be read (the
unit-test job checks out one commit) it defers every key: a feature PR
cannot touch a locale catalog, and a PR that does is judged key by key,
placeholders included, by check-key-completeness in the i18n UI Coverage
job, which has the full history. No assertion changes in release mode.

check:test-masking counts .skip( and { skip: true } but not the computed
{ skip: "<reason>" } this helper returns, and its skip signal can never be
allowlisted, so wiring the helper into it would turn this very PR red with
no way out. tests/unit/locale-parity-mode.test.ts pins instead the list of
tests allowed to use the helper (adding one is a reviewed edit) and the
deferral semantics.
2026-11-13 15:10:21 -03:00
diegosouzapw
db403bfb1e fix(skills): pr-mode agent-skills-sync keeps --json pure and ignores hand-written files
- With --json, the pr-mode SKIP / scope lines go to stderr and a skip prints a JSON object
  ({skipped, mode, reason, detail}) on stdout, so --json output is always JSON again.
- classifyTouchedSkills judged any non-SKILL.md file under skills/<id>/ as generated. The
  generator writes only SKILL.md (outside the custom block) and references/**; a PR that adds
  an example or a note beside SKILL.md is no longer judged against the generator.
Both are covered by new tests that fail on the previous commit.
2026-11-13 15:07:28 -03:00
diegosouzapw
6643981faa docs(quality): document the pr and release gate modes and the derived refresh
QUALITY_GATES.md: mode resolution, what each mode fails, exit codes, where each mode runs
(feature PRs, queue, release PR, Release-Green, release skill, nightly refresh PR),
`npm run facts`, `npm run release:refresh-derived` and the facts snapshot, and how to reproduce
the CI verdict locally. Changelog fragment for phase 1.
2026-11-13 15:07:07 -03:00
diegosouzapw
a7b48580ea test: judge derived docs against the facts snapshot, not the live code
Feature PRs no longer write derived numbers, so between releases the tree is behind the live
code by design and any unit test comparing the two would be red on the base itself. Each such
assertion now proves the same property deterministically:

- release mode with injected facts rejects the stale value and accepts the right one;
- the committed docs, skills and SVGs agree with docs/reference/derived-facts.json, and each
  generator still reproduces its SVG byte for byte;
- "the release refresh closes the cycle": live facts, collected once per file, ->
  planDerivedRewrites applied in memory -> release mode leaves no rewritable STRICT drift.

Pure validator tests are unchanged. The facts failure path keeps its STRICT ERR check and is
now also asserted as an infrastructure exit (2). Suite time drops from one tsx probe per
buildChecks() call to one per file.
2026-11-13 15:05:07 -03:00
diegosouzapw
7b741afed6 fix(quality): e2e-timings sync keeps untouched lines byte for byte
syncE2eTimings rewrote the _meta note (its \u2014 escape became a raw em dash) and
counted a new spec's LOC as split('\n').length, one more than the seed's wc -l. It now
escapes non-ASCII like the committed file and counts newlines; the existing test's
expected LOC goes from 4 to 3 for a three-line fixture because 3 is the seed's value
(the old 4 encoded the off-by-one). Two new tests pin the byte-for-byte behaviour.
2026-11-13 15:04:55 -03:00
diegosouzapw
8c1ca8f00f ci: pr-mode docs counts, derived drift in Release-Green and a nightly refresh PR
- ci.yml docs-sync-strict and quality.yml docs-gates ("Docs accuracy"): checkout with
  fetch-depth 2 and BASE_SHA (PR or merge-group base) on `npm run check:docs-all`, so the
  counts gate runs in pr mode on feature PRs against the base the merge commit sits on.
- Release-Green: every HARD item runs with OMNIROUTE_GATE_MODE=pr unless the environment
  already sets one (they answer "did the base break?"); a new DRIFT item `derived-refresh`
  runs `npm run release:refresh-derived -- --check`, the strict view, which reports without
  opening the base-red issue. Between releases the base is behind the live code by design.
- nightly-derived-refresh.yml: once a day on the highest release/vX.Y.Z (skipped under
  release-freeze), runs the refresh with --profile=nightly and keeps ONE PR open from the
  robot branch chore/derived-refresh (same lease-pinned rebuild as the UI Kit watch). Never
  merges; flags agent-instruction surfaces for the owner. Needs the DERIVED_REFRESH_PR_TOKEN
  secret to open the PR; without it only the branch is pushed.
- merge-train.sh: the counts gate judges the train in pr mode against the train base.
2026-11-13 15:03:14 -03:00
diegosouzapw
e81581c448 fix(quality): pr-mode tighten advisory no longer tells the PR to commit the baseline
The pr-mode advisory reused the release instruction (run quality:ratchet --update and
commit the tightened baseline in this PR), contradicting the line above it. The
measurement and the instruction are now separate: release mode prints exactly the old
line, pr mode says the improvement is banked by the release refresh / nightly.
2026-11-13 15:02:58 -03:00
diegosouzapw
5c54e717ab feat(i18n): pr mode judges the locale catalogs a PR changes against the merge base
The pr-mode SKIP of the completeness gates also covered the PRs that still
edit locale catalogs: translation waves (docs/i18n-*, chore/i18n-*), the
release refresh (chore/derived-*) and translation-only PRs, which
check:pr-derived-paths allows. A wave that deleted a key from ko.json or
overwrote a translation with __MISSING__ failed before and passed after.

check-key-completeness (UI and --catalog=cli) now SKIPs in pr mode only when
the PR changed no locale catalog of that family. Otherwise each changed
catalog is judged against itself at the merge base
(scripts/i18n/lib/touched-catalogs.mjs): no key it had may be lost, no key
en.json lacks may appear, no real translation may become a __MISSING__
marker or the English text (outside untranslatable-keys.json), and no value
the PR changed may break the placeholders/tags of an English value the PR
did not touch (ICU scanner in scripts/i18n/lib/icu-names.mjs, same grammar
as the placeholder-parity test). A catalog new in the PR must carry the
whole en.json key set. Release mode is unchanged.

The ratio and CLI-parity SKIP lines now say where a changed catalog is
judged. The support list of i18n-release-mode-gates.test.ts gains the two
new libs, which the copied check-key-completeness imports.
2026-11-13 15:02:23 -03:00
diegosouzapw
14c506415b refactor(docs): README diagram generators read the facts snapshot
Every number the counts gate checks inside the README SVGs (providers, MCP tools, routing
strategies, pools, free-forever providers, catalog entries, CLI integrations, scoring factors,
the free-tier budget card) comes from docs/reference/derived-facts.json through
scripts/docs/readmeFacts.mjs instead of a literal kept by hand in each generator. Curated copy
(150+, 15-95%, $0) stays literal. Each generator still produces the committed SVG byte for byte.
2026-11-13 15:00:46 -03:00
diegosouzapw
9642d234c8 feat(release): npm run release:refresh-derived [--check]
One entry point recomputes every derived value, in order: provider reference, facts snapshot,
managed numbers (planDerivedRewrites, relayed into the docs/i18n mirrors with the
bump-version-claims rule for .i18n-state.json), README diagrams, generated skills, UI key
catalogs and the llm.txt mirrors (the phase-4 sync functions when exported, the current CLIs
otherwise). Changelog aggregation is opt-in (--with-changelog, release profile only): the
release keeps `npm run release:reconcile` as the canonical path.

--check writes nothing (every step runs on an in-memory overlay), exits 1 when a step would
change a file and lists the rewrites that need a human (manual), exit 2 on an infrastructure
error. --profile=nightly never touches the changelog or version claims. Every subprocess gets a
throwaway DATA_DIR. On this tree the full --check reports zero changes and zero manual items.
2026-11-13 14:59:02 -03:00
diegosouzapw
692ea0c018 feat(ci): docs-counts gate in pr and release modes
The counts gate now has two modes, resolved by scripts/check/lib/gateMode.mjs
(--mode, OMNIROUTE_GATE_MODE, then the Actions event):

- release (release PR, release skill, local default): strict equality against the live code,
  exactly as before. On this tree the report is identical to the previous gate except for the
  mode header and two new STRICT sections (routing-strategy counts in prose), all green.
- pr (feature PRs, merge_group, omni-queue): no tsx, no facts. Every derived check exposes an
  extractor with the span of each value; the gate diffs the PR's changed files against the
  merge base and fails only what the PR itself did: writing a managed value the base did not
  carry, or dropping a required claim. It never fails because the base moved. Content
  invariants that need no facts run in both modes; fact-only checks (provider reference vs
  live modules, mode-pack names, manifest free tier) are release-only. Writer branches
  (chore/derived-*, release/v*, docs/i18n-*, chore/i18n-*) may edit managed values.
- Exit codes: 0 ok, 1 drift or a PR violation, 2 infrastructure (facts not collected, or the
  PR diff base cannot be resolved in CI), with a message saying it is not documentation drift.
- planDerivedRewrites({facts, readFile}) returns the exact rewrites that bring every
  rewritable STRICT claim to the facts, and lists the rest as manual. It is what
  `npm run release:refresh-derived` applies.
2026-11-13 14:57:14 -03:00
diegosouzapw
8804e34acc feat(release): npm run facts and the committed derived-facts snapshot
- scripts/release/facts.mjs: collectFacts/readCodeFactsResult classify a failed probe
  (timeout, spawn, exit, parse) as an infrastructure error, never as documentation drift.
  The 180 s hard timeout that turned a loaded host into a false red is now
  OMNIROUTE_FACTS_TIMEOUT_MS (default 600 s). readCodeFacts() and the test seams keep
  their old shape.
- The inline `node -e` probe becomes a real module (scripts/release/lib/code-facts-probe.mjs),
  run under tsx in a subprocess. It forces a throwaway DATA_DIR before any import, so loading
  the MCP tool modules can never open or migrate the operator's SQLite file.
- `npm run facts [-- --key=a.b] [--snapshot]` prints every derived number as JSON
  (exit 2 on an infrastructure error).
- docs/reference/derived-facts.json: the facts as of the last refresh, serialized in a stable,
  Prettier-identical layout. Generated artifacts and unit tests are judged against it; only
  the release refresh and the nightly refresh PR write it.
2026-11-13 14:55:30 -03:00
diegosouzapw
f6a9f89e10 fix(ci): omni-queue disarms skip-ci titles, globs cross newlines, wider approval window
- sanitizeTitle neutralizes [skip ci] / [ci skip] / [no ci] / [skip actions] /
  [actions skip]: the PR title is the subject of the candidate's head commit,
  so a contributor could stop the candidate CI and stall the queue;
- protected-path globs match file names that contain a newline (fail closed);
- the approval window grows from 10 min to 6 h: an Actions backlog must not
  strip legitimate labels (the PR stays ineligible meanwhile either way);
- eligibility tests now derive label ages from the window constant;
- HistoryEvent documents the optional labeledAt map of batch-started.
2026-11-13 14:53:09 -03:00
diegosouzapw
52bd5a4774 docs(i18n): document the PR-mode llm.txt consistency check, hook mode and refresh sync
QUALITY_GATES: the strict judgement of a change that edits mirrors needs a
resolvable diff base (not the depth-1 docs-sync-strict checkout), PR mode
still requires the llm.txt mirrors to agree, the pre-commit hook runs in PR
mode, per-section freshness is coarse for long sections, and the scheduled
refresh syncs llm.txt. The changelog fragment says the same.
2026-11-13 14:43:31 -03:00
diegosouzapw
78b9c188e3 chore(ci): integrate omni-queue WP6B (release tooling for merge-ff history) 2026-11-13 14:43:27 -03:00
diegosouzapw
e74cc836a0 chore(ci): integrate omni-queue WP6 (ruleset, runbook and changelog) 2026-11-13 14:43:18 -03:00
diegosouzapw
909d500dfb chore(ci): integrate omni-queue WP5 (workflows and candidate CI profile) 2026-11-13 14:43:10 -03:00
diegosouzapw
a5994be8a7 chore(ci): integrate omni-queue WP4 (REST client, dashboard, CLI and approvals) 2026-11-13 14:42:59 -03:00
diegosouzapw
dcad667961 chore(ci): integrate omni-queue WP3 (bisection, CAS state and tick) 2026-11-13 14:42:53 -03:00
diegosouzapw
feda03ff05 chore(ci): integrate omni-queue WP2 (composition and landing) 2026-11-13 14:42:45 -03:00
diegosouzapw
b46fc8601e chore(ci): integrate omni-queue WP1 (eligibility, checks and classify) 2026-11-13 14:42:36 -03:00
diegosouzapw
b74ebc092d ci(i18n): scheduled mirror refresh also syncs stale llm.txt mirrors
Feature PRs now edit only the root llm.txt. The scheduled refresh never ran
sync-llm-mirrors (run-translation and the drift report skip llm.txt), then
ran check:docs-all in release mode and opened no PR when it failed, so one
llm.txt edit would have stalled the refresh of every doc.

The drift step now counts stale llm.txt mirrors with syncLlmMirrors()
--dry-run; a new step syncs them before the check; setup, check and commit
run when either docs drifted or llm.txt mirrors are stale (translation still
runs only for drifted docs: an empty --files would translate everything).
The commit and PR body list llm.txt among the sources. Covered by
tests/unit/i18n-mirror-refresh-llm-sync.test.ts (fails on the old workflow).
2026-11-13 14:41:00 -03:00
diegosouzapw
9556b7cabf refactor(build): compute the Stryker test-file list from the mutate set
tap.testFiles was a hand-kept list of 781 entries (775 unique) and 46 open
PRs touched it. stryker.conf.json becomes stryker.conf.mjs (Stryker 10
auto-discovers it), which computes the list at load time: every unit test
that imports a module in `mutate`, the same rule check:mutation-test-coverage
--strict enforces, now shared in scripts/quality/mutation-test-files.mjs.
The 109 former entries the import rule does not select (barrel/indirect
coverage) stay pinned, so the resolved list equals the old set exactly.
All other options keep their values.

The drift gate and mutation-radiography load the config the way Stryker
does (dynamic import of the default export). stryker.disablebail.json
becomes stryker.disablebail.mjs and spreads the base config: Stryker 10
does not implement "extends", so the redundancy run had none of it.
2026-11-13 14:40:55 -03:00
diegosouzapw
5d32482d1b test(i18n): a missing mirror anchor falls back to the whole-file check
The mirror-freshness helper threw when an anchor was absent from the English
source, in both modes. Three docs/*-locales tests passed prose anchors that
the tests only used for their negative English-fallback assertion, so a PR
that merely reworded that English sentence failed them, even in release
mode, where the tests never read the English source before.

- analyzeSource() no longer throws: a missing anchor drops the section-level
  shortcut and the whole-file hash decides (never looser than the anchor).
  The helper test that asserted the throw (added on this branch) now asserts
  the fallback in both modes.
- vision-key-scope and remote-token-privilege anchor only on the identifier
  the test already pins in every mirror.
- The header notes that freshness is per ## section, which is coarse for
  long sections such as the QUALITY_GATES gate inventory.
2026-11-13 14:39:17 -03:00
diegosouzapw
b8884e6e57 fix(i18n): sync-llm-mirrors CLI runs when invoked through a symlinked path
The direct-run guard added with the syncLlmMirrors() export compared the
module URL (a real path) with argv[1] as invoked, so a symlinked checkout
turned the CLI into a silent no-op that exited 0. The old script always ran.
The guard now resolves argv[1] with realpathSync first; covered by a test.
2026-11-13 14:37:29 -03:00
diegosouzapw
6fbbf03edc fix(ci): omni-queue workflow scope, cancellation and base-check TIA
- tick App token gains workflows: write: GitHub refuses an App push of a
  commit touching .github/workflows/**, which a batched PR's merge commit
  and the fast-forward landing carry.
- tick runs on !cancelled() instead of always(), so a cancelled run never
  starts writing refs or state.
- quality.yml exposes candidateSource; on a base-check candidate (its own
  base) the TIA step runs the whole unit suite instead of an empty
  base-relative selection, so an inherited failure reproduces under the same
  check that classify compares.
- Correct which copy of omni-queue.yml each trigger runs; .zizmor.yml
  justification lists the workflows scope.
- Tests pin each change and that a candidate push writes no Actions cache.
2026-11-13 14:36:48 -03:00
diegosouzapw
b2cf3b68c7 fix(ci): check-docs-sync PR mode keeps llm.txt mirrors consistent; pre-commit runs in PR mode
Two review findings on the PR-mode split of check-docs-sync:

- The docs-sync-strict job checks out at depth 1, so the diff base never
  resolves there and a hand edit to one docs/i18n/<locale>/llm.txt passed
  as SKIP. PR mode now runs a check that needs no base: every llm.txt
  mirror must exist, keep its separator and carry either the root body or
  the body most mirrors share. A base that moved leaves them all equally
  stale and passes; a single hand-edited mirror fails. Release mode is
  unchanged (same lines and exit code as the script before the split).

- The pre-commit hook ran the script without a mode, i.e. release mode
  locally. After a feature PR that edits only the root llm.txt merged,
  every later commit on that base would be blocked until the wave synced
  the mirrors. The hook now passes --mode=pr: a commit is judged on what
  it does; mirrors it writes are still judged strictly.
2026-11-13 14:35:37 -03:00
diegosouzapw
83eed6f16b fix(ci): validate omni-queue batch refs against the pushed commit
A batch candidate ref is <batchId>-<sha12>: the suffix must name the pushed
commit, and the commit's Omni-Queue-Batch trailer (when present) the same
batch sequence (an infra retry b42-r1 reuses the b42 commit). A push of the
right SHA into another batch's ref now fails closed.
2026-11-13 14:34:43 -03:00
diegosouzapw
f263d6c37e test: express the release-only checks as node:test conditional skip options
The README SVG byte-compare tests and the e2e-timings completeness test skipped
themselves with `t.skip()` inside the body, which check:test-masking counts as a new
unconditional skip. They now pass the same condition as the `{ skip: <condition> }`
test option, the form 42 other unit tests already use for environment-conditional
skips (platform, network interface). The condition is unchanged:
releaseOnlyUnlessTouched() is false — the assertion runs — in release mode and in a
PR that edits the artifact. Assertions untouched; check:test-masking against the
contract base: OK.
2026-11-13 14:33:22 -03:00
diegosouzapw
b800ee318c fix(ci): omni-queue tick survives lost candidates and revalidates before landing
- fetch candidate objects from the in-flight ref, the target ref or the SHA itself;
  a candidate gone from origin is recomposed instead of wedging every tick
- keep the stored in-flight refs until the superseding save succeeds; skip a push
  whose ref already holds the SHA and keep a retry cutoff from GitHub timestamps
- read only check runs of the candidate ref (headBranch) when GitHub reports it
- re-run eligibility before landing and before each bisection segment: block
  labels, approval status on the head, protected approval; an open
  release-freeze holds the green batch in flight (no landing on a frozen base)
- shadow bisection composes later segments on top of the would-land ones
- render check names in code spans (no mentions or autolinks from PR workflows)
- a labeled tree-divergence issue re-pauses squash-api landings after a lost save
2026-11-13 14:31:04 -03:00
diegosouzapw
742e96ebb4 docs(ci): omni-queue runbook covers the default-branch ruleset and sandbox ticks
Rulesets stack and a bypass list only covers its own ruleset: Require PR on default branch (21899981) rejects the App's landing push on the active release unless the App is added to its bypass actors or the release branches are excluded. Document it in the Ruleset section, cut-over step 3 and rollback, plus the landing-path check, exit codes and the API-resolved production lock of apply-ruleset, and note that the 5-minute schedule only acts on the production repository.
2026-11-13 14:30:41 -03:00
diegosouzapw
13090b39c5 fix(ci): keep a foreign squash PR on merge-ff rows and test the cycle commit reader 2026-11-13 14:25:03 -03:00
diegosouzapw
f5c82dbeb4 fix(ci): omni-queue apply-ruleset noop on real API echo and landing-path check
Drop parameter objects that canonicalize to empty (dismissal_restriction echoed disabled) and pin require_extra_approval_for_unattributed_changes=false in the template, so a second run is a noop. After the apply, read the rules enforced on the branch and report foreign rulesets (e.g. Require PR on default branch) whose pull_request/status/update rules would reject the App's fast-forward landing push; a real apply exits 1 until fixed. Resolve the repository through the API before any write so an alias of production stays locked. An invalid --base is a usage error (exit 2). Report duplicate rule types and refuse a same-named ruleset with another target.
2026-11-13 14:24:45 -03:00
diegosouzapw
c608ea91fa fix(ci): read omni-queue merge records NUL-separated in the history map 2026-11-13 14:20:51 -03:00
diegosouzapw
4d6ad629ee fix(ci): omni-queue dashboard skips no-op edits and the CLI shows paused bases
The dashboard keeps all clock- and run-dependent text on one footer line, and upsertDashboard ignores that line, so an unchanged queue no longer triggers a PATCH on every tick. The body is capped at 60000 characters by trimming the tail of the queue and then the events. In shadow mode, label-to-land metrics fall back to the labeledAt of queue entries. The CLI status and history commands, run without --base, now also list bases that have a state file.
2026-11-13 14:16:08 -03:00
diegosouzapw
e73f863f89 fix(ci): omni-queue client never replays a merge and dedupes racing comments
mergePull no longer retries PUT /pulls/{n}/merge blindly: after a 5xx, network error or timeout, and on 405/409, GET /pulls/{n} decides whether the merge already landed at the requested head. Requests get a 30 s timeout. commentOnce re-reads after posting and deletes the newer duplicate. The approval handler accepts only pull_request_target and passes botLogin so planted markers are ignored.
2026-11-13 14:11:13 -03:00
diegosouzapw
f57c4c296c test(ci): omni-queue rewound base, re-landing, in-base PRs and env isolation
Covers a base rewound between composition and landing, a base that moves
between the read and the push, idempotent re-landing, a base fast-forwarded
inside the candidate, stacked PRs in merged, PRs already in the base,
candidate refs naming another sha, and inherited GIT_* location variables.
The sandbox helper clears inherited GIT_* variables for its scratch runners.
2026-11-13 14:01:05 -03:00
diegosouzapw
68d4176e4a fix(ci): omni-queue landing refuses a rewound base and candidates name their sha
landMergeFf now compares the base tip with the expected base before pushing:
only the expected base, the candidate itself (idempotent re-landing) or a
commit between them is accepted; a base rewound by an admin is base-moved
instead of a fast-forward that would restore removed commits. landMergeFf
takes the batch's PRs to report stacked PRs that land without a merge commit.

composeCandidate reports PRs whose head is already in the base as
alreadyInBase and never yields a candidate equal to the base. pushCandidate
requires the ref name to encode the pushed sha and reads the ref back.
scratchGit clears inherited GIT_* location variables.
2026-11-13 13:59:03 -03:00
diegosouzapw
63c1344341 fix(ci): omni-queue fail-closed check dedupe and base-check classification
A same-name run only replaces an older one when it started after that one finished (and is not of another workflow), so parallel jobs that share a name across ci.yml and quality.yml can no longer hide a failure. Required checks turn green only through a GitHub Actions check run. classifyRed returns pr-red for a same-SHA base check that timed out (it can never be redone), flags a same-SHA pending base check with baseCheckPending, matches keys only when both are equal or both empty (reporting name-only matches), and duration stripping keeps numbers inside test titles.
2026-11-13 13:57:20 -03:00
diegosouzapw
3c9d451d31 docs(i18n): feature PRs touch en.json only; locales complete at release
- docs/guides/I18N.md: new "Feature PRs touch en.json only" section (what a feature PR
  edits, what check:pr-derived-paths rejects, who completes the locales, --mode=pr to
  preview, tests assert en.json and not every locale); the parallel-runner section is now
  for the release refresh and translation waves; --rewritten-since / --prune-extra /
  --keep-extra; the CLI-locale and best-practice lists drop "translate in the PR".
- docs/architecture/QUALITY_GATES.md: i18n-ui-coverage table marks which gates run in
  both modes and which in release mode only (adds the missing ICU and key-completeness
  rows; the ratio gate is blocking, not advisory: its step has no continue-on-error), a
  "Two modes" paragraph, the mode note in the key-completeness, new-key and value-drift
  sections, and the check:cli-i18n row. Mirror and generated-file rows are untouched.
- changelog.d/maintenance/0000-i18n-ui-keys-release-mode.md (PR number to be filled in).
2026-11-13 13:56:09 -03:00
diegosouzapw
198f42bcc0 fix(ci): omni-queue freeze detection from the issue title and safe comments
Read the frozen branch from the freeze issue title (vX.Y.Z or release/vX.Y.Z) and fall back to the body's merge-into sentence only when the title names none, so the branch where development continues is never frozen. An issue naming nothing freezes every base (fail closed). Protected-surface comments report a file count and the trusted globs instead of author-chosen paths, base names are reduced to safe characters, paths with control characters still match the protected globs, and a label without its labeled event gets a visible reason.
2026-11-13 13:54:16 -03:00
diegosouzapw
86ad5696c6 ci: document the two modes of the i18n UI Coverage job
No behaviour change in the workflow: the scripts resolve pr/release themselves through
scripts/check/lib/gateMode.mjs. The job header explains the two modes, the
release-mode-only steps say so in their names, and the coverage floor step gets a name and
the measurement that keeps it in both modes (every locale at 100 % on 2026-11-13; the
largest recorded cycle, ~1,352 keys, moves it about 8 points against a 65 % floor).
BASE_REF already reaches both diff-aware steps (origin/main on the release PR).
2026-11-13 13:54:06 -03:00
diegosouzapw
c17498a608 feat(ci): declare the translation family for check:pr-derived-paths
config/quality/derived-paths/translation.json: a feature PR may edit en.json (UI and CLI)
and the English docs; these belong to the release refresh, the translation waves and the
scheduled mirror refresh:

- ui-locale-catalogs: src/i18n/messages/*.json except en.json
- cli-locale-catalogs: bin/cli/locales/*.json except en.json
- docs-i18n-mirrors: docs/i18n/** and .i18n-state.json
- ui-translation-ratio-baseline: config/quality/i18n-translation-baseline.json (measured
  on the catalogs; npm run i18n:check-ratio:update after a refresh)

Writers: release/v*, docs/i18n-*, chore/i18n-*, chore/derived-*. The merged i18n PRs of
the repo (318 found by title) used docs/i18n-wave-*, docs/i18n-<doc>-*, docs/i18n-g54-*
and chore/i18n-mirror-refresh; all match. Companions: changelog.d/** and
src/i18n/global-error-messages/*.json. The compact error catalogs are regenerated from
the catalogs on every build (build-next-isolated) and pinned by
tests/unit/global-error-messages.test.ts. A feature PR that edits
publicSystem.globalError in en.json has to regenerate en.json there (and the others when a
key is removed), so they cannot be a category. A translation-only PR may carry them.
2026-11-13 13:48:29 -03:00
diegosouzapw
c7542e6a2c docs(quality): generated files and derived baselines are written at release
QUALITY_GATES.md documents the two families, the writer branches, and how
check:agent-skills-sync, the README SVG tests, the e2e-timings test and
--require-tighten behave in each gate mode. CONTRIBUTION_GOLDEN_PATH.md no longer tells
a provider PR to commit the regenerated PROVIDER_REFERENCE.md. Changelog fragment
(number assigned when the PR opens).
2026-11-13 13:47:32 -03:00
diegosouzapw
b32d9830c0 feat(ci): omni-queue workflow and the candidate profile in ci/quality
- omni-queue.yml: cron/dispatch/workflow_run/pull_request_target triggers,
  kill switch on every job, App token per job with minimum scopes, default
  branch sparse checkout only (never PR code), one global tick group
  without cancel-in-progress, approval job outside it.
- ci.yml/quality.yml: push to omni-queue/** runs the full profile; the
  candidate base comes from candidate-base.mjs (free-catalog BASE_SHA,
  CHANGELOG_BASE_REF, TIA/sibling GITHUB_BASE_SHA, changes.candidateBase);
  build/lint-guard never reach a self-hosted runner for those refs;
  Codecov, Trunk and SonarQube skip candidates.
- deploy-vps.yml: explicit guard against omni-queue head branches/refs.
- Tests evaluate every guard against concrete event contexts and prove no
  deploy/publish workflow fires for a candidate ref.
2026-11-13 13:47:29 -03:00
diegosouzapw
8a02502219 fix(ci): read the PR of merge-ff landed commits in release changelog tooling 2026-11-13 13:47:13 -03:00
diegosouzapw
f4c36ac166 test(i18n): locale-parity assertions follow the release mode
Same rule as the completeness gates (phase 4 of the plan "derived numbers and texts
resolved only at release"): a feature PR adds keys to en.json only, so "locale X carries
every key of en.json" can only hold after the release refresh.

Found by adding one key to src/i18n/messages/en.json and bin/cli/locales/en.json only and
running every unit test that reads a catalog (212 files): exactly these failed —
cli-i18n-catalog (zh-CN / zh-TW parity), i18n-pt-br ("every key present in en.json") and
i18n-vi-completeness (key parity, and the "missing" entries of the placeholder and ICU
checks). The pt-BR top-level-sections test of cli-i18n-catalog fails the same way when
the new key opens a new section.

tests/_helpers/localeParityMode.ts resolves the mode with scripts/check/lib/gateMode.mjs
(env only). In release mode (local runs, Release-Green, pushes to main, the release PR)
every assertion is unchanged. In pr mode the parity tests skip with the reason in the
report, and the vi placeholder/ICU checks keep judging every key vi carries and only stop
reporting absent keys. No assertion is removed or loosened in release mode; verified with
the probe key: release mode 6 failures as before, pr mode 0 failures and 5 skips.
2026-11-13 13:45:29 -03:00
diegosouzapw
144fb9eb67 feat(ci): declare the generated and baselines families of derived files
config/quality/derived-paths/generated.json: docs/reference/PROVIDER_REFERENCE.md, the
twelve generated README SVGs (README_DIAGRAMS), skills/*/references/** and the 31
SKILL.md files with no hand-written custom block. Writers: release/v*, chore/derived-*.
Companions: changelog.d/**, the generator scripts and their tests, so a generator
change can still ship with its own output. Hand-drawn SVGs, the Mermaid exports and the
SKILL.md files with a custom block are not claimed.

config/quality/derived-paths/baselines.json: config/quality/e2e-timings.json only, the
one measured baseline no gate asks a feature PR to edit any more. Policy files and the
ceilings a feature may legitimately edit with code stay out.

Against the 321 open PRs of 2026-11-13: 43 carry files of these families (30
PROVIDER_REFERENCE.md, 30 README SVGs, 10 skill references, 4 generated SKILL.md, 2 e2e
timings).

.gitattributes: linguist-generated=true for the generated reference, the twelve SVGs,
the skill references and .i18n-state.json. The generated SKILL.md files and the
docs/i18n/*/llm.txt mirrors are agent-instruction surface and stay visible.

tests/unit/derived-paths-generated-family.test.ts keeps both lists exact (driver outputs,
custom-block scan, files on disk, attributes).
2026-11-13 13:44:53 -03:00
diegosouzapw
37e1888cc4 feat(ci): resolve the base of an omni-queue candidate push
Reads the Omni-Queue-Base trailer of the candidate's top merge commit
(contracts.parseQueueTrailers), checks that it is an ancestor, and prints
BASE_SHA/TARGET/SOURCE for GITHUB_OUTPUT. A base-check ref resolves to
itself even when the base tip is a landed queue merge commit; a batch ref
without the trailer fails closed.
2026-11-13 13:44:49 -03:00
diegosouzapw
e68488e5ae feat(ci): omni-queue history map from queue merge trailers to PR numbers 2026-11-13 13:44:31 -03:00
diegosouzapw
4deb89b177 docs(ci): omni-queue runbook, App installation guide and changelog fragment
docs/ops/OMNI_QUEUE.md covers the design, eligibility, candidate acceptance, bisection and base checks, the state branch, dashboard, CLI, shadow/live modes, the kill switch, GitHub App installation, the release ruleset, security posture, incidents, cut-over and rollback. Listed in the ops navigation next to MERGE_TRAIN.
2026-11-13 13:43:11 -03:00
diegosouzapw
a712d17340 feat(quality): --require-tighten never fails a feature PR for an improvement
check-quality-ratchet.mjs --require-tighten failed a PR whose metric improved beyond
tightenSlack unless the PR also edited quality-baseline.json, so two improving PRs
conflicted on the baseline. Banking belongs to the release refresh / nightly (plan
2026-11-13, phase 5).

In pr gate mode the un-banked improvement is printed as information and the run
passes; a regression fails exactly as before. Release mode (push, schedule, the
release PR, local runs) is byte-identical to the previous script on the 12-case matrix
(with/without _policy x improved/regressed/equal x with/without --require-tighten),
and the velocity-phase advisory (_policy.requireTighten=false) is unchanged.

The existing tests now pin OMNIROUTE_GATE_MODE=release in their spawn helper: they
describe release behaviour, and a CI pull_request run would otherwise resolve to pr
mode. No assertion was removed or relaxed; four tests cover the pr/release split.
2026-11-13 13:42:55 -03:00
diegosouzapw
e81745421d feat(i18n): translation-completeness gates run in release mode only
Owner decision 2026-11-13 (plan "derived numbers and texts resolved only at release",
phase 4): a feature PR adds or rewrites keys in en.json and touches no other locale, so
the gates that compare every locale with en.json judge the base, not the change.

With scripts/check/lib/gateMode.mjs, these gates print one
"SKIP reason=pr-mode — <mode>: <why>; the strict check runs in release mode (...)" line
and exit 0 in pr mode (feature PR, merge_group, omni-queue), and run unchanged in release
mode (release PR, pushes to main, workflow_dispatch, local runs):

- check-key-completeness (UI and --catalog=cli)
- check-new-key-coverage (also --json)
- check-ui-value-drift (also --json)
- check-translation-ratio (the gate path only; --report, --json and --update still run)
- check-cli-i18n: the t()-key check runs in both modes; pt-BR sections and zh-CN/zh-TW
  parity skip in pr mode.

Release mode was compared against the 01258da1 scripts on this tree and on a tree with an
en.json-only key plus a rewritten value: same stdout/stderr and exit code for every gate
(UI, CLI, new-key, value drift, ratio, cli-i18n).

The shared line lives in scripts/i18n/lib/release-mode.mjs. The new test runs each real
script in a throw-away git repo: both modes, the event-derived mode, and the release PR
(BASE_REF=main) judging every key of the cycle until syncUiKeys completes the catalogs.
Kept in both modes: check-ui-keys-coverage (65 % floor) and check:ui-icu.
2026-11-13 13:42:33 -03:00
diegosouzapw
39a72a8f94 feat(ci): e2e-timings.json is synced at release, not by each PR that adds a spec
tests/unit/balance-e2e-shards.test.ts asked every PR that adds an e2e spec to add an
entry to config/quality/e2e-timings.json (two of the 321 open PRs on 2026-11-13), while
the shard packer already gives a spec without an entry the median weight.

- balance-e2e-shards.mjs gains `--sync [--dry-run]` / syncE2eTimings(): new specs get
  their LOC (the seed's proxy), entries of deleted specs are dropped, every other value
  and the key order stay. Exported for release:refresh-derived.
- The completeness test runs in release mode, or when a change edits the timings file;
  a feature PR skips it with the shared SKIP line. New test for the sync writer.
2026-11-13 13:40:29 -03:00
diegosouzapw
f68158cd8a feat(i18n): syncUiKeys() API and --rewritten-since for the release refresh
Plan "derived numbers and texts resolved only at release" (2026-11-13), phase 4: feature
PRs add keys to en.json only, and the non-English catalogs are completed once per release
by release:refresh-derived. sync-ui-keys.mjs gains what that refresh needs:

- syncUiKeys({ catalog, locales, translate, pruneExtra, rewrittenSinceRef, dryRun, root })
  returns { changedFiles, added, pruned, markedRewritten, translated, failed, locales[] }
  with repo-relative paths. A dashboard run that changed a catalog also regenerates the
  compact global-error catalogs. translateFns is a test seam; the default is the real
  backend client.
- --rewritten-since=<ref> (API: rewrittenSinceRef) marks as __MISSING__:<new english> the
  translations of values rewritten since the merge base with <ref> that the locale left
  untouched: the same set check-ui-value-drift reports (findStaleTranslations, cosmetic
  rewrites excluded). Off by default.
- mergeMissing() now reports extraPaths and takes { pruneExtra }. The merge always dropped
  keys en.json no longer has, so the CLI default stays pruning (callers unchanged);
  --prune-extra names it, --keep-extra opts out. The API defaults to pruneExtra: false and
  the refresh passes true.
- isDirectRun no longer throws when the module is imported without argv[1].
2026-11-13 13:39:18 -03:00
diegosouzapw
6cac89dde4 test(docs): README SVG byte-compare runs in release mode or when a PR edits the SVG
The twelve README diagrams are generated from live catalogs and counts, and the
release refresh regenerates them (plan 2026-11-13, phase 5). The "committed file is
exactly what the generator produces" test of each diagram now skips in pr gate mode
when the change does not edit that SVG (scripts/check/lib/derivedArtifactScope.mjs),
so a feature PR is never red because a sibling moved the catalog. Release mode and a
PR that edits the SVG keep the byte-for-byte assertion unchanged; every other test in
these files (outlines, copy strings, palettes, the counts-gate readers) is untouched.
2026-11-13 13:38:17 -03:00
diegosouzapw
1acf72d3dc docs(i18n): feature PRs edit only English sources; mirrors are refreshed by the wave
I18N.md no longer tells a PR that edits a core doc to bring its 66 mirrors
along. The mirrors, the llm.txt copies and .i18n-state.json are derived
files rewritten by the translation wave (docs/i18n-* / chore/i18n-*
branches, the scheduled refresh) and the release; the wave commands
(i18n:run, --adopt, sync-llm-mirrors) are documented as wave steps.

QUALITY_GATES.md describes the PR/release modes of check:docs-sync, the
mirror-content unit tests and the docs drift gate, and corrects the
"i18n translation drift" row (it reads docs/i18n mirrors, not UI keys;
advisory on PRs, strict on push and nightly).

Adds the maintenance changelog fragment (0000- prefix until the PR number
exists).
2026-11-13 13:35:54 -03:00
diegosouzapw
caaa3e1cd5 feat(skills): check:agent-skills-sync judges only the skills a feature PR edits
The generated skills (skills/<id>/SKILL.md, skills/<id>/references/**) are rewritten
from the catalog, docs/openapi.yaml and the CLI registry. Feature PRs that added routes
regenerated them and conflicted with every sibling doing the same; the release refresh
regenerates them once instead (plan 2026-11-13, phase 5).

The dry-run check now reads the gate mode (scripts/check/lib/gateMode.mjs):

- release: unchanged — every skill, same table, same exit codes (0 in sync, 2 drift);
  one line with the mode is appended to the human output (the --json output is
  byte-identical);
- pr: only the skills whose generated text (outside the hand-written custom block) or
  references/ the change edits are regenerated and compared, still exit 2 on drift; a
  custom-block-only edit or an untouched skill prints
  "SKIP reason=pr-mode — ...; the strict check runs in release mode" and exits 0.

--apply ignores the mode. Proved against the 01258da1 script: release output equal
apart from the mode line, exit 0 clean and exit 2 with a hand edit in cli-a2a; pr mode
exit 2 for that hand edit and SKIP for a custom-block-only edit in omni-mcp.
2026-11-13 13:34:27 -03:00
diegosouzapw
953ff8d6fc feat(ci): omni-queue CAS state store and idempotent tick
state.mjs keeps one JSON document per base on the omni-queue-state branch, versioned by the git blob sha of the bytes written (Contents API compare-and-swap); an invalid document throws instead of resetting, and updateStateWithRetry re-reads and re-applies on conflict.

tick.mjs runs one idempotent tick per base: pause/resume and base-red auto-resume, in-flight verdicts (land merge-ff/squash-api or would-land in shadow, infra retry on a new ref for the same SHA, base-check of the bare base, base-red pause, bisection and culprit dequeue), PR snapshot plus eligibility actions, batch selection and composition, candidate ref cleanup, dashboard, then the CAS save. Approvals are re-read right before landing, a landing that already happened is recognized, and dry-run refuses and reports every GitHub write. Tests drive it against in-memory fakes of GitHub and of the WP1/WP2/WP4 modules.
2026-11-13 13:33:16 -03:00
diegosouzapw
f054e80fa3 feat(ci): omni-queue dashboard, local CLI and label approval handler
Dashboard: deterministic body with pause banner, in-flight candidate links, bisection segments, ordered queue with ineligibility reasons, last 20 events and label-to-merge metrics; every untrusted string is escaped. CLI: status, history, add, remove, pause, resume and why through gh auth token. approve.mjs binds a label approval to the exact head SHA with a commit status.
2026-11-13 13:31:16 -03:00
diegosouzapw
00f6716670 feat(ci): scope generated-artifact checks to what a feature PR edited
Plan 2026-11-13 (derived files are written at release), phase 5. A check that
compares a generated file with its generator means two things now:

- release mode (push, schedule, the release PR, local runs): every artifact is
  compared, exactly as before;
- pr mode (feature pull_request, queue batch): only an artifact the change itself
  edited is compared (an edited generated file must still be exactly the generator
  output); the rest is the release refresh's, so drift the base accumulated is never
  the PR's failure. No resolvable diff base skips, like the other diff-aware gates.

scripts/check/lib/derivedArtifactScope.mjs builds on the shared gateMode.mjs and
gives node:test a `skip` reason with the shared SKIP wording.
2026-11-13 13:30:21 -03:00
diegosouzapw
3652598d24 feat(ci): omni-queue bisection of red batches
Pure state machine for plan section 3.5: halves with the first one ceil(n/2), green segments land, a red singleton is the culprit only after its own red run, and the leftovers merge back into one segment once a culprit is isolated. Tests pin the run count for batches of 2, 3, 6 and 8, every culprit position and two culprits.
2026-11-13 13:29:43 -03:00
diegosouzapw
aaf5eca2c0 feat(ci): omni-queue REST client and in-process fake GitHub
Zero-dependency fetch client with Link pagination, envelope unwrapping, backoff on network errors, 5xx, 429 and rate-limit 403, token redaction, contents CAS, orphan state branch, guarded candidate deletion and comment-once. The fake GitHub server is shared with the lead's integration tests.
2026-11-13 13:28:38 -03:00
diegosouzapw
199856ba92 feat(ci): omni-queue release ruleset and apply-ruleset script
Versioned ruleset for one release branch (deletion, non_fast_forward, pull_request with 0 approvals, no required checks) with the omni-queue App and the admin role as bypass actors. apply-ruleset creates, updates or leaves it by normalized comparison, prints a readable diff, writes nothing in --dry-run and refuses a real apply on the production repository unless OMNI_QUEUE_ALLOW_PRODUCTION_RULESET=1.
2026-11-13 13:24:42 -03:00
diegosouzapw
a579509ad3 feat(ci): check-docs-sync judges the mirrors a PR writes, even in PR mode
PR mode skipped both translation-mirror checks for every pull request,
including the translation wave's own PR, which is the one that writes them.
In PR mode the checks now run strictly when the change writes mirrors:

- the head branch is a declared writer of a derived-paths family that owns
  docs/i18n/** (config/quality/derived-paths/*.json, e.g. docs/i18n-* and
  chore/i18n-*): both mirror checks run strictly;
- otherwise, when the PR diff base resolves (BASE_SHA, origin/<base>, the
  active release line) and the change itself edits
  docs/i18n/<locale>/llm.txt or docs/i18n/<locale>/CHANGELOG.md, the
  matching check runs strictly. A depth-1 checkout with no base keeps the
  SKIP, like the other diff-aware gates.

Release mode is untouched (same output on the current tree).
2026-11-13 13:24:14 -03:00
diegosouzapw
e15c79b4b0 test(db): apply every migration to an empty database in Release-Green
With timestamped names, two PRs no longer race for a number, but a migration
dated before another one it depends on would pass in each PR and fail on a
fresh install once both land. npm run test:migrations:fresh applies the real
migration set to an empty database and checks that every file lands exactly
once, in getMigrationFiles() order, and that a second run applies nothing.
The Release-Green validator runs it as a hard gate in quick and full modes.

Adds the npm aliases db:new-migration and test:migrations:fresh (registered
in the gate manifest).
2026-11-13 13:23:06 -03:00
diegosouzapw
0a7098aafc test(ci): omni-queue composition and landing against temporary git repositories 2026-11-13 13:22:31 -03:00
diegosouzapw
5411622aed feat(db): timestamped migration names, gate rules and generator
check-migration-numbering keeps the no-gap and duplicate rules for the legacy
series only (exactly three digits, 001 to 239, frozen on 2026-11-13) and now
also fails when the first or last legacy file disappears. New files must be
YYYYMMDDHHMMSS_snake_case.sql: a real UTC date, not before the cutover, not
more than ten minutes in the future, and unique. Anything else, including a
legacy-style 240_x.sql, is rejected with the reason and a hint.

scripts/dev/new-migration.mjs writes the file with the current UTC timestamp,
moves forward one second on a collision and never overwrites. The naming
rules live in scripts/check/lib/migrationNaming.mjs, shared by the gate and
the generator. DATABASE_GUIDE and src/lib/db/AGENTS.md describe the format.
2026-11-13 13:21:19 -03:00
diegosouzapw
0eee20f98f feat(ci): omni-queue candidate verdict and red classification
Implements plan sections 3.4 and 3.5 as pure modules: the candidate verdict
mirrors the Mergify merge_conditions (required success, advisory tolerated,
nothing pending, fail closed on skipped required checks, timeout), and red
candidates are classified as infra, base-red (same failures on a base check
of the same SHA, shard-insensitive) or PR-red.
2026-11-13 13:21:16 -03:00
diegosouzapw
c9588e7207 feat(ci): omni-queue candidate composition and landing
Compose the batch candidate in a bare scratch repository with git merge-tree --write-tree and commit-tree (no working tree, no rebase), classify excluded PRs (head moved, batch conflict, base conflict), push and delete candidate refs without force, and land via a fast-forward push used as compare-and-swap (merge-ff) or the squash API guarded by a final tree comparison (squash-api).
2026-11-13 13:20:59 -03:00
diegosouzapw
c72acfae00 feat(ci): omni-queue eligibility rules and batch selection
Implements plan section 3.3 as a pure module: approval bound to the exact
head through the approve.mjs commit status, release-freeze with exact
branch matching, protected surfaces, conflicts, shadow bookkeeping,
in-flight exclusion, and FIFO batch selection preferring green PR checks.
2026-11-13 13:18:38 -03:00
diegosouzapw
ca1389b2e3 feat(db): order migrations by the numeric value of their prefix
New migrations will be named YYYYMMDDHHMMSS_description.sql (UTC). As text,
"20261113120000" sorts before "235", so the runner would apply a timestamped
migration ahead of the legacy tables it depends on. getMigrationFiles(), the
applied-ledger reads and getMigrationStatus() now order versions with
compareMigrationVersions() (arbitrary-precision numeric prefix; namespaced
ee-NNN after the whole main set; anything else last). For the legacy set,
all three digits, the order is identical to the old text sort, so no existing
migration moves. Pending stays "not in the ledger", so a timestamped migration
that reaches a database after a later-dated one applies exactly once.

The doctor command lists pending migrations in the same numeric order.
2026-11-13 13:18:35 -03:00
diegosouzapw
ced490f4f9 feat(i18n): export syncLlmMirrors() for the release refresh, add --dry-run
scripts/i18n/sync-llm-mirrors.mjs now exports
syncLlmMirrors({ root?, dryRun?, log?, warn? }) returning
{ changedFiles, updated, unchanged, missing, locales, skipped } with
repo-relative paths, so release:refresh-derived and the translation wave can
call it instead of shelling out. The library call is silent by default.

The CLI is unchanged (same stdout/stderr lines and files written, checked
against the previous script on a copy of the 66 mirrors) and gains
--dry-run, which lists the mirrors that would change without writing. The
direct-run guard uses pathToFileURL, so importing the module no longer runs
the sync.
2026-11-13 13:16:54 -03:00
diegosouzapw
e2957ceb9c feat(ci): check-docs-sync skips the translation-mirror checks in PR mode
check-docs-sync.mjs reads the gate mode from scripts/check/lib/gateMode.mjs.

Release mode (push, schedule, the release PR, any local run, the pre-commit
hook) runs every check exactly as before: same lines, same exit code; the
only addition is a first line naming the mode.

PR mode keeps the checks a feature PR can break in its own sources:
package.json vs docs/openapi.yaml version, the root CHANGELOG [Unreleased]
heading and latest release, and the superseded-docs guard. It skips, with a
"SKIP reason=pr-mode" line, the two checks on derived files: the 66
docs/i18n/<locale>/llm.txt exact copies and the version sections / size of
the translated CHANGELOG.md mirrors. Feature PRs no longer write docs/i18n;
the translation wave (sync-llm-mirrors) and the release
(release:sync-changelog-i18n) do.

The jobs that run it (docs-sync-strict, Docs accuracy) need no change: the
mode comes from the Actions event. An invalid --mode fails closed.
2026-11-13 13:14:26 -03:00
diegosouzapw
3142fa8688 refactor(ci): move the docs-counts fact readers into scripts/release/facts.mjs
Plan 2026-11-13 (derived numbers resolved only at release), phase 1 groundwork:

- The counters and the tsx code-facts reader move verbatim from
  check-docs-counts-sync.mjs to scripts/release/facts.mjs, so the gate,
  `npm run facts` and `npm run release:refresh-derived` share one definition
  of every number. The gate re-exports them; no importer changes.
- scripts/check/lib/gateMode.mjs is the shared pr|release mode resolver, a
  byte-identical copy of the one introduced with the derived-files guard
  (01258da1), so both PRs merge cleanly in either order.

No behaviour change: the gate output on this tree is byte-identical before and
after, and the four gate test files pass (77/77).
2026-11-13 13:09:45 -03:00
diegosouzapw
3b9c89ce59 chore(release): drop the exact provider count from the package description
The npm description carried the live provider total, so every provider PR
rewrote the same line and 25 open PRs conflicted on it alone. Use a
count-free wording (also in flake.nix, which had drifted to 160+) and turn
the docs-counts check into a STRICT guard that rejects an exact provider
count in the description instead of requiring the live one.
2026-11-13 13:07:14 -03:00
diegosouzapw
48b954eb84 test(docs): assert only up-to-date mirrors in PR mode in six mirror-content tests
cycle-docs-mirror-contract, resilience-pre-dispatch-docs-mirrors,
cli-env-quality-docs-mirrors and docs/{remote-token-privilege,
route-guard-import,vision-key-scope}-locales pin an English contract in all
66 translated mirrors. A feature PR that changes that contract (and the test
literals) had to ship 66 translations in the same PR. They now take the
locale list from tests/_helpers/mirrorFreshness.ts: every locale in release
mode (unchanged behaviour), and in PR mode only the mirrors whose anchored
English section is unchanged since their translation.

Nothing is removed: every content assertion is still made for every locale
in release mode, and the target_hash provenance checks (mirror bytes ==
recorded translation) still run for every locale in both modes. The
remote-token, route-guard and vision-key tests move the provenance assert
to the top of the loop so it is not gated by the freshness plan.
2026-11-13 13:02:18 -03:00
diegosouzapw
509c1f594e test(i18n): mirror-freshness helper for mirror-content tests in pr/release mode
tests/_helpers/mirrorFreshness.ts decides which docs/i18n mirrors a test that
pins a contract in every locale must assert. Release mode (push, schedule,
release PR, local run) asserts every mirror, as before. PR mode asserts only
mirrors that are current with the English source per .i18n-state.json: the
record's source_hash equals the source bytes, or every `## ` section holding
one of the test's anchors still hashes to a recorded section_hashes entry
(the same split run-translation.mjs writes). Stale mirrors are skipped with a
"SKIP reason=pr-mode" diagnostic and left to the translation wave and the
docs drift gate. Untracked mirrors are asserted; an anchor missing from the
English source throws in both modes.

The mode comes from scripts/check/lib/gateMode.mjs.
2026-11-13 13:01:00 -03:00
diegosouzapw
a22472938f docs(ci): omni-queue comment-once and dashboard link contracts 2026-11-13 12:59:36 -03:00
diegosouzapw
9b325b7d9c docs(ci): omni-queue contract for a red batch parked during a base check 2026-11-13 12:55:12 -03:00
diegosouzapw
d7318d9039 feat(ci): omni-queue shared contracts, config and module interfaces
Lead commit of the omni-queue plan (self-hosted batch merge queue, Mergify
replacement). Defines what every work package builds against:

- config/merge-queue/config.json (merge-ff landing, batch of 6, label
  omni-queue, shadow mode) + a dependency-free validator, cross-checked
  against a Zod schema in the tests;
- contracts.mjs: state document, history events, ref naming (candidates
  under omni-queue/**, state on omni-queue-state outside that CI glob),
  merge-commit trailers, approval status contexts bound to the head SHA,
  protected-surface globs;
- gitexec.mjs: shell-free git runner with the token in env and redacted
  errors;
- interface stubs for the WP1-WP6 modules and the npm run queue entry.
2026-11-13 12:45:27 -03:00
diegosouzapw
01258da100 feat(ci): shared pr/release gate mode and a derived-files guard for feature PRs
Plan 2026-11-13 (derived numbers and texts resolved only at release), shared contract
for phases 4 and 5:

- scripts/check/lib/gateMode.mjs resolves pr|release for every gate that judges derived
  content: --mode, then OMNIROUTE_GATE_MODE, then the Actions event (feature pull_request,
  merge_group and omni-queue pushes are pr; push, schedule, dispatch, the release PR and
  local runs stay release, the strict behaviour of today). It also resolves the PR diff
  base and the changed files.
- scripts/check/check-pr-derived-paths.mjs fails a feature PR that carries files a
  refresh owns, per family declared in config/quality/derived-paths/*.json. A PR that only
  touches one family (a translation fix) and the family's writer branches are allowed;
  queue batches are skipped. No family is declared yet: phases 4 and 5 add theirs together
  with the gates they switch to release mode.
- Wired as a step of the PR Test Policy job.
2026-11-13 12:38:38 -03:00
diegosouzapw
5f79d4588c Merge PR #20135 (fix/release-v3.8.54-basereds-impact-map-reader) into merge train 2026-11-13 11:11:20 -03:00
diegosouzapw
52d42deffc fix(quality): read the test impact map line by line, past V8's string limit
The release map is 536.8 MB, 77 KB under V8's maximum string length.
check-forgotten-sibling-tests (and select-impacted-tests) loaded it with
readFileSync(utf8) + JSON.parse, so any PR adding tests failed Fast
Quality Gates with 'Cannot create a string longer than 0x1fffffe8
characters'.

The writer now starts every entry of a top-level object (sources,
artifacts) on its own line - still valid JSON - and readTestImpactMap()
parses it line by line from a Buffer, never decoding the whole file.
Other layouts fall back to JSON.parse while they fit in one string.
2026-11-13 11:10:18 -03:00
diegosouzapw
e4ffb97fda fix(dashboard): label the custom JSON template editor through the kit Field
The base Textarea adapter now forwards label to the kit Field, so the full
JSON template editor drops its hand-written <label> and uses it; the form
test asserts the textarea keeps an associated label.
2026-11-13 11:04:23 -03:00
diegosouzapw
7c32b935f2 fix(routing): keep the typed search rejection and API route types green for capability combos
- chat: the capability guard for non-chat providers now returns the typed
  search_provider_not_chat code (invalid_request_error), so /v1/messages and
  /v1/responses keep the #17858 contract (search-provider-chat-rejection-routes-17858).
- combos/[id]: cast the normalized capability routes back to the update schema type (TS2322).
- music/generations: dispatchMusicModel accepts the validated body's `duration?: unknown`
  (TS2345 on the direct dispatch call).
- skills: regenerate omni-inference endpoint references for the new /v1/search and
  /v1/web/fetch combo descriptions (check:agent-skills-sync).
2026-11-13 11:04:06 -03:00
diegosouzapw
309cf44453 Merge remote-tracking branch 'origin/release/v3.8.54' into recut/18731-capability-combo-routes
# Conflicts:
#	open-sse/services/imageCombo.ts
#	open-sse/services/speechCombo.ts
#	src/app/api/v1/ocr/route.ts
2026-11-13 11:02:29 -03:00
diegosouzapw
0ba483246e chore(merge): merge release/v3.8.54 into feat/system-one-complements-1108
The base added the expiry-first strategy (#17829) and the
CODE_ASSIST_INELIGIBLE_ONBOARD_LEGACY_TIER flag (#18060), so both sides
had moved the same counts.

- Strategies: the code registry now has 22 public strategies (expiry-first
  and jev). AGENTS.md, open-sse/services/AGENTS.md, the bs AGENTS mirror,
  AUTO-COMBO.md (table now has both rows), RESILIENCE_GUIDE.md and llm.txt
  state 22. The other docs the expiry-first PR bumped to 21 now say 22
  (README, CONTRIBUTING, ARCHITECTURE, FEATURES, OPEN_SSE_ARCHITECTURE,
  REPOSITORY_MAP, CODEBASE_DOCUMENTATION, comparison, diagrams README,
  request-pipeline, QUOTA_SHARE, RELEASE_CHECKLIST, tier-flow images).
  README's strategy table gets a jev row. The README SVGs were regenerated
  from their generators (comparison table, hero, tier cascade, strategies
  grid).
- Flags: both sides' flags are kept (catalog total 125, Runtime 62).
  featureFlagDefinitions.ts stays under the 1440-line cap: the System One
  spread loses its comment and two blank lines are dropped.
- llm.txt i18n mirrors: same five count lines as the root (docs-sync).
- stryker.conf.json: list boundary-engine-seams.test.ts, which now covers
  auth.ts and autoStrategy.ts (check:mutation-test-coverage --strict).
- strategy-registry test: CANONICAL is 22 public + quota-share = 23.
- connectionAwareExpansion.ts, check-fabricated-docs.mjs, stryker.conf.json:
  both sides kept.
2026-11-13 10:49:43 -03:00
diegosouzapw
694c2f3f41 Merge release/v3.8.54 into recut/17920-keenable-search
Brings the recut of #17920 up to release/v3.8.54 at 2f2c1957. The base
added Hetzner, Grokified, Replicate and Cerebrium (#19206) and moved the
canonical provider count 388 -> 393 on the same lines this branch bumps.

The 93 conflicted files were count-only (verified by masking digits). Each
conflict hunk keeps the release side; the merged tree then has 394
canonical providers (check:provider-consistency), so the provider total
was replayed 393 -> 394 on the lines check:docs-counts flags, the matching
llm.txt mirrors, the tier-flow SVGs and the README diagram generators.
Digit-only edits. PROVIDER_REFERENCE.md was regenerated with
gen:provider-reference and the README diagrams with docs:readme-diagrams.

The "Catalog-Marked Free" figure (153) and the README locale mirrors
(389) are left as the base has them; neither is gated and both were
already behind the code before this merge.

Co-authored-by: Ilya Bogin <246701201+ilya-bogin-keenable@users.noreply.github.com>
2026-11-13 10:43:28 -03:00
diegosouzapw
5a93d09c91 Merge remote-tracking branch 'origin/feat/port-pr-4929-custom-json-provider-node' into feat/port-pr-4929-custom-json-dashboard-form 2026-11-13 10:41:51 -03:00
diegosouzapw
33e3437646 chore(merge): merge release/v3.8.54 (#19573) into feat/pii-token-vault-wiring-1108 2026-11-13 10:41:03 -03:00
diegosouzapw
b1106f8edb chore(merge): merge release/v3.8.54 into feat/pii-token-vault-wiring-1108
Resolve the conflicts with the base, which added the
CODE_ASSIST_INELIGIBLE_ONBOARD_LEGACY_TIER flag (#18060) next to this
branch's PII_REVERSIBLE_VAULT_ENABLED flag:

- featureFlagDefinitions.ts: keep both module imports.
- feature-flags-settings / server-owned-tool-loop-flag tests: both flags
  are counted, so the catalog total is 123.
- FEATURE_FLAGS.md: the catalog header and the API example now say 123.

PII_REDACTION_ENABLED and PII_RESPONSE_SANITIZATION still default to
"false" (Hard Rule 20).
2026-11-13 10:38:56 -03:00
diegosouzapw
ced24b279a Merge origin/release/v3.8.54 into feat/port-pr-4929-custom-json-provider-node
Base added migrations 237-239, so the custom JSON node migration moves to
240_provider_node_custom_json_config.sql (test name and guide updated).
Count conflicts in AGENTS.md, llm.txt, README.md and the docs/i18n mirrors
took the base side, then the migration count was bumped to the merged
tree's 237 SQL files (llm mirrors via scripts/i18n/sync-llm-mirrors.mjs);
check:docs-counts reports no strict drift.
2026-11-13 10:38:32 -03:00
diegosouzapw
f841ec89a7 Merge origin/release/v3.8.54 into feat/port-pr-3604-new-models-inbox
Renumber the seen_models migration to 240 (base took 236-239) and carry the +1 migration count (237) onto the base docs and mirrors. Move the New models count chip and unread badge onto the kit Badge (no font-bold / sub-floor text sizes) for the base's type-scale ratchet.
2026-11-13 10:38:31 -03:00
diegosouzapw
cdbdeb7865 Merge PR #20133 (fix/release-v3.8.54-basereds-model-import-vision-test) into merge train 2026-11-13 10:32:50 -03:00
diegosouzapw
72fa79f571 Merge remote-tracking branch 'origin/release/v3.8.54' into fix/18772-quota-countdown-clock
# Conflicts:
#	src/app/(dashboard)/dashboard/usage/components/ProviderLimits/QuotaCard.tsx
2026-11-13 10:28:46 -03:00
diegosouzapw
bc9fbefbe7 test(dashboard): run the #19337 vision import case on the no-connection path
Since #19254 a provider with a connection imports through the model
sync, so the case added by #19337 (inside the model-sync block, with an
active connection) never reached POST /api/provider-models and failed on
release/v3.8.54. Move it, with the same assertions, to the no-auth
listing block, where the hook does create the rows. Verified that
removing the supportsVision forwarding from the hook fails it.
2026-11-13 10:28:18 -03:00
diegosouzapw
1e9c0e6f3c Merge remote-tracking branch 'origin/release/v3.8.54' into fix/tokenizer-linear-guard-1110 2026-11-13 10:21:39 -03:00
diegosouzapw
cc769e6651 fix(sse): keep the codex failover selector visible to the hard-lease inventory
The quota-preflight rotation aliased the selector into a local variable, so
the hard-lease credential inventory stopped seeing the codex 429 rotation site
(providerExecutionPipeline.ts counted 1 instead of 2). Call both arms directly
off the injected connection context and record the extra call expression in
the inventory (2 -> 3, still class B, same allowAccountRotation gate).

Also list tests/unit/codex-failover-quota-preflight-18425.test.ts in
stryker.conf.json tap.testFiles: it covers src/sse/services/auth.ts, a mutated
module, and check:mutation-test-coverage --strict flagged it as missing.
2026-11-13 10:14:42 -03:00
diegosouzapw
5d9d7652c1 Merge remote-tracking branch 'origin/release/v3.8.54' into fix/chat-ingest-budget-growth-1110 2026-11-13 10:05:38 -03:00
diegosouzapw
a0b8f538af Merge PR #18352 (feat/port-pr-5140-cloudflare-nova3-stt) into merge train 2026-11-13 10:02:30 -03:00
diegosouzapw
2a10707f12 Merge PR #18350 (feat/port-pr-4999-compatible-quota-check) into merge train 2026-11-13 10:01:22 -03:00
diegosouzapw
f1d527296e Merge PR #16792 (feat/16678-codex-ultrafast-1015) into merge train 2026-11-13 10:01:13 -03:00
diegosouzapw
28031e7f2c Merge PR #16783 (feat/16670-dmr-discovery-1015) into merge train 2026-11-13 10:01:04 -03:00
diegosouzapw
42120b77b2 Merge PR #19954 (fix/pem-pattern-linear-1111) into merge train 2026-11-13 10:00:56 -03:00
diegosouzapw
b0a87967ff Merge PR #19951 (fix/skill-write-routes-auth-1111) into merge train 2026-11-13 10:00:46 -03:00
diegosouzapw
bc0348c18b Merge PR #19946 (fix/search-caller-baseurl-public-1111) into merge train 2026-11-13 10:00:38 -03:00
diegosouzapw
812d77a76e Merge remote-tracking branch 'origin/release/v3.8.54' into recut/18546-chatgpt-csp-bridge 2026-11-13 09:58:34 -03:00
diegosouzapw
c2f526a459 Merge PR #19757 (fix/ci-workflow-run-guard-cache-semgrep) into merge train
# Conflicts:
#	.github/workflows/opencode-plugin-ci.yml
#	.github/workflows/opencode-provider-ci.yml
2026-11-13 09:58:33 -03:00
diegosouzapw
696d6818ee test(providers): match the Replicate stream host on the parsed URL
CodeQL (js/incomplete-url-substring-sanitization, 3 high) flagged the
three startsWith("https://stream.replicate.com") checks in the Replicate
executor test: a raw prefix also accepts stream.replicate.com.evil.test.
The test now compares the parsed protocol and hostname through a small
isReplicateStreamUrl() helper. Assertions are unchanged.

Co-authored-by: jowimila <127446097+jowimila@users.noreply.github.com>
2026-11-13 09:57:20 -03:00
diegosouzapw
59c958e7de Merge PR #19732 (fix/19016-opencode-master-auto) into merge train 2026-11-13 09:55:18 -03:00
diegosouzapw
24a37e955a Merge PR #19731 (fix/18753-local-cli-models-binary-gate) into merge train 2026-11-13 09:55:13 -03:00
diegosouzapw
03f20f18cf Merge PR #19671 (fix/reasoning-cache-scope-1110) into merge train 2026-11-13 09:55:07 -03:00
diegosouzapw
885cd74fe4 Merge PR #19660 (fix/plugin-blocking-hook-limit-1110) into merge train 2026-11-13 09:55:01 -03:00
diegosouzapw
5b8ff2f1ef Merge PR #18156 (fix/qg-subpackage-ci-20261025) into merge train 2026-11-13 09:54:55 -03:00
diegosouzapw
3ba344bdcf Merge PR #16081 (fix/video-promotion-evidence-20261009) into merge train 2026-11-13 09:53:51 -03:00
diegosouzapw
da02e0ef31 Merge PR #19975 (fix/key-health-write-scope-1111) into merge train 2026-11-13 09:53:45 -03:00
diegosouzapw
ec6a691927 Merge PR #19974 (fix/executor-dispatch-guard-1111) into merge train 2026-11-13 09:53:26 -03:00
diegosouzapw
9830b56b28 Merge PR #19343 (fix/ci-draft-admission-observation) into merge train 2026-11-13 09:53:18 -03:00
diegosouzapw
64bf9b6ec2 test(chatgpt-web): compare the CSP rejection message exactly instead of a hand-escaped regex
CodeQL js/incomplete-sanitization flagged the ASSET.replace(/\./g) escape in the
CSP-directive test. Assert the full error string with equality, which is stricter
than the regex and needs no escaping.
2026-11-13 09:52:59 -03:00
diegosouzapw
799b94c201 Merge PR #19321 (chore/ci-extract-workflow-hardening-1108) into merge train
# Conflicts:
#	.github/workflows/ci.yml
2026-11-13 09:50:51 -03:00
diegosouzapw
4de1bab83a Merge release/v3.8.54 into recut/19206-providers
Brings the recut up to release/v3.8.54 at 2f2c1957. The base already
contains the original #19206 (bf8a11df), which ships the same Replicate,
Cerebrium, Hetzner and Grokified code as this recut, so every source,
test and snapshot file merges to the base copy.

The count-only conflicts (AGENTS.md, llm.txt and its mirrors, README,
docs, README diagrams and their generators, skills, package.json) keep
the base side: the providers are already counted there (393). The
reserved-prefix test keeps the base side, which already pins 450 with the
four new prefixes. This recut's changelog fragment is dropped because the
base's changelog.d/features/19206-free-llm-providers.md already records
the same providers with credit.

Co-authored-by: jowimila <127446097+jowimila@users.noreply.github.com>
2026-11-13 09:50:09 -03:00
diegosouzapw
1eb132d7ea Merge branch 'release/v3.8.54' into feat/readme-followups-1102
# Conflicts:
#	docs/screenshots/free-tier-budget-card.svg
2026-11-13 09:40:59 -03:00
diegosouzapw
b5cc9df496 Merge PR #18200 (fix/qg-i18n-coverage-lookup-20261026) into merge train
# Conflicts:
#	scripts/quality/collect-metrics.mjs
2026-11-13 09:39:55 -03:00
diegosouzapw
d9c98f1423 Merge PR #18196 (fix/qg-remote-media-boundary-20261026) into merge train 2026-11-13 09:36:59 -03:00
diegosouzapw
c46de1f170 Merge PR #18179 (fix/qg-release-fixtures-20261026) into merge train 2026-11-13 09:36:51 -03:00
diegosouzapw
e60a79d9a9 Merge PR #18173 (fix/qg-i18n-wave-contract-20261026) into merge train 2026-11-13 09:36:44 -03:00
diegosouzapw
7f2cf26109 Merge PR #18172 (fix/qg-main-basereds-20261025) into merge train 2026-11-13 09:36:36 -03:00
diegosouzapw
c931fd42bb Merge PR #18158 (fix/qg-buffered-sse-errors-20261025) into merge train 2026-11-13 09:36:30 -03:00
diegosouzapw
a5c86c8292 Merge PR #18154 (fix/qg-observer-parity-20261025) into merge train 2026-11-13 09:36:19 -03:00
diegosouzapw
c11a0b4317 Merge PR #18152 (fix/qg-openapi-event-baseline-20261025) into merge train 2026-11-13 09:36:14 -03:00
diegosouzapw
86f5621c6a Merge PR #17856 (fix/qg-acceptance-evidence-20261021) into merge train 2026-11-13 09:36:08 -03:00
diegosouzapw
1610f2160d Merge PR #16177 (fix/qg-coverage-scope-20261010) into merge train 2026-11-13 09:35:59 -03:00
diegosouzapw
d4f79bb517 Merge PR #19859 (fix/release-v3.8.54-basereds-provenance-commit) into merge train 2026-11-13 09:35:50 -03:00
diegosouzapw
7fb6e96a18 Merge commit '2f2c1957638c59c9f846dc2775488871df28a123' into docs/17187-policy-docs-20261020
# Conflicts:
#	AGENTS.md
2026-11-13 09:22:57 -03:00
diegosouzapw
4c2b29eef8 Merge remote-tracking branch 'origin/release/v3.8.54' into fix/18425-codex-failover-quota-preflight 2026-11-13 09:18:28 -03:00
diegosouzapw
c9d7d42e87 Merge remote-tracking branch 'origin/release/v3.8.54' into recut/18546-chatgpt-csp-bridge 2026-11-13 09:16:39 -03:00
diegosouzapw
32769d57a7 Merge remote-tracking branch 'origin/release/v3.8.54' into fix/tokenizer-linear-guard-1110 2026-11-13 09:13:41 -03:00
diegosouzapw
7c38857cbd Merge remote-tracking branch 'origin/release/v3.8.54' into fix/chat-ingest-budget-growth-1110 2026-11-13 09:13:19 -03:00
diegosouzapw
b6ad7fe3ce Merge remote-tracking branch 'origin/release/v3.8.54' into fix/18425-codex-failover-quota-preflight 2026-11-13 09:13:06 -03:00
Kiaro-Sama
218e0b8ea9 fix(dashboard): render error recovery through the client button boundary
Compose recovery anchors with Button asChild instead of calling a
client-exported helper from the server scaffold. Preserve server-rendered
headings, navigation and UI-kit variants without requiring hydration.

Cover all eight actual production routes with a failing-then-passing
HTTP HTML regression, plus focused CTA and design-system tests.
2026-11-13 13:56:29 +03:30
diegosouzapw
8957b10777 refactor(security): move sticky key lookup out of resolveKeyForRequest 2026-11-11 16:07:39 -03:00
diegosouzapw
22b7213c10 fix(security): persist only the key-health slice and honor cooldown on sticky keys
recordKeyHealthStatus wrote the whole per-request providerSpecificData, so
request-local values landed on the shared connection and a stale snapshot
overwrote concurrent edits. It now merges only apiKeyHealth in a transaction,
and resolveKeyForRequest no longer returns a sticky key in 429 cooldown.
2026-11-11 15:22:29 -03:00
diegosouzapw
49ad5d0a29 fix(security): keep the private_key credential pattern linear
The lazy body restarted at every BEGIN header and ran to the end of the text
when no END marker followed, so a body of repeated headers cost the square of
its size on the event loop. The body may no longer contain "-----", so each
scan stops at the next marker.
2026-11-11 13:07:48 -03:00
diegosouzapw
494ae52f1b fix(security): require management auth on skill write routes in every mode
/api/agent-skills/generate (prune deletes host directories) and the
marketplace and skills.sh install routes (global skill injected into every
key's requests) checked auth only when login was on. They are now
ALWAYS_PROTECTED and call requireManagementAuth with alwaysRequireAuth.
2026-11-11 12:39:46 -03:00
diegosouzapw
5cf192e7a9 fix(security): keep a caller SearXNG base URL on public hosts
/v1/search can be called without a credential, so a caller-supplied
provider_options.baseUrl on loopback or LAN let anyone make the server fetch
internal services. A caller base URL now must be public on the first hop, on
every redirect and at connect time; the operator's stored base URL keeps
loopback and LAN.
2026-11-11 12:02:00 -03:00
Diego Rodrigues de Sa e Souza
e65c783085 Merge branch 'release/v3.8.54' into fix/release-v3.8.54-basereds-provenance-commit 2026-11-11 11:09:36 -03:00
diegosouzapw
f0eca5cd86 fix(deps): lock joi at 18.3.2 for GHSA-4528-x5fx-h6hg
joi 18.2.9 (pulled by wait-on ^18.2.9) is affected by GHSA-4528-x5fx-h6hg,
a quadratic-time split in string().email({ multiple: true }); fixed in
18.3.1. This is the last HIGH advisory left once mongoose moves to 9.12.1,
and it keeps check:vuln-ratchet red on release/v3.8.54 (#19329): 8 > 7.

Lockfile-only update via `npm update joi --package-lock-only`; joi's
dependency set is unchanged. With both bumps, osv-scanner reports 7
(LOW=1, MODERATE=6) against the baseline of 7, and npm audit has no
high or critical advisory.
2026-11-11 08:54:54 -03:00
dependabot[bot]
83e532e487 deps: bump mongoose from 9.7.4 to 9.12.1
Bumps [mongoose](https://github.com/Automattic/mongoose) from 9.7.4 to 9.12.1.
- [Release notes](https://github.com/Automattic/mongoose/releases)
- [Changelog](https://github.com/Automattic/mongoose/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Automattic/mongoose/compare/9.7.4...9.12.1)

---
updated-dependencies:
- dependency-name: mongoose
  dependency-version: 9.12.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
(cherry picked from commit bbc1c5b5aa)
2026-11-11 08:52:28 -03:00
diegosouzapw
3856930120 fix(quality): point the provider-asset manifest at the landed #15201 commit
#15201 recorded auditedCommit 959ff4dd, the merge commit on its own branch.
The squash merge left that object unreachable from release/v3.8.54, so
check:provider-asset-provenance fails in CI on the base and on every PR
("auditedCommit object does not exist", release-green run 42875024212, #19329).

895c0f35 is the squash of #15201 on the release branch. Its public/providers
tree is identical to 959ff4dd (146 files, empty diff), so the recorded hashes
still describe the audited snapshot.
2026-11-11 03:07:18 -03:00
diegosouzapw
cfdfef984a feat(providers): add Hetzner, Grokified, Replicate and Cerebrium
Recut of #19206 keeping only the four providers:

- Replicate: chat executor on the predictions API (native SSE relay,
  polling fallback with cancel on deadline, real token usage from
  metrics, owner/name:version models, same-origin Bearer guard, errors
  through buildErrorBody/sanitizeErrorMessage). Joins the existing
  Replicate video entry as an llm+video catalog provider.
- Cerebrium: per-deployment /run Base URL used verbatim; a connection
  without a Base URL fails fast with a 400.
- Hetzner Inference and Grokified: OpenAI-compatible registry entries
  with live model discovery.

Provider counts move 388 -> 392 (digit-only), PROVIDER_REFERENCE is
regenerated, and the executor-map and translate-path goldens include
the new entries.

Co-authored-by: jowimila <127446097+jowimila@users.noreply.github.com>
2026-11-10 21:12:12 -03:00
diegosouzapw
e8d101708d refactor(flags): move the PII sanitization-mode flag next to the vault flag
After the release merge the catalog reached the 1440-line cap. The
non-mutating PII_RESPONSE_SANITIZATION_MODE definition moves unchanged
into piiVaultFeatureFlag.ts and keeps its position in the list; the two
data-mutating PII flags (Hard Rule 20) stay in the catalog.
2026-11-10 19:02:50 -03:00
diegosouzapw
1874729f43 Merge remote-tracking branch 'origin/release/v3.8.54' into mp/19326 2026-11-10 18:50:54 -03:00
diegosouzapw
0ef09ab0df Merge remote-tracking branch 'origin/release/v3.8.54' into HEAD 2026-11-10 18:01:03 -03:00
diegosouzapw
ec0f2217f4 docs(ci): describe INCOMPLETE exit 2 for the required osv vuln ratchet
The ratchet no longer skips on a missing measurement; update the ci.yml
step comments, the QUALITY_GATES.md row and the script header to match.
2026-11-10 17:16:53 -03:00
diegosouzapw
00252eaead Merge remote-tracking branch 'origin/release/v3.8.54' into HEAD 2026-11-10 17:15:14 -03:00
diegosouzapw
9cab580f7a Merge remote-tracking branch 'origin/release/v3.8.54' into HEAD 2026-11-10 16:23:21 -03:00
diegosouzapw
85d1400864 fix(chatgpt-web): evaluate the CSP-safe bridge installer as source text
Keeps the contributor's approach (no blob: module script; same-origin
first-party chunks loaded with a native dynamic import() through
page.evaluate) and closes the review items on top of it:

- The installer is built as source text by
  buildChatGptWebBridgeInstallerSource() instead of a function literal.
  Playwright serializes a function with toString() after tsx/esbuild or
  the Next bundler ran, and tsx already rewrites the inline import() into
  an interop wrapper and injects __name(), which does not exist inside
  chatgpt.com. The text form also keeps one source of truth for the
  integrity resolution (buildChatGptWebIntegrityResolutionSource) and
  removes the dead buildBridgeModuleSource that failed lint.
- Restore the CSP diagnosis from #14773: the installer listens for
  securitypolicyviolation and reports "csp: <directive> blocked <url>",
  extracted from Playwright's prefixed message.
- Retry only a destroyed execution context; a navigation timeout is no
  longer retried. One shared helper for both page probes.
- The session preflight reports a credential failure only for 401 or a
  JSON session without a user; a 403/429/5xx or a non-JSON challenge page
  becomes "session check is unavailable", classified as a local bridge
  failure so a transient answer cannot put the account on cooldown.
- Prettier on the contributor's files; tests for the installer (legacy and
  integrity paths, validated URLs, CSP naming, no blob/__name), the
  navigation-timeout case and the session status split.

Verified in headless Chromium under script-src 'self': a blob module is
blocked, the installer loads a same-origin chunk, and a cross-origin
import is refused and named as csp.

Co-authored-by: GodsQuantum <193283917+GodsQuantum@users.noreply.github.com>
2026-11-10 15:27:03 -03:00
diegosouzapw
30a10f3f3c Merge remote-tracking branch 'origin/release/v3.8.54' into HEAD 2026-11-10 15:11:03 -03:00
diegosouzapw
c5ffd32336 fix(dashboard): type the capability route drafts in the combo builder 2026-11-10 14:58:24 -03:00
diegosouzapw
b280ce589e fix(ci): harden the VPS workflow_run gate, drop publish caches and pin Semgrep
Carries the three items worth keeping from the closed #18165 draft:
verify repository, event and ref before a workflow_run deploy, stop
restoring a package-manager cache in publishing and opencode workflows,
and pin the Semgrep image by digest. The electron cache contract is
inverted on purpose and four zizmor cache-poisoning ignores are removed.
2026-11-10 14:52:18 -03:00
diegosouzapw
fb8bcf743f Merge release/v3.8.54 into feat/system-one-complements-1108 2026-11-10 14:46:23 -03:00
diegosouzapw
cbbd740d36 docs: re-sync provider count to 389 after the Sign in with ChatGPT merge
Both this branch (keenable-search) and release/v3.8.54 (#15201, chatgpt)
moved the canonical provider count 387 -> 388 on the same lines, so the merge
kept 388. The merged tree has 389 canonical providers
(check:provider-consistency). Digit-only edits on those lines (AGENTS.md,
llm.txt + mirrors, README + mirrors, skills, package.json, docs, generator
constants); PROVIDER_REFERENCE.md and the README diagrams regenerated with
gen:provider-reference and docs:readme-diagrams.
2026-11-10 14:12:52 -03:00
diegosouzapw
d6e0e62e91 Merge release/v3.8.54 into recut/17920-keenable-search
Resolve the count-only conflicts with #15201 (chatgpt): README and
ARCHITECTURE keep this branch's lines, the three generated README SVGs take
the base copy and are regenerated in the next commit.
2026-11-10 14:01:11 -03:00
diegosouzapw
b6541d233b Merge remote-tracking branch 'origin/feat/port-pr-4929-custom-json-provider-node' into mp/18359 2026-11-10 13:58:07 -03:00
diegosouzapw
85596209bd Merge release/v3.8.54 into feat/port-pr-4929-custom-json-provider-node 2026-11-10 13:56:22 -03:00
diegosouzapw
9542244362 refactor(routing): resolve video combo targets outside the executor 2026-11-10 12:58:32 -03:00
diegosouzapw
782bf4964b refactor(routing): keep capability combo projection inside the engine
Move the capability projection and ordering modules under open-sse so the engine
gains no new dependency on the app, and split the functions flagged by the
complexity ratchets. Behavior is unchanged.
2026-11-10 12:28:03 -03:00
diegosouzapw
643ccc0a8d fix(providers): pin the bare master auto router outside the OpenCode v2 per-owner cap (#19016) 2026-11-10 12:27:29 -03:00
diegosouzapw
1c72f840c6 fix(providers): /v1/models hides auggie and zcode when their binary is missing (#18753)
The catalog treated every no-auth provider as always active, so aug/* and zc/* models were advertised on hosts without the CLI and failed at request time. A new cached host check (AUGGIE_BIN/ZCODE_BIN, installer paths, PATH) is resolved once per catalog build; an explicit connection row still keeps the provider listed, and other local-CLI providers stay fail-open.
2026-11-10 12:20:36 -03:00
diegosouzapw
de763eedf4 fix(sse): run the quota preflight when a Codex 429 fails over to another account (#18425) 2026-11-10 12:07:53 -03:00
diegosouzapw
b249d1e5cc refactor(pii): move the token vault into the engine (boundary 775 -> 774)
chatCore needs hasMintedPiiTokens, which added an open-sse -> src edge. The vault only
depends on node builtins, so it now lives in open-sse/utils; src/lib/pii/tokenVault.ts
stays as a re-export for the app side and the tests.
2026-11-10 11:54:27 -03:00
diegosouzapw
795c5d661b docs: re-sync provider count to 388 after the Codex Web Search merge
Both this branch (keenable-search) and release/v3.8.54 (#17933, codex-search)
bumped the canonical provider count 386 -> 387 on the same lines, so the merge
kept 387. The merged tree has 388 canonical providers
(check:provider-consistency). Digit-only edits on the lines either side bumped,
plus PROVIDER_REFERENCE.md regenerated with gen:provider-reference.
2026-11-10 11:54:06 -03:00
diegosouzapw
d83311b09c Merge branch 'mp/18353' into mp/18359 2026-11-10 11:39:56 -03:00
diegosouzapw
23537e032f Merge remote-tracking branch 'origin/release/v3.8.54' into mp/19326
# Conflicts:
#	tests/unit/feature-flags-settings.test.ts
#	tests/unit/server-owned-tool-loop-flag.test.ts
2026-11-10 11:34:12 -03:00
diegosouzapw
b371d9ddd0 Merge release/v3.8.54 into recut/17920-keenable-search
Resolve the Codex Web Search (#17933) collision: keep both keenable-search
and codex-search in the registry, aliases, handler imports and tests
(24 search providers, 8 fetch providers).
2026-11-10 11:31:55 -03:00
diegosouzapw
00a00e26c8 Merge remote-tracking branch 'origin/release/v3.8.54' into mp/18350
# Conflicts:
#	src/i18n/messages/pt.json
2026-11-10 11:25:31 -03:00
diegosouzapw
36ccef7bbb Merge remote-tracking branch 'origin/release/v3.8.54' into mp/19328
# Conflicts:
#	docs/diagrams/comparison-table.svg
#	docs/diagrams/readme-hero.svg
#	docs/reference/FEATURE_FLAGS.md
#	scripts/check/check-fabricated-docs.mjs
#	scripts/docs/gen-readme-comparison-table.mjs
#	scripts/docs/gen-readme-hero.mjs
#	src/shared/constants/featureFlagDefinitions.ts
#	tests/unit/feature-flags-settings.test.ts
#	tests/unit/server-owned-tool-loop-flag.test.ts
2026-11-10 11:25:31 -03:00
diegosouzapw
7213d32f10 fix(dashboard): drive quota Resets-in countdowns from a shared clock so React Compiler memoization cannot freeze them (#18772) 2026-11-10 11:22:26 -03:00
diegosouzapw
5dc6cc22b8 Merge remote-tracking branch 'origin/release/v3.8.54' into mp/18353
# Conflicts:
#	src/sse/handlers/chat.ts
2026-11-10 11:21:41 -03:00
diegosouzapw
d50813c6c1 Merge release/v3.8.54 into docs/17187-policy-docs-20261020
Keep the release's 233-migration count and the PR's Domain services line.
2026-11-10 11:09:05 -03:00
diegosouzapw
2f0d4d9eeb fix(routing): narrow combo projection to the requested DAG and localize capability tabs
Projection ran on every chat request and normalized all saved combos, scanning
every name per string step (54 ms with 10 combos, 2.1 s with 500). Walk only the
requested combo's DAG with one precomputed name set.

Also move the capability tab strings to the combos catalog and add a registry
wide guard that chat-capable models stay chat-capable.
2026-11-10 10:22:02 -03:00
diegosouzapw
d5c92b21cf fix(sse): build the tool-call cache key with the fingerprint helper 2026-11-10 10:01:52 -03:00
diegosouzapw
061696aaad Merge branch 'release/v3.8.54' into codex/capability-aware-web-combos 2026-11-10 09:52:52 -03:00
diegosouzapw
afa1d55698 fix(sse): scope replayed tool-call reasoning to its API key and session
Tool-call reasoning was cached under the bare tool call id, which clients can
reuse. Entries are now keyed by the API key and session that produced them, and
every replay path reads with the same scope.
2026-11-10 06:23:14 -03:00
diegosouzapw
59f1031b5e fix(plugins): run request-blocking hooks on every call
A blocking hook decides on the request, so skipping it above the per-plugin rate
limit let the request through unchecked. The limit now covers fire-and-forget
hooks only.
2026-11-10 05:37:39 -03:00
diegosouzapw
9d374410bf fix(sse): keep token counting linear on input the exact tokenizer handles slowly
Long runs of one character class and heavy non-ASCII text can make the exact
tokenizer block the event loop. Such input now uses a linear estimate; ordinary
text keeps the exact count.
2026-11-10 05:18:46 -03:00
diegosouzapw
a14e2413f5 Merge release/v3.8.54 into recut/17920-keenable-search
Brings the recut of #17920 up to release/v3.8.54 at 6a49598e. No conflicts and
no count changes.

Co-authored-by: Ilya Bogin <246701201+ilya-bogin-keenable@users.noreply.github.com>
2026-11-10 05:09:45 -03:00
diegosouzapw
a03ae96195 Merge release/v3.8.54 into recut/17920-keenable-search
Brings the recut of #17920 up to release/v3.8.54 at 8943ca61, which added
RenderHour (#18103) and moved the provider count 385 -> 386 in the same
count-only files this PR bumps. For those 93 files the release side was kept
and the PR's own +1 provider / +1 hasFree was replayed on top (387 providers,
154 hasFree, 20 search providers). PROVIDER_REFERENCE.md and the four README
diagrams were regenerated. Protected files change in digits only.

Co-authored-by: Ilya Bogin <246701201+ilya-bogin-keenable@users.noreply.github.com>
2026-11-10 04:52:59 -03:00
diegosouzapw
e2fcaf3959 fix(sse): charge the chat ingest budget for the bytes a body really holds 2026-11-10 03:12:57 -03:00
diegosouzapw
dc2f695f40 fix(codex): drop the unused scopeCodexServiceTierDefault re-export from src
dead-code flagged it on the new-code check: only the engine (codex executor
and chatCore service tier) calls scopeCodexServiceTierDefault, and both import
it from open-sse/config directly.
2026-11-10 01:14:30 -03:00
diegosouzapw
ab095d6d41 Merge release/v3.8.54 into recut/17920-keenable-search
Brings the recut of #17920 up to release/v3.8.54 at 8e72dbf5. The base added
MegaBrain (#18129), which moved the provider count 384 -> 385 in the same
count-only files this PR bumps. For those 93 files the release side was kept
and the PR's own +1 provider / +1 hasFree was replayed on top (386 providers,
154 hasFree, 20 search providers). PROVIDER_REFERENCE.md and the four README
diagrams were regenerated. Protected files change in digits only.

Co-authored-by: Ilya Bogin <246701201+ilya-bogin-keenable@users.noreply.github.com>
2026-11-10 00:51:48 -03:00
diegosouzapw
f351c01576 Merge remote-tracking branch 'origin/fix/video-promotion-evidence-20261009' into mp/16083 2026-11-10 00:10:55 -03:00
diegosouzapw
90d8fa1291 refactor(systemone): keep the jev modules off src/ (boundary 777 -> 774)
The jev strategy added three open-sse -> src edges, failing the boundary
ratchet (head 777, base 774). Remove them without raising the ceiling:

- jevBlockChecker: derive JevResilienceSettings from the engine's own
  isProviderInCooldown signature instead of importing the src type.
- jevRuntimeUnits: take the already-resolved resilienceSettings from combo
  setup (combo.ts -> tryRuntimeUnitDispatch) instead of resolving them from
  src again; same value, comboSetup resolves the same settings object.
- jevAsk: reach getProviderCredentials through autoStrategy.ts, which already
  imports src/sse/services/auth (same seam pattern as #18467).

boundary-engine-seams.test.ts pins the seam and the src-free jev files.
2026-11-09 23:49:37 -03:00
diegosouzapw
2ae94c5448 test(ci): pin the static-profile base ref without a live origin/main
The CI unit checkout is shallow and has no origin/main, so loadFullCiProfile's
git rev-parse failed three static-profile tests. The base-SHA resolver is now an
injectable parameter (default unchanged: git rev-parse origin/<ref>); the tests
pin a fixed SHA and additionally assert the declared ref (main) is the one pinned.
2026-11-09 22:02:51 -03:00
diegosouzapw
bd2bc184ea refactor(codex): keep the Ultrafast model scope in the engine (boundary 776 -> 774)
The Codex executor and the chatCore service-tier resolver imported
scopeCodexServiceTierDefault from src/lib/providers, adding two
open-sse -> src edges the boundary ratchet rejects. The pure leaf module
moves to open-sse/config/codexServiceTierModels.ts (tier type made generic
so it needs no src type import); src/lib/providers/codexServiceTierModels.ts
re-exports it for the dashboard and settings modules.
2026-11-09 22:02:31 -03:00
diegosouzapw
f23fb39008 Merge remote-tracking branch 'origin/release/v3.8.54' into mp/18154 2026-11-09 22:01:09 -03:00
diegosouzapw
49779d714e Merge remote-tracking branch 'origin/release/v3.8.54' into mp/16792 2026-11-09 21:59:05 -03:00
diegosouzapw
dba7261840 Merge remote-tracking branch 'origin/release/v3.8.54' into mp/18179 2026-11-09 21:58:53 -03:00
diegosouzapw
e443068164 fix(sse): keep the media shim and redirect loop within the new-code gates
Split the per-hop fetch selection out of openRemoteMedia (complexity 16 -> under 15)
and drop shim re-exports no application code imports through the src path.
2026-11-09 21:57:25 -03:00
diegosouzapw
3da4ab29b8 Merge feat/port-pr-4929-custom-json-provider-node into feat/port-pr-4929-custom-json-dashboard-form 2026-11-09 21:57:22 -03:00
diegosouzapw
1540899516 fix(sse): dispatch custom JSON calls through the engine transport (boundary 775 -> 774)
The custom JSON executor imported safeOutboundFetch from src/, adding an
open-sse -> src edge the boundary ratchet rejects. It now sends its single
request through dispatchGuarded() — the transport every other executor uses
for an operator-supplied base URL — wrapped in the engine's fetchWithTimeout:
string-level guard on every call (403), connect-time DNS-rebinding guard
(403), default fetch timeout (504), no retry, redirects never followed (502).
The dispatchPin re-export of getProviderOutboundGuard is no longer needed.
Adds a regression test pinning the no-redirect behavior.

Co-authored-by: lyccccy <g1337699300@gmail.com>
2026-11-09 21:55:58 -03:00
diegosouzapw
aa084852ed Merge remote-tracking branch 'origin/release/v3.8.54' into mp/18196 2026-11-09 21:50:25 -03:00
diegosouzapw
f7beb91889 Merge remote-tracking branch 'origin/release/v3.8.54' into mp/18353 2026-11-09 21:50:01 -03:00
diegosouzapw
567e40c222 Merge release/v3.8.54 into feat/system-one-complements-1108
Re-resolve README generator counts: release's 385 providers, PR's 21 routing
strategies; SVGs regenerated.
2026-11-09 17:08:27 -03:00
diegosouzapw
3570f14863 Merge release/v3.8.54 into recut/17920-keenable-search
Brings the recut of #17920 up to release/v3.8.54 at d04ac167 (#14840).
No conflicts; no provider or search counts changed on the base side.

Co-authored-by: Ilya Bogin <246701201+ilya-bogin-keenable@users.noreply.github.com>
2026-11-09 16:02:07 -03:00
diegosouzapw
63dd950be0 fix(video): narrow the parsed previous-report receipt to PromotionRunReceipt
build-typecheck flagged TS2345: with strict:false zod infers every key of
promotionRunReceiptSchema as optional, so the parsed previous report did not
satisfy PromotionRunReceipt. The schema mirrors the interface field for field.
2026-11-09 15:36:51 -03:00
diegosouzapw
530ae1bff5 Merge release/v3.8.54 into fix/video-promotion-evidence-20261009 2026-11-09 15:36:50 -03:00
diegosouzapw
2019dc64a4 Merge origin/release/v3.8.54 into feat/port-pr-3604-new-models-inbox
Migrations 234/235 are now taken on the tip (agent_sessions, usage_history_agent_session_id), so the
seen_models migration moves to 236 (next free) and the migration count goes 232 -> 233 (digits only).
2026-11-09 14:58:52 -03:00
diegosouzapw
474eb493f9 Merge the current #18353 head (437c527f) into feat/port-pr-4929-custom-json-dashboard-form 2026-11-09 14:56:33 -03:00
diegosouzapw
437c527fa1 Merge origin/release/v3.8.54 into feat/port-pr-4929-custom-json-provider-node
Migrations 234/235 are now taken on the tip (agent_sessions, usage_history_agent_session_id), so the
custom JSON migration moves to 236 (next free) and the migration count goes 232 -> 233 (digits only).
2026-11-09 14:53:35 -03:00
diegosouzapw
f9edd007c9 Merge release/v3.8.54 into docs/17187-policy-docs-20261020
Keep the release's 232-migration count and the PR's Domain services line.
2026-11-09 14:51:46 -03:00
diegosouzapw
3398c19b72 Merge release/v3.8.54 into feat/system-one-complements-1108
Re-resolve README generator counts after new providers landed: keep the
release's 384 providers and the PR's 21 routing strategies; SVGs regenerated.
2026-11-09 14:16:06 -03:00
diegosouzapw
36219531d4 Merge release/v3.8.54 into feat/keenable-search
Keep the release side for the count lines and re-apply this PR's +1
(Keenable Search) on top of ParalonCloud: 384 -> 385 providers,
153 -> 154 hasFree; regenerated PROVIDER_REFERENCE.md and README SVGs.
2026-11-09 14:05:45 -03:00
diegosouzapw
304f5830e3 Merge release/v3.8.54 into feat/system-one-complements-1108
Resolve README hero/comparison-table generator conflicts: keep the release's
383 providers and the PR's 21 routing strategies; SVGs regenerated.
2026-11-09 13:44:30 -03:00
diegosouzapw
5f006d9e35 fix(db): renumber the seen_models migration to 234 and sync the migration count to 231
Migration 233 is now taken on release/v3.8.54 by 233_api_key_self_service_settings.sql (#14771).
2026-11-09 13:29:39 -03:00
diegosouzapw
fa6b4809f9 Merge remote-tracking branch 'origin/release/v3.8.54' into mp/16864 2026-11-09 13:29:07 -03:00
diegosouzapw
55131aa7c3 Merge origin/release/v3.8.54 into feat/port-pr-4929-custom-json-dashboard-form
# Conflicts:
#	src/i18n/messages/vi.json
2026-11-09 13:26:01 -03:00
diegosouzapw
268235e4eb Merge remote-tracking branch 'origin/feat/port-pr-4929-custom-json-provider-node' into mp/18359 2026-11-09 13:25:06 -03:00
diegosouzapw
f2014e3519 refactor(search): split keenableFetch result and error mapping
Extract buildFetchResult() and mapFetchError() so keenableFetch stays
within the complexity ratchet (cyclomatic and cognitive 16 -> <=15).
No behavior change; covered by tests/unit/keenable-web-provider.test.ts.

Co-authored-by: Ilya Bogin <ilya-bogin-keenable@users.noreply.github.com>
2026-11-09 13:07:33 -03:00
diegosouzapw
5442198be2 Merge release/v3.8.54 into feat/keenable-search
Resolve the provider-count conflicts by keeping the release side and
re-applying this PR's +1 (Keenable Search): 383 -> 384 providers,
153 -> 154 hasFree, regenerated PROVIDER_REFERENCE.md and README SVGs.
2026-11-09 12:28:36 -03:00
diegosouzapw
4fa1c67ca2 Merge remote PR head 9edc7e4a into feat/port-pr-4999-compatible-quota-check 2026-11-09 11:27:18 -03:00
diegosouzapw
372856078b ci: retrigger checks after retargeting to release/v3.8.54 2026-11-09 11:13:45 -03:00
diegosouzapw
f3d07296aa Merge remote-tracking branch 'origin/release/v3.8.54' into HEAD 2026-11-09 11:09:10 -03:00
diegosouzapw
9970d9fa4e chore(merge): merge fix/video-promotion-evidence-20261009 into test/video-live-receipts-20261009 2026-11-09 11:03:01 -03:00
diegosouzapw
446825fdce style(video): prettier-format promotion case kind union 2026-11-09 10:56:55 -03:00
diegosouzapw
f1a4454a06 chore(merge): merge release/v3.8.54 into fix/video-promotion-evidence-20261009 2026-11-09 10:47:28 -03:00
diegosouzapw
c74ede0b11 Merge remote-tracking branch 'origin/release/v3.8.54' into feat/system-one-complements-1108 2026-11-09 10:45:24 -03:00
diegosouzapw
ecb2133d8b fix(usage): guard the compatible quota call through the engine's dispatch guard
safeOutboundFetch and getProviderOutboundGuard live in src/, so importing them
from open-sse/services/usage/openaiCompatible.ts added two open-sse -> src edges
and the boundary ratchet failed (head 775 > ceiling 774). The engine already has
the same provider URL policy in executors/dispatchPin.ts: the host-name guard
(cloud-metadata always refused, LAN per operator setting) plus the connect-time
DNS-rebinding guard. Use it, keep redirects unfollowed (redirect: manual), and
pin that with a test.
2026-11-09 10:43:32 -03:00
diegosouzapw
0e38c8eb22 Merge remote-tracking branch 'origin/release/v3.8.54' into docs/17187-policy-docs-20261020
Conflicts: AGENTS.md keeps the release migration count (230, measured on the
merged tree) plus this PR's approved Domain services line. docs/i18n mirrors
and .i18n-state.json take the release versions: per-PR mirror translation was
retired (ci.yml "i18n docs drift (PR — advisory)"); the post-merge batch
refreshes the ARCHITECTURE/CODEBASE_DOCUMENTATION mirrors.
2026-11-09 10:29:12 -03:00
diegosouzapw
d449c80fc6 Merge origin/release/v3.8.54 into feat/port-pr-4929-custom-json-provider-node
Migration 233 is now taken on the tip by 233_api_key_self_service_settings.sql (#14771), so the custom JSON migration moves to 234 (next free) and the migration count in AGENTS.md, README.md, llm.txt and their i18n mirrors goes 230 -> 231 (digits only).
2026-11-09 10:18:23 -03:00
diegosouzapw
60a75ebf37 Merge remote-tracking branch 'origin/release/v3.8.54' into mp/16783 2026-11-09 10:10:07 -03:00
diegosouzapw
5da0c5612b test(dashboard): provide Button in the Ultrafast settings mock
The release moved CodexFastTierTab to the shared Button and ui-kit Checkbox;
the partial @/shared/components mock now exports the real Button, as the
sibling codex-fast-tier-catalog test does. Assertions are unchanged.
2026-11-09 10:09:21 -03:00
diegosouzapw
a6ee65fddc Merge remote-tracking branch 'origin/release/v3.8.54' into mp/16792
# Conflicts:
#	open-sse/executors/codex.ts
#	src/app/(dashboard)/dashboard/providers/[id]/components/ConnectionRow.tsx
#	src/app/(dashboard)/dashboard/providers/components/ProviderCard.tsx
#	src/app/(dashboard)/dashboard/settings/components/CodexFastTierTab.tsx
2026-11-09 10:08:49 -03:00
diegosouzapw
9f93c375c7 test(pii): assert the restored SSE delta by substring, not a hand-escaped regex
CodeQL js/incomplete-sanitization flagged the RegExp built from the e-mail with
only dots escaped. A literal substring check asserts the same restored delta.
2026-11-09 10:06:19 -03:00
diegosouzapw
cd909036a2 Merge remote-tracking branch 'origin/release/v3.8.54' into mp/18172
# Conflicts:
#	tests/unit/chat-noauth-model-cooldown.test.ts
#	tests/unit/codex-tool-handoff-disconnect-499.test.ts
#	tests/unit/cursor-renewal.test.ts
#	tests/unit/fixtures/logExportTestDestination.ts
2026-11-09 10:05:15 -03:00
diegosouzapw
c9869c48a6 Merge release/v3.8.54 into fix/qg-i18n-wave-contract-20261026
The release now lines sections up by hash when a document gains or loses
a section (#19186) and walks a model chain with a Google fallback per
chunk (#18422, #18461). Keep both: the count-only reuse and the
revalidation of cached sections run on the aligned recorded section, and
the validation feedback is replayed inside translateChunk for each model
of the chain. The retry test disables the Google fallback so it keeps
exercising the LLM retry path.
2026-11-09 10:01:32 -03:00
diegosouzapw
219be54695 Merge remote-tracking branch 'origin/release/v3.8.54' into mp/18793
# Conflicts:
#	docs/i18n/am/README.md
#	docs/i18n/ar/README.md
#	docs/i18n/az/README.md
#	docs/i18n/bs/README.md
#	docs/i18n/cs/README.md
#	docs/i18n/el/README.md
#	docs/i18n/es/README.md
#	docs/i18n/et/README.md
#	docs/i18n/fa/README.md
#	docs/i18n/fi/README.md
#	docs/i18n/fr/README.md
#	docs/i18n/gu/README.md
#	docs/i18n/ha/README.md
#	docs/i18n/he/README.md
#	docs/i18n/hr/README.md
#	docs/i18n/hu/README.md
#	docs/i18n/hy/README.md
#	docs/i18n/id/README.md
#	docs/i18n/it/README.md
#	docs/i18n/ja/README.md
#	docs/i18n/ka/README.md
#	docs/i18n/km/README.md
#	docs/i18n/kn/README.md
#	docs/i18n/ko/README.md
#	docs/i18n/lt/README.md
#	docs/i18n/lv/README.md
#	docs/i18n/ml/README.md
#	docs/i18n/ms/README.md
#	docs/i18n/mt/README.md
#	docs/i18n/my/README.md
#	docs/i18n/ne/README.md
#	docs/i18n/nl/README.md
#	docs/i18n/pa/README.md
#	docs/i18n/phi/README.md
#	docs/i18n/ro/README.md
#	docs/i18n/sk/README.md
#	docs/i18n/sl/README.md
#	docs/i18n/sr/README.md
#	docs/i18n/sw/README.md
#	docs/i18n/te/README.md
#	docs/i18n/th/README.md
#	docs/i18n/tr/README.md
#	docs/i18n/ur/README.md
#	docs/i18n/uz/README.md
#	docs/i18n/vi/README.md
#	docs/i18n/yo/README.md
#	docs/i18n/zh-CN/README.md
#	docs/i18n/zh-TW/README.md
2026-11-09 09:59:28 -03:00
diegosouzapw
9a8135a1a6 fix(dashboard): paint the jev combo notes with kit tokens instead of palette hues
dashboard-kit-sweep allows no hard-coded Tailwind palette hue or dark: variant
in the dashboard; the jev admission summary and privacy note used indigo/amber
with dark: overrides. They now use the kit primary/warning tokens.
2026-11-09 09:51:42 -03:00
diegosouzapw
b8b77cb40b Merge remote-tracking branch 'origin/release/v3.8.54' into mp/19321
# Conflicts:
#	.github/workflows/docker-publish.yml
2026-11-09 09:50:32 -03:00
diegosouzapw
125329ee72 Merge remote-tracking branch 'origin/release/v3.8.54' into mp/16177 2026-11-09 09:49:56 -03:00
diegosouzapw
2dbe8d7b6f refactor(systemone): drop the opt-in chat guard flag now that #14498 guards unconditionally
The release tip already ships #14498 itself: getExecutor() refuses chat for a
decisions-only provider with a 400 on every request, covered by
tests/unit/typesafe-decisions-provider-14498.test.ts. The ported opt-in copy
(SYSTEMONE_CHAT_GUARD_ENABLED, default off) would only be a dashboard toggle
that changes nothing, so the merge keeps the release guard and this removes the
flag, its test and its changelog fragment. Flag count 124 -> 123; the
FEATURE_FLAGS.md System One rows also lose a stray duplicated cell.
2026-11-09 09:49:45 -03:00
diegosouzapw
4190ef39ab Merge release/v3.8.54 into fix/qg-release-fixtures-20261026
The release already carries this branch's host-state, Kimi/Codex clock,
conversation-tracker, cursor, MITM and redaction-probe fixture repairs
(#19323), and fixed the log-export timing tests (#18440, #18960), the
Perplexity delayed-hook model (#18232) and the providers-page pin
differently; take the release versions of those files. Keep what the
release still lacks: offline catalog discovery for the twelve catalog
fixtures, the post-keepalive error-frame sequencing, the Kiro watchdog
test clock, and locale-independent ci-discriminate signature ordering.
2026-11-09 09:48:43 -03:00
diegosouzapw
bb0d1a0eb4 Merge remote-tracking branch 'origin/feat/port-pr-4929-custom-json-provider-node' into mp/18359 2026-11-09 09:48:39 -03:00
diegosouzapw
32bcccf12b Merge remote-tracking branch 'origin/release/v3.8.54' into mp/17856
# Conflicts:
#	docs/architecture/QUALITY_GATES.md
2026-11-09 09:46:51 -03:00
diegosouzapw
260e35e7df Merge remote-tracking branch 'origin/release/v3.8.54' into feat/system-one-complements-1108 2026-11-09 09:45:54 -03:00
diegosouzapw
95eb4e3df7 Merge remote-tracking branch 'origin/release/v3.8.54' into mp/19343 2026-11-09 09:45:10 -03:00
diegosouzapw
010c970fe4 Merge origin/release/v3.8.54 into feat/port-pr-3604-new-models-inbox
Renumber the seen_models migration 227 -> 233 (the release took 227-232) and sync the
migration count to 230 in AGENTS.md / llm.txt / README + i18n mirrors.
2026-11-09 09:44:11 -03:00
diegosouzapw
9a5c93898d fix(ci): reconcile the static profile and workflow evidence with the release
- Model the new lint-job `check:build-typecheck` step in the reviewed static
  profile (the profile coverage alarm rejected it as unmodeled after the sync).
- A declared hard gate upgrades the curated bucket but never downgrades a
  curated hard result, so incomplete workflow-audit evidence (#17412) stays
  blocking under any declared policy.
- The workflow-evidence fixture now supplies the static profile, quality.yml
  and a complete ESLint record that --full-ci and the lint measurement require;
  it declares the workflow audit under the ratchet policy so the evidence
  boundary is what it exercises. Assertions are unchanged.
2026-11-09 09:43:59 -03:00
diegosouzapw
bb9fc05100 Merge remote-tracking branch 'origin/release/v3.8.54' into mp/18154
# Conflicts:
#	scripts/quality/validate-release-green.mjs
2026-11-09 09:43:02 -03:00
diegosouzapw
9edc7e4a11 test(dashboard): type the onSave mock so mock.calls indexing typechecks
vi.fn(async () => {}) infers a zero-arg mock, so mock.calls[0][0] is a
TS2493 tuple-out-of-range error that check:dashboard-typecheck flags as a
new regression (3 sites). Give the mock the modal's real onSave signature.
2026-11-09 09:42:19 -03:00
diegosouzapw
bb0ce4b43e Merge release/v3.8.54 into fix/qg-remote-media-boundary-20261026
Carry the release's remoteImageFetch changes (proxy-aware pinning, upstream
media helpers) into open-sse/utils/remoteMediaFetch.ts, keep the application
path as a full re-export, and point every engine importer of the downloader
at the engine module. URL transcription keeps the release's injected fetcher.
Boundary ratchet: 756 edges (ceiling 774); cycles 14 (ceiling 14).
2026-11-09 09:41:55 -03:00
diegosouzapw
6923ca61ec test(sse): align buffered SSE fixtures with the public invalid_sse_payload code
The base kept error-only SSE frames as invalid_sse_payload (#18272 made it a
sanctioned public identifier), so the parse-level fixture returns to the base
contract and the provider-leg test asserts the public code the body carries.
2026-11-09 09:41:16 -03:00
diegosouzapw
4c4dcf762a Merge remote-tracking branch 'origin/release/v3.8.54' into mp/18152 2026-11-09 09:39:31 -03:00
diegosouzapw
5ce6248d39 docs(i18n): sync the Persian README migration count to 230 2026-11-09 09:37:55 -03:00
diegosouzapw
a9c12729f4 Merge remote-tracking branch 'origin/release/v3.8.54' into mp/18350 2026-11-09 09:32:37 -03:00
diegosouzapw
1267fe1027 Merge remote-tracking branch 'origin/release/v3.8.54' into mp/18156
# Conflicts:
#	config/quality/gate-manifest.json
#	docs/architecture/QUALITY_GATES.md
2026-11-09 09:30:38 -03:00
diegosouzapw
741d80a2ef Merge remote-tracking branch 'origin/release/v3.8.54' into mp/18158 2026-11-09 09:30:36 -03:00
diegosouzapw
d82a8561c5 Merge remote-tracking branch 'origin/release/v3.8.54' into mp/18352 2026-11-09 09:29:28 -03:00
diegosouzapw
a7d64146ae Merge remote-tracking branch 'origin/release/v3.8.54' into mp/18200 2026-11-09 09:28:22 -03:00
diegosouzapw
afd7613ca5 Merge origin/release/v3.8.54 into feat/port-pr-4929-custom-json-provider-node
Renumber the custom JSON migration 228 -> 233 (the release took 228-232) and sync the
migration count to 230 in AGENTS.md / llm.txt / README + i18n mirrors.
2026-11-09 09:27:01 -03:00
diegosouzapw
d7c38e6c3a Merge remote-tracking branch 'origin/release/v3.8.54' into mp/19326 2026-11-09 09:26:02 -03:00
diegosouzapw
bd18ea0496 Merge branch 'release/v3.8.54' into feat/port-pr-4999-compatible-quota-check 2026-11-09 09:22:38 -03:00
diegosouzapw
fc394efb53 test(dashboard): type the quota-toggle onSave mocks so dashboard-typecheck stays clean
vi.fn(async () => {}) infers a zero-arg mock, so mock.calls[0][0] is TS2493
(tuple of length 0). Type the mock with the modal's onSave signature.
2026-11-09 09:19:36 -03:00
diegosouzapw
5e63713dea Merge branch 'release/v3.8.54' into feat/port-pr-4999-compatible-quota-check 2026-11-09 09:02:22 -03:00
diegosouzapw
4d49b5f72e fix(audio): make the Nova-3 transcription URL trim linear-time
buildCloudflareTranscriptionUrl trimmed trailing slashes with /\/+$/, which
backtracks quadratically on a long run of slashes followed by a non-slash
(CodeQL js/polynomial-redos #1228). Use the shared stripTrailingSlashes()
helper from open-sse/utils/urlSanitize.ts, which is the same trim as a single
backward scan. Output is unchanged for every input.

Tests pin the URL shape (0, 1 and 3 trailing slashes, encoded id) and a
50k-slash adversarial input that must finish under 500 ms (old regex: ~11.7 s).
2026-11-09 00:01:11 -03:00
Diego Rodrigues de Sa e Souza
ea674410d5 Merge branch 'release/v3.8.54' into feat/port-pr-4999-compatible-quota-check 2026-11-08 23:38:24 -03:00
diegosouzapw
7047e20e61 docs(readme): retake the dashboard screenshot in Editions light
The README's first image showed the Classic (lime, dark) look. New capture of
the same Analytics page in Editions light, the dashboard's default palette
and the brand's canonical look: a local run of this branch on a temporary
data dir with synthetic usage rows only, 1640x893 at 2x, quantized to 128
colors (132,104 -> 118,680 bytes).
2026-11-08 22:24:46 -03:00
diegosouzapw
14d65611a1 docs(readme): draw the budget card in Editions with Switzer outlines
After the README diagrams moved to Switzer outlines (#18767) and the Editions
palette (#18901, #18957), gen-budget-card-svg.mjs no longer ran: readme-fonts.mjs
only embeds the mono subset now, and the card asked for the old display face.

The generator now ends with outlineSvg() like the README diagrams: the Switzer
roles become vector outlines, the code roles stay text on the embedded IBM Plex
Mono subset, and the palette is the theme module's Editions tokens (light
#f3f1e9 / #faf9f4 / #20211c, accent #e5ac82; dark #11120f / #191a16 /
#f2f0e8). The stat figures use the kit's num role (500, -0.02em) at 46px. No
literal color in the generator; every drawn string is unchanged and the figures
still come from computeFreeModelTotals().

The test asserts the new shape: one @font-face (CI Mono), no CI Serif / CI Sans
/ Switzer face, outlined glyphs, and the Editions light and dark values with no
Classic value left.
2026-11-08 21:51:45 -03:00
diegosouzapw
e07fd4ecb2 docs(readme): paint the header badges in the Editions palette
Editions became the dashboard's default palette (#18901), so the eight
header shields move from the Classic lime-on-ink to Editions copper on ink:
color=e5ac82 (--ci-color-accent) and labelColor=20211c (--ci-color-heading),
from the light block of packages/ui-kit/src/ci-editions.css. shields.io
draws the message text dark on the copper and white on the ink.

apply-readme-badge-colors.mjs carries the same values and was run over
README.md and the 66 mirrors: 528 lines, URL query strings only. The PR-scoped
i18n drift gate reports 0 drift introduced (README.md and its 66 mirrors are
already drifted on release/v3.8.54).
2026-11-08 21:44:59 -03:00
diegosouzapw
7b2fd0d147 fix(ci): defer admission for unrequested draft validation 2026-11-09 00:37:09 +00:00
diegosouzapw
484b6b4927 Merge remote-tracking branch 'origin/release/v3.8.54' into feat/readme-followups-1102
# Conflicts:
#	docs/screenshots/free-tier-budget-card.svg
2026-11-08 21:33:23 -03:00
diegosouzapw
ec120adbde Merge remote-tracking branch 'origin/release/v3.8.54' into HEAD
# Conflicts:
#	src/shared/constants/featureFlagDefinitions.ts
#	tests/unit/feature-flags-settings.test.ts
#	tests/unit/server-owned-tool-loop-flag.test.ts
2026-11-08 18:38:32 -03:00
diegosouzapw
4135d2b3a7 refactor(systemone): read the chat-guard and jev flags through the registered resolver
open-sse reads SYSTEMONE_CHAT_GUARD_ENABLED and COMBO_JEV_STRATEGY_ENABLED with
isRegisteredFeatureFlagEnabled (DB override > env > default, fails closed) instead of
importing src/shared/utils/featureFlags, so the port stays inside the open-sse -> src
boundary ceiling after the latest release merge.

Co-authored-by: Sean P. Ford <sean@seanford.com>
Co-authored-by: Miguel Enes <1568086+miguelenes@users.noreply.github.com>
2026-11-08 18:04:37 -03:00
diegosouzapw
35f9726b29 Merge remote-tracking branch 'origin/release/v3.8.54' into feat/system-one-complements-1108
# Conflicts:
#	docs/reference/FEATURE_FLAGS.md
#	src/shared/constants/featureFlagDefinitions.ts
#	tests/unit/feature-flags-settings.test.ts
#	tests/unit/server-owned-tool-loop-flag.test.ts
2026-11-08 17:50:58 -03:00
diegosouzapw
308e863264 fix(combo): keep the sticky binding write unchanged for every strategy except jev
The ported #15279 success hook bound the selected-connection header account and the
combo namespace for all strategies. Only jev needs that (it pins the account and the
model Jev chose); every other strategy now records the declared target connection
exactly as before.

Co-authored-by: Miguel Enes <1568086+miguelenes@users.noreply.github.com>
2026-11-08 17:38:08 -03:00
diegosouzapw
56db12eb45 docs(changelog): add the reversible PII vault fragment 2026-11-08 17:30:33 -03:00
diegosouzapw
9fbc42c7f5 test(pii): give the vault test its own DB and assert the masker never falls back 2026-11-08 17:28:48 -03:00
diegosouzapw
fab35548e0 refactor(pii): split the rule redaction helper and register the vault test with Stryker 2026-11-08 17:21:58 -03:00
diegosouzapw
797c0278f4 refactor(systemone): keep the ported pieces inside the file-size, complexity and boundary gates
- the System One / Jev flag definitions move to featureFlagDefinitionsSystemOne.ts
  (featureFlagDefinitions.ts is at its cap); check-fabricated-docs reads every
  featureFlagDefinitions*.ts module.
- the ollama-local base URL is resolved on the route side
  (systemOneOllamaUrl.ts) into target.upstreamUrl, so open-sse gains no import
  edge into src for it; the Jev modules share one ResilienceSettings edge.
- tryRuntimeUnitDispatch delegates the jev/default unit ordering to a helper.
- the lease inventory classifies the two read-only typesafe credential lookups.

Co-authored-by: PixmaNTS <maxime@maxime-pointet.fr>
Co-authored-by: Miguel Enes <1568086+miguelenes@users.noreply.github.com>
2026-11-08 17:02:17 -03:00
diegosouzapw
7ab5d308df feat(pii): wire the reversible PII token vault into the chat pipeline
Builds on #18017, whose vault was never scoped in production code. A new
PII_REVERSIBLE_VAULT_ENABLED flag (default false, Hard Rule 20 guard) works on
top of PII_REDACTION_ENABLED; the gate reads the DB override like every flag.

- One vault per client request, opened in handleChat next to the turn
  ownership scope and passed to the pre-call pass as GuardrailContext.tokenVault.
  Only the pii-masker mints, for built-in, validated (GDPR/POPIA) and custom
  rules. Random 8-letter nonce per request, no singleton, no LRU, no timers;
  hard limits fall back to the irreversible placeholder.
- Tokens are restored once, on the 2xx response leaving handleChat: per field
  on the parsed SSE (a token split across events resolves, tool arguments are
  JSON-escaped, snapshots are not duplicated, only a token prefix is held back)
  or per field on JSON with a fresh Content-Length. Nothing in chatCore
  detokenizes, so fusion panels and the judge only see tokens. Error bodies
  keep the tokens.
- Input failure writes the placeholder (fail-closed); output failure leaves the
  token literal with a count-only warning.
- When tokens were minted, memory extraction, the idempotency save and both
  semantic-cache writes are skipped.
- With the gate closed, or no token minted, handleChat returns the very same
  Response object (byte-identical regression test).

Co-authored-by: Dmitry Kuznetsov <ardemb22@gmail.com>
2026-11-08 17:01:03 -03:00
diegosouzapw
c793946d04 docs(changelog): add the #19321 fragment 2026-11-08 16:25:42 -03:00
diegosouzapw
9c35934078 feat(systemone): local Ollama backend, opt-in chat guard and the jev combo strategy
Complements the System One design from #17994 with pieces from open PRs, each
behind a default-off feature flag so nothing changes for current users:

- ollama-local/<model> on POST /v1/systemone, served by the ollama-local
  connection's base URL with Ollama's own body limits checked before any
  upstream call (from #14667; SYSTEMONE_OLLAMA_LOCAL_BACKEND_ENABLED).
- getExecutor refuses chat on the decisions-only typesafe provider instead of
  letting the default executor post the TypeSafe key to the OpenAI fallback
  (from #14498; SYSTEMONE_CHAT_GUARD_ENABLED).
- the jev combo strategy: one TypeSafe System One choice call admits the
  targets, failover keeps the operator's order (from #15279). The TypeSafe
  call needs COMBO_JEV_STRATEGY_ENABLED; a stored key alone never sends
  traffic, and with the flag off a jev combo keeps its preference order.

Strategy count 20 -> 21 where the docs-counts gate and the
routing-strategy-docs-sync test pin it (digits and the jev name only).

Co-authored-by: PixmaNTS <maxime@maxime-pointet.fr>
Co-authored-by: Sean P. Ford <sean@seanford.com>
Co-authored-by: Miguel Enes <1568086+miguelenes@users.noreply.github.com>
2026-11-08 16:13:29 -03:00
diegosouzapw
61faae62d6 ci: pin workflow actions to commit SHAs and drop unused checkout credentials
Extracted from the workflow-hardening commits of #18348 ("pin workflow
dependencies and remove unsafe release cache reuse") and its main backports in
#18209, #18210 and #18345 ("backport complete gate execution and workflow
hardening to main").

- Every remaining `uses: owner/action@<tag>` in .github/workflows is pinned to
  the commit SHA the tag resolves to today (resolved with the GitHub API on
  2026-11-08), keeping the tag as a trailing comment so the github-actions
  Dependabot ecosystem can keep bumping them.
- base-ci-repair.yml and wiki-sync.yml check out with
  persist-credentials: false. Neither job pushes with the checkout token;
  wiki-sync pushes from its own token-authenticated wiki clone.
- nightly-compat.yml drops the workflow-level issues: write; the report job
  already declares its own issues: write.

zizmor 1.25.2 via check-workflows.mjs: 216 -> 13 findings. actionlint output
is unchanged (the same 8 pre-existing shellcheck notes).
The release cache-reuse removal and the .zizmor.yml rewrite were left out:
they reverse accepted-risk entries and need an explicit decision.
2026-11-08 16:04:24 -03:00
diegosouzapw
c9f46667b3 feat(systemone): Cloudflare Workers AI backend for /v1/systemone behind a default-off flag
Ports the Cloudflare channel of #16676 onto the System One registry from #17994:
cloudflare-ai/<jev|clef|clef-flash> (alias cf/) runs on Workers AI through the
existing cloudflare-ai connection. Off by default via
SYSTEMONE_CLOUDFLARE_BACKEND_ENABLED: those ids are refused with a 400 and no
upstream call.

Co-authored-by: Qiancheng Yan <xiaoyaner0201@users.noreply.github.com>
2026-11-08 15:45:30 -03:00
diegosouzapw
656ab37c93 refactor(dashboard): move the quota-check node derivation into a helper
Keeps loadProviderConnectionsData under the complexity ratchet; the node still
gets quotaCheck read off its connections only for compatible providers.
2026-11-08 05:17:45 -03:00
diegosouzapw
4187f86eaa test(usage): wait for the guarded quota fetch instead of one tick; reuse the compatible prefix helpers
getOpenAiCompatibleUsage now goes through safeOutboundFetch, which checks the
host with a DNS lookup before fetch() runs. The #13616 abort-signal test read
the signal after a single setImmediate, so it failed whenever the lookup took
longer (reproduced deterministically with a 50 ms delayed dns.promises.lookup).
The test now waits for the fetch call itself; the assertion is unchanged.

isCompatibleQuotaProvider reuses isOpenAICompatibleProvider and
isAnthropicCompatibleProvider instead of repeating the prefix checks.
2026-11-08 04:56:50 -03:00
diegosouzapw
61f5e9c5b4 refactor(dashboard): split the custom JSON fields editor into row and template editors
CustomJsonFields was 138 lines, over the 80-line max-lines-per-function cap the complexity ratchet enforces on new code. The extra-field row, the simple-fields editor and the full-JSON editor are now their own components; markup, test ids and behavior are unchanged.
2026-11-08 04:46:34 -03:00
diegosouzapw
d9b77aba27 Merge release/v3.8.54 into feat/port-pr-4999-compatible-quota-check
Keep the release side in usage.ts and providerQuotaVisibility.ts: #17136
already routes anthropic-compatible-* to the configurable quota fetcher and
gates visibility with hasCompatibleQuotaEndpoint.
2026-11-08 04:33:00 -03:00
diegosouzapw
5fea3071e9 Merge origin/release/v3.8.54 into feat/port-pr-4929-custom-json-dashboard-form
Four locale files conflicted (bs, ha, ig, yo); both sides kept: the release keys plus the 30 providers.customJson* keys.
2026-11-08 04:07:12 -03:00
diegosouzapw
9c2fa5e116 Merge release/v3.8.54 into feat/port-pr-5140-cloudflare-nova3-stt
# Conflicts:
#	open-sse/handlers/audioTranscription.ts
2026-11-08 04:00:08 -03:00
diegosouzapw
8d035d9140 Merge the current #18353 head (e9dab592) into feat/port-pr-4929-custom-json-dashboard-form
Brings the stacked engine PR's fixes (migration renumbered to 228, no-replay latch fix, regenerated skills endpoints) under the dashboard form. The 67 locale conflicts keep every key from both sides: the release keys carried by #18353 plus this PR's 30 providers.customJson* keys.
2026-11-08 03:53:14 -03:00
diegosouzapw
c673d5a000 test(ci): harden the fixtures the review flagged on the deterministic tests
Cursor renewal: the fake agent publishes its PID through a rename, so the
cleanup kill can never read an empty file (Number("") is 0, a signal to the
test runner's own process group), and cleanup ticks the SIGKILL follow-up
separately because a timer armed during tick() starts after that tick ends.

No-auth cooldown: hold Date from before the lock exists, with setTimeout real
until the lock is in place, so a slow failing request cannot use up the lock.

Codex handoff: wait for the completion on a bounded real-time loop while the
grace clock stays frozen; with SSE comments on it follows a pricing lookup.

Log export: the parent read probe also counts fs.promises.readFile, the path
the child resolver uses, with a positive control.
2026-11-07 14:25:46 -03:00
diegosouzapw
ffb4190a61 Merge release/v3.8.54 into fix/qg-main-basereds-20261025 2026-11-07 13:41:51 -03:00
diegosouzapw
e9dab5922c fix(combo): keep the caller's abort signal under the no-replay latch
The latch wrapped every combo's abort signal in AbortSignal.any, so the
fallback wait listened on a derived signal and the #18569 cancellation test
failed for traffic that has no custom JSON node at all. The strategy now keeps
the caller's signal. A latched failure reaches it as the 499 it already treats
as a stop, which also skips the fallback wait and the failure bookkeeping, and
in-flight targets are cancelled through their own modelAbortSignal.

Also on this branch:
- migration moves to 228, 227 was taken by quota_recovery_due_cover (#19108);
  the SQL file count goes from 224 to 225 in AGENTS.md, README.md, llm.txt and
  their mirrors, digits only
- regenerate the omni-providers endpoint reference from docs/openapi.yaml
- reword a comment gitleaks read as a generic API key
2026-11-07 13:22:35 -03:00
diegosouzapw
eaa744015f Merge origin/release/v3.8.54 into feat/port-pr-4929-custom-json-provider-node 2026-11-07 12:49:48 -03:00
Ilya Bogin
3016767ae4 Merge release/v3.8.54 into feat/keenable-search 2026-11-07 09:57:28 +02:00
diegosouzapw
03d0d45216 fix(dashboard): clear the New models glossary and complexity gates
Use the canonical zh-CN and zh-TW term for "provider" in the two new
strings that carried the retired renderings, and split the 153-line
NewModelsButton into a hook and two child components so it fits the
80-line function limit. Behavior is unchanged; two new UI tests pin the
error branch over loaded groups and over an empty inbox.

Co-authored-by: ErfanBagheri404 <mrenmityerf@gmail.com>
2026-11-07 04:19:18 -03:00
diegosouzapw
43e71ac802 Merge origin/release/v3.8.54 into feat/port-pr-3604-new-models-inbox 2026-11-07 04:09:14 -03:00
diegosouzapw
cb32f1e471 fix(sse): keep custom JSON nodes out of the ModelScope 429 retry
A custom JSON node whose endpoint sits on a ModelScope host matched the
host markers in isModelScopeProvider, so a retryable 429 re-sent the
business call up to three times. The node's apiType now wins over the host.
2026-11-07 01:30:45 -03:00
diegosouzapw
30e8d3ab30 Merge release/v3.8.54 into fix/qg-main-basereds-20261025
Resolve the hang-escalation conflict with #18960: keep the deterministic
mock-clock test, keep the SIGTERM handler at createClient, and use a single
handler so the term-ignored marker is written however early the SIGTERM lands.
2026-11-07 01:14:56 -03:00
diegosouzapw
3598b72b84 Merge origin/release/v3.8.54 into feat/port-pr-4929-custom-json-provider-node 2026-11-07 01:05:56 -03:00
diegosouzapw
8c7468b9cc Merge origin/release/v3.8.54 into feat/port-pr-3604-new-models-inbox 2026-11-06 21:45:28 -03:00
diegosouzapw
1b92da4883 Merge origin/release/v3.8.54 into feat/port-pr-3604-new-models-inbox 2026-11-06 21:20:36 -03:00
diegosouzapw
4ba633ffdc docs(i18n): sync the Persian README migration count 2026-11-06 21:05:10 -03:00
diegosouzapw
3816fa4da7 fix(db): renumber the custom JSON migration to 227 and sync the migration count
The tip took 226 for request_cost_ledger_read_indexes, so the provider node
migration moves to the next free slot. The SQL file count goes from 223 to 224
in AGENTS.md, README.md, llm.txt and their mirrors (digits only).
2026-11-06 21:01:48 -03:00
diegosouzapw
def0c0eddb chore(db): renumber seen_models migration to 227 and bump the migration count
The tip took slot 226 for request_cost_ledger_read_indexes, so seen_models moves
to the next free number. The count surfaces go from 223 to 224, digits only.
2026-11-06 21:00:11 -03:00
diegosouzapw
f5c9df4d52 Merge origin/release/v3.8.54 into feat/port-pr-3604-new-models-inbox 2026-11-06 20:56:54 -03:00
diegosouzapw
387710f501 Merge origin/release/v3.8.54 into feat/port-pr-4929-custom-json-provider-node 2026-11-06 20:54:11 -03:00
diegosouzapw
6370b8e106 chore(merge): merge fix/video-promotion-evidence-20261009 into test/video-live-receipts-20261009
Records the rebased parent in the ancestry so the PR diff against its base stays
the 10 live-validation files. The tree is unchanged by this merge.
2026-11-06 17:49:07 -03:00
diegosouzapw
e5e669dbe8 Merge release/v3.8.54 into fix/qg-main-basereds-20261025
Keeps the logical-clock hang test and read-count hydration test from this branch
over the wall-clock bounds of #18440, and keeps #18440's early SIGTERM handler in
the hang fixture.
2026-11-06 16:22:38 -03:00
diegosouzapw
24e78a34e2 chore(merge): merge release/v3.8.54 into test/video-live-receipts-20261009
Resolves the stack's conflicts against the release tip:

- src/sse/handlers/chat.ts: keep buildModalityBridgeResponseHeaders and the
  release's extracted deriveVideoBridgeLog import.
- docs/openapi.yaml: keep the release's /api/v1/systemone block and the stack's
  detailed drilldown contract, placed in the release's alphabetical slot so
  generated SKILL.md output stays byte-identical to the release.
- skills/omni-inference: SKILL.md equals the release version; references
  regenerated from the merged OpenAPI document.
2026-11-06 16:14:00 -03:00
diegosouzapw
b16a12b290 chore(merge): merge release/v3.8.54 into fix/video-promotion-evidence-20261009
Keep the release's chat/videoBridgeLog.ts extraction with the drilldown response headers, and keep /api/v1/systemone next to the documented drilldown path. The path stays where the release has it, so skills/omni-inference/SKILL.md needs no change.
2026-11-06 16:11:35 -03:00
diegosouzapw
66378d3210 fix(dashboard): build the New models button from the kit adapters
The release's dashboard-kit-sweep guard rejects the raw buttons, Material Symbols spans, animate-spin and palette hues the port brought. Adds a UI test for the badge, the provider grouping and both mark-as-read paths.
2026-11-06 15:44:27 -03:00
diegosouzapw
ca030cf9be fix(sse): keep the flush-empty retry off custom JSON connections
With FLUSH_EMPTY_RETRY_ENABLED on, an empty streamed business reply was sent again up to the retry budget (five upstream calls in the new test), which breaks the no-replay guarantee of custom JSON nodes.
2026-11-06 15:17:25 -03:00
diegosouzapw
9909d1333e chore(db): renumber seen_models migration to 226
227 left a gap after the release tip's 225, which check:migration-numbering rejects.
2026-11-06 15:11:07 -03:00
diegosouzapw
962d3ee129 Merge origin/release/v3.8.54 into feat/port-pr-3604-new-models-inbox
Resolves the README Database row and syncs the translated rows to 223 migrations.
2026-11-06 15:08:30 -03:00
diegosouzapw
946b4a4ab9 Merge origin/release/v3.8.54 into feat/port-pr-4929-custom-json-provider-node
Keep both sides in src/lib/providers/validation.ts and stryker.conf.json, and renumber the custom JSON node migration to 226 because 225 is now 225_token_ledger_balance_indexes.sql.
2026-11-06 14:52:44 -03:00
Federico Mangini
ff600e1a95 fix(routing): address capability combo review 2026-11-06 11:16:02 +01:00
Ilya Bogin
03175d7219 Merge remote-tracking branch 'origin/release/v3.8.53' into feat/keenable-search 2026-11-05 11:43:45 +02:00
Ilya Bogin
3975bf1b81 Merge remote-tracking branch 'origin/release/v3.8.53' into feat/keenable-search 2026-11-03 09:19:32 +02:00
Ilya Bogin
9bc79d23f9 Merge remote-tracking branch 'origin/release/v3.8.53' into feat/keenable-search 2026-11-03 09:12:21 +02:00
diegosouzapw
cb63dbba94 Merge remote-tracking branch 'origin/release/v3.8.53' into feat/readme-followups-1102 2026-11-02 18:24:48 -03:00
diegosouzapw
864d074bd9 docs(readme): replace the dashboard screenshot with the UI kit look
The old capture dates from May 2026, before the kit migration. This one is the Analytics
overview in dark, taken from a local instance on a throwaway data dir with synthetic demo
usage, so nothing real appears in it. Same path, filename and alt text.
2026-11-02 14:25:26 -03:00
diegosouzapw
bf0a0166d0 docs(readme): rebuild the budget card on the shared diagram modules
The generator now draws through readme-diagram-theme.mjs and readme-fonts.mjs: palette in theme
classes and CSS variables, both color schemes, kit fonts embedded as subset data URIs. Figures
still come from computeFreeModelTotals() and every drawn string is the same as before.

The test keeps its stale compare and adds checks for inline fonts, no external references,
figures as <text> and no literal color outside the stylesheet.
2026-11-02 12:44:30 -03:00
diegosouzapw
9846661fcf docs(readme): paint the header badges in the kit palette
Lime on ink (d8ff00 on 040d10) for the eight shields.io badges of the header group. The star
counter moves from style=social, which ignores both colors, to style=flat with its logo and
label spelled out, so it keeps the same text and mark.

scripts/docs/apply-readme-badge-colors.mjs applies the same URL change and is idempotent; it
is meant to be run over docs/i18n/*/README.md after the translation wave lands.
2026-11-02 12:39:59 -03:00
Federico Mangini
c7e79d04ea feat(routing): add capability-specific combo routes 2026-11-02 11:38:36 +01:00
diegosouzapw
7e74efc858 test(providers): place the custom JSON mutation entry next to the combo suites 2026-11-02 01:25:17 -03:00
diegosouzapw
67cee0e650 refactor(providers): split the custom JSON executor and node update, reuse existing engine edges 2026-11-02 00:44:37 -03:00
diegosouzapw
99a181d70a docs(api): describe custom JSON node fields and the probe's guard 2026-11-01 23:11:18 -03:00
diegosouzapw
48e27d35de fix(sse): return no-replay failures before the Muse owner branch 2026-11-01 23:11:04 -03:00
diegosouzapw
f2f376482b fix(db): renumber the custom JSON node migration to 225 2026-11-01 23:10:52 -03:00
diegosouzapw
211a2c35e3 Merge remote-tracking branch 'origin/release/v3.8.53' into rework/18353 2026-11-01 23:02:57 -03:00
Federico Mangini
92b0a2bf02 fix(combos): expose native web operations in combo pickers 2026-11-01 22:21:02 +01:00
Federico Mangini
ffe3b7f091 feat(routing): support capability-aware search and fetch combos 2026-11-01 22:02:31 +01:00
Ilya Bogin
288214fcc6 Merge remote-tracking branch 'origin/release/v3.8.53' into feat/keenable-search
# Conflicts:
#	README.md
#	docs/architecture/ARCHITECTURE.md
#	docs/architecture/CODEBASE_DOCUMENTATION.md
#	docs/architecture/REPOSITORY_MAP.md
#	docs/comparison/OMNIROUTE_VS_ALTERNATIVES.md
#	docs/diagrams/cli-terminal.svg
#	docs/diagrams/comparison-table.svg
#	docs/diagrams/promise-pillars.svg
#	docs/diagrams/readme-hero.svg
#	docs/frameworks/A2A-SERVER.md
#	docs/frameworks/AGENTBRIDGE.md
#	docs/frameworks/OPEN_SSE_ARCHITECTURE.md
#	docs/guides/FREE_PROVIDER_RANKINGS.md
#	docs/reference/PROVIDER_REFERENCE.md
#	package.json
#	public/images/tier-flow-dark.svg
#	public/images/tier-flow-light.svg
#	skills/README.md
2026-11-01 08:08:50 +02:00
diegosouzapw
421ca0bc7c chore(db): renumber seen_models migration to 227 (collision with release 217)
Co-authored-by: ErfanBagheri404 <mrenmityerf@gmail.com>
2026-10-29 10:17:16 -03:00
diegosouzapw
7c77b838a0 Merge remote-tracking branch 'origin/release/v3.8.53' into HEAD
# Conflicts:
#	src/app/(dashboard)/dashboard/providers/components/ProviderSummaryCard.tsx
#	src/i18n/messages/am.json
#	src/i18n/messages/ar.json
#	src/i18n/messages/az.json
#	src/i18n/messages/bg.json
#	src/i18n/messages/bn.json
#	src/i18n/messages/bs.json
#	src/i18n/messages/cs.json
#	src/i18n/messages/da.json
#	src/i18n/messages/de.json
#	src/i18n/messages/el.json
#	src/i18n/messages/en.json
#	src/i18n/messages/es.json
#	src/i18n/messages/et.json
#	src/i18n/messages/fa.json
#	src/i18n/messages/fi.json
#	src/i18n/messages/fr.json
#	src/i18n/messages/ga.json
#	src/i18n/messages/gu.json
#	src/i18n/messages/ha.json
#	src/i18n/messages/he.json
#	src/i18n/messages/hi.json
#	src/i18n/messages/hr.json
#	src/i18n/messages/hu.json
#	src/i18n/messages/hy.json
#	src/i18n/messages/id.json
#	src/i18n/messages/ig.json
#	src/i18n/messages/it.json
#	src/i18n/messages/ja.json
#	src/i18n/messages/ka.json
#	src/i18n/messages/km.json
#	src/i18n/messages/kn.json
#	src/i18n/messages/ko.json
#	src/i18n/messages/lt.json
#	src/i18n/messages/lv.json
#	src/i18n/messages/ml.json
#	src/i18n/messages/mr.json
#	src/i18n/messages/ms.json
#	src/i18n/messages/mt.json
#	src/i18n/messages/my.json
#	src/i18n/messages/ne.json
#	src/i18n/messages/nl.json
#	src/i18n/messages/no.json
#	src/i18n/messages/or.json
#	src/i18n/messages/pa.json
#	src/i18n/messages/phi.json
#	src/i18n/messages/pl.json
#	src/i18n/messages/pt-BR.json
#	src/i18n/messages/pt.json
#	src/i18n/messages/ro.json
#	src/i18n/messages/ru.json
#	src/i18n/messages/si.json
#	src/i18n/messages/sk.json
#	src/i18n/messages/sl.json
#	src/i18n/messages/sr.json
#	src/i18n/messages/sv.json
#	src/i18n/messages/sw.json
#	src/i18n/messages/ta.json
#	src/i18n/messages/te.json
#	src/i18n/messages/th.json
#	src/i18n/messages/tr.json
#	src/i18n/messages/uk-UA.json
#	src/i18n/messages/ur.json
#	src/i18n/messages/uz.json
#	src/i18n/messages/vi.json
#	src/i18n/messages/yo.json
#	src/i18n/messages/zh-CN.json
#	src/i18n/messages/zh-TW.json
2026-10-29 10:14:08 -03:00
GodsQuantum
7583aeab79 test(chatgpt-web): cover session preflight and navigation retry 2026-10-29 11:39:58 +01:00
GodsQuantum
62129dba65 fix(chatgpt-web): load first-party modules without blob CSP rejection 2026-10-29 11:39:41 +01:00
diegosouzapw
91dcbd7f4f fix(db): renumber seen_models migration to 218 after the release took 217
release/v3.8.53 shipped 217_quota_recovery_tickets.sql (#14982) after the previous renumber, so 217_seen_models.sql collided again. README Database row now reflects the 215 SQL migrations on the merged tree. Migration body unchanged.

Co-authored-by: ErfanBagheri404 <mrenmityerf@gmail.com>
Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
2026-10-29 03:16:11 -03:00
diegosouzapw
bf8a770dcf Merge origin/release/v3.8.53 into feat/port-pr-3604-new-models-inbox
Co-authored-by: ErfanBagheri404 <mrenmityerf@gmail.com>
Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
2026-10-29 03:13:30 -03:00
diegosouzapw
27c9843e44 chore(merge): merge fix/video-promotion-evidence-20261009 (with release/v3.8.53) into test/video-live-receipts-20261009
Bring the updated #16081 head a3816a235e, which carries #16074 and release/v3.8.53, into this stacked branch. The merge is clean and the branch's own 10-file diff is unchanged.

Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
2026-10-29 02:55:30 -03:00
Ilya Bogin
84c0f2902a Merge remote-tracking branch 'origin/release/v3.8.53' into feat/keenable-search
# Conflicts:
#	README.md
#	docs/architecture/ARCHITECTURE.md
#	docs/reference/PROVIDER_REFERENCE.md
#	tests/integration/search-providers-catalog.test.ts
#	tests/snapshots/executors/dispatch-rules.json
#	tests/unit/search-registry.test.ts
2026-10-29 07:51:54 +02:00
diegosouzapw
a3816a235e chore(merge): merge feat/video-drilldown-producer-20261009 (with release/v3.8.53) into fix/video-promotion-evidence-20261009
Bring the updated #16074 head 688dbc92b3, which already carries release/v3.8.53, into this stacked branch. Resolve ModalityBridgeVideoTab.tsx on the release's UI-kit structure: keep the video-promotion-readiness block and the promotionStatus helper, and use the kit Collapsible for the advanced settings instead of the raw <details>.

Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
2026-10-29 02:51:12 -03:00
diegosouzapw
6808f92d65 fix(db): renumber seen_models migration to 217 after the release took 215/216
release/v3.8.53 shipped 215_team_cost_centers.sql and 216_team_cost_shapes.sql, so this PR's 215_seen_models.sql collided. The migration body is unchanged (idempotent CREATE ... IF NOT EXISTS).

Co-authored-by: ErfanBagheri404 <mrenmityerf@gmail.com>
Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
2026-10-29 02:47:19 -03:00
diegosouzapw
403fdf1879 Merge origin/release/v3.8.53 into feat/port-pr-3604-new-models-inbox
README Database row resolved to 214 migrations (213 on the release + this PR's seen_models). docs/i18n mirrors take the release side; they are refreshed after merge.

Co-authored-by: ErfanBagheri404 <mrenmityerf@gmail.com>
Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
2026-10-29 02:46:04 -03:00
diegosouzapw
688dbc92b3 chore(merge): merge release/v3.8.53 into feat/video-drilldown-producer-20261009
Resolve ModalityBridgeVideoTab.tsx by keeping the release's ui-kit Select (modality-bridge-video-analysis-mode, KEA-7886) and adding the two drill-down consent Toggles from this PR. The raw <select> is not restored.

Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
2026-10-29 02:41:28 -03:00
Ilya Bogin
71bc72f028 Merge branch 'release/v3.8.53' of https://github.com/cheaper-inference/OmniRoute into feat/keenable-search
# Conflicts:
#	README.md
#	docs/architecture/ARCHITECTURE.md
#	docs/diagrams/cli-terminal.svg
#	docs/diagrams/comparison-table.svg
#	docs/diagrams/promise-pillars.svg
#	docs/diagrams/readme-hero.svg
#	docs/reference/PROVIDER_REFERENCE.md
2026-10-28 11:11:22 +02:00
diegosouzapw
103b31715a Merge remote-tracking branch 'origin/release/v3.8.53' into docs/17187-policy-docs-20261020
# Conflicts:
#	.i18n-state.json
2026-10-28 02:52:25 -03:00
diegosouzapw
2d1f5bc7d3 docs(i18n): sync docs/architecture/CODEBASE_DOCUMENTATION.md mirrors with the base 2026-10-28 02:47:08 -03:00
diegosouzapw
8a19f556a1 docs(i18n): sync docs/architecture/CODEBASE_DOCUMENTATION.md mirrors with the base 2026-10-28 01:34:40 -03:00
diegosouzapw
f02733f905 docs(i18n): sync docs/architecture/CODEBASE_DOCUMENTATION.md mirrors with the base 2026-10-28 01:03:42 -03:00
diegosouzapw
36046c6847 docs(i18n): sync docs/architecture/CODEBASE_DOCUMENTATION.md mirrors with the base 2026-10-28 00:32:15 -03:00
diegosouzapw
bb1cbc0172 docs(i18n): sync docs/architecture/CODEBASE_DOCUMENTATION.md mirrors with the base 2026-10-27 23:15:21 -03:00
diegosouzapw
c041a4405d docs(i18n): sync docs/architecture/ARCHITECTURE.md mirrors with the base 2026-10-27 22:16:10 -03:00
diegosouzapw
3d92933a94 Merge remote-tracking branch 'origin/release/v3.8.53' into docs/17187-policy-docs-20261020
# Conflicts:
#	.i18n-state.json
#	AGENTS.md
2026-10-27 21:36:32 -03:00
diegosouzapw
f5c539e7db docs(i18n): sync docs/architecture/CODEBASE_DOCUMENTATION.md mirrors with the base 2026-10-27 21:17:16 -03:00
diegosouzapw
ccdeb12535 docs(i18n): sync docs/architecture/CODEBASE_DOCUMENTATION.md mirrors with the base 2026-10-27 20:59:16 -03:00
diegosouzapw
b719797e03 docs(i18n): sync docs/architecture/CODEBASE_DOCUMENTATION.md mirrors with the base 2026-10-27 19:15:50 -03:00
diegosouzapw
e57a70b107 docs(i18n): sync docs/architecture/CODEBASE_DOCUMENTATION.md mirrors with the base 2026-10-27 19:01:47 -03:00
diegosouzapw
10a81309f2 docs(i18n): sync docs/architecture/CODEBASE_DOCUMENTATION.md mirrors with the base 2026-10-27 18:45:23 -03:00
diegosouzapw
7d33f980b8 docs(i18n): sync docs/architecture/CODEBASE_DOCUMENTATION.md mirrors with the base 2026-10-27 18:17:03 -03:00
diegosouzapw
bc938f242d docs(readme): bump migration count to 212 for 215_seen_models
The seen_models migration was renumbered 206 -> 215 on the merge with
release/v3.8.53 (206 is taken by 206_codex_wakeup_tasks), which makes the
shipped SQL file count 212. AGENTS.md and llm.txt carry the same count but
are protected agent-instruction surfaces and are left for the operator.
2026-10-27 13:47:34 -03:00
diegosouzapw
ab67f5d306 Merge remote-tracking branch 'origin/release/v3.8.53' into feat/port-pr-3604-new-models-inbox
# Conflicts:
#	src/app/(dashboard)/dashboard/providers/components/ProviderSummaryCard.tsx
2026-10-27 13:44:46 -03:00
diegosouzapw
669f4d7fa4 docs(i18n): sync docs/architecture/CODEBASE_DOCUMENTATION.md mirrors with the base 2026-10-27 12:40:45 -03:00
diegosouzapw
87b11424c2 chore(changelog): fragment for #18359 2026-10-27 12:25:24 -03:00
diegosouzapw
8c1e6ad41c feat(dashboard): custom JSON API form in the compatible-provider modals
Adds the "Custom JSON API" API type to the OpenAI-compatible Add and Edit
provider modals (the engine, storage and API landed in #18353):

- New CustomJsonFields component: HTTP method, auth type (bearer / API key in
  a named header / none), auth header name, request template editor with two
  modes (simple fields: model + messages always sent, optional text or JSON
  rows; full JSON for other schemas) and the response path.
- customJsonForm.ts converts between the stored config and the form and
  validates it client-side with the same Zod schema the server uses
  (customJsonConfigSchema); extra rows are own properties, so a name such as
  __proto__ is rejected instead of being dropped silently. A non-standard
  stored template opens in JSON mode and is never forced back into fields.
- Choosing the type clears the OpenAI default base URL (custom JSON nodes take
  the complete endpoint URL) and hides chat/models paths; the check button
  becomes "Send test request" (one real request through
  /api/provider-nodes/validate), usable without a key when auth is none.
- 30 new providers.* i18n keys, translated by hand in all 66 locales.

Co-authored-by: lyccccy <g1337699300@gmail.com>
Inspired-by: https://github.com/decolua/9router/pull/4929
2026-10-27 12:17:14 -03:00
diegosouzapw
bb5cb50913 docs(i18n): sync docs/architecture/CODEBASE_DOCUMENTATION.md mirrors with the base 2026-10-27 11:56:42 -03:00
diegosouzapw
b394deb554 Merge remote-tracking branch 'origin/feat/port-pr-4929-custom-json-provider-node' into feat/port-pr-4929-custom-json-dashboard-form 2026-10-27 11:29:48 -03:00
diegosouzapw
5bc2df5fc1 docs(i18n): sync docs/architecture/CODEBASE_DOCUMENTATION.md mirrors with the base 2026-10-27 11:25:36 -03:00
diegosouzapw
d1e8507f72 docs(i18n): sync docs/architecture/CODEBASE_DOCUMENTATION.md mirrors with the base 2026-10-27 10:52:39 -03:00
diegosouzapw
ab35a720e8 chore(changelog): fragment for #18353 2026-10-27 10:50:01 -03:00
diegosouzapw
77e37db32f chore(changelog): fragment for #18352 2026-10-27 10:43:00 -03:00
diegosouzapw
8b9c88e954 feat(audio): Cloudflare Workers AI Nova-3 transcription with diarization
Add `cloudflare-ai` (alias `cf`) to the transcription registry with the
`@cf/deepgram/nova-3` model. The handler POSTs the raw audio to
/accounts/{accountId}/ai/run/{model}, taking the account id from the
connection (URL-encoded) and returning 400 before any upstream call when it
is missing. `punctuate=true` is always sent, `diarize=true` only on request
(same spellings as the Deepgram/Soniox paths) and `language` only when set.

Workers AI returns no utterances, so verbose_json builds one segment per
speaker run from the word list and adds `words`, `num_speakers` and the
neuron usage. Diarization implies the verbose body, as on native Deepgram.
A `success:false` envelope delivered with HTTP 200 becomes a 502 that
carries only the vendor error code; non-2xx statuses go through the shared
sanitized upstreamErrorResponse.

Co-authored-by: LeandroTechify <leandro.techify@gmail.com>
Inspired-by: https://github.com/decolua/9router/pull/5140
2026-10-27 10:38:12 -03:00
diegosouzapw
63eeecfe6d chore(changelog): fragment for #18350 2026-10-27 10:24:01 -03:00
diegosouzapw
c8f618e77f docs(i18n): sync docs/architecture/ARCHITECTURE.md mirrors with the base 2026-10-27 10:17:14 -03:00
diegosouzapw
8f37d0f858 feat(dashboard): "Quota check" toggle for OpenAI/Anthropic-compatible nodes
The configurable quota fetcher (#13616) only covered openai-compatible-*
connections and could only be configured by hand-editing the connection's
providerSpecificData.quotaEndpoint.

- anthropic-compatible-* (CC-compatible included) is now dispatched to the
  same fetcher and accepted by the Provider Limits visibility gate.
- The node edit modal gets a "Quota check" toggle and a quota path (default
  /credits). Saving writes a standard-credits quotaEndpoint preset
  ({ credits, total?, used? }) to the node's connections, or removes it.
  Only the preset is ever replaced or removed; a hand-written endpoint is
  left untouched. Anthropic-compatible nodes authenticate with x-api-key.
- A key added to a node whose keys already use the preset inherits it.
- quotaEndpoint and the quota path get Zod schemas; the path must stay on
  the node's own host (single leading "/", no scheme, no "//").
- The quota call goes through safeOutboundFetch with the provider outbound
  guard (cloud metadata always blocked, no redirects).
- New strings translated in all locales.

Co-authored-by: MWGE22629 <207309548+MWGE22629@users.noreply.github.com>
Inspired-by: https://github.com/decolua/9router/pull/4999
2026-10-27 10:15:42 -03:00
diegosouzapw
9e9a3749fb feat(providers): custom JSON API provider nodes (request template + response path)
Adds an OpenAI-compatible node with apiType "custom-json" that talks to any JSON
business endpoint: the full endpoint URL, POST/PUT/PATCH, bearer / named api-key
header / no auth, a JSON request template filled from {{prompt}}, {{messages}},
{{model}}, {{stream}} and {{request.<path>}} placeholders (substitution only, never
evaluated), and a response path whose value is returned as an OpenAI chat
completion (or a two-chunk SSE stream) through the regular translators.

- Config validated with Zod (customJsonConfigSchema): 64 KB / depth 32 template
  caps, __proto__/prototype/constructor blocked in keys and paths, bounded
  placeholder/path patterns, auth header denylist; endpoint must be http(s)
  without credentials or fragment.
- Executor (open-sse/executors/customJson.ts) sends exactly one request through
  safeOutboundFetch with the provider outbound URL guard on every call, retry:false
  and no redirects; operator custom headers go through the shared sanitizer
  (applyCustomHeaders moved to executors/default/customHeaders.ts); the auth
  header is redacted in the logged headers; errors go through errorResponse /
  buildErrorBody.
- Never replayed: responses are marked in-process (noReplayResponse) and
  chat.ts returns them before account cooldown/fallback, while the combo
  noReplayLatch makes the first marked target response final.
- Migration 215 adds provider_nodes.custom_json_config_json; node create/update
  routes persist it and propagate it to every connection; connection creation,
  bulk/import and the runtime self-heal hydrate providerSpecificData.customJson.
- Connection tests and health checks validate the config only (reported as
  unverifiable); POST /api/provider-nodes/validate sends one explicit test
  request; /models discovery is skipped for these nodes.
- Docs: docs/guides/CUSTOM_JSON_API.md. Dashboard form is a follow-up.

Co-authored-by: lyccccy <g1337699300@gmail.com>
Inspired-by: https://github.com/decolua/9router/pull/4929
2026-10-27 09:52:57 -03:00
diegosouzapw
e4cb96e97e Merge remote-tracking branch 'origin/release/v3.8.53' into docs/17187-policy-docs-20261020 2026-10-27 08:26:32 -03:00
diegosouzapw
13470236f4 Merge release/v3.8.53 into docs/17187-policy-docs-20261020 2026-10-26 18:03:08 -03:00
diegosouzapw
606a71ca43 Merge remote-tracking branch 'origin/release/v3.8.53' into sweep/17337
# Conflicts:
#	AGENTS.md
2026-10-26 17:37:17 -03:00
diegosouzapw
88fa54722f fix(i18n): reuse proven count-only translation changes 2026-10-26 07:57:16 -03:00
diegosouzapw
47240d08e1 test(sse): align buffered error fixtures with current protocol contract 2026-10-26 05:45:35 -03:00
diegosouzapw
9f6c05233b docs(i18n): reconcile the current release before translating 2026-10-26 04:14:01 -03:00
diegosouzapw
53f11b00d1 test(ci): preserve collector lookup dependency in evidence fixtures 2026-10-26 03:45:02 -03:00
diegosouzapw
f62e8da10b Merge remote-tracking branch 'origin/release/v3.8.53' into sweep/17337 2026-10-26 03:40:53 -03:00
diegosouzapw
211cd58bc3 docs(changelog): move the #17337 fragment to a valid category 2026-10-26 03:40:16 -03:00
diegosouzapw
b0937aa3ae fix(ci): require current complete lint measurements for metrics 2026-10-26 03:22:46 -03:00
diegosouzapw
2064a634c3 fix(i18n): classify terminal errors and repair rejected translations 2026-10-26 02:12:59 -03:00
diegosouzapw
618bd398e9 Merge commit 'c1a449066264c56933d32713bdf9ea8f76f1ff25' into fix/qg-i18n-wave-contract-20261026 2026-10-26 02:06:04 -03:00
diegosouzapw
39f2241aff fix(ci): model test registration gate and incomplete process evidence 2026-10-26 01:53:50 -03:00
diegosouzapw
8578e9e2ce Merge commit 'c1a449066264c56933d32713bdf9ea8f76f1ff25' into fix/qg-observer-parity-20261025 2026-10-26 01:39:39 -03:00
diegosouzapw
ce7b11c146 fix(ci): avoid quadratic message lookup in i18n coverage gates 2026-10-26 01:38:45 -03:00
diegosouzapw
16a481dff7 fix(sse): share guarded media downloads inside the engine 2026-10-26 01:04:07 -03:00
diegosouzapw
ccccd42c4e test(ci): backport deterministic fixtures to main 2026-10-25 23:50:11 -03:00
diegosouzapw
e7ef478085 test(ci): isolate timing and version discovery in failing fixtures 2026-10-25 23:37:02 -03:00
diegosouzapw
c58b886ebd test(ci): sequence keepalive errors after stream commitment 2026-10-25 22:51:30 -03:00
diegosouzapw
eb4ff77dcc fix(i18n): validate reused content and accept real translation summaries 2026-10-25 22:42:05 -03:00
diegosouzapw
5dd97cced8 test(ci): isolate catalog discovery and stream watchdog clocks 2026-10-25 22:30:07 -03:00
diegosouzapw
368c2cd1b6 test(ci): isolate main regression fixtures from host state and scheduling 2026-10-25 21:42:58 -03:00
diegosouzapw
398bae6d4a fix(ci): make failure signature ordering independent of locale 2026-10-25 21:42:56 -03:00
diegosouzapw
8f6cef32f8 fix(i18n): fail closed when a document wave is incomplete 2026-10-25 21:26:42 -03:00
diegosouzapw
eed485d3b7 test(ci): isolate main regression fixtures from host state and scheduling 2026-10-25 21:05:17 -03:00
diegosouzapw
e26d03e7b3 fix(ci): make failure signature ordering independent of locale 2026-10-25 20:48:39 -03:00
diegosouzapw
7e761ffde1 fix(ci): use October security-patched Node releases for subpackages 2026-10-25 20:19:09 -03:00
diegosouzapw
935e0878d7 Merge release/v3.8.53 into docs/17187-policy-docs-20261020 2026-10-25 19:33:02 -03:00
diegosouzapw
240de632f0 test(sse): distinguish upstream errors from malformed streams 2026-10-25 19:22:47 -03:00
diegosouzapw
79e883a1af fix(ci): require complete audits across independent packages 2026-10-25 19:15:39 -03:00
diegosouzapw
7bdc2df0e1 fix(ci): declare full observer gates and require completed measurements 2026-10-25 19:02:13 -03:00
diegosouzapw
63ab96f4d7 fix(ci): bind OpenAPI checks to immutable event baselines 2026-10-25 18:52:20 -03:00
Ilya Bogin
e197312dd5 Merge branch 'release/v3.8.53' into feat/keenable-search 2026-10-23 11:29:22 +03:00
diegosouzapw
4ce51b060f chore(ci): reconcile retained evidence validation with release 2026-10-22 14:46:35 -03:00
Ilya Bogin
d6f01d8e1f chore(changelog): name the Keenable fragment after #17920 2026-10-22 12:29:15 +03:00
Ilya Bogin
12d006f3e3 Merge branch 'release/v3.8.53' into feat/keenable-search 2026-10-22 12:02:15 +03:00
Ilya Bogin
7f392f2a67 feat(search): add Keenable web search and fetch provider 2026-10-22 12:01:30 +03:00
diegosouzapw
41fac86514 chore(ci): link acceptance evidence repair to its pull request 2026-10-21 14:32:53 -03:00
diegosouzapw
00bd838c9a fix(ci): verify retained acceptance evidence bytes 2026-10-21 14:29:56 -03:00
diegosouzapw
fc0749e625 docs: distinguish live policy wiring from reserved contracts (#17187) 2026-10-20 17:25:28 -03:00
diegosouzapw
01f94035c2 merge: sync video live validation with reviewed promotion parent 2026-10-18 19:22:51 +00:00
diegosouzapw
e96061bb2b refactor(video): simplify promotion evidence validation 2026-10-18 19:11:39 +00:00
diegosouzapw
7ebd01f037 merge(video): retain promotion and drilldown regression coverage 2026-10-18 18:54:46 +00:00
diegosouzapw
8a6d334ab9 refactor(video): isolate bounded drilldown metadata parsing 2026-10-18 14:55:30 +00:00
diegosouzapw
e4674baa38 Merge branch 'fix/video-promotion-16081-final-20261016' into fix/video-live-16083-final-20261016 2026-10-17 13:08:34 -03:00
diegosouzapw
340b0a3135 Merge commit '09310972378696ba3378b0b896ff9c75bfe829b4' into fix/video-promotion-16081-final-20261016 2026-10-17 13:07:24 -03:00
diegosouzapw
0931097237 Merge commit '411aead932f5dc3f51ea9e41262378f4ace31e25' into fix/video-drilldown-16074-final-20261016 2026-10-17 12:53:35 -03:00
diegosouzapw
fb2ca11b1b merge: propagate corrected video contracts into live harness 2026-10-17 11:21:15 -03:00
diegosouzapw
f73865e294 merge: propagate validated drilldown contract into promotion 2026-10-17 11:18:23 -03:00
diegosouzapw
58daf159d2 merge: reconcile video drilldown with current release base 2026-10-17 11:15:02 -03:00
diegosouzapw
d1a49161ac fix(video): include required handles in generated examples 2026-10-17 11:12:42 -03:00
diegosouzapw
c2630e047c fix(video): keep drilldown OpenAPI contract unique 2026-10-17 11:07:37 -03:00
diegosouzapw
a536d9f930 fix(video): enforce private database and one-shot STT boundaries 2026-10-17 10:56:57 -03:00
diegosouzapw
e13ee89e6f merge: reconcile consented drilldown with current release 2026-10-17 10:55:38 -03:00
diegosouzapw
6d8f27ce63 merge: reconcile real video collector with reviewed promotion contract 2026-10-17 10:32:57 -03:00
diegosouzapw
a304a7a900 docs(video): describe the FU09 median latency criterion accurately 2026-10-17 10:20:37 -03:00
diegosouzapw
b0f4680899 merge: reconcile video promotion with reviewed drilldown candidate 2026-10-17 10:12:19 -03:00
diegosouzapw
e568ade3ad merge: retain scoped video routing with consented drilldown 2026-10-17 09:51:52 -03:00
diegosouzapw
6227d7ee4f Merge commit 'b3db8094ac411852a698c719fb161eb6b6c1803c' into fix/video-live-16083-final-20261016 2026-10-16 19:39:55 -03:00
diegosouzapw
b3db8094ac fix(i18n): translate video promotion readiness across locales 2026-10-16 19:33:15 -03:00
diegosouzapw
5edd2acdc6 Merge commit '73602854d9dc9b135ef808c3a71c8737bdf9aa95' into fix/video-live-16083-final-20261016 2026-10-16 19:26:49 -03:00
diegosouzapw
73602854d9 Merge commit 'fd52e61bb1' into fix/video-promotion-16081-final-20261016
# Conflicts:
#	src/i18n/messages/am.json
#	src/i18n/messages/ar.json
#	src/i18n/messages/az.json
#	src/i18n/messages/bg.json
#	src/i18n/messages/bn.json
#	src/i18n/messages/bs.json
#	src/i18n/messages/cs.json
#	src/i18n/messages/da.json
#	src/i18n/messages/de.json
#	src/i18n/messages/el.json
#	src/i18n/messages/et.json
#	src/i18n/messages/fa.json
#	src/i18n/messages/fi.json
#	src/i18n/messages/fr.json
#	src/i18n/messages/ga.json
#	src/i18n/messages/gu.json
#	src/i18n/messages/ha.json
#	src/i18n/messages/he.json
#	src/i18n/messages/hi.json
#	src/i18n/messages/hr.json
#	src/i18n/messages/hu.json
#	src/i18n/messages/hy.json
#	src/i18n/messages/id.json
#	src/i18n/messages/ig.json
#	src/i18n/messages/it.json
#	src/i18n/messages/ja.json
#	src/i18n/messages/ka.json
#	src/i18n/messages/km.json
#	src/i18n/messages/kn.json
#	src/i18n/messages/ko.json
#	src/i18n/messages/lt.json
#	src/i18n/messages/lv.json
#	src/i18n/messages/ml.json
#	src/i18n/messages/mr.json
#	src/i18n/messages/ms.json
#	src/i18n/messages/mt.json
#	src/i18n/messages/my.json
#	src/i18n/messages/ne.json
#	src/i18n/messages/nl.json
#	src/i18n/messages/no.json
#	src/i18n/messages/or.json
#	src/i18n/messages/pa.json
#	src/i18n/messages/phi.json
#	src/i18n/messages/pl.json
#	src/i18n/messages/pt.json
#	src/i18n/messages/ro.json
#	src/i18n/messages/ru.json
#	src/i18n/messages/si.json
#	src/i18n/messages/sk.json
#	src/i18n/messages/sl.json
#	src/i18n/messages/sr.json
#	src/i18n/messages/sv.json
#	src/i18n/messages/sw.json
#	src/i18n/messages/ta.json
#	src/i18n/messages/te.json
#	src/i18n/messages/th.json
#	src/i18n/messages/tr.json
#	src/i18n/messages/uk-UA.json
#	src/i18n/messages/ur.json
#	src/i18n/messages/uz.json
#	src/i18n/messages/vi.json
#	src/i18n/messages/yo.json
#	src/i18n/messages/zh-CN.json
#	src/i18n/messages/zh-TW.json
2026-10-16 19:18:59 -03:00
diegosouzapw
1a7969070e fix(video): align private live preparation with consumer sandbox 2026-10-16 19:15:11 -03:00
diegosouzapw
fd52e61bb1 fix(i18n): translate consented video drilldown controls 2026-10-16 19:12:50 -03:00
diegosouzapw
78d1c0b1fe Merge commit 'f06f9e16cb' into fix/video-live-16083-final-20261016 2026-10-16 19:07:56 -03:00
diegosouzapw
f06f9e16cb docs(video): specify retention and promotion telemetry contract 2026-10-16 19:06:40 -03:00
diegosouzapw
2aa7eced35 test(video): reconcile isolated validation with reviewed promotion stack 2026-10-16 19:03:10 -03:00
diegosouzapw
f9cd274d5a fix(video): reconcile promotion evidence with reviewed drilldown base 2026-10-16 18:58:38 -03:00
diegosouzapw
3d9c50197d test(video): cover drilldown revocation and warm-cache consent boundaries 2026-10-16 18:53:15 -03:00
diegosouzapw
133ee76f39 fix(video): enforce endpoint permissions on drilldown access 2026-10-16 18:51:28 -03:00
diegosouzapw
aea49550dc fix(video): omit ephemeral drilldown handles from diagnostics 2026-10-16 18:48:13 -03:00
diegosouzapw
bf7fa5bd3d fix(video): preserve drilldown handles after empty focused reads 2026-10-16 18:42:23 -03:00
diegosouzapw
882c6f7b47 test(video): refresh isolated validation on reconciled drilldown base 2026-10-16 18:40:43 -03:00
diegosouzapw
08c07d6196 test(video): pin live preparation to the consumer temporary root 2026-10-16 18:38:30 -03:00
diegosouzapw
dbb82756bc feat(video): reconcile drilldown lifecycle with current release protections 2026-10-16 18:37:26 -03:00
diegosouzapw
7c08764db0 chore(changelog): fragment for #16864 2026-10-16 14:14:31 -03:00
diegosouzapw
73856d7aeb feat(dashboard): "New models" inbox across connected providers
Every successful model sync now records the provider's listing in a new
seen_models table (migration 206, src/lib/db/seenModels.ts). The first sync
of a provider seeds its baseline as already read, so existing installs and
freshly connected providers never flood the inbox; models that show up in
later syncs stay unread until acknowledged. Rows are never deleted, so a
model that drops out of a listing and comes back is not flagged again.

- GET /api/models/new returns the unread models grouped by provider
  (read from the table only, no catalog rebuild per request).
- POST /api/models/new/acknowledge marks a selection, or everything, read
  (Zod-validated body; errors sanitized via createErrorResponse).
- The Providers toolbar gets a "New models" button with an unread badge and
  a modal grouped by provider, with Free tags from the shared free-model
  knowledge and per-provider / mark-all-read actions.
- Recording is best-effort and never fails a sync; it runs for the regular
  discovery path and the Volcano Ark console path, so the 6h auto-sync
  scheduler fills the inbox too.
- New UI strings translated in all 66 locales.

Co-authored-by: ErfanBagheri404 <mrenmityerf@gmail.com>
Inspired-by: https://github.com/decolua/9router/pull/3604
2026-10-16 14:12:10 -03:00
diegosouzapw
1f597cb593 refactor(dashboard): isolate Codex service tier chip 2026-10-15 18:03:16 -03:00
diegosouzapw
d164c03c64 refactor(codex): isolate service tier policy decisions 2026-10-15 18:00:11 -03:00
diegosouzapw
fe1da28c36 feat(codex): add model-scoped Ultrafast defaults (#16678) 2026-10-15 17:38:16 -03:00
diegosouzapw
4aba59e74d feat(providers): complete Docker Model Runner discovery defaults (#16670) 2026-10-15 17:09:35 -03:00
diegosouzapw
62c1433ed6 docs(changelog): turn the video live-validation fragment into a bullet 2026-10-15 11:53:44 -03:00
diegosouzapw
a8696f25ca Merge branch 'rb/video-16081' into rb/video-16083 2026-10-15 11:53:23 -03:00
diegosouzapw
036fef0b0f Merge branch 'rb/video-16074' into rb/video-16081 2026-10-15 11:51:16 -03:00
diegosouzapw
5e08fc5ddb docs(changelog): turn the video drill-down fragment into a single bullet 2026-10-15 11:33:57 -03:00
diegosouzapw
2df92a09d2 docs(env): document OMNI_COVERAGE_ROOT for the coverage capture harness
check:docs-all flagged the new coverage-scope env var as in code but missing
from .env.example; list it in the Test & E2E harness sections.
2026-10-14 22:46:56 -03:00
diegosouzapw
e1410a9059 Merge remote-tracking branch 'origin/release/v3.8.52' into rw/16177 2026-10-14 22:44:02 -03:00
diegosouzapw
7b0bf0b693 docs(video): document isolated live source directory 2026-10-13 11:22:03 -03:00
diegosouzapw
d37408f554 fix(quality): preserve original stack coordinates in coverage capture 2026-10-10 18:02:01 -03:00
diegosouzapw
749acdd9ce feat(quality): capture and compose common-source coverage evidence 2026-10-10 17:54:52 -03:00
diegosouzapw
de5641023a Merge commit '09118dfc1dc9c8cafa2b6e4186d2bf9fba0d63c0' into fix/qg-coverage-scope-20261010 2026-10-10 17:29:47 -03:00
diegosouzapw
dc512a7487 docs(changelog): bind coverage inventory to PR 16177 2026-10-10 09:02:07 -03:00
diegosouzapw
2fa884af10 feat(quality): freeze coverage source scope by exact commit 2026-10-10 08:58:29 -03:00
diegosouzapw
43dd52e23d test(video): isolate background probes and add one-shot STT component harness 2026-10-09 14:36:02 -03:00
diegosouzapw
eca6ab296b test(video): guard real STT smoke and persist status-only receipts 2026-10-09 14:30:21 -03:00
diegosouzapw
e4afd30723 test(video): prepare private read-only VPS homologation snapshots 2026-10-09 14:24:16 -03:00
diegosouzapw
85a6a67a5e docs(video): describe exact promotion evidence admission contract 2026-10-09 14:14:45 -03:00
diegosouzapw
2650b81825 fix(video): reject ambiguous promotion allowlist entries 2026-10-09 14:14:40 -03:00
diegosouzapw
4b2b5f9fe1 fix(video): accept privacy-safe digest-only evaluation observations 2026-10-09 14:13:04 -03:00
diegosouzapw
c883570450 fix(video): bind independent execution receipts to model revision 2026-10-09 14:12:16 -03:00
diegosouzapw
56e39b80b9 feat(video): expose conservative advanced-policy readiness 2026-10-09 14:11:23 -03:00
diegosouzapw
2ea7691a57 Merge branch 'feat/video-drilldown-producer-20261009' into fix/video-promotion-evidence-20261009 2026-10-09 14:08:15 -03:00
diegosouzapw
e50bcec8fe fix(video): bind allowlist eligibility to exact evidence context 2026-10-09 14:08:06 -03:00
diegosouzapw
538e935c86 fix(video): measure caption savings with balanced mean call counts 2026-10-09 14:02:43 -03:00
diegosouzapw
f699ee3e11 feat(video): wire independent confirmation into promotion evaluation CLI 2026-10-09 14:01:04 -03:00
diegosouzapw
405ee38872 fix(video): cross-check injection metrics against claimed security passes 2026-10-09 13:58:57 -03:00
diegosouzapw
1dbb3b119b test(video): assert approved versioned producer handles 2026-10-09 13:58:11 -03:00
diegosouzapw
378481e0da fix(video): retain auditable run markers without raw promotion responses 2026-10-09 13:57:37 -03:00
diegosouzapw
00578b72d2 fix(video): bind observed media prompts and settings to frozen corpus 2026-10-09 13:55:22 -03:00
diegosouzapw
5fb1eac47d fix(video): freeze resource admission caps and require pre-analysis measurements 2026-10-09 13:53:02 -03:00
diegosouzapw
d45de70f4d docs(video): align versioned handles and page limit contract 2026-10-09 13:52:20 -03:00
diegosouzapw
df19b1407a feat(video): accept approved drilldown page limit with strict legacy alias 2026-10-09 13:50:05 -03:00
diegosouzapw
9c115b9f72 fix(video): compare case-balanced mean recall for promotion 2026-10-09 13:49:13 -03:00
diegosouzapw
4dd9717ff0 feat(video): mint versioned drilldown tokens and retain only their digests 2026-10-09 13:47:57 -03:00
diegosouzapw
c72d2b9ac7 fix(video): verify seeded randomized observation order 2026-10-09 13:44:12 -03:00
diegosouzapw
eb8da26798 fix(video): isolate sampling and contact-sheet promotion evidence 2026-10-09 13:41:49 -03:00
diegosouzapw
b331c54301 fix(video): require two independent consecutive promotion receipts 2026-10-09 13:39:32 -03:00
diegosouzapw
7c25886a18 fix(video): reject duplicated promotion run identities and repetitions 2026-10-09 13:36:41 -03:00
diegosouzapw
380b80986b fix(video): use typed structured warning at drilldown boundary 2026-10-09 13:35:14 -03:00
diegosouzapw
91091e8278 fix(video): require hashed sanitized corpus before promotion 2026-10-09 13:34:17 -03:00
diegosouzapw
0e6224def9 fix(video): require candidate-bound execution receipts for promotion 2026-10-09 13:31:19 -03:00
diegosouzapw
8ede665335 fix(video): bind promotion observations to manifest and per-model coverage 2026-10-09 13:28:26 -03:00
diegosouzapw
68c7e35275 fix(video): hold promotion on invalid measured metrics 2026-10-09 13:26:33 -03:00
diegosouzapw
f236cdfe3e fix(video): enforce approved material gain promotion thresholds 2026-10-09 13:24:30 -03:00
diegosouzapw
221120ac62 fix(video): release retained drilldown frames at idle TTL 2026-10-09 13:18:49 -03:00
diegosouzapw
e65ff2198e docs(video): describe consented production drilldown and public API 2026-10-09 13:14:09 -03:00
diegosouzapw
913e5123d2 fix(video): bound drilldown response bytes and reject ambiguous queries 2026-10-09 13:08:06 -03:00
diegosouzapw
99488921fe feat(video): expose private drilldown usage and effective policy in dashboard 2026-10-09 13:05:33 -03:00
diegosouzapw
4293493682 feat(ui): expose independent video drilldown consent controls 2026-10-09 12:56:39 -03:00
diegosouzapw
278aca9fe5 fix(video): cancel drilldown reads and reclaim expired retained frames 2026-10-09 12:51:41 -03:00
diegosouzapw
02f24df794 fix(video): bind drilldown variant metadata to delivered frames 2026-10-09 12:49:14 -03:00
diegosouzapw
fe3b2200d9 fix(video): persist and honor independent drilldown consent switches 2026-10-09 12:46:12 -03:00
diegosouzapw
c29199cf45 feat(video): expose bounded drilldown handles on chat responses 2026-10-09 12:44:14 -03:00
diegosouzapw
0cb44121a1 fix(video): share drill-down lifecycle with authenticated consumer 2026-10-09 12:36:11 -03:00
diegosouzapw
a88092c233 feat(video): publish consented tenant-bound drill-down handles 2026-10-09 12:34:22 -03:00
diegosouzapw
0b884907e1 fix(video): reserve transcript provenance for server-owned adapters 2026-10-09 12:24:19 -03:00
diegosouzapw
35fa5c7d3b fix(video): bound pending STT work and verify tenant cache isolation 2026-10-09 12:16:16 -03:00
diegosouzapw
5b16309cfa fix(video): enforce Audio Bridge consent and remaining STT budget 2026-10-09 12:12:50 -03:00
diegosouzapw
bd291d9626 fix(video): preserve visual fallback when STT selection fails 2026-10-09 12:07:48 -03:00
diegosouzapw
2702f26886 Merge remote-tracking branch 'origin/release/v3.8.52' into fix/video-stt-hotpath-20261007 2026-10-09 12:01:09 -03:00
diegosouzapw
032f09a63c fix(video): connect dual-consent STT to the production guardrail 2026-10-07 21:17:50 -03:00
1636 changed files with 132943 additions and 27152 deletions

View File

@@ -732,6 +732,13 @@ 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.
@@ -1498,6 +1505,11 @@ 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.
@@ -3544,6 +3556,11 @@ 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/*
@@ -3822,6 +3839,10 @@ 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
View File

@@ -9,3 +9,27 @@
# 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

View File

@@ -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 strings added to the i18n catalogs
- [ ] New UI/CLI strings added to `en.json` only (other locales are completed at release)
## Tests Added Or Updated

View File

@@ -19,6 +19,7 @@ jobs:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
with:
fetch-depth: 0
persist-credentials: false
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020
with:
node-version: "24"

View File

@@ -31,12 +31,12 @@ jobs:
free -h
- name: Checkout repository
uses: actions/checkout@v7
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
- name: Setup Node.js
uses: actions/setup-node@v7
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # 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@v4
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: omniroute-build
path: omniroute-build.tar.gz

View File

@@ -10,7 +10,10 @@ 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.
branches: [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/**"]
pull_request:
branches: [main, "release/**"]
types: [opened, synchronize, reopened, ready_for_review, converted_to_draft, edited]
@@ -62,20 +65,30 @@ 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@v7
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # 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: ${{ github.event.pull_request.base.sha || github.event.merge_group.base_sha || github.event.before }}
BASE_SHA: ${{ steps.candidate.outputs.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
@@ -129,11 +142,11 @@ jobs:
API_KEY_SECRET: ci-lint-api-key-secret-long
DISABLE_SQLITE_AUTO_BACKUP: "true"
steps:
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
fetch-depth: 0
persist-credentials: false
- uses: actions/setup-node@v7
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
with:
package-manager-cache: false
node-version: ${{ env.CI_NODE_VERSION }}
@@ -162,7 +175,7 @@ jobs:
run: npm run lint:json
- name: Upload ESLint results
if: always()
uses: actions/upload-artifact@v7
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
with:
name: eslint-results
path: .artifacts/eslint-results.json
@@ -172,9 +185,11 @@ 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 }}
PR_BASE_SHA: ${{ github.event.pull_request.base.sha || needs.changes.outputs.candidateBase }}
run: |
if [ -n "${PR_BASE_SHA:-}" ]; then
npm run check:boundary:ratchet -- --base-ref "$PR_BASE_SHA"
@@ -190,7 +205,11 @@ jobs:
- run: npm run check:deps
- run: npm run check:file-size
- run: npm run check:error-helper
- run: npm run check:migration-numbering
- 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:public-creds
- run: npm run check:db-rules
- run: npm run check:known-symbols
@@ -209,6 +228,14 @@ 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
@@ -226,6 +253,11 @@ 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.
@@ -278,10 +310,10 @@ jobs:
contents: read
security-events: read
steps:
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
- uses: actions/setup-node@v7
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
with:
package-manager-cache: false
node-version: ${{ env.CI_NODE_VERSION }}
@@ -307,19 +339,20 @@ 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@v8
- uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # 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
continue-on-error: true
uses: actions/download-artifact@v8
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # 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.
@@ -364,7 +397,7 @@ jobs:
run: cat .artifacts/quality-ratchet.md >> "$GITHUB_STEP_SUMMARY"
- name: Upload ratchet report
if: always()
uses: actions/upload-artifact@v7
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
with:
name: quality-ratchet
path: .artifacts/quality-ratchet.md
@@ -377,8 +410,9 @@ 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. The blocking gates themselves SKIP (exit 0) when their binary/plugin
# is absent — only a measured regression on the SAME metric the baseline froze
# 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
# blocks. The CodeQL ratchet was PROMOTED to the quality-gate job (v3.8.26).
# SonarQube needs SONAR_TOKEN/SONAR_HOST_URL secrets.
quality-extended:
@@ -393,11 +427,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@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
fetch-depth: 0
- uses: actions/setup-node@v7
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
with:
package-manager-cache: false
node-version: ${{ env.CI_NODE_VERSION }}
@@ -472,9 +506,11 @@ 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);
# 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
# 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
# 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)
@@ -485,16 +521,8 @@ jobs:
# an absent baseline are INCOMPLETE, never zero findings or acceptance.
- name: Workflow lint (actionlint+zizmor, ratchet, blocking)
run: npm run check:workflows -- --ratchet
# 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.
# Pin comparison to the event's commits; missing tools/base/report fail closed.
- name: OpenAPI breaking-change (oasdiff, ratchet, blocking)
env:
BASE_REF: ${{ github.base_ref }}
run: npm run check:openapi-breaking -- --ratchet
docs-sync-strict:
@@ -506,10 +534,14 @@ 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@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # 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@v7
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
with:
package-manager-cache: false
node-version: ${{ env.CI_NODE_VERSION }}
@@ -517,7 +549,17 @@ 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).
@@ -546,15 +588,19 @@ 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.
- name: Base checkout for the i18n drift baseline (PR only)
if: ${{ github.event_name == 'pull_request' }}
uses: actions/checkout@v7
#
# 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
with:
ref: ${{ github.event.pull_request.base.sha }}
ref: ${{ github.event.pull_request.base.sha || needs.changes.outputs.candidateBase }}
path: .i18n-base
persist-credentials: false
- name: i18n docs drift (PR — advisory, mirrors are refreshed after merge)
if: ${{ github.event_name == 'pull_request' }}
- 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/') }}
run: |
set -euo pipefail
node scripts/i18n/check-translation-drift.mjs --root .i18n-base --json --warn > /tmp/i18n-base-drift.json
@@ -563,7 +609,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' }}
if: ${{ github.event_name != 'pull_request' && !startsWith(github.ref, 'refs/heads/omni-queue/') }}
run: node scripts/i18n/check-translation-drift.mjs
docs-lint:
@@ -578,10 +624,10 @@ jobs:
# existing doc corpus is brought up to style. Promote to blocking once it converges.
continue-on-error: true
steps:
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
- uses: actions/setup-node@v7
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
with:
package-manager-cache: false
node-version: ${{ env.CI_NODE_VERSION }}
@@ -590,7 +636,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@reviewdog
uses: errata-ai/vale-action@518a9136acc6e6668ce7c00d367051e0941e87ff # reviewdog
with:
files: docs
fail_on_error: false
@@ -605,15 +651,30 @@ 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@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
fetch-depth: 0
- uses: actions/setup-node@v7
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
with:
package-manager-cache: false
node-version: ${{ env.CI_NODE_VERSION }}
@@ -621,7 +682,13 @@ jobs:
with:
# PR acceleration is not release-candidate provenance.
cache: ${{ github.event_name == 'pull_request' }}
- run: node scripts/i18n/check-ui-keys-coverage.mjs --threshold=65
# 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.
- 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
@@ -629,12 +696,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
- name: i18n real-translation ratio (release mode)
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)
- name: i18n UI value drift (stale translations, release mode)
env:
BASE_REF: ${{ github.base_ref && format('origin/{0}', github.base_ref) || '' }}
run: node scripts/i18n/check-ui-value-drift.mjs
@@ -644,7 +711,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)
- name: i18n new-key coverage (a new key must reach every locale, release mode)
env:
BASE_REF: ${{ github.base_ref && format('origin/{0}', github.base_ref) || '' }}
run: node scripts/i18n/check-new-key-coverage.mjs
@@ -654,13 +721,14 @@ 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 is `sync-ui-keys --locale=<codes> --translate-markers`.
- name: i18n key completeness (every locale carries every en.json key)
# 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)
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)
- name: i18n key completeness (CLI catalogs; pr mode — changed catalogs)
run: node scripts/i18n/check-key-completeness.mjs --catalog=cli
# #8038: cheap glossary/protected-terms consistency gate —
@@ -674,10 +742,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@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
- uses: actions/setup-node@v7
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
with:
package-manager-cache: false
node-version: ${{ env.CI_NODE_VERSION }}
@@ -703,10 +771,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@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
- uses: actions/setup-python@v7
- uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7
with:
python-version: "3.12"
- name: Validate all languages
@@ -730,7 +798,7 @@ jobs:
exit "$FAIL"
- name: Upload results
if: always()
uses: actions/upload-artifact@v7
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
with:
name: i18n-results
path: i18n-results/
@@ -741,16 +809,28 @@ 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@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
fetch-depth: 0
- uses: actions/setup-node@v7
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # 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.
@@ -783,7 +863,8 @@ 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.
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' }}
# 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' }}
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
@@ -798,10 +879,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@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
- uses: actions/setup-node@v7
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
with:
package-manager-cache: false
node-version: ${{ env.CI_NODE_VERSION }}
@@ -824,7 +905,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') && '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' && !startsWith(github.ref, 'refs/heads/omni-queue/')) && '1' || '0' }}
- name: Verify colocated compression worker
run: node --import tsx/esm --test tests/integration/compression-worker-standalone.int.test.ts
env:
@@ -846,7 +927,7 @@ jobs:
--exclude='.build/next/cache' \
.build/next
- name: Upload Next.js build for downstream jobs
uses: actions/upload-artifact@v7
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
with:
name: next-build
path: ${{ runner.temp }}/e2e-build.tar.gz
@@ -863,10 +944,10 @@ jobs:
env:
JWT_SECRET: ci-build-secret-with-sufficient-length-for-validation
steps:
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
- uses: actions/setup-node@v7
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
with:
package-manager-cache: false
node-version: ${{ env.CI_NODE_VERSION }}
@@ -876,7 +957,7 @@ jobs:
cache: ${{ github.event_name == 'pull_request' }}
- run: npm run check:node-runtime
- name: Download Next.js build artifact
uses: actions/download-artifact@v8
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8
with:
name: next-build
# Workspace-relative on purpose: the matrix below includes windows-latest, whose
@@ -965,10 +1046,10 @@ jobs:
JWT_SECRET: ci-build-secret-with-sufficient-length-for-validation
CSC_IDENTITY_AUTO_DISCOVERY: "false"
steps:
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
- uses: actions/setup-node@v7
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
with:
package-manager-cache: false
node-version: ${{ env.CI_NODE_VERSION }}
@@ -978,7 +1059,7 @@ jobs:
cache: ${{ github.event_name == 'pull_request' }}
- run: npm run check:node-runtime
- name: Download Next.js build artifact
uses: actions/download-artifact@v8
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8
with:
name: next-build
# Workspace-relative on purpose: the matrix below includes windows-latest, whose
@@ -1025,8 +1106,12 @@ 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) && fromJSON('["self-hosted","omni-ci"]') || 'ubuntu-latest' }}
timeout-minutes: 25
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
# 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
@@ -1052,10 +1137,10 @@ jobs:
df -h /
sudo rm -rf /usr/share/dotnet /opt/ghc /usr/local/.ghcup
df -h /
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
- uses: actions/setup-node@v7
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
with:
package-manager-cache: false
node-version: ${{ env.CI_NODE_VERSION }}
@@ -1096,7 +1181,7 @@ jobs:
npm run test:unit:ci:shard
- name: Upload raw shard coverage
if: always()
uses: actions/upload-artifact@v7
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
with:
name: coverage-shard-${{ matrix.shard }}
path: coverage-shard/*.json
@@ -1117,10 +1202,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@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
- uses: actions/setup-node@v7
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
with:
package-manager-cache: false
node-version: ${{ env.CI_NODE_VERSION }}
@@ -1152,7 +1237,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) && 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 && !startsWith(github.head_ref, 'omni-queue/')) && fromJSON('["self-hosted","omni-ci"]') || 'ubuntu-latest' }}
timeout-minutes: 15
# needs: changes (not build) — no artifact consumed; see test-unit note.
needs: changes
@@ -1162,10 +1247,10 @@ jobs:
API_KEY_SECRET: ci-test-api-key-secret-long
DISABLE_SQLITE_AUTO_BACKUP: "true"
steps:
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
- uses: actions/setup-node@v7
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
with:
package-manager-cache: false
node-version: ${{ env.CI_NODE_VERSION }}
@@ -1185,7 +1270,9 @@ 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)
if: ${{ always() && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) }}
# 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) }}
continue-on-error: true
uses: trunk-io/analytics-uploader@a86313c7029d22e6ea2d5c346060a224d90053dc # v2.1.6
with:
@@ -1211,7 +1298,13 @@ 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.
timeout-minutes: 45
# 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 }}
needs: test-unit
if: ${{ !cancelled() && needs.test-unit.result == 'success' }}
env:
@@ -1226,10 +1319,10 @@ jobs:
df -h /
sudo rm -rf /usr/local/lib/android /usr/share/dotnet /opt/ghc /usr/local/.ghcup
df -h /
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
- uses: actions/setup-node@v7
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
with:
package-manager-cache: false
node-version: ${{ env.CI_NODE_VERSION }}
@@ -1238,7 +1331,7 @@ jobs:
# PR acceleration is not release-candidate provenance.
cache: ${{ github.event_name == 'pull_request' }}
- name: Download all shard coverage
uses: actions/download-artifact@v8
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8
with:
pattern: coverage-shard-*
path: coverage-shards/
@@ -1309,7 +1402,9 @@ 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).
if: ${{ always() && github.event_name != 'pull_request' }}
# 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/') }}
# 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
@@ -1326,7 +1421,7 @@ jobs:
fail_ci_if_error: false
- name: Upload coverage artifacts
if: always()
uses: actions/upload-artifact@v7
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
with:
name: coverage-report
path: |
@@ -1342,12 +1437,13 @@ 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.
if: ${{ vars.SONARQUBE_ENABLED == 'true' && !cancelled() && needs.test-coverage.result == 'success' }}
# 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/') }}
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
steps:
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
fetch-depth: 0
@@ -1355,7 +1451,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@v8
- uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8
with:
name: coverage-report
path: coverage/
@@ -1379,7 +1475,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@v8
uses: SonarSource/sonarqube-scan-action@e805d875275f728fac1885b413934be6d7c63f65 # v8
env:
SONAR_TOKEN: ${{ env.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ env.SONAR_HOST_URL }}
@@ -1406,7 +1502,7 @@ jobs:
- name: Download coverage artifact
if: ${{ needs.test-coverage.result != 'cancelled' }}
continue-on-error: true
uses: actions/download-artifact@v8
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8
with:
name: coverage-report
path: .
@@ -1435,7 +1531,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@v9
- uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9
with:
script: |
const fs = require("fs");
@@ -1494,10 +1590,10 @@ jobs:
DISABLE_SQLITE_AUTO_BACKUP: "true"
OMNIROUTE_PLAYWRIGHT_SKIP_BUILD: "1"
steps:
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
- uses: actions/setup-node@v7
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
with:
package-manager-cache: false
node-version: ${{ env.CI_NODE_VERSION }}
@@ -1515,7 +1611,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@v8
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8
with:
name: next-build
# Workspace-relative on purpose: the matrix below includes windows-latest, whose
@@ -1547,7 +1643,9 @@ jobs:
fi
# WS5.2/5.3: Trunk Flaky Tests upload — advisory, own-origin only, SHA-pinned.
- name: Upload test results to Trunk (advisory)
if: ${{ always() && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) }}
# 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) }}
continue-on-error: true
uses: trunk-io/analytics-uploader@a86313c7029d22e6ea2d5c346060a224d90053dc # v2.1.6
with:
@@ -1576,10 +1674,10 @@ jobs:
DATA_DIR: /tmp/omniroute-ci-${{ matrix.shard }}
DISABLE_SQLITE_AUTO_BACKUP: "true"
steps:
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
- uses: actions/setup-node@v7
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
with:
package-manager-cache: false
node-version: ${{ env.CI_NODE_VERSION }}
@@ -1604,10 +1702,10 @@ jobs:
API_KEY_SECRET: ci-test-api-key-secret-long
DISABLE_SQLITE_AUTO_BACKUP: "true"
steps:
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
- uses: actions/setup-node@v7
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
with:
package-manager-cache: false
node-version: ${{ env.CI_NODE_VERSION }}
@@ -1638,10 +1736,10 @@ jobs:
API_KEY_SECRET: ci-test-api-key-secret-long
DISABLE_SQLITE_AUTO_BACKUP: "true"
steps:
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
- uses: actions/setup-node@v7
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
with:
package-manager-cache: false
node-version: ${{ env.CI_NODE_VERSION }}
@@ -1673,10 +1771,10 @@ jobs:
API_KEY_SECRET: ci-test-api-key-secret-long
DISABLE_SQLITE_AUTO_BACKUP: "true"
steps:
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
- uses: actions/setup-node@v7
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
with:
package-manager-cache: false
node-version: ${{ env.CI_NODE_VERSION }}
@@ -1688,13 +1786,11 @@ jobs:
- run: npm run test:protocols:e2e
admission-verdict:
# 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) }}
# 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') }}
runs-on: ubuntu-latest
timeout-minutes: 5
needs:
@@ -1771,7 +1867,7 @@ jobs:
steps:
- name: Download i18n results
continue-on-error: true
uses: actions/download-artifact@v8
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8
with:
pattern: i18n-*
path: results

View File

@@ -30,14 +30,14 @@ jobs:
actions: read # Required for Claude to read CI results on PRs
steps:
- name: Checkout repository
uses: actions/checkout@v7
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
fetch-depth: 1
- name: Run Claude Code
id: claude
uses: anthropics/claude-code-action@v1
uses: anthropics/claude-code-action@61a9c274fa7110a66dfafc1bbbced03833eb25fe # v1
with:
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}

View File

@@ -12,8 +12,15 @@ permissions:
jobs:
deploy:
if: >-
(github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success')
(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'))))
&& 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
@@ -45,7 +52,7 @@ jobs:
- name: Deploy via SSH
if: steps.reach.outputs.reachable == 'true'
uses: appleboy/ssh-action@v1
uses: appleboy/ssh-action@0ff4204d59e8e51228ff73bce53f80d53301dee2 # v1
with:
host: ${{ secrets.VPS_HOST }}
username: ${{ secrets.VPS_USER }}

85
.github/workflows/docker-org-mirror.yml vendored Normal file
View File

@@ -0,0 +1,85 @@
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

View File

@@ -82,7 +82,7 @@ jobs:
GHCR_IMAGE_NAME: ghcr.io/cheaper-inference/omniroute
steps:
- name: Checkout
uses: actions/checkout@v7
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # 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@v4
uses: docker/setup-buildx-action@f87e5991a6d7451dcb8d9637bfbc97413f497069 # v4
- name: Login to GitHub Container Registry
uses: docker/login-action@v4.7.0
uses: docker/login-action@81c6f93d4bc991e510b342a00b419b3bb4efc5c6 # 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@v7
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # 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@v4
uses: docker/setup-buildx-action@f87e5991a6d7451dcb8d9637bfbc97413f497069 # v4
- name: Login to Docker Hub
uses: docker/login-action@v4.7.0
uses: docker/login-action@81c6f93d4bc991e510b342a00b419b3bb4efc5c6 # v4.7.0
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v4.7.0
uses: docker/login-action@81c6f93d4bc991e510b342a00b419b3bb4efc5c6 # 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@v7
uses: docker/build-push-action@c3c9e263c25d99ce0380d002d59b67737d91b0dc # 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@v7
uses: docker/build-push-action@c3c9e263c25d99ce0380d002d59b67737d91b0dc # 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@v7
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # 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@v7
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # 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@v7
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # 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@v4
uses: docker/setup-buildx-action@f87e5991a6d7451dcb8d9637bfbc97413f497069 # v4
- name: Login to Docker Hub
uses: docker/login-action@v4.7.0
uses: docker/login-action@81c6f93d4bc991e510b342a00b419b3bb4efc5c6 # v4.7.0
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v4.7.0
uses: docker/login-action@81c6f93d4bc991e510b342a00b419b3bb4efc5c6 # v4.7.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Download base digests
uses: actions/download-artifact@v8
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8
with:
pattern: digests-base-*
path: /tmp/digests/base
merge-multiple: true
- name: Download web digests
uses: actions/download-artifact@v8
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # 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@v0
uses: anchore/sbom-action@e22c389904149dbc22b58101806040fa8d37a610 # 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@v4.39.3
uses: github/codeql-action/upload-sarif@33d7b85da1a04171e211befe2c739303b9a4c066 # 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@v5
uses: peter-evans/dockerhub-description@1b9a80c056b620d92cedb9d9b5a223409c68ddfa # v5
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
@@ -897,6 +897,30 @@ 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

View File

@@ -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 the npm cache on the default branch as
# CodeQL flags an input-controlled checkout next to a dependency 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@v7
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
fetch-depth: 0
@@ -83,13 +83,14 @@ 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@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
- name: Setup Node
uses: actions/setup-node@v7
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
with:
node-version: 24
package-manager-cache: false
- name: Install dependencies
run: npm ci
@@ -156,7 +157,7 @@ jobs:
run: node scripts/build/standaloneBundle.mjs pack --out web-bundle.tar.gz
- name: Upload shared web bundle
uses: actions/upload-artifact@v7
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
with:
name: web-standalone-bundle
# compression-level 0: the payload is already a deterministic tar.gz;
@@ -212,14 +213,14 @@ jobs:
arch: x64,arm64
steps:
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
- name: Setup Node
uses: actions/setup-node@v7
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
with:
node-version: 24
cache: npm
package-manager-cache: false
- name: Install dependencies
run: npm ci
@@ -279,7 +280,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@v8
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8
with:
name: web-standalone-bundle
@@ -397,7 +398,7 @@ jobs:
.build/optional-packs release-assets
- name: Upload artifacts
uses: actions/upload-artifact@v7
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
with:
name: electron-${{ matrix.platform }}
path: release-assets/
@@ -420,7 +421,7 @@ jobs:
contents: write # softprops/action-gh-release creates the GitHub Release
steps:
- name: Checkout
uses: actions/checkout@v7
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
fetch-depth: 0
@@ -434,7 +435,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@v8
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8
with:
path: artifacts
@@ -476,7 +477,7 @@ jobs:
run: ls -la release-assets/
- name: Create Release
uses: softprops/action-gh-release@v3
uses: softprops/action-gh-release@8a0cd651e5b2365bd640854a3fa5dfc70e4875f3 # v3
with:
tag_name: ${{ needs.validate.outputs.version }}
draft: false

View File

@@ -11,7 +11,10 @@ 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;
# 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;
# 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;
@@ -139,22 +142,40 @@ 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.files != ''
if: steps.drift.outputs.refresh == 'true'
with:
package-manager-cache: false
node-version: "24"
- uses: ./.github/actions/npm-ci-retry
if: steps.drift.outputs.files != ''
if: steps.drift.outputs.refresh == 'true'
env:
ONNXRUNTIME_NODE_INSTALL: "skip"
@@ -212,12 +233,17 @@ 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.files != ''
if: steps.drift.outputs.refresh == 'true'
run: |
set -uo pipefail
FAILED=0
npm run check:docs-all 2>&1 | tee "$RUNNER_TEMP/docs-all.log"
# 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"
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.
@@ -256,7 +282,7 @@ jobs:
exit "$FAILED"
- name: Commit and open or update the refresh PR
if: steps.drift.outputs.files != ''
if: steps.drift.outputs.refresh == 'true'
env:
GH_TOKEN: ${{ secrets.I18N_REFRESH_TOKEN || github.token }}
REPO: ${{ github.repository }}
@@ -264,9 +290,12 @@ 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"
@@ -287,7 +316,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}. Sources: ${FILES//,/, }. ${COUNT} mirror file(s).${NOTE}" \
-m "Engine: ${ENGINE:-none}. Sources: ${SOURCES//,/, }. ${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
@@ -299,7 +328,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: \`${FILES//,/\`, \`}\`"
echo "- Drifted sources: \`${SOURCES//,/\`, \`}\`"
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."

View File

@@ -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.json (disableBail:true, incremental:false)
# chatCore leaf batches with stryker.disablebail.mjs (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@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
- uses: actions/setup-node@v7
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # 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.json --mutate "$BATCH_MUTATE"
run: npx stryker run --config-file stryker.disablebail.mjs --mutate "$BATCH_MUTATE"
- name: Upload mutation report
if: always()
uses: actions/upload-artifact@v7
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
with:
name: mutation-nobail-${{ matrix.batch.name }}
path: reports/mutation/

View File

@@ -19,7 +19,6 @@ on:
permissions:
contents: read
issues: write
concurrency:
group: nightly-compat
@@ -33,7 +32,7 @@ jobs:
outputs:
target: ${{ steps.branch.outputs.target }}
steps:
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
fetch-depth: 0
persist-credentials: false
@@ -64,11 +63,11 @@ jobs:
timeout-minutes: 25
needs: resolve-branch
steps:
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
ref: ${{ needs.resolve-branch.outputs.target }}
persist-credentials: false
- uses: actions/setup-node@v7
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
with:
node-version: "26"
cache: npm
@@ -105,11 +104,11 @@ jobs:
DISABLE_SQLITE_AUTO_BACKUP: "true"
TEST_SHARD: ${{ matrix.shard }}/4
steps:
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
ref: ${{ needs.resolve-branch.outputs.target }}
persist-credentials: false
- uses: actions/setup-node@v7
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
with:
node-version: ${{ matrix.node }}
cache: npm

View File

@@ -0,0 +1,216 @@
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

View File

@@ -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@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
- uses: actions/setup-node@v7
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # 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@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
if: steps.gate.outputs.run == 'true'
- uses: actions/setup-node@v7
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # 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@v7
- uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7
if: steps.gate.outputs.run == 'true'
with: { python-version: "3.12" }
- run: pip install garak

View File

@@ -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.json `mutate`.
# removed from stryker.conf.mjs `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
# _mutate_godfiles_excluded_comment in stryker.conf.json.
# the comment above MUTATE in stryker.conf.mjs.
# 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 _concurrency_comment in stryker.conf.json.
# (tests/_setup/isolateDataDir.ts) — see the concurrency comment in stryker.conf.mjs.
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@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
- uses: actions/setup-node@v7
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # 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@v7
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # 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@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
- uses: actions/setup-node@v7
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
with:
node-version: "24"
- name: Download all mutation reports
uses: actions/download-artifact@v8
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8
with:
pattern: mutation-report-*
path: reports/all

View File

@@ -11,10 +11,10 @@ jobs:
if: ${{ github.event_name != 'schedule' || github.repository == 'cheaper-inference/OmniRoute' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
- uses: actions/setup-node@v7
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # 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@v9
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9
with:
script: |
await github.rest.issues.create({

View File

@@ -134,12 +134,16 @@ 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@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
ref: ${{ needs.resolve-target.outputs.sha }}
persist-credentials: false
- uses: actions/setup-node@v7
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
with:
node-version: ${{ needs.resolve-target.outputs.node-version }}
cache: npm
@@ -170,7 +174,7 @@ jobs:
exit "$code"
- name: Upload the suite result
if: always()
uses: actions/upload-artifact@v7
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
with:
name: release-green-suite-${{ github.run_attempt }}-${{ matrix.name }}
path: suite-results/
@@ -201,7 +205,7 @@ jobs:
API_KEY_SECRET: ci-nightly-api-key-secret-long
DISABLE_SQLITE_AUTO_BACKUP: "true"
steps:
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
fetch-depth: 0
persist-credentials: false
@@ -261,7 +265,7 @@ jobs:
id: revision
run: echo "sha=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT"
- uses: actions/setup-node@v7
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
with:
node-version: ${{ needs.resolve-target.outputs.node-version || '24' }}
cache: npm
@@ -271,7 +275,7 @@ jobs:
- name: Collect the hosted suite results
if: github.event_name != 'push'
continue-on-error: true
uses: actions/download-artifact@v8
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # 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.
@@ -407,7 +411,7 @@ jobs:
- name: Upload report artifact
if: always()
continue-on-error: true
uses: actions/upload-artifact@v7
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
with:
name: release-green-report
path: |
@@ -473,12 +477,16 @@ 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@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
ref: ${{ needs.resolve-main.outputs.sha }}
persist-credentials: false
- uses: actions/setup-node@v7
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
with:
node-version: ${{ needs.resolve-target.outputs.node-version }}
cache: npm
@@ -509,7 +517,7 @@ jobs:
exit "$code"
- name: Upload the suite result
if: always()
uses: actions/upload-artifact@v7
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
with:
name: main-green-suite-${{ github.run_attempt }}-${{ matrix.name }}
path: suite-results/
@@ -546,7 +554,7 @@ jobs:
API_KEY_SECRET: ci-nightly-api-key-secret-long
DISABLE_SQLITE_AUTO_BACKUP: "true"
steps:
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
ref: ${{ github.event_name == 'push' && github.sha || needs.resolve-main.outputs.sha || 'main' }}
fetch-depth: 0
@@ -557,7 +565,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@v7
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
with:
node-version: ${{ needs.resolve-target.outputs.node-version || '24' }}
cache: npm
@@ -567,7 +575,7 @@ jobs:
- name: Collect the hosted suite results
if: github.event_name != 'push'
continue-on-error: true
uses: actions/download-artifact@v8
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # 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.
@@ -683,7 +691,7 @@ jobs:
- name: Upload report artifact
if: always()
continue-on-error: true
uses: actions/upload-artifact@v7
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
with:
name: main-green-report
path: |
@@ -733,7 +741,7 @@ jobs:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
fetch-depth: 0
@@ -768,7 +776,7 @@ jobs:
git checkout "$TARGET"
git log -1 --oneline
- uses: actions/setup-node@v7
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
with:
node-version: "24"
cache: npm
@@ -864,12 +872,12 @@ jobs:
permissions:
contents: read
steps:
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
fetch-depth: 1
persist-credentials: false
- uses: actions/setup-node@v7
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
with:
node-version: "24"
cache: npm
@@ -885,7 +893,7 @@ jobs:
- name: Upload headroom report
if: always()
uses: actions/upload-artifact@v7
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
with:
name: baseline-headroom-${{ github.run_id }}
path: reports/quality/headroom.*

View File

@@ -13,10 +13,10 @@ jobs:
name: Heap-growth gate
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
- uses: actions/setup-node@v7
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # 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@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
- uses: actions/setup-node@v7
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # 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@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
- uses: actions/setup-node@v7
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # 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@v1
uses: grafana/setup-k6-action@43b9fc21641a76002687994433dd586f56e791b1 # 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@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
- uses: actions/setup-node@v7
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
with:
node-version: "24"
cache: npm
@@ -228,7 +228,7 @@ jobs:
env:
ONNXRUNTIME_NODE_INSTALL: "skip"
- name: Cache Playwright browsers
uses: actions/cache@v6.1.0
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: ~/.cache/ms-playwright
key: playwright-chromium-${{ runner.os }}-${{ hashFiles('package-lock.json') }}

View File

@@ -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@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
- uses: actions/setup-node@v7
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # 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@v7
- uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # 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@v7
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
with:
name: schemathesis-report
path: |

View File

@@ -77,7 +77,7 @@ jobs:
packages: write # publish to npm.pkg.github.com
steps:
- name: Checkout
uses: actions/checkout@v7
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
# Need full tag history to compare against highest semver when
@@ -85,10 +85,11 @@ jobs:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v7
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # 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
@@ -268,7 +269,7 @@ jobs:
- name: Upload SBOM (npm) as workflow artifact
if: steps.resolve.outputs.skip != 'true'
uses: actions/upload-artifact@v7
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
with:
name: sbom-npm
path: sbom-npm.cdx.json
@@ -354,7 +355,7 @@ jobs:
- name: Hand the tarball to the hosted publish job
if: steps.resolve.outputs.skip != 'true'
uses: actions/upload-artifact@v7
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
with:
name: npm-tarball
path: omniroute-${{ steps.resolve.outputs.version }}.tgz
@@ -396,16 +397,17 @@ 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@v8
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8
with:
name: npm-tarball
path: .
- name: Setup Node.js
uses: actions/setup-node@v7
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # 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: |
@@ -494,17 +496,18 @@ jobs:
id-token: write # npm provenance
steps:
- name: Checkout
uses: actions/checkout@v7
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # 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@v7
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # 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
@@ -534,8 +537,10 @@ jobs:
exit 0
fi
# 3) Check if plugin dir actually changed since that tag
if git diff --quiet "$PREV_TAG" -- "@omniroute/opencode-plugin/"; then
# 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
echo "⏭️ No plugin changes since $PREV_TAG — nothing to publish."
echo "bumped=false" >> "$GITHUB_OUTPUT"
exit 0
@@ -583,17 +588,18 @@ jobs:
id-token: write # npm provenance
steps:
- name: Checkout
uses: actions/checkout@v7
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # 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@v7
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # 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
@@ -623,8 +629,10 @@ jobs:
exit 0
fi
# 3) Check if plugin-v2 dir actually changed since that tag
if git diff --quiet "$PREV_TAG" -- "@omniroute/opencode-plugin-v2/"; then
# 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
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 Normal file
View File

@@ -0,0 +1,262 @@
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[@]}"

View File

@@ -6,11 +6,13 @@ 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:
@@ -32,17 +34,16 @@ jobs:
strategy:
fail-fast: false
matrix:
node: ["22", "24"]
node: ["22.23.4", "24.22.1"]
steps:
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
- uses: actions/setup-node@v7
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
with:
node-version: ${{ matrix.node }}
cache: npm
cache-dependency-path: "@omniroute/opencode-plugin/package-lock.json"
- run: npm install --no-audit --no-fund
package-manager-cache: false
- run: npm ci --no-audit --no-fund
- run: npm run build
- run: npm test
@@ -52,19 +53,18 @@ jobs:
strategy:
fail-fast: false
matrix:
node: ["22", "24"]
node: ["22.23.4", "24.22.1"]
defaults:
run:
working-directory: "@omniroute/opencode-plugin-v2"
steps:
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
- uses: actions/setup-node@v7
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
with:
node-version: ${{ matrix.node }}
cache: npm
cache-dependency-path: "@omniroute/opencode-plugin-v2/package-lock.json"
package-manager-cache: false
- run: npm ci --no-audit --no-fund
- run: npm run build
- run: npm test
@@ -74,16 +74,17 @@ jobs:
runs-on: ubuntu-latest
needs: [test, test-v2]
steps:
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
- uses: actions/setup-node@v7
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
with:
node-version: "22"
node-version: "24.22.1"
package-manager-cache: false
- 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@v7
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
with:
name: opencode-plugin-v2-dist
path: "@omniroute/opencode-plugin-v2/dist"

View File

@@ -2,13 +2,15 @@ name: opencode-provider CI
on:
push:
branches: [main, release/v3.8.0]
branches: [main, "release/**"]
paths:
- "@omniroute/opencode-provider/**"
- ".github/workflows/opencode-provider-ci.yml"
pull_request:
branches: [main, release/v3.8.0]
branches: [main, "release/**"]
paths:
- "@omniroute/opencode-provider/**"
- ".github/workflows/opencode-provider-ci.yml"
types: [opened, synchronize, reopened, ready_for_review]
workflow_dispatch:
@@ -30,16 +32,15 @@ jobs:
strategy:
fail-fast: false
matrix:
node: ["20", "22", "24"]
node: ["22.23.4", "24.22.1"]
steps:
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
- uses: actions/setup-node@v7
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
with:
node-version: ${{ matrix.node }}
cache: npm
cache-dependency-path: "@omniroute/opencode-provider/package-lock.json"
package-manager-cache: false
- run: npm ci
- run: npm test
@@ -48,17 +49,16 @@ jobs:
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
- uses: actions/setup-node@v7
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
with:
node-version: "20"
cache: npm
cache-dependency-path: "@omniroute/opencode-provider/package-lock.json"
node-version: "24.22.1"
package-manager-cache: false
- run: npm ci
- run: npm run build
- uses: actions/upload-artifact@v7
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
with:
name: opencode-provider-dist
path: "@omniroute/opencode-provider/dist"

View File

@@ -5,7 +5,9 @@ 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.
branches: [main]
# omni-queue/** (2026-11-13): omni-queue merge-queue candidates run the full profile, like
# merge_group (see ci.yml).
branches: [main, "omni-queue/**"]
pull_request:
branches: [main, "release/**"]
types: [opened, synchronize, reopened, ready_for_review, converted_to_draft, edited]
@@ -39,6 +41,17 @@ 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 }}
@@ -46,20 +59,30 @@ 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@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
fetch-depth: 0
- uses: actions/setup-node@v7
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # 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: ${{ github.event.pull_request.base.sha || github.event.merge_group.base_sha || github.event.before }}
BASE_SHA: ${{ steps.candidate.outputs.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:
@@ -91,10 +114,14 @@ 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@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # 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@v7
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
with:
package-manager-cache: false
node-version: ${{ env.CI_NODE_VERSION }}
@@ -104,7 +131,15 @@ 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:
@@ -137,11 +172,11 @@ jobs:
API_KEY_SECRET: ci-lint-api-key-secret-long
DISABLE_SQLITE_AUTO_BACKUP: "true"
steps:
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
fetch-depth: 0
persist-credentials: false
- uses: actions/setup-node@v7
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
with:
package-manager-cache: false
node-version: ${{ env.CI_NODE_VERSION }}
@@ -204,7 +239,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 }}
GITHUB_BASE_SHA: ${{ github.event.pull_request.base.sha || needs.changes.outputs.candidateBase }}
run: |
node scripts/quality/build-test-impact-map.mjs
node scripts/check/check-forgotten-sibling-tests.mjs \
@@ -213,7 +248,7 @@ jobs:
cat forgotten-sibling-tests.md >> "$GITHUB_STEP_SUMMARY"
- name: Upload forgotten sibling report
if: always()
uses: actions/upload-artifact@v7
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
with:
name: forgotten-sibling-tests
path: |
@@ -232,7 +267,10 @@ 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.
PR_BASE_SHA: ${{ github.event.pull_request.base.sha }}
# 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.
BASE_REF: ${{ github.base_ref && format('origin/{0}', github.base_ref) || '' }}
run: |
set -uo pipefail
@@ -302,8 +340,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). PR-only: the base-relative
# comparison needs the PR base SHA (empty on workflow_dispatch).
# 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).
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")
@@ -344,7 +382,21 @@ 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
@@ -395,7 +447,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@v7
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
with:
name: tia-selection
path: tia-selection.txt
@@ -416,7 +468,8 @@ 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') }}
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' }}
# 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' }}
# 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.
@@ -427,10 +480,10 @@ jobs:
contents: read
security-events: read
steps:
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
- uses: actions/setup-node@v7
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
with:
package-manager-cache: false
node-version: ${{ env.CI_NODE_VERSION }}
@@ -511,19 +564,25 @@ 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:
# 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) }}
# 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') }}
runs-on: ubuntu-latest
timeout-minutes: 5
needs:

View File

@@ -44,10 +44,10 @@ jobs:
permissions:
contents: write # gh release upload — clobra o asset estável do export
steps:
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false # publish usa GH_TOKEN via gh release, não a credencial do checkout
- uses: actions/setup-node@v7
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
with:
node-version: ${{ env.CI_NODE_VERSION }}
cache: npm

View File

@@ -18,10 +18,10 @@ jobs:
if: github.event_name != 'pull_request'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5
with:
persist-credentials: false
- uses: actions/setup-node@v7
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # 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@v4
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
if: always()
with:
name: release-acceptance-report

View File

@@ -33,19 +33,19 @@ jobs:
contents: read
steps:
- name: Checkout
uses: actions/checkout@v7
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
- name: Run analysis
uses: ossf/scorecard-action@v2.5.0
uses: ossf/scorecard-action@fa7117db83c52d787ae5a89f350999701505d78e # v2.5.0
with:
results_file: results.sarif
results_format: sarif
publish_results: true
- name: Upload artifact
uses: actions/upload-artifact@v7
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
with:
name: SARIF file
path: results.sarif

View File

@@ -16,7 +16,7 @@ jobs:
semgrep:
runs-on: ubuntu-latest
container:
image: semgrep/semgrep
image: semgrep/semgrep@sha256:3db5c7af55eb1f512eac0abf0ab69a97b52c74b5e9a27314c221aee1a78d7ab2 # latest resolved 2026-10-25
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:

View File

@@ -19,10 +19,10 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
- uses: actions/setup-node@v7
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # 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@v7
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
with:
name: quarantine-${{ github.sha }}-${{ github.run_attempt }}
path: .artifacts/quarantine/

View File

@@ -37,10 +37,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v7
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
- name: Setup Node
uses: actions/setup-node@v7
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
with:
node-version: "24"

View File

@@ -13,7 +13,8 @@ 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
node scripts/check/check-docs-sync.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
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

View File

@@ -58,47 +58,34 @@
# per-rule entry with a justification comment.
rules:
dangerous-triggers:
# 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).
# 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).
ignore:
- deploy-vps.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
- omni-queue.yml

View File

@@ -119,6 +119,16 @@ 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
@@ -132,6 +142,7 @@ 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);
@@ -169,6 +180,7 @@ 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);
@@ -197,6 +209,7 @@ 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;
}

View File

@@ -1010,3 +1010,66 @@ 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"));
});
});

View File

@@ -1,12 +1,12 @@
{
"name": "@omniroute/opencode-plugin",
"version": "0.2.1",
"version": "0.2.2",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@omniroute/opencode-plugin",
"version": "0.2.1",
"version": "0.2.2",
"license": "MIT",
"dependencies": {
"zod": "^4.6.7"

View File

@@ -1,6 +1,6 @@
{
"name": "@omniroute/opencode-plugin",
"version": "0.2.1",
"version": "0.2.2",
"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",

View File

@@ -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, 393 LLM providers, auto-fallback.
**OmniRoute** — unified AI proxy/router. One endpoint, hundreds of 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,14 +37,15 @@ 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, 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)
- 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)
- 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
@@ -63,7 +64,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`): 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`.
**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`.
---
@@ -176,6 +177,9 @@ 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`).
---
@@ -200,7 +204,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 (16-factor scoring, 21 strategies) — `docs/routing/AUTO-COMBO.md` · Reasoning replay — `docs/routing/REASONING_REPLAY.md`
- Auto-Combo (scoring factors, strategy table) — `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`
@@ -360,8 +364,12 @@ 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`. Update via
`npm run quality:ratchet -- --update` when a metric genuinely improves.
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".
- 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".
@@ -384,7 +392,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). Update the baseline via `npm run quality:ratchet -- --update` only when coverage genuinely improves. 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). The baseline is tightened with `npm run quality:ratchet -- --update` at release, never inside a feature PR. 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`.

View File

@@ -90,6 +90,10 @@
- **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
---

View File

@@ -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, 21 routing strategies
│ ├── constants/ # Provider definitions (329), MCP scopes, 22 routing strategies
│ ├── utils/ # Circuit breaker, sanitizer, auth helpers
│ └── validation/ # Zod v4 schemas
└── sse/ # SSE proxy pipeline

View File

@@ -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 → 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."/>
<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."/>
</div>
@@ -39,7 +39,7 @@
</h3>
[![Stars](https://img.shields.io/github/stars/diegosouzapw/OmniRoute?style=social)](https://github.com/diegosouzapw/OmniRoute)
[![Stars](https://img.shields.io/github/stars/diegosouzapw/OmniRoute?style=flat&logo=github&logoColor=white&label=Stars&color=e5ac82&labelColor=20211c)](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>
[![Star History Rank](https://api.star-history.com/badge?repo=diegosouzapw/OmniRoute&theme=dark)](https://www.star-history.com/diegosouzapw/omniroute)
[![olud.ai](https://olud.ai/badge.php?tool=diegosouzapw-omniroute)](https://olud.ai/project/diegosouzapw-omniroute.html)
@@ -48,14 +48,14 @@
**👋 Follow the maintainer — get new providers, releases & tips first:**
[![Follow Diego on LinkedIn](https://img.shields.io/badge/Follow_Diego_on-LinkedIn-0A66C2?style=for-the-badge&logo=linkedin&logoColor=white)](https://www.linkedin.com/in/diegosouzapw/)
[![Follow @diegosouzapw on GitHub](https://img.shields.io/github/followers/diegosouzapw?style=for-the-badge&logo=github&logoColor=white&label=Follow%20on%20GitHub&color=181717)](https://github.com/diegosouzapw)
[![Follow Diego on LinkedIn](https://img.shields.io/badge/Follow_Diego_on-LinkedIn-0A66C2?style=for-the-badge&logo=linkedin&logoColor=white&color=e5ac82&labelColor=20211c)](https://www.linkedin.com/in/diegosouzapw/)
[![Follow @diegosouzapw on GitHub](https://img.shields.io/github/followers/diegosouzapw?style=for-the-badge&logo=github&logoColor=white&label=Follow%20on%20GitHub&color=e5ac82&labelColor=20211c)](https://github.com/diegosouzapw)
[![Discord](https://img.shields.io/badge/Discord-5865F2?style=for-the-badge&logo=discord&logoColor=white)](https://discord.gg/U47eFqAXCn)
[![Telegram](https://img.shields.io/badge/Telegram-26A5E4?style=for-the-badge&logo=telegram&logoColor=white)](https://t.me/omnirouteOficial)
[![WhatsApp Global](https://img.shields.io/badge/WhatsApp_Global-25D366?style=for-the-badge&logo=whatsapp&logoColor=white)](https://chat.whatsapp.com/FvuCbrpZmQ6I85n2vW5QIC?s=cl&p=a&mlu=4)
[![WhatsApp Brasil](https://img.shields.io/badge/WhatsApp_Brasil-25D366?style=for-the-badge&logo=whatsapp&logoColor=white)](https://chat.whatsapp.com/KWgatljAjmbELQory59Oti?s=cl&p=a&mlu=4)
[![Website](https://img.shields.io/badge/Website-omniroute.online-blue?logo=google-chrome&logoColor=white)](https://omniroute.online)
[![Discord](https://img.shields.io/badge/Discord-5865F2?style=for-the-badge&logo=discord&logoColor=white&color=e5ac82&labelColor=20211c)](https://discord.gg/U47eFqAXCn)
[![Telegram](https://img.shields.io/badge/Telegram-26A5E4?style=for-the-badge&logo=telegram&logoColor=white&color=e5ac82&labelColor=20211c)](https://t.me/omnirouteOficial)
[![WhatsApp Global](https://img.shields.io/badge/WhatsApp_Global-25D366?style=for-the-badge&logo=whatsapp&logoColor=white&color=e5ac82&labelColor=20211c)](https://chat.whatsapp.com/FvuCbrpZmQ6I85n2vW5QIC?s=cl&p=a&mlu=4)
[![WhatsApp Brasil](https://img.shields.io/badge/WhatsApp_Brasil-25D366?style=for-the-badge&logo=whatsapp&logoColor=white&color=e5ac82&labelColor=20211c)](https://chat.whatsapp.com/KWgatljAjmbELQory59Oti?s=cl&p=a&mlu=4)
[![Website](https://img.shields.io/badge/Website-omniroute.online-blue?logo=google-chrome&logoColor=white&color=e5ac82&labelColor=20211c)](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.54+` |
| | v3.8.50 | **v3.8.51** | `v3.8.55+` |
| ------------------------- | :-----------------------: | :---------: | :-------------------: |
| 🌐 Providers | 352 | **358** | 393 |
| 🌐 Providers | 352 | **358** | 394 |
| 🧠 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="#-393-ai-providers--153-catalog-marked-free">🌐 Providers</a></td>
<td align="center"><a href="#-394-ai-providers--153-catalog-marked-free">🌐 Providers</a></td>
<td align="center"><a href="#-full-cli--a2a--mcp">🔌 CLI &amp; 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 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."/>
<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."/>
<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, 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."/>
<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."/>
</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 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."/>
<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."/>
> 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 — 21 routing strategies
### 🔀 Or build your own — 22 routing strategies
All **21** strategies — mix & match per combo step:
All **22** strategies — mix & match per combo step:
<table>
<tr>
@@ -489,6 +489,11 @@ All **21** 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>
@@ -509,7 +514,7 @@ All **21** 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: 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."/>
<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."/>
<sub>📊 Full methodology &amp; per-feature detail vs 9router, OpenRouter, CLIProxyAPI &amp; LiteLLM → [`docs/comparison/OMNIROUTE_VS_ALTERNATIVES.md`](docs/comparison/OMNIROUTE_VS_ALTERNATIVES.md)</sub>
@@ -588,7 +593,7 @@ the current catalog at **[radar.omniroute.online/planos](https://radar.omniroute
</div>
> Recent highlights from **v3.8.20 → v3.8.54**. Full history in [`CHANGELOG.md`](CHANGELOG.md).
> Recent highlights from **v3.8.20 → v3.8.55**. 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)
@@ -613,7 +618,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 **393-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 **394-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)
@@ -697,11 +702,11 @@ of your shell history. → [CLI Integrations](docs/guides/CLI-INTEGRATIONS.md)
<div align="center">
## 🌐 393 AI Providers — 153 Catalog-Marked Free
## 🌐 394 AI Providers — 153 Catalog-Marked Free
</div>
> **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).
> **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).
<div align="center">
@@ -924,7 +929,9 @@ Expose OmniRoute over **MCP**, **A2A**, a **REST API**, **webhooks** or a **remo
```bash
# Give Claude Code the full OmniRoute toolset over MCP:
claude mcp add-server omniroute --type http --url http://localhost:20128/api/mcp/stream
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>"
```
<sub>📖 [MCP Server](docs/frameworks/MCP-SERVER.md) · [A2A Server](docs/frameworks/A2A-SERVER.md) · [Agent Protocols](docs/frameworks/AGENT_PROTOCOLS_GUIDE.md)</sub>
@@ -1036,7 +1043,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.54:
> **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:
>
> ```bash
> npm install -g --allow-scripts=omniroute,keytar,onnxruntime-node,@parcel/watcher,@swc/core,protobufjs,esbuild omniroute
@@ -1318,7 +1325,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>&gt;=22.22.2 &lt;23 || &gt;=24.0.0 &lt;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, 236 migrations</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>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>
@@ -1831,7 +1838,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.54 · 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.55 · Node ≥22.22.2 · MIT License · <a href="https://omniroute.online">omniroute.online</a></sub>
</div>
<!-- GitHub Discussions enabled for community Q&A -->

View File

@@ -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/diegosouzapw/OmniRoute/security/advisories/new)
2. Use [GitHub Security Advisories](https://github.com/cheaper-inference/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/diegosouzapw/OmniRoute/security/advisories/new),
a private [GitHub Security Advisory](https://github.com/cheaper-inference/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

View File

@@ -99,16 +99,29 @@ 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) {

View File

@@ -0,0 +1 @@
- **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

View File

@@ -0,0 +1 @@
- **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

View File

@@ -0,0 +1 @@
- 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)

View File

@@ -0,0 +1 @@
- **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

View File

@@ -0,0 +1 @@
- 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)

View File

@@ -0,0 +1 @@
- **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

View File

@@ -0,0 +1 @@
- **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

View File

@@ -0,0 +1 @@
- **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

View File

@@ -0,0 +1 @@
- **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

View File

@@ -0,0 +1 @@
- **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

View File

@@ -0,0 +1 @@
- **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

View File

@@ -0,0 +1 @@
- **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.

View File

@@ -0,0 +1 @@
- **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

View File

@@ -0,0 +1 @@
- **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))

View File

@@ -0,0 +1 @@
- **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))

View File

@@ -0,0 +1 @@
- **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.

View File

@@ -0,0 +1 @@
- **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.

View File

@@ -0,0 +1 @@
- **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.

View File

@@ -0,0 +1 @@
- **fix(ci):** Compare OpenAPI contracts against immutable event commits, preventing false removals after the base advances and rejecting incomplete required measurements.

View File

@@ -0,0 +1 @@
- **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.

View File

@@ -0,0 +1 @@
- 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.

View File

@@ -0,0 +1 @@
- **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).

View File

@@ -0,0 +1 @@
- 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)

View File

@@ -0,0 +1 @@
- **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))

View File

@@ -0,0 +1 @@
- fix(dashboard): provider quota "Resets in" countdowns now follow a shared 30-second clock instead of being frozen by React Compiler memoization (#18772)

View File

@@ -0,0 +1 @@
- 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)

View File

@@ -0,0 +1 @@
- **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

View File

@@ -0,0 +1 @@
- **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))

View File

@@ -0,0 +1 @@
- **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))

View File

@@ -0,0 +1 @@
- **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))

View File

@@ -0,0 +1 @@
- **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

View File

@@ -0,0 +1 @@
- 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.

View File

@@ -0,0 +1 @@
- 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.

View File

@@ -0,0 +1 @@
- Resolve the MCP compression-store principal from the key the transport authenticated, and stop falling back to the environment key for HTTP callers.

View File

@@ -0,0 +1 @@
- 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.

View File

@@ -0,0 +1 @@
- 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.

View File

@@ -0,0 +1 @@
- 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.

View File

@@ -0,0 +1 @@
- 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.

View File

@@ -0,0 +1 @@
- 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.

View File

@@ -0,0 +1 @@
- **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

View File

@@ -0,0 +1 @@
- 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).

View File

@@ -0,0 +1 @@
- **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).

View File

@@ -0,0 +1 @@
- **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).

View File

@@ -0,0 +1 @@
- **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`.

View File

@@ -0,0 +1 @@
- **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).

View File

@@ -0,0 +1,2 @@
- **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.

View File

@@ -0,0 +1 @@
- **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)).

View File

@@ -0,0 +1 @@
- **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)

View File

@@ -0,0 +1 @@
- **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))

View File

@@ -0,0 +1 @@
- **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))

View File

@@ -0,0 +1 @@
- **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))

View File

@@ -0,0 +1 @@
- **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))

View File

@@ -0,0 +1 @@
- **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))

View File

@@ -0,0 +1 @@
- **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.

View File

@@ -0,0 +1 @@
- **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`

View File

@@ -0,0 +1 @@
- **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