From b7f516e8b9e69b584a5ed068259fb97a40c18fc7 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 6 Sep 2026 04:52:58 +0000 Subject: [PATCH] docs(platform-objects): make the vitest alias rationale independent of a suite count MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The alias comment named `managed-api-method-affordance-sweep.test.ts` (#7934) as "the only suite here that imports a sibling package as a VALUE". That licensed a removal it no longer justified: four suites in this package import `@objectstack/lint` as a value, and on the sentence's literal reading (any sibling package) the count is far higher still. Replace the enumeration with the mechanism — the entry is keyed on the SPECIFIER, so it governs whatever set imports it, and `check:test-source-alias` is the thing that decides whether the entry may go. A rationale with no count in it cannot go stale the way this one did. The alias entry itself is unchanged. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01ARYe3yQTQCUFm5qPYNgKaJ --- packages/platform-objects/vitest.config.ts | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/packages/platform-objects/vitest.config.ts b/packages/platform-objects/vitest.config.ts index 79d431ef26..44dbdea706 100644 --- a/packages/platform-objects/vitest.config.ts +++ b/packages/platform-objects/vitest.config.ts @@ -14,10 +14,23 @@ export default defineConfig({ disableConsoleIntercept: true, }, resolve: { - // One entry, for `managed-api-method-affordance-sweep.test.ts` (#7934) — - // the only suite here that imports a sibling package as a VALUE. It calls - // `validateManagedApiMethods` from `@objectstack/lint` over every - // code-shipped managed object in the checkout. + // One entry, for `@objectstack/lint`, keyed on the SPECIFIER — so it + // governs every suite in this package that imports that package as a + // VALUE, not one named suite. `managed-api-method-affordance-sweep.test.ts` + // (#7934) is the suite that first needed it — it calls + // `validateManagedApiMethods` over every code-shipped managed object in + // the checkout — but deleting or rewriting THAT suite does not free this + // entry, and a count of the suites written here goes stale silently: this + // comment carried one ("the only suite") that was already wrong. + // + // The dependent set is whatever + // `git grep "from '@objectstack/lint'" -- packages/platform-objects/src` + // returns, and `pnpm check:test-source-alias` is what decides whether the + // entry may go at all: it recomputes the workspace packages this package's + // tests import as VALUES, keeps the ones whose entry point resolves under + // `dist/`, replays this file's alias entries the way Vite does, and reddens + // on anything left unaliased and unregistered. Remove the entry and it is + // that gate, not a reading of one test file, that answers. // // Unaliased, that specifier resolves through `exports` to `lint/dist` — a // BUILD ARTIFACT — which would make this sweep a verdict about build state