Repository navigation
test(plugin-auth): scope the SSO-bridge posture stamp to the then-installed 1.7.1 - #14293
Merged
Merged
Conversation
…talled 1.7.1 The test title read 'measured vendor posture (installed 1.7.1)'. The better-auth family pins ^1.7.2 and the lockfile resolves 1.7.2, so 'installed 1.7.1' was a present-tense claim about this tree that is false, not merely stale. 'then-installed' is the scoping vocabulary check-vendor-version-stamps.mjs itself prescribes (HISTORICAL_SCOPE_MARKERS, remedy (b)) and the spelling already used across this package. The attestation is unchanged: the posture was measured against 1.7.1, and that stays true at every future bump. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WLJQhde67SeTccsmnBVarV
Contributor
📓 Docs Drift CheckNothing in this diff resolved to a documentable surface (no symbol, route or SDK anchor derived from 0 changed package(s)), so this run has no opinion about the docs. What this run could not see
Coarse fallback — 0 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): |
baozhoutao
marked this pull request as ready for review
September 2, 2026 01:49
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #14020
What this changes
One string, in one test title:
Nothing else in the file, and nothing else in the repo. No changeset file — see the route note at the bottom.
Why it was false, not merely stale
installed 1.7.1is a present-tense claim about this tree. Onorigin/mainthe tree says otherwise:So the sentence asserted something about the installed version that the lockfile contradicts.
then-installedis the scoping vocabularyscripts/check-vendor-version-stamps.mjsprescribes for exactly this repair — it is in that script'sHISTORICAL_SCOPE_MARKERS, and its remedy (b) names the spelling outright:It is also the spelling already used across this package (
auth-plugin.ts,auth-manager.ts,organization-add-member.ts,vendor-admin-refusal-envelope.ts, and others). The attestation is unchanged: the posture was measured against 1.7.1, and that stays true at every future bump. No measurement was redone and no version number was restamped — restamping without re-measuring is the false-attestation shape that gate exists to prevent.⛔ What this does NOT do — read this before reading the numbers below
This PR rewrites one false sentence into a true one. It does not repair the class.
The detector still cannot see this class of stamp. The site is unattributed — a family name is inside the window but sits in a different paragraph of the comment block, separated by a bare decoration-only line, and after PR #14017 a name reaches to the end of its sentence and no further. That is the attribution rule working as designed. Before this change the site was counted and never judged; after this change it is still counted and still never judged. If the same shape is written again tomorrow, nothing goes red.
⛔ The attribution rules in
scripts/check-vendor-version-stamps.mjsare not touched here, deliberately: block-level attribution with a uniqueness condition (option 2 on the card) is a measured design change needing the same before/after sweep over both populations with the CONTESTED column at zero. It remains an open design question, and it is deliberately not filed as a fix by this PR.Detector before/after — proving it was not touched, and that its counts moved only as expected
All readouts below are from commit
7f4987fe7, running the detector unmodified.The gate itself — byte-identical before and after:
--census— byte-identical before and after (it lists judged sites, and this site is unattributed, so it never appears there).--list— exactly one line changes, and its verdict does not:Still
[unattributed]. Whole-population verdict counts are unchanged in both directions: 250 sites = 2 current + 3 fixture + 138 historical + 107 unattributed, before and after.--attribution-sweep— exactly one cell moves, and it is the counterfactual mechanism, not the shipped one:That is the honest confirmation the card asked for. The legacy character-window mechanism — the one PR #13981 rejected with numbers, and which this PR does not adopt — would have attributed this site and judged it
live-stale. Probed directly through the gate's own exports:So the defect was real under any mechanism that can see it; the substance is repaired even though the shipped mechanism's counts do not move.
The one gap-400 failure that remains is the card's own counter-example, unchanged by this PR and left alone on purpose:
That is a permanently true historical sentence, red only because the character window reaches past a sentence boundary and picks up "installed" from the next sentence. A red whose only available repair turns a true sentence into a false one is worse than silence — which is why the reach is not widened here.
--self-test: 64 checks pass.Verification
Commit
7f4987fe7, worktree offorigin/mainata39b02a6b.✓ src/admin-sso-bridge-gate.test.ts > ... > measured vendor posture (then-installed 1.7.1): an org-less /sso/register admits any authenticated user 19msTest Files 1 passed (1)/Tests 18 passed (18)pnpm --filter @objectstack/plugin-auth test—Test Files 87 passed (87)/Tests 1803 passed (1803)pnpm --filter @objectstack/plugin-auth typecheckexits 0.tsc --listFilesshows 0 occurrences ofadmin-sso-bridge-gate.test.tsin that program. plugin-auth is one of the 16 packages whose tests sit outside tsc, already accounted for in the shrink-only TEST_DEBT ledger; vitest is what exercised this file.node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack, 26 families, harvested with--commands): 25 green. The 26th,scripts/check-test-completeness.mjs, exits 3 =PREREQUISITE NOT METlocally — it needs a savedturbo run testlog and says so itself; recorded as NOT MEASURED, not as a pass and not as a red. CI supplies that log.check:dual-build-cjs-loadsandcheck:type-check-debtboth exit 3 on an unbuilt tree; the full workspace closure was built (turbo run build, 70/70 tasks) and both then re-ran green —check:type-check-debt --re-measure:27 ledger entr(ies) re-measured, 1217 raw tsc error(s) total, none above its recorded number.pnpm check:nul-bytesandnode scripts/check-ratchet-remedy-authority.mjsgreen.check:declared-population-liveis not owed: noscripts/**path is touched.Changeset route
Route 2 of the Check Changeset step, the one it marks PREFERRED: "It releases nothing (... tests-only ...) → apply the
skip-changesetlabel." This diff is a single test-title string, andpackages/plugins/plugin-authpublishesfiles: ["dist", "README.md", "CHANGELOG.md"]— the test file never ships, so no package releases anything. The label is applied on this PR. Route 3, the empty-frontmatter changeset, is closed and was not taken.Not addressed here
Generated by Claude Code
Generated by Claude Code