mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-03 05:45:04 +03:00
fix(intelligence): run Arena ELO sync from the live startup path (#3803)
Initializes initArenaEloSync() from instrumentation-node.ts (the Next standalone startup hook) instead of the never-executed server-init.ts, so the Free Provider Rankings page (#3799) actually gets data. On by default; opt out with ARENA_ELO_SYNC_ENABLED=false.
This commit is contained in:
committed by
GitHub
parent
54b89e5c5b
commit
b7ac403c81
@@ -53,7 +53,7 @@
|
||||
|
||||
### 📝 Maintenance
|
||||
|
||||
- **feat(intelligence): enable Arena ELO sync by default** — the Arena AI leaderboard ELO sync (`ARENA_ELO_SYNC_ENABLED`) that powers the new Free Provider Rankings page ([#3799](https://github.com/diegosouzapw/OmniRoute/pull/3799)) is now **on by default** (was opt-in). It fetches from `api.wulong.dev` on startup (non-blocking, never fatal) and refreshes daily; set `ARENA_ELO_SYNC_ENABLED=false` to opt out of the outbound sync. Without it the rankings page renders empty. (thanks @diegosouzapw)
|
||||
- **feat(intelligence): enable Arena ELO sync by default + wire it into the live startup path** — the Arena AI leaderboard ELO sync (`ARENA_ELO_SYNC_ENABLED`) that powers the new Free Provider Rankings page ([#3799](https://github.com/diegosouzapw/OmniRoute/pull/3799)) is now **on by default** (was opt-in). It was also only initialized from `server-init.ts`, which the Next standalone runtime never executes (it boots through `instrumentation-node.ts`), so the sync never actually ran in production — it's now initialized from the live instrumentation path. Fetches from `api.wulong.dev` on startup (non-blocking, never fatal) and refreshes daily; set `ARENA_ELO_SYNC_ENABLED=false` to opt out of the outbound sync. (thanks @diegosouzapw)
|
||||
- **chore(quality): Quality Gates → 100%** — completes Fase 6A (systemic hardening: a `stale-allowlist` helper applied across ~10 gates, `docs/architecture/QUALITY_GATES.md`, and ratchet engine v2 with `--require-tighten` + per-metric `eps`) and the entire Fase 7 (20 security/dead-code/mutation/tooling gates), with the Fase 8 plan documented. ([#3757](https://github.com/diegosouzapw/OmniRoute/pull/3757))
|
||||
- **docs: close the remaining documentation gaps** for proxy operations, skills internals, the memory engine, RTK customization, and compression extensibility (post-#3438 audit, 5 areas in one PR). ([#3453](https://github.com/diegosouzapw/OmniRoute/pull/3453) — thanks @oyi77)
|
||||
- **chore(quality): re-baseline `providerRegistry.ts` file-size** (4692→4703) after #3768's Ollama Cloud `kimi-k2.7-code` capability fix grew the file past the frozen baseline, turning the release's own Fast Quality Gates red. No source file is touched. ([#3770](https://github.com/diegosouzapw/OmniRoute/pull/3770))
|
||||
|
||||
@@ -258,13 +258,25 @@ export async function registerNodejs(): Promise<void> {
|
||||
}
|
||||
|
||||
try {
|
||||
const { autoRefreshDaemon } = await import(
|
||||
"@omniroute/open-sse/services/autoRefreshDaemon"
|
||||
);
|
||||
const { autoRefreshDaemon } = await import("@omniroute/open-sse/services/autoRefreshDaemon");
|
||||
autoRefreshDaemon.start();
|
||||
} catch (err: unknown) {
|
||||
const msg = err instanceof Error ? err.message : String(err);
|
||||
console.warn("[STARTUP] Auto-refresh daemon failed to start (non-fatal):", msg);
|
||||
}
|
||||
|
||||
// Arena ELO sync: model intelligence from the Arena AI leaderboard, powering the
|
||||
// Free Provider Rankings page. On by default (opt out with ARENA_ELO_SYNC_ENABLED=false).
|
||||
// Non-blocking — the initial sync is fire-and-forget and never fatal.
|
||||
if (process.env.ARENA_ELO_SYNC_ENABLED !== "false") {
|
||||
try {
|
||||
const { initArenaEloSync } = await import("@/lib/arenaEloSync");
|
||||
await initArenaEloSync();
|
||||
console.log("[STARTUP] Arena ELO sync initialized");
|
||||
} catch (err: unknown) {
|
||||
const msg = err instanceof Error ? err.message : String(err);
|
||||
console.warn("[STARTUP] Arena ELO sync failed to start (non-fatal):", msg);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -84,6 +84,14 @@ describe("Pipeline Wiring — instrumentation-node.ts", () => {
|
||||
assert.ok(src, "src/instrumentation-node.ts should exist");
|
||||
assert.match(src, /seedDefaultModelAliases/);
|
||||
});
|
||||
|
||||
it("should initialize Arena ELO sync on the live startup path (on by default, opt-out)", () => {
|
||||
// The Next standalone runtime boots through instrumentation-node, NOT server-init.ts.
|
||||
// The Arena ELO sync (which feeds the Free Provider Rankings page) must be wired here,
|
||||
// or it never runs in production regardless of ARENA_ELO_SYNC_ENABLED.
|
||||
assert.match(src, /initArenaEloSync/);
|
||||
assert.match(src, /ARENA_ELO_SYNC_ENABLED !== "false"/);
|
||||
});
|
||||
});
|
||||
|
||||
describe("Pipeline Wiring — sse chat handler", () => {
|
||||
|
||||
Reference in New Issue
Block a user