Skip to content

Commit 967ce88

Browse files
committed
test(dogfood): the multi-org probe resolves its host from the package root
Under the per-file temporary cwd, probeOrganizations() defaulted its host root to that temp directory, so its skip text told the reader to declare @objectstack/organizations in a /tmp directory's package.json (measured). The module-level probe now passes this package's root, resolved from the module's own location. Claude-Session: https://claude.ai/code/session_01RWZbGvPFcRKvUqASZtunCU Co-authored-by: Claude <noreply@anthropic.com>
1 parent 4d07dc2 commit 967ce88

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎packages/qa/dogfood/test/enterprise-organizations.ts‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@
9494
*/
9595

9696
import { createHostImporter, hostImportFailureKind } from '@objectstack/types/node';
97+
import { fileURLToPath } from 'node:url';
9798

9899
/**
99100
* The multi-org package (ADR-0105 D12 as amended by ADR-0132) these gates need.
@@ -208,7 +209,9 @@ export async function probeOrganizations(
208209
* time when {@link MULTI_ORG_ENV} is declared but the package is missing — the
209210
* loud half of the contract.
210211
*/
211-
const probe = await probeOrganizations();
212+
// #21914: every dogfood file runs in its own temporary cwd (test/per-file-cwd.setup.ts),
213+
// so the host app is this package, resolved from this module's location, not the cwd.
214+
const probe = await probeOrganizations(fileURLToPath(new URL('..', import.meta.url)));
212215

213216
export const organizationsAvailable: boolean = probe.available;
214217

0 commit comments

Comments
 (0)