Repository navigation
fix(barrel): delete the @/lib/localDb barrel — every consumer migrated (#11795 Phase 5) - #12055
Merged
diegosouzapw merged 23 commits intoAug 30, 2026
Conversation
…orts (#59) Replace all 122 src/app imports from @/lib/localDb with direct imports from the owning @/lib/db/* modules, per AGENTS.md G14. The barrel is a pure re-export layer; every consumer now imports the domain module that actually owns each symbol (settings, providers, combos, apiKeys, ...), which shrinks the module graph and removes the god-coupling point. Mechanical codemod only - no behavior change. Alias re-exports preserved (e.g. updateWebhookRecord -> updateWebhook as updateWebhookRecord), type-only imports stay type-only, dynamic imports keep lazy semantics, and test vi.mock targets re-point at the real module. Prune the 121 now-satisfied no-restricted-imports suppressions for the migrated files. Verified: typecheck:core green, eslint src/app green, check:cycles green, focused db unit tests pass (124/128; the 4 failures are the pre-existing omp.ts suite, identical on clean HEAD).
…orts (#59) Replace all 46 src/lib imports from @/lib/localDb with direct imports from the owning @/lib/db/* modules, per AGENTS.md G14. Covers static named imports, alias re-exports, dynamic imports (lazy semantics kept), namespace destructures, and the Promise.all array-destructure pattern (e.g. providerDiscovery, internalUsageCommand, saturationSignals). Mechanical codemod only - no behavior change. Type-only imports stay type-only, test vi.mock targets re-point at the real module, and the star-export graph (reasoningRoutingRules, etc.) is resolved via the TypeScript compiler API. Prune the 34 now-satisfied no-restricted-imports suppressions for the migrated files. Verified: typecheck:core green, eslint src/lib green, check:cycles green, focused db unit tests pass (183/191; the 8 failures are the pre-existing stdio-guard suite cheaper-inference#8181, identical on clean HEAD).
…omain off the localDb barrel (#59) Replace all 31 remaining barrel imports with direct imports from the owning @/lib/db/* modules, per AGENTS.md G14. Covers static imports, dynamic imports (lazy semantics kept), the multi-module Promise.all destructure pattern (rateLimitManager, comboContextCache), and the src/models/index.ts re-export file split into per-module re-exports. Mechanical codemod only - no behavior change. Type-only imports stay type-only and the volumeDetector test vi.mock re-points at the real module. Prune the 20 now-satisfied no-restricted-imports suppressions. Verified: typecheck:core green, eslint changed files green, check:cycles green, open-sse test suite passes (107/107 in focused batch).
…s direct db imports (#59) Final phase of the cheaper-inference#11795 migration. With all src/app, src/lib, open-sse, src/shared, src/sse, src/models, and src/domain consumers migrated in Phases 2-4, migrate the last 61 test files off the barrel (namespace and destructured dynamic imports of @/lib/localDb, including .ts-suffixed relative paths) and delete src/lib/localDb.ts entirely. Mechanical only - no behavior change: - Namespace test imports (const localDb = await import(...)) become per-module imports resolved via the TS-compiler export map, with a merged localDb facade object preserved so existing call sites (localDb.x(...)) stay valid - Destructured dynamic imports split into per-module imports; unused barrel bootstrap import removed (traffic-inspector-hosts) - AGENTS.md (root + src/lib/db) and inline doc comments updated to reflect that the barrel no longer exists - eslint-import-boundaries test (which lints inline fixture strings against the no-restricted-imports rule) intentionally keeps its localDb strings - Prune the now-satisfied no-restricted-imports suppressions revealed by eslint --prune-suppressions Verified: typecheck:core green, eslint on all changed files green (0 errors), check:cycles green, 68 migrated test files parse clean, focused unit + quota integration tests pass (166/167; the sole failure in cli-tools-crush is pre-existing, identical on clean HEAD).
…mports The route was migrated off the @/lib/localDb barrel to import getApiKeyById from @/lib/db/apiKeys and getCombos from @/lib/db/combos (Phase 2, cheaper-inference#11795). The source-scan test still asserted the old barrel path, failing CI shard 1/4 on PR cheaper-inference#12051. Assert the new direct-import sources instead.
cheaper-inference#11795) The Phase 5 PR (delete src/lib/localDb.ts) broke four gates that still assumed the barrel existed: - check-db-rules: the gate crashed reading the deleted barrel and enforced the obsolete re-export-completeness/no-logic rules. Rewrite it to keep only the raw-SQL gate (Hard Rule #5) and its stale-enforcement; update its unit tests and delete the obsolete INTENTIONALLY_INTERNAL classification regression test. - dead-code: deleting the barrel unmasked genuinely-dead exports in src/lib/db/* (the barrel's blanket re-exports were counting as usage). Remove the 11 zero-reference exports; the remaining 6 (oneproxy) are still referenced by dead files and stay. Prune the now-satisfied eslint suppressions they carried. - docs: ARCHITECTURE.md, CODEBASE_DOCUMENTATION.md and CONTRIBUTION_GOLDEN_PATH.md still referenced src/lib/localDb.ts; update them to describe direct db-module imports. - tests: rebase the stale quota-key-models source-scan test onto the Phase 2 fix (imports now assert @/lib/db/apiKeys + @/lib/db/combos). Verified: typecheck:core green, eslint clean on all changed files, dead-code 414 <= 416 baseline, check-db-rules + check-fabricated-docs gates pass, 81 affected unit tests pass.
…conciliation (cheaper-inference#11652) (cheaper-inference#12009) FU-05 core (closes cheaper-inference#11652): caller-supplied Video Bridge transcripts had no bounded, deterministic contract — a client could self-assert source: "embedded"/"audio-bridge" and it was accepted verbatim. normalizeVideoTranscript gained a code-only trustedSource seam unreachable from request-body JSON; without it, any cue declaring embedded/audio-bridge is reclassified to client. Added budgets (256 cues, 4096 code units/cue, 4KiB/cue, 64KiB total), malformed-surrogate rejection, focus-window scoping, deterministic cross-source reconciliation, and bumped the result-cache version v4→v5 so old-contract cache entries can never serve new-contract requests. All 187 videoBridge* tests pass (185 pass, 2 unrelated pre-existing skips).
…ker (cheaper-inference#11659) (cheaper-inference#12011) FU-05 subtitle adapter (Refs cheaper-inference#11659 — deliberately not Closes: the adapter is not yet wired into the live describeVideoPart path, that composition point is sibling cheaper-inference#12009 which just landed): server-owned, loopback-only ffprobe/ffmpeg subtitle extraction that legitimately earns the "embedded" provenance label, mirroring the existing frame-extraction lifecycle. Broker route now also serves ?subtitles=1, stamped with the shared broker fingerprint so the client-side adapter can verify the payload actually came from the trusted process. Bounded, ReDoS-safe WebVTT parser.
…or, evaluator and allowlist scaffold (cheaper-inference#11656) (cheaper-inference#12008) FU-07/FU-09 promotion-evidence harness (Refs cheaper-inference#11656): delivers the manifest schema, deterministic fixture recipes, metrics aggregator, and promotion-verdict evaluator cheaper-inference#11656 asks for — deliberately does NOT deliver the promotion verdicts themselves (they require real models against real fixtures on a live host, HOLD with explicit reason instead of any fabricated result). New files only, no collision with sibling PRs.
…ution variants (FU-08) (cheaper-inference#12006) FU-08 (Refs cheaper-inference#11655): drill-down producer/consumer lifecycle on top of the existing cache substrate, without modifying it — new VideoDrilldownLifecycle (opaque sha256 handles, principal-bound resolve/delete with no existence oracle, preview/standard/detail multiresolution variants, 8-frame/32MiB page budget) plus a new authenticated remote-consumer route, both opt-in (default false).
…lared (cheaper-inference#11661) (cheaper-inference#12001) Reconciles the Video Bridge FU-01..09 backlog docs against verified code and GitHub state (ground truth established first, per this repo's Documentation accuracy rule), correcting a real gap in GUARDRAILS.md: the transcript source field was documented as validated without noting OmniRoute didn't yet verify server-side extraction — exactly the gap cheaper-inference#11652 (now merged as cheaper-inference#12009) closes. Refs cheaper-inference#11661, not Closes — truthfully closing it needs the sibling PRs' actual landed state folded back in, left as an explicit follow-up.
…FU-06, cheaper-inference#11654) (cheaper-inference#12012) FU-06 (Audio Bridge STT orchestration): one download, two extractions — takes already-downloaded video bytes and extracts bounded mono 16kHz PCM WAV via the loopback broker's new mode=audio operation, sharing the exact same queue/deadline/byte budgets as the frame path. Dual opt-in (operator setting default false + per-request), only reaches the STT call when both are on. Rebased onto the tip after sibling cheaper-inference#12011 (subtitle mode) landed first, both touching the same broker route/client — combined additively so frames/audio/subtitles all share the one extractionQueue singleton. Re-validated: 59/59 focused tests pass.
…heaper-inference#12016) Extracts videoBridge.ts's per-part loop body, whole-result cache identity/key helpers, and describeWithVisionModel into a new videoBridgePipeline.ts with explicit port boundaries (VideoMediaBrokerPort, VideoAudioTranscriptionPort, VideoDrilldownPort). videoBridge.ts shrinks 820→255 lines, now only handling request traversal, policy resolution, aggregation, and response payload. Moved as whole blocks, parameterized rather than rewritten — byte-for-byte traceable to the pre-extraction code. Rebased onto the tip after sibling cheaper-inference#12009 (FU-05 core) landed first and bumped the result-cache version v4→v5 in videoBridge.ts — that same bump (plus its explanatory comment) is now carried into the extracted videoBridgePipeline.ts instead. Re-validated: 20/20 focused tests, typecheck clean.
…eaper-inference#12042) Real production incident (2026-08-29): the crash guard cheaper-inference#11556 introduced defaulted its logger to `log ?? console` — console is an object, not a function, so a burst of client aborts (ECONNRESET) reaching the process-level guard threw TypeError inside the uncaughtException handler itself and killed the server, twice in three minutes. Fix: default to console.warn.bind(console). Bug-injection round trip confirms the new test fails on the old default and passes on the fix. Existing guard suite stays green: 9/9 (verified together with the new test).
cheaper-inference#11999) (cheaper-inference#12033) Commander's top-level global --base-url option was shadowing the flag on `omniroute nodes add/update/validate`, rejecting the command with "required option '--endpoint <url>' not specified" even when --base-url was correctly supplied. Now both flags are accepted on all three subcommands, falling back to whichever the user passes.
…re ratio (cheaper-inference#12017) Real production incident (2026-08-29): the resource-pressure guard ratioed raw cgroup v2 memory.current (which counts reclaimable page cache) against memory.max, so a busy host with ~3GiB of page cache latched a global 503 across every model for 26 minutes even though PSI/OOM/memory.events all showed zero real pressure — the kernel would have reclaimed those pages instantly. Fix: ratio the working set (current - file) for the trip/recovery check, falling back to the raw ratio when memory.stat is missing/stale/zero (never clamping to a false zero-pressure reading). 12 new tests including direct incident reproduction (raw 95%/workingset 32% stays normal) + bug-injection round trips. Full resource-pressure + admission suites green (48/48, re-verified in this batch together with the other 3 PRs: 57/57).
…ip (cheaper-inference#11911) (cheaper-inference#12013) When an auto/*/lkgp combo target failed into exhaustion (e.g. an unauthenticated free-tier 401) or was skipped pre-dispatch (cooldown, model lockout, unavailability), the Last Known Good Provider pin was never cleared — so subsequent requests kept re-selecting the same dead provider, causing repeated failures and mass-skipping instead of falling through to a healthy target. Centralizes invalidation into clearStaleLKGP(), invoked from both handleComboChat and handleRoundRobinCombo on exhaustion, pre-dispatch skip, and body-specific 400 termination.
…eaper-inference#11795 Phase 2) (cheaper-inference#12051) Boarded together with Phases 3-5 (cheaper-inference#12052, cheaper-inference#12053, cheaper-inference#12055) and validated in one combined worktree: typecheck:core, check:file-size, check:changelog-integrity, check:complexity, check:cognitive-complexity, check:cycles, check-db-rules all green. Mechanical import-path migration only, no behavior change. Thanks for the phased, well-tested cleanup.
…orts (#59) (cheaper-inference#12052) Boarded together with Phases 2, 4, 5 (cheaper-inference#12051, cheaper-inference#12053, cheaper-inference#12055) and validated in one combined worktree: typecheck:core, check:file-size, check:changelog-integrity, check:complexity, check:cognitive-complexity, check:cycles, check-db-rules all green. Mechanical import-path migration only, no behavior change. Thanks for the phased, well-tested cleanup.
…(Windows/Node 24 build crash) v.50/.51 (cheaper-inference#11706) Confirmed the bug is real and unfixed on the current tip before merging: `scripts/build/prepublish.ts` line 332 was still calling `execFileSync(NPX_BIN, ...)` directly (raw win32 npx.cmd spawn), the exact CVE-2024-27980 shim pattern the file's own header warns about. Root cause, fix, and evidence match — routing through the existing `runBuildTool()` helper. Thanks for catching the one call site the earlier refactor missed.
…omain off the @/lib/localDb barrel import (cheaper-inference#11795 Phase 4) (cheaper-inference#12053) Resynced onto the release tip after cheaper-inference#12051/cheaper-inference#12052 landed. One real conflict in open-sse/services/combo.ts at both LKGP-clear call sites (handleComboChat + round-robin path): the release tip already has cheaper-inference#12013's clearStaleLKGP() helper, which this PR's branch predates — kept the current helper call at both sites, discarding the pre-refactor inline pattern. typecheck:core and the open-sse test suite (vitest, 9/9 on volumeDetector) both green after resync. Thanks for the well-scoped Phase 4 migration.
…earStaleLKGP barrel-import fix)
diegosouzapw
merged commit Aug 30, 2026
50bc8ab
into
cheaper-inference:release/v3.8.51
3 of 6 checks passed
diegosouzapw
added a commit
that referenced
this pull request
Aug 30, 2026
…barrel was masking 50bc8ab (#12055) removed the @/lib/localDb barrel; its re-exports were the only thing keeping getOneproxyStats / deleteOneproxyProxy / clearAllOneproxyProxies (and the private mapStatsRow + OneproxyStats type) 'used' for knip. The 1proxy routes are 308 compat redirects to /api/settings/free-proxies since v3.8.4, so nothing calls them: check:dead-code went 413 -> 419 on the release tip (baseline 416). Back to 416 with typecheck:core, eslint and check:db-rules green.
This was referenced Aug 30, 2026
diegosouzapw
added a commit
to Sabeekhann/OmniRoute
that referenced
this pull request
Aug 30, 2026
…lDb barrel import, deleted by cheaper-inference#12055)
diegosouzapw
pushed a commit
that referenced
this pull request
Aug 30, 2026
Boarded with #11756 (a duplicate fix for the same underlying issue #11650). Compared both implementations directly: this one is technically superior — guards the json_extract() call with json_valid(metadata) so malformed/legacy metadata returns no match instead of throwing a 500, and covers genericBackend.ts/obsidianBackend.ts in addition to sqliteBackend.ts. #11756 only touched SQLite and had no malformed-JSON guard. Closing #11756 with credit. Resynced onto the updated release tip: the test file's `await import("../../src/lib/localDb.ts")` broke after #12055 deleted the barrel earlier this session (your branch forked before that migration) — fixed to import updateSettings directly from @/lib/db/settings, matching the pattern already used by other integration tests. typecheck:core, check:dashboard-typecheck, check:file-size, check:changelog-integrity, check:complexity, check:cognitive-complexity, check:cycles, check-deps all green; 4/4 integration + 35/35 vitest pass after resync. Thanks for the thorough, well-tested fix.
diegosouzapw
added a commit
that referenced
this pull request
Aug 30, 2026
… on release/v3.8.51 after the barrel deletion (#12055) (#12087) * test(cli): align the nodes --base-url contract test with #12033 #11860 asserted that `nodes add/update/validate` must NOT register `--base-url` (reserved for the global server target); #12033 (issue #11999) then registered it on purpose so `omniroute nodes add --provider p --base-url <url>` stops being rejected by Commander's global option. Both PRs landed and the older test turned the base red on unit shard 2/4 (`Unit Tests fast-path (2/4)`, run 33293442568). The test now asserts the current contract: both flags are registered and each parses into its own option; the server-target/payload separation keeps its own test right below. * test(mutation): register lkgp-stale-pin-exhaustion-11911 in tap.testFiles 38e2baa (#11911) added a unit test covering src/shared/utils/circuitBreaker.ts without listing it in stryker.conf.json tap.testFiles, so check:mutation-test-coverage --strict (Fast Quality Gates) is red on the release tip. * fix(db): drop three consumer-less 1proxy exports the deleted localDb barrel was masking 50bc8ab (#12055) removed the @/lib/localDb barrel; its re-exports were the only thing keeping getOneproxyStats / deleteOneproxyProxy / clearAllOneproxyProxies (and the private mapStatsRow + OneproxyStats type) 'used' for knip. The 1proxy routes are 308 compat redirects to /api/settings/free-proxies since v3.8.4, so nothing calls them: check:dead-code went 413 -> 419 on the release tip (baseline 416). Back to 416 with typecheck:core, eslint and check:db-rules green. * chore(mutation): drop the duplicate tap.testFiles entry — #12082 already registered it
AndrianBalanescu
added a commit
to AndrianBalanescu/OmniRoute
that referenced
this pull request
Aug 31, 2026
…table Merge upstream release/v3.8.51 into personal/stable. Conflict resolutions: - accountFallback.ts: keep our Alibaba Token Plan quota fallback + upstream retry-hint provenance detection (both features coexist). - quotaExhaustionCutoff.ts, providers/[id]/models, v1/models/catalog.ts: migrate from deleted @/lib/localDb barrel to @/lib/db/readCache, @/lib/db/models, @/lib/db/proxies (upstream cheaper-inference#12055 barrel removal). - audio/speech/route.ts: keep our saveRequestUsage/saveCallLog logging + upstream speech-combo diversion. - RequestLoggerDetail/V2: take upstream section extraction (sections.tsx) and unified table rendering; drop our local diverged copies. - tests/unit/local-rerank-logging.test.ts: upstream after-hook with maxRetries fs.rmSync; rest of our rerank logging tests preserved. - src/lib/localDb.ts: deleted (upstream removed the barrel; our single remaining consumer migrated to @/lib/db/providers). - eslint-suppressions.json: upstream base + full --prune-suppressions pass (stale entries from deleted files removed; unused FusionStrategy import cleaned in fusionEngine.ts).
diegosouzapw
added a commit
that referenced
this pull request
Sep 1, 2026
… dead DB exports, dead settings tab and flag, docs (#12091) The 1proxy marketplace integration was decommissioned in v3.8.4; the code survived only through the localDb barrel, deleted in #12055. Everything below had zero consumers (grep-proven across src/, open-sse/, bin/, electron/, scripts/ and tests/): - src/lib/oneproxySync.ts and src/lib/oneproxyRotator.ts deleted. - src/lib/db/oneproxy.ts: upsertOneproxyProxy, getOneproxyProxyById, getOneproxyProxyForRotation and markOneproxyProxyFailed removed (their only consumers were the two deleted modules); listOneproxyProxies and the record interface stay — open-sse/utils/proxyFallback.ts still uses them. - src/shared/validation/oneproxySchemas.ts and the unmounted settings/components/OneproxyTab.tsx deleted (no importer anywhere; the live UI is the FreePool* tabs over /api/settings/free-proxies). - ONEPROXY_ENABLED feature flag removed (readerless since oneproxySync died — the toggle no longer controlled anything); flag-count contract test aligned 54 → 53. - Docs: PROXY_GUIDE (component rows, env rows, the three omniroute/ oneproxyRotator snippet sections), CODEBASE_DOCUMENTATION, REPOSITORY_MAP, ENVIRONMENT (ONEPROXY_* rows), FEATURE_FLAGS, .env.example — canonical + pl/zh-CN/zh-TW mirrors. - The 308 compat redirects under /api/settings/oneproxy/ stay (deliberate API compat), as do the live free-proxy provider and proxy_registry rows. check:dead-code drops 424 → 417 (baseline kept at the velocity-phase 500 — banking shrinks is paused until v4.0, headroom grows to 16.6%). check:docs-all, check:env-doc-sync, typecheck:core and the 8 free-proxy/ proxy-fallback test files are green. Closes #12091
diegosouzapw
added a commit
that referenced
this pull request
Sep 1, 2026
… dead DB exports, dead settings tab and flag, docs (#12091) (#12290) The 1proxy marketplace integration was decommissioned in v3.8.4; the code survived only through the localDb barrel, deleted in #12055. Everything below had zero consumers (grep-proven across src/, open-sse/, bin/, electron/, scripts/ and tests/): - src/lib/oneproxySync.ts and src/lib/oneproxyRotator.ts deleted. - src/lib/db/oneproxy.ts: upsertOneproxyProxy, getOneproxyProxyById, getOneproxyProxyForRotation and markOneproxyProxyFailed removed (their only consumers were the two deleted modules); listOneproxyProxies and the record interface stay — open-sse/utils/proxyFallback.ts still uses them. - src/shared/validation/oneproxySchemas.ts and the unmounted settings/components/OneproxyTab.tsx deleted (no importer anywhere; the live UI is the FreePool* tabs over /api/settings/free-proxies). - ONEPROXY_ENABLED feature flag removed (readerless since oneproxySync died — the toggle no longer controlled anything); flag-count contract test aligned 54 → 53. - Docs: PROXY_GUIDE (component rows, env rows, the three omniroute/ oneproxyRotator snippet sections), CODEBASE_DOCUMENTATION, REPOSITORY_MAP, ENVIRONMENT (ONEPROXY_* rows), FEATURE_FLAGS, .env.example — canonical + pl/zh-CN/zh-TW mirrors. - The 308 compat redirects under /api/settings/oneproxy/ stay (deliberate API compat), as do the live free-proxy provider and proxy_registry rows. check:dead-code drops 424 → 417 (baseline kept at the velocity-phase 500 — banking shrinks is paused until v4.0, headroom grows to 16.6%). check:docs-all, check:env-doc-sync, typecheck:core and the 8 free-proxy/ proxy-fallback test files are green. Closes #12091
muhamadgalihsaputra
pushed a commit
to niyatna/NiyatnaRoute
that referenced
this pull request
Sep 27, 2026
…eaper-inference#11795 Phase 2) (cheaper-inference#12051) Boarded together with Phases 3-5 (cheaper-inference#12052, cheaper-inference#12053, cheaper-inference#12055) and validated in one combined worktree: typecheck:core, check:file-size, check:changelog-integrity, check:complexity, check:cognitive-complexity, check:cycles, check-db-rules all green. Mechanical import-path migration only, no behavior change. Thanks for the phased, well-tested cleanup.
muhamadgalihsaputra
pushed a commit
to niyatna/NiyatnaRoute
that referenced
this pull request
Sep 27, 2026
…orts (cheaper-inference#59) (cheaper-inference#12052) Boarded together with Phases 2, 4, 5 (cheaper-inference#12051, cheaper-inference#12053, cheaper-inference#12055) and validated in one combined worktree: typecheck:core, check:file-size, check:changelog-integrity, check:complexity, check:cognitive-complexity, check:cycles, check-db-rules all green. Mechanical import-path migration only, no behavior change. Thanks for the phased, well-tested cleanup.
muhamadgalihsaputra
pushed a commit
to niyatna/NiyatnaRoute
that referenced
this pull request
Sep 27, 2026
cheaper-inference#11795 Phase 5) (cheaper-inference#12055) Resynced onto the release tip after cheaper-inference#12051/cheaper-inference#12052/cheaper-inference#12053 landed. Same LKGP-clear conflict as cheaper-inference#12053 (kept the current clearStaleLKGP() helper at both call sites). One additional issue this final phase's combined-worktree validation surfaced: clearStaleLKGP() itself (added by cheaper-inference#12013, which none of the 4 phase PRs could have seen since it landed after they were authored) still had a dynamic `await import("@/lib/localDb")` — a real break once this PR deletes the barrel. Fixed to `await import("@/lib/db/settings")`, matching the direct-import pattern used at every other call site. typecheck:core, check-db-rules, check:cycles, and the eslint-import-boundaries regression test (3/3, including "G14 rejects localDb barrel imports") all green after resync — zero barrel-importing production files remain. Nice clean 5-phase migration, and thanks for taking on the full cheaper-inference#11795 cleanup.
muhamadgalihsaputra
pushed a commit
to niyatna/NiyatnaRoute
that referenced
this pull request
Sep 27, 2026
…nce#11699) Boarded with cheaper-inference#11756 (a duplicate fix for the same underlying issue cheaper-inference#11650). Compared both implementations directly: this one is technically superior — guards the json_extract() call with json_valid(metadata) so malformed/legacy metadata returns no match instead of throwing a 500, and covers genericBackend.ts/obsidianBackend.ts in addition to sqliteBackend.ts. cheaper-inference#11756 only touched SQLite and had no malformed-JSON guard. Closing cheaper-inference#11756 with credit. Resynced onto the updated release tip: the test file's `await import("../../src/lib/localDb.ts")` broke after cheaper-inference#12055 deleted the barrel earlier this session (your branch forked before that migration) — fixed to import updateSettings directly from @/lib/db/settings, matching the pattern already used by other integration tests. typecheck:core, check:dashboard-typecheck, check:file-size, check:changelog-integrity, check:complexity, check:cognitive-complexity, check:cycles, check-deps all green; 4/4 integration + 35/35 vitest pass after resync. Thanks for the thorough, well-tested fix.
muhamadgalihsaputra
pushed a commit
to niyatna/NiyatnaRoute
that referenced
this pull request
Sep 27, 2026
… on release/v3.8.51 after the barrel deletion (cheaper-inference#12055) (cheaper-inference#12087) * test(cli): align the nodes --base-url contract test with cheaper-inference#12033 cheaper-inference#11860 asserted that `nodes add/update/validate` must NOT register `--base-url` (reserved for the global server target); cheaper-inference#12033 (issue cheaper-inference#11999) then registered it on purpose so `omniroute nodes add --provider p --base-url <url>` stops being rejected by Commander's global option. Both PRs landed and the older test turned the base red on unit shard 2/4 (`Unit Tests fast-path (2/4)`, run 33293442568). The test now asserts the current contract: both flags are registered and each parses into its own option; the server-target/payload separation keeps its own test right below. * test(mutation): register lkgp-stale-pin-exhaustion-11911 in tap.testFiles 70da2e1 (cheaper-inference#11911) added a unit test covering src/shared/utils/circuitBreaker.ts without listing it in stryker.conf.json tap.testFiles, so check:mutation-test-coverage --strict (Fast Quality Gates) is red on the release tip. * fix(db): drop three consumer-less 1proxy exports the deleted localDb barrel was masking e475342 (cheaper-inference#12055) removed the @/lib/localDb barrel; its re-exports were the only thing keeping getOneproxyStats / deleteOneproxyProxy / clearAllOneproxyProxies (and the private mapStatsRow + OneproxyStats type) 'used' for knip. The 1proxy routes are 308 compat redirects to /api/settings/free-proxies since v3.8.4, so nothing calls them: check:dead-code went 413 -> 419 on the release tip (baseline 416). Back to 416 with typecheck:core, eslint and check:db-rules green. * chore(mutation): drop the duplicate tap.testFiles entry — cheaper-inference#12082 already registered it
muhamadgalihsaputra
pushed a commit
to niyatna/NiyatnaRoute
that referenced
this pull request
Sep 27, 2026
… dead DB exports, dead settings tab and flag, docs (cheaper-inference#12091) (cheaper-inference#12290) The 1proxy marketplace integration was decommissioned in v3.8.4; the code survived only through the localDb barrel, deleted in cheaper-inference#12055. Everything below had zero consumers (grep-proven across src/, open-sse/, bin/, electron/, scripts/ and tests/): - src/lib/oneproxySync.ts and src/lib/oneproxyRotator.ts deleted. - src/lib/db/oneproxy.ts: upsertOneproxyProxy, getOneproxyProxyById, getOneproxyProxyForRotation and markOneproxyProxyFailed removed (their only consumers were the two deleted modules); listOneproxyProxies and the record interface stay — open-sse/utils/proxyFallback.ts still uses them. - src/shared/validation/oneproxySchemas.ts and the unmounted settings/components/OneproxyTab.tsx deleted (no importer anywhere; the live UI is the FreePool* tabs over /api/settings/free-proxies). - ONEPROXY_ENABLED feature flag removed (readerless since oneproxySync died — the toggle no longer controlled anything); flag-count contract test aligned 54 → 53. - Docs: PROXY_GUIDE (component rows, env rows, the three omniroute/ oneproxyRotator snippet sections), CODEBASE_DOCUMENTATION, REPOSITORY_MAP, ENVIRONMENT (ONEPROXY_* rows), FEATURE_FLAGS, .env.example — canonical + pl/zh-CN/zh-TW mirrors. - The 308 compat redirects under /api/settings/oneproxy/ stay (deliberate API compat), as do the live free-proxy provider and proxy_registry rows. check:dead-code drops 424 → 417 (baseline kept at the velocity-phase 500 — banking shrinks is paused until v4.0, headroom grows to 16.6%). check:docs-all, check:env-doc-sync, typecheck:core and the 8 free-proxy/ proxy-fallback test files are green. Closes cheaper-inference#12091
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #11795 — Phase 5 (final) of the phased migration off the
@/lib/localDbbarrel.What
Deletes
src/lib/localDb.ts(the 850-line pure re-export barrel) now that every consumer imports directly from the owningsrc/lib/db/*modules. This is the end-state of the phased plan: Phases 2-4 (PRs #12051, #12052, #12053) migrated all 199 non-test consumers; this phase migrates the remaining 61 test files (namespace and destructured dynamic imports, incl..ts-suffixed relative paths) and removes the barrel.How
Mechanical only — no behavior change:
const localDb = await import("@/lib/localDb")) are resolved via the TS-compiler export map into per-module imports, with a mergedlocalDbfacade object preserved so existing call sites (localDb.x(...)) stay validsrc/models/index.tsre-exports stay intact (already split per-module in Phase 4)AGENTS.md(root +src/lib/db) and inline doc comments updated to reflect the barrel no longer existseslint-import-boundariestest keeps its inline@/lib/localDbfixture strings — theno-restricted-importsrule still rejects barrel imports, so the rule remains the enforcement gateVerification
typecheck:coregreeneslinton all 272 changed files green (0 errors)check:cyclesgreenRebased onto current
release/v3.8.51tip (34e2f84c0).