also looking at this
[DO NOT MERGE] diag: #2267 CLI-hang discriminator
#2269
5 files
+370
-6
| @@ -0,0 +1,27 @@ | ||
| 1 | /** | |
| 2 | * TEMPORARY — #2267 diagnostic, standalone file. Not for merge. | |
| 3 | * | |
| 4 | * `bun test` orders files deterministically but not alphabetically; this one | |
| 5 | * lands at position 38 of 48, fifteen files after `gateway.test.ts` (23), so it | |
| 6 | * answers "does the failing shape hang from a parent with the graph loaded, at | |
| 7 | * a LATER point in the suite?" The in-situ copy of the same sweep inside | |
| 8 | * `gateway.test.ts` answers it at the position where the hang was recorded. | |
| 9 | * Both import the rpx graph on purpose. The test always passes; the log is the | |
| 10 | * result, every line prefixed `[2267-diag]`. | |
| 11 | */ | |
| 12 | import { describe, expect, it } from 'bun:test' | |
| 13 | import * as path from 'node:path' | |
| 14 | import { readGatewayFragments } from '../src/gateway' | |
| 15 | import * as Start from '../src/start' | |
| 16 | import { envDump, runSweep, say } from './helpers/spawn-diag' | |
| 17 | ||
| 18 | const CLI = path.join(import.meta.dir, '..', 'bin', 'cli.ts') | |
| 19 | ||
| 20 | describe('2267 diagnostic (standalone file)', () => { | |
| 21 | it('records how each spawn variant of the CLI behaves here', async () => { | |
| 22 | envDump() | |
| 23 | say('parent graph loaded:', typeof Start.startProxies, typeof readGatewayFragments) | |
| 24 | const results = await runSweep(CLI, 'standalone') | |
| 25 | expect(results).toHaveLength(8) | |
| 26 | }, 200_000) | |
| 27 | }) | |