@deftai/directive 0.61.2 → 0.63.0
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/dist/{branch-parity.d.ts → branch-fixtures.d.ts} +1 -3
- package/dist/{branch-parity.js → branch-fixtures.js} +3 -110
- package/dist/dispatch.d.ts +1 -1
- package/dist/dispatch.js +4 -1
- package/dist/framework-check-updates.d.ts +10 -0
- package/dist/framework-check-updates.js +68 -0
- package/dist/install-cli/coverage-map.js +3 -2
- package/dist/orchestration-cli/coverage-map.js +1 -1
- package/dist/{policy-parity.d.ts → policy-fixtures.d.ts} +1 -3
- package/dist/{policy-parity.js → policy-fixtures.js} +4 -100
- package/dist/{release-e2e-parity.d.ts → release-e2e-fixtures.d.ts} +1 -3
- package/dist/release-e2e-fixtures.js +38 -0
- package/dist/{story-ready-parity.d.ts → story-ready-fixtures.d.ts} +1 -3
- package/dist/{story-ready-parity.js → story-ready-fixtures.js} +4 -121
- package/dist/{triage-aux-a-parity.d.ts → triage-aux-a-fixtures.d.ts} +1 -3
- package/dist/{triage-aux-a-parity.js → triage-aux-a-fixtures.js} +3 -73
- package/dist/{triage-aux-b-parity.d.ts → triage-aux-b-fixtures.d.ts} +1 -3
- package/dist/triage-aux-b-fixtures.js +167 -0
- package/dist/{triage-bootstrap-parity.d.ts → triage-bootstrap-fixtures.d.ts} +1 -3
- package/dist/{triage-bootstrap-parity.js → triage-bootstrap-fixtures.js} +4 -91
- package/dist/{triage-classify-parity.d.ts → triage-classify-fixtures.d.ts} +1 -3
- package/dist/{triage-classify-parity.js → triage-classify-fixtures.js} +4 -94
- package/dist/{triage-queue-parity.d.ts → triage-queue-fixtures.d.ts} +1 -3
- package/dist/{triage-queue-parity.js → triage-queue-fixtures.js} +4 -86
- package/dist/{triage-scope-parity.d.ts → triage-scope-fixtures.d.ts} +1 -3
- package/dist/{triage-scope-parity.js → triage-scope-fixtures.js} +4 -91
- package/dist/umbrella-current-shape.d.ts +9 -0
- package/dist/umbrella-current-shape.js +56 -0
- package/dist/{vbrief-preflight-parity.d.ts → vbrief-preflight-fixtures.d.ts} +1 -3
- package/dist/vbrief-preflight-fixtures.js +79 -0
- package/dist/{wip-cap-parity.d.ts → wip-cap-fixtures.d.ts} +1 -3
- package/dist/{wip-cap-parity.js → wip-cap-fixtures.js} +4 -91
- package/package.json +4 -15
- package/dist/cache-parity.d.ts +0 -36
- package/dist/cache-parity.js +0 -165
- package/dist/codebase-parity.d.ts +0 -31
- package/dist/codebase-parity.js +0 -303
- package/dist/doc-cli-parity.d.ts +0 -29
- package/dist/doc-cli-parity.js +0 -159
- package/dist/doctor-parity.d.ts +0 -42
- package/dist/doctor-parity.js +0 -157
- package/dist/intake-parity.d.ts +0 -30
- package/dist/intake-parity.js +0 -203
- package/dist/lifecycle-packs-parity.d.ts +0 -30
- package/dist/lifecycle-packs-parity.js +0 -377
- package/dist/orchestration-parity.d.ts +0 -38
- package/dist/orchestration-parity.js +0 -364
- package/dist/parity.d.ts +0 -36
- package/dist/parity.js +0 -176
- package/dist/platform-parity.d.ts +0 -26
- package/dist/platform-parity.js +0 -309
- package/dist/pr-closing-keywords-parity.d.ts +0 -45
- package/dist/pr-closing-keywords-parity.js +0 -259
- package/dist/pr-merge-readiness-parity.d.ts +0 -44
- package/dist/pr-merge-readiness-parity.js +0 -296
- package/dist/pr-monitor-parity.d.ts +0 -44
- package/dist/pr-monitor-parity.js +0 -283
- package/dist/pr-protected-issues-parity.d.ts +0 -41
- package/dist/pr-protected-issues-parity.js +0 -220
- package/dist/pr-wait-mergeable-parity.d.ts +0 -45
- package/dist/pr-wait-mergeable-parity.js +0 -340
- package/dist/release-e2e-parity.js +0 -114
- package/dist/release-parity.d.ts +0 -40
- package/dist/release-parity.js +0 -226
- package/dist/release-publish-parity.d.ts +0 -36
- package/dist/release-publish-parity.js +0 -138
- package/dist/release-rollback-parity.d.ts +0 -37
- package/dist/release-rollback-parity.js +0 -161
- package/dist/render-parity.d.ts +0 -36
- package/dist/render-parity.js +0 -385
- package/dist/scm-parity.d.ts +0 -39
- package/dist/scm-parity.js +0 -181
- package/dist/scope-lifecycle-parity.d.ts +0 -35
- package/dist/scope-lifecycle-parity.js +0 -177
- package/dist/session-parity.d.ts +0 -39
- package/dist/session-parity.js +0 -262
- package/dist/slice-parity.d.ts +0 -36
- package/dist/slice-parity.js +0 -304
- package/dist/swarm-parity.d.ts +0 -28
- package/dist/swarm-parity.js +0 -327
- package/dist/triage-actions-parity.d.ts +0 -36
- package/dist/triage-actions-parity.js +0 -357
- package/dist/triage-aux-b-parity.js +0 -308
- package/dist/triage-summary-parity.d.ts +0 -50
- package/dist/triage-summary-parity.js +0 -306
- package/dist/validate-content-parity.d.ts +0 -33
- package/dist/validate-content-parity.js +0 -356
- package/dist/vbrief-activate-parity.d.ts +0 -39
- package/dist/vbrief-activate-parity.js +0 -216
- package/dist/vbrief-build-parity.d.ts +0 -28
- package/dist/vbrief-build-parity.js +0 -399
- package/dist/vbrief-preflight-parity.js +0 -163
- package/dist/vbrief-reconcile-parity.d.ts +0 -23
- package/dist/vbrief-reconcile-parity.js +0 -609
- package/dist/vbrief-validate-parity.d.ts +0 -27
- package/dist/vbrief-validate-parity.js +0 -122
- package/dist/vbrief-validation-parity.d.ts +0 -28
- package/dist/vbrief-validation-parity.js +0 -645
- package/dist/verify-env-parity.d.ts +0 -28
- package/dist/verify-env-parity.js +0 -272
- package/dist/verify-source-parity.d.ts +0 -26
- package/dist/verify-source-parity.js +0 -178
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
/**
|
|
3
|
-
* Golden-output parity harness (#1782 s3): runs BOTH the Python oracles
|
|
4
|
-
* (scripts/vbrief_validate.py + scripts/verify_vbrief_conformance.py) and
|
|
5
|
-
* the ported TS vbrief-validate CLI over the repository vbrief/ tree, then
|
|
6
|
-
* diffs exit codes and byte-identical stdout/stderr (cache-off).
|
|
7
|
-
*
|
|
8
|
-
* Exit codes: 0 parity / 1 divergence / 2 harness setup error.
|
|
9
|
-
*/
|
|
10
|
-
import { spawnSync } from "node:child_process";
|
|
11
|
-
import { dirname, join, resolve } from "node:path";
|
|
12
|
-
import { fileURLToPath } from "node:url";
|
|
13
|
-
function runCapture(cmd, args, cwd, env) {
|
|
14
|
-
const result = spawnSync(cmd, args, {
|
|
15
|
-
cwd,
|
|
16
|
-
encoding: "utf8",
|
|
17
|
-
env: { ...process.env, ...env },
|
|
18
|
-
stdio: ["ignore", "pipe", "pipe"],
|
|
19
|
-
});
|
|
20
|
-
return {
|
|
21
|
-
status: result.status ?? 2,
|
|
22
|
-
stdout: typeof result.stdout === "string" ? result.stdout : "",
|
|
23
|
-
stderr: typeof result.stderr === "string" ? result.stderr : "",
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
function resolveDeftRoot() {
|
|
27
|
-
if (process.env.DEFT_ROOT !== undefined && process.env.DEFT_ROOT.length > 0) {
|
|
28
|
-
return resolve(process.env.DEFT_ROOT);
|
|
29
|
-
}
|
|
30
|
-
return resolve(dirname(fileURLToPath(import.meta.url)), "..", "..", "..");
|
|
31
|
-
}
|
|
32
|
-
function normaliseHarnessNoise(text) {
|
|
33
|
-
return text
|
|
34
|
-
.split("\n")
|
|
35
|
-
.filter((line) => !line.startsWith("Using CPython") &&
|
|
36
|
-
!line.startsWith("Creating virtual environment") &&
|
|
37
|
-
!line.startsWith("Installed "))
|
|
38
|
-
.join("\n");
|
|
39
|
-
}
|
|
40
|
-
export function diffGate(python, ts) {
|
|
41
|
-
const pythonStdout = normaliseHarnessNoise(python.stdout);
|
|
42
|
-
const tsStdout = normaliseHarnessNoise(ts.stdout);
|
|
43
|
-
const pythonStderr = normaliseHarnessNoise(python.stderr);
|
|
44
|
-
const tsStderr = normaliseHarnessNoise(ts.stderr);
|
|
45
|
-
return {
|
|
46
|
-
name: python.name,
|
|
47
|
-
exitMismatch: python.exitCode !== ts.exitCode,
|
|
48
|
-
stdoutMismatch: pythonStdout !== tsStdout,
|
|
49
|
-
stderrMismatch: pythonStderr !== tsStderr,
|
|
50
|
-
pythonExit: python.exitCode,
|
|
51
|
-
tsExit: ts.exitCode,
|
|
52
|
-
pythonStdout,
|
|
53
|
-
tsStdout,
|
|
54
|
-
pythonStderr,
|
|
55
|
-
tsStderr,
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
export function runParity(deftRoot = resolveDeftRoot()) {
|
|
59
|
-
const envBase = {
|
|
60
|
-
DEFT_CACHE_DISABLE: "1",
|
|
61
|
-
PYTHONUTF8: "1",
|
|
62
|
-
DEFT_ROOT: deftRoot,
|
|
63
|
-
};
|
|
64
|
-
const vbriefDir = join(deftRoot, "vbrief");
|
|
65
|
-
const validatePy = runCapture("uv", ["run", "python", "scripts/vbrief_validate.py", "--vbrief-dir", vbriefDir], deftRoot, envBase);
|
|
66
|
-
const validateTs = runCapture("node", [join(deftRoot, "packages", "cli", "dist", "vbrief-validate.js"), "--vbrief-dir", vbriefDir], deftRoot, envBase);
|
|
67
|
-
const conformancePy = runCapture("uv", ["run", "python", "scripts/verify_vbrief_conformance.py", "--all", "--project-root", deftRoot], deftRoot, envBase);
|
|
68
|
-
const conformanceTs = runCapture("node", [
|
|
69
|
-
join(deftRoot, "packages", "cli", "dist", "vbrief-validate.js"),
|
|
70
|
-
"conformance",
|
|
71
|
-
"--all",
|
|
72
|
-
"--project-root",
|
|
73
|
-
deftRoot,
|
|
74
|
-
], deftRoot, envBase);
|
|
75
|
-
const gates = [
|
|
76
|
-
diffGate({ name: "vbrief_validate", ...validatePy, exitCode: validatePy.status }, { name: "vbrief_validate", ...validateTs, exitCode: validateTs.status }),
|
|
77
|
-
diffGate({ name: "verify_vbrief_conformance", ...conformancePy, exitCode: conformancePy.status }, { name: "verify_vbrief_conformance", ...conformanceTs, exitCode: conformanceTs.status }),
|
|
78
|
-
];
|
|
79
|
-
const ok = gates.every((g) => !g.exitMismatch && !g.stdoutMismatch && !g.stderrMismatch);
|
|
80
|
-
return { ok, gates };
|
|
81
|
-
}
|
|
82
|
-
export function renderReport(result) {
|
|
83
|
-
if (result.ok) {
|
|
84
|
-
return "vbrief_validate parity: CLEAN -- Python and TS agree on validate + conformance over vbrief/.";
|
|
85
|
-
}
|
|
86
|
-
const lines = ["vbrief_validate parity: DIVERGENCE"];
|
|
87
|
-
for (const g of result.gates) {
|
|
88
|
-
if (g.exitMismatch || g.stdoutMismatch || g.stderrMismatch) {
|
|
89
|
-
lines.push(` gate: ${g.name}`);
|
|
90
|
-
if (g.exitMismatch) {
|
|
91
|
-
lines.push(` exit mismatch: python=${g.pythonExit} ts=${g.tsExit}`);
|
|
92
|
-
}
|
|
93
|
-
if (g.stdoutMismatch) {
|
|
94
|
-
lines.push(` stdout mismatch (python ${g.pythonStdout.length} vs ts ${g.tsStdout.length} bytes)`);
|
|
95
|
-
lines.push(g.pythonStdout.slice(0, 400));
|
|
96
|
-
lines.push("---");
|
|
97
|
-
lines.push(g.tsStdout.slice(0, 400));
|
|
98
|
-
}
|
|
99
|
-
if (g.stderrMismatch) {
|
|
100
|
-
lines.push(` stderr mismatch (python ${g.pythonStderr.length} vs ts ${g.tsStderr.length} bytes)`);
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
return lines.join("\n");
|
|
105
|
-
}
|
|
106
|
-
if (process.argv[1] !== undefined && fileURLToPath(import.meta.url) === process.argv[1]) {
|
|
107
|
-
try {
|
|
108
|
-
const result = runParity();
|
|
109
|
-
if (result.ok) {
|
|
110
|
-
process.stdout.write(`${renderReport(result)}\n`);
|
|
111
|
-
process.exit(0);
|
|
112
|
-
}
|
|
113
|
-
process.stderr.write(`${renderReport(result)}\n`);
|
|
114
|
-
process.exit(1);
|
|
115
|
-
}
|
|
116
|
-
catch (err) {
|
|
117
|
-
const msg = String(err).replace(/\r?\n/g, " ");
|
|
118
|
-
process.stderr.write(`vbrief_validate parity: harness error -- ${msg}\n`);
|
|
119
|
-
process.exit(2);
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
//# sourceMappingURL=vbrief-validate-parity.js.map
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
export interface ScenarioResult {
|
|
3
|
-
readonly name: string;
|
|
4
|
-
readonly exitCode: number;
|
|
5
|
-
readonly stdout: string;
|
|
6
|
-
readonly stderr: string;
|
|
7
|
-
}
|
|
8
|
-
export interface ParityResult {
|
|
9
|
-
readonly ok: boolean;
|
|
10
|
-
readonly scenarios: Array<{
|
|
11
|
-
readonly name: string;
|
|
12
|
-
readonly exitMismatch: boolean;
|
|
13
|
-
readonly pythonExit: number;
|
|
14
|
-
readonly tsExit: number;
|
|
15
|
-
readonly outputMismatch: boolean;
|
|
16
|
-
readonly pythonOutput: string;
|
|
17
|
-
readonly tsOutput: string;
|
|
18
|
-
}>;
|
|
19
|
-
}
|
|
20
|
-
export declare function diffParity(python: ScenarioResult, ts: ScenarioResult): {
|
|
21
|
-
exitMismatch: boolean;
|
|
22
|
-
outputMismatch: boolean;
|
|
23
|
-
pythonOutput: string;
|
|
24
|
-
tsOutput: string;
|
|
25
|
-
};
|
|
26
|
-
export declare function runParity(): ParityResult;
|
|
27
|
-
export declare function renderReport(result: ParityResult): string;
|
|
28
|
-
//# sourceMappingURL=vbrief-validation-parity.d.ts.map
|