Skip to content

feat(proxies): accept operator-provided dated egress observations for pool members - #15314

Open
maxmad64bis wants to merge 1 commit into
diegosouzapw:release/v3.8.52from
maxmad64bis:feat/operator-egress-observations
Open

maxmad64bis wants to merge 1 commit into
diegosouzapw:release/v3.8.52from
maxmad64bis:feat/operator-egress-observations

Conversation

@maxmad64bis

@maxmad64bis maxmad64bis commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ base-red inherited: #15306

Summary

Adds an opt-in way for an operator to tell OmniRoute which exit addresses a pool member currently uses, with the date of the observation. Today the only source is OmniRoute's own echo probe, cached for a few minutes, which is wrong as soon as a member switches nodes behind one port. With PROXY_OPERATOR_EGRESS_ENABLED on, fresh rows are used for ordering and shown in the pool view as "operator-provided, dated"; a stale row counts as absent, and the freshest observation wins. Off by default: no behavior change without the flag.

Related Issues

Validation

  • Change type: routing
  • Focused tests and category gates from the golden path
  • npm run lint
  • Reconciled with the current active release base; focused checks rerun afterward — rebased on the current release base; focused tests rerun
  • Production-code changes include a new or updated automated test in this PR

Tests Added Or Updated

  • tests/unit/proxy-operator-egress-store.test.ts (new, 10 cases: schema rejections, idempotent upsert, freshest-wins, expiry, caps and eviction, concurrent pushes)
  • tests/unit/proxy-operator-egress-route.test.ts (new, 11 cases: 404 flag off, 401 without auth, 400 all-rejected, 200 with ignored counting)
  • tests/unit/proxy-operator-egress-reader.test.ts (new, 7 cases: 3-address set, freshness crossover both ways, flag-off identical, cache-then-expire)
  • tests/unit/proxy-operator-egress-migration.test.ts (new, 1 case: table, key, index)
  • tests/unit/proxy-operator-egress-i18n.test.ts (new, 1 case: keys present in all locales, component wiring)
  • tests/unit/proxy-pool-member-egress-route.test.ts (updated: source: null in one pinned body)
  • tests/unit/ui/PoolMemberEgressLines.test.tsx (updated: operator line, forward compatibility)
  • tests/unit/feature-flags-settings.test.ts + tests/unit/server-owned-tool-loop-flag.test.ts (updated: flag count 80 to 81)

Coverage Notes

  • src/lib/db/proxyOperatorEgress.ts: store, reader, route, migration tests
  • src/lib/db/proxies/rotation.ts: reader tests (merged set, freshest, flag-off path)
  • src/lib/proxyPoolEgressObservation.ts: reader and member-egress route tests
  • src/app/api/settings/proxies/operator-egress/route.ts: route tests
  • src/app/api/settings/proxies/pool/member-egress/route.ts: member-egress route tests
  • src/app/(dashboard)/dashboard/settings/components/PoolMemberEgressLines.tsx: UI tests
  • src/shared/network/egressAddress.ts: store and reader tests via validation paths
  • src/shared/constants/featureFlagDefinitions.ts + src/shared/utils/featureFlags.ts + src/shared/validation/schemas/proxy.ts: pinned by flag count and route rejection tests

Reviewer Notes

This branch has not been deployed

No deployments
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.

feat(resilience): accept operator-provided dated egress observations for core entries

1 participant