@lovrozagar/oat 0.9.1 → 0.11.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.
Files changed (283) hide show
  1. package/README.md +26 -1936
  2. package/dist/cli.js +326 -60
  3. package/dist/config/define-config.d.ts +15 -1
  4. package/dist/config/define-config.d.ts.map +1 -1
  5. package/dist/config/define-config.js.map +1 -1
  6. package/dist/config/validate.d.ts +12 -0
  7. package/dist/config/validate.d.ts.map +1 -0
  8. package/dist/config/validate.js +86 -0
  9. package/dist/config/validate.js.map +1 -0
  10. package/dist/conformance/effects.d.ts +9 -0
  11. package/dist/conformance/effects.d.ts.map +1 -0
  12. package/dist/conformance/effects.js +276 -0
  13. package/dist/conformance/effects.js.map +1 -0
  14. package/dist/conformance/expected-failures.d.ts +18 -0
  15. package/dist/conformance/expected-failures.d.ts.map +1 -0
  16. package/dist/conformance/expected-failures.js +48 -0
  17. package/dist/conformance/expected-failures.js.map +1 -0
  18. package/dist/conformance/feature-gate.d.ts +7 -0
  19. package/dist/conformance/feature-gate.d.ts.map +1 -0
  20. package/dist/conformance/feature-gate.js +428 -0
  21. package/dist/conformance/feature-gate.js.map +1 -0
  22. package/dist/conformance/fuzz.d.ts +108 -0
  23. package/dist/conformance/fuzz.d.ts.map +1 -0
  24. package/dist/conformance/fuzz.js +246 -0
  25. package/dist/conformance/fuzz.js.map +1 -0
  26. package/dist/conformance/leaks.d.ts +10 -0
  27. package/dist/conformance/leaks.d.ts.map +1 -0
  28. package/dist/conformance/leaks.js +23 -0
  29. package/dist/conformance/leaks.js.map +1 -0
  30. package/dist/conformance/pool.d.ts +49 -0
  31. package/dist/conformance/pool.d.ts.map +1 -0
  32. package/dist/conformance/pool.js +75 -0
  33. package/dist/conformance/pool.js.map +1 -0
  34. package/dist/conformance/rate-limit.d.ts +7 -0
  35. package/dist/conformance/rate-limit.d.ts.map +1 -0
  36. package/dist/conformance/rate-limit.js +372 -0
  37. package/dist/conformance/rate-limit.js.map +1 -0
  38. package/dist/conformance/scope.d.ts +15 -0
  39. package/dist/conformance/scope.d.ts.map +1 -0
  40. package/dist/conformance/scope.js +78 -0
  41. package/dist/conformance/scope.js.map +1 -0
  42. package/dist/conformance/seed-contract.d.ts +11 -0
  43. package/dist/conformance/seed-contract.d.ts.map +1 -0
  44. package/dist/conformance/seed-contract.js +680 -0
  45. package/dist/conformance/seed-contract.js.map +1 -0
  46. package/dist/conformance/shapes.d.ts +35 -0
  47. package/dist/conformance/shapes.d.ts.map +1 -0
  48. package/dist/conformance/shapes.js +162 -0
  49. package/dist/conformance/shapes.js.map +1 -0
  50. package/dist/conformance/specs.d.ts +21 -0
  51. package/dist/conformance/specs.d.ts.map +1 -0
  52. package/dist/conformance/specs.js +306 -0
  53. package/dist/conformance/specs.js.map +1 -0
  54. package/dist/conformance/suite.d.ts +209 -0
  55. package/dist/conformance/suite.d.ts.map +1 -0
  56. package/dist/conformance/suite.js +1538 -0
  57. package/dist/conformance/suite.js.map +1 -0
  58. package/dist/conformance/unique.d.ts +7 -0
  59. package/dist/conformance/unique.d.ts.map +1 -0
  60. package/dist/conformance/unique.js +586 -0
  61. package/dist/conformance/unique.js.map +1 -0
  62. package/dist/conformance/worker.d.ts +3 -0
  63. package/dist/conformance/worker.d.ts.map +1 -0
  64. package/dist/conformance/worker.js +27 -0
  65. package/dist/conformance/worker.js.map +1 -0
  66. package/dist/index.d.ts +10 -3
  67. package/dist/index.js +6 -2
  68. package/dist/reference/defects.d.ts +71 -1
  69. package/dist/reference/defects.d.ts.map +1 -1
  70. package/dist/reference/defects.js +74 -8
  71. package/dist/reference/defects.js.map +1 -1
  72. package/dist/reference/dialect.d.ts +6 -4
  73. package/dist/reference/dialect.d.ts.map +1 -1
  74. package/dist/reference/dialect.js +1 -0
  75. package/dist/reference/dialect.js.map +1 -1
  76. package/dist/reference/http.d.ts +17 -25
  77. package/dist/reference/http.d.ts.map +1 -1
  78. package/dist/reference/http.js +574 -224
  79. package/dist/reference/http.js.map +1 -1
  80. package/dist/reference/listing.d.ts +51 -0
  81. package/dist/reference/listing.d.ts.map +1 -0
  82. package/dist/reference/listing.js +256 -0
  83. package/dist/reference/listing.js.map +1 -0
  84. package/dist/reference/model.d.ts +35 -1
  85. package/dist/reference/model.d.ts.map +1 -1
  86. package/dist/reference/model.js +42 -0
  87. package/dist/reference/model.js.map +1 -1
  88. package/dist/reference/query.d.ts +132 -43
  89. package/dist/reference/query.d.ts.map +1 -1
  90. package/dist/reference/query.js +397 -315
  91. package/dist/reference/query.js.map +1 -1
  92. package/dist/reference/shapes.d.ts +60 -0
  93. package/dist/reference/shapes.d.ts.map +1 -0
  94. package/dist/reference/shapes.js +142 -0
  95. package/dist/reference/shapes.js.map +1 -0
  96. package/dist/reference/spec.d.ts +9 -2
  97. package/dist/reference/spec.d.ts.map +1 -1
  98. package/dist/reference/spec.js +291 -71
  99. package/dist/reference/spec.js.map +1 -1
  100. package/dist/reference/store-api.d.ts +14 -43
  101. package/dist/reference/store-api.d.ts.map +1 -1
  102. package/dist/reference/store-api.js +8 -58
  103. package/dist/reference/store-api.js.map +1 -1
  104. package/dist/reference/stores/memory.d.ts +12 -15
  105. package/dist/reference/stores/memory.d.ts.map +1 -1
  106. package/dist/reference/stores/memory.js +22 -70
  107. package/dist/reference/stores/memory.js.map +1 -1
  108. package/dist/reference/stores/postgres.d.ts +11 -23
  109. package/dist/reference/stores/postgres.d.ts.map +1 -1
  110. package/dist/reference/stores/postgres.js +53 -334
  111. package/dist/reference/stores/postgres.js.map +1 -1
  112. package/dist/reference/stores/sql-compile.d.ts +36 -0
  113. package/dist/reference/stores/sql-compile.d.ts.map +1 -0
  114. package/dist/reference/stores/sql-compile.js +95 -0
  115. package/dist/reference/stores/sql-compile.js.map +1 -0
  116. package/dist/reference/stores/sqlite.d.ts +12 -27
  117. package/dist/reference/stores/sqlite.d.ts.map +1 -1
  118. package/dist/reference/stores/sqlite.js +54 -355
  119. package/dist/reference/stores/sqlite.js.map +1 -1
  120. package/dist/report/console.d.ts +2 -1
  121. package/dist/report/console.d.ts.map +1 -1
  122. package/dist/report/console.js +56 -10
  123. package/dist/report/console.js.map +1 -1
  124. package/dist/report/matrix.d.ts +10 -13
  125. package/dist/report/matrix.d.ts.map +1 -1
  126. package/dist/report/matrix.js +82 -18
  127. package/dist/report/matrix.js.map +1 -1
  128. package/dist/report/render.d.ts +18 -1
  129. package/dist/report/render.d.ts.map +1 -1
  130. package/dist/report/render.js +169 -14
  131. package/dist/report/render.js.map +1 -1
  132. package/dist/runtime/async.d.ts +16 -3
  133. package/dist/runtime/async.d.ts.map +1 -1
  134. package/dist/runtime/async.js +24 -19
  135. package/dist/runtime/async.js.map +1 -1
  136. package/dist/runtime/auth.d.ts +2 -9
  137. package/dist/runtime/auth.d.ts.map +1 -1
  138. package/dist/runtime/auth.js +38 -62
  139. package/dist/runtime/auth.js.map +1 -1
  140. package/dist/runtime/body.d.ts +15 -3
  141. package/dist/runtime/body.d.ts.map +1 -1
  142. package/dist/runtime/body.js +61 -12
  143. package/dist/runtime/body.js.map +1 -1
  144. package/dist/runtime/check-costs.d.ts +15 -0
  145. package/dist/runtime/check-costs.d.ts.map +1 -0
  146. package/dist/runtime/check-costs.js +114 -0
  147. package/dist/runtime/check-costs.js.map +1 -0
  148. package/dist/runtime/check-ids.d.ts +15 -0
  149. package/dist/runtime/check-ids.d.ts.map +1 -0
  150. package/dist/runtime/check-ids.js +140 -0
  151. package/dist/runtime/check-ids.js.map +1 -0
  152. package/dist/runtime/checks.d.ts +122 -18
  153. package/dist/runtime/checks.d.ts.map +1 -1
  154. package/dist/runtime/checks.js +3437 -1933
  155. package/dist/runtime/checks.js.map +1 -1
  156. package/dist/runtime/client.d.ts +112 -0
  157. package/dist/runtime/client.d.ts.map +1 -1
  158. package/dist/runtime/client.js +271 -39
  159. package/dist/runtime/client.js.map +1 -1
  160. package/dist/runtime/cookies.d.ts +16 -2
  161. package/dist/runtime/cookies.d.ts.map +1 -1
  162. package/dist/runtime/cookies.js +83 -22
  163. package/dist/runtime/cookies.js.map +1 -1
  164. package/dist/runtime/exchanges.d.ts +4 -5
  165. package/dist/runtime/exchanges.d.ts.map +1 -1
  166. package/dist/runtime/exchanges.js +33 -55
  167. package/dist/runtime/exchanges.js.map +1 -1
  168. package/dist/runtime/exit.d.ts +40 -0
  169. package/dist/runtime/exit.d.ts.map +1 -0
  170. package/dist/runtime/exit.js +48 -0
  171. package/dist/runtime/exit.js.map +1 -0
  172. package/dist/runtime/feature-gate.d.ts +0 -9
  173. package/dist/runtime/feature-gate.d.ts.map +1 -1
  174. package/dist/runtime/feature-gate.js +0 -21
  175. package/dist/runtime/feature-gate.js.map +1 -1
  176. package/dist/runtime/finding.d.ts +61 -7
  177. package/dist/runtime/finding.d.ts.map +1 -1
  178. package/dist/runtime/finding.js +74 -12
  179. package/dist/runtime/finding.js.map +1 -1
  180. package/dist/runtime/fixture.d.ts +35 -28
  181. package/dist/runtime/fixture.d.ts.map +1 -1
  182. package/dist/runtime/fixture.js +92 -731
  183. package/dist/runtime/fixture.js.map +1 -1
  184. package/dist/runtime/generate.d.ts +63 -0
  185. package/dist/runtime/generate.d.ts.map +1 -0
  186. package/dist/runtime/generate.js +635 -0
  187. package/dist/runtime/generate.js.map +1 -0
  188. package/dist/runtime/headers.d.ts +6 -0
  189. package/dist/runtime/headers.d.ts.map +1 -0
  190. package/dist/runtime/headers.js +16 -0
  191. package/dist/runtime/headers.js.map +1 -0
  192. package/dist/runtime/path.d.ts +7 -0
  193. package/dist/runtime/path.d.ts.map +1 -0
  194. package/dist/runtime/path.js +44 -0
  195. package/dist/runtime/path.js.map +1 -0
  196. package/dist/runtime/payloads.d.ts +2 -0
  197. package/dist/runtime/payloads.d.ts.map +1 -1
  198. package/dist/runtime/payloads.js +2 -1
  199. package/dist/runtime/payloads.js.map +1 -1
  200. package/dist/runtime/rate-limit.d.ts +6 -4
  201. package/dist/runtime/rate-limit.d.ts.map +1 -1
  202. package/dist/runtime/rate-limit.js +22 -33
  203. package/dist/runtime/rate-limit.js.map +1 -1
  204. package/dist/runtime/redact.d.ts +24 -0
  205. package/dist/runtime/redact.d.ts.map +1 -0
  206. package/dist/runtime/redact.js +98 -0
  207. package/dist/runtime/redact.js.map +1 -0
  208. package/dist/runtime/run.d.ts +51 -2
  209. package/dist/runtime/run.d.ts.map +1 -1
  210. package/dist/runtime/run.js +463 -195
  211. package/dist/runtime/run.js.map +1 -1
  212. package/dist/runtime/runs.d.ts +5 -0
  213. package/dist/runtime/runs.d.ts.map +1 -1
  214. package/dist/runtime/runs.js +7 -1
  215. package/dist/runtime/runs.js.map +1 -1
  216. package/dist/runtime/scope.d.ts +163 -0
  217. package/dist/runtime/scope.d.ts.map +1 -0
  218. package/dist/runtime/scope.js +423 -0
  219. package/dist/runtime/scope.js.map +1 -0
  220. package/dist/runtime/teardown.d.ts +17 -4
  221. package/dist/runtime/teardown.d.ts.map +1 -1
  222. package/dist/runtime/teardown.js +49 -16
  223. package/dist/runtime/teardown.js.map +1 -1
  224. package/dist/runtime/transcript.d.ts +34 -2
  225. package/dist/runtime/transcript.d.ts.map +1 -1
  226. package/dist/runtime/transcript.js +119 -24
  227. package/dist/runtime/transcript.js.map +1 -1
  228. package/dist/runtime/unique.d.ts +2 -11
  229. package/dist/runtime/unique.d.ts.map +1 -1
  230. package/dist/runtime/unique.js +27 -53
  231. package/dist/runtime/unique.js.map +1 -1
  232. package/dist/runtime/validate.d.ts +13 -2
  233. package/dist/runtime/validate.d.ts.map +1 -1
  234. package/dist/runtime/validate.js +51 -31
  235. package/dist/runtime/validate.js.map +1 -1
  236. package/dist/runtime/wait.d.ts +2 -1
  237. package/dist/runtime/wait.d.ts.map +1 -1
  238. package/dist/runtime/wait.js +2 -36
  239. package/dist/runtime/wait.js.map +1 -1
  240. package/dist/runtime/world.d.ts +31 -3
  241. package/dist/runtime/world.d.ts.map +1 -1
  242. package/dist/runtime/world.js +113 -32
  243. package/dist/runtime/world.js.map +1 -1
  244. package/dist/spec/collection.d.ts +8 -2
  245. package/dist/spec/collection.d.ts.map +1 -1
  246. package/dist/spec/collection.js +47 -7
  247. package/dist/spec/collection.js.map +1 -1
  248. package/dist/spec/extensions.d.ts +5 -1
  249. package/dist/spec/extensions.d.ts.map +1 -1
  250. package/dist/spec/extensions.js +9 -2
  251. package/dist/spec/extensions.js.map +1 -1
  252. package/dist/spec/graph.d.ts +46 -0
  253. package/dist/spec/graph.d.ts.map +1 -1
  254. package/dist/spec/graph.js +175 -11
  255. package/dist/spec/graph.js.map +1 -1
  256. package/dist/spec/load.d.ts +25 -5
  257. package/dist/spec/load.d.ts.map +1 -1
  258. package/dist/spec/load.js +160 -59
  259. package/dist/spec/load.js.map +1 -1
  260. package/dist/spec/query-capabilities.d.ts +4 -0
  261. package/dist/spec/query-capabilities.d.ts.map +1 -1
  262. package/dist/spec/query-capabilities.js +6 -0
  263. package/dist/spec/query-capabilities.js.map +1 -1
  264. package/dist/spec/schema.d.ts +20 -0
  265. package/dist/spec/schema.d.ts.map +1 -0
  266. package/dist/spec/schema.js +118 -0
  267. package/dist/spec/schema.js.map +1 -0
  268. package/dist/spec/tag-schema.d.ts +12 -0
  269. package/dist/spec/tag-schema.d.ts.map +1 -0
  270. package/dist/spec/tag-schema.js +143 -0
  271. package/dist/spec/tag-schema.js.map +1 -0
  272. package/dist/spec/types.js +17 -1
  273. package/dist/spec/types.js.map +1 -1
  274. package/docs/api.md +59 -0
  275. package/docs/assumptions.md +99 -0
  276. package/docs/checks.md +183 -0
  277. package/docs/commands.md +214 -0
  278. package/docs/configuration.md +650 -0
  279. package/docs/model.md +184 -0
  280. package/docs/reference-defects.md +94 -0
  281. package/docs/reports.md +211 -0
  282. package/docs/tags.md +400 -0
  283. package/package.json +3 -1
