Repository navigation
Conversation
Contributor
There was a problem hiding this comment.
ℹ️ Minor suggestions only — one localization-catalog entry plus two nitpicks. No behavioral issues found; the cell-derivation and log-structure design is sound.
Reviewed changes
- Region-probe logging — new
[relay-region]one-line JSON events (relay_region_probe/relay_region_self_heal) emitted fromRelayRegionPreferenceResolvervia alogEventsink, withrefreshReason()deriving the choice reason and constructors for override / cache-hit / catalog-failure / refresh outcomes. - Cell naming —
MobileRelayStatusDetailthreads an optionalcellUrlfrom broker → coordinator → IPC → preload → pairing panel;relayStatusCellUrl()keeps the cell only forregistered/draining, and the coordinator re-derives it frombroker.endpoint.cellUrlso a republish never blanks what the broker set. - Catalog-fetch extraction —
fetchRelayRegionCatalog+relayDirectorHostmoved torelay-region-catalog-fetch.ts;measureRegionnow returns aRelayRegionProbeReport(warmup/kept/min/spread/verdict).
ℹ️ Nitpicks
refreshReason(src/main/runtime/relay/relay-region-probe-log.ts) labels an empty catalog (regions: [], whichRelayRegionCatalogSchemapermits) asall-unreachable, sincereports.every(...)is vacuously true on an empty array. The behavior (withhold hint, 1h TTL) is still correct; only the log label is off.- The self-heal early-return path where the best measured region equals the cached region (
best-matches-cache) and theno-region-measuredoutcome (all regions unreachable during self-heal) are reachable but untested, as isrefreshReason'sall-rejectedbranch.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
Jinwoo-H
force-pushed
the
relay/region-probe-warm-up
branch
from
September 7, 2026 08:35
63d18cc to
28529cd
Compare
A desktop silently pinned itself to a far relay region for a day and every phone connect paid the round trip. Nothing in the desktop logs said which regions were probed, what they measured, why one was rejected, or which cell the host landed on, so the only way to diagnose it was a bench harness. The resolver now emits one line per outcome. A refresh carries every region's probe origins, the discarded warm-up, the kept samples, the minimum, the spread, and a verdict, then the chosen region or no-hint with the reason it withheld one. Cache hits, diagnostic overrides, and a director that cannot list its regions each get their own line so a quiet run is never ambiguous. Self-heal logs the cached region, the best measured region, the assigned cell's round trip, and whether it kept or deleted the cache. Only a refresh reports a catalog failure; a self-heal never chose a region, so a line saying it withheld a hint would be a lie. Relay status now carries the assigned cell so the pairing panel can name it. The field is optional because an offline host holds no assignment and the web client answers from a stub that never has one. Splitting catalog fetching out of the preference module keeps both files inside the line budget without a lint disable.
The origin pool publishes offline while it still holds the assignment it is about to rotate, so the panel kept naming a cell nothing was served from. The same class of bug hid a second instance: the coordinator republishes registered right after the broker announces its cell, and that republish carried no cell, blanking the value moments after it was set. The cell would never have reached the panel in the real flow. Deriving the cell from the status at each publisher removes both. The rule lives beside the status type because it defines when the optional field is populated, and the coordinator reads the owned broker's endpoint rather than trusting a call site to remember to pass it.
Jinwoo-H
force-pushed
the
relay/region-probe-logging
branch
from
September 7, 2026 08:36
09af1b9 to
41a1254
Compare
Contributor
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
- Localization-catalog fix — added the missing
relayCellkey tosrc/renderer/src/i18n/locales/en.json, resolving the priorverify:localization-catalogfailure onMobilePairingConnectionOptions'translate()call.
The remaining prior-review nitpicks (the empty-catalog refreshReason label and the untested self-heal/all-rejected branches) are unchanged and non-blocking; no new behavioral surface was introduced by the rebase onto the updated base.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
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.

Stacked on #19233
Base is
relay/region-probe-warm-up. Retarget tomainafter #19233 merges.Why
A desktop silently picked a far relay region for a day and every phone connect paid ~10 s. Nothing in the desktop logs said which regions were probed, what the samples were, why a region was rejected, or which cell the host ended up on. Diagnosing it took a bench harness.
What
[relay-region]JSON events in the main process:relay_region_probeper refresh: per region the origins, discarded warm-up sample, kept samples, min, spread, verdict (measured/rejected-spread/unreachable), then the chosen region or no hint with a reason (measured,held-previous,sole-survivor-forbidden,all-rejected,all-unreachable,catalog-unavailable,override,cached), whether the outcome was cached, and its TTL.relay_region_self_healper check: cached region, best measured region and latency, assigned cell URL and latency, decision, reason.MobileRelayStatusDetail.cellUrl(optional) on the relay status IPC, rendered in the pairing panel as a muted line. A shared rule keeps the cell only forregisteredanddraining, applied in the broker and the auth coordinator so an offline or reconnecting status never shows a stale cell.relay-region-catalog-fetch.ts(max-lines).No secrets reach either log line: fields are hostnames, catalog-validated origins, region names, latencies, enums, booleans. The status payload travels only over Electron IPC (main, preload, renderer ship together); the event shape changed from a bare string to an object, so do not cherry-pick one half.
Verification
pnpm tc(node, cli, web), relay + mobile IPC + panel tests (18 files, 199 tests),check:code-quality:changed0 across 21 files, react-doctor 0 new, oxlint clean, no max-lines disables.Not for merge until the owner gives the go.