feat(proxy): support multiple local core endpoints, one per line - #13923
Merged
diegosouzapw merged 1 commit intoSep 18, 2026
Merged
diegosouzapw merged 1 commit into
diegosouzapw merged 1 commit into
Conversation
maxmad64bis
force-pushed
the
feat/s3-plural-core-endpoints
branch
from
September 16, 2026 20:57
792d018 to
9f25671
Compare
maxmad64bis
force-pushed
the
feat/s3-plural-core-endpoints
branch
from
September 16, 2026 21:06
9f25671 to
d13fca2
Compare
maxmad64bis
marked this pull request as ready for review
September 16, 2026 21:09
Owner
|
Thanks @maxmad64bis — merging via the release merge-train. Validated in local merge-train (.claude/worktrees/merge-train-20260918-111718-suite.log) on the devbox @ train tip 7bb373fba5e241964c0ffb17bd03a804700839bb, boarded with 55 sibling PRs: typecheck:core, file-size, complexity, cognitive-complexity, changelog-integrity green; 747/747 changed-area node:test cases + 476/476 vitest green (fast parity mode — the full suite ran today on the release tip via the base-red train and runs again on the 3b train). Merged --admin per merge-gates §7. |
diegosouzapw
merged commit Sep 18, 2026
fc6b458
into
diegosouzapw:release/v3.8.51
18 of 25 checks passed
Merged
muhamadgalihsaputra
pushed a commit
to niyatna/NiyatnaRoute
that referenced
this pull request
Sep 27, 2026
…gosouzapw#13923) Co-authored-by: Max <maxmad64@gmail.com>
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.
Summary
A subscription holding tunnelled nodes registers them as one pool member, so rotation has nothing to rotate over. This change lets an operator list several loopback core entries (one per line) and syncs each entry into its own registry row and pool member. A single entry behaves exactly as today.
On the two open questions in #13460: the delimiter is newline (one entry per line in a textarea) — a comma is legal inside userinfo (
socks5://user,name:pass@127.0.0.1:1080parses today), so splitting on commas would break a working entry. On the error shape: neither a new subscription-level code nor a per-membererror/deadthrough the health check, but the existingLOCAL_CORE_ENDPOINT_INVALIDcarrying a redacted per-entrydetail. The health-check branch is inert by default —resolveHealthCheckStatusWritereturns null withoutPROXY_HEALTH_AUTO_DEACTIVATE, and policy C indecision.tsnever mutates a status — so an unreachable member would never showerror/deadon a default install; the proposed signal would have had no producer.Before: single invalid entry →
NEEDS_CORE_NOT_CONFIGURED+ node list. After: single invalid entry →LOCAL_CORE_ENDPOINT_INVALID+ redacted entry; several entries with one rejected →LOCAL_CORE_ENDPOINT_INVALID+ rejected entries while the valid ones keep syncing.Related Issues
Validation
npm run lintTests Added Or Updated
tests/unit/proxySubscription.coreEndpoint.test.ts— parse (multi-line, CRLF, blanks, comma in userinfo kept intact,null/""), redact (userinfo, malformed input, path segment kept).tests/unit/proxySubscription.pluralCore.test.ts— new file: single-entry identical behavior, N entries into N rows visited by rotation, gate-rejected vs unreachable distinguished indetail, re-sync keeps row id and assignments, entry removed from the field deletes its row, scheme collision on one key keeps one row with a mention,detailcarries no password or userinfo.Coverage Notes
src/lib/proxySubscription/coreEndpoint.ts— covered by the extended unit table (parse + redact + gate).src/lib/proxySubscription/subscriptionService.ts— covered by the new sync suite over real loopback TCP servers and closed ports (no ESM stubs): per-entry gate, dedup, informative probe (Promise.all, verdict feedsdetailonly), conditional naming, stale-removal unchanged. feat(proxies): show how many egress IPs actually served a proxy pool #13581 (pool egress observation) is the post-merge check that the pool finally serves distinct exits.SubscriptionTab.tsx+en/vistrings — textarea swap only, no logic; placeholder/desc updated.Reviewer Notes
https→ 443 else 8080), not the raw entry, because the probe's own scheme default (socks5→ 1080) disagrees with the row rule on port-less entries.Promise.all(independent TCP reads); upserts stay sequential. Verdict feeds the warningdetailonly — a row is created even when its core is unreachable, so a transient outage never deletes a row and its operator assignments. This is safe at selection time since feat(proxies): stop re-serving a proxy that just failed #13578: a failing entry is skipped on its own at request time.LOCAL_CORE_ENDPOINT_INVALIDcarries the redacted per-entrydetail, one entry keeps the historic name and behavior.(host, port, username)keying, so the old row is replaced like any key change.API Route Typecheckred is inherited, not this PR:src/lib/providerModels/modelDiscovery.ts TS2345 (baseline 0, live 1)reproduces on the bare base with zero commits of this PR (ephemeral worktree ata928ea8762; PR rebased onf1e7148c19with focused checks re-run green), introduced upstream without a rebaseline. Unit + gates qualified 2026-09-16 (§12: normalized✖lists vs same-base PR fix(providers): select and verify the requested gemini-web model/mode before answering (#13381) #13919 + local re-runs at the head):codex #2331(getForcedReasoningEffortchain, tip codex commit) andsettings-i18n(ReasoningRoutingRulesmissing EN, tip reasoning commit) both fail locally with zero PR files involved; no✗gate line cites a PR file — all reds inherited, none actionable in this PR.