@aviaratech/ai-delivery 0.3.37 → 0.3.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/contributorChecks.test.js +5 -2
- package/dist/contributorChecks.test.js.map +2 -2
- package/dist/issue.js +7 -2
- package/dist/issue.js.map +2 -2
- package/dist/issueInfoReadback.test.js +59 -1
- package/dist/issueInfoReadback.test.js.map +2 -2
- package/package.json +1 -1
- package/plugins/ai-delivery/.claude-plugin/plugin.json +2 -2
- package/plugins/ai-delivery/plugin.json +1 -1
- package/plugins/ai-delivery/runtime/dist/cli.js +54 -54
- package/plugins/ai-delivery/runtime/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/contributorChecks.test.ts"],
|
|
4
|
-
"sourcesContent": ["import assert from 'node:assert/strict';\nimport { execFileSync, spawn, spawnSync } from 'node:child_process';\nimport {\n chmodSync,\n existsSync,\n mkdirSync,\n mkdtempSync,\n readFileSync,\n readdirSync,\n realpathSync,\n renameSync,\n rmSync,\n symlinkSync,\n writeFileSync,\n} from 'node:fs';\nimport { availableParallelism, tmpdir } from 'node:os';\nimport { dirname, join, relative } from 'node:path';\nimport { fileURLToPath, pathToFileURL } from 'node:url';\nimport { test } from 'vitest';\n\ntype CommandResult = {\n status: string;\n exitCode: number | null;\n stdoutPath: string;\n stderrPath: string;\n cleanupConfirmed?: boolean;\n observedProcesses?: { pid: number; birth: string }[];\n};\ntype CommandOptions = {\n cwd: string;\n env: Record<string, string>;\n directory: string;\n signal?: AbortSignal;\n timeoutMs?: number;\n progress?: (record: object) => void;\n};\ntype Report = {\n scope: string;\n status: string;\n fullSuccess: boolean;\n exitCode: number;\n omitted: string[];\n commands: { stage: string; status: string; command: string[] }[];\n selectedTestFiles?: string[];\n error?: string;\n observedTests?: { total: number; passed: number; failed: number };\n artifactQualified: boolean;\n};\ntype CaseIdentity = { file: string; title: string };\ntype ReleaseContext = {\n contractPath: string;\n checkpoint: { path: string; sha256: string };\n sourceCommit: string;\n sourceTree: string;\n sourceManifestSha256: string;\n sourceLockSha256: string;\n producerSha256: string;\n archiveSha256: string;\n};\ntype TestReport = {\n success: boolean;\n numTotalTests: number;\n numPassedTests: number;\n testResults: {\n name: string;\n status: string;\n assertionResults: { fullName: string; status: string; tags?: string[] }[];\n }[];\n};\ntype Toolchain = {\n controller: { version: string; executable: string };\n npm: { version: string; executable: string };\n libraryConsumer: { version: string; executable: string };\n};\ntype Checks = {\n RELEASE_CASES: (CaseIdentity & {\n kind: 'mandatory' | 'external-historical-qualification' | 'parent-launched-helper';\n })[];\n FULL_GATES: string[];\n FAST_GATES: string[];\n safeEnvironment(input: Record<string, string>): Record<string, string>;\n validateToolchain(cwd: string, env: Record<string, string>): Toolchain;\n expectedTests(cwd: string, mode?: string): string[];\n assertCleanSelection(cwd: string): string[];\n treeIdentity(cwd: string): { sha256: string };\n analyzeTests(\n report: TestReport,\n expected: string[],\n cwd: string,\n output: string,\n env?: Record<string, string>,\n lane?: 'pr' | 'release',\n ): {\n files: number;\n total: number;\n passed: number;\n skips: (CaseIdentity & { kind: string })[];\n parentLaunchedHelperProved: boolean;\n selectedCases: CaseIdentity[];\n laneExcluded: CaseIdentity[];\n };\n coverageBaseline(\n directory: string,\n cwd: string,\n ): {\n files: { path: string }[];\n unmeasuredContributorScripts: { path: string; threshold: null; reason: string }[];\n thresholdProposal: string;\n };\n executeCommand(command: string[], options: CommandOptions): Promise<CommandResult>;\n runChecks(options: {\n cwd: string;\n resultsDir: string;\n fast?: boolean;\n testFiles?: string[];\n buildPlugin?: boolean;\n install?: boolean;\n toolchain?: () => Toolchain;\n execute?: Checks['executeCommand'];\n environment?: Record<string, string>;\n release?: ReleaseContext;\n }): Promise<Report>;\n};\nconst checks = (await import(new URL('../scripts/checks.mjs', import.meta.url).href)) as Checks;\nconst repository = fileURLToPath(new URL('../', import.meta.url));\n\ntest(\n 'Vitest source and compiled inputs are unique and use isolated core-aware fork workers',\n { tags: ['release'] },\n async () => {\n const f = fixture();\n try {\n const { default: configure } = (await import(pathToFileURL(join(repository, 'vitest.config.ts')).href)) as {\n default: (env: { mode: string }) => {\n test: { testTimeout: number; pool: string; maxWorkers: number; fileParallelism: boolean };\n };\n };\n assert.equal(typeof configure, 'function');\n for (const mode of ['source', 'compiled']) {\n const config = configure({ mode }).test;\n assert.ok(Number.isFinite(config.testTimeout) && config.testTimeout > 0);\n assert.equal(config.pool, 'forks');\n assert.equal(config.maxWorkers, availableParallelism());\n assert.equal(config.fileParallelism, true);\n const output = join(f.base, `projects-${mode}.json`);\n execFileSync(\n process.execPath,\n [\n join(repository, 'node_modules/vitest/vitest.mjs'),\n 'list',\n `--mode=${mode}`,\n '--filesOnly',\n `--json=${output}`,\n ],\n {\n cwd: repository,\n env: checks.safeEnvironment({ PATH: process.env.PATH ?? '' }),\n encoding: 'utf8',\n maxBuffer: 1024 ** 2,\n },\n );\n const rows = JSON.parse(readFileSync(output, 'utf8')) as { file: string }[];\n const selected = rows.map((row) => relative(repository, row.file).replaceAll('\\\\', '/'));\n assert.deepEqual([...selected].sort(), checks.expectedTests(repository, mode));\n assert.equal(new Set(selected).size, selected.length, 'No file may execute more than once');\n }\n } finally {\n f.cleanup();\n }\n },\n);\n\ntest('ordinary full and focused checks exclude release cases without claiming archive proof', async () => {\n for (const focused of [false, true]) {\n const f = fixture();\n try {\n const delegated = executor(f);\n const report = await checks.runChecks({\n cwd: f.cwd,\n resultsDir: join(f.base, 'checks'),\n ...(focused ? { fast: true, testFiles: ['dist/original.test.js'] } : {}),\n toolchain: () => f.toolchain,\n environment: {\n ...checks.safeEnvironment({}),\n AI_DELIVERY_TEST_LANE: 'release',\n AI_DELIVERY_RELEASE_CONTRACT: '/ambient/untrusted',\n },\n execute: (command, options) => {\n assert.equal(options.env.AI_DELIVERY_TEST_LANE, 'pr');\n assert.equal(options.env.AI_DELIVERY_RELEASE_CONTRACT, undefined);\n return delegated(command, options);\n },\n });\n const testCommand = report.commands.find((command) => command.stage === 'tests')!.command;\n assert.equal(\n testCommand.some((argument) => argument.startsWith('--maxWorkers')),\n false,\n );\n assert.equal(report.status, focused ? 'partial-passed' : 'passed');\n assert.equal(report.artifactQualified, false);\n if (!focused) assert.deepEqual(report.omitted, []);\n const command = report.commands.find((command) => command.stage === 'tests')?.command;\n assert.ok(command?.includes('--tags-filter=!release'));\n assert.ok(\n !report.commands.some((command) =>\n command.command.some((arg) => /current-consumer|current-qualification/u.test(arg)),\n ),\n );\n } finally {\n f.cleanup();\n }\n }\n});\n\ntest('PR reports exclude release identities while scoped release reports require all mandatory outcomes', () => {\n assert.ok(Array.isArray(checks.RELEASE_CASES));\n const mandatory = checks.RELEASE_CASES.filter((test) => test.kind === 'mandatory');\n assert.equal(new Set(mandatory.map(({ file, title }) => JSON.stringify([file, title]))).size, mandatory.length);\n const f = fixture();\n const files = [...new Set(checks.RELEASE_CASES.map((test) => test.file))];\n const report = (release: boolean): TestReport => {\n const testResults = files.map((file) => ({\n name: join(f.cwd, file),\n status: 'passed',\n assertionResults: [\n ...(release ? [] : [{ fullName: 'synthetic retained unit', status: 'passed' }]),\n ...checks.RELEASE_CASES.filter((test) => test.file === file).map((test) => ({\n fullName: test.title,\n status: release && test.kind === 'mandatory' ? 'passed' : 'pending',\n })),\n ],\n }));\n const cases = testResults.flatMap((file) => file.assertionResults);\n return {\n success: true,\n testResults,\n numTotalTests: cases.length,\n numPassedTests: cases.filter((test) => test.status === 'passed').length,\n };\n };\n try {\n const pr = checks.analyzeTests(\n report(false),\n files,\n f.cwd,\n '',\n { AI_DELIVERY_REAL_PACKAGE_ARCHIVE: '/explicit-historical-input' },\n 'pr',\n );\n assert.equal(pr.passed, files.length);\n assert.equal(pr.total, files.length);\n assert.deepEqual(pr.skips, []);\n assert.equal(pr.laneExcluded.length, checks.RELEASE_CASES.length);\n const release = checks.analyzeTests(report(true), files, f.cwd, '', {}, 'release');\n assert.equal(release.passed, checks.RELEASE_CASES.filter((test) => test.kind === 'mandatory').length);\n assert.equal(release.skips.length, checks.RELEASE_CASES.filter((test) => test.kind !== 'mandatory').length);\n for (const failure of ['missing', 'duplicate', 'unexpected', 'failed', 'pr-executed']) {\n const data = report(failure !== 'pr-executed');\n const tests = data.testResults[0]!.assertionResults;\n if (failure === 'missing') tests.shift();\n if (failure === 'duplicate') tests.push({ ...tests[0]! });\n if (failure === 'unexpected') tests.push({ fullName: 'unreviewed release case', status: 'passed' });\n if (failure === 'failed') tests[0]!.status = 'failed';\n if (failure === 'pr-executed') tests[1]!.status = 'passed';\n const cases = data.testResults.flatMap((file) => file.assertionResults);\n data.numTotalTests = cases.length;\n data.numPassedTests = cases.filter((test) => test.status === 'passed').length;\n assert.throws(\n () => checks.analyzeTests(data, files, f.cwd, '', {}, failure === 'pr-executed' ? 'pr' : 'release'),\n failure,\n );\n }\n } finally {\n f.cleanup();\n }\n});\n\ntest(\n 'runtime-expanded tags match every reviewed mandatory identity without executing cases',\n { tags: ['release'] },\n () => {\n const f = fixture();\n try {\n const config = join(f.base, 'collection-only.config.mjs');\n const base = pathToFileURL(join(repository, 'vitest.config.ts')).href;\n writeFileSync(\n config,\n `if(!process.argv.includes('list'))throw new Error('Collection only');const base=(await import(${JSON.stringify(base)})).default({mode:'compiled'});export default {...base,test:{...base.test,tags:base.test.tags.map(tag=>tag.name==='release'?{...tag,skip:false}:tag)}};`,\n );\n const output = join(f.base, 'inventory.json');\n execFileSync(\n process.execPath,\n [\n join(repository, 'node_modules/vitest/vitest.mjs'),\n 'list',\n ...new Set(checks.RELEASE_CASES.map((test) => test.file)),\n '--tags-filter=release',\n '--no-staticParse',\n '--maxWorkers=1',\n `--config=${config}`,\n `--json=${output}`,\n ],\n {\n cwd: repository,\n env: { ...checks.safeEnvironment({ PATH: process.env.PATH ?? '' }), AI_DELIVERY_TEST_LANE: 'pr' },\n encoding: 'utf8',\n maxBuffer: 1024 ** 2,\n },\n );\n const rows = JSON.parse(readFileSync(output, 'utf8')) as { file: string; name: string }[];\n const actual = rows.map((row) => ({\n file: relative(repository, row.file).replaceAll('\\\\', '/'),\n title: row.name.replaceAll(' > ', ' '),\n }));\n const expected = checks.RELEASE_CASES.filter((test) => test.kind === 'mandatory').map(({ file, title }) => ({\n file,\n title,\n }));\n assert.equal(actual.length, expected.length);\n const compare = (a: CaseIdentity, b: CaseIdentity) => JSON.stringify(a).localeCompare(JSON.stringify(b));\n assert.deepEqual(actual.sort(compare), expected.sort(compare));\n } finally {\n f.cleanup();\n }\n },\n);\n\ntest('unknown lane and mismatched release context fail before child launch', async () => {\n const f = fixture();\n try {\n let calls = 0;\n const release: ReleaseContext = {\n contractPath: join(f.base, 'missing/contract.json'),\n checkpoint: { path: join(f.base, 'missing/checkpoint.json'), sha256: 'a'.repeat(64) },\n sourceCommit: 'a'.repeat(40),\n sourceTree: 'b'.repeat(40),\n sourceManifestSha256: 'a'.repeat(64),\n sourceLockSha256: 'b'.repeat(64),\n producerSha256: 'c'.repeat(64),\n archiveSha256: 'd'.repeat(64),\n };\n for (const options of [\n { environment: { AI_DELIVERY_TEST_LANE: 'unknown' } },\n { release },\n { release, fast: true },\n ]) {\n const result = await checks.runChecks({\n cwd: f.cwd,\n resultsDir: join(f.base, `invalid-${calls}-${Object.keys(options).join('-')}`),\n toolchain: () => f.toolchain,\n ...options,\n execute: (command, options) => {\n calls++;\n return executor(f)(command, options);\n },\n });\n assert.equal(result.status, 'failed');\n assert.equal(calls, 0);\n }\n } finally {\n f.cleanup();\n }\n});\n\nfunction directFocus(f: ReturnType<typeof fixture>, title: string, env: Record<string, string>, name: string) {\n const marker = join(f.base, `${name}-npm-launched`);\n const loaded = join(f.base, `${name}-guard-loaded`);\n const guard = join(f.base, `${name}-guard.mjs`);\n writeFileSync(\n guard,\n `import cp from 'node:child_process';import {syncBuiltinESMExports} from 'node:module';import {appendFileSync,writeFileSync} from 'node:fs';appendFileSync(${JSON.stringify(loaded)},String(process.pid)+String.fromCharCode(10));for(const name of ['spawn','spawnSync','execFile','execFileSync','exec','execSync','fork']){const original=cp[name];cp[name]=function(command,args,...rest){if([command,...(Array.isArray(args)?args:[])].some(x=>['npm','npm-cli.js'].includes(String(x).split('/').at(-1)))){writeFileSync(${JSON.stringify(marker)},'forbidden npm launch');throw new Error('Controlled direct-focus guard forbids npm');}return Reflect.apply(original,this,[command,args,...rest]);};}syncBuiltinESMExports();`,\n );\n const guardUrl = pathToFileURL(guard).href;\n const workerArgs = ['--maxWorkers=1', '--pool=forks', `--execArgv=--import=${guardUrl}`, '--no-cache'];\n const childEnv = { ...checks.safeEnvironment({ PATH: process.env.PATH ?? '' }), ...env };\n // Prove interception inside the pinned worker before selecting any real-case body.\n // A broken preload can only try the probe's nonexistent script, which cannot run npm.\n mkdirSync(join(f.cwd, 'dist'), { recursive: true });\n if (!existsSync(join(f.cwd, 'node_modules')))\n symlinkSync(join(repository, 'node_modules'), join(f.cwd, 'node_modules'));\n const config = join(f.cwd, 'guard.config.mjs');\n writeFileSync(\n config,\n `import {defineConfig} from 'vitest/config';export default defineConfig({test:{include:['dist/guard.test.js']}});`,\n );\n writeFileSync(\n join(f.cwd, 'dist/guard.test.js'),\n `import assert from 'node:assert/strict';import {execFileSync,spawnSync} from 'node:child_process';import {test} from 'vitest';test('controlled worker npm guard',()=>{assert.throws(()=>execFileSync(process.execPath,['/controlled/nonexistent/npm-cli.js']),/Controlled direct-focus guard forbids npm/);});test('controlled shell npm guard',()=>{assert.throws(()=>spawnSync('/bin/sh',['-c','exit 125','controlled','/controlled/nonexistent/npm']),/Controlled direct-focus guard forbids npm/);});`,\n );\n const probeReport = join(f.base, `${name}-probe.json`);\n const probe = spawnSync(\n process.execPath,\n [\n '--import',\n guardUrl,\n join(repository, 'node_modules/vitest/vitest.mjs'),\n 'run',\n '--root',\n f.cwd,\n '--config',\n config,\n ...workerArgs,\n '--reporter=json',\n `--outputFile.json=${probeReport}`,\n ],\n { cwd: f.cwd, env: childEnv, encoding: 'utf8', maxBuffer: 1024 ** 2 },\n );\n assert.equal(probe.status, 0, probe.stderr.slice(-1500));\n assert.equal((JSON.parse(readFileSync(probeReport, 'utf8')) as TestReport).numPassedTests, 2);\n assert.equal(existsSync(marker), true, 'The fake npm invocation must be intercepted inside the worker.');\n assert.ok(readFileSync(loaded, 'utf8').trim().split(String.fromCharCode(10)).length >= 2);\n rmSync(marker);\n const reportPath = join(f.base, `${name}.json`);\n const result = spawnSync(\n process.execPath,\n [\n '--import',\n guardUrl,\n join(repository, 'node_modules/vitest/vitest.mjs'),\n 'run',\n '--mode=compiled',\n 'dist/lifecycle.test.js',\n ...workerArgs,\n '-t',\n title,\n '--reporter=json',\n `--outputFile.json=${reportPath}`,\n ],\n { cwd: repository, env: childEnv, encoding: 'utf8', maxBuffer: 1024 ** 2 },\n );\n assert.equal(existsSync(marker), false, 'No npm subprocess may launch, even if the direct-entry guard regresses.');\n assert.ok(existsSync(loaded), 'The direct-process npm guard must load.');\n return { result, reportPath, loaded };\n}\n\ntest(\n 'direct-focus npm interception reaches the pinned worker before real-case selection',\n { tags: ['release'] },\n () => {\n const f = fixture();\n try {\n const run = directFocus(f, 'controlled nonexistent selection', {}, 'worker-probe');\n assert.equal(run.result.status, 0);\n } finally {\n f.cleanup();\n }\n },\n);\n\ntest('direct release focus rejects invalid contracts before any npm launch', { tags: ['release'] }, () => {\n const f = fixture();\n try {\n for (const kind of ['absent', 'missing', 'malformed']) {\n const contractPath = join(f.base, kind, 'contract.json');\n if (kind === 'malformed') {\n mkdirSync(dirname(contractPath));\n writeFileSync(contractPath, '{broken');\n }\n const run = directFocus(\n f,\n '(?!)',\n {\n AI_DELIVERY_TEST_LANE: 'release',\n ...(kind === 'absent' ? {} : { AI_DELIVERY_RELEASE_CONTRACT: contractPath }),\n },\n kind,\n );\n assert.notEqual(run.result.status, 0);\n assert.match(run.result.stderr + run.result.stdout, /contract|checkpoint/iu);\n }\n } finally {\n f.cleanup();\n }\n});\n\ntest(\n 'qualification CLI finishes module loading before its owned graph reuses the validator',\n { tags: ['release'] },\n () => {\n const f = fixture();\n try {\n const scripts = join(f.cwd, 'scripts');\n mkdirSync(scripts);\n const entry = join(scripts, 'current-qualification.mjs');\n writeFileSync(entry, readFileSync(join(repository, 'scripts/current-qualification.mjs')));\n const marker = join(f.base, 'module-ready');\n writeFileSync(\n join(scripts, 'checks.mjs'),\n `export {RELEASE_CASES,confirmCommandQuiescence,errorMessage,executeCommand,safeEnvironment,treeIdentity} from ${JSON.stringify(pathToFileURL(join(repository, 'scripts/checks.mjs')).href)};import {writeFileSync} from 'node:fs';export async function runChecks(){await import('./current-qualification.mjs');writeFileSync(${JSON.stringify(marker)},'ready');throw new Error('Controlled stop before pack');}`,\n );\n writeFileSync(\n join(scripts, 'current-consumer.mjs'),\n `export {inspectCandidate,sha256,verifyProducerJoin} from ${JSON.stringify(pathToFileURL(join(repository, 'scripts/current-consumer.mjs')).href)};`,\n );\n writeFileSync(\n join(f.cwd, 'package.json'),\n JSON.stringify({ type: 'module', name: '@example/entry-fixture', version: '0.0.0' }),\n );\n writeFileSync(join(f.cwd, 'package-lock.json'), '{}\\n');\n execFileSync('git', ['add', '.'], { cwd: f.cwd });\n execFileSync(\n 'git',\n [\n '-c',\n 'user.name=Fictional Fixture',\n '-c',\n 'user.email=fixture@example.invalid',\n '-c',\n 'commit.gpgsign=false',\n 'commit',\n '-qm',\n 'controlled entry source',\n ],\n { cwd: f.cwd },\n );\n const output = join(f.base, 'entry-result');\n const result = spawnSync(process.execPath, [entry, '--results-dir', output], {\n cwd: f.cwd,\n env: checks.safeEnvironment(process.env as Record<string, string>),\n encoding: 'utf8',\n maxBuffer: 1024 ** 2,\n });\n assert.equal(\n existsSync(marker),\n true,\n 'The entry module must finish evaluating before its graph awaits its validation exports.',\n );\n assert.equal(result.status, 1);\n const report = JSON.parse(readFileSync(join(output, 'result.json'), 'utf8')) as {\n status: string;\n error: string;\n pack?: unknown;\n consumer?: unknown;\n };\n assert.equal(report.status, 'failed');\n assert.match(report.error, /Controlled stop before pack/u);\n assert.equal(report.pack, undefined);\n assert.equal(report.consumer, undefined);\n } finally {\n f.cleanup();\n }\n },\n);\n\nfunction fixture() {\n const base = mkdtempSync(join(tmpdir(), 'contributor-check-fixture-'));\n const cwd = join(base, 'repo');\n mkdirSync(join(cwd, 'src'), { recursive: true });\n writeFileSync(\n join(cwd, '.gitignore'),\n '/dist/\\n/node_modules/\\n/plugins/ai-delivery/runtime/dist/\\n/plugins/ai-delivery/dist/\\n',\n );\n writeFileSync(join(cwd, 'src/original.test.ts'), '// synthetic original test\\n');\n writeFileSync(\n join(cwd, 'package.json'),\n JSON.stringify({\n name: '@example/fixture',\n version: '1.0.0',\n bin: { fixture: './dist/cli.js' },\n exports: { '.': { default: './dist/index.js' } },\n }),\n );\n execFileSync('git', ['init', '-q', cwd]);\n execFileSync('git', ['add', '.'], { cwd });\n const toolchain: Toolchain = {\n controller: { version: 'v24.21.0', executable: process.execPath },\n npm: { version: '11.19.0', executable: 'synthetic-npm' },\n libraryConsumer: { version: 'v26.2.0', executable: 'synthetic-node26' },\n };\n const cleanup = () => rmSync(base, { recursive: true, force: true });\n return { base, cwd, toolchain, cleanup };\n}\n\nfunction passingReport(cwd: string, names: string[]): TestReport {\n return {\n success: true,\n numTotalTests: names.length,\n numPassedTests: names.length,\n testResults: names.map((name) => ({\n name: join(cwd, name),\n status: 'passed',\n assertionResults: [{ fullName: 'synthetic assertion', status: 'passed' }],\n })),\n };\n}\n\nfunction executor(f: ReturnType<typeof fixture>, failStage = ''): Checks['executeCommand'] {\n return async (command, options) => {\n mkdirSync(options.directory, { recursive: true });\n const stdoutPath = join(options.directory, 'stdout.txt');\n const stderrPath = join(options.directory, 'stderr.txt');\n writeFileSync(stdoutPath, '');\n writeFileSync(stderrPath, '');\n const stage = options.directory.split('/').at(-1)!;\n if (stage === 'build') {\n assert.equal(\n existsSync(join(f.cwd, 'dist/stale.test.js')),\n false,\n 'clean before build, rather than after selection',\n );\n mkdirSync(join(f.cwd, 'dist'), { recursive: true });\n for (const source of readdirSync(join(f.cwd, 'src')).filter((name) => name.endsWith('.test.ts')))\n writeFileSync(join(f.cwd, 'dist', source.replace(/\\.ts$/u, '.js')), '// compiled synthetic test\\n');\n for (const path of [\n 'dist/cli.js',\n 'dist/index.js',\n 'plugins/ai-delivery/runtime/dist/cli.js',\n 'plugins/ai-delivery/dist/mcp-launcher.js',\n ]) {\n mkdirSync(dirname(join(f.cwd, path)), { recursive: true });\n writeFileSync(join(f.cwd, path), '// fictional packaged output\\n');\n chmodSync(join(f.cwd, path), 0o755);\n }\n }\n if (stage === 'tests') {\n const names = command.filter((arg) => /^(?:dist\\/.*\\.test\\.js|src\\/.*\\.test\\.ts)$/u.test(arg));\n assert.equal(names.length, 1);\n const path = command\n .find((arg) => arg.startsWith('--outputFile.json='))!\n .split('=')\n .slice(1)\n .join('=');\n writeFileSync(path, JSON.stringify(passingReport(f.cwd, names)));\n }\n if (stage === 'inventory') {\n writeFileSync(\n stdoutPath,\n JSON.stringify([\n {\n name: '@example/fixture',\n version: '1.0.0',\n files: [\n 'dist/cli.js',\n 'dist/index.js',\n 'plugins/ai-delivery/runtime/dist/cli.js',\n 'plugins/ai-delivery/dist/mcp-launcher.js',\n ].map((path) => ({ path, mode: 0o755, size: readFileSync(join(f.cwd, path)).length })),\n },\n ]),\n );\n const coverage = options.env.NODE_V8_COVERAGE!;\n mkdirSync(coverage, { recursive: true });\n writeFileSync(\n join(coverage, 'synthetic.json'),\n JSON.stringify({\n result: [\n {\n url: new URL(`file://${join(f.cwd, 'dist/index.js')}`).href,\n functions: [{ ranges: [{ startOffset: 0, endOffset: 1, count: 1 }] }],\n },\n ],\n }),\n );\n }\n const result = {\n status: stage === failStage ? 'failed' : 'passed',\n exitCode: stage === failStage ? 7 : 0,\n stdoutPath,\n stderrPath,\n };\n options.progress?.(result);\n return { ...result, cleanupConfirmed: true };\n };\n}\n\ntest('local and CI share the PR producer while explicit release owns package qualification', () => {\n const manifest = JSON.parse(readFileSync(join(repository, 'package.json'), 'utf8')) as {\n scripts: Record<string, string>;\n };\n assert.equal(manifest.scripts.checks, 'node scripts/checks.mjs');\n assert.equal(manifest.scripts['checks:release'], 'node scripts/current-qualification.mjs');\n assert.equal(manifest.scripts['checks:producer'], 'node scripts/current-qualification.mjs --producer-only');\n assert.equal(manifest.scripts['checks:fast'], 'node scripts/checks.mjs --fast');\n const ci = readFileSync(join(repository, '.github/workflows/ci.yml'), 'utf8');\n assert.match(ci, /npm run checks -- --results-dir/u);\n assert.doesNotMatch(ci, /npm run build|npm pack/u);\n assert.doesNotMatch(ci, /checks:release|current-qualification/u);\n assert.match(ci, /Retain PR producer and interrupted check evidence/u);\n assert.match(ci, /if: always\\(\\)/u);\n assert.deepEqual(checks.FULL_GATES, ['format', 'lint', 'types', 'build', 'tests', 'inventory']);\n});\n\ntest('clean full graph removes deleted/renamed compiled tests and retains exact command evidence', async () => {\n const f = fixture();\n try {\n mkdirSync(join(f.cwd, 'dist'));\n writeFileSync(join(f.cwd, 'dist/stale.test.js'), '// deleted source output\\n');\n renameSync(join(f.cwd, 'src/original.test.ts'), join(f.cwd, 'src/renamed.test.ts'));\n const resultsDir = join(f.base, 'results');\n const report = await checks.runChecks({\n cwd: f.cwd,\n resultsDir,\n toolchain: () => f.toolchain,\n execute: executor(f),\n });\n assert.equal(report.fullSuccess, true, report.error);\n assert.deepEqual(\n report.commands.map((entry) => entry.stage),\n checks.FULL_GATES,\n );\n assert.deepEqual(report.selectedTestFiles, ['src/renamed.test.ts']);\n assert.ok(report.commands[2]!.command.includes('--emitDeclarationOnly'));\n assert.deepEqual(report.commands[3]!.command.slice(1), [join(f.cwd, 'scripts/build.mjs'), '--plugin']);\n assert.match(readFileSync(join(resultsDir, 'result.txt'), 'utf8'), /FULL contributor checks: passed/u);\n assert.equal(existsSync(join(f.cwd, 'dist/stale.test.js')), false);\n await assert.rejects(checks.runChecks({ cwd: f.cwd, resultsDir }), /Existing result/u);\n writeFileSync(join(f.cwd, 'dist/stale.test.js'), '// unexpected survivor\\n');\n assert.throws(() => checks.assertCleanSelection(f.cwd), /stale, deleted, renamed/u);\n } finally {\n f.cleanup();\n }\n});\n\ntest('successful required checks bind only the same clean committed head through finalization', async () => {\n for (const scenario of ['stable', 'head-drift', 'hidden-change', 'cleanup-unconfirmed']) {\n const f = fixture();\n try {\n const git = (...args: string[]) =>\n execFileSync(\n 'git',\n [\n '-c',\n 'user.name=Fixture',\n '-c',\n 'user.email=fixture@example.invalid',\n '-c',\n 'commit.gpgsign=false',\n '-c',\n 'core.hooksPath=/dev/null',\n ...args,\n ],\n { cwd: f.cwd, encoding: 'utf8' },\n ).trim();\n git('commit', '-qm', 'Clean source');\n const expected = { sha: git('rev-parse', 'HEAD'), tree: git('rev-parse', 'HEAD^{tree}') };\n if (scenario === 'hidden-change') {\n git('update-index', '--assume-unchanged', 'src/original.test.ts');\n writeFileSync(join(f.cwd, 'src/original.test.ts'), '// bytes outside the committed head\\n');\n }\n const execute = executor(f);\n const report = await checks.runChecks({\n cwd: f.cwd,\n resultsDir: join(f.base, 'head-results'),\n toolchain: () => f.toolchain,\n execute: async (command, options) => {\n const result = await execute(command, options);\n if (scenario === 'head-drift' && options.directory.endsWith('/inventory'))\n git('commit', '--allow-empty', '-qm', 'Same-tree drift');\n return { ...result, cleanupConfirmed: scenario !== 'cleanup-unconfirmed' };\n },\n });\n assert.equal(report.status, 'passed', report.error);\n assert.deepEqual(\n (report as Report & { verifiedHead?: typeof expected }).verifiedHead,\n scenario === 'stable' ? expected : undefined,\n );\n } finally {\n f.cleanup();\n }\n }\n});\n\ntest('fast success and command failure remain partial and preserve omitted/remaining proof', async () => {\n const f = fixture();\n try {\n const fast = await checks.runChecks({\n cwd: f.cwd,\n resultsDir: join(f.base, 'fast'),\n fast: true,\n toolchain: () => f.toolchain,\n execute: executor(f),\n });\n assert.equal(fast.status, 'partial-passed');\n assert.equal(fast.fullSuccess, false);\n assert.deepEqual(fast.omitted, ['build', 'tests', 'inventory']);\n const failed = await checks.runChecks({\n cwd: f.cwd,\n resultsDir: join(f.base, 'failed'),\n toolchain: () => f.toolchain,\n execute: executor(f, 'lint'),\n });\n assert.equal(failed.exitCode, 1);\n assert.equal(failed.fullSuccess, false);\n assert.deepEqual(\n failed.commands.map((entry) => entry.stage),\n ['format', 'lint'],\n );\n assert.match(failed.error!, /lint: failed/u);\n const testFailure = await checks.runChecks({\n cwd: f.cwd,\n resultsDir: join(f.base, 'failed-tests'),\n toolchain: () => f.toolchain,\n execute: executor(f, 'tests'),\n });\n assert.equal(testFailure.fullSuccess, false);\n assert.equal(testFailure.observedTests?.total, 1);\n assert.match(readFileSync(join(f.base, 'failed-tests/result.txt'), 'utf8'), /Observed test results/u);\n assert.equal(testFailure.commands.at(-1)!.status, 'failed');\n } finally {\n f.cleanup();\n }\n});\n\ntest('explicit focused files run only their compilation and tests without install, inventory or plugin bundling', async () => {\n for (const selected of ['original', 'tooling']) {\n const f = fixture();\n try {\n writeFileSync(join(f.cwd, 'src/tooling.test.ts'), '// another changed contract\\n');\n const report = await checks.runChecks({\n cwd: f.cwd,\n resultsDir: join(f.base, 'focused'),\n fast: true,\n testFiles: [`dist/${selected}.test.js`],\n toolchain: () => f.toolchain,\n execute: executor(f),\n });\n assert.equal(report.exitCode, 0, report.error);\n assert.equal(report.scope, 'focused');\n assert.equal(report.status, 'partial-passed');\n assert.equal(report.fullSuccess, false);\n assert.deepEqual(report.selectedTestFiles, [`dist/${selected}.test.js`]);\n assert.deepEqual(\n report.commands.map((entry) => entry.stage),\n ['format', 'lint', 'types', 'build', 'tests'],\n );\n assert.deepEqual(report.commands[3]!.command.slice(1), [join(f.cwd, 'scripts/build.mjs')]);\n assert.ok(report.omitted.includes('unselected tests'));\n assert.ok(report.omitted.includes('inventory'));\n assert.equal(\n report.commands.some((entry) => entry.command.includes('ci') || entry.command.includes('pack')),\n false,\n );\n } finally {\n f.cleanup();\n }\n }\n});\n\ntest('invalid focused selection or local dependency install refuses before launching any gate', async () => {\n for (const options of [\n { fast: true, testFiles: [] },\n { fast: true, testFiles: ['dist/missing.test.js'] },\n { fast: true, testFiles: ['../dist/original.test.js'] },\n { fast: true, testFiles: ['dist/*.test.js'] },\n { fast: true, testFiles: ['dist/original.test.js', 'dist/original.test.js'] },\n { testFiles: ['dist/original.test.js'] },\n { fast: true, install: true },\n ]) {\n const f = fixture();\n try {\n const report = await checks.runChecks({\n cwd: f.cwd,\n resultsDir: join(f.base, 'invalid'),\n ...options,\n toolchain: () => f.toolchain,\n execute: executor(f),\n });\n assert.equal(report.exitCode, 1);\n assert.equal(report.fullSuccess, false);\n assert.deepEqual(report.commands, []);\n assert.match(report.error!, /focused|install|selection|explicit/iu);\n } finally {\n f.cleanup();\n }\n }\n});\n\ntest('focused plugin bundling requires an explicit artifact-dependent selection', async () => {\n const f = fixture();\n try {\n const report = await checks.runChecks({\n cwd: f.cwd,\n resultsDir: join(f.base, 'plugin-focused'),\n fast: true,\n testFiles: ['dist/original.test.js'],\n buildPlugin: true,\n toolchain: () => f.toolchain,\n execute: executor(f),\n });\n assert.equal(report.exitCode, 0, report.error);\n assert.deepEqual(\n report.commands.map((entry) => entry.stage),\n ['format', 'lint', 'types', 'build', 'plugin-build', 'tests'],\n );\n assert.equal(report.fullSuccess, false);\n } finally {\n f.cleanup();\n }\n});\n\ntest('toolchain preflight rejects absent/inaccessible/wrong consumer before gates; environment excludes credentials and ambient preloads', async () => {\n const env = checks.safeEnvironment({\n PATH: process.env.PATH!,\n HOME: process.env.HOME!,\n GH_TOKEN: 'fictional-do-not-forward',\n GH_PRIVATE_KEY_GPT_REVIEWER: 'fictional-ref',\n NODE_OPTIONS: '--require fictional',\n NODE_PATH: 'checkout-only',\n NPM_TOKEN: 'fictional-token',\n AI_DELIVERY_REAL_PACKAGE_ARCHIVE: '/synthetic/explicit-historical.tgz',\n });\n assert.equal(env.GH_TOKEN, undefined);\n assert.equal(env.NODE_OPTIONS, undefined);\n assert.equal(env.NODE_PATH, undefined);\n assert.equal(env.NPM_TOKEN, undefined);\n assert.equal(env.AI_DELIVERY_REAL_PACKAGE_ARCHIVE, '/synthetic/explicit-historical.tgz');\n assert.throws(() => checks.validateToolchain(repository, env), /AI_DELIVERY_NODE26_EXECUTABLE/u);\n assert.throws(\n () =>\n checks.validateToolchain(repository, { ...env, AI_DELIVERY_NODE26_EXECUTABLE: '/nonexistent/synthetic-node' }),\n /ENOENT/u,\n );\n assert.throws(\n () => checks.validateToolchain(repository, { ...env, AI_DELIVERY_NODE26_EXECUTABLE: process.execPath }),\n /Node 26\\.2\\.0/u,\n );\n const f = fixture();\n try {\n const report = await checks.runChecks({\n cwd: f.cwd,\n resultsDir: join(f.base, 'missing'),\n toolchain: () => {\n throw new Error('missing runtime');\n },\n });\n assert.equal(report.fullSuccess, false);\n assert.deepEqual(report.commands, []);\n } finally {\n f.cleanup();\n }\n});\n\ntest(\n 'real failed and explicitly timed-out commands preserve logs and prove owned cleanup',\n { tags: ['release'] },\n async () => {\n const f = fixture();\n try {\n const env = checks.safeEnvironment(process.env as Record<string, string>);\n const failed = await checks.executeCommand(\n [process.execPath, '-e', \"console.log('partial failure evidence');process.exit(7)\"],\n { cwd: f.cwd, env, directory: join(f.base, 'failure') },\n );\n assert.equal(failed.status, 'failed');\n assert.equal(failed.exitCode, 7);\n assert.match(readFileSync(failed.stdoutPath, 'utf8'), /partial failure evidence/u);\n const timed = await checks.executeCommand(\n [process.execPath, '-e', \"console.log('started');setInterval(()=>{},1000)\"],\n { cwd: f.cwd, env, directory: join(f.base, 'timeout'), timeoutMs: 200 },\n );\n assert.equal(timed.status, 'command-timeout');\n assert.equal(timed.cleanupConfirmed, true);\n assert.ok(timed.observedProcesses!.length > 0);\n assert.ok(timed.observedProcesses!.every((row) => row.birth.length > 0));\n } finally {\n f.cleanup();\n }\n },\n);\n\ntest(\n 'cancellation reaps observed detached descendants and preserves an unrelated peer',\n { tags: ['release'] },\n async () => {\n const f = fixture();\n const peer = spawn(process.execPath, ['-e', 'setInterval(()=>{},1000)'], { stdio: 'ignore' });\n try {\n const controller = new AbortController();\n const marker = join(f.base, 'owned-child');\n const script = `const cp=require('node:child_process'),fs=require('node:fs');const c=cp.spawn(process.execPath,['-e','setInterval(()=>{},1000)'],{detached:true,stdio:'ignore'});fs.writeFileSync(${JSON.stringify(marker)},String(c.pid));setInterval(()=>{},1000);`;\n const timer = setInterval(() => {\n if (existsSync(marker)) {\n clearInterval(timer);\n setTimeout(() => controller.abort(), 250);\n }\n }, 20);\n const result = await checks.executeCommand([process.execPath, '-e', script], {\n cwd: f.cwd,\n env: checks.safeEnvironment(process.env as Record<string, string>),\n directory: join(f.base, 'cancelled'),\n signal: controller.signal,\n });\n clearInterval(timer);\n assert.equal(result.status, 'cancelled');\n assert.equal(result.cleanupConfirmed, true);\n const ownedPid = readFileSync(marker, 'utf8');\n const state = execFileSync('/bin/ps', ['-p', ownedPid, '-o', 'stat='], { encoding: 'utf8' }).trim();\n assert.ok(state.startsWith('Z'));\n process.kill(peer.pid!, 0);\n } catch (error) {\n // ps exits1 for an absent child, which is also confirmed cleanup.\n if (!(error instanceof Error && 'status' in error && error.status === 1)) throw error;\n process.kill(peer.pid!, 0);\n } finally {\n peer.kill('SIGKILL');\n await new Promise<void>((done) => {\n if (peer.exitCode !== null || peer.signalCode !== null) done();\n else peer.once('close', () => done());\n });\n f.cleanup();\n }\n },\n);\n\ntest('existing temporary aliases resolve to the same physical directory without creating a new destination', () => {\n const f = fixture();\n try {\n const target = join(f.base, 'existing-temp');\n const alias = join(f.base, 'temp-alias');\n mkdirSync(target);\n symlinkSync(target, alias);\n const env = checks.safeEnvironment({ TMPDIR: alias, TEMP: alias, TMP: alias });\n assert.equal(env.TMPDIR, realpathSync(target));\n assert.equal(env.TEMP, realpathSync(target));\n assert.equal(env.TMP, realpathSync(target));\n assert.equal(readFileSync(join(f.cwd, 'src/original.test.ts'), 'utf8'), '// synthetic original test\\n');\n } finally {\n f.cleanup();\n }\n});\n\ntest('source identity preserves leading filename whitespace and refuses dangling tracked symlinks', () => {\n const f = fixture();\n try {\n const path = join(f.cwd, ' leading.txt');\n writeFileSync(path, 'first source bytes');\n execFileSync('git', ['add', '--', ' leading.txt'], { cwd: f.cwd });\n const before = checks.treeIdentity(f.cwd).sha256;\n writeFileSync(path, 'changed source bytes');\n assert.notEqual(checks.treeIdentity(f.cwd).sha256, before);\n symlinkSync('nonexistent-target', join(f.cwd, 'dangling-link'));\n execFileSync('git', ['add', '--', 'dangling-link'], { cwd: f.cwd });\n assert.throws(() => checks.treeIdentity(f.cwd), /regular tracked\\/source files/u);\n } finally {\n f.cleanup();\n }\n});\n\ntest(\n 'cancellation discovers children born from a detached owner after the root exits and preserves a peer',\n { tags: ['release'] },\n async () => {\n const f = fixture();\n const peer = spawn(process.execPath, ['-e', 'setInterval(()=>{},1000)'], { stdio: 'ignore' });\n const marker = join(f.base, 'late-children.json');\n const controller = new AbortController();\n const identity = (pid: number) => {\n const result = spawnSync('/bin/ps', ['-p', String(pid), '-o', 'stat=,lstart='], { encoding: 'utf8' });\n assert.ok(!result.error, result.error?.message);\n assert.ok(result.status === 0 || result.status === 1, result.stderr);\n return result.status === 1 ? undefined : result.stdout.trim();\n };\n let timer: ReturnType<typeof setInterval> | undefined;\n try {\n const descendant = `const cp=require('node:child_process'),fs=require('node:fs');\nconst id=(pid)=>cp.execFileSync('/bin/ps',['-p',String(pid),'-o','stat=,lstart='],{encoding:'utf8'}).trim().split(/\\\\s+/).slice(1).join(' ');\nconst record={a:process.pid,aBirth:id(process.pid)};fs.writeFileSync(${JSON.stringify(marker)},JSON.stringify(record));\nprocess.once('SIGTERM',()=>setTimeout(()=>{\nconst root=cp.spawnSync('/bin/ps',['-p',process.argv[1],'-o','stat='],{encoding:'utf8'});\nrecord.rootExited=root.status===1||root.stdout.trim().startsWith('Z');\nconst b=cp.spawn(process.execPath,['-e','setInterval(()=>{},1000)'],{detached:true,stdio:'ignore'});\nrecord.b=b.pid;record.bBirth=id(b.pid);fs.writeFileSync(${JSON.stringify(marker)},JSON.stringify(record));\n},200));setInterval(()=>{},1000);`;\n // The root exits on TERM. Its detached child ignores TERM and births B later.\n const script = `const cp=require('node:child_process');cp.spawn(process.execPath,['-e',${JSON.stringify(descendant)},String(process.pid)],{detached:true,stdio:'ignore'});setInterval(()=>{},1000);`;\n timer = setInterval(() => {\n if (existsSync(marker)) {\n clearInterval(timer);\n setTimeout(() => controller.abort(), 250);\n }\n }, 20);\n const result = await checks.executeCommand([process.execPath, '-e', script], {\n cwd: f.cwd,\n env: checks.safeEnvironment(process.env as Record<string, string>),\n directory: join(f.base, 'late-cancellation'),\n signal: controller.signal,\n });\n const children = JSON.parse(readFileSync(marker, 'utf8')) as {\n a: number;\n aBirth: string;\n b: number;\n bBirth: string;\n rootExited: boolean;\n };\n assert.ok(children.b, 'The TERM-resistant owner must create a late descendant.');\n assert.equal(children.rootExited, true, 'The late descendant must be born after the root exits.');\n assert.equal(result.status, 'cancelled');\n assert.equal(result.cleanupConfirmed, true);\n assert.ok(result.observedProcesses?.some((row) => row.pid === children.b && row.birth === children.bBirth));\n for (const pid of [children.a, children.b]) assert.ok(identity(pid)?.startsWith('Z') ?? true);\n process.kill(peer.pid!, 0);\n } finally {\n clearInterval(timer);\n // On a failing assertion, signal only the synthetic identities this fixture recorded.\n if (existsSync(marker)) {\n const children = JSON.parse(readFileSync(marker, 'utf8')) as {\n a: number;\n aBirth: string;\n b?: number;\n bBirth?: string;\n };\n for (const [pid, birth] of [\n [children.a, children.aBirth],\n [children.b, children.bBirth],\n ] as const) {\n if (pid && birth) {\n const state = identity(pid);\n if (state && !state.startsWith('Z') && state.split(/\\s+/u).slice(1).join(' ') === birth)\n process.kill(pid, 'SIGKILL');\n }\n }\n }\n peer.kill('SIGKILL');\n await new Promise<void>((done) => {\n if (peer.exitCode !== null || peer.signalCode !== null) done();\n else peer.once('close', () => done());\n });\n f.cleanup();\n }\n },\n);\n\ntest('coverage labels unobserved contributor scripts without synthesizing measured ranges or floors', () => {\n const f = fixture();\n try {\n const directory = join(f.base, 'unit-coverage');\n mkdirSync(directory);\n writeFileSync(\n join(directory, 'fixture.json'),\n JSON.stringify({\n result: [\n {\n url: new URL('scripts/build-plugin.mjs', `file://${f.cwd}/`).href,\n functions: [{ ranges: [{ startOffset: 0, endOffset: 1, count: 1 }] }],\n },\n ],\n }),\n );\n const baseline = checks.coverageBaseline(directory, f.cwd);\n assert.deepEqual(\n baseline.files.map((file) => file.path),\n ['scripts/build-plugin.mjs'],\n );\n assert.deepEqual(\n baseline.unmeasuredContributorScripts.map((file) => file.path),\n [\n 'scripts/checks.mjs',\n 'scripts/pre-commit.mjs',\n 'scripts/current-qualification.mjs',\n 'scripts/current-consumer.mjs',\n ],\n );\n assert.ok(baseline.unmeasuredContributorScripts.every((file) => file.threshold === null && file.reason.length > 0));\n assert.match(baseline.thresholdProposal, /no derived floor until actual instrumentation/u);\n // This controlled parser fixture is not the measured canonical graph baseline.\n } finally {\n f.cleanup();\n }\n});\n\n// Fictional orchestration fixtures exercise the real producer-join validator.\n// Archive safety/runtime qualification is covered by the separately owned #90 fixture.\ntype SyntheticContract = {\n sourceRoot: string;\n sourceCommit: string;\n sourceTree: string;\n sourceManifestSha256: string;\n sourceLockSha256: string;\n packageVersion: string;\n archivePath: string;\n archiveSha256: string;\n dryInventory: { path: string; size: number; mode: number }[];\n producer: {\n checksResultPath: string;\n checksResultSha256: string;\n artifactReceiptPath: string;\n artifactReceiptSha256: string;\n };\n};\ntype Candidate = {\n archiveSha256: string;\n sourceManifestSha256: string;\n sourceLockSha256: string;\n archiveManifestSha256: string;\n packageVersion: string;\n inventorySha256: string;\n inventory: { path: string; size: number; mode: number; sha256: string }[];\n skills: { path: string; sha256: string }[];\n};\ntype QualificationOptions = {\n cwd: string;\n resultsDir: string;\n producerOnly?: boolean;\n resume?: string;\n consumerResult?: string;\n reconcileConsumer?: boolean;\n signal?: AbortSignal;\n checks?: (options: {\n resultsDir: string;\n release?: ReleaseContext;\n signal?: AbortSignal;\n }) => Promise<Record<string, unknown>>;\n execute?: (command: string[], options: CommandOptions) => Promise<CommandResult>;\n inspect?: (contract: SyntheticContract) => Candidate;\n};\nconst qualification = (await import(new URL('../scripts/current-qualification.mjs', import.meta.url).href)) as {\n sourceIdentity(cwd: string): {\n commit: string;\n tree: string;\n fingerprint: { kind: string; sha256: string; fileCount: number };\n };\n validateCheckpoint(path: string, cwd: string, inspect: NonNullable<QualificationOptions['inspect']>): unknown;\n runQualification(options: QualificationOptions): Promise<{\n status: string;\n qualified: boolean;\n exitCode: number;\n error?: string;\n omitted: string[];\n releaseTests?: { path: string; sha256: string };\n }>;\n};\nconst consumerProof = (await import(new URL('../scripts/current-consumer.mjs', import.meta.url).href)) as {\n sha256(bytes: string | Buffer): string;\n verifyProducerJoin(contract: SyntheticContract, candidate: Candidate): Record<string, unknown>;\n};\n\nfunction qualificationFixture() {\n const f = fixture();\n mkdirSync(join(f.cwd, 'dist'));\n writeFileSync(join(f.cwd, 'dist/generated.js'), 'original');\n writeFileSync(join(f.cwd, 'package-lock.json'), '{}\\n');\n execFileSync('git', ['add', '.'], { cwd: f.cwd });\n execFileSync(\n 'git',\n [\n '-c',\n 'user.name=Fictional fixture',\n '-c',\n 'user.email=fixture@example.invalid',\n '-c',\n 'core.hooksPath=/dev/null',\n 'commit',\n '-qm',\n 'fictional clean source',\n ],\n { cwd: f.cwd },\n );\n let producers = 0;\n let packs = 0;\n let consumers = 0;\n let releases = 0;\n let releaseHook: (options: {\n resultsDir: string;\n signal?: AbortSignal;\n }) => Promise<CommandResult | void> = async () => {};\n const order: string[] = [];\n let packStatus = 'passed';\n let cleanup = true;\n let mutateProducer: (report: Record<string, unknown>) => void = () => {};\n const members = [\n { path: 'dist/generated.js', size: 8, mode: 0o644 },\n { path: 'package.json', size: readFileSync(join(f.cwd, 'package.json')).length, mode: 0o644 },\n ];\n const inspect: NonNullable<QualificationOptions['inspect']> = (contract) => {\n assert.equal(consumerProof.sha256(readFileSync(contract.archivePath)), contract.archiveSha256);\n assert.deepEqual(contract.dryInventory, members);\n const inventory = members.map((item) => ({\n ...item,\n sha256: consumerProof.sha256(readFileSync(join(f.cwd, item.path))),\n }));\n return {\n archiveSha256: contract.archiveSha256,\n sourceManifestSha256: contract.sourceManifestSha256,\n sourceLockSha256: contract.sourceLockSha256,\n archiveManifestSha256: contract.sourceManifestSha256,\n packageVersion: contract.packageVersion,\n inventorySha256: consumerProof.sha256(JSON.stringify(inventory)),\n inventory,\n skills: ['intake-create', 'worktree-lifecycle', 'pr-handoff'].map((path) => ({ path, sha256: 'a'.repeat(64) })),\n };\n };\n const produce: NonNullable<QualificationOptions['checks']> = async ({ resultsDir, release, signal }) => {\n if (release) {\n releases++;\n order.push('release');\n mkdirSync(resultsDir);\n const observed = await releaseHook({ resultsDir, ...(signal ? { signal } : {}) });\n const cancelled = signal?.aborted === true;\n const report = {\n schemaVersion: 'contributor-checks@1',\n runId: 'fictional-release',\n scope: 'release',\n status: cancelled ? 'cancelled' : 'passed',\n exitCode: cancelled ? 130 : 0,\n fullSuccess: false,\n artifactQualified: false,\n gates: ['tests'],\n omitted: ['PR producer and consumer'],\n resultsDir,\n tree: qualification.sourceIdentity(f.cwd).fingerprint,\n toolchain: f.toolchain,\n release: {\n ...release,\n contractSha256: consumerProof.sha256(readFileSync(release.contractPath)),\n historicalInputSupplied: false,\n temporary: { path: join(resultsDir, 'temporary'), dev: 1, ino: 1, quiescent: true, removed: true },\n },\n commands: [\n {\n stage: 'tests',\n status: cancelled ? 'cancelled' : 'passed',\n exitCode: cancelled ? 130 : 0,\n signal: cancelled ? 'SIGTERM' : null,\n cleanupConfirmed: true,\n ...observed,\n },\n ],\n selectedTestFiles: [...new Set(checks.RELEASE_CASES.map((test) => test.file))],\n tests: {\n lane: 'release',\n files: new Set(checks.RELEASE_CASES.map((test) => test.file)).size,\n total: checks.RELEASE_CASES.length,\n passed: checks.RELEASE_CASES.filter((test) => test.kind === 'mandatory').length,\n skips: checks.RELEASE_CASES.filter((test) => test.kind !== 'mandatory'),\n selectedCases: checks.RELEASE_CASES.map(({ file, title }) => ({ file, title })),\n laneExcluded: [],\n },\n };\n writeFileSync(join(resultsDir, 'result.json'), JSON.stringify(report));\n return report;\n }\n producers++;\n order.push('producer');\n mkdirSync(resultsDir);\n const report: Record<string, unknown> = {\n schemaVersion: 'contributor-checks@1',\n runId: 'fictional-one-producer',\n scope: 'full',\n status: 'passed',\n fullSuccess: true,\n exitCode: 0,\n gates: checks.FULL_GATES,\n omitted: [],\n tree: qualification.sourceIdentity(f.cwd).fingerprint,\n commands: checks.FULL_GATES.map((stage) => ({\n stage,\n status: 'passed',\n exitCode: 0,\n signal: null,\n cleanupConfirmed: true,\n })),\n tests: { files: 1, total: 1, passed: 1, skips: [] },\n selectedTestFiles: ['src/original.test.ts'],\n toolchain: f.toolchain,\n inventory: {\n kind: 'dry-inventory-only',\n name: '@aviaratech/ai-delivery',\n version: '1.0.0',\n fileCount: members.length,\n files: members.map((item) => ({ ...item, sha256: consumerProof.sha256(readFileSync(join(f.cwd, item.path))) })),\n },\n };\n mutateProducer(report);\n writeFileSync(join(resultsDir, 'result.json'), JSON.stringify(report));\n return report;\n };\n const execute: NonNullable<QualificationOptions['execute']> = async (command, options) => {\n if (command.at(-1) === '--authorize-install') {\n const contractPath = command[2];\n const resultPath = command[3];\n assert.ok(contractPath && resultPath, 'Synthetic consumer requires contract and result paths.');\n const contract = JSON.parse(readFileSync(contractPath, 'utf8')) as SyntheticContract;\n const receipt = await consume(contract, { authorizeInstall: true });\n mkdirSync(options.directory);\n const stdoutPath = join(options.directory, 'stdout.txt');\n const stderrPath = join(options.directory, 'stderr.txt');\n writeFileSync(stdoutPath, 'fictional supervised consumer');\n writeFileSync(stderrPath, '');\n writeFileSync(resultPath, JSON.stringify(receipt));\n const result = {\n command,\n status: 'passed',\n exitCode: 0,\n signal: null,\n stdoutPath,\n stderrPath,\n cleanupConfirmed: true,\n };\n options.progress?.(result);\n return result;\n }\n packs++;\n order.push('pack');\n assert.deepEqual(command.slice(2, 5), ['pack', '--ignore-scripts', '--json']);\n mkdirSync(options.directory);\n const destination = command.at(-1)!;\n writeFileSync(join(destination, 'fictional.tgz'), 'fictional archive boundary');\n const stdoutPath = join(options.directory, 'stdout.txt');\n const stderrPath = join(options.directory, 'stderr.txt');\n writeFileSync(stdoutPath, JSON.stringify([{ filename: 'fictional.tgz', files: members }]));\n writeFileSync(stderrPath, '');\n return {\n command,\n startedAt: 'fictional',\n status: packStatus,\n exitCode: packStatus === 'passed' ? 0 : 9,\n signal: null,\n stdoutPath,\n stderrPath,\n cleanupConfirmed: cleanup,\n };\n };\n const consume = async (contract: SyntheticContract, options: { authorizeInstall: boolean }) => {\n consumers++;\n order.push('consumer');\n assert.equal(options.authorizeInstall, true);\n const candidate = inspect(contract);\n return {\n schemaVersion: 'ai-delivery.current-consumer@1',\n boundary: 'current-artifact',\n status: 'passed',\n qualified: true,\n sourceIdentityVerified: true,\n scriptsDisabled: true,\n sourceCommit: contract.sourceCommit,\n sourceTree: contract.sourceTree,\n sourceManifestSha256: contract.sourceManifestSha256,\n sourceLockSha256: contract.sourceLockSha256,\n archiveManifestSha256: contract.sourceManifestSha256,\n archiveSha256: contract.archiveSha256,\n packageVersion: contract.packageVersion,\n inventorySha256: candidate.inventorySha256,\n inventory: candidate.inventory,\n producerJoin: consumerProof.verifyProducerJoin(contract, candidate),\n cleanup: { quiescent: true, removed: true },\n productionClosure: {},\n mcp: {},\n skills: candidate.skills,\n resolutions: ['fictional owned resolution'],\n phases: [\n 'node24',\n 'node26',\n 'npm',\n 'production-install',\n 'production-closure',\n 'cli-version',\n 'cli-json',\n 'exports-node24',\n 'library-node26',\n 'packaged-mcp',\n ].map((phase) => ({ phase, code: 0, signal: null, quiescent: true })),\n };\n };\n const options: QualificationOptions = {\n cwd: f.cwd,\n resultsDir: join(f.base, 'qualification'),\n checks: produce,\n execute,\n inspect,\n };\n return {\n ...f,\n options,\n inspect,\n consume,\n counts: () => ({ producers, packs, consumers }),\n releases: () => releases,\n order,\n releaseHook: (hook: typeof releaseHook) => {\n releaseHook = hook;\n },\n mutate: (fn: typeof mutateProducer) => {\n mutateProducer = fn;\n },\n packFailure: (status: string, quiescent = true) => {\n packStatus = status;\n cleanup = quiescent;\n },\n };\n}\n\ntest('qualification checkpoints one producer and pack, resumes without replay, and retains immutable digests', async () => {\n const f = qualificationFixture();\n try {\n const report = await qualification.runQualification({ ...f.options, producerOnly: true });\n assert.equal(report.status, 'incomplete');\n assert.equal(report.qualified, false);\n assert.equal(report.exitCode, 2);\n assert.deepEqual(f.counts(), { producers: 1, packs: 1, consumers: 0 });\n const checkpoint = join(f.options.resultsDir, 'checkpoint.json');\n const producer = readFileSync(join(f.options.resultsDir, 'producer/result.json'));\n const resumed = await qualification.runQualification({\n ...f.options,\n resume: checkpoint,\n resultsDir: join(f.base, 'resumed'),\n });\n assert.equal(resumed.qualified, true);\n assert.equal(resumed.exitCode, 0);\n assert.deepEqual(f.counts(), { producers: 1, packs: 1, consumers: 1 });\n assert.deepEqual(readFileSync(join(f.options.resultsDir, 'producer/result.json')), producer);\n await assert.rejects(\n qualification.runQualification({ ...f.options, resume: checkpoint, resultsDir: join(f.base, 'resumed') }),\n /Existing overall result/u,\n );\n } finally {\n f.cleanup();\n }\n});\n\ntest('qualification joins producer pack release tests and consumer in order', async () => {\n const f = qualificationFixture();\n try {\n const report = await qualification.runQualification(f.options);\n assert.equal(report.qualified, true);\n assert.deepEqual(f.counts(), { producers: 1, packs: 1, consumers: 1 });\n assert.equal(f.releases(), 1);\n assert.deepEqual(f.order, ['producer', 'pack', 'release', 'consumer']);\n assert.ok(report.releaseTests);\n } finally {\n f.cleanup();\n }\n});\n\ntest('producer-only omits release and consumer proof', async () => {\n const f = qualificationFixture();\n try {\n const report = await qualification.runQualification({ ...f.options, producerOnly: true });\n assert.equal(f.releases(), 0);\n assert.match(report.omitted.join(' '), /release/u);\n assert.equal(report.releaseTests, undefined);\n } finally {\n f.cleanup();\n }\n});\n\ntest('resume reuses compatible completed release proof', async () => {\n const f = qualificationFixture();\n try {\n const first = await qualification.runQualification(f.options);\n assert.ok(first.releaseTests);\n const original = readFileSync(first.releaseTests.path);\n const resumed = await qualification.runQualification({\n ...f.options,\n resume: join(f.options.resultsDir, 'checkpoint.json'),\n resultsDir: join(f.base, 'outer-reuse'),\n });\n assert.equal(resumed.qualified, true, resumed.error);\n assert.deepEqual(resumed.releaseTests, first.releaseTests);\n assert.deepEqual(readFileSync(first.releaseTests.path), original);\n assert.equal(f.releases(), 1);\n assert.deepEqual(f.counts(), { producers: 1, packs: 1, consumers: 1 });\n } finally {\n f.cleanup();\n }\n});\n\ntest('uncertain release attempt blocks a duplicate launch through fresh outer results', async () => {\n const f = qualificationFixture();\n try {\n await qualification.runQualification({ ...f.options, producerOnly: true });\n f.releaseHook(async () => {\n throw new Error('fictional lost release response');\n });\n const resume = join(f.options.resultsDir, 'checkpoint.json');\n const first = await qualification.runQualification({\n ...f.options,\n resume,\n resultsDir: join(f.base, 'release-lost'),\n });\n assert.match(first.error!, /lost release/u);\n const second = await qualification.runQualification({\n ...f.options,\n resume,\n resultsDir: join(f.base, 'release-uncertain'),\n });\n assert.match(second.error!, /Unresolved release/u);\n assert.equal(f.releases(), 1);\n assert.deepEqual(f.counts(), { producers: 1, packs: 1, consumers: 0 });\n } finally {\n f.cleanup();\n }\n});\n\ntest(\n 'interrupted release retry preserves prior evidence and skips completed producer and pack',\n { tags: ['release'] },\n async () => {\n const f = qualificationFixture();\n try {\n await qualification.runQualification({ ...f.options, producerOnly: true });\n const controller = new AbortController();\n const sentinel = join(f.base, 'unrelated');\n writeFileSync(sentinel, 'preserve');\n f.releaseHook(async ({ resultsDir, signal }) =>\n checks.executeCommand(\n [process.execPath, '-e', \"console.log('controlled release started');setInterval(()=>{},1000)\"],\n {\n cwd: f.cwd,\n env: checks.safeEnvironment({}),\n directory: join(resultsDir, 'tests'),\n ...(signal ? { signal } : {}),\n progress: (partial) => {\n if ((partial as CommandResult).observedProcesses?.length) controller.abort();\n },\n },\n ),\n );\n const resume = join(f.options.resultsDir, 'checkpoint.json');\n const interrupted = await qualification.runQualification({\n ...f.options,\n resume,\n signal: controller.signal,\n resultsDir: join(f.base, 'release-interrupted'),\n });\n assert.equal(interrupted.status, 'cancelled');\n const attemptPath = join(f.options.resultsDir, 'release-tests-attempt.json');\n const old = readFileSync(attemptPath);\n const prior = JSON.parse(old.toString()) as {\n directory: string;\n receipt: { path: string };\n command: CommandResult;\n };\n assert.equal(prior.command.cleanupConfirmed, true);\n assert.ok(prior.command.observedProcesses?.length);\n const receipt = readFileSync(prior.receipt.path);\n f.releaseHook(async () => {});\n const retried = await qualification.runQualification({\n ...f.options,\n resume,\n resultsDir: join(f.base, 'release-retry'),\n });\n assert.equal(retried.qualified, true, retried.error);\n assert.deepEqual(readFileSync(join(prior.directory, 'retired-attempt.json')), old);\n assert.deepEqual(readFileSync(prior.receipt.path), receipt);\n assert.equal(readFileSync(sentinel, 'utf8'), 'preserve');\n assert.equal(f.releases(), 2);\n assert.deepEqual(f.counts(), { producers: 1, packs: 1, consumers: 1 });\n const uninterrupted = qualificationFixture();\n try {\n assert.equal((await qualification.runQualification(uninterrupted.options)).qualified, true);\n assert.deepEqual(uninterrupted.order, ['producer', 'pack', 'release', 'consumer']);\n } finally {\n uninterrupted.cleanup();\n }\n } finally {\n f.cleanup();\n }\n },\n);\n\ntest('two competing resumes release at most one checkpoint-owned test child', { tags: ['release'] }, async () => {\n const f = qualificationFixture();\n try {\n await qualification.runQualification({ ...f.options, producerOnly: true });\n let started!: () => void, complete!: () => void;\n const start = new Promise<void>((resolve) => {\n started = resolve;\n });\n const gate = new Promise<void>((resolve) => {\n complete = resolve;\n });\n f.releaseHook(async () => {\n started();\n await gate;\n });\n const resume = join(f.options.resultsDir, 'checkpoint.json');\n const first = qualification.runQualification({ ...f.options, resume, resultsDir: join(f.base, 'race-a') });\n await Promise.race([\n start,\n first.then(() => {\n throw new Error('Release stage never started.');\n }),\n ]);\n const second = await qualification.runQualification({ ...f.options, resume, resultsDir: join(f.base, 'race-b') });\n complete();\n assert.equal((await first).qualified, true);\n assert.match(second.error!, /Unresolved release/u);\n assert.equal(f.releases(), 1);\n } finally {\n f.cleanup();\n }\n});\n\ntest('producer byte inventory rejects a same-length ignored build change before consumer launch', async () => {\n const f = qualificationFixture();\n try {\n const before = qualification.sourceIdentity(f.cwd).fingerprint;\n f.mutate(() => writeFileSync(join(f.cwd, 'dist/generated.js'), 'replaced'));\n const report = await qualification.runQualification(f.options);\n assert.deepEqual(qualification.sourceIdentity(f.cwd).fingerprint, before);\n assert.equal(report.qualified, false);\n assert.match(report.error!, /Archive bytes differ from the successful producer/u);\n assert.deepEqual(f.counts(), { producers: 1, packs: 1, consumers: 0 });\n assert.equal(existsSync(join(f.options.resultsDir, 'checkpoint.json')), false);\n } finally {\n f.cleanup();\n }\n});\n\ntest('resume rejects changed generated bytes and missing retained producer member hashes', async () => {\n for (const change of ['bytes', 'missing-digest']) {\n const f = qualificationFixture();\n try {\n if (change === 'missing-digest')\n f.mutate((report) => {\n const inventory = report.inventory as { files: { sha256?: string }[] };\n const first = inventory.files[0];\n assert.ok(first, 'Synthetic producer inventory must contain a member.');\n delete first.sha256;\n });\n const produced = await qualification.runQualification({ ...f.options, producerOnly: true });\n if (change === 'bytes') {\n assert.equal(produced.status, 'incomplete');\n writeFileSync(join(f.cwd, 'dist/generated.js'), 'replaced');\n const resumed = await qualification.runQualification({\n ...f.options,\n resume: join(f.options.resultsDir, 'checkpoint.json'),\n resultsDir: join(f.base, 'changed-bytes'),\n });\n assert.match(resumed.error!, /Archive bytes differ|freshness join is incomplete/u);\n } else assert.equal(produced.status, 'failed');\n assert.deepEqual(f.counts(), { producers: 1, packs: 1, consumers: 0 });\n } finally {\n f.cleanup();\n }\n }\n});\n\ntest(\n 'consumer cancellation retains actual PID/birth and logs, and resume cannot duplicate it',\n { tags: ['release'] },\n async () => {\n const f = qualificationFixture();\n try {\n await qualification.runQualification({ ...f.options, producerOnly: true });\n const controller = new AbortController();\n let launches = 0;\n const execute: NonNullable<QualificationOptions['execute']> = async (_command, options) => {\n launches++;\n return checks.executeCommand(\n [process.execPath, '-e', \"console.log('fictional consumer started');setInterval(()=>{},1000)\"],\n {\n ...options,\n progress: (partial) => {\n options.progress?.(partial);\n if ((partial as CommandResult).observedProcesses?.length) controller.abort();\n },\n },\n );\n };\n const resume = join(f.options.resultsDir, 'checkpoint.json');\n const report = await qualification.runQualification({\n ...f.options,\n execute,\n resume,\n signal: controller.signal,\n resultsDir: join(f.base, 'cancelled-consumer'),\n });\n assert.equal(report.status, 'cancelled');\n const attempt = JSON.parse(readFileSync(join(f.options.resultsDir, 'consumer-attempt.json'), 'utf8')) as {\n status: string;\n tempRoot: string;\n command: CommandResult;\n };\n assert.equal(attempt.status, 'completed');\n assert.equal(attempt.command.status, 'cancelled');\n assert.equal(attempt.command.cleanupConfirmed, true);\n assert.ok(attempt.command.observedProcesses!.every((row) => row.birth.length > 0));\n assert.ok(existsSync(attempt.tempRoot));\n const retried = await qualification.runQualification({\n ...f.options,\n execute,\n resume,\n resultsDir: join(f.base, 'blocked-retry'),\n });\n assert.equal(retried.qualified, false);\n assert.equal(launches, 1);\n assert.deepEqual(f.counts(), { producers: 1, packs: 1, consumers: 0 });\n } finally {\n f.cleanup();\n }\n },\n);\n\ntest(\n 'lost consumer completion retains a reservation, blocks duplicate launch and reconciles without producer or pack replay',\n { tags: ['release'] },\n async () => {\n const f = qualificationFixture();\n try {\n await qualification.runQualification({ ...f.options, producerOnly: true });\n const resume = join(f.options.resultsDir, 'checkpoint.json');\n const contract = JSON.parse(\n readFileSync(join(f.options.resultsDir, 'contract.json'), 'utf8'),\n ) as SyntheticContract;\n const fictionalReceipt = await f.consume(contract, { authorizeInstall: true });\n let launches = 0;\n const execute: NonNullable<QualificationOptions['execute']> = async (command, options) => {\n launches++;\n const resultPath = command[3];\n assert.ok(resultPath, 'Synthetic consumer requires a result path.');\n // A real credential-free child writes fictional application evidence.\n // Withhold terminal supervisor transport after its actual quiescent exit.\n const code =\n \"const fs=require('node:fs');setTimeout(()=>fs.writeFileSync(process.argv[1],process.argv[2]),200)\";\n const completed = await checks.executeCommand(\n [process.execPath, '-e', code, resultPath, JSON.stringify(fictionalReceipt)],\n {\n ...options,\n progress: (partial) => {\n if (!(partial as { completedAt?: string }).completedAt) options.progress?.(partial);\n },\n },\n );\n assert.equal(completed.cleanupConfirmed, true);\n throw new Error('fictional controller lost terminal consumer response');\n };\n const lost = await qualification.runQualification({\n ...f.options,\n execute,\n resume,\n resultsDir: join(f.base, 'lost-response'),\n });\n assert.equal(lost.qualified, false);\n const attemptPath = join(f.options.resultsDir, 'consumer-attempt.json');\n const attempt = JSON.parse(readFileSync(attemptPath, 'utf8')) as { status: string; command: CommandResult };\n assert.equal(attempt.status, 'running');\n assert.ok(attempt.command.observedProcesses!.length > 0);\n const blocked = await qualification.runQualification({\n ...f.options,\n execute,\n resume,\n resultsDir: join(f.base, 'unreconciled'),\n });\n assert.match(blocked.error!, /Unresolved consumer attempt/u);\n const reconciled = await qualification.runQualification({\n ...f.options,\n execute,\n resume,\n reconcileConsumer: true,\n resultsDir: join(f.base, 'reconciled'),\n });\n assert.equal(reconciled.qualified, true);\n assert.equal(launches, 1);\n assert.deepEqual(f.counts(), { producers: 1, packs: 1, consumers: 1 });\n assert.equal((JSON.parse(readFileSync(attemptPath, 'utf8')) as { status: string }).status, 'reconciled');\n } finally {\n f.cleanup();\n }\n },\n);\n\ntest(\n 'reservation before launch survives an uncertain spawn and refuses automatic retry',\n { tags: ['release'] },\n async () => {\n const f = qualificationFixture();\n try {\n await qualification.runQualification({ ...f.options, producerOnly: true });\n let launches = 0;\n const execute: NonNullable<QualificationOptions['execute']> = async () => {\n launches++;\n throw new Error('fictional spawn response unknown');\n };\n const resume = join(f.options.resultsDir, 'checkpoint.json');\n await qualification.runQualification({\n ...f.options,\n execute,\n resume,\n resultsDir: join(f.base, 'uncertain-launch'),\n });\n const blocked = await qualification.runQualification({\n ...f.options,\n execute,\n resume,\n reconcileConsumer: true,\n resultsDir: join(f.base, 'uncertain-retry'),\n });\n assert.match(blocked.error!, /launch identity is unavailable/u);\n assert.equal(launches, 1);\n assert.deepEqual(f.counts(), { producers: 1, packs: 1, consumers: 0 });\n } finally {\n f.cleanup();\n }\n },\n);\n\nfor (const mutation of ['zero-selection', 'counts', 'skip', 'inventory', 'command-cleanup', 'ordered-gates']) {\n test(`qualification rejects ${mutation} producer proof without installation`, async () => {\n const f = qualificationFixture();\n try {\n f.mutate((report) => {\n if (mutation === 'zero-selection') report.selectedTestFiles = [];\n if (mutation === 'counts') report.tests = { files: 1, total: 99, passed: 1, skips: [] };\n if (mutation === 'skip')\n report.tests = {\n files: 1,\n total: 2,\n passed: 1,\n skips: [{ file: 'dist/original.test.js', title: 'unreviewed', kind: 'arbitrary' }],\n };\n if (mutation === 'inventory')\n report.inventory = {\n kind: 'dry-inventory-only',\n name: '@aviaratech/ai-delivery',\n version: '1.0.0',\n fileCount: 0,\n files: [],\n };\n if (mutation === 'command-cleanup')\n report.commands = checks.FULL_GATES.map((stage) => ({\n stage,\n status: 'passed',\n exitCode: 0,\n signal: null,\n cleanupConfirmed: false,\n }));\n if (mutation === 'ordered-gates') report.gates = [...checks.FULL_GATES].reverse();\n });\n const report = await qualification.runQualification(f.options);\n assert.equal(report.qualified, false);\n assert.equal(report.status, 'failed');\n assert.equal(f.counts().consumers, 0);\n } finally {\n f.cleanup();\n }\n });\n}\n\nfor (const mutation of ['wrong-head', 'producer-digest', 'archive-digest', 'contract-digest']) {\n test(`resume rejects ${mutation} without replaying any process`, async () => {\n const f = qualificationFixture();\n try {\n await qualification.runQualification({ ...f.options, producerOnly: true });\n const checkpoint = join(f.options.resultsDir, 'checkpoint.json');\n if (mutation === 'wrong-head')\n execFileSync(\n 'git',\n [\n '-c',\n 'user.name=Fictional fixture',\n '-c',\n 'user.email=fixture@example.invalid',\n '-c',\n 'core.hooksPath=/dev/null',\n 'commit',\n '--allow-empty',\n '-qm',\n 'different head same tree',\n ],\n { cwd: f.cwd },\n );\n if (mutation === 'producer-digest') writeFileSync(join(f.options.resultsDir, 'producer/result.json'), '{}');\n if (mutation === 'archive-digest') writeFileSync(join(f.options.resultsDir, 'pack/fictional.tgz'), 'changed');\n if (mutation === 'contract-digest') {\n const value = JSON.parse(readFileSync(checkpoint, 'utf8')) as { contractSha256: string };\n value.contractSha256 = '0'.repeat(64);\n writeFileSync(checkpoint, JSON.stringify(value));\n }\n const resumed = await qualification.runQualification({\n ...f.options,\n resume: checkpoint,\n resultsDir: join(f.base, 'resume-bad'),\n });\n assert.equal(resumed.status, 'failed');\n assert.equal(resumed.qualified, false);\n assert.deepEqual(f.counts(), { producers: 1, packs: 1, consumers: 0 });\n } finally {\n f.cleanup();\n }\n });\n}\n\ntest(\n 'external consumer join never installs twice and rejects unconfirmed owned removal',\n { tags: ['release'] },\n async () => {\n const f = qualificationFixture();\n try {\n await qualification.runQualification({ ...f.options, producerOnly: true });\n const contract = JSON.parse(\n readFileSync(join(f.options.resultsDir, 'contract.json'), 'utf8'),\n ) as SyntheticContract;\n const receipt = await f.consume(contract, { authorizeInstall: true });\n const consumerResult = join(f.base, 'external-consumer.json');\n writeFileSync(consumerResult, JSON.stringify(receipt));\n const resume = join(f.options.resultsDir, 'checkpoint.json');\n const joined = await qualification.runQualification({\n ...f.options,\n resume,\n consumerResult,\n resultsDir: join(f.base, 'join'),\n });\n assert.equal(joined.qualified, true);\n assert.deepEqual(f.counts(), { producers: 1, packs: 1, consumers: 1 });\n receipt.cleanup = { quiescent: true, removed: false };\n writeFileSync(consumerResult, JSON.stringify(receipt));\n const bad = await qualification.runQualification({\n ...f.options,\n resume,\n consumerResult,\n resultsDir: join(f.base, 'bad-join'),\n });\n assert.equal(bad.qualified, false);\n assert.match(bad.error!, /removal/u);\n } finally {\n f.cleanup();\n }\n },\n);\n\nfor (const status of ['failed', 'timed-out', 'cancelled', 'cleanup-unconfirmed']) {\n test(`actual pack ${status} cannot produce a successful checkpoint`, async () => {\n const f = qualificationFixture();\n try {\n f.packFailure(status === 'cleanup-unconfirmed' ? 'passed' : status, status !== 'cleanup-unconfirmed');\n const report = await qualification.runQualification(f.options);\n assert.equal(report.qualified, false);\n assert.equal(existsSync(join(f.options.resultsDir, 'checkpoint.json')), false);\n assert.equal(f.counts().consumers, 0);\n } finally {\n f.cleanup();\n }\n });\n}\n\ntest('pre-start cancellation and inside-source evidence refuse all graph launches', async () => {\n const f = qualificationFixture();\n try {\n const controller = new AbortController();\n controller.abort();\n const report = await qualification.runQualification({ ...f.options, signal: controller.signal });\n assert.equal(report.status, 'cancelled');\n assert.equal(report.exitCode, 130);\n assert.deepEqual(f.counts(), { producers: 0, packs: 0, consumers: 0 });\n await assert.rejects(\n qualification.runQualification({ ...f.options, resultsDir: join(f.cwd, '..looks-outside') }),\n /outside source/u,\n );\n assert.deepEqual(f.counts(), { producers: 0, packs: 0, consumers: 0 });\n } finally {\n f.cleanup();\n }\n});\n"],
|
|
5
|
-
"mappings": "AAAA,OAAO,YAAY;AACnB,SAAS,cAAc,OAAO,iBAAiB;AAC/C;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,sBAAsB,cAAc;AAC7C,SAAS,SAAS,MAAM,gBAAgB;AACxC,SAAS,eAAe,qBAAqB;AAC7C,SAAS,YAAY;AAyGrB,MAAM,SAAU,MAAM,OAAO,IAAI,IAAI,yBAAyB,YAAY,GAAG,EAAE;AAC/E,MAAM,aAAa,cAAc,IAAI,IAAI,OAAO,YAAY,GAAG,CAAC;AAEhE;AAAA,EACE;AAAA,EACA,EAAE,MAAM,CAAC,SAAS,EAAE;AAAA,EACpB,YAAY;AACV,UAAM,IAAI,QAAQ;AAClB,QAAI;AACF,YAAM,EAAE,SAAS,UAAU,IAAK,MAAM,OAAO,cAAc,KAAK,YAAY,kBAAkB,CAAC,E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Q,WAAW,qBAAqB;AACpG,YAAM,SAAS,MAAM,cAAc,iBAAiB,EAAE,OAAO;AAC7D,aAAO,MAAM,OAAO,WAAW,KAAK;AACpC,aAAO,MAAM,WAAW,KAAK,EAAE,QAAQ,YAAY,iBAAiB,CAAC,GAAG,KAAK;AAC7E,aAAO,MAAM,EAAE,OAAO,EAAE,WAAW,CAAC;AAAA,IACtC,UAAE;AACA,QAAE,QAAQ;AAAA,IACZ;AAAA,EACF,CAAC;AACH;AAEA,KAAK,+EAA+E,YAAY;AAC9F,QAAM,IAAI,qBAAqB;AAC/B,MAAI;AACF,UAAM,aAAa,IAAI,gBAAgB;AACvC,eAAW,MAAM;AACjB,UAAM,SAAS,MAAM,cAAc,iBAAiB,EAAE,GAAG,EAAE,SAAS,QAAQ,WAAW,OAAO,CAAC;AAC/F,WAAO,MAAM,OAAO,QAAQ,WAAW;AACvC,WAAO,MAAM,OAAO,UAAU,GAAG;AACjC,WAAO,UAAU,EAAE,OAAO,GAAG,EAAE,WAAW,GAAG,OAAO,GAAG,WAAW,EAAE,CAAC;AACrE,UAAM,OAAO;AAAA,MACX,cAAc,iBAAiB,EAAE,GAAG,EAAE,SAAS,YAAY,KAAK,EAAE,KAAK,iBAAiB,EAAE,CAAC;AAAA,MAC3F;AAAA,IACF;AACA,WAAO,UAAU,EAAE,OAAO,GAAG,EAAE,WAAW,GAAG,OAAO,GAAG,WAAW,EAAE,CAAC;AAAA,EACvE,UAAE;AACA,MAAE,QAAQ;AAAA,EACZ;AACF,CAAC;",
|
|
4
|
+
"sourcesContent": ["import assert from 'node:assert/strict';\nimport { execFileSync, spawn, spawnSync } from 'node:child_process';\nimport {\n chmodSync,\n existsSync,\n mkdirSync,\n mkdtempSync,\n readFileSync,\n readdirSync,\n realpathSync,\n renameSync,\n rmSync,\n symlinkSync,\n writeFileSync,\n} from 'node:fs';\nimport { availableParallelism, tmpdir } from 'node:os';\nimport { dirname, join, relative } from 'node:path';\nimport { fileURLToPath, pathToFileURL } from 'node:url';\nimport { test } from 'vitest';\n\ntype CommandResult = {\n status: string;\n exitCode: number | null;\n stdoutPath: string;\n stderrPath: string;\n cleanupConfirmed?: boolean;\n observedProcesses?: { pid: number; birth: string }[];\n};\ntype CommandOptions = {\n cwd: string;\n env: Record<string, string>;\n directory: string;\n signal?: AbortSignal;\n timeoutMs?: number;\n progress?: (record: object) => void;\n};\ntype Report = {\n scope: string;\n status: string;\n fullSuccess: boolean;\n exitCode: number;\n omitted: string[];\n commands: { stage: string; status: string; command: string[] }[];\n selectedTestFiles?: string[];\n error?: string;\n observedTests?: { total: number; passed: number; failed: number };\n artifactQualified: boolean;\n};\ntype CaseIdentity = { file: string; title: string };\ntype ReleaseContext = {\n contractPath: string;\n checkpoint: { path: string; sha256: string };\n sourceCommit: string;\n sourceTree: string;\n sourceManifestSha256: string;\n sourceLockSha256: string;\n producerSha256: string;\n archiveSha256: string;\n};\ntype TestReport = {\n success: boolean;\n numTotalTests: number;\n numPassedTests: number;\n testResults: {\n name: string;\n status: string;\n assertionResults: { fullName: string; status: string; tags?: string[] }[];\n }[];\n};\ntype Toolchain = {\n controller: { version: string; executable: string };\n npm: { version: string; executable: string };\n libraryConsumer: { version: string; executable: string };\n};\ntype Checks = {\n RELEASE_CASES: (CaseIdentity & {\n kind: 'mandatory' | 'external-historical-qualification' | 'parent-launched-helper';\n })[];\n FULL_GATES: string[];\n FAST_GATES: string[];\n touchesReleaseCases(paths: string[]): boolean;\n safeEnvironment(input: Record<string, string>): Record<string, string>;\n validateToolchain(cwd: string, env: Record<string, string>): Toolchain;\n expectedTests(cwd: string, mode?: string): string[];\n assertCleanSelection(cwd: string): string[];\n treeIdentity(cwd: string): { sha256: string };\n analyzeTests(\n report: TestReport,\n expected: string[],\n cwd: string,\n output: string,\n env?: Record<string, string>,\n lane?: 'pr' | 'release',\n ): {\n files: number;\n total: number;\n passed: number;\n skips: (CaseIdentity & { kind: string })[];\n parentLaunchedHelperProved: boolean;\n selectedCases: CaseIdentity[];\n laneExcluded: CaseIdentity[];\n };\n coverageBaseline(\n directory: string,\n cwd: string,\n ): {\n files: { path: string }[];\n unmeasuredContributorScripts: { path: string; threshold: null; reason: string }[];\n thresholdProposal: string;\n };\n executeCommand(command: string[], options: CommandOptions): Promise<CommandResult>;\n runChecks(options: {\n cwd: string;\n resultsDir: string;\n fast?: boolean;\n testFiles?: string[];\n buildPlugin?: boolean;\n install?: boolean;\n toolchain?: () => Toolchain;\n execute?: Checks['executeCommand'];\n environment?: Record<string, string>;\n release?: ReleaseContext;\n }): Promise<Report>;\n};\nconst checks = (await import(new URL('../scripts/checks.mjs', import.meta.url).href)) as Checks;\nconst repository = fileURLToPath(new URL('../', import.meta.url));\n\ntest(\n 'Vitest source and compiled inputs are unique and use isolated core-aware fork workers',\n { tags: ['release'] },\n async () => {\n const f = fixture();\n try {\n const { default: configure } = (await import(pathToFileURL(join(repository, 'vitest.config.ts')).href)) as {\n default: (env: { mode: string }) => {\n test: { testTimeout: number; pool: string; maxWorkers: number; fileParallelism: boolean };\n };\n };\n assert.equal(typeof configure, 'function');\n for (const mode of ['source', 'compiled']) {\n const config = configure({ mode }).test;\n assert.ok(Number.isFinite(config.testTimeout) && config.testTimeout > 0);\n assert.equal(config.pool, 'forks');\n assert.equal(config.maxWorkers, availableParallelism());\n assert.equal(config.fileParallelism, true);\n const output = join(f.base, `projects-${mode}.json`);\n execFileSync(\n process.execPath,\n [\n join(repository, 'node_modules/vitest/vitest.mjs'),\n 'list',\n `--mode=${mode}`,\n '--filesOnly',\n `--json=${output}`,\n ],\n {\n cwd: repository,\n env: checks.safeEnvironment({ PATH: process.env.PATH ?? '' }),\n encoding: 'utf8',\n maxBuffer: 1024 ** 2,\n },\n );\n const rows = JSON.parse(readFileSync(output, 'utf8')) as { file: string }[];\n const selected = rows.map((row) => relative(repository, row.file).replaceAll('\\\\', '/'));\n assert.deepEqual([...selected].sort(), checks.expectedTests(repository, mode));\n assert.equal(new Set(selected).size, selected.length, 'No file may execute more than once');\n }\n } finally {\n f.cleanup();\n }\n },\n);\n\ntest('ordinary full and focused checks exclude release cases without claiming archive proof', async () => {\n for (const focused of [false, true]) {\n const f = fixture();\n try {\n const delegated = executor(f);\n const report = await checks.runChecks({\n cwd: f.cwd,\n resultsDir: join(f.base, 'checks'),\n ...(focused ? { fast: true, testFiles: ['dist/original.test.js'] } : {}),\n toolchain: () => f.toolchain,\n environment: {\n ...checks.safeEnvironment({}),\n AI_DELIVERY_TEST_LANE: 'release',\n AI_DELIVERY_RELEASE_CONTRACT: '/ambient/untrusted',\n },\n execute: (command, options) => {\n assert.equal(options.env.AI_DELIVERY_TEST_LANE, 'pr');\n assert.equal(options.env.AI_DELIVERY_RELEASE_CONTRACT, undefined);\n return delegated(command, options);\n },\n });\n const testCommand = report.commands.find((command) => command.stage === 'tests')!.command;\n assert.equal(\n testCommand.some((argument) => argument.startsWith('--maxWorkers')),\n false,\n );\n assert.equal(report.status, focused ? 'partial-passed' : 'passed');\n assert.equal(report.artifactQualified, false);\n if (!focused) assert.deepEqual(report.omitted, []);\n const command = report.commands.find((command) => command.stage === 'tests')?.command;\n assert.ok(command?.includes('--tags-filter=!release'));\n assert.ok(\n !report.commands.some((command) =>\n command.command.some((arg) => /current-consumer|current-qualification/u.test(arg)),\n ),\n );\n } finally {\n f.cleanup();\n }\n }\n});\n\ntest('PR reports exclude release identities while scoped release reports require all mandatory outcomes', () => {\n assert.ok(Array.isArray(checks.RELEASE_CASES));\n const mandatory = checks.RELEASE_CASES.filter((test) => test.kind === 'mandatory');\n assert.equal(new Set(mandatory.map(({ file, title }) => JSON.stringify([file, title]))).size, mandatory.length);\n const f = fixture();\n const files = [...new Set(checks.RELEASE_CASES.map((test) => test.file))];\n const report = (release: boolean): TestReport => {\n const testResults = files.map((file) => ({\n name: join(f.cwd, file),\n status: 'passed',\n assertionResults: [\n ...(release ? [] : [{ fullName: 'synthetic retained unit', status: 'passed' }]),\n ...checks.RELEASE_CASES.filter((test) => test.file === file).map((test) => ({\n fullName: test.title,\n status: release && test.kind === 'mandatory' ? 'passed' : 'pending',\n })),\n ],\n }));\n const cases = testResults.flatMap((file) => file.assertionResults);\n return {\n success: true,\n testResults,\n numTotalTests: cases.length,\n numPassedTests: cases.filter((test) => test.status === 'passed').length,\n };\n };\n try {\n const pr = checks.analyzeTests(\n report(false),\n files,\n f.cwd,\n '',\n { AI_DELIVERY_REAL_PACKAGE_ARCHIVE: '/explicit-historical-input' },\n 'pr',\n );\n assert.equal(pr.passed, files.length);\n assert.equal(pr.total, files.length);\n assert.deepEqual(pr.skips, []);\n assert.equal(pr.laneExcluded.length, checks.RELEASE_CASES.length);\n const release = checks.analyzeTests(report(true), files, f.cwd, '', {}, 'release');\n assert.equal(release.passed, checks.RELEASE_CASES.filter((test) => test.kind === 'mandatory').length);\n assert.equal(release.skips.length, checks.RELEASE_CASES.filter((test) => test.kind !== 'mandatory').length);\n for (const failure of ['missing', 'duplicate', 'unexpected', 'failed', 'pr-executed']) {\n const data = report(failure !== 'pr-executed');\n const tests = data.testResults[0]!.assertionResults;\n if (failure === 'missing') tests.shift();\n if (failure === 'duplicate') tests.push({ ...tests[0]! });\n if (failure === 'unexpected') tests.push({ fullName: 'unreviewed release case', status: 'passed' });\n if (failure === 'failed') tests[0]!.status = 'failed';\n if (failure === 'pr-executed') tests[1]!.status = 'passed';\n const cases = data.testResults.flatMap((file) => file.assertionResults);\n data.numTotalTests = cases.length;\n data.numPassedTests = cases.filter((test) => test.status === 'passed').length;\n assert.throws(\n () => checks.analyzeTests(data, files, f.cwd, '', {}, failure === 'pr-executed' ? 'pr' : 'release'),\n failure,\n );\n }\n } finally {\n f.cleanup();\n }\n});\n\ntest(\n 'runtime-expanded tags match every reviewed mandatory identity without executing cases',\n { tags: ['release'] },\n () => {\n const f = fixture();\n try {\n const config = join(f.base, 'collection-only.config.mjs');\n const base = pathToFileURL(join(repository, 'vitest.config.ts')).href;\n writeFileSync(\n config,\n `if(!process.argv.includes('list'))throw new Error('Collection only');const base=(await import(${JSON.stringify(base)})).default({mode:'compiled'});export default {...base,test:{...base.test,tags:base.test.tags.map(tag=>tag.name==='release'?{...tag,skip:false}:tag)}};`,\n );\n const output = join(f.base, 'inventory.json');\n execFileSync(\n process.execPath,\n [\n join(repository, 'node_modules/vitest/vitest.mjs'),\n 'list',\n ...new Set(checks.RELEASE_CASES.map((test) => test.file)),\n '--tags-filter=release',\n '--no-staticParse',\n '--maxWorkers=1',\n `--config=${config}`,\n `--json=${output}`,\n ],\n {\n cwd: repository,\n env: { ...checks.safeEnvironment({ PATH: process.env.PATH ?? '' }), AI_DELIVERY_TEST_LANE: 'pr' },\n encoding: 'utf8',\n maxBuffer: 1024 ** 2,\n },\n );\n const rows = JSON.parse(readFileSync(output, 'utf8')) as { file: string; name: string }[];\n const actual = rows.map((row) => ({\n file: relative(repository, row.file).replaceAll('\\\\', '/'),\n title: row.name.replaceAll(' > ', ' '),\n }));\n const expected = checks.RELEASE_CASES.filter((test) => test.kind === 'mandatory').map(({ file, title }) => ({\n file,\n title,\n }));\n assert.equal(actual.length, expected.length);\n const compare = (a: CaseIdentity, b: CaseIdentity) => JSON.stringify(a).localeCompare(JSON.stringify(b));\n assert.deepEqual(actual.sort(compare), expected.sort(compare));\n } finally {\n f.cleanup();\n }\n },\n);\n\ntest('unknown lane and mismatched release context fail before child launch', async () => {\n const f = fixture();\n try {\n let calls = 0;\n const release: ReleaseContext = {\n contractPath: join(f.base, 'missing/contract.json'),\n checkpoint: { path: join(f.base, 'missing/checkpoint.json'), sha256: 'a'.repeat(64) },\n sourceCommit: 'a'.repeat(40),\n sourceTree: 'b'.repeat(40),\n sourceManifestSha256: 'a'.repeat(64),\n sourceLockSha256: 'b'.repeat(64),\n producerSha256: 'c'.repeat(64),\n archiveSha256: 'd'.repeat(64),\n };\n for (const options of [\n { environment: { AI_DELIVERY_TEST_LANE: 'unknown' } },\n { release },\n { release, fast: true },\n ]) {\n const result = await checks.runChecks({\n cwd: f.cwd,\n resultsDir: join(f.base, `invalid-${calls}-${Object.keys(options).join('-')}`),\n toolchain: () => f.toolchain,\n ...options,\n execute: (command, options) => {\n calls++;\n return executor(f)(command, options);\n },\n });\n assert.equal(result.status, 'failed');\n assert.equal(calls, 0);\n }\n } finally {\n f.cleanup();\n }\n});\n\nfunction directFocus(f: ReturnType<typeof fixture>, title: string, env: Record<string, string>, name: string) {\n const marker = join(f.base, `${name}-npm-launched`);\n const loaded = join(f.base, `${name}-guard-loaded`);\n const guard = join(f.base, `${name}-guard.mjs`);\n writeFileSync(\n guard,\n `import cp from 'node:child_process';import {syncBuiltinESMExports} from 'node:module';import {appendFileSync,writeFileSync} from 'node:fs';appendFileSync(${JSON.stringify(loaded)},String(process.pid)+String.fromCharCode(10));for(const name of ['spawn','spawnSync','execFile','execFileSync','exec','execSync','fork']){const original=cp[name];cp[name]=function(command,args,...rest){if([command,...(Array.isArray(args)?args:[])].some(x=>['npm','npm-cli.js'].includes(String(x).split('/').at(-1)))){writeFileSync(${JSON.stringify(marker)},'forbidden npm launch');throw new Error('Controlled direct-focus guard forbids npm');}return Reflect.apply(original,this,[command,args,...rest]);};}syncBuiltinESMExports();`,\n );\n const guardUrl = pathToFileURL(guard).href;\n const workerArgs = ['--maxWorkers=1', '--pool=forks', `--execArgv=--import=${guardUrl}`, '--no-cache'];\n const childEnv = { ...checks.safeEnvironment({ PATH: process.env.PATH ?? '' }), ...env };\n // Prove interception inside the pinned worker before selecting any real-case body.\n // A broken preload can only try the probe's nonexistent script, which cannot run npm.\n mkdirSync(join(f.cwd, 'dist'), { recursive: true });\n if (!existsSync(join(f.cwd, 'node_modules')))\n symlinkSync(join(repository, 'node_modules'), join(f.cwd, 'node_modules'));\n const config = join(f.cwd, 'guard.config.mjs');\n writeFileSync(\n config,\n `import {defineConfig} from 'vitest/config';export default defineConfig({test:{include:['dist/guard.test.js']}});`,\n );\n writeFileSync(\n join(f.cwd, 'dist/guard.test.js'),\n `import assert from 'node:assert/strict';import {execFileSync,spawnSync} from 'node:child_process';import {test} from 'vitest';test('controlled worker npm guard',()=>{assert.throws(()=>execFileSync(process.execPath,['/controlled/nonexistent/npm-cli.js']),/Controlled direct-focus guard forbids npm/);});test('controlled shell npm guard',()=>{assert.throws(()=>spawnSync('/bin/sh',['-c','exit 125','controlled','/controlled/nonexistent/npm']),/Controlled direct-focus guard forbids npm/);});`,\n );\n const probeReport = join(f.base, `${name}-probe.json`);\n const probe = spawnSync(\n process.execPath,\n [\n '--import',\n guardUrl,\n join(repository, 'node_modules/vitest/vitest.mjs'),\n 'run',\n '--root',\n f.cwd,\n '--config',\n config,\n ...workerArgs,\n '--reporter=json',\n `--outputFile.json=${probeReport}`,\n ],\n { cwd: f.cwd, env: childEnv, encoding: 'utf8', maxBuffer: 1024 ** 2 },\n );\n assert.equal(probe.status, 0, probe.stderr.slice(-1500));\n assert.equal((JSON.parse(readFileSync(probeReport, 'utf8')) as TestReport).numPassedTests, 2);\n assert.equal(existsSync(marker), true, 'The fake npm invocation must be intercepted inside the worker.');\n assert.ok(readFileSync(loaded, 'utf8').trim().split(String.fromCharCode(10)).length >= 2);\n rmSync(marker);\n const reportPath = join(f.base, `${name}.json`);\n const result = spawnSync(\n process.execPath,\n [\n '--import',\n guardUrl,\n join(repository, 'node_modules/vitest/vitest.mjs'),\n 'run',\n '--mode=compiled',\n 'dist/lifecycle.test.js',\n ...workerArgs,\n '-t',\n title,\n '--reporter=json',\n `--outputFile.json=${reportPath}`,\n ],\n { cwd: repository, env: childEnv, encoding: 'utf8', maxBuffer: 1024 ** 2 },\n );\n assert.equal(existsSync(marker), false, 'No npm subprocess may launch, even if the direct-entry guard regresses.');\n assert.ok(existsSync(loaded), 'The direct-process npm guard must load.');\n return { result, reportPath, loaded };\n}\n\ntest(\n 'direct-focus npm interception reaches the pinned worker before real-case selection',\n { tags: ['release'] },\n () => {\n const f = fixture();\n try {\n const run = directFocus(f, 'controlled nonexistent selection', {}, 'worker-probe');\n assert.equal(run.result.status, 0);\n } finally {\n f.cleanup();\n }\n },\n);\n\ntest('direct release focus rejects invalid contracts before any npm launch', { tags: ['release'] }, () => {\n const f = fixture();\n try {\n for (const kind of ['absent', 'missing', 'malformed']) {\n const contractPath = join(f.base, kind, 'contract.json');\n if (kind === 'malformed') {\n mkdirSync(dirname(contractPath));\n writeFileSync(contractPath, '{broken');\n }\n const run = directFocus(\n f,\n '(?!)',\n {\n AI_DELIVERY_TEST_LANE: 'release',\n ...(kind === 'absent' ? {} : { AI_DELIVERY_RELEASE_CONTRACT: contractPath }),\n },\n kind,\n );\n assert.notEqual(run.result.status, 0);\n assert.match(run.result.stderr + run.result.stdout, /contract|checkpoint/iu);\n }\n } finally {\n f.cleanup();\n }\n});\n\ntest(\n 'qualification CLI finishes module loading before its owned graph reuses the validator',\n { tags: ['release'] },\n () => {\n const f = fixture();\n try {\n const scripts = join(f.cwd, 'scripts');\n mkdirSync(scripts);\n const entry = join(scripts, 'current-qualification.mjs');\n writeFileSync(entry, readFileSync(join(repository, 'scripts/current-qualification.mjs')));\n const marker = join(f.base, 'module-ready');\n writeFileSync(\n join(scripts, 'checks.mjs'),\n `export {RELEASE_CASES,confirmCommandQuiescence,errorMessage,executeCommand,safeEnvironment,treeIdentity} from ${JSON.stringify(pathToFileURL(join(repository, 'scripts/checks.mjs')).href)};import {writeFileSync} from 'node:fs';export async function runChecks(){await import('./current-qualification.mjs');writeFileSync(${JSON.stringify(marker)},'ready');throw new Error('Controlled stop before pack');}`,\n );\n writeFileSync(\n join(scripts, 'current-consumer.mjs'),\n `export {inspectCandidate,sha256,verifyProducerJoin} from ${JSON.stringify(pathToFileURL(join(repository, 'scripts/current-consumer.mjs')).href)};`,\n );\n writeFileSync(\n join(f.cwd, 'package.json'),\n JSON.stringify({ type: 'module', name: '@example/entry-fixture', version: '0.0.0' }),\n );\n writeFileSync(join(f.cwd, 'package-lock.json'), '{}\\n');\n execFileSync('git', ['add', '.'], { cwd: f.cwd });\n execFileSync(\n 'git',\n [\n '-c',\n 'user.name=Fictional Fixture',\n '-c',\n 'user.email=fixture@example.invalid',\n '-c',\n 'commit.gpgsign=false',\n 'commit',\n '-qm',\n 'controlled entry source',\n ],\n { cwd: f.cwd },\n );\n const output = join(f.base, 'entry-result');\n const result = spawnSync(process.execPath, [entry, '--results-dir', output], {\n cwd: f.cwd,\n env: checks.safeEnvironment(process.env as Record<string, string>),\n encoding: 'utf8',\n maxBuffer: 1024 ** 2,\n });\n assert.equal(\n existsSync(marker),\n true,\n 'The entry module must finish evaluating before its graph awaits its validation exports.',\n );\n assert.equal(result.status, 1);\n const report = JSON.parse(readFileSync(join(output, 'result.json'), 'utf8')) as {\n status: string;\n error: string;\n pack?: unknown;\n consumer?: unknown;\n };\n assert.equal(report.status, 'failed');\n assert.match(report.error, /Controlled stop before pack/u);\n assert.equal(report.pack, undefined);\n assert.equal(report.consumer, undefined);\n } finally {\n f.cleanup();\n }\n },\n);\n\nfunction fixture() {\n const base = mkdtempSync(join(tmpdir(), 'contributor-check-fixture-'));\n const cwd = join(base, 'repo');\n mkdirSync(join(cwd, 'src'), { recursive: true });\n writeFileSync(\n join(cwd, '.gitignore'),\n '/dist/\\n/node_modules/\\n/plugins/ai-delivery/runtime/dist/\\n/plugins/ai-delivery/dist/\\n',\n );\n writeFileSync(join(cwd, 'src/original.test.ts'), '// synthetic original test\\n');\n writeFileSync(\n join(cwd, 'package.json'),\n JSON.stringify({\n name: '@example/fixture',\n version: '1.0.0',\n bin: { fixture: './dist/cli.js' },\n exports: { '.': { default: './dist/index.js' } },\n }),\n );\n execFileSync('git', ['init', '-q', cwd]);\n execFileSync('git', ['add', '.'], { cwd });\n const toolchain: Toolchain = {\n controller: { version: 'v24.21.0', executable: process.execPath },\n npm: { version: '11.19.0', executable: 'synthetic-npm' },\n libraryConsumer: { version: 'v26.2.0', executable: 'synthetic-node26' },\n };\n const cleanup = () => rmSync(base, { recursive: true, force: true });\n return { base, cwd, toolchain, cleanup };\n}\n\nfunction passingReport(cwd: string, names: string[]): TestReport {\n return {\n success: true,\n numTotalTests: names.length,\n numPassedTests: names.length,\n testResults: names.map((name) => ({\n name: join(cwd, name),\n status: 'passed',\n assertionResults: [{ fullName: 'synthetic assertion', status: 'passed' }],\n })),\n };\n}\n\nfunction executor(f: ReturnType<typeof fixture>, failStage = ''): Checks['executeCommand'] {\n return async (command, options) => {\n mkdirSync(options.directory, { recursive: true });\n const stdoutPath = join(options.directory, 'stdout.txt');\n const stderrPath = join(options.directory, 'stderr.txt');\n writeFileSync(stdoutPath, '');\n writeFileSync(stderrPath, '');\n const stage = options.directory.split('/').at(-1)!;\n if (stage === 'build') {\n assert.equal(\n existsSync(join(f.cwd, 'dist/stale.test.js')),\n false,\n 'clean before build, rather than after selection',\n );\n mkdirSync(join(f.cwd, 'dist'), { recursive: true });\n for (const source of readdirSync(join(f.cwd, 'src')).filter((name) => name.endsWith('.test.ts')))\n writeFileSync(join(f.cwd, 'dist', source.replace(/\\.ts$/u, '.js')), '// compiled synthetic test\\n');\n for (const path of [\n 'dist/cli.js',\n 'dist/index.js',\n 'plugins/ai-delivery/runtime/dist/cli.js',\n 'plugins/ai-delivery/dist/mcp-launcher.js',\n ]) {\n mkdirSync(dirname(join(f.cwd, path)), { recursive: true });\n writeFileSync(join(f.cwd, path), '// fictional packaged output\\n');\n chmodSync(join(f.cwd, path), 0o755);\n }\n }\n if (stage === 'tests') {\n const names = command.filter((arg) => /^(?:dist\\/.*\\.test\\.js|src\\/.*\\.test\\.ts)$/u.test(arg));\n assert.equal(names.length, 1);\n const path = command\n .find((arg) => arg.startsWith('--outputFile.json='))!\n .split('=')\n .slice(1)\n .join('=');\n writeFileSync(path, JSON.stringify(passingReport(f.cwd, names)));\n }\n if (stage === 'inventory') {\n writeFileSync(\n stdoutPath,\n JSON.stringify([\n {\n name: '@example/fixture',\n version: '1.0.0',\n files: [\n 'dist/cli.js',\n 'dist/index.js',\n 'plugins/ai-delivery/runtime/dist/cli.js',\n 'plugins/ai-delivery/dist/mcp-launcher.js',\n ].map((path) => ({ path, mode: 0o755, size: readFileSync(join(f.cwd, path)).length })),\n },\n ]),\n );\n const coverage = options.env.NODE_V8_COVERAGE!;\n mkdirSync(coverage, { recursive: true });\n writeFileSync(\n join(coverage, 'synthetic.json'),\n JSON.stringify({\n result: [\n {\n url: new URL(`file://${join(f.cwd, 'dist/index.js')}`).href,\n functions: [{ ranges: [{ startOffset: 0, endOffset: 1, count: 1 }] }],\n },\n ],\n }),\n );\n }\n const result = {\n status: stage === failStage ? 'failed' : 'passed',\n exitCode: stage === failStage ? 7 : 0,\n stdoutPath,\n stderrPath,\n };\n options.progress?.(result);\n return { ...result, cleanupConfirmed: true };\n };\n}\n\ntest('local and CI share the PR producer while explicit release owns package qualification', () => {\n const manifest = JSON.parse(readFileSync(join(repository, 'package.json'), 'utf8')) as {\n scripts: Record<string, string>;\n };\n assert.equal(manifest.scripts.checks, 'node scripts/checks.mjs');\n assert.equal(manifest.scripts['checks:release'], 'node scripts/current-qualification.mjs');\n assert.equal(manifest.scripts['checks:producer'], 'node scripts/current-qualification.mjs --producer-only');\n assert.equal(manifest.scripts['checks:fast'], 'node scripts/checks.mjs --fast');\n const ci = readFileSync(join(repository, '.github/workflows/ci.yml'), 'utf8');\n assert.doesNotMatch(ci, /npm run build|npm pack/u);\n assert.match(ci, /Retain PR producer and interrupted check evidence/u);\n assert.match(ci, /if: always\\(\\)/u);\n assert.deepEqual(checks.FULL_GATES, ['format', 'lint', 'types', 'build', 'tests', 'inventory']);\n});\n\ntest('PR CI adds the release lane only when a PR touches a release case file or its source', () => {\n assert.equal(checks.touchesReleaseCases(['README.md', 'src/toolOutput.test.ts']), true);\n assert.equal(checks.touchesReleaseCases(['src/toolOutput.ts']), true);\n assert.equal(checks.touchesReleaseCases(['README.md', 'src/issue.ts', 'src/readView.test.ts']), false);\n});\n\ntest('clean full graph removes deleted/renamed compiled tests and retains exact command evidence', async () => {\n const f = fixture();\n try {\n mkdirSync(join(f.cwd, 'dist'));\n writeFileSync(join(f.cwd, 'dist/stale.test.js'), '// deleted source output\\n');\n renameSync(join(f.cwd, 'src/original.test.ts'), join(f.cwd, 'src/renamed.test.ts'));\n const resultsDir = join(f.base, 'results');\n const report = await checks.runChecks({\n cwd: f.cwd,\n resultsDir,\n toolchain: () => f.toolchain,\n execute: executor(f),\n });\n assert.equal(report.fullSuccess, true, report.error);\n assert.deepEqual(\n report.commands.map((entry) => entry.stage),\n checks.FULL_GATES,\n );\n assert.deepEqual(report.selectedTestFiles, ['src/renamed.test.ts']);\n assert.ok(report.commands[2]!.command.includes('--emitDeclarationOnly'));\n assert.deepEqual(report.commands[3]!.command.slice(1), [join(f.cwd, 'scripts/build.mjs'), '--plugin']);\n assert.match(readFileSync(join(resultsDir, 'result.txt'), 'utf8'), /FULL contributor checks: passed/u);\n assert.equal(existsSync(join(f.cwd, 'dist/stale.test.js')), false);\n await assert.rejects(checks.runChecks({ cwd: f.cwd, resultsDir }), /Existing result/u);\n writeFileSync(join(f.cwd, 'dist/stale.test.js'), '// unexpected survivor\\n');\n assert.throws(() => checks.assertCleanSelection(f.cwd), /stale, deleted, renamed/u);\n } finally {\n f.cleanup();\n }\n});\n\ntest('successful required checks bind only the same clean committed head through finalization', async () => {\n for (const scenario of ['stable', 'head-drift', 'hidden-change', 'cleanup-unconfirmed']) {\n const f = fixture();\n try {\n const git = (...args: string[]) =>\n execFileSync(\n 'git',\n [\n '-c',\n 'user.name=Fixture',\n '-c',\n 'user.email=fixture@example.invalid',\n '-c',\n 'commit.gpgsign=false',\n '-c',\n 'core.hooksPath=/dev/null',\n ...args,\n ],\n { cwd: f.cwd, encoding: 'utf8' },\n ).trim();\n git('commit', '-qm', 'Clean source');\n const expected = { sha: git('rev-parse', 'HEAD'), tree: git('rev-parse', 'HEAD^{tree}') };\n if (scenario === 'hidden-change') {\n git('update-index', '--assume-unchanged', 'src/original.test.ts');\n writeFileSync(join(f.cwd, 'src/original.test.ts'), '// bytes outside the committed head\\n');\n }\n const execute = executor(f);\n const report = await checks.runChecks({\n cwd: f.cwd,\n resultsDir: join(f.base, 'head-results'),\n toolchain: () => f.toolchain,\n execute: async (command, options) => {\n const result = await execute(command, options);\n if (scenario === 'head-drift' && options.directory.endsWith('/inventory'))\n git('commit', '--allow-empty', '-qm', 'Same-tree drift');\n return { ...result, cleanupConfirmed: scenario !== 'cleanup-unconfirmed' };\n },\n });\n assert.equal(report.status, 'passed', report.error);\n assert.deepEqual(\n (report as Report & { verifiedHead?: typeof expected }).verifiedHead,\n scenario === 'stable' ? expected : undefined,\n );\n } finally {\n f.cleanup();\n }\n }\n});\n\ntest('fast success and command failure remain partial and preserve omitted/remaining proof', async () => {\n const f = fixture();\n try {\n const fast = await checks.runChecks({\n cwd: f.cwd,\n resultsDir: join(f.base, 'fast'),\n fast: true,\n toolchain: () => f.toolchain,\n execute: executor(f),\n });\n assert.equal(fast.status, 'partial-passed');\n assert.equal(fast.fullSuccess, false);\n assert.deepEqual(fast.omitted, ['build', 'tests', 'inventory']);\n const failed = await checks.runChecks({\n cwd: f.cwd,\n resultsDir: join(f.base, 'failed'),\n toolchain: () => f.toolchain,\n execute: executor(f, 'lint'),\n });\n assert.equal(failed.exitCode, 1);\n assert.equal(failed.fullSuccess, false);\n assert.deepEqual(\n failed.commands.map((entry) => entry.stage),\n ['format', 'lint'],\n );\n assert.match(failed.error!, /lint: failed/u);\n const testFailure = await checks.runChecks({\n cwd: f.cwd,\n resultsDir: join(f.base, 'failed-tests'),\n toolchain: () => f.toolchain,\n execute: executor(f, 'tests'),\n });\n assert.equal(testFailure.fullSuccess, false);\n assert.equal(testFailure.observedTests?.total, 1);\n assert.match(readFileSync(join(f.base, 'failed-tests/result.txt'), 'utf8'), /Observed test results/u);\n assert.equal(testFailure.commands.at(-1)!.status, 'failed');\n } finally {\n f.cleanup();\n }\n});\n\ntest('explicit focused files run only their compilation and tests without install, inventory or plugin bundling', async () => {\n for (const selected of ['original', 'tooling']) {\n const f = fixture();\n try {\n writeFileSync(join(f.cwd, 'src/tooling.test.ts'), '// another changed contract\\n');\n const report = await checks.runChecks({\n cwd: f.cwd,\n resultsDir: join(f.base, 'focused'),\n fast: true,\n testFiles: [`dist/${selected}.test.js`],\n toolchain: () => f.toolchain,\n execute: executor(f),\n });\n assert.equal(report.exitCode, 0, report.error);\n assert.equal(report.scope, 'focused');\n assert.equal(report.status, 'partial-passed');\n assert.equal(report.fullSuccess, false);\n assert.deepEqual(report.selectedTestFiles, [`dist/${selected}.test.js`]);\n assert.deepEqual(\n report.commands.map((entry) => entry.stage),\n ['format', 'lint', 'types', 'build', 'tests'],\n );\n assert.deepEqual(report.commands[3]!.command.slice(1), [join(f.cwd, 'scripts/build.mjs')]);\n assert.ok(report.omitted.includes('unselected tests'));\n assert.ok(report.omitted.includes('inventory'));\n assert.equal(\n report.commands.some((entry) => entry.command.includes('ci') || entry.command.includes('pack')),\n false,\n );\n } finally {\n f.cleanup();\n }\n }\n});\n\ntest('invalid focused selection or local dependency install refuses before launching any gate', async () => {\n for (const options of [\n { fast: true, testFiles: [] },\n { fast: true, testFiles: ['dist/missing.test.js'] },\n { fast: true, testFiles: ['../dist/original.test.js'] },\n { fast: true, testFiles: ['dist/*.test.js'] },\n { fast: true, testFiles: ['dist/original.test.js', 'dist/original.test.js'] },\n { testFiles: ['dist/original.test.js'] },\n { fast: true, install: true },\n ]) {\n const f = fixture();\n try {\n const report = await checks.runChecks({\n cwd: f.cwd,\n resultsDir: join(f.base, 'invalid'),\n ...options,\n toolchain: () => f.toolchain,\n execute: executor(f),\n });\n assert.equal(report.exitCode, 1);\n assert.equal(report.fullSuccess, false);\n assert.deepEqual(report.commands, []);\n assert.match(report.error!, /focused|install|selection|explicit/iu);\n } finally {\n f.cleanup();\n }\n }\n});\n\ntest('focused plugin bundling requires an explicit artifact-dependent selection', async () => {\n const f = fixture();\n try {\n const report = await checks.runChecks({\n cwd: f.cwd,\n resultsDir: join(f.base, 'plugin-focused'),\n fast: true,\n testFiles: ['dist/original.test.js'],\n buildPlugin: true,\n toolchain: () => f.toolchain,\n execute: executor(f),\n });\n assert.equal(report.exitCode, 0, report.error);\n assert.deepEqual(\n report.commands.map((entry) => entry.stage),\n ['format', 'lint', 'types', 'build', 'plugin-build', 'tests'],\n );\n assert.equal(report.fullSuccess, false);\n } finally {\n f.cleanup();\n }\n});\n\ntest('toolchain preflight rejects absent/inaccessible/wrong consumer before gates; environment excludes credentials and ambient preloads', async () => {\n const env = checks.safeEnvironment({\n PATH: process.env.PATH!,\n HOME: process.env.HOME!,\n GH_TOKEN: 'fictional-do-not-forward',\n GH_PRIVATE_KEY_GPT_REVIEWER: 'fictional-ref',\n NODE_OPTIONS: '--require fictional',\n NODE_PATH: 'checkout-only',\n NPM_TOKEN: 'fictional-token',\n AI_DELIVERY_REAL_PACKAGE_ARCHIVE: '/synthetic/explicit-historical.tgz',\n });\n assert.equal(env.GH_TOKEN, undefined);\n assert.equal(env.NODE_OPTIONS, undefined);\n assert.equal(env.NODE_PATH, undefined);\n assert.equal(env.NPM_TOKEN, undefined);\n assert.equal(env.AI_DELIVERY_REAL_PACKAGE_ARCHIVE, '/synthetic/explicit-historical.tgz');\n assert.throws(() => checks.validateToolchain(repository, env), /AI_DELIVERY_NODE26_EXECUTABLE/u);\n assert.throws(\n () =>\n checks.validateToolchain(repository, { ...env, AI_DELIVERY_NODE26_EXECUTABLE: '/nonexistent/synthetic-node' }),\n /ENOENT/u,\n );\n assert.throws(\n () => checks.validateToolchain(repository, { ...env, AI_DELIVERY_NODE26_EXECUTABLE: process.execPath }),\n /Node 26\\.2\\.0/u,\n );\n const f = fixture();\n try {\n const report = await checks.runChecks({\n cwd: f.cwd,\n resultsDir: join(f.base, 'missing'),\n toolchain: () => {\n throw new Error('missing runtime');\n },\n });\n assert.equal(report.fullSuccess, false);\n assert.deepEqual(report.commands, []);\n } finally {\n f.cleanup();\n }\n});\n\ntest(\n 'real failed and explicitly timed-out commands preserve logs and prove owned cleanup',\n { tags: ['release'] },\n async () => {\n const f = fixture();\n try {\n const env = checks.safeEnvironment(process.env as Record<string, string>);\n const failed = await checks.executeCommand(\n [process.execPath, '-e', \"console.log('partial failure evidence');process.exit(7)\"],\n { cwd: f.cwd, env, directory: join(f.base, 'failure') },\n );\n assert.equal(failed.status, 'failed');\n assert.equal(failed.exitCode, 7);\n assert.match(readFileSync(failed.stdoutPath, 'utf8'), /partial failure evidence/u);\n const timed = await checks.executeCommand(\n [process.execPath, '-e', \"console.log('started');setInterval(()=>{},1000)\"],\n { cwd: f.cwd, env, directory: join(f.base, 'timeout'), timeoutMs: 200 },\n );\n assert.equal(timed.status, 'command-timeout');\n assert.equal(timed.cleanupConfirmed, true);\n assert.ok(timed.observedProcesses!.length > 0);\n assert.ok(timed.observedProcesses!.every((row) => row.birth.length > 0));\n } finally {\n f.cleanup();\n }\n },\n);\n\ntest(\n 'cancellation reaps observed detached descendants and preserves an unrelated peer',\n { tags: ['release'] },\n async () => {\n const f = fixture();\n const peer = spawn(process.execPath, ['-e', 'setInterval(()=>{},1000)'], { stdio: 'ignore' });\n try {\n const controller = new AbortController();\n const marker = join(f.base, 'owned-child');\n const script = `const cp=require('node:child_process'),fs=require('node:fs');const c=cp.spawn(process.execPath,['-e','setInterval(()=>{},1000)'],{detached:true,stdio:'ignore'});fs.writeFileSync(${JSON.stringify(marker)},String(c.pid));setInterval(()=>{},1000);`;\n const timer = setInterval(() => {\n if (existsSync(marker)) {\n clearInterval(timer);\n setTimeout(() => controller.abort(), 250);\n }\n }, 20);\n const result = await checks.executeCommand([process.execPath, '-e', script], {\n cwd: f.cwd,\n env: checks.safeEnvironment(process.env as Record<string, string>),\n directory: join(f.base, 'cancelled'),\n signal: controller.signal,\n });\n clearInterval(timer);\n assert.equal(result.status, 'cancelled');\n assert.equal(result.cleanupConfirmed, true);\n const ownedPid = readFileSync(marker, 'utf8');\n const state = execFileSync('/bin/ps', ['-p', ownedPid, '-o', 'stat='], { encoding: 'utf8' }).trim();\n assert.ok(state.startsWith('Z'));\n process.kill(peer.pid!, 0);\n } catch (error) {\n // ps exits1 for an absent child, which is also confirmed cleanup.\n if (!(error instanceof Error && 'status' in error && error.status === 1)) throw error;\n process.kill(peer.pid!, 0);\n } finally {\n peer.kill('SIGKILL');\n await new Promise<void>((done) => {\n if (peer.exitCode !== null || peer.signalCode !== null) done();\n else peer.once('close', () => done());\n });\n f.cleanup();\n }\n },\n);\n\ntest('existing temporary aliases resolve to the same physical directory without creating a new destination', () => {\n const f = fixture();\n try {\n const target = join(f.base, 'existing-temp');\n const alias = join(f.base, 'temp-alias');\n mkdirSync(target);\n symlinkSync(target, alias);\n const env = checks.safeEnvironment({ TMPDIR: alias, TEMP: alias, TMP: alias });\n assert.equal(env.TMPDIR, realpathSync(target));\n assert.equal(env.TEMP, realpathSync(target));\n assert.equal(env.TMP, realpathSync(target));\n assert.equal(readFileSync(join(f.cwd, 'src/original.test.ts'), 'utf8'), '// synthetic original test\\n');\n } finally {\n f.cleanup();\n }\n});\n\ntest('source identity preserves leading filename whitespace and refuses dangling tracked symlinks', () => {\n const f = fixture();\n try {\n const path = join(f.cwd, ' leading.txt');\n writeFileSync(path, 'first source bytes');\n execFileSync('git', ['add', '--', ' leading.txt'], { cwd: f.cwd });\n const before = checks.treeIdentity(f.cwd).sha256;\n writeFileSync(path, 'changed source bytes');\n assert.notEqual(checks.treeIdentity(f.cwd).sha256, before);\n symlinkSync('nonexistent-target', join(f.cwd, 'dangling-link'));\n execFileSync('git', ['add', '--', 'dangling-link'], { cwd: f.cwd });\n assert.throws(() => checks.treeIdentity(f.cwd), /regular tracked\\/source files/u);\n } finally {\n f.cleanup();\n }\n});\n\ntest(\n 'cancellation discovers children born from a detached owner after the root exits and preserves a peer',\n { tags: ['release'] },\n async () => {\n const f = fixture();\n const peer = spawn(process.execPath, ['-e', 'setInterval(()=>{},1000)'], { stdio: 'ignore' });\n const marker = join(f.base, 'late-children.json');\n const controller = new AbortController();\n const identity = (pid: number) => {\n const result = spawnSync('/bin/ps', ['-p', String(pid), '-o', 'stat=,lstart='], { encoding: 'utf8' });\n assert.ok(!result.error, result.error?.message);\n assert.ok(result.status === 0 || result.status === 1, result.stderr);\n return result.status === 1 ? undefined : result.stdout.trim();\n };\n let timer: ReturnType<typeof setInterval> | undefined;\n try {\n const descendant = `const cp=require('node:child_process'),fs=require('node:fs');\nconst id=(pid)=>cp.execFileSync('/bin/ps',['-p',String(pid),'-o','stat=,lstart='],{encoding:'utf8'}).trim().split(/\\\\s+/).slice(1).join(' ');\nconst record={a:process.pid,aBirth:id(process.pid)};fs.writeFileSync(${JSON.stringify(marker)},JSON.stringify(record));\nprocess.once('SIGTERM',()=>setTimeout(()=>{\nconst root=cp.spawnSync('/bin/ps',['-p',process.argv[1],'-o','stat='],{encoding:'utf8'});\nrecord.rootExited=root.status===1||root.stdout.trim().startsWith('Z');\nconst b=cp.spawn(process.execPath,['-e','setInterval(()=>{},1000)'],{detached:true,stdio:'ignore'});\nrecord.b=b.pid;record.bBirth=id(b.pid);fs.writeFileSync(${JSON.stringify(marker)},JSON.stringify(record));\n},200));setInterval(()=>{},1000);`;\n // The root exits on TERM. Its detached child ignores TERM and births B later.\n const script = `const cp=require('node:child_process');cp.spawn(process.execPath,['-e',${JSON.stringify(descendant)},String(process.pid)],{detached:true,stdio:'ignore'});setInterval(()=>{},1000);`;\n timer = setInterval(() => {\n if (existsSync(marker)) {\n clearInterval(timer);\n setTimeout(() => controller.abort(), 250);\n }\n }, 20);\n const result = await checks.executeCommand([process.execPath, '-e', script], {\n cwd: f.cwd,\n env: checks.safeEnvironment(process.env as Record<string, string>),\n directory: join(f.base, 'late-cancellation'),\n signal: controller.signal,\n });\n const children = JSON.parse(readFileSync(marker, 'utf8')) as {\n a: number;\n aBirth: string;\n b: number;\n bBirth: string;\n rootExited: boolean;\n };\n assert.ok(children.b, 'The TERM-resistant owner must create a late descendant.');\n assert.equal(children.rootExited, true, 'The late descendant must be born after the root exits.');\n assert.equal(result.status, 'cancelled');\n assert.equal(result.cleanupConfirmed, true);\n assert.ok(result.observedProcesses?.some((row) => row.pid === children.b && row.birth === children.bBirth));\n for (const pid of [children.a, children.b]) assert.ok(identity(pid)?.startsWith('Z') ?? true);\n process.kill(peer.pid!, 0);\n } finally {\n clearInterval(timer);\n // On a failing assertion, signal only the synthetic identities this fixture recorded.\n if (existsSync(marker)) {\n const children = JSON.parse(readFileSync(marker, 'utf8')) as {\n a: number;\n aBirth: string;\n b?: number;\n bBirth?: string;\n };\n for (const [pid, birth] of [\n [children.a, children.aBirth],\n [children.b, children.bBirth],\n ] as const) {\n if (pid && birth) {\n const state = identity(pid);\n if (state && !state.startsWith('Z') && state.split(/\\s+/u).slice(1).join(' ') === birth)\n process.kill(pid, 'SIGKILL');\n }\n }\n }\n peer.kill('SIGKILL');\n await new Promise<void>((done) => {\n if (peer.exitCode !== null || peer.signalCode !== null) done();\n else peer.once('close', () => done());\n });\n f.cleanup();\n }\n },\n);\n\ntest('coverage labels unobserved contributor scripts without synthesizing measured ranges or floors', () => {\n const f = fixture();\n try {\n const directory = join(f.base, 'unit-coverage');\n mkdirSync(directory);\n writeFileSync(\n join(directory, 'fixture.json'),\n JSON.stringify({\n result: [\n {\n url: new URL('scripts/build-plugin.mjs', `file://${f.cwd}/`).href,\n functions: [{ ranges: [{ startOffset: 0, endOffset: 1, count: 1 }] }],\n },\n ],\n }),\n );\n const baseline = checks.coverageBaseline(directory, f.cwd);\n assert.deepEqual(\n baseline.files.map((file) => file.path),\n ['scripts/build-plugin.mjs'],\n );\n assert.deepEqual(\n baseline.unmeasuredContributorScripts.map((file) => file.path),\n [\n 'scripts/checks.mjs',\n 'scripts/pre-commit.mjs',\n 'scripts/current-qualification.mjs',\n 'scripts/current-consumer.mjs',\n ],\n );\n assert.ok(baseline.unmeasuredContributorScripts.every((file) => file.threshold === null && file.reason.length > 0));\n assert.match(baseline.thresholdProposal, /no derived floor until actual instrumentation/u);\n // This controlled parser fixture is not the measured canonical graph baseline.\n } finally {\n f.cleanup();\n }\n});\n\n// Fictional orchestration fixtures exercise the real producer-join validator.\n// Archive safety/runtime qualification is covered by the separately owned #90 fixture.\ntype SyntheticContract = {\n sourceRoot: string;\n sourceCommit: string;\n sourceTree: string;\n sourceManifestSha256: string;\n sourceLockSha256: string;\n packageVersion: string;\n archivePath: string;\n archiveSha256: string;\n dryInventory: { path: string; size: number; mode: number }[];\n producer: {\n checksResultPath: string;\n checksResultSha256: string;\n artifactReceiptPath: string;\n artifactReceiptSha256: string;\n };\n};\ntype Candidate = {\n archiveSha256: string;\n sourceManifestSha256: string;\n sourceLockSha256: string;\n archiveManifestSha256: string;\n packageVersion: string;\n inventorySha256: string;\n inventory: { path: string; size: number; mode: number; sha256: string }[];\n skills: { path: string; sha256: string }[];\n};\ntype QualificationOptions = {\n cwd: string;\n resultsDir: string;\n producerOnly?: boolean;\n resume?: string;\n consumerResult?: string;\n reconcileConsumer?: boolean;\n signal?: AbortSignal;\n checks?: (options: {\n resultsDir: string;\n release?: ReleaseContext;\n signal?: AbortSignal;\n }) => Promise<Record<string, unknown>>;\n execute?: (command: string[], options: CommandOptions) => Promise<CommandResult>;\n inspect?: (contract: SyntheticContract) => Candidate;\n};\nconst qualification = (await import(new URL('../scripts/current-qualification.mjs', import.meta.url).href)) as {\n sourceIdentity(cwd: string): {\n commit: string;\n tree: string;\n fingerprint: { kind: string; sha256: string; fileCount: number };\n };\n validateCheckpoint(path: string, cwd: string, inspect: NonNullable<QualificationOptions['inspect']>): unknown;\n runQualification(options: QualificationOptions): Promise<{\n status: string;\n qualified: boolean;\n exitCode: number;\n error?: string;\n omitted: string[];\n releaseTests?: { path: string; sha256: string };\n }>;\n};\nconst consumerProof = (await import(new URL('../scripts/current-consumer.mjs', import.meta.url).href)) as {\n sha256(bytes: string | Buffer): string;\n verifyProducerJoin(contract: SyntheticContract, candidate: Candidate): Record<string, unknown>;\n};\n\nfunction qualificationFixture() {\n const f = fixture();\n mkdirSync(join(f.cwd, 'dist'));\n writeFileSync(join(f.cwd, 'dist/generated.js'), 'original');\n writeFileSync(join(f.cwd, 'package-lock.json'), '{}\\n');\n execFileSync('git', ['add', '.'], { cwd: f.cwd });\n execFileSync(\n 'git',\n [\n '-c',\n 'user.name=Fictional fixture',\n '-c',\n 'user.email=fixture@example.invalid',\n '-c',\n 'core.hooksPath=/dev/null',\n 'commit',\n '-qm',\n 'fictional clean source',\n ],\n { cwd: f.cwd },\n );\n let producers = 0;\n let packs = 0;\n let consumers = 0;\n let releases = 0;\n let releaseHook: (options: {\n resultsDir: string;\n signal?: AbortSignal;\n }) => Promise<CommandResult | void> = async () => {};\n const order: string[] = [];\n let packStatus = 'passed';\n let cleanup = true;\n let mutateProducer: (report: Record<string, unknown>) => void = () => {};\n const members = [\n { path: 'dist/generated.js', size: 8, mode: 0o644 },\n { path: 'package.json', size: readFileSync(join(f.cwd, 'package.json')).length, mode: 0o644 },\n ];\n const inspect: NonNullable<QualificationOptions['inspect']> = (contract) => {\n assert.equal(consumerProof.sha256(readFileSync(contract.archivePath)), contract.archiveSha256);\n assert.deepEqual(contract.dryInventory, members);\n const inventory = members.map((item) => ({\n ...item,\n sha256: consumerProof.sha256(readFileSync(join(f.cwd, item.path))),\n }));\n return {\n archiveSha256: contract.archiveSha256,\n sourceManifestSha256: contract.sourceManifestSha256,\n sourceLockSha256: contract.sourceLockSha256,\n archiveManifestSha256: contract.sourceManifestSha256,\n packageVersion: contract.packageVersion,\n inventorySha256: consumerProof.sha256(JSON.stringify(inventory)),\n inventory,\n skills: ['intake-create', 'worktree-lifecycle', 'pr-handoff'].map((path) => ({ path, sha256: 'a'.repeat(64) })),\n };\n };\n const produce: NonNullable<QualificationOptions['checks']> = async ({ resultsDir, release, signal }) => {\n if (release) {\n releases++;\n order.push('release');\n mkdirSync(resultsDir);\n const observed = await releaseHook({ resultsDir, ...(signal ? { signal } : {}) });\n const cancelled = signal?.aborted === true;\n const report = {\n schemaVersion: 'contributor-checks@1',\n runId: 'fictional-release',\n scope: 'release',\n status: cancelled ? 'cancelled' : 'passed',\n exitCode: cancelled ? 130 : 0,\n fullSuccess: false,\n artifactQualified: false,\n gates: ['tests'],\n omitted: ['PR producer and consumer'],\n resultsDir,\n tree: qualification.sourceIdentity(f.cwd).fingerprint,\n toolchain: f.toolchain,\n release: {\n ...release,\n contractSha256: consumerProof.sha256(readFileSync(release.contractPath)),\n historicalInputSupplied: false,\n temporary: { path: join(resultsDir, 'temporary'), dev: 1, ino: 1, quiescent: true, removed: true },\n },\n commands: [\n {\n stage: 'tests',\n status: cancelled ? 'cancelled' : 'passed',\n exitCode: cancelled ? 130 : 0,\n signal: cancelled ? 'SIGTERM' : null,\n cleanupConfirmed: true,\n ...observed,\n },\n ],\n selectedTestFiles: [...new Set(checks.RELEASE_CASES.map((test) => test.file))],\n tests: {\n lane: 'release',\n files: new Set(checks.RELEASE_CASES.map((test) => test.file)).size,\n total: checks.RELEASE_CASES.length,\n passed: checks.RELEASE_CASES.filter((test) => test.kind === 'mandatory').length,\n skips: checks.RELEASE_CASES.filter((test) => test.kind !== 'mandatory'),\n selectedCases: checks.RELEASE_CASES.map(({ file, title }) => ({ file, title })),\n laneExcluded: [],\n },\n };\n writeFileSync(join(resultsDir, 'result.json'), JSON.stringify(report));\n return report;\n }\n producers++;\n order.push('producer');\n mkdirSync(resultsDir);\n const report: Record<string, unknown> = {\n schemaVersion: 'contributor-checks@1',\n runId: 'fictional-one-producer',\n scope: 'full',\n status: 'passed',\n fullSuccess: true,\n exitCode: 0,\n gates: checks.FULL_GATES,\n omitted: [],\n tree: qualification.sourceIdentity(f.cwd).fingerprint,\n commands: checks.FULL_GATES.map((stage) => ({\n stage,\n status: 'passed',\n exitCode: 0,\n signal: null,\n cleanupConfirmed: true,\n })),\n tests: { files: 1, total: 1, passed: 1, skips: [] },\n selectedTestFiles: ['src/original.test.ts'],\n toolchain: f.toolchain,\n inventory: {\n kind: 'dry-inventory-only',\n name: '@aviaratech/ai-delivery',\n version: '1.0.0',\n fileCount: members.length,\n files: members.map((item) => ({ ...item, sha256: consumerProof.sha256(readFileSync(join(f.cwd, item.path))) })),\n },\n };\n mutateProducer(report);\n writeFileSync(join(resultsDir, 'result.json'), JSON.stringify(report));\n return report;\n };\n const execute: NonNullable<QualificationOptions['execute']> = async (command, options) => {\n if (command.at(-1) === '--authorize-install') {\n const contractPath = command[2];\n const resultPath = command[3];\n assert.ok(contractPath && resultPath, 'Synthetic consumer requires contract and result paths.');\n const contract = JSON.parse(readFileSync(contractPath, 'utf8')) as SyntheticContract;\n const receipt = await consume(contract, { authorizeInstall: true });\n mkdirSync(options.directory);\n const stdoutPath = join(options.directory, 'stdout.txt');\n const stderrPath = join(options.directory, 'stderr.txt');\n writeFileSync(stdoutPath, 'fictional supervised consumer');\n writeFileSync(stderrPath, '');\n writeFileSync(resultPath, JSON.stringify(receipt));\n const result = {\n command,\n status: 'passed',\n exitCode: 0,\n signal: null,\n stdoutPath,\n stderrPath,\n cleanupConfirmed: true,\n };\n options.progress?.(result);\n return result;\n }\n packs++;\n order.push('pack');\n assert.deepEqual(command.slice(2, 5), ['pack', '--ignore-scripts', '--json']);\n mkdirSync(options.directory);\n const destination = command.at(-1)!;\n writeFileSync(join(destination, 'fictional.tgz'), 'fictional archive boundary');\n const stdoutPath = join(options.directory, 'stdout.txt');\n const stderrPath = join(options.directory, 'stderr.txt');\n writeFileSync(stdoutPath, JSON.stringify([{ filename: 'fictional.tgz', files: members }]));\n writeFileSync(stderrPath, '');\n return {\n command,\n startedAt: 'fictional',\n status: packStatus,\n exitCode: packStatus === 'passed' ? 0 : 9,\n signal: null,\n stdoutPath,\n stderrPath,\n cleanupConfirmed: cleanup,\n };\n };\n const consume = async (contract: SyntheticContract, options: { authorizeInstall: boolean }) => {\n consumers++;\n order.push('consumer');\n assert.equal(options.authorizeInstall, true);\n const candidate = inspect(contract);\n return {\n schemaVersion: 'ai-delivery.current-consumer@1',\n boundary: 'current-artifact',\n status: 'passed',\n qualified: true,\n sourceIdentityVerified: true,\n scriptsDisabled: true,\n sourceCommit: contract.sourceCommit,\n sourceTree: contract.sourceTree,\n sourceManifestSha256: contract.sourceManifestSha256,\n sourceLockSha256: contract.sourceLockSha256,\n archiveManifestSha256: contract.sourceManifestSha256,\n archiveSha256: contract.archiveSha256,\n packageVersion: contract.packageVersion,\n inventorySha256: candidate.inventorySha256,\n inventory: candidate.inventory,\n producerJoin: consumerProof.verifyProducerJoin(contract, candidate),\n cleanup: { quiescent: true, removed: true },\n productionClosure: {},\n mcp: {},\n skills: candidate.skills,\n resolutions: ['fictional owned resolution'],\n phases: [\n 'node24',\n 'node26',\n 'npm',\n 'production-install',\n 'production-closure',\n 'cli-version',\n 'cli-json',\n 'exports-node24',\n 'library-node26',\n 'packaged-mcp',\n ].map((phase) => ({ phase, code: 0, signal: null, quiescent: true })),\n };\n };\n const options: QualificationOptions = {\n cwd: f.cwd,\n resultsDir: join(f.base, 'qualification'),\n checks: produce,\n execute,\n inspect,\n };\n return {\n ...f,\n options,\n inspect,\n consume,\n counts: () => ({ producers, packs, consumers }),\n releases: () => releases,\n order,\n releaseHook: (hook: typeof releaseHook) => {\n releaseHook = hook;\n },\n mutate: (fn: typeof mutateProducer) => {\n mutateProducer = fn;\n },\n packFailure: (status: string, quiescent = true) => {\n packStatus = status;\n cleanup = quiescent;\n },\n };\n}\n\ntest('qualification checkpoints one producer and pack, resumes without replay, and retains immutable digests', async () => {\n const f = qualificationFixture();\n try {\n const report = await qualification.runQualification({ ...f.options, producerOnly: true });\n assert.equal(report.status, 'incomplete');\n assert.equal(report.qualified, false);\n assert.equal(report.exitCode, 2);\n assert.deepEqual(f.counts(), { producers: 1, packs: 1, consumers: 0 });\n const checkpoint = join(f.options.resultsDir, 'checkpoint.json');\n const producer = readFileSync(join(f.options.resultsDir, 'producer/result.json'));\n const resumed = await qualification.runQualification({\n ...f.options,\n resume: checkpoint,\n resultsDir: join(f.base, 'resumed'),\n });\n assert.equal(resumed.qualified, true);\n assert.equal(resumed.exitCode, 0);\n assert.deepEqual(f.counts(), { producers: 1, packs: 1, consumers: 1 });\n assert.deepEqual(readFileSync(join(f.options.resultsDir, 'producer/result.json')), producer);\n await assert.rejects(\n qualification.runQualification({ ...f.options, resume: checkpoint, resultsDir: join(f.base, 'resumed') }),\n /Existing overall result/u,\n );\n } finally {\n f.cleanup();\n }\n});\n\ntest('qualification joins producer pack release tests and consumer in order', async () => {\n const f = qualificationFixture();\n try {\n const report = await qualification.runQualification(f.options);\n assert.equal(report.qualified, true);\n assert.deepEqual(f.counts(), { producers: 1, packs: 1, consumers: 1 });\n assert.equal(f.releases(), 1);\n assert.deepEqual(f.order, ['producer', 'pack', 'release', 'consumer']);\n assert.ok(report.releaseTests);\n } finally {\n f.cleanup();\n }\n});\n\ntest('producer-only omits release and consumer proof', async () => {\n const f = qualificationFixture();\n try {\n const report = await qualification.runQualification({ ...f.options, producerOnly: true });\n assert.equal(f.releases(), 0);\n assert.match(report.omitted.join(' '), /release/u);\n assert.equal(report.releaseTests, undefined);\n } finally {\n f.cleanup();\n }\n});\n\ntest('resume reuses compatible completed release proof', async () => {\n const f = qualificationFixture();\n try {\n const first = await qualification.runQualification(f.options);\n assert.ok(first.releaseTests);\n const original = readFileSync(first.releaseTests.path);\n const resumed = await qualification.runQualification({\n ...f.options,\n resume: join(f.options.resultsDir, 'checkpoint.json'),\n resultsDir: join(f.base, 'outer-reuse'),\n });\n assert.equal(resumed.qualified, true, resumed.error);\n assert.deepEqual(resumed.releaseTests, first.releaseTests);\n assert.deepEqual(readFileSync(first.releaseTests.path), original);\n assert.equal(f.releases(), 1);\n assert.deepEqual(f.counts(), { producers: 1, packs: 1, consumers: 1 });\n } finally {\n f.cleanup();\n }\n});\n\ntest('uncertain release attempt blocks a duplicate launch through fresh outer results', async () => {\n const f = qualificationFixture();\n try {\n await qualification.runQualification({ ...f.options, producerOnly: true });\n f.releaseHook(async () => {\n throw new Error('fictional lost release response');\n });\n const resume = join(f.options.resultsDir, 'checkpoint.json');\n const first = await qualification.runQualification({\n ...f.options,\n resume,\n resultsDir: join(f.base, 'release-lost'),\n });\n assert.match(first.error!, /lost release/u);\n const second = await qualification.runQualification({\n ...f.options,\n resume,\n resultsDir: join(f.base, 'release-uncertain'),\n });\n assert.match(second.error!, /Unresolved release/u);\n assert.equal(f.releases(), 1);\n assert.deepEqual(f.counts(), { producers: 1, packs: 1, consumers: 0 });\n } finally {\n f.cleanup();\n }\n});\n\ntest(\n 'interrupted release retry preserves prior evidence and skips completed producer and pack',\n { tags: ['release'] },\n async () => {\n const f = qualificationFixture();\n try {\n await qualification.runQualification({ ...f.options, producerOnly: true });\n const controller = new AbortController();\n const sentinel = join(f.base, 'unrelated');\n writeFileSync(sentinel, 'preserve');\n f.releaseHook(async ({ resultsDir, signal }) =>\n checks.executeCommand(\n [process.execPath, '-e', \"console.log('controlled release started');setInterval(()=>{},1000)\"],\n {\n cwd: f.cwd,\n env: checks.safeEnvironment({}),\n directory: join(resultsDir, 'tests'),\n ...(signal ? { signal } : {}),\n progress: (partial) => {\n if ((partial as CommandResult).observedProcesses?.length) controller.abort();\n },\n },\n ),\n );\n const resume = join(f.options.resultsDir, 'checkpoint.json');\n const interrupted = await qualification.runQualification({\n ...f.options,\n resume,\n signal: controller.signal,\n resultsDir: join(f.base, 'release-interrupted'),\n });\n assert.equal(interrupted.status, 'cancelled');\n const attemptPath = join(f.options.resultsDir, 'release-tests-attempt.json');\n const old = readFileSync(attemptPath);\n const prior = JSON.parse(old.toString()) as {\n directory: string;\n receipt: { path: string };\n command: CommandResult;\n };\n assert.equal(prior.command.cleanupConfirmed, true);\n assert.ok(prior.command.observedProcesses?.length);\n const receipt = readFileSync(prior.receipt.path);\n f.releaseHook(async () => {});\n const retried = await qualification.runQualification({\n ...f.options,\n resume,\n resultsDir: join(f.base, 'release-retry'),\n });\n assert.equal(retried.qualified, true, retried.error);\n assert.deepEqual(readFileSync(join(prior.directory, 'retired-attempt.json')), old);\n assert.deepEqual(readFileSync(prior.receipt.path), receipt);\n assert.equal(readFileSync(sentinel, 'utf8'), 'preserve');\n assert.equal(f.releases(), 2);\n assert.deepEqual(f.counts(), { producers: 1, packs: 1, consumers: 1 });\n const uninterrupted = qualificationFixture();\n try {\n assert.equal((await qualification.runQualification(uninterrupted.options)).qualified, true);\n assert.deepEqual(uninterrupted.order, ['producer', 'pack', 'release', 'consumer']);\n } finally {\n uninterrupted.cleanup();\n }\n } finally {\n f.cleanup();\n }\n },\n);\n\ntest('two competing resumes release at most one checkpoint-owned test child', { tags: ['release'] }, async () => {\n const f = qualificationFixture();\n try {\n await qualification.runQualification({ ...f.options, producerOnly: true });\n let started!: () => void, complete!: () => void;\n const start = new Promise<void>((resolve) => {\n started = resolve;\n });\n const gate = new Promise<void>((resolve) => {\n complete = resolve;\n });\n f.releaseHook(async () => {\n started();\n await gate;\n });\n const resume = join(f.options.resultsDir, 'checkpoint.json');\n const first = qualification.runQualification({ ...f.options, resume, resultsDir: join(f.base, 'race-a') });\n await Promise.race([\n start,\n first.then(() => {\n throw new Error('Release stage never started.');\n }),\n ]);\n const second = await qualification.runQualification({ ...f.options, resume, resultsDir: join(f.base, 'race-b') });\n complete();\n assert.equal((await first).qualified, true);\n assert.match(second.error!, /Unresolved release/u);\n assert.equal(f.releases(), 1);\n } finally {\n f.cleanup();\n }\n});\n\ntest('producer byte inventory rejects a same-length ignored build change before consumer launch', async () => {\n const f = qualificationFixture();\n try {\n const before = qualification.sourceIdentity(f.cwd).fingerprint;\n f.mutate(() => writeFileSync(join(f.cwd, 'dist/generated.js'), 'replaced'));\n const report = await qualification.runQualification(f.options);\n assert.deepEqual(qualification.sourceIdentity(f.cwd).fingerprint, before);\n assert.equal(report.qualified, false);\n assert.match(report.error!, /Archive bytes differ from the successful producer/u);\n assert.deepEqual(f.counts(), { producers: 1, packs: 1, consumers: 0 });\n assert.equal(existsSync(join(f.options.resultsDir, 'checkpoint.json')), false);\n } finally {\n f.cleanup();\n }\n});\n\ntest('resume rejects changed generated bytes and missing retained producer member hashes', async () => {\n for (const change of ['bytes', 'missing-digest']) {\n const f = qualificationFixture();\n try {\n if (change === 'missing-digest')\n f.mutate((report) => {\n const inventory = report.inventory as { files: { sha256?: string }[] };\n const first = inventory.files[0];\n assert.ok(first, 'Synthetic producer inventory must contain a member.');\n delete first.sha256;\n });\n const produced = await qualification.runQualification({ ...f.options, producerOnly: true });\n if (change === 'bytes') {\n assert.equal(produced.status, 'incomplete');\n writeFileSync(join(f.cwd, 'dist/generated.js'), 'replaced');\n const resumed = await qualification.runQualification({\n ...f.options,\n resume: join(f.options.resultsDir, 'checkpoint.json'),\n resultsDir: join(f.base, 'changed-bytes'),\n });\n assert.match(resumed.error!, /Archive bytes differ|freshness join is incomplete/u);\n } else assert.equal(produced.status, 'failed');\n assert.deepEqual(f.counts(), { producers: 1, packs: 1, consumers: 0 });\n } finally {\n f.cleanup();\n }\n }\n});\n\ntest(\n 'consumer cancellation retains actual PID/birth and logs, and resume cannot duplicate it',\n { tags: ['release'] },\n async () => {\n const f = qualificationFixture();\n try {\n await qualification.runQualification({ ...f.options, producerOnly: true });\n const controller = new AbortController();\n let launches = 0;\n const execute: NonNullable<QualificationOptions['execute']> = async (_command, options) => {\n launches++;\n return checks.executeCommand(\n [process.execPath, '-e', \"console.log('fictional consumer started');setInterval(()=>{},1000)\"],\n {\n ...options,\n progress: (partial) => {\n options.progress?.(partial);\n if ((partial as CommandResult).observedProcesses?.length) controller.abort();\n },\n },\n );\n };\n const resume = join(f.options.resultsDir, 'checkpoint.json');\n const report = await qualification.runQualification({\n ...f.options,\n execute,\n resume,\n signal: controller.signal,\n resultsDir: join(f.base, 'cancelled-consumer'),\n });\n assert.equal(report.status, 'cancelled');\n const attempt = JSON.parse(readFileSync(join(f.options.resultsDir, 'consumer-attempt.json'), 'utf8')) as {\n status: string;\n tempRoot: string;\n command: CommandResult;\n };\n assert.equal(attempt.status, 'completed');\n assert.equal(attempt.command.status, 'cancelled');\n assert.equal(attempt.command.cleanupConfirmed, true);\n assert.ok(attempt.command.observedProcesses!.every((row) => row.birth.length > 0));\n assert.ok(existsSync(attempt.tempRoot));\n const retried = await qualification.runQualification({\n ...f.options,\n execute,\n resume,\n resultsDir: join(f.base, 'blocked-retry'),\n });\n assert.equal(retried.qualified, false);\n assert.equal(launches, 1);\n assert.deepEqual(f.counts(), { producers: 1, packs: 1, consumers: 0 });\n } finally {\n f.cleanup();\n }\n },\n);\n\ntest(\n 'lost consumer completion retains a reservation, blocks duplicate launch and reconciles without producer or pack replay',\n { tags: ['release'] },\n async () => {\n const f = qualificationFixture();\n try {\n await qualification.runQualification({ ...f.options, producerOnly: true });\n const resume = join(f.options.resultsDir, 'checkpoint.json');\n const contract = JSON.parse(\n readFileSync(join(f.options.resultsDir, 'contract.json'), 'utf8'),\n ) as SyntheticContract;\n const fictionalReceipt = await f.consume(contract, { authorizeInstall: true });\n let launches = 0;\n const execute: NonNullable<QualificationOptions['execute']> = async (command, options) => {\n launches++;\n const resultPath = command[3];\n assert.ok(resultPath, 'Synthetic consumer requires a result path.');\n // A real credential-free child writes fictional application evidence.\n // Withhold terminal supervisor transport after its actual quiescent exit.\n const code =\n \"const fs=require('node:fs');setTimeout(()=>fs.writeFileSync(process.argv[1],process.argv[2]),200)\";\n const completed = await checks.executeCommand(\n [process.execPath, '-e', code, resultPath, JSON.stringify(fictionalReceipt)],\n {\n ...options,\n progress: (partial) => {\n if (!(partial as { completedAt?: string }).completedAt) options.progress?.(partial);\n },\n },\n );\n assert.equal(completed.cleanupConfirmed, true);\n throw new Error('fictional controller lost terminal consumer response');\n };\n const lost = await qualification.runQualification({\n ...f.options,\n execute,\n resume,\n resultsDir: join(f.base, 'lost-response'),\n });\n assert.equal(lost.qualified, false);\n const attemptPath = join(f.options.resultsDir, 'consumer-attempt.json');\n const attempt = JSON.parse(readFileSync(attemptPath, 'utf8')) as { status: string; command: CommandResult };\n assert.equal(attempt.status, 'running');\n assert.ok(attempt.command.observedProcesses!.length > 0);\n const blocked = await qualification.runQualification({\n ...f.options,\n execute,\n resume,\n resultsDir: join(f.base, 'unreconciled'),\n });\n assert.match(blocked.error!, /Unresolved consumer attempt/u);\n const reconciled = await qualification.runQualification({\n ...f.options,\n execute,\n resume,\n reconcileConsumer: true,\n resultsDir: join(f.base, 'reconciled'),\n });\n assert.equal(reconciled.qualified, true);\n assert.equal(launches, 1);\n assert.deepEqual(f.counts(), { producers: 1, packs: 1, consumers: 1 });\n assert.equal((JSON.parse(readFileSync(attemptPath, 'utf8')) as { status: string }).status, 'reconciled');\n } finally {\n f.cleanup();\n }\n },\n);\n\ntest(\n 'reservation before launch survives an uncertain spawn and refuses automatic retry',\n { tags: ['release'] },\n async () => {\n const f = qualificationFixture();\n try {\n await qualification.runQualification({ ...f.options, producerOnly: true });\n let launches = 0;\n const execute: NonNullable<QualificationOptions['execute']> = async () => {\n launches++;\n throw new Error('fictional spawn response unknown');\n };\n const resume = join(f.options.resultsDir, 'checkpoint.json');\n await qualification.runQualification({\n ...f.options,\n execute,\n resume,\n resultsDir: join(f.base, 'uncertain-launch'),\n });\n const blocked = await qualification.runQualification({\n ...f.options,\n execute,\n resume,\n reconcileConsumer: true,\n resultsDir: join(f.base, 'uncertain-retry'),\n });\n assert.match(blocked.error!, /launch identity is unavailable/u);\n assert.equal(launches, 1);\n assert.deepEqual(f.counts(), { producers: 1, packs: 1, consumers: 0 });\n } finally {\n f.cleanup();\n }\n },\n);\n\nfor (const mutation of ['zero-selection', 'counts', 'skip', 'inventory', 'command-cleanup', 'ordered-gates']) {\n test(`qualification rejects ${mutation} producer proof without installation`, async () => {\n const f = qualificationFixture();\n try {\n f.mutate((report) => {\n if (mutation === 'zero-selection') report.selectedTestFiles = [];\n if (mutation === 'counts') report.tests = { files: 1, total: 99, passed: 1, skips: [] };\n if (mutation === 'skip')\n report.tests = {\n files: 1,\n total: 2,\n passed: 1,\n skips: [{ file: 'dist/original.test.js', title: 'unreviewed', kind: 'arbitrary' }],\n };\n if (mutation === 'inventory')\n report.inventory = {\n kind: 'dry-inventory-only',\n name: '@aviaratech/ai-delivery',\n version: '1.0.0',\n fileCount: 0,\n files: [],\n };\n if (mutation === 'command-cleanup')\n report.commands = checks.FULL_GATES.map((stage) => ({\n stage,\n status: 'passed',\n exitCode: 0,\n signal: null,\n cleanupConfirmed: false,\n }));\n if (mutation === 'ordered-gates') report.gates = [...checks.FULL_GATES].reverse();\n });\n const report = await qualification.runQualification(f.options);\n assert.equal(report.qualified, false);\n assert.equal(report.status, 'failed');\n assert.equal(f.counts().consumers, 0);\n } finally {\n f.cleanup();\n }\n });\n}\n\nfor (const mutation of ['wrong-head', 'producer-digest', 'archive-digest', 'contract-digest']) {\n test(`resume rejects ${mutation} without replaying any process`, async () => {\n const f = qualificationFixture();\n try {\n await qualification.runQualification({ ...f.options, producerOnly: true });\n const checkpoint = join(f.options.resultsDir, 'checkpoint.json');\n if (mutation === 'wrong-head')\n execFileSync(\n 'git',\n [\n '-c',\n 'user.name=Fictional fixture',\n '-c',\n 'user.email=fixture@example.invalid',\n '-c',\n 'core.hooksPath=/dev/null',\n 'commit',\n '--allow-empty',\n '-qm',\n 'different head same tree',\n ],\n { cwd: f.cwd },\n );\n if (mutation === 'producer-digest') writeFileSync(join(f.options.resultsDir, 'producer/result.json'), '{}');\n if (mutation === 'archive-digest') writeFileSync(join(f.options.resultsDir, 'pack/fictional.tgz'), 'changed');\n if (mutation === 'contract-digest') {\n const value = JSON.parse(readFileSync(checkpoint, 'utf8')) as { contractSha256: string };\n value.contractSha256 = '0'.repeat(64);\n writeFileSync(checkpoint, JSON.stringify(value));\n }\n const resumed = await qualification.runQualification({\n ...f.options,\n resume: checkpoint,\n resultsDir: join(f.base, 'resume-bad'),\n });\n assert.equal(resumed.status, 'failed');\n assert.equal(resumed.qualified, false);\n assert.deepEqual(f.counts(), { producers: 1, packs: 1, consumers: 0 });\n } finally {\n f.cleanup();\n }\n });\n}\n\ntest(\n 'external consumer join never installs twice and rejects unconfirmed owned removal',\n { tags: ['release'] },\n async () => {\n const f = qualificationFixture();\n try {\n await qualification.runQualification({ ...f.options, producerOnly: true });\n const contract = JSON.parse(\n readFileSync(join(f.options.resultsDir, 'contract.json'), 'utf8'),\n ) as SyntheticContract;\n const receipt = await f.consume(contract, { authorizeInstall: true });\n const consumerResult = join(f.base, 'external-consumer.json');\n writeFileSync(consumerResult, JSON.stringify(receipt));\n const resume = join(f.options.resultsDir, 'checkpoint.json');\n const joined = await qualification.runQualification({\n ...f.options,\n resume,\n consumerResult,\n resultsDir: join(f.base, 'join'),\n });\n assert.equal(joined.qualified, true);\n assert.deepEqual(f.counts(), { producers: 1, packs: 1, consumers: 1 });\n receipt.cleanup = { quiescent: true, removed: false };\n writeFileSync(consumerResult, JSON.stringify(receipt));\n const bad = await qualification.runQualification({\n ...f.options,\n resume,\n consumerResult,\n resultsDir: join(f.base, 'bad-join'),\n });\n assert.equal(bad.qualified, false);\n assert.match(bad.error!, /removal/u);\n } finally {\n f.cleanup();\n }\n },\n);\n\nfor (const status of ['failed', 'timed-out', 'cancelled', 'cleanup-unconfirmed']) {\n test(`actual pack ${status} cannot produce a successful checkpoint`, async () => {\n const f = qualificationFixture();\n try {\n f.packFailure(status === 'cleanup-unconfirmed' ? 'passed' : status, status !== 'cleanup-unconfirmed');\n const report = await qualification.runQualification(f.options);\n assert.equal(report.qualified, false);\n assert.equal(existsSync(join(f.options.resultsDir, 'checkpoint.json')), false);\n assert.equal(f.counts().consumers, 0);\n } finally {\n f.cleanup();\n }\n });\n}\n\ntest('pre-start cancellation and inside-source evidence refuse all graph launches', async () => {\n const f = qualificationFixture();\n try {\n const controller = new AbortController();\n controller.abort();\n const report = await qualification.runQualification({ ...f.options, signal: controller.signal });\n assert.equal(report.status, 'cancelled');\n assert.equal(report.exitCode, 130);\n assert.deepEqual(f.counts(), { producers: 0, packs: 0, consumers: 0 });\n await assert.rejects(\n qualification.runQualification({ ...f.options, resultsDir: join(f.cwd, '..looks-outside') }),\n /outside source/u,\n );\n assert.deepEqual(f.counts(), { producers: 0, packs: 0, consumers: 0 });\n } finally {\n f.cleanup();\n }\n});\n"],
|
|
5
|
+
"mappings": "AAAA,OAAO,YAAY;AACnB,SAAS,cAAc,OAAO,iBAAiB;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