Skip to content

[defer] feat(dashboard): add per-exit failure breakdown to pool observation - #14749

Merged
diegosouzapw merged 3 commits into
diegosouzapw:release/v3.8.51from
maxmad64bis:fix/pool-failure-breakdown
Sep 25, 2026
Merged

diegosouzapw merged 3 commits into
diegosouzapw:release/v3.8.51from
maxmad64bis:fix/pool-failure-breakdown

Conversation

@maxmad64bis

@maxmad64bis maxmad64bis commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ base-red inherited: #14547

Summary

Pool members that fail requests are invisible as a group: the pool screen shows per-member egress traffic but nothing about which exits fail and why, so an operator cannot tell a refusing exit from a quiet one. The egress-observation endpoint now also returns a per-exit failure breakdown (grouped by egress IP and call-log error family, with an explicit unattributed bucket for rows without correlation), and the pool screen shows a 24 h summary card plus per-exit detail. The derived dedup table is wrapped so SQLite never merges unknown into server_error.

Related Issues

No linked issue — pool failure attribution is a new observability surface with no prior ticket.

Validation

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

Tests Added Or Updated

  • tests/unit/pool-failure-breakdown.test.ts (new, 18 tests with oracle): scalar-subquery form wrapped in a derived table — the unwrapped form merges unknown into server_error under SQLite (red 1/2, verified); real base 43k/101k rows: no more MATERIALIZE, 40→20 ms, same rows; 18/18 green on the head.
  • tests/unit/ui/PoolEgressObservation.test.tsx (7 tests): summary card + per-exit detail render; 7/7 green.

Coverage Notes

  • New query branches (proxyLogs.ts breakdown) and the summary/detail UI hunks are covered by the new tests.
  • No coverage movement beyond the new branches, all asserted.

Reviewer Notes

  • Query shape: the correlated scalar subquery (SELECT c.error_type ... ORDER BY c.rowid LIMIT 1) AS family is wrapped in a derived table before the outer GROUP BY — the Fait-vs-spec curve (unwrapped = unknown absorbed) is locked by the oracle test.
  • EXPLAIN on the real base: SEARCH c USING INDEX idx_cl_correlation_id, no MATERIALIZE, 40→20 ms, identical rows.
  • Overlap: shares read-only proxyRefusalMemory.ts with feat(webhooks): notify when a pool member is set aside #14755 (this PR only reads it); the B6-part symbols + Contingency removal are done in this head.

Maintainer rework (merge-batch 2026-09-24)

  • The failure lines reused the traffic sentence (poolEgressObservation) and the empty-state sentence (poolEgressObservationEmpty), so N failures via one exit read "1 exit used by N connections · up to N on one exit" and the unattributed remainder read "No traffic observed in the last 24 h (N)". Added dedicated keys proxyRegistry.poolEgressFailuresByExit / proxyRegistry.poolEgressFailuresUnattributed, translated in all 67 locale files (no __MISSING__ markers).
  • tests/unit/ui/PoolEgressObservation.test.tsx now asserts the dedicated keys and that the traffic/empty sentences are not reused (red on the previous head, green after), plus a case where every failure has an exit.
  • Merged release/v3.8.51 (clean).

@maxmad64bis
maxmad64bis force-pushed the fix/pool-failure-breakdown branch from b396f7e to bd38031 Compare September 24, 2026 12:56
@maxmad64bis
maxmad64bis marked this pull request as ready for review September 24, 2026 13:46
@maxmad64bis
maxmad64bis marked this pull request as draft September 24, 2026 23:41
@maxmad64bis
maxmad64bis force-pushed the fix/pool-failure-breakdown branch from bd38031 to 2fede0b Compare September 25, 2026 00:12
@maxmad64bis
maxmad64bis marked this pull request as ready for review September 25, 2026 01:01
The per-exit failure breakdown reused the traffic sentence
(poolEgressObservation) and the empty-state sentence
(poolEgressObservationEmpty), so N failures via one exit rendered as
'1 exit used by N connections · up to N on one exit' and the
unattributed remainder as 'No traffic observed in the last 24 h (N)',
contradicting the counts they show.

Add poolEgressFailuresByExit / poolEgressFailuresUnattributed, translated
in all 67 locale files, and assert the UI no longer reuses the traffic
keys.
@diegosouzapw diegosouzapw added the deferred-v3.8.52 Grande demais / suspeito para o lote atual; precisa de sessão dedicada no ciclo v3.8.52 label Sep 25, 2026
@diegosouzapw diegosouzapw changed the title feat(dashboard): add per-exit failure breakdown to pool observation [defer] feat(dashboard): add per-exit failure breakdown to pool observation Sep 25, 2026
@diegosouzapw
diegosouzapw merged commit 02ead75 into diegosouzapw:release/v3.8.51 Sep 25, 2026
11 of 16 checks passed
@maxmad64bis
maxmad64bis deleted the fix/pool-failure-breakdown branch September 30, 2026 00:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

deferred-v3.8.52 Grande demais / suspeito para o lote atual; precisa de sessão dedicada no ciclo v3.8.52

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants