Skip to content

Commit 57ffb83

Browse files
committed
docs(dogfood): re-anchor the dead tracker citations in packages/qa/dogfood's files outside src to the commits and ADR that decided them
Comment prose only, in test/** and vitest.config.ts: every comment site whose tracker number answers 404 now cites the commit in this repository's history that decided what the line describes, or the ADR clause that records the ruling (ADR-0029 D9.2a). String literals, describe/it titles and messages are untouched. Every file keeps its line count. Claude-Session: https://claude.ai/code/session_01VvcEokUG1tvVxkceYfR5XB Co-authored-by: Claude <noreply@anthropic.com>
1 parent 4edb614 commit 57ffb83

27 files changed

Lines changed: 93 additions & 93 deletions

‎packages/qa/dogfood/test/account-oauth-tokens-not-serialized.dogfood.test.ts‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
// Copyright (c) 2026 ObjectStack. Licensed under the Apache-2.0 license.
22

33
/**
4-
* #7987 (+ #8676) — `sys_account`'s credential columns must not come back on
4+
* #7987 (+ commit d6e80b28b) — `sys_account`'s credential columns must not come back on
55
* the generic data path.
66
*
7-
* [#8676] The file was #7987's three OAuth columns; it now covers the object's
7+
* [commit d6e80b28b] The file was #7987's three OAuth columns; it now covers the object's
88
* other two credential columns as well — `password` and
99
* `previous_password_hashes`, the one-way hashes of ADR-0100's third channel.
1010
* They belong here rather than in a fixture of their own because they are the
@@ -88,9 +88,9 @@ const PLANTED = {
8888
const TOKEN_COLUMNS = ['access_token', 'refresh_token', 'id_token'] as const;
8989

9090
/**
91-
* [#8676] The two one-way password hashes on the same object — ADR-0100's third
91+
* [commit d6e80b28b] The two one-way password hashes on the same object — ADR-0100's third
9292
* channel. They serialized on this very read path alongside the OAuth columns
93-
* (the #8676 key list was captured on this fixture's own ablation run), through
93+
* (commit d6e80b28b's key list was captured on this fixture's own ablation run), through
9494
* the same two barriers that miss them: `collectMaskedReadFields` keys on the
9595
* field TYPE and exempts `managedBy: 'better-auth'`, while these are
9696
* `text` / `textarea`. Asserted through the SAME persona matrix below, because
@@ -277,7 +277,7 @@ describe('#7987: sys_account OAuth tokens never serialize on the generic data pa
277277
assertNoCredentialColumns(row);
278278
}
279279

280-
// [#8676] The same spelling attack aimed at the password hashes, from both
280+
// [commit d6e80b28b] The same spelling attack aimed at the password hashes, from both
281281
// personas. The member's own row is the one that matters most here: the
282282
// `sys_account_self` policy grants the read, so this is a LEGAL request for
283283
// their own record that must still come back without the hash.
@@ -334,11 +334,11 @@ describe('#7987: sys_account OAuth tokens never serialize on the generic data pa
334334
// exactly one predicate — `internal === true` — so a column without the
335335
// flag is refused (ADR-0112 code + status).
336336
//
337-
// ⚠️ Its instance changed with #8676, and only its instance. This test used
337+
// ⚠️ Its instance changed with commit d6e80b28b, and only its instance. This test used
338338
// to spell the predicate with `password`, because #7987 deliberately left
339339
// that column unflagged and the test marked THAT card's scope boundary
340340
// ("a column that is **not flagged** … are deliberately NOT `internal`").
341-
// #8676 flags it, so the premise of `password`-as-example disappears while
341+
// Commit d6e80b28b flags it, so the premise of `password`-as-example disappears while
342342
// the proposition itself is untouched: `scope` is an ordinary unflagged
343343
// `sys_account` column and stands in as the example. What is NOT weakened
344344
// is the guard — no ADR-0100 carve-out was added, and the positive arm
@@ -361,7 +361,7 @@ describe('#7987: sys_account OAuth tokens never serialize on the generic data pa
361361
it('[#8676] `password` and `previous_password_hashes` are stripped, and reachable only through the accessor', async () => {
362362
// The card's own assertions, both directions. These are one-way password
363363
// hashes — ADR-0100's third channel — and they serialized on the generic
364-
// data API before #8676: to an admin for every user's row, and to a member
364+
// data API before commit d6e80b28b: to an admin for every user's row, and to a member
365365
// for their own.
366366
const rows: any[] = await ql.find('sys_account', {
367367
where: { id: memberAccountId },

‎packages/qa/dogfood/test/admin-platform-admin-standing.dogfood.test.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
// hand-roll better-auth's signed-cookie contract with
3131
// `/admin/stop-impersonating` and silently detach the #8243 bearer-rotation
3232
// hook. It is a better-auth PLUGIN endpoint with only the authorization
33-
// predicate replaced, and since #11686 that predicate is the consolidated
33+
// predicate replaced, and since commit 7131f12bf that predicate is the consolidated
3434
// authority `hasPlatformAdminStanding`. `has-permission` (#11900, ruled
3535
// 2026-08-25) is a third shape: a permission QUERY, raw-mounted WITHOUT
3636
// the refusing judge — the platform admin's query is answered from the
@@ -59,7 +59,7 @@
5959
// then folds back into `positions[]`. A working "Set Platform Role"
6060
// button would be a supported, gated, one-user-at-a-time channel for
6161
// resurrecting the dual identity representation the 2026-08-18 Option-3
62-
// veto killed. So the maintainer retired the CONSOLE ACTION (PR #11530)
62+
// veto killed. So the maintainer retired the CONSOLE ACTION (commit 033a34c7c)
6363
// and left the vendor ROUTE mounted and vendor-gated, byte for byte.
6464
//
6565
// ⛔ THEREFORE: a `403` from any of those eight is the system working. Do not

‎packages/qa/dogfood/test/admin-route-nonadmin-refusal.dogfood.test.ts‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
// gate verdict and not a payload the server rejects for everyone.
7777
//
7878
// `shaded-vendor-gate` (1 route: `remove-user`) — the two halves belong to
79-
// DIFFERENT layers, which is why it is neither of its neighbours. #11477
79+
// DIFFERENT layers, which is why it is neither of its neighbours. Commit 6dd3e6968
8080
// gave the route the raw-mount shading `ban-user` already had, so an
8181
// ObjectStack gate answers the refusal (member 403 PERMISSION_DENIED, anon
8282
// 401 UNAUTHENTICATED) — but the mount DELEGATES rather than
@@ -88,7 +88,7 @@
8888
// The both-sides contrast is therefore not a 2xx but a DIFFERENCE: the
8989
// member and the admin hear two different refusals, which is what proves
9090
// the member's 403 is an authorization verdict and not a blanket refusal.
91-
// The bucket also carries the #11477 negative — a member must never again
91+
// The bucket also carries commit 6dd3e6968's negative — a member must never again
9292
// see the break-glass guard's `409 LAST_LOCAL_CREDENTIAL`, which before the
9393
// shading was answered ahead of every authorization layer and VARIED WITH
9494
// THE TARGET, disclosing per-record state to a caller entitled to none.
@@ -336,7 +336,7 @@ function expectationsFor(targetUserId: string): Record<string, RouteExpectation>
336336
body: { userId: targetUserId },
337337
},
338338

339-
// ── #11477 — shaded for ORDERING, still admitted by the vendor ─────────
339+
// ── Commit 6dd3e6968 — shaded for ORDERING, still admitted by the vendor ─
340340
//
341341
// The only member of its bucket, and the bucket exists because this route
342342
// genuinely has a third shape rather than because the other two did not
@@ -345,7 +345,7 @@ function expectationsFor(targetUserId: string): Record<string, RouteExpectation>
345345
// owned by different layers:
346346
//
347347
// refusal → ObjectStack's gate (403 PERMISSION_DENIED), because the
348-
// mount answers first. That is #11477's whole point: the
348+
// mount answers first. That is commit 6dd3e6968's whole point: the
349349
// break-glass `hooks.before` guard used to answer an
350350
// authenticated non-admin BEFORE any authorization ran, and
351351
// its 409 differed per target — a per-record disclosure.
@@ -634,7 +634,7 @@ describe('#9482 C9: every derived /admin/ route refuses a non-admin', () => {
634634
}, 600_000);
635635

636636
it('the shaded vendor route refuses a non-admin from the ObjectStack gate, before the break-glass guard', async () => {
637-
// #11477. The both-sides contrast here is NOT a 2xx — it is that the two
637+
// Commit 6dd3e6968. The both-sides contrast here is NOT a 2xx — it is that the two
638638
// callers hear DIFFERENT refusals. A member is turned away by ObjectStack's
639639
// gate (`PERMISSION_DENIED`) and a platform admin gets past it only to be
640640
// turned away by the vendor's (`YOU_ARE_NOT_ALLOWED_*`, #9969). Two
@@ -653,7 +653,7 @@ describe('#9482 C9: every derived /admin/ route refuses a non-admin', () => {
653653
expect(member.status, `${route} member: ${member.body}`).toBe(403);
654654
expect(member.code, `${route} member code: ${member.body}`).toBe('PERMISSION_DENIED');
655655

656-
// ⛔ The load-bearing negative. Before #11477 the break-glass
656+
// ⛔ The load-bearing negative. Before commit 6dd3e6968 the break-glass
657657
// `hooks.before` guard answered an authenticated non-admin ahead of every
658658
// authorization layer, and its answer varied with the TARGET — a
659659
// per-record disclosure to a caller entitled to nothing. A member must
@@ -720,7 +720,7 @@ describe('#9482 C9: every derived /admin/ route refuses a non-admin', () => {
720720
// transaction, so this route answers the authorization question like
721721
// every other member of the bucket and needs no exception.
722722
//
723-
// ⚠️ #11477 moved `remove-user` OUT of this bucket entirely — its raw
723+
// ⚠️ Commit 6dd3e6968 moved `remove-user` OUT of this bucket entirely — its raw
724724
// mount now answers a member from ObjectStack's gate
725725
// (`403 PERMISSION_DENIED`) before better-auth is reached at all, so the
726726
// vendor-vocabulary rule below no longer describes it. It lives in

‎packages/qa/dogfood/test/attachments-unscoped-delete-gate.dogfood.test.ts‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// "refused outright (#4757)", on the reasoning that "nothing was ever queried"
1010
// must not read as "nothing to authorize". `attachment-access-hooks.ts` carries
1111
// exactly that refusal, and `attachment-access-hooks.test.ts` pins it against a
12-
// wired engine (#9797). This file pins it END TO END, on the real stack, where
12+
// wired engine (commit 1258dcaee). This file pins it END TO END, on the real stack, where
1313
// RBAC and plugin-sharing are in the path and the session is a real one.
1414
//
1515
// ## History — this file's original verdict has been OVERTAKEN, twice
@@ -20,7 +20,7 @@
2020
// the `where === undefined` check. That was a PRODUCT gap (#9719), and this
2121
// file deliberately declined to pin the behaviour of the day.
2222
//
23-
// It has since been fixed. #9719/PR #9797 added an opt-in whole-operation
23+
// It has since been fixed. #9719/commit 1258dcaee added an opt-in whole-operation
2424
// dispatch to the engine, which #9974 renamed `dispatchUnscopedMultiWrite` when
2525
// it was ruled onto `beforeUpdate` as well. `attachment-access-hooks.ts`
2626
// declares it on both sys_attachment write registrations, so the #4757 refusal
@@ -35,7 +35,7 @@
3535
// properties that look identical on a fixture whose rows split entitled/not —
3636
// which is exactly the fixture the first block below uses. Measured on this
3737
// suite: with `dispatchUnscopedMultiWrite` removed from BOTH registrations and
38-
// service-storage rebuilt (the pre-#9797 world), the first block stays 5/5
38+
// service-storage rebuilt (the world before commit 1258dcaee), the first block stays 5/5
3939
// GREEN. It cannot see the refusal it is named for.
4040
//
4141
// So the second block seeds the ONE fixture that separates them: a caller who
@@ -163,7 +163,7 @@ describe('sys_attachment delete gate under an unscoped multi-delete (#9483)', ()
163163

164164
it('an unscoped multi-delete is refused OUTRIGHT — on its shape — and deletes NOTHING', async () => {
165165
// `{ multi: true }` with neither id nor where composes an AST over the whole
166-
// table. Since #9797 the refusal that answers is #4757's whole-operation
166+
// table. Since commit 1258dcaee the refusal that answers is #4757's whole-operation
167167
// one, dispatched BEFORE any row is resolved — not the per-row gate, which
168168
// on this fixture would also have refused (the member is the uploader of
169169
// one row and neither uploader nor parent-editor of the other).
@@ -193,7 +193,7 @@ describe('sys_attachment delete gate under an unscoped multi-delete (#9483)', ()
193193

194194
it('an empty `where: {}` reaches the same verdict by a DIFFERENT rule — the per-row gate', async () => {
195195
// ⚠️ Same outcome, deliberately different mechanism, and the difference is
196-
// load-bearing. #9797 scoped the whole-operation dispatch to a delete with
196+
// load-bearing. Commit 1258dcaee scoped the whole-operation dispatch to a delete with
197197
// NO `where` at all; a match-all `where: {}` is a real query, so it is NOT
198198
// refused on shape — it is refused here only because this caller cannot
199199
// have the foreign row. Asserting the per-row message is what keeps that
@@ -259,7 +259,7 @@ describe('sys_attachment delete gate under an unscoped multi-delete (#9483)', ()
259259
// whole-operation rule or from the per-row gate, because that fixture holds one
260260
// row the caller may not touch. Here the caller uploaded BOTH rows, so the
261261
// per-row gate has nothing to refuse — anything that still refuses is refusing
262-
// the SHAPE. Pre-#9797 this exact call resolved and emptied the table.
262+
// the SHAPE. Before commit 1258dcaee this exact call resolved and emptied the table.
263263
// ─────────────────────────────────────────────────────────────────────────────
264264

265265
describe('sys_attachment unscoped multi-delete is refused on its SHAPE, not on entitlement (#9483)', () => {
@@ -352,7 +352,7 @@ describe('sys_attachment unscoped multi-delete is refused on its SHAPE, not on e
352352
});
353353

354354
it('refuses `{ multi: true }` with no id and no where — even though the caller may delete every matched row', async () => {
355-
// #9719's measured wipe, end to end: before PR #9797 this call RESOLVED and
355+
// #9719's measured wipe, end to end: before commit 1258dcaee this call RESOLVED and
356356
// took both rows (2 -> 0). The per-row gate licenses each row individually,
357357
// so nothing but the whole-operation #4757 rule can refuse here — which is
358358
// what makes this the case that detects its removal.

‎packages/qa/dogfood/test/authz-conformance.matrix.ts‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@
9393
// silencing that particular red costs an enforcement site rather than a
9494
// `covers` append on a row that records an absence.
9595
//
96-
// [#8711] That completeness is over ROUTES, not over primitives: a primitive
96+
// [commit 2ce1eb41b] That completeness is over ROUTES, not over primitives: a primitive
9797
// enforced by a predicate inside an existing resolver adds no entry point, so
9898
// it can be neither UNCLASSIFIED nor STALE. Measured against the rows below:
9999
// 44 of 51 carry no `covers` key at all (7 rows, 15 keys, every one an
@@ -390,12 +390,12 @@ export const AUTHZ_CONFORMANCE: AuthzPrimitive[] = [
390390
// mass-revoked) and the 0/1 storage shape the primary driver returns is
391391
// judged as well as a literal `false`.
392392
//
393-
// [#8711] Both rows carry NO `covers`, and that is a statement about the
393+
// [commit 60ade586e] Both rows carry NO `covers`, and that is a statement about the
394394
// RATCHET, not an omission: `discover()` enumerates HTTP entry points from a
395395
// curated per-file probe table, and a predicate inside an existing resolver
396396
// adds no entry point — so neither flag could ever have surfaced as
397397
// UNCLASSIFIED during the whole period it was inert. These two rows restore
398-
// the ledger's stated invariant. [Resolved — maintainer ruling on #8711,
398+
// the ledger's stated invariant. [Resolved — maintainer ruling (commit 2ce1eb41b),
399399
// 2026-08-15] The invariant's advertised SCOPE is narrowed to what the
400400
// ratchet can check, not the ratchet widened to reach in-resolver
401401
// predicates like this one — widening was measured unachievable in general
@@ -408,7 +408,7 @@ export const AUTHZ_CONFORMANCE: AuthzPrimitive[] = [
408408
enforcement: 'core/security/resolve-authz-context.ts step 6a — isRowActive gates BOTH halves, and only both hold it: (i) only ACTIVE position ids collect their `sys_position_permission_set` linkage, so a deactivated position carries no bound set; (ii) the deactivated NAME is dropped from `grants.positions`, because resolvePermissionSetsForContext requests positions as permission-set NAMES and a name left standing resolves the same grant one layer down',
409409
note: 'Only a name whose `sys_position` row is EXPLICITLY deactivated is dropped — a name with no row at all (`org_owner`, a membership-derived role, the built-in `everyone` audience anchor) has no flag to read and is untouched. Deliberately NOT a blanket revocation of the sets themselves: a set held via BOTH a deactivated position AND a direct user grant still resolves, since the direct grant is a different grant (resolve-authz-context.test.ts pins exactly that case). Symmetrically, the WRITE gates and blast-radius reads in plugin-security (assertAudienceAnchorBindingGate, setsBoundToPosition, the delegated-admin surfaces) stay UNFILTERED on purpose — dropping a deactivated row there would make a refused binding permitted, narrow a delegate\'s boundary, and make a deactivated position unmanageable. Unit-proven in core/security/resolve-authz-context.test.ts (a deactivated position stops granting its sets; an active one still grants; an absent column grants; the 0/1 shape deactivates; deactivating ONE position leaves the others granting) + core/security/row-active.test.ts. Not HIGH_RISK for the same reason as `permission-set-active`.' },
410410

411-
// ── ADR-0091 D1/D2 — grant validity windows (#8811) ───────────────────
411+
// ── ADR-0091 D1/D2 — grant validity windows (commit d6e793507) ────────
412412
//
413413
// The sibling of the `active` switch above, and enforced at the same seam
414414
// for the same stated reason: a grant that is supposed to lapse on a date,

‎packages/qa/dogfood/test/authz-conformance.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// ADR-0056 D10 — the authorization conformance matrix is a CHECKED artifact,
44
// within the scope the mechanism can see: routes are ratcheted, primitives are
55
// hand-maintained (see the matrix's own header for the narrowed claim and the
6-
// measured numbers — #8711). Refactored onto the reusable ADR-0060
6+
// measured numbers — commit 2ce1eb41b). Refactored onto the reusable ADR-0060
77
// `checkLedger` helper: one call asserts every shared invariant (valid state,
88
// enforced-has-site, experimental/removed-has-note, proof-file-exists,
99
// high-risk-has-proof). A row that regresses one of THOSE invariants, or a

‎packages/qa/dogfood/test/authz-probe-blind-spot.census.ts‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -431,9 +431,9 @@ export const PROBE_FILE_CENSUS: readonly ProbeFileReading[] = [
431431
// `this.routeManager.register(` reads 73 because the helper's forwarder is
432432
// one of them, and it is sliced out before counting.
433433
//
434-
// [#13214] `enforceAuth` 61 -> 64. ⛔ RE-ANCHORED, not relaxed: the control
434+
// [commit cc837dbfe] `enforceAuth` 61 -> 64. ⛔ RE-ANCHORED, not relaxed: the control
435435
// exists to prove this census is still reading the file it thinks it is, and
436-
// a rising `enforceAuth` is precisely what the 2026-08-30 ruling on #13214
436+
// a rising `enforceAuth` is precisely what the 2026-08-30 ruling (commit cc837dbfe)
437437
// was supposed to cause — `registerUiEndpoints` was the ONE route in this
438438
// file that resolved no identity, and it is now guarded. The move is +3 over
439439
// the whole file (`occurrences` counts the bare term, comments included):
@@ -445,9 +445,9 @@ export const PROBE_FILE_CENSUS: readonly ProbeFileReading[] = [
445445
// ⚠️ The three sibling numbers were re-derived and did NOT move, which is
446446
// what says this is a guard change and not a surface change: `population`
447447
// 80, `reachable` 19, `private register*Endpoints(` 17 and
448-
// `this.routeManager.register(` 80 are all unchanged — #13214 added no route
448+
// `this.routeManager.register(` 80 are all unchanged — commit cc837dbfe added no route
449449
// and no registrar. `blindSpot` therefore stays 61 as well.
450-
// ⚠️ That last figure is the reading AS OF #13214 and is left as written:
450+
// ⚠️ That last figure is the reading AS OF commit cc837dbfe and is left as written:
451451
// the control is 73 today for the spelling reason recorded above, and the
452452
// population it feeds is still 80. Do not "correct" the paragraph — it is a
453453
// dated measurement, not a live claim.

0 commit comments

Comments
 (0)