Skip to content

Commit 82d10f1

Browse files
committed
test(core): pin the relocated classifier by its BINDING, not the whole import line
`authz-store-unavailable.test.ts` pinned the exact text `import { isMissingTableError } from '@objectstack/types';`, which also pinned something the #13279 ruling never decided: that this is the ONLY symbol core takes from that module. Adding `resolveTenancyPosture` to the same statement reddened it without touching the predicate, the classifier, or the dependency edge the ruling is about. The positive assertion now matches the binding list inside that statement (`[^}]*` cannot cross a closing brace). Measured against counterexamples: it still refuses the wrong module, a locally re-spelled predicate, and a near-miss identifier. Both negative assertions are unchanged. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016ZC5rNQj3WEet5HAmmAkMs
1 parent 12d7189 commit 82d10f1

1 file changed

Lines changed: 15 additions & 1 deletion

File tree

‎packages/core/src/security/authz-store-unavailable.test.ts‎

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -465,8 +465,22 @@ describe('[#13279 option A] the classifier is the RELOCATED one, not a second co
465465
// The ruling's structural half, pinned in source. A local re-spelling of
466466
// the predicate here would pass every behavioural test above and still be
467467
// the duplication-drift the ruling rejected (option B).
468+
//
469+
// ⚠️ [#13667] The positive assertion matches the BINDING LIST, not the whole
470+
// import statement. It used to demand the exact text
471+
// `import { isMissingTableError } from '@objectstack/types';`, which also
472+
// pinned something the ruling never decided: that this symbol is the ONLY
473+
// one core takes from that module. It is not any more — the walled-posture
474+
// gate at §6b-config reads `resolveTenancyPosture` from the same package —
475+
// and the exact-text form went red on a change that did not touch the
476+
// predicate, the classifier, or the dependency edge. What the ruling
477+
// decided is asserted below, undiminished: the predicate arrives by IMPORT
478+
// from `@objectstack/types`, it is not re-spelled locally, and
479+
// `@objectstack/metadata` is not imported here. `[^}]*` cannot cross a
480+
// closing brace, so the binding still has to sit in THAT statement's list.
481+
// ⛔ Do not "restore" the exact-text form: it re-pins the incidental half.
468482
const src = readFileSync(join(REPO_ROOT, 'packages/core/src/security/resolve-authz-context.ts'), 'utf8');
469-
expect(src).toMatch(/import \{ isMissingTableError \} from '@objectstack\/types';/);
483+
expect(src).toMatch(/import \{[^}]*\bisMissingTableError\b[^}]*\} from '@objectstack\/types';/);
470484
expect(src).not.toMatch(/function\s+isMissingTableError/);
471485
// ⛔ core must not IMPORT `@objectstack/metadata` — metadata depends on
472486
// core, and that edge is why the predicate moved rather than being imported.

0 commit comments

Comments
 (0)