Skip to content

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 into
release/v3.8.51from
fix/release-v3.8.51-basereds-cli-nodes-base-url
Aug 30, 2026
Merged

diegosouzapw merged 6 commits into
release/v3.8.51from
fix/release-v3.8.51-basereds-cli-nodes-base-url

Conversation

@diegosouzapw

@diegosouzapw diegosouzapw commented Aug 30, 2026 •

Copy link
Copy Markdown
Owner

Why

release/v3.8.51 is red on Unit Tests fast-path (2/4) since 5698769aba (#12033): tests/unit/cli-program.test.ts → nodes endpoint commands reserve --base-url for the global server target fails with actual: true, expected: false (reproduced on the pure tip; e.g. run 33293442568).

Contract conflict between two merged PRs: #11860 asserted the three nodes subcommands must not register --base-url; #12033 (issue #11999) registers it on purpose so omniroute 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 --endpoint and --base-url are registered on add/update/validate and 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) added tests/unit/lkgp-stale-pin-exhaustion-11911.test.ts (covers src/shared/utils/circuitBreaker.ts) without registering it in stryker.conf.json tap.testFiles; check:mutation-test-coverage --strict reports 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. Diffing knip --reporter json between 38e2baa879 (413) and the new tip isolates exactly 6 new dead exports, all in src/lib/db/oneproxy.ts, exposed when #12055 deleted the @/lib/localDb barrel that re-exported them (the 1proxy routes have been 308 redirects since v3.8.4). Dropped the three with zero consumers (getOneproxyStats, deleteOneproxyProxy, clearAllOneproxyProxies + private mapStatsRow/OneproxyStats) → 416 = baseline; typecheck:core, eslint, check:db-rules green. The other three are consumed only by the orphan oneproxySync.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.

#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.
…iles

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.
@diegosouzapw diegosouzapw changed the title test(cli): align the nodes --base-url contract test with #12033 (base-red on unit shard 2/4) test: fix the two base-reds on release/v3.8.51 — nodes --base-url contract (#12033) + tap.testFiles drift (#11911) 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.
@diegosouzapw diegosouzapw changed the title test: fix the two base-reds on release/v3.8.51 — nodes --base-url contract (#12033) + tap.testFiles drift (#11911) fix: the three base-reds on release/v3.8.51 — nodes --base-url contract (#12033), tap.testFiles drift (#11911), dead-code +6 after the barrel deletion (#12055) Aug 30, 2026
…e-v3.8.51-basereds-cli-nodes-base-url

# Conflicts:
#	tests/unit/cli-program.test.ts
@diegosouzapw diegosouzapw changed the title fix: the three base-reds on release/v3.8.51 — nodes --base-url contract (#12033), tap.testFiles drift (#11911), dead-code +6 after the barrel deletion (#12055) fix(db): drop three consumer-less 1proxy exports — dead-code base-red on release/v3.8.51 after the barrel deletion (#12055) Aug 30, 2026
@diegosouzapw
diegosouzapw merged commit ccee48d into release/v3.8.51 Aug 30, 2026
20 checks passed
@diegosouzapw
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant