@cobol-ts/cobolts 0.0.14 → 0.0.17
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.benchmark-formats.md +52 -0
- package/README.benchmark-reporting.md +16 -0
- package/README.benchmark.md +199 -0
- package/README.cel.md +112 -57
- package/README.md +450 -21
- package/README.periodic-verification.md +83 -0
- package/dist/src/benchmark.access.spec.d.ts +1 -0
- package/dist/src/benchmark.access.spec.js +30 -0
- package/dist/src/benchmark.access.spec.js.map +1 -0
- package/dist/src/benchmark.aggregate.fixture.d.ts +10 -0
- package/dist/src/benchmark.aggregate.fixture.js +108 -0
- package/dist/src/benchmark.aggregate.fixture.js.map +1 -0
- package/dist/src/benchmark.aggregate.fixture.spec.d.ts +1 -0
- package/dist/src/benchmark.aggregate.fixture.spec.js +116 -0
- package/dist/src/benchmark.aggregate.fixture.spec.js.map +1 -0
- package/dist/src/benchmark.allocations.cli.spec.d.ts +1 -0
- package/dist/src/benchmark.allocations.cli.spec.js +60 -0
- package/dist/src/benchmark.allocations.cli.spec.js.map +1 -0
- package/dist/src/benchmark.allocations.d.ts +19 -0
- package/dist/src/benchmark.allocations.js +82 -0
- package/dist/src/benchmark.allocations.js.map +1 -0
- package/dist/src/benchmark.allocations.spec.d.ts +1 -0
- package/dist/src/benchmark.allocations.spec.js +64 -0
- package/dist/src/benchmark.allocations.spec.js.map +1 -0
- package/dist/src/benchmark.cli.functional.spec.d.ts +1 -0
- package/dist/src/benchmark.cli.functional.spec.js +370 -0
- package/dist/src/benchmark.cli.functional.spec.js.map +1 -0
- package/dist/src/benchmark.cli.golden.spec.d.ts +1 -0
- package/dist/src/benchmark.cli.golden.spec.js +194 -0
- package/dist/src/benchmark.cli.golden.spec.js.map +1 -0
- package/dist/src/benchmark.composed.execution.spec.d.ts +1 -0
- package/dist/src/benchmark.composed.execution.spec.js +120 -0
- package/dist/src/benchmark.composed.execution.spec.js.map +1 -0
- package/dist/src/benchmark.composed.fixture.d.ts +4 -0
- package/dist/src/benchmark.composed.fixture.js +77 -0
- package/dist/src/benchmark.composed.fixture.js.map +1 -0
- package/dist/src/benchmark.composed.fixture.spec.d.ts +1 -0
- package/dist/src/benchmark.composed.fixture.spec.js +50 -0
- package/dist/src/benchmark.composed.fixture.spec.js.map +1 -0
- package/dist/src/benchmark.composed.runner.d.ts +13 -0
- package/dist/src/benchmark.composed.runner.js +221 -0
- package/dist/src/benchmark.composed.runner.js.map +1 -0
- package/dist/src/benchmark.composed.two.fixture.d.ts +5 -0
- package/dist/src/benchmark.composed.two.fixture.js +111 -0
- package/dist/src/benchmark.composed.two.fixture.js.map +1 -0
- package/dist/src/benchmark.composed.two.spec.d.ts +1 -0
- package/dist/src/benchmark.composed.two.spec.js +86 -0
- package/dist/src/benchmark.composed.two.spec.js.map +1 -0
- package/dist/src/benchmark.format.cli.functional.spec.d.ts +1 -0
- package/dist/src/benchmark.format.cli.functional.spec.js +44 -0
- package/dist/src/benchmark.format.cli.functional.spec.js.map +1 -0
- package/dist/src/benchmark.format.composition.spec.d.ts +1 -0
- package/dist/src/benchmark.format.composition.spec.js +196 -0
- package/dist/src/benchmark.format.composition.spec.js.map +1 -0
- package/dist/src/benchmark.format.family.cli.functional.spec.d.ts +1 -0
- package/dist/src/benchmark.format.family.cli.functional.spec.js +102 -0
- package/dist/src/benchmark.format.family.cli.functional.spec.js.map +1 -0
- package/dist/src/benchmark.format.fixture.d.ts +26 -0
- package/dist/src/benchmark.format.fixture.js +181 -0
- package/dist/src/benchmark.format.fixture.js.map +1 -0
- package/dist/src/benchmark.format.oracle.d.ts +8 -0
- package/dist/src/benchmark.format.oracle.js +30 -0
- package/dist/src/benchmark.format.oracle.js.map +1 -0
- package/dist/src/benchmark.format.runner.d.ts +6 -0
- package/dist/src/benchmark.format.runner.js +271 -0
- package/dist/src/benchmark.format.runner.js.map +1 -0
- package/dist/src/benchmark.format.source.d.ts +6 -0
- package/dist/src/benchmark.format.source.js +15 -0
- package/dist/src/benchmark.format.source.js.map +1 -0
- package/dist/src/benchmark.format.spec.d.ts +1 -0
- package/dist/src/benchmark.format.spec.js +85 -0
- package/dist/src/benchmark.format.spec.js.map +1 -0
- package/dist/src/benchmark.format.stateful.spec.d.ts +1 -0
- package/dist/src/benchmark.format.stateful.spec.js +120 -0
- package/dist/src/benchmark.format.stateful.spec.js.map +1 -0
- package/dist/src/benchmark.gc.d.ts +26 -0
- package/dist/src/benchmark.gc.js +62 -0
- package/dist/src/benchmark.gc.js.map +1 -0
- package/dist/src/benchmark.gc.spec.d.ts +1 -0
- package/dist/src/benchmark.gc.spec.js +26 -0
- package/dist/src/benchmark.gc.spec.js.map +1 -0
- package/dist/src/benchmark.periodic.execution.spec.d.ts +1 -0
- package/dist/src/benchmark.periodic.execution.spec.js +166 -0
- package/dist/src/benchmark.periodic.execution.spec.js.map +1 -0
- package/dist/src/benchmark.periodic.fixture.d.ts +5 -0
- package/dist/src/benchmark.periodic.fixture.js +69 -0
- package/dist/src/benchmark.periodic.fixture.js.map +1 -0
- package/dist/src/benchmark.periodic.fixture.spec.d.ts +1 -0
- package/dist/src/benchmark.periodic.fixture.spec.js +96 -0
- package/dist/src/benchmark.periodic.fixture.spec.js.map +1 -0
- package/dist/src/benchmark.profile.d.ts +8 -0
- package/dist/src/benchmark.profile.js +62 -0
- package/dist/src/benchmark.profile.js.map +1 -0
- package/dist/src/benchmark.profile.spec.d.ts +1 -0
- package/dist/src/benchmark.profile.spec.js +65 -0
- package/dist/src/benchmark.profile.spec.js.map +1 -0
- package/dist/src/benchmark.report.d.ts +113 -0
- package/dist/src/benchmark.report.js +279 -0
- package/dist/src/benchmark.report.js.map +1 -0
- package/dist/src/benchmark.report.spec.d.ts +1 -0
- package/dist/src/benchmark.report.spec.js +271 -0
- package/dist/src/benchmark.report.spec.js.map +1 -0
- package/dist/src/benchmark.runner.d.ts +74 -0
- package/dist/src/benchmark.runner.js +371 -0
- package/dist/src/benchmark.runner.js.map +1 -0
- package/dist/src/benchmark.runner.spec.d.ts +1 -0
- package/dist/src/benchmark.runner.spec.js +241 -0
- package/dist/src/benchmark.runner.spec.js.map +1 -0
- package/dist/src/benchmark.strategy.spec.d.ts +1 -0
- package/dist/src/benchmark.strategy.spec.js +66 -0
- package/dist/src/benchmark.strategy.spec.js.map +1 -0
- package/dist/src/cel.composition.integration.spec.d.ts +1 -0
- package/dist/src/cel.composition.integration.spec.js +110 -0
- package/dist/src/cel.composition.integration.spec.js.map +1 -0
- package/dist/src/cel.entity.d.ts +12 -0
- package/dist/src/cel.entity.js +98 -0
- package/dist/src/cel.entity.js.map +1 -0
- package/dist/src/cel.entity.spec.d.ts +1 -0
- package/dist/src/cel.entity.spec.js +82 -0
- package/dist/src/cel.entity.spec.js.map +1 -0
- package/dist/src/cel.evaluate.cli.spec.d.ts +1 -0
- package/dist/src/cel.evaluate.cli.spec.js +63 -0
- package/dist/src/cel.evaluate.cli.spec.js.map +1 -0
- package/dist/src/cel.evaluate.integration.spec.d.ts +1 -0
- package/dist/src/cel.evaluate.integration.spec.js +128 -0
- package/dist/src/cel.evaluate.integration.spec.js.map +1 -0
- package/dist/src/cel.integration.spec.js +227 -38
- package/dist/src/cel.integration.spec.js.map +1 -1
- package/dist/src/cel.result.ownership.spec.d.ts +1 -0
- package/dist/src/cel.result.ownership.spec.js +52 -0
- package/dist/src/cel.result.ownership.spec.js.map +1 -0
- package/dist/src/cel.shared.execution.d.ts +20 -0
- package/dist/src/cel.shared.execution.js +49 -0
- package/dist/src/cel.shared.execution.js.map +1 -0
- package/dist/src/cel.stats.d.ts +5 -0
- package/dist/src/cel.stats.js +73 -0
- package/dist/src/cel.stats.js.map +1 -0
- package/dist/src/cel.stats.spec.d.ts +1 -0
- package/dist/src/cel.stats.spec.js +85 -0
- package/dist/src/cel.stats.spec.js.map +1 -0
- package/dist/src/cli.integration.spec.js +14 -2
- package/dist/src/cli.integration.spec.js.map +1 -1
- package/dist/src/cli.js +12 -0
- package/dist/src/cli.js.map +1 -1
- package/dist/src/cli.spec.js +46 -6
- package/dist/src/cli.spec.js.map +1 -1
- package/dist/src/commands/ai.d.ts +12 -0
- package/dist/src/commands/ai.demo.spec.d.ts +1 -0
- package/dist/src/commands/ai.demo.spec.js +242 -0
- package/dist/src/commands/ai.demo.spec.js.map +1 -0
- package/dist/src/commands/ai.js +125 -0
- package/dist/src/commands/ai.js.map +1 -0
- package/dist/src/commands/ai.spec.d.ts +1 -0
- package/dist/src/commands/ai.spec.js +170 -0
- package/dist/src/commands/ai.spec.js.map +1 -0
- package/dist/src/commands/benchmark.d.ts +3 -0
- package/dist/src/commands/benchmark.js +300 -0
- package/dist/src/commands/benchmark.js.map +1 -0
- package/dist/src/commands/cel.d.ts +1 -1
- package/dist/src/commands/cel.js +38 -5
- package/dist/src/commands/cel.js.map +1 -1
- package/dist/src/commands/characteristics.d.ts +3 -0
- package/dist/src/commands/characteristics.js +107 -0
- package/dist/src/commands/characteristics.js.map +1 -0
- package/dist/src/commands/characteristics.spec.d.ts +1 -0
- package/dist/src/commands/characteristics.spec.js +242 -0
- package/dist/src/commands/characteristics.spec.js.map +1 -0
- package/dist/src/commands/config.validate.js +8 -4
- package/dist/src/commands/config.validate.js.map +1 -1
- package/dist/src/commands/extract.d.ts +14 -0
- package/dist/src/commands/extract.js +85 -0
- package/dist/src/commands/extract.js.map +1 -0
- package/dist/src/commands/extract.spec.d.ts +1 -0
- package/dist/src/commands/extract.spec.js +179 -0
- package/dist/src/commands/extract.spec.js.map +1 -0
- package/dist/src/commands/graph.d.ts +9 -0
- package/dist/src/commands/graph.js +98 -0
- package/dist/src/commands/graph.js.map +1 -0
- package/dist/src/commands/graph.report.d.ts +26 -0
- package/dist/src/commands/graph.report.js +75 -0
- package/dist/src/commands/graph.report.js.map +1 -0
- package/dist/src/commands/graph.spec.d.ts +1 -0
- package/dist/src/commands/graph.spec.js +215 -0
- package/dist/src/commands/graph.spec.js.map +1 -0
- package/dist/src/commands/periodicity.d.ts +3 -0
- package/dist/src/commands/periodicity.js +11 -0
- package/dist/src/commands/periodicity.js.map +1 -0
- package/dist/src/commands/validate.all.d.ts +7 -0
- package/dist/src/commands/validate.all.integration.spec.d.ts +1 -0
- package/dist/src/commands/validate.all.integration.spec.js +43 -0
- package/dist/src/commands/validate.all.integration.spec.js.map +1 -0
- package/dist/src/commands/validate.all.js +75 -0
- package/dist/src/commands/validate.all.js.map +1 -0
- package/dist/src/commands/validate.all.spec.d.ts +1 -0
- package/dist/src/commands/validate.all.spec.js +70 -0
- package/dist/src/commands/validate.all.spec.js.map +1 -0
- package/dist/src/context.d.ts +40 -6
- package/dist/src/context.js +582 -21
- package/dist/src/context.js.map +1 -1
- package/dist/src/indexed.accumulator.d.ts +18 -0
- package/dist/src/indexed.accumulator.js +107 -0
- package/dist/src/indexed.accumulator.js.map +1 -0
- package/dist/src/indexed.accumulator.spec.d.ts +1 -0
- package/dist/src/indexed.accumulator.spec.js +81 -0
- package/dist/src/indexed.accumulator.spec.js.map +1 -0
- package/package.json +27 -11
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.graphsFromExperiments = graphsFromExperiments;
|
|
4
|
+
exports.addGraph = addGraph;
|
|
5
|
+
const node_path_1 = require("node:path");
|
|
6
|
+
const cel_graph_runtime_1 = require("@cobol-ts/cel-graph-runtime");
|
|
7
|
+
const yaml_jsyaml_1 = require("@cobol-ts/yaml-jsyaml");
|
|
8
|
+
const characteristics_yaml_1 = require("@cobol-ts/characteristics-yaml");
|
|
9
|
+
const graph_report_1 = require("./graph.report");
|
|
10
|
+
function mapping(value, label) {
|
|
11
|
+
if (!value || typeof value !== 'object' || Array.isArray(value))
|
|
12
|
+
throw new Error(`${label}: expected a YAML mapping`);
|
|
13
|
+
return value;
|
|
14
|
+
}
|
|
15
|
+
function parseYaml(source, filename) {
|
|
16
|
+
const result = yaml_jsyaml_1.jsYamlParser.parse(source);
|
|
17
|
+
if ('errors' in result)
|
|
18
|
+
throw new Error(`${filename}: ${result.errors.join('; ')}`);
|
|
19
|
+
return result.value;
|
|
20
|
+
}
|
|
21
|
+
function authoringGraph(source, name) {
|
|
22
|
+
const parsed = (0, cel_graph_runtime_1.parseAuthoringGraph)(source, yaml_jsyaml_1.jsYamlParser);
|
|
23
|
+
if ('errors' in parsed)
|
|
24
|
+
throw new Error(`${name}: ${parsed.errors.join('; ')}`);
|
|
25
|
+
return parsed.value;
|
|
26
|
+
}
|
|
27
|
+
/** Parse the versioned experiment dossier, but compose only its graphs. All
|
|
28
|
+
* generation, metadata, findings and execution history remain in the dossier. */
|
|
29
|
+
function graphsFromExperiments(document, filename) {
|
|
30
|
+
const root = mapping(document, filename);
|
|
31
|
+
if (root.version !== 1)
|
|
32
|
+
throw new Error(`${filename}: expected experiment document version 1`);
|
|
33
|
+
if (!Array.isArray(root.experiments))
|
|
34
|
+
throw new Error(`${filename}.experiments: expected an array`);
|
|
35
|
+
return root.experiments.map((raw, index) => {
|
|
36
|
+
const location = `${filename}.experiments[${index}]`;
|
|
37
|
+
const entry = mapping(raw, location);
|
|
38
|
+
if (typeof entry.characteristic !== 'string' || !entry.characteristic.trim())
|
|
39
|
+
throw new Error(`${location}.characteristic: expected a nonempty string`);
|
|
40
|
+
const id = entry.characteristic.trim();
|
|
41
|
+
const graph = mapping(entry.graph, `${location}.graph`);
|
|
42
|
+
if (!Object.prototype.hasOwnProperty.call(graph, id))
|
|
43
|
+
throw new Error(`${location}.graph: missing output node '${id}'`);
|
|
44
|
+
return {
|
|
45
|
+
name: `${filename}#${id}`,
|
|
46
|
+
graph: authoringGraph((0, characteristics_yaml_1.stringifyCharacteristicMetadata)(graph, 'yaml'), `${location}.graph`)
|
|
47
|
+
};
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
/** Pure graph composition is in the graph runtime; the CLI only locates inputs,
|
|
51
|
+
* extracts fragments, and serialises the same authoring format as graph.yaml. */
|
|
52
|
+
function addGraph(root, services, options) {
|
|
53
|
+
const graph = root.command('graph').description('Compose graph.yaml authoring graphs from different sources');
|
|
54
|
+
graph.command('build')
|
|
55
|
+
.description('Build graph.yaml authoring nodes from an experiment dossier and optional existing graphs')
|
|
56
|
+
.argument('<experiments>', 'Versioned experiment YAML file (relative to the current directory)')
|
|
57
|
+
.option('--with <filename>', 'Include an existing graph.yaml (repeatable)', (value, previous) => [...previous, value], [])
|
|
58
|
+
.option('--file <filename>', 'Write the assembled graph YAML instead of stdout')
|
|
59
|
+
.option('--report', 'Report included and missing output characteristics to stderr')
|
|
60
|
+
.option('--detailed', 'Include IDs in each report category and node counts by source (implies --report)')
|
|
61
|
+
.action(async (experiments, flags) => {
|
|
62
|
+
const sources = [];
|
|
63
|
+
for (const filename of flags.with) {
|
|
64
|
+
const path = (0, node_path_1.resolve)(filename);
|
|
65
|
+
sources.push({ name: path, graph: authoringGraph(await services.read(path), path) });
|
|
66
|
+
}
|
|
67
|
+
const existing = [...sources];
|
|
68
|
+
const filename = (0, node_path_1.resolve)(experiments);
|
|
69
|
+
const generated = graphsFromExperiments(parseYaml(await services.read(filename), filename), filename);
|
|
70
|
+
sources.push(...generated);
|
|
71
|
+
const merged = (0, cel_graph_runtime_1.composeAuthoringGraphs)(sources);
|
|
72
|
+
if (Object.keys(merged).length === 0)
|
|
73
|
+
throw new Error('Cannot build an empty graph');
|
|
74
|
+
// Verify the assembled authoring graph, not only its individual sources.
|
|
75
|
+
const content = (0, characteristics_yaml_1.stringifyCharacteristicMetadata)(merged, 'yaml');
|
|
76
|
+
const authored = authoringGraph(content, 'Composed graph');
|
|
77
|
+
const canonical = (0, cel_graph_runtime_1.canonicaliseCelGraph)(authored);
|
|
78
|
+
if ('errors' in canonical)
|
|
79
|
+
throw new Error(`Composed graph: ${canonical.errors.join('; ')}`);
|
|
80
|
+
const planned = (0, cel_graph_runtime_1.planCanonicalCelGraph)(canonical.value);
|
|
81
|
+
if ('errors' in planned)
|
|
82
|
+
throw new Error(`Composed graph: ${planned.errors.join('; ')}`);
|
|
83
|
+
let report;
|
|
84
|
+
if (flags.report || flags.detailed) {
|
|
85
|
+
const paths = await services.paths(options());
|
|
86
|
+
const catalogues = await (0, characteristics_yaml_1.loadCharacteristicCatalogues)(paths.directory, services.read, yaml_jsyaml_1.jsYamlParser);
|
|
87
|
+
const overview = (0, graph_report_1.describeGraphBuild)(catalogues.output.list().map(item => item.id), merged, existing, generated, filename);
|
|
88
|
+
report = (0, graph_report_1.formatGraphBuildReport)(overview, flags.detailed);
|
|
89
|
+
}
|
|
90
|
+
if (flags.file === undefined)
|
|
91
|
+
services.output(content.trimEnd());
|
|
92
|
+
else
|
|
93
|
+
await services.write((0, node_path_1.resolve)(flags.file), content);
|
|
94
|
+
if (report !== undefined)
|
|
95
|
+
services.diagnostic(report);
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
//# sourceMappingURL=graph.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graph.js","sourceRoot":"","sources":["../../../src/commands/graph.ts"],"names":[],"mappings":";;AAsCA,sDAkBC;AAID,4BAwCC;AApGD,yCAAiC;AAEjC,mEAGoC;AACpC,uDAAkD;AAClD,yEAA4G;AAC5G,iDAAyE;AAUzE,SAAS,OAAO,CAAC,KAAc,EAAE,KAAa;IAC1C,IAAI,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;QAC3D,MAAM,IAAI,KAAK,CAAC,GAAG,KAAK,2BAA2B,CAAC,CAAA;IACxD,OAAO,KAAgC,CAAA;AAC3C,CAAC;AAED,SAAS,SAAS,CAAC,MAAc,EAAE,QAAgB;IAC/C,MAAM,MAAM,GAAG,0BAAY,CAAC,KAAK,CAAC,MAAM,CAAC,CAAA;IACzC,IAAI,QAAQ,IAAI,MAAM;QAAE,MAAM,IAAI,KAAK,CAAC,GAAG,QAAQ,KAAK,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,EA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E,CAAC,CAAA;QACxF,IAAI,MAA0B,CAAA;QAC9B,IAAI,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,QAAQ,EAAE,CAAC;YACjC,MAAM,KAAK,GAAG,MAAM,QAAQ,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC,CAAA;YAC7C,MAAM,UAAU,GAAG,MAAM,IAAA,mDAA4B,EAAC,KAAK,CAAC,SAAS,EAAE,QAAQ,CAAC,IAAI,EAAE,0BAAY,CAAC,CAAA;YACnG,MAAM,QAAQ,GAAG,IAAA,iCAAkB,EAC/B,UAAU,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAA;YACzF,MAAM,GAAG,IAAA,qCAAsB,EAAC,QAAQ,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAA;QAC7D,CAAC;QACD,IAAI,KAAK,CAAC,IAAI,KAAK,SAAS;YAAE,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,CAAA;;YAC3D,MAAM,QAAQ,CAAC,KAAK,CAAC,IAAA,mBAAO,EAAC,KAAK,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC,CAAA;QACvD,IAAI,MAAM,KAAK,SAAS;YAAE,QAAQ,CAAC,UAAU,CAAC,MAAM,CAAC,CAAA;IACzD,CAAC,CAAC,CAAA;AACV,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { AuthoringGraph, AuthoringGraphSource } from '@cobol-ts/cel-graph-runtime';
|
|
2
|
+
/** Report over the declared output catalogue, not over arbitrary helper nodes. */
|
|
3
|
+
export interface GraphBuildReport {
|
|
4
|
+
readonly catalogueCount: number;
|
|
5
|
+
readonly experimentCount: number;
|
|
6
|
+
readonly existingGraphCount: number;
|
|
7
|
+
readonly graphNodeCount: number;
|
|
8
|
+
readonly celNodeCount: number;
|
|
9
|
+
readonly aggregateNodeCount: number;
|
|
10
|
+
readonly fromExperiments: readonly string[];
|
|
11
|
+
readonly fromExistingGraphs: readonly string[];
|
|
12
|
+
/** A registered output characteristic for which the assembled graph has no output node. */
|
|
13
|
+
readonly lost: readonly string[];
|
|
14
|
+
/** An experiment whose output characteristic is not in the current output catalogue. */
|
|
15
|
+
readonly uncatalogued: readonly string[];
|
|
16
|
+
readonly contributions: readonly {
|
|
17
|
+
readonly source: string;
|
|
18
|
+
readonly nodes: number;
|
|
19
|
+
}[];
|
|
20
|
+
}
|
|
21
|
+
/** The composition layer never drops a colliding or invalid node: it fails.
|
|
22
|
+
* 'Lost' therefore means a catalogued output absent from the *resulting* graph,
|
|
23
|
+
* not a node discarded during merging. This distinction matters for partial runs. */
|
|
24
|
+
export declare function describeGraphBuild(catalogueIds: readonly string[], graph: AuthoringGraph, existing: readonly AuthoringGraphSource[], experiments: readonly AuthoringGraphSource[], experimentFilename: string): GraphBuildReport;
|
|
25
|
+
/** A text report is deliberately separate from graph.yaml and sent to diagnostics. */
|
|
26
|
+
export declare function formatGraphBuildReport(report: GraphBuildReport, detailed?: boolean): string;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.describeGraphBuild = describeGraphBuild;
|
|
4
|
+
exports.formatGraphBuildReport = formatGraphBuildReport;
|
|
5
|
+
/** The composition layer never drops a colliding or invalid node: it fails.
|
|
6
|
+
* 'Lost' therefore means a catalogued output absent from the *resulting* graph,
|
|
7
|
+
* not a node discarded during merging. This distinction matters for partial runs. */
|
|
8
|
+
function describeGraphBuild(catalogueIds, graph, existing, experiments, experimentFilename) {
|
|
9
|
+
const provenance = new Map();
|
|
10
|
+
for (const source of existing)
|
|
11
|
+
for (const name of Object.keys(source.graph))
|
|
12
|
+
provenance.set(name, 'existing');
|
|
13
|
+
for (const source of experiments)
|
|
14
|
+
for (const name of Object.keys(source.graph))
|
|
15
|
+
provenance.set(name, 'experiment');
|
|
16
|
+
const fromExperiments = [];
|
|
17
|
+
const fromExistingGraphs = [];
|
|
18
|
+
const lost = [];
|
|
19
|
+
for (const id of [...new Set(catalogueIds)].sort()) {
|
|
20
|
+
if (!Object.prototype.hasOwnProperty.call(graph, id))
|
|
21
|
+
lost.push(id);
|
|
22
|
+
else if (provenance.get(id) === 'experiment')
|
|
23
|
+
fromExperiments.push(id);
|
|
24
|
+
else if (provenance.get(id) === 'existing')
|
|
25
|
+
fromExistingGraphs.push(id);
|
|
26
|
+
else
|
|
27
|
+
throw new Error(`Graph report: no source for output characteristic '${id}'`);
|
|
28
|
+
}
|
|
29
|
+
const catalogueSet = new Set(catalogueIds);
|
|
30
|
+
const uncatalogued = experiments.map(source => source.name.slice(experimentFilename.length + 1))
|
|
31
|
+
.filter(id => !catalogueSet.has(id)).sort();
|
|
32
|
+
const allSources = [...existing, ...experiments];
|
|
33
|
+
return {
|
|
34
|
+
catalogueCount: new Set(catalogueIds).size,
|
|
35
|
+
experimentCount: experiments.length,
|
|
36
|
+
existingGraphCount: existing.length,
|
|
37
|
+
graphNodeCount: Object.keys(graph).length,
|
|
38
|
+
celNodeCount: Object.values(graph).filter(node => node.type === 'cel').length,
|
|
39
|
+
aggregateNodeCount: Object.values(graph).filter(node => node.type === 'aggregate').length,
|
|
40
|
+
fromExperiments, fromExistingGraphs, lost, uncatalogued,
|
|
41
|
+
contributions: allSources.map(source => ({ source: source.name, nodes: Object.keys(source.graph).length }))
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
/** A text report is deliberately separate from graph.yaml and sent to diagnostics. */
|
|
45
|
+
function formatGraphBuildReport(report, detailed = false) {
|
|
46
|
+
const included = report.fromExperiments.length + report.fromExistingGraphs.length;
|
|
47
|
+
const lines = [
|
|
48
|
+
'Graph build report',
|
|
49
|
+
`Sources: ${report.experimentCount} experiment(s), ${report.existingGraphCount} existing graph(s)`,
|
|
50
|
+
`Nodes: ${report.graphNodeCount} (${report.celNodeCount} CEL, ${report.aggregateNodeCount} aggregate)`,
|
|
51
|
+
`Output characteristics: ${report.catalogueCount} catalogued, ${included} included, ${report.lost.length} lost`,
|
|
52
|
+
` From experiments: ${report.fromExperiments.length}`,
|
|
53
|
+
` From existing graphs: ${report.fromExistingGraphs.length}`,
|
|
54
|
+
` Lost (absent from graph): ${report.lost.length}`,
|
|
55
|
+
`Uncatalogued experiments: ${report.uncatalogued.length}`
|
|
56
|
+
];
|
|
57
|
+
if (detailed) {
|
|
58
|
+
const group = (label, ids) => {
|
|
59
|
+
lines.push(`${label} (${ids.length}):`);
|
|
60
|
+
if (ids.length === 0)
|
|
61
|
+
lines.push(' (none)');
|
|
62
|
+
else
|
|
63
|
+
lines.push(...ids.map(id => ` ${id}`));
|
|
64
|
+
};
|
|
65
|
+
group('From experiments', report.fromExperiments);
|
|
66
|
+
group('From existing graphs', report.fromExistingGraphs);
|
|
67
|
+
group('Lost', report.lost);
|
|
68
|
+
group('Uncatalogued experiments', report.uncatalogued);
|
|
69
|
+
lines.push('Source contributions:');
|
|
70
|
+
for (const source of report.contributions)
|
|
71
|
+
lines.push(` ${source.source}: ${source.nodes} node(s)`);
|
|
72
|
+
}
|
|
73
|
+
return lines.join('\n');
|
|
74
|
+
}
|
|
75
|
+
//# sourceMappingURL=graph.report.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graph.report.js","sourceRoot":"","sources":["../../../src/commands/graph.report.ts"],"names":[],"mappings":";;AAsBA,gDAiCC;AAGD,wDA2BC;AAlED;;qFAEqF;AACrF,SAAgB,kBAAkB,CAC9B,YAA+B,EAC/B,KAAqB,EACrB,QAAyC,EACzC,WAA4C,EAC5C,kBAA0B;IAE1B,MAAM,UAAU,GAAG,IAAI,GAAG,EAAqC,CAAA;IAC/D,KAAK,MAAM,MAAM,IAAI,QAAQ;QAAE,KAAK,MAAM,IAAI,IAAI,MAAM,CAAC,IAAI,C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CAAA;AAC3B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const node_path_1 = require("node:path");
|
|
4
|
+
const cli_1 = require("../cli");
|
|
5
|
+
const yaml_jsyaml_1 = require("@cobol-ts/yaml-jsyaml");
|
|
6
|
+
const input = (0, node_path_1.resolve)('experiments.yaml');
|
|
7
|
+
const manual = (0, node_path_1.resolve)('manual.yaml');
|
|
8
|
+
const output = (0, node_path_1.resolve)('generated-graph.yaml');
|
|
9
|
+
const configDirectory = (0, node_path_1.resolve)('example/.cobolts');
|
|
10
|
+
const config = (0, node_path_1.resolve)(configDirectory, 'characteristics.yaml');
|
|
11
|
+
const inputs = (0, node_path_1.resolve)(configDirectory, 'inputs.yaml');
|
|
12
|
+
const outputs = (0, node_path_1.resolve)(configDirectory, 'outputs.yaml');
|
|
13
|
+
const experiments = `version: 1
|
|
14
|
+
experiments:
|
|
15
|
+
- characteristic: C7030
|
|
16
|
+
metadata:
|
|
17
|
+
description: Overdraft spread
|
|
18
|
+
findings:
|
|
19
|
+
nodeCount: 2
|
|
20
|
+
graph:
|
|
21
|
+
C7030_monthlyBalance:
|
|
22
|
+
type: cel
|
|
23
|
+
cel: input.overdraft.monthEndBalance
|
|
24
|
+
metadata:
|
|
25
|
+
type: number
|
|
26
|
+
rollingWindow:
|
|
27
|
+
periodicity: monthly
|
|
28
|
+
size: 6
|
|
29
|
+
C7030:
|
|
30
|
+
type: aggregate
|
|
31
|
+
window: C7030_monthlyBalance
|
|
32
|
+
operation: min
|
|
33
|
+
history: []
|
|
34
|
+
`;
|
|
35
|
+
const expected = `base:
|
|
36
|
+
type: cel
|
|
37
|
+
cel: input.customers.customerId
|
|
38
|
+
metadata:
|
|
39
|
+
type: number
|
|
40
|
+
C7030_monthlyBalance:
|
|
41
|
+
type: cel
|
|
42
|
+
cel: input.overdraft.monthEndBalance
|
|
43
|
+
metadata:
|
|
44
|
+
type: number
|
|
45
|
+
rollingWindow:
|
|
46
|
+
periodicity: monthly
|
|
47
|
+
size: 6
|
|
48
|
+
C7030:
|
|
49
|
+
type: aggregate
|
|
50
|
+
window: C7030_monthlyBalance
|
|
51
|
+
operation: min
|
|
52
|
+
`;
|
|
53
|
+
function fixture() {
|
|
54
|
+
const lines = [];
|
|
55
|
+
const files = new Map([
|
|
56
|
+
[input, experiments],
|
|
57
|
+
[manual, `base:\n type: cel\n cel: input.customers.customerId\n metadata:\n type: number\n`],
|
|
58
|
+
[config, `files: .\ninput:\n sources:\n demo:\n type: yaml\n file: inputs.yaml\n path: characteristics\noutput:\n sources:\n demo:\n type: yaml\n file: outputs.yaml\n path: characteristics\n`],
|
|
59
|
+
[inputs, `characteristics: {I0010: {description: Test input}}\n`],
|
|
60
|
+
[outputs, `characteristics: {C7030: {description: Generated}, base: {description: Manual}, C9999: {description: Missing}}\n`]
|
|
61
|
+
]);
|
|
62
|
+
const writes = [];
|
|
63
|
+
const diagnostics = [];
|
|
64
|
+
const services = {
|
|
65
|
+
read: async (path) => {
|
|
66
|
+
const content = files.get(path);
|
|
67
|
+
if (content === undefined)
|
|
68
|
+
throw new Error(`Unknown test file: ${path}`);
|
|
69
|
+
return content;
|
|
70
|
+
},
|
|
71
|
+
output: (line) => lines.push(line),
|
|
72
|
+
diagnostic: (line) => diagnostics.push(line),
|
|
73
|
+
paths: async () => ({ directory: configDirectory }),
|
|
74
|
+
write: async (filename, content) => { writes.push({ filename, content }); }
|
|
75
|
+
};
|
|
76
|
+
return { services, lines, files, writes, diagnostics };
|
|
77
|
+
}
|
|
78
|
+
async function invoke(services, ...args) {
|
|
79
|
+
await (0, cli_1.createCoboltsCommand)(services).parseAsync(args, { from: 'user' });
|
|
80
|
+
}
|
|
81
|
+
describe('cobolts graph build', () => {
|
|
82
|
+
it('emits only graph.yaml authoring nodes (never experiment review or history)', async () => {
|
|
83
|
+
const f = fixture();
|
|
84
|
+
await invoke(f.services, 'graph', 'build', 'experiments.yaml', '--with', 'manual.yaml');
|
|
85
|
+
expect(f.lines).toEqual([expected.trimEnd()]);
|
|
86
|
+
expect(f.writes).toEqual([]);
|
|
87
|
+
const parsed = yaml_jsyaml_1.jsYamlParser.parse(f.lines[0]);
|
|
88
|
+
if ('errors' in parsed)
|
|
89
|
+
throw new Error(parsed.errors.join('; '));
|
|
90
|
+
expect(parsed.value).toEqual({
|
|
91
|
+
base: { type: 'cel', cel: 'input.customers.customerId', metadata: { type: 'number' } },
|
|
92
|
+
C7030_monthlyBalance: { type: 'cel', cel: 'input.overdraft.monthEndBalance',
|
|
93
|
+
metadata: { type: 'number', rollingWindow: { periodicity: 'monthly', size: 6 } } },
|
|
94
|
+
C7030: { type: 'aggregate', window: 'C7030_monthlyBalance', operation: 'min' }
|
|
95
|
+
});
|
|
96
|
+
});
|
|
97
|
+
it('writes exactly the graph, not an experiment dossier', async () => {
|
|
98
|
+
const f = fixture();
|
|
99
|
+
await invoke(f.services, 'graph', 'build', 'experiments.yaml', '--file', 'generated-graph.yaml', '--with', 'manual.yaml');
|
|
100
|
+
expect(f.lines).toEqual([]);
|
|
101
|
+
expect(f.writes).toEqual([{ filename: output, content: expected }]);
|
|
102
|
+
});
|
|
103
|
+
it('refuses node collisions instead of silently overwriting sources', async () => {
|
|
104
|
+
const f = fixture();
|
|
105
|
+
f.files.set(manual, `C7030:\n type: cel\n cel: input.other\n metadata:\n type: number\n`);
|
|
106
|
+
await expect(invoke(f.services, 'graph', 'build', 'experiments.yaml', '--with', 'manual.yaml'))
|
|
107
|
+
.rejects.toThrow(`Graph node 'C7030' is defined by both '${manual}' and '${input}#C7030'`);
|
|
108
|
+
expect(f.lines).toEqual([]);
|
|
109
|
+
expect(f.writes).toEqual([]);
|
|
110
|
+
});
|
|
111
|
+
it('reports source counts, included outputs and lost catalogue outputs without changing graph stdout', async () => {
|
|
112
|
+
const f = fixture();
|
|
113
|
+
await invoke(f.services, 'graph', 'build', 'experiments.yaml', '--with', 'manual.yaml', '--report');
|
|
114
|
+
expect(f.lines).toEqual([expected.trimEnd()]);
|
|
115
|
+
expect(f.writes).toEqual([]);
|
|
116
|
+
expect(f.diagnostics).toEqual([`Graph build report
|
|
117
|
+
Sources: 1 experiment(s), 1 existing graph(s)
|
|
118
|
+
Nodes: 3 (2 CEL, 1 aggregate)
|
|
119
|
+
Output characteristics: 3 catalogued, 2 included, 1 lost
|
|
120
|
+
From experiments: 1
|
|
121
|
+
From existing graphs: 1
|
|
122
|
+
Lost (absent from graph): 1
|
|
123
|
+
Uncatalogued experiments: 0`]);
|
|
124
|
+
});
|
|
125
|
+
it('reports zero loss when all catalogued outputs are present', async () => {
|
|
126
|
+
const f = fixture();
|
|
127
|
+
f.files.set(outputs, `characteristics: {C7030: {description: Generated}, base: {description: Manual}}\n`);
|
|
128
|
+
await invoke(f.services, 'graph', 'build', 'experiments.yaml', '--with', 'manual.yaml', '--report');
|
|
129
|
+
expect(f.diagnostics).toEqual([`Graph build report
|
|
130
|
+
Sources: 1 experiment(s), 1 existing graph(s)
|
|
131
|
+
Nodes: 3 (2 CEL, 1 aggregate)
|
|
132
|
+
Output characteristics: 2 catalogued, 2 included, 0 lost
|
|
133
|
+
From experiments: 1
|
|
134
|
+
From existing graphs: 1
|
|
135
|
+
Lost (absent from graph): 0
|
|
136
|
+
Uncatalogued experiments: 0`]);
|
|
137
|
+
});
|
|
138
|
+
it('--detailed implies --report and names every characteristic camp and contributing source', async () => {
|
|
139
|
+
const f = fixture();
|
|
140
|
+
await invoke(f.services, 'graph', 'build', 'experiments.yaml', '--with', 'manual.yaml', '--file', 'generated-graph.yaml', '--detailed');
|
|
141
|
+
expect(f.lines).toEqual([]);
|
|
142
|
+
expect(f.writes).toEqual([{ filename: output, content: expected }]);
|
|
143
|
+
expect(f.diagnostics).toEqual([`Graph build report
|
|
144
|
+
Sources: 1 experiment(s), 1 existing graph(s)
|
|
145
|
+
Nodes: 3 (2 CEL, 1 aggregate)
|
|
146
|
+
Output characteristics: 3 catalogued, 2 included, 1 lost
|
|
147
|
+
From experiments: 1
|
|
148
|
+
From existing graphs: 1
|
|
149
|
+
Lost (absent from graph): 1
|
|
150
|
+
Uncatalogued experiments: 0
|
|
151
|
+
From experiments (1):
|
|
152
|
+
C7030
|
|
153
|
+
From existing graphs (1):
|
|
154
|
+
base
|
|
155
|
+
Lost (1):
|
|
156
|
+
C9999
|
|
157
|
+
Uncatalogued experiments (0):
|
|
158
|
+
(none)
|
|
159
|
+
Source contributions:
|
|
160
|
+
${manual}: 1 node(s)
|
|
161
|
+
${input}#C7030: 2 node(s)`]);
|
|
162
|
+
});
|
|
163
|
+
it('reports experiments absent from the configured output catalogue instead of treating them as catalogued', async () => {
|
|
164
|
+
const f = fixture();
|
|
165
|
+
f.files.set(outputs, `characteristics: {base: {description: Manual}, C9999: {description: Missing}}\n`);
|
|
166
|
+
await invoke(f.services, 'graph', 'build', 'experiments.yaml', '--with', 'manual.yaml', '--detailed');
|
|
167
|
+
expect(f.diagnostics).toEqual([`Graph build report
|
|
168
|
+
Sources: 1 experiment(s), 1 existing graph(s)
|
|
169
|
+
Nodes: 3 (2 CEL, 1 aggregate)
|
|
170
|
+
Output characteristics: 2 catalogued, 1 included, 1 lost
|
|
171
|
+
From experiments: 0
|
|
172
|
+
From existing graphs: 1
|
|
173
|
+
Lost (absent from graph): 1
|
|
174
|
+
Uncatalogued experiments: 1
|
|
175
|
+
From experiments (0):
|
|
176
|
+
(none)
|
|
177
|
+
From existing graphs (1):
|
|
178
|
+
base
|
|
179
|
+
Lost (1):
|
|
180
|
+
C9999
|
|
181
|
+
Uncatalogued experiments (1):
|
|
182
|
+
C7030
|
|
183
|
+
Source contributions:
|
|
184
|
+
${manual}: 1 node(s)
|
|
185
|
+
${input}#C7030: 2 node(s)`]);
|
|
186
|
+
});
|
|
187
|
+
it('does not print a report when composition fails', async () => {
|
|
188
|
+
const f = fixture();
|
|
189
|
+
f.files.set(manual, `C7030:\n type: cel\n cel: input.other\n metadata:\n type: number\n`);
|
|
190
|
+
await expect(invoke(f.services, 'graph', 'build', 'experiments.yaml', '--with', 'manual.yaml', '--report'))
|
|
191
|
+
.rejects.toThrow(`Graph node 'C7030' is defined by both '${manual}' and '${input}#C7030'`);
|
|
192
|
+
expect(f.lines).toEqual([]);
|
|
193
|
+
expect(f.writes).toEqual([]);
|
|
194
|
+
expect(f.diagnostics).toEqual([]);
|
|
195
|
+
});
|
|
196
|
+
it('rejects a dossier with an unsupported version', async () => {
|
|
197
|
+
const f = fixture();
|
|
198
|
+
f.files.set(input, experiments.replace('version: 1', 'version: 2'));
|
|
199
|
+
await expect(invoke(f.services, 'graph', 'build', 'experiments.yaml'))
|
|
200
|
+
.rejects.toThrow(`${input}: expected experiment document version 1`);
|
|
201
|
+
});
|
|
202
|
+
it('rejects a dossier without its claimed characteristic output node', async () => {
|
|
203
|
+
const f = fixture();
|
|
204
|
+
f.files.set(input, experiments.replace('characteristic: C7030', 'characteristic: C9999'));
|
|
205
|
+
await expect(invoke(f.services, 'graph', 'build', 'experiments.yaml'))
|
|
206
|
+
.rejects.toThrow(`${input}.experiments[0].graph: missing output node 'C9999'`);
|
|
207
|
+
});
|
|
208
|
+
it('rejects a generated graph with missing current-value dependencies', async () => {
|
|
209
|
+
const f = fixture();
|
|
210
|
+
f.files.set(input, `version: 1\nexperiments:\n - characteristic: C7030\n graph:\n C7030:\n type: cel\n cel: now.missing + 1\n metadata:\n type: number\n`);
|
|
211
|
+
await expect(invoke(f.services, 'graph', 'build', 'experiments.yaml'))
|
|
212
|
+
.rejects.toThrow("refers to missing graph node 'missing'");
|
|
213
|
+
});
|
|
214
|
+
});
|
|
215
|
+
//# sourceMappingURL=graph.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graph.spec.js","sourceRoot":"","sources":["../../../src/commands/graph.spec.ts"],"names":[],"mappings":";;AAAA,yCAAiC;AACjC,gCAA2C;AAE3C,uDAAkD;A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AAC,GAAG,CAAC,KAAK,EAAE,WAAW,CAAC,OAAO,CAAC,uBAAuB,EAAE,uBAAuB,CAAC,CAAC,CAAA;QACzF,MAAM,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,kBAAkB,CAAC,CAAC;aACjE,OAAO,CAAC,OAAO,CAAC,GAAG,KAAK,oDAAoD,CAAC,CAAA;IACtF,CAAC,CAAC,CAAA;IACF,EAAE,CAAC,mEAAmE,EAAE,KAAK,IAAI,EAAE;QAC/E,MAAM,CAAC,GAAG,OAAO,EAAE,CAAA;QACnB,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,EAAE,6KAA6K,CAAC,CAAA;QACjM,MAAM,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,kBAAkB,CAAC,CAAC;aACjE,OAAO,CAAC,OAAO,CAAC,wCAAwC,CAAC,CAAA;IAClE,CAAC,CAAC,CAAA;AACN,CAAC,CAAC,CAAA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.parseCliPeriodicity = parseCliPeriodicity;
|
|
4
|
+
function parseCliPeriodicity(value) {
|
|
5
|
+
if (value === undefined)
|
|
6
|
+
return undefined;
|
|
7
|
+
if (value === 'daily' || value === 'monthly')
|
|
8
|
+
return value;
|
|
9
|
+
throw new Error('--periodicity must be daily or monthly');
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=periodicity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"periodicity.js","sourceRoot":"","sources":["../../../src/commands/periodicity.ts"],"names":[],"mappings":";;AAGA,kDAIC;AAJD,SAAgB,mBAAmB,CAAC,KAAyB;IACzD,IAAI,KAAK,KAAK,SAAS;QAAE,OAAO,SAAS,CAAA;IACzC,IAAI,KAAK,KAAK,OAAO,IAAI,KAAK,KAAK,SAAS;QAAE,OAAO,KAAK,CAAA;IAC1D,MAAM,IAAI,KAAK,CAAC,wCAAwC,CAAC,CAAA;AAC7D,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Command } from 'commander';
|
|
2
|
+
import type { CliOptions, CliPaths, CliServices } from '../context';
|
|
3
|
+
/** Discover project roots by their .cobolts directory, not by benchmark naming conventions. */
|
|
4
|
+
export declare function findCoboltsProjects(root: string): Promise<string[]>;
|
|
5
|
+
/** Run the same configuration and CEL validation as their single-project CLI commands. */
|
|
6
|
+
export declare function validateProject(paths: CliPaths, services: CliServices, requirePolicy?: boolean): Promise<void>;
|
|
7
|
+
export declare function addValidateAll(root: Command, services: CliServices, options: () => CliOptions): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const promises_1 = require("node:fs/promises");
|
|
4
|
+
const node_os_1 = require("node:os");
|
|
5
|
+
const node_path_1 = require("node:path");
|
|
6
|
+
const cursor_loader_benchmark_1 = require("@cobol-ts/cursor-loader-benchmark");
|
|
7
|
+
const cli_1 = require("../cli");
|
|
8
|
+
const context_1 = require("../context");
|
|
9
|
+
const validate_all_1 = require("./validate.all");
|
|
10
|
+
/** Executable projects do not need a TypeScript code-generation policy. */
|
|
11
|
+
describe('real-project validation without generation.yaml', () => {
|
|
12
|
+
it('validates generated composed benchmarks through the production services', async () => {
|
|
13
|
+
const directory = await (0, promises_1.mkdtemp)((0, node_path_1.join)((0, node_os_1.tmpdir)(), 'cobolts-validate-project-'));
|
|
14
|
+
try {
|
|
15
|
+
const baseline = await (0, cursor_loader_benchmark_1.generateBenchmarkProject)(directory, 'baseline', 3);
|
|
16
|
+
const zeroNodes = await (0, cursor_loader_benchmark_1.generateBenchmarkProject)(directory, 'graph-0', 3);
|
|
17
|
+
for (const project of [baseline, zeroNodes]) {
|
|
18
|
+
const paths = await context_1.nodeCliServices.paths({ directory: project });
|
|
19
|
+
await expect((0, validate_all_1.validateProject)(paths, context_1.nodeCliServices)).resolves.toBeUndefined();
|
|
20
|
+
}
|
|
21
|
+
const messages = [];
|
|
22
|
+
const services = { ...context_1.nodeCliServices, output: (line) => { messages.push(line); } };
|
|
23
|
+
await (0, cli_1.createCoboltsCommand)(services).parseAsync(['-d', directory, 'validate', 'all'], { from: 'user' });
|
|
24
|
+
const configOutput = [];
|
|
25
|
+
await (0, cli_1.createCoboltsCommand)({ ...context_1.nodeCliServices, output: line => { configOutput.push(line); } })
|
|
26
|
+
.parseAsync(['-d', baseline, 'config', 'validate'], { from: 'user' });
|
|
27
|
+
expect(configOutput).toEqual(['Valid: 1 logical files, 0 artefacts']);
|
|
28
|
+
expect(messages).toEqual([
|
|
29
|
+
'PASS baseline', 'PASS graph-0',
|
|
30
|
+
'Validated 2 projects: 2 passed, 0 failed'
|
|
31
|
+
]);
|
|
32
|
+
}
|
|
33
|
+
finally {
|
|
34
|
+
await (0, promises_1.rm)(directory, { recursive: true, force: true });
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
it('validates the public two-file example through the production services', async () => {
|
|
38
|
+
const directory = (0, node_path_1.resolve)(__dirname, '../../../../examples/example/definitions');
|
|
39
|
+
const paths = await context_1.nodeCliServices.paths({ directory });
|
|
40
|
+
await expect((0, validate_all_1.validateProject)(paths, context_1.nodeCliServices)).resolves.toBeUndefined();
|
|
41
|
+
});
|
|
42
|
+
});
|
|
43
|
+
//# sourceMappingURL=validate.all.integration.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validate.all.integration.spec.js","sourceRoot":"","sources":["../../../src/commands/validate.all.integration.spec.ts"],"names":[],"mappings":";;AAAA,+CAA4C;AAC5C,qCAA8B;AAC9B,yCAAuC;AACvC,+EAA0E;AAC1E,gCAA2C;AAC3C,wCAA0C;AAC1C,i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E,GAAE,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA,CAAA,CAAC,EAAC,CAAC;iBACtF,UAAU,CAAC,CAAC,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,UAAU,CAAC,EAAE,EAAC,IAAI,EAAE,MAAM,EAAC,CAAC,CAAA;YACvE,MAAM,CAAC,YAAY,CAAC,CAAC,OAAO,CAAC,CAAC,qCAAqC,CAAC,CAAC,CAAA;YACrE,MAAM,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC;gBACrB,eAAe,EAAE,cAAc;gBAC/B,0CAA0C;aAC7C,CAAC,CAAA;QACN,CAAC;gBAAS,CAAC;YACP,MAAM,IAAA,aAAE,EAAC,SAAS,EAAE,EAAC,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAC,CAAC,CAAA;QACvD,CAAC;IACL,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,uEAAuE,EAAE,KAAK,IAAI,EAAE;QACnF,MAAM,SAAS,GAAG,IAAA,mBAAO,EAAC,SAAS,EAAE,0CAA0C,CAAC,CAAA;QAChF,MAAM,KAAK,GAAG,MAAM,yBAAe,CAAC,KAAK,CAAC,EAAC,SAAS,EAAC,CAAC,CAAA;QACtD,MAAM,MAAM,CAAC,IAAA,8BAAe,EAAC,KAAK,EAAE,yBAAe,CAAC,CAAC,CAAC,QAAQ,CAAC,aAAa,EAAE,CAAA;IAClF,CAAC,CAAC,CAAA;AACN,CAAC,CAAC,CAAA"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.findCoboltsProjects = findCoboltsProjects;
|
|
4
|
+
exports.validateProject = validateProject;
|
|
5
|
+
exports.addValidateAll = addValidateAll;
|
|
6
|
+
const promises_1 = require("node:fs/promises");
|
|
7
|
+
const node_path_1 = require("node:path");
|
|
8
|
+
const excludedDirectories = new Set(['.git', '.yarn', 'node_modules', 'dist', 'build', 'coverage']);
|
|
9
|
+
/** Discover project roots by their .cobolts directory, not by benchmark naming conventions. */
|
|
10
|
+
async function findCoboltsProjects(root) {
|
|
11
|
+
const result = [];
|
|
12
|
+
async function visit(directory) {
|
|
13
|
+
const entries = await (0, promises_1.readdir)(directory, { withFileTypes: true });
|
|
14
|
+
if (entries.some(entry => entry.isDirectory() && entry.name === '.cobolts')) {
|
|
15
|
+
result.push(directory);
|
|
16
|
+
}
|
|
17
|
+
for (const entry of entries) {
|
|
18
|
+
if (!entry.isDirectory() || entry.name.startsWith('.') || excludedDirectories.has(entry.name))
|
|
19
|
+
continue;
|
|
20
|
+
await visit((0, node_path_1.join)(directory, entry.name));
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
await visit(root);
|
|
24
|
+
return result.sort();
|
|
25
|
+
}
|
|
26
|
+
/** Run the same configuration and CEL validation as their single-project CLI commands. */
|
|
27
|
+
async function validateProject(paths, services, requirePolicy = false) {
|
|
28
|
+
// A generation policy is optional for projects that only inspect or execute data.
|
|
29
|
+
// When it exists, validate its code-generation contract as well.
|
|
30
|
+
await services.logicalNames(paths);
|
|
31
|
+
const filenames = await services.list(paths);
|
|
32
|
+
if (requirePolicy && !filenames.includes(paths.policy))
|
|
33
|
+
throw new Error(`Explicit generation policy does not exist: ${paths.policy}`);
|
|
34
|
+
if (filenames.includes(paths.policy))
|
|
35
|
+
await services.manifest(paths);
|
|
36
|
+
await services.validateData(paths);
|
|
37
|
+
const initial = await services.validateAccumulator(paths);
|
|
38
|
+
if ('errors' in initial)
|
|
39
|
+
throw new Error(initial.errors.join('\n'));
|
|
40
|
+
for (const filename of filenames)
|
|
41
|
+
await services.read(filename);
|
|
42
|
+
const graph = await services.celInspect(paths, { stage: 'validate' });
|
|
43
|
+
if ('errors' in graph)
|
|
44
|
+
throw new Error(graph.errors.join('\n'));
|
|
45
|
+
}
|
|
46
|
+
function addValidateAll(root, services, options) {
|
|
47
|
+
root.command('validate')
|
|
48
|
+
.description('Validate one or all COBOL-TS projects')
|
|
49
|
+
.command('all')
|
|
50
|
+
.description('Validate every .cobolts project beneath -d (or the current directory)')
|
|
51
|
+
.action(async () => {
|
|
52
|
+
const directory = (0, node_path_1.resolve)(options().directory ?? options().root ?? process.cwd());
|
|
53
|
+
const projects = await findCoboltsProjects(directory);
|
|
54
|
+
if (projects.length === 0)
|
|
55
|
+
throw new Error(`No .cobolts projects found below ${directory}`);
|
|
56
|
+
let failed = 0;
|
|
57
|
+
for (const project of projects) {
|
|
58
|
+
const label = (0, node_path_1.relative)(directory, project) || '.';
|
|
59
|
+
try {
|
|
60
|
+
const paths = await services.paths({ ...options(), directory: project });
|
|
61
|
+
await validateProject(paths, services, options().policy !== undefined);
|
|
62
|
+
services.output(`PASS ${label}`);
|
|
63
|
+
}
|
|
64
|
+
catch (error) {
|
|
65
|
+
failed++;
|
|
66
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
67
|
+
services.output(`FAIL ${label}: ${message}`);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
services.output(`Validated ${projects.length} projects: ${projects.length - failed} passed, ${failed} failed`);
|
|
71
|
+
if (failed > 0)
|
|
72
|
+
throw new Error(`${failed} project(s) failed validation`);
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
//# sourceMappingURL=validate.all.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validate.all.js","sourceRoot":"","sources":["../../../src/commands/validate.all.ts"],"names":[],"mappings":";;AAQA,kDAcC;AAGD,0CAcC;AAED,wCAyBC;AAlED,+CAAwC;AACxC,yCAAiD;AAIjD,MAAM,mBAAmB,GAAG,IAAI,GAAG,CAAC,CAAC,MAAM,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC,CAAA;AAEnG,+FAA+F;AACxF,KAAK,UAAU,mBAAmB,CAAC,IAAY;IAClD,MAAM,MAAM,GAAa,EAAE,CAAA;IAC3B,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