Skip to content

Never stop coding. Free MIT AI gateway: one endpoint, 375 providers (150+ free), 1,400+ models Kimi, Claude, GPT, Gemini, GLM, DeepSeek, MiniMax. Works with Claude Code, Codex, Cursor, OpenCode, Cline & Copilot. Quota-aware auto-fallback, RTK+Caveman compression saves 15-95% tokens, MCP/A2A, Desktop/PWA. Built by 900+ contributors

848 B
Raw Blame
import path from "node:path";
import test from "node:test";
import { fileURLToPath } from "node:url";
import { assertMirrorRepairRejectsUnsafeLocale } from "../_helpers/mirrorRepairLocaleGuard.ts";

const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "../..");

test("cycle mirror repair rejects a locale traversal before opening any target", async () => {
  const previous =
    "| `check:cycles` | Bare = advisory. `check:cycles:ratchet` remains blocking. | yes |\n";
  const current = previous.replace(
    "Bare = advisory.",
    "Bare exits 1 whenever any cycle exists (fail-closed since #15281)."
  );
  await assertMirrorRepairRejectsUnsafeLocale({
    script: path.join(root, "scripts/ad-hoc/relay-cycle-mirrors-15682.mjs"),
    relativeSource: "docs/architecture/QUALITY_GATES.md",
    previous,
    current,
  });
});