mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-09-16 03:42:21 +03:00
fix(ci): clear five uncovered base-reds on release/v3.8.51 — auto-combo catalog event-loop pin, unweighted quota-share, resilience key set, pack-gate stamp, synced-catalog env doc (#13678)
* fix(combo): rotate unweighted quota-share targets instead of pinning the first The combo resolver turns an unset step weight into 0 (comboStructure.ts), and #10881 made normalizeWeight treat 0 as disabled plus return definition order when the total weight is 0. A quota-share combo without explicit weights therefore had no DRR quanta and dispatched every request to its first target — the combo-matrix/quota-share integration suite saw openai six times out of six. An all-zero set is now an unweighted combo and shares evenly; an explicit 0 still disables a target when its siblings are weighted. Refs #12732 * fix(models): resolve auto-combo target metadata once per catalog build #12046 derives vision/modalities for the built-in auto/* combos by resolving catalog metadata for every target of every combo. The ~40 auto combos share one candidate pool and the loop neither memoized nor yielded, so the #9147 fixture (60 connections, 720 synced models) went from a ~4s build with a 167ms longest event-loop gap to ~11s and a 860-1070ms gap on an idle box — past the 800ms contract and past #12628's 8s cold-build bound, which is why the test came back 500 catalog_build_timeout on every release-green run. Metadata depends only on the target's provider/model/connection scope within a build, so memoize it per build and yield between misses. Same fixture: 2.3-3.1s build, 56-72ms longest gap. The 9147 test is unchanged. Refs #12732 * test(resilience): list credentialHealthCheck in the configuration-only key set #12043 added credentialHealthCheck.intervalMinutes to DEFAULT_RESILIENCE_SETTINGS and to the /api/resilience GET projection. It is operator configuration (the background sweep cadence), not runtime breaker state, but the exact key-set assertion was never updated, so resilience-http-e2e failed on the release tip. The providerBreakers/runtime absence checks stay as they were. Refs #12732 * fix(ci): stamp BUILD_SHA before the release-green pack gate validates check:pack-artifact assembles dist/ through build:cli, which never writes dist/BUILD_SHA (only build:release does). #12959 pointed the provenance ref at HEAD, but the #10427 guard still stops at 'dist/BUILD_SHA is missing' before it ever reaches the ancestry check — reproduced on tip + #13635 + #13436, the first tree whose Turbopack build compiles. ci.yml sequences build -> stamp -> validate; the validator now does the same in both entry points, keeping PACK_GATE_ENV for the validate step. The guard is unchanged: an unstamped dist/ or one built from another commit still fails. On that tree the stamped gate passes: 'BUILD_SHA 5cb3ae5d9 is on the release line'. Refs #12732 * docs(env): document OMNIROUTE_SYNCED_CATALOG_STALE_AFTER_MS #13248 (#12849) added the override for when a connection's synced model list stops being authoritative, but neither .env.example nor ENVIRONMENT.md lists it, so the env/docs contract gate reports it as code-only. The other five vars that gate reports are already added by #13635 and #13361; this touches a different region of .env.example so it does not collide with either. Refs #12732
This commit is contained in:
committed by
GitHub
parent
9442bdef0f
commit
d36251cf1c
@@ -461,6 +461,37 @@ async function runAsync(cmd, cmdArgs, opts = {}) {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Package-artifact gate, run the way ci.yml's pack job runs it (#10427).
|
||||
*
|
||||
* `check:pack-artifact` assembles dist/ through `build:cli` when staging is missing, and
|
||||
* `build:cli` never writes dist/BUILD_SHA — only `build:release` does. Pointing the ref at
|
||||
* HEAD (PACK_GATE_ENV) is not enough on its own: the guard still stops at "dist/BUILD_SHA is
|
||||
* missing". ci.yml builds, stamps, then validates; mirror that order here. The guard is not
|
||||
* relaxed: an unstamped dist/ or one built from another commit still fails.
|
||||
*/
|
||||
async function runPackArtifactGate(timeoutMs) {
|
||||
const deadline = Date.now() + timeoutMs;
|
||||
const steps = [
|
||||
{ cmd: npmCmd, args: ["run", "build:cli"] },
|
||||
{ cmd: process.execPath, args: ["scripts/build/write-build-sha.mjs"] },
|
||||
{
|
||||
cmd: npmCmd,
|
||||
args: ["run", "check:pack-artifact"],
|
||||
env: PACK_GATE_ENV,
|
||||
},
|
||||
];
|
||||
let out = "";
|
||||
for (const step of steps) {
|
||||
const remaining = deadline - Date.now();
|
||||
if (remaining <= 0) return classifyRunError({ killed: true, signal: "SIGTERM" }, timeoutMs);
|
||||
const result = await runAsync(step.cmd, step.args, { env: step.env, timeout: remaining });
|
||||
out += result.out;
|
||||
if (result.code !== 0) return { code: result.code, out };
|
||||
}
|
||||
return { code: 0, out };
|
||||
}
|
||||
|
||||
async function main() {
|
||||
const args = new Set(process.argv.slice(2));
|
||||
const JSON_OUT = args.has("--json");
|
||||
@@ -713,14 +744,15 @@ async function main() {
|
||||
slow.push({
|
||||
id: "pack-artifact",
|
||||
label: "Package artifact (npm pack policy)",
|
||||
args: ["run", "check:pack-artifact"],
|
||||
env: PACK_GATE_ENV,
|
||||
run: runPackArtifactGate,
|
||||
timeout: 20 * 60 * 1000,
|
||||
});
|
||||
}
|
||||
slow.forEach((g) => announce(`${g.label} [parallel]`));
|
||||
const slowResults = await Promise.all(
|
||||
slow.map((g) => runAsync(npmCmd, g.args, { timeout: g.timeout, env: g.env }))
|
||||
slow.map((g) =>
|
||||
g.run ? g.run(g.timeout) : runAsync(npmCmd, g.args, { timeout: g.timeout, env: g.env })
|
||||
)
|
||||
);
|
||||
slow.forEach((g, i) => {
|
||||
const { code, out } = slowResults[i];
|
||||
@@ -770,10 +802,7 @@ async function main() {
|
||||
}
|
||||
} else if (WITH_BUILD) {
|
||||
// --with-build without the suites (--quick): still verify the package artifact.
|
||||
const { code, out } = await runAsync(npmCmd, ["run", "check:pack-artifact"], {
|
||||
env: PACK_GATE_ENV,
|
||||
timeout: 20 * 60 * 1000,
|
||||
});
|
||||
const { code, out } = await runPackArtifactGate(20 * 60 * 1000);
|
||||
saveGateLog("pack-artifact", out);
|
||||
record({
|
||||
id: "pack-artifact",
|
||||
|
||||
Reference in New Issue
Block a user