Skip to content

feat(proxylogs): show registry proxy name in proxy log columns - #12814

Merged
diegosouzapw merged 4 commits into
diegosouzapw:release/v3.8.51from
tiangao88:feat/proxy-name-proxy-logs
Sep 18, 2026
Merged

diegosouzapw merged 4 commits into
diegosouzapw:release/v3.8.51from
tiangao88:feat/proxy-name-proxy-logs

Conversation

@tiangao88

@tiangao88 tiangao88 commented Sep 5, 2026 •

Copy link
Copy Markdown
Contributor

Problem

The Proxy Logs page (/dashboard/logs/proxy) renders the "Proxy" column as
host:port. When several registry entries share one gateway (e.g. a
multi-country residential pool), every row shows the same string and operators
cannot tell which configured proxy handled a request. The registry already
stores a human-meaningful name per proxy.

Cause

toRegistryProxyResolution (mappers) attaches name to the runtime proxy
object, but ProxyInfo in src/lib/proxyLogger.ts does not carry it — the
name is dropped at the persistence boundary and never rendered.

Change

  • Ship proxy_name as migration 181_proxy_logs_proxy_name.sql, with the
    version-keyed idempotency check in migrationRunner (same shape as 179's
    upstream_status), so fresh installs and existing databases both get the
    column. The ensureProxyLogsColumns ALTER heal stays as the boot-time
    belt-and-suspenders. src/lib/db/core.ts is deliberately left untouched —
    its frozen file-size ratchet stays at 1770 lines.
  • Carry name through ProxyInfo; persist and hydrate it.
  • Render the name in the ProxyLogger table column and the ProxyLogDetail pane,
    falling back to host:port (and type://host:port) for legacy/direct rows.
  • Include the name in the [ProxyEgress] log line (new formatProxyEgressConsoleLine
    formatter) and in the log search.

Tests

tests/unit/proxy-logger-name.test.ts — name carried on the log entry,
persists + hydrates from SQLite, search matches name, legacy no-name rows
hydrate cleanly. tests/unit/migration-181-proxy-logs-proxy-name.test.ts —
the migration adds the column on a database that lacks it, and is recorded
without re-adding it when the boot heal already ran (no cross-talk with 179).
Related proxy-logger + migration suites remain green (14/14). The detail-pane
label moved into a module-scope helper so the component's cyclomatic
complexity stays inside the ratchet.

Notes

Non-breaking: existing rows without a name still render host:port.
Rebased onto the current release/v3.8.51 tip (0cc016936); changelog
fragment in changelog.d/features/.

@tiangao88
tiangao88 force-pushed the feat/proxy-name-proxy-logs branch from 0aea1b1 to 78cea90 Compare September 5, 2026 19:03
@diegosouzapw

Copy link
Copy Markdown
Owner

Nice, contained fix for a real operator pain point (indistinguishable proxy rows when several
registry entries share a gateway) — the self-heal ALTER TABLE pattern for the new column was
the right call given how far behind this branch is from the current tip; it sidesteps any
migration-numbering collision entirely. Ran your test suite in isolation: 4/4 pass, and a dry
merge against the current release/v3.8.51 tip shows zero conflicts despite the branch being
quite old. Two things needed before merge: rebasing/retargeting onto the current release branch
(this PR still targets the now-superseded release/v3.8.50) so CI runs against the real base,
and a changelog fragment. Once that's done this looks ready to go.

@diegosouzapw
diegosouzapw changed the base branch from release/v3.8.50 to release/v3.8.51 September 15, 2026 11:37
@tiangao88
tiangao88 force-pushed the feat/proxy-name-proxy-logs branch 2 times, most recently from 0ac4af0 to 675985f Compare September 16, 2026 12:20
Tiangao (hermes) and others added 4 commits September 17, 2026 06:30
Registry resolution already attaches name to the runtime proxy object; the
name was dropped at the persistence boundary (ProxyInfo had no name field)
and never rendered. Add proxy_name column (base schema + ALTER heal for
existing DBs), persist/hydrate it, render it in the ProxyLogger table and
ProxyLogDetail pane with host:port fallback, and search by name.

Local-only (PMO City): not submitted upstream. Re-apply after upgrades via
patch file (see pmo-city-builds omniroute/Operator/runbooks/upgrade.md).
The v3.8.50 rebase kept upstream's batched proxy-log persistence
(enqueueProxyLogs/flushProxyLogsSync); logProxyEvent no longer writes
synchronously, so the persist+hydrate test closed the DB before the row
was flushed. Flush explicitly first.
…oxy logs

Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
@tiangao88
tiangao88 force-pushed the feat/proxy-name-proxy-logs branch from 675985f to c9f4fad Compare September 17, 2026 06:31
@diegosouzapw

Copy link
Copy Markdown
Owner

Thanks @tiangao88 — merging via the release merge-train. Validated in local merge-train (merge-train-20260918-130526-suite.log) on the devbox @ train tip 28fb420c9ad860ba275294ebb4ebbecb9da83318 with the sibling PRs of this batch: static gates green; changed-area node:test 293/294 (0 failing) + vitest 482/482 (fast parity — full suite ran today on the tip via the base-red and 3b trains). Merged --admin per merge-gates §7.

@diegosouzapw
diegosouzapw merged commit fda9ef7 into diegosouzapw:release/v3.8.51 Sep 18, 2026
7 of 16 checks passed
diegosouzapw added a commit that referenced this pull request Sep 18, 2026
…proxy_logs.proxy_name)

Maintainer-side count bump after the two migration PRs merged; the docs-counts
gate reads README.md, AGENTS.md and llm.txt (+ its 65 i18n mirrors), all of
which are agent-instruction / protected surfaces the contributor PRs must not
touch. check:docs-counts and check:docs-sync green.
muhamadgalihsaputra pushed a commit to niyatna/NiyatnaRoute that referenced this pull request Sep 27, 2026
…souzapw#12814)

* feat(proxylogs): show registry proxy name in proxy log columns

Registry resolution already attaches name to the runtime proxy object; the
name was dropped at the persistence boundary (ProxyInfo had no name field)
and never rendered. Add proxy_name column (base schema + ALTER heal for
existing DBs), persist/hydrate it, render it in the ProxyLogger table and
ProxyLogDetail pane with host:port fallback, and search by name.

Local-only (PMO City): not submitted upstream. Re-apply after upgrades via
patch file (see pmo-city-builds omniroute/Operator/runbooks/upgrade.md).

* test(proxylogs): flush batched writes before asserting persisted row

The v3.8.50 rebase kept upstream's batched proxy-log persistence
(enqueueProxyLogs/flushProxyLogsSync); logProxyEvent no longer writes
synchronously, so the persist+hydrate test closed the DB before the row
was flushed. Flush explicitly first.

* test(proxylogs): drain batched queue in resetStorage to avoid cross-test row bleed

* docs(changelog): add changelog fragment for proxy registry name in proxy logs

Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>

---------

Co-authored-by: Tiangao (hermes) <montigaud@aikumi.pro>
Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
muhamadgalihsaputra pushed a commit to niyatna/NiyatnaRoute that referenced this pull request Sep 27, 2026
… seed, diegosouzapw#12814 proxy_logs.proxy_name)

Maintainer-side count bump after the two migration PRs merged; the docs-counts
gate reads README.md, AGENTS.md and llm.txt (+ its 65 i18n mirrors), all of
which are agent-instruction / protected surfaces the contributor PRs must not
touch. check:docs-counts and check:docs-sync green.
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.

2 participants