Skip to content

Commit 6c320a3

Browse files
committed
test(spec): leave the git-ignored json-schema projection out of the absence walk
Claude-Session: https://claude.ai/code/session_01WGufzgjTaf6BB6T3vxdisU Co-authored-by: Claude <noreply@anthropic.com>
1 parent 640ff3f commit 6c320a3

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

‎packages/spec/src/system/auth-revoke-sessions-on-password-reset-retirement.test.ts‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,10 @@ describe('revokeSessionsOnPasswordReset retirement — ADR-0087 registration', (
152152
// - plugin-auth's `auth-manager-auth-instance.ts`, which writes
153153
// better-auth's OWN option of that name into better-auth's configuration —
154154
// the mechanism of the rule, never read from a host;
155-
// - `**/CHANGELOG.md`, release-owned history of what shipped.
155+
// - `**/CHANGELOG.md`, release-owned history of what shipped;
156+
// - `packages/spec/json-schema/`, the git-ignored build projection of the
157+
// schema, where the key appears as the tombstone itself (`not: {}` under
158+
// its `[REMOVED]` description).
156159
// The bound, stated: a key assembled under a computed name, and `docs/**`,
157160
// `.claude/**`, `.github/**` and the repo-root files are outside this walk.
158161
describe('tree-scoped absence: nothing inside the declared radius still writes emailAndPassword.revokeSessionsOnPasswordReset', () => {
@@ -173,6 +176,8 @@ describe('tree-scoped absence: nothing inside the declared radius still writes e
173176
'packages/plugins/plugin-auth/src/auth-manager-auth-instance.ts',
174177
]);
175178

179+
const JSON_SCHEMA_PROJECTION = 'packages/spec/json-schema/';
180+
176181
const IN_KEY_POSITION = /(^|[\s{,(])["']?revokeSessionsOnPasswordReset["']?\s*:(?!\s*retiredKey\()/g;
177182

178183
/** Code with `//` and block-comment CONTENTS blanked, offsets kept. */
@@ -217,7 +222,7 @@ describe('tree-scoped absence: nothing inside the declared radius still writes e
217222

218223
const offences: string[] = [];
219224
for (const rel of scanned) {
220-
if (EXCLUDED.has(rel) || rel.endsWith('/CHANGELOG.md')) continue;
225+
if (EXCLUDED.has(rel) || rel.endsWith('/CHANGELOG.md') || rel.startsWith(JSON_SCHEMA_PROJECTION)) continue;
221226
const raw = fs.readFileSync(path.join(REPO_ROOT, rel), 'utf8');
222227
if (!raw.includes('revokeSessionsOnPasswordReset')) continue;
223228
const text = CODE_EXT.has(path.extname(rel)) ? maskComments(raw) : raw;

0 commit comments

Comments
 (0)