Skip to content

[finding] A live-reading better-auth stamp in admin-sso-bridge-gate.test.ts stays unattributed — its package name is one paragraph away #14020

Description

@claude

Found while implementing #13981 (PR #14017), which rebuilt the attribution half of
scripts/check-vendor-version-stamps.mjs. Filed unassigned, and not repaired in that PR —
see the last section for why the obvious repair is the one that card measured and rejected.

The stamp

packages/plugins/plugin-auth/src/admin-sso-bridge-gate.test.ts:271

it('measured vendor posture (installed 1.7.1): an org-less /sso/register admits any authenticated user', async () => {

"installed 1.7.1" is a present-tense claim about this tree. The family pins ^1.7.2 since
#13938, so 1.7.1 is not what installs — the sentence is false, not merely stale. That is
exactly the class the gate exists to hold, and it is the shape #13962 repaired one level up.

Why the gate cannot judge it

The stamp is a SITE (a family name is within the window) but it is unattributed — counted,
never judged. The nearest better-auth mention is four lines earlier, in a different
paragraph of the comment block, separated by a bare // line:

// If a vendor bump turns this red with a 401/403 instead, better-auth has
// started refusing non-admins itself — the ObjectStack gate then stands as
// pure ADR-0068 D4 defense-in-depth; re-measure and update the posture notes
// rather than deleting the gate.
//
it('measured vendor posture (installed 1.7.1): …

After PR #14017 a name reaches to the end of its SENTENCE and no further; a blank or
decoration-only line ends the paragraph. So declining this one is the rule working as
designed, not a bug in it — but the stamp is real and the gate is silent on it.

⛔ The obvious repair is the one #13981 rejected with numbers

Reaching further is not free. Measured on the code corpus at PR #14017's head, the legacy
character window at gap 400 does attribute this site — and in the same sweep it reds
packages/plugins/plugin-auth/src/auth-manager.ts:3125, "That bridge dates from 1.6.20,
where @better-auth/sso hardcoded the model"
, a permanently true historical sentence, by
reaching past a sentence boundary and picking up "installed" from the NEXT sentence. A red
whose only available repair turns a true sentence into a false one is worse than silence —
the ruling #13981 was filed on.

So this is not "widen the reach". Candidate directions, none of them free:

  1. Scope the stamp instead of the detector. Rewrite the test title to "the then-installed
    1.7.1". Removes this instance; leaves the class. One line, and the gate can never
    regression-test it.
  2. Attribute within a comment BLOCK when it names exactly one watched package. The
    paragraph break stops the reach today; a block-level rule with a uniqueness condition
    ("no other package is named anywhere in this block") could bind it without reaching past a
    competing claimant. Needs the same before/after sweep [finding] The vendor-version-stamp gate does not cover content/docs, and adding it to ROOTS is measurably insufficient #13981 used, over both populations,
    with the CONTESTED column at zero.
  3. Accept it. --census reports every unattributed site, so it is visible without being
    enforced; the gate's documented safe state is "counted and reported, never judged".

Reproduce with node scripts/check-vendor-version-stamps.mjs --attribution-sweep and
--list on the branch of PR #14017.

Not addressed here

This is a separate matter from #13981, which is about the docs root and prose-distance
attribution; that card remains as scoped.


Generated by Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions