* 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>
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.
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>
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.
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.
* 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
* 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.
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.
- 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
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.
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.
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.
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.
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.
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".
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.
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.
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.
#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.
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.
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.
* 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
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.
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.
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.
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.
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.
* 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
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.
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.
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.
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.
* 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
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
- 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.
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.
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.
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.
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.
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
- 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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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)
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)
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)
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.
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.
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).
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.
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).
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.
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.
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.
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.
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.
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.
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[]").
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.
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.
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.
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.
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.
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.
Security fix; failing checks at merge were the inherited base reds (provider-asset-provenance, useModelImportHandlers, advisory forgotten-sibling-tests crash).
Security fix; failing checks at merge were the inherited base reds (provider-asset-provenance, useModelImportHandlers, advisory forgotten-sibling-tests crash).
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.
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.
Security fix; failing checks at merge were the inherited base reds (provider-asset-provenance, useModelImportHandlers, advisory forgotten-sibling-tests crash).
Security fix; failing checks at merge were the inherited base reds (provider-asset-provenance, useModelImportHandlers, advisory forgotten-sibling-tests crash).
* 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
- 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
- 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
- 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)
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.
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.
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.
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.
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.
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.
#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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
- 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.
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.
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.
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.
- 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.
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.
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.
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.
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.
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.
- 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.
- 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.
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.
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).
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.
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.
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.
- 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.
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.
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.
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.
- 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
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.
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.
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.
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.
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.
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.
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.
- 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).
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.
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).
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.
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).
- 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.
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.
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).
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.
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.
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.
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.
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.
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].
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.
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).
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.
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.
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.
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.
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.
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.
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.
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).
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).
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.
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.
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).
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.
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.
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.
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.
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).
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.
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.
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.
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.
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.
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.
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.
- 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).
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.
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>
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).
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.
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.
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.
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.
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>
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.
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>
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.
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.
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.
/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.
/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.
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.
#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.
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>
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.
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>
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.
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.
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.
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.
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.
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.
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.
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).
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.
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.
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.
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.
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>
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.
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>
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.
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.
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.
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.
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>
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.
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).
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).
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.
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>
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.
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.
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.
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).
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.
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.
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.
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.
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.
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.
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.
- 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.
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.
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).
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.
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.
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).
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).
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.
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).
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>
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>
- 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>
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>
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>
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.
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>
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.
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.
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.
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.
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.
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
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>
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.
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.
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).
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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>
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>
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>
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>
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>
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.
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
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
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
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
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
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)
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."
# 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.
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.
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-Comboscoring + 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:
`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`.
**👋 Follow the maintainer — get new providers, releases & tips first:**
[](https://www.linkedin.com/in/diegosouzapw/)
[](https://github.com/diegosouzapw)
[](https://www.linkedin.com/in/diegosouzapw/)
[](https://github.com/diegosouzapw)
<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."/>
<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."/>
<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 & per-feature detail vs 9router, OpenRouter, CLIProxyAPI & LiteLLM → [`docs/comparison/OMNIROUTE_VS_ALTERNATIVES.md`](docs/comparison/OMNIROUTE_VS_ALTERNATIVES.md)</sub>
@@ -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)
- **🤝 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">
@@ -1318,7 +1323,7 @@ Métricas canônicas em 2026-10-18: **1.976 vídeos únicos** · **20.220.289 vi
<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>
- **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
- **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
- 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)
- **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
- 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)
- **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
- **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
- **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
- **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
- **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
- **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
- **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))
- **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.
- **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.
- **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.
- **fix(ci):** Compare OpenAPI contracts against immutable event commits, preventing false removals after the base advances and rejecting incomplete required measurements.
- **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.
- 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.
- **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).
- 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)
- **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))
- fix(dashboard): provider quota "Resets in" countdowns now follow a shared 30-second clock instead of being frozen by React Compiler memoization (#18772)
- 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)
- **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
- **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))
- **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
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- **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
- **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).
- **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).
- **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`.
- **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).
- **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.
- **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)).
- **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)
- **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))
- **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))
- **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))
- **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))
- **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))
- **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.
- **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`
- **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`
- **chore(ci):** generated files and derived baselines stay out of feature PRs — `PROVIDER_REFERENCE.md`, the twelve generated README SVGs, the fully generated agent skills and `config/quality/e2e-timings.json` are rewritten by the release refresh, not by each PR; `check:agent-skills-sync`, the SVG byte-compare tests, the e2e-timings completeness test and `--require-tighten` judge only what a feature PR itself edited (release mode unchanged); the new `check:generated-artifacts` judges an SVG or timings file a PR edits with full history (fail-closed without a base), `check:test-masking` reports gate-mode conditional skips, and `.gitattributes` collapses the generated diffs
- **chore(ci):** `check:pr-derived-paths` is blocking: after the two one-time passes over the open PRs, a feature PR that carries translated catalogs, `docs/i18n` mirrors or generated files fails PR Test Policy. A skills PR may now change the skill catalog (`src/shared/constants/agentSkills.ts`), the hand-written `skills/**` docs and `docs/openapi.yaml` together with the generator and its regenerated output.
- **quality:** add opt-in original-source coverage capture for Node/tsx and isolated Vitest Node/UI workers, independent start/completion ledgers, and counter composition with zero-hit production sources. JSON and LCOV share the same verified union; missing or incompatible receipts and results below the unchanged 60/60/60/60 floor fail closed. This remains shadow infrastructure, not full CI or release acceptance, and does not replace the current coverage ratchet.
"_comment":"omni-queue ruleset template for the queue's OWN refs (docs/ops/OMNI_QUEUE.md): the state branch and the candidate branches. Applied by scripts/merge-queue/apply-ruleset.mjs --kind queue-refs, which fills the App bypass actor_id from --app-id. Only the queue's GitHub App may create, update or delete these refs; nobody can rewrite their history. Keys starting with '_' are stripped before the REST call. The candidate pattern is omni-queue/**/* and must stay so: in GitHub's ruleset patterns a trailing ** matches ONE path segment only, and candidate refs have two (omni-queue/<base>/<batchId>-<sha12>), so omni-queue/** left them unprotected (measured against GitHub on 2026-11-15).",
"_comment":"omni-queue ruleset template for ONE release branch (docs/ops/OMNI_QUEUE.md). Applied by scripts/merge-queue/apply-ruleset.mjs, which replaces {{base}}, suffixes the name with the branch, and fills {{statusContext}} (config.landing.statusContext) and integration_id (--app-id) of the single required status. Keys starting with '_' are stripped before the REST call. The release branch has no pull_request rule and NO bypass actor: the only way a commit reaches it is a push or merge of a commit carrying the land status written by the queue's GitHub App. The queue writes that status on the validated candidate right before landing it (the landing push itself is made as config.landing.actor). required_status_checks is allowed here for this one check only: the queue validates the candidate, not the PR.",
"description":"Quality baselines that are pure measurements of the tree and that no gate asks a feature PR to edit (the obligation was moved to release mode or never existed). They are rewritten by the release refresh or a nightly job. Policy files (allowlists, gate-manifest, admission policies, provenance) and baselines a feature PR must legitimately edit together with code (typecheck/file-size/complexity ceilings, quality-baseline.json, eslint-suppressions.json) are deliberately NOT here. Plan 2026-11-13, phase 5.",
"why":"Relative weights for the Playwright shard packer. A spec without an entry already gets the median weight at run time; the completeness test (tests/unit/balance-e2e-shards.test.ts) runs in release mode only.",
"description":"Files written by a generator from the catalog/OpenAPI/registries. A feature PR changes the source (providers.ts, openapi.yaml, the skill catalog, the free-tier catalog); the generated copy is rewritten once by the release refresh (release:refresh-derived) or a nightly refresh PR, so sibling PRs stop conflicting on it. A PR that changes only a generator, its inputs for the agent skills (the skill catalog, the hand-written skills/** docs, openapi.yaml) and its output (the companions below) is still allowed. Plan 2026-11-13, phase 5.",
"writers":["release/v*","chore/derived-*"],
"companions":[
"changelog.d/**",
"scripts/docs/gen-provider-reference.ts",
"scripts/docs/gen-readme-*.mjs",
"scripts/docs/readme-*.mjs",
"tests/unit/docs/readme-*.test.ts",
"docs/diagrams/README.md",
"scripts/skills/**",
"src/lib/agentSkills/**",
"tests/unit/agentSkills-*.test.ts",
"tests/unit/agent-skills-*.test.ts",
"src/shared/constants/agentSkills.ts",
"skills/**",
"docs/openapi.yaml"
],
"categories":[
{
"id":"derived-facts",
"paths":["docs/reference/derived-facts.json"],
"why":"Snapshot of every derived number (provider total, MCP tools, routing strategies, free-tier tokens, ...) the README diagrams and the counts gate read between releases; written only by the release refresh or the nightly refresh PR (plan 2026-11-13, phase 1).",
"refreshedBy":"npm run release:refresh-derived (or npm run facts)"
},
{
"id":"provider-reference",
"paths":["docs/reference/PROVIDER_REFERENCE.md"],
"why":"Generated from src/shared/constants/providers.ts (whole catalog + totals + version/date header): every provider PR rewrote it, 30 of 321 open PRs on 2026-11-13.",
"refreshedBy":"npm run gen:provider-reference (release:refresh-derived)"
},
{
"id":"readme-diagrams",
"paths":[
"docs/diagrams/readme-hero.svg",
"docs/diagrams/free-tier-budget.svg",
"docs/diagrams/works-zero-config.svg",
"docs/diagrams/promise-pillars.svg",
"docs/diagrams/why-pain-fix.svg",
"docs/diagrams/tier-cascade.svg",
"docs/diagrams/strategies-grid.svg",
"docs/diagrams/resilience-layers.svg",
"docs/diagrams/comparison-table.svg",
"docs/diagrams/privacy-local.svg",
"docs/diagrams/cli-terminal.svg",
"docs/diagrams/compression-pipeline.svg"
],
"why":"Generated by scripts/docs/gen-readme-*.mjs (README_DIAGRAMS in gen-readme-diagrams.mjs) from live catalogs and counts; 26-28 open PRs rewrote the hero, comparison, pillars and terminal cards. Hand-drawn SVGs (pool-fair-share, combo-always-on, public/images/tier-flow-*) and the Mermaid exports are not in this list.",
"refreshedBy":"npm run docs:readme-diagrams (release:refresh-derived)"
},
{
"id":"agent-skill-references",
"paths":["skills/*/references/**"],
"why":"skills/<id>/references/endpoints.md is written entirely by src/lib/agentSkills/generator.ts from docs/openapi.yaml.",
"why":"SKILL.md files with no hand-written custom block: the generator writes every byte. SKILL.md files that carry a <!-- skill:custom-start --> block are hand-edited too and stay out of this list (tests/unit/derived-paths-generated-family.test.ts keeps the list exact).",
"description":"Everything translated from an English source: the dashboard and CLI catalogs of the non-English locales, the docs/i18n mirrors with their hash ledger, and the real-translation ratchet measured on them. A feature PR edits only the English source (src/i18n/messages/en.json, bin/cli/locales/en.json, the English docs); these files are rewritten once per release by release:refresh-derived, by a translation wave, or by the scheduled mirror-refresh PR. The compact error-boundary catalogs (src/i18n/global-error-messages) are companions, not a category: they are regenerated from the catalogs on every build, a translation-only PR may carry them, and a feature PR that edits en.json publicSystem.globalError must still be able to regenerate them.",
"why":"A feature PR adds or rewrites keys in en.json only; at runtime the dashboard falls back to English (src/i18n/request.ts deepMergeFallback) until the locales are completed. Catalog edits carried by feature PRs conflicted on every merge (48 open PRs touched the same ~43 catalogs on 2026-11-13).",
"refreshedBy":"release:refresh-derived → syncUiKeys({ catalog: \"ui\", pruneExtra: true, rewrittenSinceRef, translate: true }) in scripts/i18n/sync-ui-keys.mjs (CLI: node scripts/i18n/sync-ui-keys.mjs --rewritten-since=<ref> --translate-markers --batch-size=40), or a translation wave branch"
},
{
"id":"cli-locale-catalogs",
"paths":["bin/cli/locales/*.json"],
"except":["bin/cli/locales/en.json"],
"why":"A feature PR adds CLI strings to bin/cli/locales/en.json only; the CLI falls back to English until the locales are completed.",
"why":"The 66 translated mirrors of the English docs and their hash ledger are rewritten from the English source; a feature PR edits the English doc only.",
"refreshedBy":"npm run i18n:run -- --files=<doc> on a translation wave branch (docs/i18n-*), the scheduled i18n-mirror-refresh workflow (chore/i18n-mirror-refresh), or release:refresh-derived"
"why":"The real-translation ratchet is measured on the locale catalogs, so it only moves when they do; on a feature PR the ratio gate runs in release mode (SKIP) and there is nothing for the PR to tighten.",
"refreshedBy":"npm run i18n:check-ratio:update after the catalogs are refreshed (release:refresh-derived or a translation wave)"
}
]
}
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.