@mmmnt/feature 0.1.15 → 0.1.16
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/commands/report.js +1 -1
- package/dist/evidence.d.ts +8 -0
- package/dist/evidence.d.ts.map +1 -1
- package/dist/evidence.js +51 -2
- package/dist/evidence.js.map +1 -1
- package/package.json +4 -4
- package/schemas/evidence.schema.json +67 -3
package/dist/commands/report.js
CHANGED
|
@@ -12,7 +12,7 @@ export default class Report extends Command {
|
|
|
12
12
|
config: Flags.string({ char: "c", description: "Path to feat.config.json", default: "feat.config.json" }),
|
|
13
13
|
junit: Flags.boolean({ description: "Print the JUnit XML path for CI/Xray import" }),
|
|
14
14
|
evidence: Flags.boolean({
|
|
15
|
-
description: "Write a feat-evidence/
|
|
15
|
+
description: "Write a feat-evidence/2 bundle to .feature/evidence/<environment>/<commit-sha>.json and exit",
|
|
16
16
|
}),
|
|
17
17
|
out: Flags.string({ description: "Explicit evidence output path (overrides the .feature/ convention)" }),
|
|
18
18
|
force: Flags.boolean({ description: "Write evidence even for the local environment (debugging)" }),
|
package/dist/evidence.d.ts
CHANGED
|
@@ -1,2 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* feat-evidence/2 stage 1: fold the JUnit artifact into per-scenario runs.
|
|
3
|
+
* Each testcase is one scenario; the harness's "Prediction violated" lines
|
|
4
|
+
* inside a failure parse into {path, expected, got} rows. Lenient by
|
|
5
|
+
* construction — an unparseable failure still records the failed scenario,
|
|
6
|
+
* it never drops it. Exported for unit testing.
|
|
7
|
+
*/
|
|
8
|
+
export declare function parseJunitRuns(xml: string): Array<Record<string, unknown>>;
|
|
1
9
|
export declare function produceEvidence(root: string, configPath: string): Promise<Record<string, unknown>>;
|
|
2
10
|
//# sourceMappingURL=evidence.d.ts.map
|
package/dist/evidence.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"evidence.d.ts","sourceRoot":"","sources":["../src/evidence.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"evidence.d.ts","sourceRoot":"","sources":["../src/evidence.ts"],"names":[],"mappings":"AAwCA;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CA6B1E;AAED,wBAAsB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CA8FxG"}
|
package/dist/evidence.js
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
|
-
// Evidence bundle production (feat-evidence/
|
|
1
|
+
// Evidence bundle production (feat-evidence/2, schemas/evidence.schema.json).
|
|
2
2
|
// A digest-anchored record of spec state + verification results at a point in
|
|
3
3
|
// time. Free, local, account-less — the account lane signs bundles on
|
|
4
4
|
// ingestion; locally `signature` is null.
|
|
5
|
+
//
|
|
6
|
+
// feat-evidence/2 (ADR-0020) is a strict superset of /1: it adds `runs` —
|
|
7
|
+
// per-scenario results with parsed prediction violations, derived from the
|
|
8
|
+
// JUnit artifact (stage 1). Stage 2 replaces the JUnit parse with a
|
|
9
|
+
// structured run sidecar written by the harness itself.
|
|
5
10
|
import { resolveEnvironment, variablesSidecarPath } from "@mmmnt/feat-runtime";
|
|
6
11
|
import { createHash } from "node:crypto";
|
|
7
12
|
import { existsSync, readFileSync } from "node:fs";
|
|
@@ -23,6 +28,47 @@ function toolchainVersions() {
|
|
|
23
28
|
}
|
|
24
29
|
return versions;
|
|
25
30
|
}
|
|
31
|
+
const XML_ENTITIES = { "<": "<", ">": ">", """: '"', "'": "'", "'": "'", "&": "&" };
|
|
32
|
+
function decodeXml(text) {
|
|
33
|
+
return text.replace(/&(?:lt|gt|quot|apos|amp|#39);/g, (m) => XML_ENTITIES[m] ?? m);
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* feat-evidence/2 stage 1: fold the JUnit artifact into per-scenario runs.
|
|
37
|
+
* Each testcase is one scenario; the harness's "Prediction violated" lines
|
|
38
|
+
* inside a failure parse into {path, expected, got} rows. Lenient by
|
|
39
|
+
* construction — an unparseable failure still records the failed scenario,
|
|
40
|
+
* it never drops it. Exported for unit testing.
|
|
41
|
+
*/
|
|
42
|
+
export function parseJunitRuns(xml) {
|
|
43
|
+
const runs = [];
|
|
44
|
+
for (const tc of xml.matchAll(/<testcase\b([^>]*?)(?:\/>|>([\s\S]*?)<\/testcase>)/g)) {
|
|
45
|
+
const attrs = tc[1] ?? "";
|
|
46
|
+
const inner = tc[2] ?? "";
|
|
47
|
+
const attr = (name) => {
|
|
48
|
+
const m = new RegExp(`${name}="([^"]*)"`).exec(attrs);
|
|
49
|
+
return m ? decodeXml(m[1] ?? "") : null;
|
|
50
|
+
};
|
|
51
|
+
const name = attr("name") ?? "";
|
|
52
|
+
const specId = /SPEC-[A-Z0-9]+-[A-Z0-9]+/.exec(name)?.[0] ?? null;
|
|
53
|
+
const time = attr("time");
|
|
54
|
+
const failed = /<failure\b/.test(inner);
|
|
55
|
+
const violations = [];
|
|
56
|
+
if (failed) {
|
|
57
|
+
const text = decodeXml(inner);
|
|
58
|
+
for (const line of text.matchAll(/^\s*\S+ › "(?:.*?)" › (.+?): expected (.+?), got (.+?)\s*$/gm)) {
|
|
59
|
+
violations.push({ path: line[1] ?? "", expected: line[2] ?? "", got: line[3] ?? "" });
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
runs.push({
|
|
63
|
+
name,
|
|
64
|
+
spec_id: specId,
|
|
65
|
+
status: failed ? "fail" : "pass",
|
|
66
|
+
...(time !== null ? { time: Number(time) } : {}),
|
|
67
|
+
violations,
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
return runs;
|
|
71
|
+
}
|
|
26
72
|
export async function produceEvidence(root, configPath) {
|
|
27
73
|
const configText = readFileSync(path.resolve(root, configPath), "utf8");
|
|
28
74
|
const config = JSON.parse(configText);
|
|
@@ -62,7 +108,7 @@ export async function produceEvidence(root, configPath) {
|
|
|
62
108
|
verify = { status: "fail", mismatched: [] };
|
|
63
109
|
}
|
|
64
110
|
const bundle = {
|
|
65
|
-
contract: "feat-evidence/
|
|
111
|
+
contract: "feat-evidence/2",
|
|
66
112
|
produced_at: new Date().toISOString(),
|
|
67
113
|
producer: {
|
|
68
114
|
tool: "@mmmnt/feature",
|
|
@@ -116,6 +162,9 @@ export async function produceEvidence(root, configPath) {
|
|
|
116
162
|
errors,
|
|
117
163
|
junit_digest: sha256(xml),
|
|
118
164
|
};
|
|
165
|
+
// feat-evidence/2: the per-scenario detail the dashboard's violation
|
|
166
|
+
// view demands (its envelope: feature-dashboard SPEC-FD-037).
|
|
167
|
+
bundle.runs = parseJunitRuns(xml);
|
|
119
168
|
}
|
|
120
169
|
return bundle;
|
|
121
170
|
}
|
package/dist/evidence.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"evidence.js","sourceRoot":"","sources":["../src/evidence.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,8EAA8E;AAC9E,sEAAsE;AACtE,0CAA0C;
|
|
1
|
+
{"version":3,"file":"evidence.js","sourceRoot":"","sources":["../src/evidence.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,8EAA8E;AAC9E,sEAAsE;AACtE,0CAA0C;AAC1C,EAAE;AACF,0EAA0E;AAC1E,2EAA2E;AAC3E,oEAAoE;AACpE,wDAAwD;AAExD,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAC/E,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,KA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
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mmmnt/feature",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.16",
|
|
4
4
|
"description": "The feat CLI — Feature, the quality spine of AI-native delivery.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -23,11 +23,11 @@
|
|
|
23
23
|
"@oclif/core": "^4.3.0",
|
|
24
24
|
"@mmmnt/feat-core": "^0.2.0",
|
|
25
25
|
"@mmmnt/feat-derive": "^0.1.9",
|
|
26
|
-
"@mmmnt/feat-runtime": "^0.1.10",
|
|
27
26
|
"@mmmnt/feat-emit-ts": "^0.1.8",
|
|
27
|
+
"@mmmnt/feat-runtime": "^0.1.10",
|
|
28
28
|
"@mmmnt/feat-types": "^0.1.9",
|
|
29
|
-
"@mmmnt/feat-
|
|
30
|
-
"@mmmnt/feat-
|
|
29
|
+
"@mmmnt/feat-analyze": "^0.1.8",
|
|
30
|
+
"@mmmnt/feat-runner": "^0.1.8"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"vitest": "^3.2.0",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
3
|
"$id": "https://feat.dev/schemas/evidence.json",
|
|
4
|
-
"title": "Feat evidence bundle (feat-evidence/
|
|
5
|
-
"description": "A self-contained, digest-anchored record of a project's spec state and verification results at a point in time. Produced locally and freely by `feat report --evidence` (capability); accounts accrue attested bundles as a ledger (evidence).",
|
|
4
|
+
"title": "Feat evidence bundle (feat-evidence/2)",
|
|
5
|
+
"description": "A self-contained, digest-anchored record of a project's spec state and verification results at a point in time. feat-evidence/2 (ADR-0020) is a strict superset of /1 adding per-scenario `runs`. Produced locally and freely by `feat report --evidence` (capability); accounts accrue attested bundles as a ledger (evidence).",
|
|
6
6
|
"type": "object",
|
|
7
7
|
"required": [
|
|
8
8
|
"contract",
|
|
@@ -15,7 +15,10 @@
|
|
|
15
15
|
"additionalProperties": false,
|
|
16
16
|
"properties": {
|
|
17
17
|
"contract": {
|
|
18
|
-
"
|
|
18
|
+
"enum": [
|
|
19
|
+
"feat-evidence/1",
|
|
20
|
+
"feat-evidence/2"
|
|
21
|
+
]
|
|
19
22
|
},
|
|
20
23
|
"produced_at": {
|
|
21
24
|
"type": "string",
|
|
@@ -220,6 +223,67 @@
|
|
|
220
223
|
]
|
|
221
224
|
}
|
|
222
225
|
}
|
|
226
|
+
},
|
|
227
|
+
"runs": {
|
|
228
|
+
"description": "feat-evidence/2 (ADR-0020): per-scenario results — the run detail the dashboard violation view renders. Stage 1 derives these from the JUnit artifact; stage 2 moves them to a structured harness sidecar. Present only when a run artifact exists.",
|
|
229
|
+
"type": "array",
|
|
230
|
+
"items": {
|
|
231
|
+
"type": "object",
|
|
232
|
+
"required": [
|
|
233
|
+
"name",
|
|
234
|
+
"spec_id",
|
|
235
|
+
"status",
|
|
236
|
+
"violations"
|
|
237
|
+
],
|
|
238
|
+
"additionalProperties": false,
|
|
239
|
+
"properties": {
|
|
240
|
+
"name": {
|
|
241
|
+
"type": "string",
|
|
242
|
+
"description": "The full test name — describe > scenario."
|
|
243
|
+
},
|
|
244
|
+
"spec_id": {
|
|
245
|
+
"type": [
|
|
246
|
+
"string",
|
|
247
|
+
"null"
|
|
248
|
+
],
|
|
249
|
+
"description": "The spec id parsed from the name; null when the case is not spec-anchored."
|
|
250
|
+
},
|
|
251
|
+
"status": {
|
|
252
|
+
"enum": [
|
|
253
|
+
"pass",
|
|
254
|
+
"fail"
|
|
255
|
+
]
|
|
256
|
+
},
|
|
257
|
+
"time": {
|
|
258
|
+
"type": "number"
|
|
259
|
+
},
|
|
260
|
+
"violations": {
|
|
261
|
+
"type": "array",
|
|
262
|
+
"description": "Parsed prediction-violation rows. An unparseable failure records the failed scenario with no rows — never dropped.",
|
|
263
|
+
"items": {
|
|
264
|
+
"type": "object",
|
|
265
|
+
"required": [
|
|
266
|
+
"path",
|
|
267
|
+
"expected",
|
|
268
|
+
"got"
|
|
269
|
+
],
|
|
270
|
+
"additionalProperties": false,
|
|
271
|
+
"properties": {
|
|
272
|
+
"path": {
|
|
273
|
+
"type": "string",
|
|
274
|
+
"description": "The prediction coordinate, e.g. response › data › ledgerWorkspace › history."
|
|
275
|
+
},
|
|
276
|
+
"expected": {
|
|
277
|
+
"type": "string"
|
|
278
|
+
},
|
|
279
|
+
"got": {
|
|
280
|
+
"type": "string"
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
}
|
|
223
287
|
}
|
|
224
288
|
}
|
|
225
289
|
}
|