fix(ci): reconcile release test contract drift (#12082)

Boarded with #12075 in one combined worktree: typecheck:core, check:file-size, check:changelog-integrity, check:complexity, check:cognitive-complexity, check:cycles all green; 77/77 focused tests pass. CI-contract-only reconciliation as described — no production behavior change, and the referenced files (lkgp-stale-pin-exhaustion-11911.test.ts, cli-nodes-commands.test.ts) confirmed already present and correctly aligned. Thanks for keeping this separate from the dev-bundler phase PRs.
This commit is contained in:
backryun
2026-08-30 15:30:54 +09:00
committed by GitHub
parent d26fe03801
commit 47ea113b99
3 changed files with 29 additions and 17 deletions

View File

@@ -39,9 +39,7 @@
"incremental": true,
"incrementalFile": "reports/mutation/stryker-incremental.json",
"testRunner": "tap",
"plugins": [
"@stryker-mutator/tap-runner"
],
"plugins": ["@stryker-mutator/tap-runner"],
"tap": {
"testFiles": [
"tests/unit/10085-compatible-generic-vs-uuid-credential.test.ts",
@@ -266,6 +264,7 @@
"tests/unit/issue-7071-ollama-session-quota.test.ts",
"tests/unit/kimi-quota-reset-recovery.test.ts",
"tests/unit/least-used-rotation-10945.test.ts",
"tests/unit/lkgp-stale-pin-exhaustion-11911.test.ts",
"tests/unit/livews-forward-backoff-4604.test.ts",
"tests/unit/management-auth-hardening.test.ts",
"tests/unit/mark-account-unavailable-numeric-epoch-guard.test.ts",
@@ -512,11 +511,7 @@
".worktrees",
".stryker-tmp"
],
"reporters": [
"progress",
"html",
"json"
],
"reporters": ["progress", "html", "json"],
"htmlReporter": {
"fileName": "reports/mutation/mutation.html"
},

View File

@@ -124,7 +124,7 @@ test("program registers 'update' command", () => {
assert.ok(cmd, "update command exists");
});
test("nodes endpoint commands reserve --base-url for the global server target", () => {
test("nodes endpoint commands expose --endpoint and the legacy --base-url alias", () => {
const program = createProgram();
const nodes = program.commands.find((c) => c.name() === "nodes");
assert.ok(nodes, "nodes command exists");
@@ -136,10 +136,9 @@ test("nodes endpoint commands reserve --base-url for the global server target",
command.options.some((option) => option.long === "--endpoint"),
`nodes ${commandName} exposes --endpoint for the provider-node URL`
);
assert.equal(
assert.ok(
command.options.some((option) => option.long === "--base-url"),
false,
`nodes ${commandName} does not shadow the global --base-url option`
`nodes ${commandName} preserves the legacy --base-url alias`
);
command.parseOptions([
...(commandName === "update" ? ["node-1"] : []),

View File

@@ -27,7 +27,10 @@ const RESET_160H = 160 * HOUR + 27 * 60_000 + 24_000; // "160h27m24s"
test("selectLockoutCooldownMs honors a parsed reset longer than the base cooldown", () => {
// exponential backoff on, but a 160h upstream reset must win
assert.equal(
selectLockoutCooldownMs(RESET_160H, { baseCooldownMs: 5 * 60_000, useExponentialBackoff: true }),
selectLockoutCooldownMs(RESET_160H, {
baseCooldownMs: 5 * 60_000,
useExponentialBackoff: true,
}),
RESET_160H
);
});
@@ -53,9 +56,18 @@ test("model lockout honors the long upstream reset end-to-end (#1308)", () => {
baseCooldownMs: 5 * 60_000,
useExponentialBackoff: true,
});
recordModelLockoutFailure("antigravity", "conn-1", "claude-sonnet-4-6", "rate_limit", 429, 5 * 60_000, null, {
exactCooldownMs: exact,
});
recordModelLockoutFailure(
"antigravity",
"conn-1",
"claude-sonnet-4-6",
"rate_limit",
429,
5 * 60_000,
null,
{
exactCooldownMs: exact,
}
);
const info = getModelLockoutInfo("antigravity", "conn-1", "claude-sonnet-4-6");
assert.ok(info, "expected an active lockout");
// remaining should be ~160h, NOT the ~5min base cooldown
@@ -118,7 +130,13 @@ test("Retry-After remains authoritative for model locks when connection hints ar
);
assert.equal(result.retryHintSource, "header");
assert.equal(result.quotaResetHintMs, 131 * HOUR);
const expectedResetMs = 131 * HOUR;
const actualResetMs = result.quotaResetHintMs;
assert.ok(typeof actualResetMs === "number", "expected a numeric Retry-After reset hint");
assert.ok(
actualResetMs <= expectedResetMs && actualResetMs >= expectedResetMs - 1_000,
`expected Retry-After within one clock tick of ${expectedResetMs}ms, got ${actualResetMs}ms`
);
assert.equal(retryHintBypassesMaxCooldownMs(result.retryHintSource), true);
});