@@ -0,0 +1,209 @@
1
+ /**
2
+ * Conformance suite: the measurement loop.
3
+ *
4
+ * For each injected defect, assert oat reports exactly the check that defect should trip — and
5
+ * for the clean baseline, assert it reports nothing at all. The baseline is the harder bar: a
6
+ * tool that cries wolf on a correct backend is worse than no tool.
7
+ *
8
+ * Adding a check to oat means adding a defect here and expecting it. That keeps "smart" honest.
9
+ */
10
+ import { type DefectName } from "../reference/defects.ts";
11
+ import type { Finding } from "../runtime/finding.ts";
12
+ import { type PrincipalSpec } from "../runtime/run.ts";
13
+ export interface ParserResult {
14
+ name: string;
15
+ why: string;
16
+ ok: boolean;
17
+ detail: string;
18
+ }
19
+ /**
20
+ * Parser robustness. These fixtures are shapes real published documents contain; the bar is that
21
+ * oat never throws and never hangs on them, not that it models them well.
22
+ */
23
+ export { runSeedContractSuite } from "./seed-contract.ts";
24
+ export { runEffectsSuite } from "./effects.ts";
25
+ export declare function runParserSuite(): ParserResult[];
26
+ /**
27
+ * The annotated example document must resolve to what its comments claim.
28
+ *
29
+ * `labs/annotated-openapi.yaml` is the only place that shows a reader where each tag goes in a
30
+ * real document, and documentation that drifts from the implementation is worse than none — it
31
+ * teaches a shape that no longer works. Asserting the derived model here means the example cannot
32
+ * rot: rename a tag or change how a role resolves, and this fails.
33
+ *
34
+ * It also proved its worth immediately. The first version was invalid YAML (`{workspace_id}` inside
35
+ * a flow sequence) and named an `x-invalidate` route that did not exist in the document.
36
+ */
37
+ export declare function runExampleSpecSuite(): Promise<ParserResult[]>;
38
+ /**
39
+ * A skip on one entity must not look like the check never ran.
40
+ *
41
+ * Multi-entity labs made this lie: invalidate ran on every child and the console still said
42
+ * "did not apply" because the parents skipped it.
43
+ */
44
+ export declare function runCoverageReportSuite(): ParserResult[];
45
+ /**
46
+ * `doctor` claims each tag unlocks specific checks. This proves it.
47
+ *
48
+ * The reference backend is run twice — with its tags and with them stripped — and the checks that
49
+ * disappear must be exactly the set `TAG_UNLOCKS` promises. Without this the claim is a hand-
50
+ * maintained list that drifts the moment a check's applicability changes, and a coverage promise
51
+ * nobody verified is worse than no promise.
52
+ */
53
+ /**
54
+ * `baselines`, when given, are the checks the defect matrix's two clean baselines ran — the same
55
+ * two runs this would otherwise make again.
56
+ */
57
+ export declare function runTagUnlockSuite(baselines?: {
58
+ tagged: readonly string[];
59
+ untagged: readonly string[];
60
+ }): Promise<ParserResult[]>;
61
+ /**
62
+ * A public catalogue is unscoped. Two principals, create as A, GET or filter as B → 200 is
63
+ * the contract, and the isolation checks must not apply. The workspace-scoped widget fixture
64
+ * is unchanged: tag → SECURITY, heuristic → AMBIGUITY. Same split for item GET and for
65
+ * `filter=id.eq.<other tenant>`.
66
+ */
67
+ export declare function runTenantScopeSuite(): Promise<ParserResult[]>;
68
+ export declare function runPayloadCatalogSuite(): ParserResult[];
69
+ export declare function renderParserSuite(results: ParserResult[]): {
70
+ text: string;
71
+ failures: number;
72
+ };
73
+ /**
74
+ * Generated reproducers are shell scripts, so a quoting mistake turns them into scripts that run
75
+ * against a literal `$BASE` with a literal `$TOKEN` — they look right and do the wrong thing.
76
+ * `bash -n` parses without executing, which catches that class before anyone copies one.
77
+ */
78
+ export declare function checkReproSyntax(findings: Finding[]): Promise<string[]>;
79
+ /**
80
+ * Which check each defect must trip.
81
+ *
82
+ * The first id is the primary — the diagnosis oat is required to reach. Any further ids are
83
+ * *acceptable* consequences: one defect can legitimately violate several properties at once, and
84
+ * calling those false positives would push oat toward under-reporting real problems.
85
+ */
86
+ export declare const EXPECTED: Record<DefectName, string | string[]>;
87
+ /**
88
+ * Defects only the SQL-backed reference can exhibit.
89
+ *
90
+ * The in-memory store has no physical column names, so a DDL/read naming mismatch has nowhere
91
+ * to happen. Every other defect is defined above the stores and runs on every engine.
92
+ */
93
+ export declare const SQL_ONLY: ReadonlySet<DefectName>;
94
+ export type Backend = "memory" | "sqlite" | "postgres" | "d1";
95
+ /**
96
+ * The only defects a remote D1 can say anything an in-process engine cannot.
97
+ *
98
+ * Every statement against D1 is a network round trip, so a full pass costs minutes. The defects
99
+ * worth paying that for are the ones whose behaviour comes from the *engine build* — collation,
100
+ * type affinity, NULL ordering, LIKE escaping, identifier resolution. Everything else is decided
101
+ * in the request handler, where D1 would re-derive a result `node:sqlite` already gave for free.
102
+ * The lost update is not among them: the handler holds the write open on purpose, so it is real on
103
+ * any engine and runs on the in-memory one only (`ONE_ENGINE`).
104
+ */
105
+ export declare const ENGINE_SENSITIVE: ReadonlySet<DefectName>;
106
+ /**
107
+ * Defects that need cursor pagination to exist at all. A dialect that pages only by number
108
+ * cannot exhibit them, so reporting a miss there would be reporting the absence of a feature.
109
+ */
110
+ /**
111
+ * Dialects that publish a cursor. Named rather than inferred, because "which defects can this
112
+ * shape even exhibit" is a property of the fixture, and a new dialect that forgets to declare
113
+ * itself here shows up as missed detections rather than as silent exclusions.
114
+ */
115
+ export declare const DIALECTS_WITH_CURSOR: ReadonlySet<string>;
116
+ /**
117
+ * Dialects that report a total. A shape publishing no count cannot publish a wrong one, so the
118
+ * count defects have nowhere to happen — the same reasoning that excuses cursor defects on a
119
+ * cursorless API, and not an excuse for a check that merely failed to fire.
120
+ */
121
+ export declare const DIALECTS_WITH_TOTAL: ReadonlySet<string>;
122
+ /**
123
+ * Dialects whose filtering is an expression language rather than one parameter per field.
124
+ *
125
+ * Equality-per-field has no expression to malform, no unknown *field* distinct from an unknown
126
+ * query parameter, and no way to write a pattern — so the defects that live inside a filter
127
+ * grammar have nowhere to happen.
128
+ */
129
+ export declare const DIALECTS_WITH_FILTER_EXPRESSION: ReadonlySet<string>;
130
+ export declare const COVERAGE_FLOOR: Record<string, number>;
131
+ /** Defects that need a filter expression language to exist at all. */
132
+ export declare const EXPRESSION_ONLY: ReadonlySet<DefectName>;
133
+ /**
134
+ * Defects that need a postgrest-shaped filter writer (`in` / `ilike` / `is`). Colon and
135
+ * equality cannot emit those operators, so injecting the lie there is a miss that names the
136
+ * grammar rather than oat.
137
+ */
138
+ export declare const POSTGREST_OP_ONLY: ReadonlySet<DefectName>;
139
+ /** Defects that need a search-mode parameter, which only some dialects publish. */
140
+ export declare const SEARCH_MODE_ONLY: ReadonlySet<DefectName>;
141
+ /** Defects that need a nulls token in the sort grammar — only the dotted grammar writes one. */
142
+ export declare const NULLS_TOKEN_ONLY: ReadonlySet<DefectName>;
143
+ export declare const DIALECTS_WITH_POSTGREST_FILTER: ReadonlySet<string>;
144
+ /** Defects that need a reported total to exist at all. */
145
+ export declare const COUNT_ONLY: ReadonlySet<DefectName>;
146
+ export declare const CURSOR_ONLY: ReadonlySet<DefectName>;
147
+ /** Whether this runtime can host the SQLite backend (`node:sqlite` needs a flag on Node 22). */
148
+ export declare function sqliteAvailable(): Promise<boolean>;
149
+ /**
150
+ * Whether D1 credentials are present. Deliberately not a live probe: a network call on every
151
+ * `oat conformance` would tax the common path to answer a question about an opt-in backend.
152
+ */
153
+ export declare function d1Available(): boolean;
154
+ /** Whether a Postgres server is reachable. Requires a running server, not just the driver. */
155
+ export declare function postgresAvailable(): Promise<boolean>;
156
+ export declare const PRINCIPALS: PrincipalSpec[];
157
+ export interface CaseResult {
158
+ label: string;
159
+ defect: DefectName | null;
160
+ expected: string | null;
161
+ detected: boolean;
162
+ /** Findings unrelated to the injected defect — false positives. */
163
+ spurious: Finding[];
164
+ findings: Finding[];
165
+ entitiesTested: string[];
166
+ /** Checks that actually executed. A clean run that ran nothing is not a pass. */
167
+ checksRun: string[];
168
+ /** Records created and not cleaned up. */
169
+ leaked?: number;
170
+ /** Checks that ran and could not reach a verdict, as `check@entity: reason`. */
171
+ inconclusive?: string[];
172
+ /** Checks this defect may legitimately trip, primary first. */
173
+ acceptable?: string[];
174
+ error?: string;
175
+ }
176
+ export declare function runSuite(filter?: string[], backend?: Backend, dialect?: string): Promise<CaseResult[]>;
177
+ /** A leg's answer, from its results in order: the two baselines first, then its defects. */
178
+ export declare function passAnswer(results: CaseResult[], backend: Backend, dialect: string): {
179
+ text: string;
180
+ failures: number;
181
+ proven: string[];
182
+ baselines: {
183
+ tagged: string[];
184
+ untagged: string[];
185
+ };
186
+ primaryOps: Record<string, string[]>;
187
+ };
188
+ /**
189
+ * A case's result as it can cross to another thread: findings keep everything the verdicts read,
190
+ * and drop the exchanges they cite, which hold live bodies.
191
+ */
192
+ export declare function portableResult(result: CaseResult): CaseResult;
193
+ /** The two clean baselines of a leg: tagged, then with every meta tag stripped. */
194
+ export declare function runBaselines(backend?: Backend, dialect?: string): Promise<CaseResult[]>;
195
+ /** Every defect this backend and dialect can exhibit, narrowed to `filter` when one is given. */
196
+ export declare function defectsFor(backend: Backend, dialect: string, filter?: readonly string[]): DefectName[];
197
+ /** One defect, injected alone: detected, and nothing reported that it does not explain. */
198
+ export declare function judgeDefect(defect: DefectName, backend: Backend, dialect: string, shape?: string, label?: string): Promise<CaseResult>;
199
+ export declare function renderSuite(results: CaseResult[], dialect?: string, backend?: Backend): {
200
+ text: string;
201
+ failures: number;
202
+ proven: Set<string>;
203
+ };
204
+ /** Registered checks no injected defect made fire anywhere in the run. Each one fails the suite. */
205
+ export declare function renderUnproven(proven: ReadonlySet<string>): {
206
+ text: string;
207
+ failures: number;
208
+ };
209
+ //# sourceMappingURL=suite.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"suite.d.ts","sourceRoot":"","sources":["../../src/conformance/suite.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AASH,OAAO,EAAW,KAAK,UAAU,EAAE,MAAM,yBAAyB,CAAA;AAKlE,OAAO,KAAK,EAAE,OAAO,EAAgB,MAAM,uBAAuB,CAAA;AAClE,OAAO,EAAE,KAAK,aAAa,EAAO,MAAM,mBAAmB,CAAA;AAQ3D,MAAM,WAAW,YAAY;IAC5B,IAAI,EAAE,MAAM,CAAA;IACZ,GAAG,EAAE,MAAM,CAAA;IACX,EAAE,EAAE,OAAO,CAAA;IACX,MAAM,EAAE,MAAM,CAAA;CACd;AAED;;;GAGG;AACH,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAA;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAE9C,wBAAgB,cAAc,IAAI,YAAY,EAAE,CAgE/C;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,mBAAmB,IAAI,OAAO,CAAC,YAAY,EAAE,CAAC,CA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