feat: add WP5-06 and WP5-07 lineage evidence
Dada P0-A isolated Windows CI / validate-and-package (push) Failing after 1m49s
Dada P0-A isolated Windows CI / validate-and-package (push) Failing after 1m49s
This commit is contained in:
@@ -97,6 +97,8 @@
|
|||||||
"test:wp5-04:red": "node scripts/run-wp5-04-validation.mjs --phase red",
|
"test:wp5-04:red": "node scripts/run-wp5-04-validation.mjs --phase red",
|
||||||
"test:wp5-05": "node scripts/run-wp5-05-validation.mjs",
|
"test:wp5-05": "node scripts/run-wp5-05-validation.mjs",
|
||||||
"test:wp5-05:red": "node scripts/run-wp5-05-validation.mjs --phase red",
|
"test:wp5-05:red": "node scripts/run-wp5-05-validation.mjs --phase red",
|
||||||
|
"test:wp5-06": "node scripts/run-wp5-06-validation.mjs",
|
||||||
|
"test:wp5-07": "node scripts/run-wp5-07-validation.mjs",
|
||||||
"test:wp5-lineage": "node scripts/run-wp5-lineage-validation.mjs"
|
"test:wp5-lineage": "node scripts/run-wp5-lineage-validation.mjs"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|||||||
@@ -0,0 +1,22 @@
|
|||||||
|
import { execFileSync, spawnSync } from 'node:child_process';
|
||||||
|
import fs from 'node:fs';
|
||||||
|
import path from 'node:path';
|
||||||
|
|
||||||
|
const runId = process.env.DADA_TDD_RUN_ID ?? `wp5-06-green-${new Date().toISOString().replace(/[^0-9]/g, '')}`;
|
||||||
|
const testId = 'TDD-WP5-06-CLEAN-001-sticker-history';
|
||||||
|
const runDirectory = path.resolve('artifacts', 'tdd', runId, 'cases', testId);
|
||||||
|
fs.mkdirSync(runDirectory, { recursive: true });
|
||||||
|
const command = ['exec', 'vitest', 'run', 'tests/integration/wp5-06-sticker-cleanup.test.ts'];
|
||||||
|
const executable = process.platform === 'win32' ? 'pnpm.cmd' : 'pnpm';
|
||||||
|
const result = spawnSync(executable, command, { encoding: 'utf8', shell: process.platform === 'win32' });
|
||||||
|
const status = result.status === 0 ? 'passed' : 'failed';
|
||||||
|
const evidence = {
|
||||||
|
schema_version: '1.0', task_id: 'TASK-WP5-06', test_id: testId, run_id: runId,
|
||||||
|
phase: 'green', status, command: 'pnpm exec vitest run tests/integration/wp5-06-sticker-cleanup.test.ts',
|
||||||
|
commit: execFileSync('git', ['rev-parse', 'HEAD'], { encoding: 'utf8' }).trim(),
|
||||||
|
exit_code: result.status ?? 1,
|
||||||
|
redaction: 'stdout/stderr intentionally excluded',
|
||||||
|
};
|
||||||
|
fs.writeFileSync(path.join(runDirectory, 'evidence.json'), `${JSON.stringify(evidence, null, 2)}\n`);
|
||||||
|
console.log(JSON.stringify(evidence));
|
||||||
|
process.exitCode = status === 'passed' ? 0 : 1;
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
import { execFileSync, spawnSync } from 'node:child_process';
|
||||||
|
import fs from 'node:fs';
|
||||||
|
import path from 'node:path';
|
||||||
|
|
||||||
|
const runId = process.env.DADA_TDD_RUN_ID ?? `wp5-07-green-${new Date().toISOString().replace(/[^0-9]/g, '')}`;
|
||||||
|
const testId = 'TDD-WP5-07-PREVIEW-001-grant-lifecycle';
|
||||||
|
const runDirectory = path.resolve('artifacts', 'tdd', runId, 'cases', testId);
|
||||||
|
fs.mkdirSync(runDirectory, { recursive: true });
|
||||||
|
const command = ['exec', 'vitest', 'run', 'tests/api/wp5-07-preview-grants.test.ts'];
|
||||||
|
const executable = process.platform === 'win32' ? 'pnpm.cmd' : 'pnpm';
|
||||||
|
const result = spawnSync(executable, command, { encoding: 'utf8', shell: process.platform === 'win32' });
|
||||||
|
const status = result.status === 0 ? 'passed' : 'failed';
|
||||||
|
const evidence = {
|
||||||
|
schema_version: '1.0', task_id: 'TASK-WP5-07', test_id: testId, run_id: runId,
|
||||||
|
phase: 'green', status, command: 'pnpm exec vitest run tests/api/wp5-07-preview-grants.test.ts',
|
||||||
|
commit: execFileSync('git', ['rev-parse', 'HEAD'], { encoding: 'utf8' }).trim(),
|
||||||
|
exit_code: result.status ?? 1,
|
||||||
|
redaction: 'stdout/stderr intentionally excluded',
|
||||||
|
};
|
||||||
|
fs.writeFileSync(path.join(runDirectory, 'evidence.json'), `${JSON.stringify(evidence, null, 2)}\n`);
|
||||||
|
console.log(JSON.stringify(evidence));
|
||||||
|
process.exitCode = status === 'passed' ? 0 : 1;
|
||||||
@@ -35,8 +35,8 @@ function run(command, args) {
|
|||||||
|
|
||||||
const checks = tasks.map(([task, ref]) => ({ task, ref, sha: sha(ref), ancestor: isAncestor(ref) }));
|
const checks = tasks.map(([task, ref]) => ({ task, ref, sha: sha(ref), ancestor: isAncestor(ref) }));
|
||||||
const regression = {
|
const regression = {
|
||||||
'TASK-WP5-06': run('pnpm', ['exec', 'vitest', 'run', 'tests/integration/wp5-06-sticker-cleanup.test.ts']),
|
'TASK-WP5-06': run('node', ['scripts/run-wp5-06-validation.mjs']),
|
||||||
'TASK-WP5-07': run('pnpm', ['exec', 'vitest', 'run', 'tests/api/wp5-07-preview-grants.test.ts']),
|
'TASK-WP5-07': run('node', ['scripts/run-wp5-07-validation.mjs']),
|
||||||
};
|
};
|
||||||
const status = checks.every((check) => check.ancestor)
|
const status = checks.every((check) => check.ancestor)
|
||||||
&& Object.values(regression).every((check) => check.status === 'passed')
|
&& Object.values(regression).every((check) => check.status === 'passed')
|
||||||
|
|||||||
Reference in New Issue
Block a user