fix(db): drop three consumer-less 1proxy exports — dead-code base-red on release/v3.8.51 after the barrel deletion (#12055) - #12087
Merged
diegosouzapw merged 6 commits intoAug 30, 2026
Conversation
#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.
…e-v3.8.51-basereds-cli-nodes-base-url
…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.
…e-v3.8.51-basereds-cli-nodes-base-url # Conflicts: # tests/unit/cli-program.test.ts
…ady registered it
diegosouzapw
deleted the
fix/release-v3.8.51-basereds-cli-nodes-base-url
branch
August 30, 2026 07:23
muhamadgalihsaputra
pushed a commit
to niyatna/NiyatnaRoute
that referenced
this pull request
Sep 27, 2026
… on release/v3.8.51 after the barrel deletion (diegosouzapw#12055) (diegosouzapw#12087) * test(cli): align the nodes --base-url contract test with diegosouzapw#12033 diegosouzapw#11860 asserted that `nodes add/update/validate` must NOT register `--base-url` (reserved for the global server target); diegosouzapw#12033 (issue diegosouzapw#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 (diegosouzapw#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 (diegosouzapw#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 — diegosouzapw#12082 already registered it
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.
Why
release/v3.8.51is red on Unit Tests fast-path (2/4) since5698769aba(#12033):tests/unit/cli-program.test.ts→ nodes endpoint commands reserve --base-url for the global server target fails withactual: true, expected: false(reproduced on the pure tip; e.g. run 33293442568).Contract conflict between two merged PRs: #11860 asserted the three
nodessubcommands must not register--base-url; #12033 (issue #11999) registers it on purpose soomniroute nodes add --provider p --base-url <url>is no longer rejected by Commander's global option — and its own test (tests/unit/cli-nodes-commands.test.ts) asserts the registration. The later, deliberate contract wins.What
Only the test: it now asserts both
--endpointand--base-urlare registered onadd/update/validateand that each parses into its own option. The server-target vs payload-baseUrl separation is still covered by the next test in the file.Validation
node --import tsx/esm --test tests/unit/cli-program.test.ts tests/unit/cli-nodes-commands.test.ts→ all pass locally (hermetic env).Second base-red (same tip)
Fast Quality Gates →
mutation-test-coverage:38e2baa879(#11911) addedtests/unit/lkgp-stale-pin-exhaustion-11911.test.ts(coverssrc/shared/utils/circuitBreaker.ts) without registering it instryker.conf.jsontap.testFiles;check:mutation-test-coverage --strictreports the drift on the pure tip. Registered it — gate exits 0 locally.Third base-red (tip after the 9 merges of 2026-08-30 ~04:00–05:00Z)
Fast Quality Gates →
dead-code: 419 > baseline 416. Diffingknip --reporter jsonbetween38e2baa879(413) and the new tip isolates exactly 6 new dead exports, all insrc/lib/db/oneproxy.ts, exposed when #12055 deleted the@/lib/localDbbarrel that re-exported them (the 1proxy routes have been 308 redirects since v3.8.4). Dropped the three with zero consumers (getOneproxyStats,deleteOneproxyProxy,clearAllOneproxyProxies+ privatemapStatsRow/OneproxyStats) → 416 = baseline;typecheck:core, eslint,check:db-rulesgreen. The other three are consumed only by the orphanoneproxySync.ts/oneproxyRotator.ts, still referenced by 5 docs — purge tracked in #12091.Update after #12082 landed
#12082 fixed the first two base-reds (CLI contract test +
tap.testFiles) in the meantime; this PR now carries only the dead-code fix (src/lib/db/oneproxy.ts, −79 lines). Merged the base in and kept #12082's version of the test.