sameEndpoint function

bool sameEndpoint(
  1. String a,
  2. String b
)

Endpoint equality ignoring ONE trailing slash (saved entries, resolved endpoints, and catalog defaults disagree on it routinely) — the ONE rule for "is this endpoint that endpoint": saved-entry matches (key_status), catalog-default classification (key_status, the roles resolver's endpoint-slot probe, startup's preload set) share it, so a trailing-slash spelling can never be custom in one helper and default in another (round-3 review).

Implementation

bool sameEndpoint(String a, String b) {
  String norm(String u) => u.endsWith('/') ? u.substring(0, u.length - 1) : u;
  return norm(a) == norm(b);
}