Skip to content

check-route-envelope: add a fourth surface-3 state for vendor-endpoint wire format (maintainer ruling 2026-08-21) #10554

Description

@os-elon

Maintainer ruling (2026-08-21, delivered live in the PM session — verbatim, untranslated)

A:新增 vendor 状态 — surface 3 增设第四状态「vendor wire format」——surface 2 已裁 kind 3 的对应物。仍被计数(封闭在 N 条)、note 强制点名 vendor/读者/契约伙伴、增改 MAINTAINER-ONLY,并把 const 提升规避具名写进门禁散文。

Chosen over (B) widening the exempt grammar with a second adjudicated class, and over (C) probing a relay/delegation route first. The full escalation that produced this fork is on PR #10352 (comment 5364581437): the success body { session, user } at admin-impersonate-endpoint.ts:254 is better-auth's own wire format — the endpoint passes through the vendor's published OpenAPI schema, authClient.admin.impersonateUser reads that shape, and the contract partner /admin/stop-impersonating (entirely vendor-side) returns the same bare shape. Surface 2 already names this class kind 3 ("a foreign wire format a client library requires") and treats relayed instances as by-design invisible; this body became visible only because the handler was reimplemented in-repo, turning a relay into a built literal. All three existing declarations were measured dishonest for it: {} stays red, ratchet asserts a conversion that can never happen, exempt is #9389's closed pre-auth class — the opposite population.

Scope (all in scripts/check-route-envelope.mjs)

  1. New surface-3 state (name is the implementer's design choice, e.g. vendorWire): a RULED classification for a body this repo builds but whose shape is a vendor's wire format.
  2. Record the evasion by name in the gate's prose: hoisting a body literal to a const and passing the identifier makes the gate go green with zero wire change — write it down as a forbidden move so the next agent hitting this class of red does not rediscover it as a fix.
  3. Self-test coverage (--self-test) for the new state: accepted with note, rejected without note, rejected alongside ratchet/exempt, MAINTAINER-ONLY diagnostic on widening.

Mechanism assumption (measure, do not assume)

Whether the table entry for packages/plugins/plugin-auth/src/admin-impersonate-endpoint.ts can land HERE is undetermined: that file exists only on PR #10352's branch, and a table entry for an undiscovered file may itself be an error. Default expectation: this card ships the machinery + prose + self-test only on main; PR #10352's own branch then merges main and adds its entry under the new state. If measurement shows a dormant entry is tolerated (or trivially tolerable), say so in the report — the maintainer ruling covers the classification either way.

Unblocks

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions