Skip to content

Commit f8685bb

Browse files
committed
chore(gates): declare the list-user-invitations endpoint conformant in PLUGIN_ROUTE_MODULES
The module added for the declared-verification fix writes a Hono response, so the route-envelope walk discovers it, and a discovered file absent from the table is an ERROR rather than a default. Measured with the gate's own `scanHonoRouteSource`: one body, all six asserted counters zero. The single write is `return ctx.json(pendingInvitations)`, whose argument is an identifier -- the deliberate relayed-body blindness -- and the three refusals are `throw APIError.*`, which this surface does not count. So `{}` is the honest declaration: nothing this file builds departs from the envelope. No ruled state applies and nothing was hoisted. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012zTkyNHJ7TkuN2oXtP5x37
1 parent c62690f commit f8685bb

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

scripts/check-route-envelope.mjs

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -758,6 +758,30 @@ const PLUGIN_ROUTE_MODULES = {
758758
// our own shells, and the migration was one key.
759759
'packages/adapters/hono/src/index.ts': {},
760760

761+
// [#16569] FIRST AUDIT — swept in by the walk, verdict conformant. The module
762+
// rebuilds better-auth's `/organization/list-user-invitations` endpoint in place
763+
// so the DECLARED `requireEmailVerificationOnInvitation` is honoured, and it
764+
// BUILDS exactly ONE body: `return ctx.json(pendingInvitations)`. The argument
765+
// is an IDENTIFIER, so the counters read it as relayed — the same deliberate
766+
// blindness `inbound-rate-limit.ts` sits behind on surface 4 — and what it names
767+
// is better-auth's own rows: the vendor's exported
768+
// `getOrgAdapter(ctx.context, options).listUserInvitations(email)` produces them
769+
// and the vendor's `status === 'pending'` post-filter narrows them. No shape is
770+
// minted here, so there is no literal for a counter to read and none to hoist.
771+
// The three refusals are `throw APIError.*` — the vendor's flat
772+
// `{ message, code }`, RAISED rather than written — which this surface does not
773+
// count either; the single countable write is therefore the file's whole visible
774+
// departure, not a sample of it.
775+
//
776+
// Worth keeping distinct from its twin: `admin-impersonate-endpoint.ts` below
777+
// takes the SAME in-place-rebuild door in this same package and needed the
778+
// `vendorWire` ruling, because reimplementing that handler turned a relay into a
779+
// BUILT literal (`ctx.json({ session, user })`) and made a vendor-owned shape
780+
// visible to the counters. Here the rebuild never re-shapes the body, so nothing
781+
// became visible and no ruled state applies. Read this `{}` for what it is:
782+
// nothing this file BUILDS departs from the envelope.
783+
'packages/plugins/plugin-auth/src/list-user-invitations-verification.ts': {},
784+
761785
// ── Ratchet: real, tracked, NOT blessed ─────────────────────────────────
762786
//
763787
// Measured by #9267 when this surface was added, not chosen. Each entry names

0 commit comments

Comments
 (0)