Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- **fix(sse):** add regression guard that `PROVIDER_BREAKER_FAILURE_STATUSES` stays exported from `chatPredicates` and imported by `chat.ts` — production fix already landed via #8390; this keeps the credential-exhaustion path from regressing to a ReferenceError ([#8424](https://github.com/diegosouzapw/OmniRoute/pull/8424)) — thanks @MumuTW
9 changes: 0 additions & 9 deletions skills/cli-backup-sync/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,15 +75,6 @@ omniroute backup disable

### `backup status`

**Flags:**

- `--name <name>`
- `--cloud`
- `--encrypt`
- `--key-file <path>`
- `--exclude <pattern>`
- `--retention <n>`

**Example:**

```bash
Expand Down
37 changes: 37 additions & 0 deletions tests/unit/breaker-failure-statuses-8405.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
// #8405: PROVIDER_BREAKER_FAILURE_STATUSES was unexported in chatPredicates.ts,
// causing a ReferenceError on the credential-exhaustion path in chat.ts.
import test from "node:test";
import assert from "node:assert/strict";
import fs from "node:fs";

test("#8405: chatPredicates exports PROVIDER_BREAKER_FAILURE_STATUSES as a Set of failure statuses", async () => {
const chatPredicates = await import("../../src/sse/handlers/chatPredicates.ts");
assert.ok(
chatPredicates.PROVIDER_BREAKER_FAILURE_STATUSES,
"PROVIDER_BREAKER_FAILURE_STATUSES must be exported from chatPredicates"
);
assert.ok(
chatPredicates.PROVIDER_BREAKER_FAILURE_STATUSES instanceof Set,
"PROVIDER_BREAKER_FAILURE_STATUSES must be a Set"
);
assert.deepEqual(
Array.from(chatPredicates.PROVIDER_BREAKER_FAILURE_STATUSES).sort(),
[408, 500, 502, 503, 504]
);
});

test("#8405: chat.ts imports PROVIDER_BREAKER_FAILURE_STATUSES without throwing ReferenceError", async () => {
const chatSource = fs.readFileSync(
new URL("../../src/sse/handlers/chat.ts", import.meta.url),
"utf-8"
);

assert.match(
chatSource,
/import\s*\{[^}]*PROVIDER_BREAKER_FAILURE_STATUSES[^}]*\}\s*from\s*["']\.\/chatPredicates["']/,
"chat.ts must explicitly import PROVIDER_BREAKER_FAILURE_STATUSES from chatPredicates"
);

const chatModule = await import("../../src/sse/handlers/chat.ts");
assert.ok(chatModule, "chat.ts must import cleanly without runtime error");
});
Loading