@lovrozagar/oat 0.1.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/LICENSE +21 -0
- package/README.md +401 -0
- package/bin/oat.js +2 -0
- package/dist/cli.js +386 -0
- package/dist/config/define-config.d.ts +165 -0
- package/dist/config/define-config.d.ts.map +1 -0
- package/dist/config/define-config.js +24 -0
- package/dist/config/define-config.js.map +1 -0
- package/dist/config/load.d.ts +10 -0
- package/dist/config/load.d.ts.map +1 -0
- package/dist/config/load.js +61 -0
- package/dist/config/load.js.map +1 -0
- package/dist/index.d.ts +17 -0
- package/dist/index.js +9 -0
- package/dist/reference/defects.d.ts +254 -0
- package/dist/reference/defects.d.ts.map +1 -0
- package/dist/reference/defects.js +265 -0
- package/dist/reference/defects.js.map +1 -0
- package/dist/reference/dialect.d.ts +104 -0
- package/dist/reference/dialect.d.ts.map +1 -0
- package/dist/reference/dialect.js +174 -0
- package/dist/reference/dialect.js.map +1 -0
- package/dist/reference/http.d.ts +79 -0
- package/dist/reference/http.d.ts.map +1 -0
- package/dist/reference/http.js +889 -0
- package/dist/reference/http.js.map +1 -0
- package/dist/reference/model.d.ts +56 -0
- package/dist/reference/model.d.ts.map +1 -0
- package/dist/reference/model.js +156 -0
- package/dist/reference/model.js.map +1 -0
- package/dist/reference/query.d.ts +45 -0
- package/dist/reference/query.d.ts.map +1 -0
- package/dist/reference/query.js +353 -0
- package/dist/reference/query.js.map +1 -0
- package/dist/reference/spec.d.ts +13 -0
- package/dist/reference/spec.d.ts.map +1 -0
- package/dist/reference/spec.js +547 -0
- package/dist/reference/spec.js.map +1 -0
- package/dist/reference/store-api.d.ts +59 -0
- package/dist/reference/store-api.d.ts.map +1 -0
- package/dist/reference/store-api.js +76 -0
- package/dist/reference/store-api.js.map +1 -0
- package/dist/reference/stores/memory.d.ts +27 -0
- package/dist/reference/stores/memory.d.ts.map +1 -0
- package/dist/reference/stores/memory.js +97 -0
- package/dist/reference/stores/memory.js.map +1 -0
- package/dist/reference/stores/postgres.d.ts +61 -0
- package/dist/reference/stores/postgres.d.ts.map +1 -0
- package/dist/reference/stores/postgres.js +406 -0
- package/dist/reference/stores/postgres.js.map +1 -0
- package/dist/reference/stores/sqlite-driver.d.ts +54 -0
- package/dist/reference/stores/sqlite-driver.d.ts.map +1 -0
- package/dist/reference/stores/sqlite-driver.js +99 -0
- package/dist/reference/stores/sqlite-driver.js.map +1 -0
- package/dist/reference/stores/sqlite.d.ts +68 -0
- package/dist/reference/stores/sqlite.d.ts.map +1 -0
- package/dist/reference/stores/sqlite.js +464 -0
- package/dist/reference/stores/sqlite.js.map +1 -0
- package/dist/report/console.d.ts +33 -0
- package/dist/report/console.d.ts.map +1 -0
- package/dist/report/console.js +237 -0
- package/dist/report/console.js.map +1 -0
- package/dist/report/matrix.d.ts +131 -0
- package/dist/report/matrix.d.ts.map +1 -0
- package/dist/report/matrix.js +865 -0
- package/dist/report/matrix.js.map +1 -0
- package/dist/report/render.d.ts +66 -0
- package/dist/report/render.d.ts.map +1 -0
- package/dist/report/render.js +423 -0
- package/dist/report/render.js.map +1 -0
- package/dist/runtime/async.d.ts +34 -0
- package/dist/runtime/async.d.ts.map +1 -0
- package/dist/runtime/async.js +130 -0
- package/dist/runtime/async.js.map +1 -0
- package/dist/runtime/auth.d.ts +46 -0
- package/dist/runtime/auth.d.ts.map +1 -0
- package/dist/runtime/auth.js +236 -0
- package/dist/runtime/auth.js.map +1 -0
- package/dist/runtime/checks.d.ts +89 -0
- package/dist/runtime/checks.d.ts.map +1 -0
- package/dist/runtime/checks.js +3400 -0
- package/dist/runtime/checks.js.map +1 -0
- package/dist/runtime/client.d.ts +65 -0
- package/dist/runtime/client.d.ts.map +1 -0
- package/dist/runtime/client.js +122 -0
- package/dist/runtime/client.js.map +1 -0
- package/dist/runtime/finding.d.ts +50 -0
- package/dist/runtime/finding.d.ts.map +1 -0
- package/dist/runtime/finding.js +50 -0
- package/dist/runtime/finding.js.map +1 -0
- package/dist/runtime/fixture.d.ts +20 -0
- package/dist/runtime/fixture.d.ts.map +1 -0
- package/dist/runtime/fixture.js +175 -0
- package/dist/runtime/fixture.js.map +1 -0
- package/dist/runtime/progress.d.ts +41 -0
- package/dist/runtime/progress.d.ts.map +1 -0
- package/dist/runtime/progress.js +186 -0
- package/dist/runtime/progress.js.map +1 -0
- package/dist/runtime/run.d.ts +69 -0
- package/dist/runtime/run.d.ts.map +1 -0
- package/dist/runtime/run.js +575 -0
- package/dist/runtime/run.js.map +1 -0
- package/dist/runtime/teardown.d.ts +38 -0
- package/dist/runtime/teardown.d.ts.map +1 -0
- package/dist/runtime/teardown.js +129 -0
- package/dist/runtime/teardown.js.map +1 -0
- package/dist/runtime/validate.d.ts +31 -0
- package/dist/runtime/validate.d.ts.map +1 -0
- package/dist/runtime/validate.js +111 -0
- package/dist/runtime/validate.js.map +1 -0
- package/dist/runtime/world.d.ts +49 -0
- package/dist/runtime/world.d.ts.map +1 -0
- package/dist/runtime/world.js +119 -0
- package/dist/runtime/world.js.map +1 -0
- package/dist/spec/collection.d.ts +31 -0
- package/dist/spec/collection.d.ts.map +1 -0
- package/dist/spec/collection.js +121 -0
- package/dist/spec/collection.js.map +1 -0
- package/dist/spec/conventions.d.ts +103 -0
- package/dist/spec/conventions.d.ts.map +1 -0
- package/dist/spec/conventions.js +275 -0
- package/dist/spec/conventions.js.map +1 -0
- package/dist/spec/extensions.d.ts +74 -0
- package/dist/spec/extensions.d.ts.map +1 -0
- package/dist/spec/extensions.js +335 -0
- package/dist/spec/extensions.js.map +1 -0
- package/dist/spec/graph.d.ts +89 -0
- package/dist/spec/graph.d.ts.map +1 -0
- package/dist/spec/graph.js +318 -0
- package/dist/spec/graph.js.map +1 -0
- package/dist/spec/load.d.ts +36 -0
- package/dist/spec/load.d.ts.map +1 -0
- package/dist/spec/load.js +166 -0
- package/dist/spec/load.js.map +1 -0
- package/dist/spec/types.d.ts +57 -0
- package/dist/spec/types.d.ts.map +1 -0
- package/dist/spec/types.js +24 -0
- package/dist/spec/types.js.map +1 -0
- package/labs/README.md +130 -0
- package/labs/annotated-openapi.yaml +311 -0
- package/labs/anyrow.config.ts +107 -0
- package/labs/demo.mjs +124 -0
- package/labs/local.config.ts +41 -0
- package/labs/minimal.config.ts +32 -0
- package/package.json +80 -0
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Console renderers for the offline commands.
|
|
3
|
+
*
|
|
4
|
+
* `doctor` is the adoption surface: it reports what oat cannot test against this spec and names
|
|
5
|
+
* the meta tag that would close each gap. A backend team's path to full coverage is to run it
|
|
6
|
+
* and work the list down.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Which checks each tag makes possible, measured rather than estimated.
|
|
10
|
+
*
|
|
11
|
+
* `oat conformance` runs the reference backend twice — once with its tags, once with them
|
|
12
|
+
* stripped — and asserts this map matches the difference, so it cannot drift into marketing.
|
|
13
|
+
*
|
|
14
|
+
* The distinction below is the honest part. Some tags *unlock* checks that are otherwise
|
|
15
|
+
* impossible: nothing in a document reveals that a 202 is a receipt, or that a column is a
|
|
16
|
+
* tombstone. Others do not change how much runs at all — they change whether what runs is
|
|
17
|
+
* trustworthy. Without `x-query`, oat assumes every scalar property is filterable and probes
|
|
18
|
+
* fields the backend may never have indexed; without `x-tenant`, a cross-tenant read is reported
|
|
19
|
+
* as an ambiguity because oat only inferred the boundary it thinks was crossed.
|
|
20
|
+
*/
|
|
21
|
+
export const TAG_UNLOCKS = {
|
|
22
|
+
"x-async": ["async.reaches-terminal-state", "async.receipt-identifies-the-job"],
|
|
23
|
+
"x-effects": ["effects.declared-effect-occurs"],
|
|
24
|
+
"x-immutable": ["patch.immutable-field-rejected"],
|
|
25
|
+
"x-invalidate": ["invalidation.declared-route-changes"],
|
|
26
|
+
/* Declaring filterable fields is itself a claim, and a claim is testable: oat probes each
|
|
27
|
+
* one and reports the document — not the backend — when a declared filter is refused. */
|
|
28
|
+
"x-query": [
|
|
29
|
+
"spec.declared-filterable-is-filterable",
|
|
30
|
+
"spec.declared-sortable-is-sortable",
|
|
31
|
+
"spec.declared-selectable-is-selectable",
|
|
32
|
+
],
|
|
33
|
+
"x-soft-delete": ["softdelete.absent-from-default-list"],
|
|
34
|
+
"x-invite": ["auth.invite-grants-then-revokes"],
|
|
35
|
+
};
|
|
36
|
+
/** Tags that change the *confidence* of checks that already run, not the count. */
|
|
37
|
+
const TAG_SHARPENS = {
|
|
38
|
+
"x-query": "the remaining query checks run against every scalar property, including fields the "
|
|
39
|
+
+ "backend never indexed — expect findings you will have to dismiss",
|
|
40
|
+
"x-tenant": "a cross-tenant read is reported as an ambiguity, not a security finding, because "
|
|
41
|
+
+ "oat inferred the boundary rather than reading it",
|
|
42
|
+
};
|
|
43
|
+
const TAG_REMEDY = {
|
|
44
|
+
"x-async": "declare the poll route so the operation's real outcome can be observed",
|
|
45
|
+
"x-entity": "name the entity and action so this operation joins a lifecycle",
|
|
46
|
+
"x-entity.identity": "name the property identifying an instance",
|
|
47
|
+
"x-invalidate": "list the read routes this mutation must change",
|
|
48
|
+
"x-query": "declare which fields support the filter / order / search / select roles",
|
|
49
|
+
"x-tenant": "name the path parameter that scopes this operation to a tenant",
|
|
50
|
+
"x-invite": "name the invite, accept and revoke operations for delegated access",
|
|
51
|
+
};
|
|
52
|
+
function bar(value, total, width = 24) {
|
|
53
|
+
if (total === 0)
|
|
54
|
+
return "─".repeat(width);
|
|
55
|
+
const filled = Math.round((value / total) * width);
|
|
56
|
+
return "█".repeat(filled) + "░".repeat(width - filled);
|
|
57
|
+
}
|
|
58
|
+
function lifecycleGlyphs(entity) {
|
|
59
|
+
const slots = [
|
|
60
|
+
["C", entity.create],
|
|
61
|
+
["L", entity.list],
|
|
62
|
+
["R", entity.read],
|
|
63
|
+
["U", entity.update],
|
|
64
|
+
["D", entity.delete],
|
|
65
|
+
];
|
|
66
|
+
return slots.map(([letter, opId]) => (opId === undefined ? "·" : letter)).join("");
|
|
67
|
+
}
|
|
68
|
+
function plan(model, asJson) {
|
|
69
|
+
if (asJson) {
|
|
70
|
+
return `${JSON.stringify({
|
|
71
|
+
entities: [...model.entities.values()],
|
|
72
|
+
operations: model.operations,
|
|
73
|
+
roots: model.roots,
|
|
74
|
+
}, null, 2)}\n`;
|
|
75
|
+
}
|
|
76
|
+
const lines = [];
|
|
77
|
+
const entities = [...model.entities.values()].sort((a, b) => a.name.localeCompare(b.name));
|
|
78
|
+
lines.push("");
|
|
79
|
+
lines.push(` ${model.operations.length} operations · ${entities.length} entities`);
|
|
80
|
+
lines.push("");
|
|
81
|
+
lines.push(" entity CLRUD ident read surface");
|
|
82
|
+
lines.push(" ─────────────────────────────────────────────────────────────────────");
|
|
83
|
+
for (const entity of entities) {
|
|
84
|
+
const surface = entity.readSurface.length === 0
|
|
85
|
+
? "— none"
|
|
86
|
+
: `${entity.readSurface.length} route(s)${entity.declaredSurface.length > 0 ? " (declared)" : " (inferred)"}`;
|
|
87
|
+
lines.push(` ${entity.name.padEnd(18)} ${lifecycleGlyphs(entity)} ${(entity.identity ?? "—").padEnd(9)} ${surface}`);
|
|
88
|
+
for (const route of entity.readSurface)
|
|
89
|
+
lines.push(` ${"".padEnd(38)}${route}`);
|
|
90
|
+
}
|
|
91
|
+
if (model.roots.length > 0) {
|
|
92
|
+
lines.push("");
|
|
93
|
+
lines.push(" roots — no create operation, must be supplied before a run:");
|
|
94
|
+
for (const root of model.roots)
|
|
95
|
+
lines.push(` ${root}`);
|
|
96
|
+
}
|
|
97
|
+
lines.push("");
|
|
98
|
+
return lines.join("\n");
|
|
99
|
+
}
|
|
100
|
+
function doctor(model, externalRefs, asJson) {
|
|
101
|
+
const entities = [...model.entities.values()].sort((a, b) => a.name.localeCompare(b.name));
|
|
102
|
+
const trackable = entities.filter((e) => e.trackable && e.readSurface.length > 0);
|
|
103
|
+
const listable = trackable.filter((e) => e.list !== undefined);
|
|
104
|
+
const byTag = new Map();
|
|
105
|
+
for (const gap of model.gaps.gaps) {
|
|
106
|
+
const list = byTag.get(gap.tag) ?? [];
|
|
107
|
+
list.push(gap);
|
|
108
|
+
byTag.set(gap.tag, list);
|
|
109
|
+
}
|
|
110
|
+
const blocking = entities.length - trackable.length + (model.roots.length > 0 ? 1 : 0);
|
|
111
|
+
if (asJson) {
|
|
112
|
+
return {
|
|
113
|
+
blocking,
|
|
114
|
+
text: `${JSON.stringify({
|
|
115
|
+
blocking,
|
|
116
|
+
entities: entities.length,
|
|
117
|
+
externalRefs,
|
|
118
|
+
gaps: model.gaps.gaps,
|
|
119
|
+
listableEntities: listable.length,
|
|
120
|
+
roots: model.roots,
|
|
121
|
+
testableEntities: trackable.length,
|
|
122
|
+
trackableEntities: trackable.length,
|
|
123
|
+
}, null, 2)}\n`,
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
const lines = [];
|
|
127
|
+
lines.push("");
|
|
128
|
+
lines.push(` trackable ${bar(trackable.length, entities.length)} ${trackable.length}/${entities.length} ` +
|
|
129
|
+
"entities have an identity and a read");
|
|
130
|
+
lines.push(` listable ${bar(listable.length, entities.length)} ${listable.length}/${entities.length} ` +
|
|
131
|
+
(listable.length === 0
|
|
132
|
+
? "entities have a list — query checks will not run"
|
|
133
|
+
: "entities have a list, so query checks can run"));
|
|
134
|
+
lines.push("");
|
|
135
|
+
/*
|
|
136
|
+
* What the missing tags cost, in checks. A gap list tells an author what oat could not read;
|
|
137
|
+
* this tells them what they get for fixing it, which is the only form of the message anyone
|
|
138
|
+
* acts on.
|
|
139
|
+
*/
|
|
140
|
+
const declared = new Set(model.operations.flatMap((op) => [
|
|
141
|
+
...(op.async === null ? [] : ["x-async"]),
|
|
142
|
+
...(op.effects.length > 0 ? ["x-effects"] : []),
|
|
143
|
+
...(op.immutable.length > 0 ? ["x-immutable"] : []),
|
|
144
|
+
...(op.invalidates.length > 0 ? ["x-invalidate"] : []),
|
|
145
|
+
...(op.softDelete === null ? [] : ["x-soft-delete"]),
|
|
146
|
+
...(op.tenantSource === "tag" ? ["x-tenant"] : []),
|
|
147
|
+
...(op.query?.source === "tag" ? ["x-query"] : []),
|
|
148
|
+
]));
|
|
149
|
+
for (const entity of entities) {
|
|
150
|
+
if (entity.invite !== null)
|
|
151
|
+
declared.add("x-invite");
|
|
152
|
+
}
|
|
153
|
+
const lockedTags = Object.keys(TAG_UNLOCKS).filter((tag) => !declared.has(tag));
|
|
154
|
+
const lockedChecks = lockedTags.flatMap((tag) => TAG_UNLOCKS[tag] ?? []);
|
|
155
|
+
if (lockedChecks.length > 0) {
|
|
156
|
+
lines.push(` ${lockedChecks.length} check(s) cannot run against this document`);
|
|
157
|
+
for (const tag of lockedTags) {
|
|
158
|
+
lines.push(` ${tag.padEnd(16)} would enable ${(TAG_UNLOCKS[tag] ?? []).join(", ")}`);
|
|
159
|
+
}
|
|
160
|
+
lines.push("");
|
|
161
|
+
}
|
|
162
|
+
const inferredTenant = model.operations.some((op) => op.tenantSource !== null);
|
|
163
|
+
const vague = Object.keys(TAG_SHARPENS).filter((tag) => {
|
|
164
|
+
if (declared.has(tag))
|
|
165
|
+
return false;
|
|
166
|
+
if (tag === "x-query")
|
|
167
|
+
return listable.length > 0;
|
|
168
|
+
if (tag === "x-tenant")
|
|
169
|
+
return inferredTenant;
|
|
170
|
+
return true;
|
|
171
|
+
});
|
|
172
|
+
if (vague.length > 0) {
|
|
173
|
+
lines.push(" running, but on inferred information");
|
|
174
|
+
for (const tag of vague) {
|
|
175
|
+
lines.push(` ${tag.padEnd(16)} ${TAG_SHARPENS[tag] ?? ""}`);
|
|
176
|
+
}
|
|
177
|
+
lines.push("");
|
|
178
|
+
}
|
|
179
|
+
const untrackable = entities.filter((e) => !trackable.includes(e));
|
|
180
|
+
if (untrackable.length > 0) {
|
|
181
|
+
lines.push(" not trackable");
|
|
182
|
+
for (const entity of untrackable) {
|
|
183
|
+
const reason = entity.identity === null
|
|
184
|
+
? "no identity property — instances cannot be tracked across projections"
|
|
185
|
+
: "no read surface — mutations cannot be verified";
|
|
186
|
+
lines.push(` ${entity.name.padEnd(20)} ${reason}`);
|
|
187
|
+
}
|
|
188
|
+
lines.push("");
|
|
189
|
+
}
|
|
190
|
+
const itemOnly = trackable.filter((e) => e.list === undefined);
|
|
191
|
+
if (itemOnly.length > 0) {
|
|
192
|
+
lines.push(" no list — query, pagination and count checks will not run");
|
|
193
|
+
for (const entity of itemOnly) {
|
|
194
|
+
const route = entity.read ?? entity.readSurface[0] ?? "item route only";
|
|
195
|
+
lines.push(` ${entity.name.padEnd(20)} ${route}`);
|
|
196
|
+
}
|
|
197
|
+
lines.push("");
|
|
198
|
+
}
|
|
199
|
+
if (model.roots.length > 0) {
|
|
200
|
+
lines.push(" roots required in config (no create operation in this document)");
|
|
201
|
+
for (const root of model.roots)
|
|
202
|
+
lines.push(` ${root}`);
|
|
203
|
+
lines.push("");
|
|
204
|
+
}
|
|
205
|
+
if (!model.hasAuthOperations && model.securitySchemes.length > 0) {
|
|
206
|
+
lines.push(" auth");
|
|
207
|
+
lines.push(` document declares ${model.securitySchemes.map((s) => `"${s}"`).join(", ")} but contains no`);
|
|
208
|
+
lines.push(" operation for obtaining a credential. No generic client can bootstrap from");
|
|
209
|
+
lines.push(" this spec. Add the auth operations, or declare x-auth-flows at document root.");
|
|
210
|
+
lines.push("");
|
|
211
|
+
}
|
|
212
|
+
if (externalRefs.length > 0) {
|
|
213
|
+
lines.push(" unresolved external $refs (not fetched — a test tool should not follow arbitrary URLs)");
|
|
214
|
+
for (const ref of externalRefs)
|
|
215
|
+
lines.push(` ${ref}`);
|
|
216
|
+
lines.push("");
|
|
217
|
+
}
|
|
218
|
+
if (byTag.size > 0) {
|
|
219
|
+
lines.push(" gaps by tag");
|
|
220
|
+
const sorted = [...byTag.entries()].sort((a, b) => b[1].length - a[1].length);
|
|
221
|
+
for (const [tag, gapList] of sorted) {
|
|
222
|
+
const remedy = TAG_REMEDY[tag] ?? "see the README";
|
|
223
|
+
lines.push(` ${tag} (${gapList.length}) — ${remedy}`);
|
|
224
|
+
for (const gap of gapList.slice(0, 4)) {
|
|
225
|
+
lines.push(` ${gap.operationId}: ${gap.detail}`);
|
|
226
|
+
}
|
|
227
|
+
if (gapList.length > 4)
|
|
228
|
+
lines.push(` … and ${gapList.length - 4} more`);
|
|
229
|
+
}
|
|
230
|
+
lines.push("");
|
|
231
|
+
}
|
|
232
|
+
if (blocking === 0 && byTag.size === 0)
|
|
233
|
+
lines.push(" no gaps — full coverage available\n");
|
|
234
|
+
return { blocking, text: lines.join("\n") };
|
|
235
|
+
}
|
|
236
|
+
export const report = { doctor, plan };
|
|
237
|
+
//# sourceMappingURL=console.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"console.js","sourceRoot":"","sources":["../../src/report/console.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,WAAW,GAAsC;IAC7D,SAAS,EAAE,CAAC,8BAA8B,EAAE,kCAAkC,CAAC;IAC/E,WAAW,EAAE,CAAC,gCAAgC,CAAC;IAC/C,aAAa,EAAE,CAAC,gCAAgC,CAAC;IACjD,cAAc,EAAE,CAAC,qCAAqC,CAAC;IACvD;6FACyF;IACzF,SAAS,EAAE;QACV,wCAAwC;QACxC,oCAAoC;QACpC,wCAAwC;KACxC;IACD,eAAe,EAAE,CAAC,qCAAqC,CAAC;IACxD,UAAU,EAAE,CAAC,iCAAiC,CAAC;CAC/C,CAAA;AAED,mFAAmF;AACnF,MAAM,YAAY,GAA2B;IAC5C,SAAS,EAAE,qFAAqF;UAC7F,kEAAkE;IACrE,UAAU,EAAE,mFAAmF;UAC5F,kDAAkD;CACrD,CAAA;AAED,MAAM,UAAU,GAA2B;IAC1C,SAAS,EAAE,wEAAwE;IACnF,UAAU,EAAE,gEAAgE;IAC5E,mBAAmB,EAAE,2CAA2C;IAChE,cAAc,EAAE,gDAAgD;IAChE,SAAS,EAAE,yEAAyE;IACpF,UAAU,EAAE,gEAAgE;IAC5E,UAAU,EAAE,oEAAo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AM,EAAE,IAAI,EAAE,CAAA"}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Poster + machine graph of how oat crossed the entities in a run.
|
|
3
|
+
*
|
|
4
|
+
* One entity is a loom: warp windows on one cohort, weft cells woven only if the warp holds.
|
|
5
|
+
* Several entities add a second graph on top — `x-invalidate` edges from a writer to another
|
|
6
|
+
* entity's read surface. That is the claim `invalidation.declared-route-changes` actually tests.
|
|
7
|
+
*/
|
|
8
|
+
import type { ReportInput } from "./render.ts";
|
|
9
|
+
export type CellStatus = "held" | "failed" | "blocked" | "skipped";
|
|
10
|
+
export type MatrixLayer = "warp" | "weft" | "surface" | "auth" | "schema" | "spec";
|
|
11
|
+
export interface MatrixView {
|
|
12
|
+
entity: string;
|
|
13
|
+
baseUrl: string;
|
|
14
|
+
generatedAt: string;
|
|
15
|
+
readSurface: string[];
|
|
16
|
+
failed: number;
|
|
17
|
+
blocked: number;
|
|
18
|
+
held: number;
|
|
19
|
+
skipped: number;
|
|
20
|
+
nodes: MatrixNode[];
|
|
21
|
+
}
|
|
22
|
+
export interface MatrixNode {
|
|
23
|
+
id: string;
|
|
24
|
+
label: string;
|
|
25
|
+
hint: string;
|
|
26
|
+
status: CellStatus;
|
|
27
|
+
because?: string;
|
|
28
|
+
}
|
|
29
|
+
export interface MatrixGraphNode {
|
|
30
|
+
id: string;
|
|
31
|
+
group: string;
|
|
32
|
+
layer: MatrixLayer;
|
|
33
|
+
status: CellStatus;
|
|
34
|
+
needs?: string;
|
|
35
|
+
because?: string;
|
|
36
|
+
summary?: string;
|
|
37
|
+
verdict?: string;
|
|
38
|
+
}
|
|
39
|
+
export interface MatrixGraphEdge {
|
|
40
|
+
from: string;
|
|
41
|
+
to: string;
|
|
42
|
+
/** `dependsOn`: if `from` failed, `to` is blocked. `uses`: weft cell woven from this warp. */
|
|
43
|
+
kind: "dependsOn" | "uses";
|
|
44
|
+
}
|
|
45
|
+
export interface InvalidateLink {
|
|
46
|
+
fromEntity: string;
|
|
47
|
+
fromOp: string;
|
|
48
|
+
toEntity: string;
|
|
49
|
+
toRoute: string;
|
|
50
|
+
/** True when the declared route belongs to a *different* entity — the case the check probes. */
|
|
51
|
+
cross: boolean;
|
|
52
|
+
}
|
|
53
|
+
export interface EntityMatrix {
|
|
54
|
+
name: string;
|
|
55
|
+
identity: string | null;
|
|
56
|
+
readSurface: string[];
|
|
57
|
+
counts: {
|
|
58
|
+
failed: number;
|
|
59
|
+
blocked: number;
|
|
60
|
+
held: number;
|
|
61
|
+
skipped: number;
|
|
62
|
+
};
|
|
63
|
+
roots: string[];
|
|
64
|
+
nodes: MatrixGraphNode[];
|
|
65
|
+
}
|
|
66
|
+
export interface MatrixGraph {
|
|
67
|
+
kind: "oat.matrix";
|
|
68
|
+
version: 2;
|
|
69
|
+
read: {
|
|
70
|
+
purpose: string;
|
|
71
|
+
status: Record<CellStatus, string>;
|
|
72
|
+
edges: Record<MatrixGraphEdge["kind"] | "invalidate", string>;
|
|
73
|
+
};
|
|
74
|
+
baseUrl: string;
|
|
75
|
+
generatedAt: string;
|
|
76
|
+
thesis: string;
|
|
77
|
+
summary: string;
|
|
78
|
+
index: {
|
|
79
|
+
entityCount: number;
|
|
80
|
+
failed: string[];
|
|
81
|
+
parents: string[];
|
|
82
|
+
crossClaims: number;
|
|
83
|
+
inbound: Record<string, number>;
|
|
84
|
+
};
|
|
85
|
+
counts: {
|
|
86
|
+
failed: number;
|
|
87
|
+
blocked: number;
|
|
88
|
+
held: number;
|
|
89
|
+
skipped: number;
|
|
90
|
+
};
|
|
91
|
+
entities: EntityMatrix[];
|
|
92
|
+
invalidate: InvalidateLink[];
|
|
93
|
+
edges: MatrixGraphEdge[];
|
|
94
|
+
mermaid: string;
|
|
95
|
+
}
|
|
96
|
+
type MatrixParts = {
|
|
97
|
+
entity: string;
|
|
98
|
+
baseUrl: string;
|
|
99
|
+
generatedAt: string;
|
|
100
|
+
readSurface: string[];
|
|
101
|
+
checksRun: readonly string[];
|
|
102
|
+
checksSkipped: ReadonlyArray<{
|
|
103
|
+
check: string;
|
|
104
|
+
entity?: string;
|
|
105
|
+
needs: string;
|
|
106
|
+
}>;
|
|
107
|
+
checksSuppressed: ReadonlyArray<{
|
|
108
|
+
check: string;
|
|
109
|
+
entity?: string;
|
|
110
|
+
because: string;
|
|
111
|
+
}>;
|
|
112
|
+
findings: ReadonlyArray<{
|
|
113
|
+
check: string;
|
|
114
|
+
entity?: string;
|
|
115
|
+
verdict: string;
|
|
116
|
+
summary: string;
|
|
117
|
+
detail?: string;
|
|
118
|
+
}>;
|
|
119
|
+
};
|
|
120
|
+
export declare function matrixViewFromReport(input: ReportInput): MatrixView;
|
|
121
|
+
export declare function matrixViewFromParts(parts: MatrixParts): MatrixView;
|
|
122
|
+
export declare function renderMatrixFromParts(parts: MatrixParts): string;
|
|
123
|
+
export declare function renderMatrixHtml(input: ReportInput): string;
|
|
124
|
+
export declare function renderMatrixGraph(input: ReportInput): string;
|
|
125
|
+
export declare function renderMatrixGraphFromParts(parts: MatrixParts): string;
|
|
126
|
+
export declare function buildMatrixGraphFromReport(input: ReportInput): MatrixGraph;
|
|
127
|
+
export declare function buildMatrixGraph(parts: MatrixParts): MatrixGraph;
|
|
128
|
+
/** Drop per-check nodes for clean entities so a 2k-entity graph stays loadable. */
|
|
129
|
+
export declare function compactMatrixGraph(graph: MatrixGraph): MatrixGraph;
|
|
130
|
+
export {};
|
|
131
|
+
//# sourceMappingURL=matrix.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"matrix.d.ts","sourceRoot":"","sources":["../../src/report/matrix.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAE9C,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,CAAA;AAClE,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,MAAM,GAAG,SAA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