@jterrazz/test 16.0.0 → 16.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.
Files changed (210) hide show
  1. package/dist/appium.adapter.js +59 -4
  2. package/dist/browser/index.js +88 -40
  3. package/dist/checker.js +272 -63
  4. package/dist/index.d.ts +33 -4
  5. package/dist/index.js +47 -24
  6. package/dist/oxlint.cjs +100 -27
  7. package/dist/oxlint.js +100 -27
  8. package/dist/playwright.adapter.js +14 -65
  9. package/dist/{ambiguity.js → substring-warning.js} +99 -1
  10. package/dist/vitest.js +71 -11
  11. package/docs/01-architecture.md +95 -0
  12. package/docs/02-developing.md +351 -0
  13. package/docs/03-testing.md +495 -0
  14. package/docs/04-operating.md +101 -0
  15. package/docs/05-module-tests.md +152 -0
  16. package/docs/06-integration.md +180 -0
  17. package/docs/07-component.md +246 -0
  18. package/docs/08-website.md +404 -0
  19. package/docs/09-mobile.md +270 -0
  20. package/docs/10-api.md +264 -0
  21. package/docs/11-jobs.md +157 -0
  22. package/docs/12-cli.md +677 -0
  23. package/docs/13-elements.md +242 -0
  24. package/docs/14-assertions.md +314 -0
  25. package/docs/15-tokens.md +253 -0
  26. package/docs/16-contracts.md +438 -0
  27. package/docs/17-services.md +188 -0
  28. package/docs/18-conventions.md +305 -0
  29. package/docs/19-linting.md +510 -0
  30. package/docs/README.md +36 -0
  31. package/docs/decisions/001-v9-conventions-on-three-channels.md +50 -0
  32. package/docs/decisions/002-the-statique-channel-holds-only-what-upstream-does-not.md +49 -0
  33. package/docs/decisions/003-a-rendered-component-is-a-facet-on-vitest-browser-mode.md +84 -0
  34. package/docs/decisions/004-a-module-against-real-services-or-a-golden-is-the-integration-facet.md +81 -0
  35. package/docs/decisions/005-the-doubles-ladder-is-closed.md +86 -0
  36. package/docs/decisions/006-the-catalogue-reaches-a-file-by-its-role.md +245 -0
  37. package/docs/decisions/007-compose-mode-leaves-the-package.md +53 -0
  38. package/docs/decisions/008-vitest-5-node-24-and-the-native-seams-as-optional-peers.md +75 -0
  39. package/docs/decisions/_template.md +22 -0
  40. package/docs/reference/classes/Matcher.md +120 -0
  41. package/docs/reference/classes/ProcessHandle.md +368 -0
  42. package/docs/reference/functions/defineContract.md +39 -0
  43. package/docs/reference/functions/defineContracts.md +36 -0
  44. package/docs/reference/functions/disabled.md +28 -0
  45. package/docs/reference/functions/enabled.md +20 -0
  46. package/docs/reference/functions/focused.md +26 -0
  47. package/docs/reference/functions/mockOf.md +79 -0
  48. package/docs/reference/functions/postgres.md +31 -0
  49. package/docs/reference/functions/process.md +33 -0
  50. package/docs/reference/functions/redis.md +28 -0
  51. package/docs/reference/functions/required.md +41 -0
  52. package/docs/reference/functions/selected.md +26 -0
  53. package/docs/reference/functions/sqlite.md +33 -0
  54. package/docs/reference/functions/testId.md +20 -0
  55. package/docs/reference/functions/text.md +40 -0
  56. package/docs/reference/functions/valued.md +28 -0
  57. package/docs/reference/functions/waitUntil.md +46 -0
  58. package/docs/reference/functions/within.md +29 -0
  59. package/docs/reference/index.md +196 -0
  60. package/docs/reference/interfaces/BaseResult.md +87 -0
  61. package/docs/reference/interfaces/CallResult.md +160 -0
  62. package/docs/reference/interfaces/CaptureScope.md +82 -0
  63. package/docs/reference/interfaces/CliResult.md +253 -0
  64. package/docs/reference/interfaces/ContainerAccessor.md +166 -0
  65. package/docs/reference/interfaces/DirectoryAccessor.md +33 -0
  66. package/docs/reference/interfaces/FetchResult.md +180 -0
  67. package/docs/reference/interfaces/FilesystemAccessor.md +46 -0
  68. package/docs/reference/interfaces/HttpResult.md +126 -0
  69. package/docs/reference/interfaces/JsonAccessor.md +46 -0
  70. package/docs/reference/interfaces/PageResult.md +356 -0
  71. package/docs/reference/interfaces/RenderResult.md +72 -0
  72. package/docs/reference/interfaces/RenderedText.md +110 -0
  73. package/docs/reference/interfaces/ResponseAccessor.md +47 -0
  74. package/docs/reference/interfaces/ScreenResult.md +128 -0
  75. package/docs/reference/interfaces/TableAccessor.md +26 -0
  76. package/docs/reference/interfaces/TextAccessor.md +96 -0
  77. package/docs/reference/type-aliases/ApiHandle.md +68 -0
  78. package/docs/reference/type-aliases/ApiSpecification.md +213 -0
  79. package/docs/reference/type-aliases/ApiSpecificationOptions.md +68 -0
  80. package/docs/reference/type-aliases/BrowserConsoleMessage.md +30 -0
  81. package/docs/reference/type-aliases/BrowserLinkElement.md +50 -0
  82. package/docs/reference/type-aliases/BrowserMetaElement.md +40 -0
  83. package/docs/reference/type-aliases/BrowserOpenOptions.md +87 -0
  84. package/docs/reference/type-aliases/BrowserPage.md +132 -0
  85. package/docs/reference/type-aliases/BrowserPort.md +51 -0
  86. package/docs/reference/type-aliases/CliEnv.md +11 -0
  87. package/docs/reference/type-aliases/CliHandle.md +80 -0
  88. package/docs/reference/type-aliases/CliInput.md +36 -0
  89. package/docs/reference/type-aliases/CliOutput.md +46 -0
  90. package/docs/reference/type-aliases/CliPort.md +58 -0
  91. package/docs/reference/type-aliases/CliSpecification.md +144 -0
  92. package/docs/reference/type-aliases/CliSpecificationOptions.md +134 -0
  93. package/docs/reference/type-aliases/ComponentChain.md +156 -0
  94. package/docs/reference/type-aliases/ComponentScenario.md +20 -0
  95. package/docs/reference/type-aliases/ComponentUi.md +47 -0
  96. package/docs/reference/type-aliases/ComponentVisitor.md +10 -0
  97. package/docs/reference/type-aliases/ContainerPort.md +113 -0
  98. package/docs/reference/type-aliases/Contract.md +68 -0
  99. package/docs/reference/type-aliases/ContractInput.md +13 -0
  100. package/docs/reference/type-aliases/ContractRequest.md +95 -0
  101. package/docs/reference/type-aliases/ContractResponder.md +23 -0
  102. package/docs/reference/type-aliases/ContractResponse.md +78 -0
  103. package/docs/reference/type-aliases/ContractResponseValue.md +13 -0
  104. package/docs/reference/type-aliases/Contracts.md +48 -0
  105. package/docs/reference/type-aliases/DatabaseKeys.md +16 -0
  106. package/docs/reference/type-aliases/DatabasePort.md +72 -0
  107. package/docs/reference/type-aliases/DeviceOpenOptions.md +46 -0
  108. package/docs/reference/type-aliases/DevicePort.md +51 -0
  109. package/docs/reference/type-aliases/DeviceScreen.md +32 -0
  110. package/docs/reference/type-aliases/DeviceTimeouts.md +39 -0
  111. package/docs/reference/type-aliases/DockerSpecConfig.md +43 -0
  112. package/docs/reference/type-aliases/DomMount.md +21 -0
  113. package/docs/reference/type-aliases/ElementKind.md +27 -0
  114. package/docs/reference/type-aliases/ElementMatch.md +74 -0
  115. package/docs/reference/type-aliases/ElementOptions.md +29 -0
  116. package/docs/reference/type-aliases/ElementRef.md +128 -0
  117. package/docs/reference/type-aliases/ExecOptions.md +37 -0
  118. package/docs/reference/type-aliases/FileAccessor.md +54 -0
  119. package/docs/reference/type-aliases/HonoApp.md +31 -0
  120. package/docs/reference/type-aliases/HttpContractFilter.md +49 -0
  121. package/docs/reference/type-aliases/HttpResponseInit.md +46 -0
  122. package/docs/reference/type-aliases/HttpStreamInit.md +58 -0
  123. package/docs/reference/type-aliases/IntegrationHandle.md +46 -0
  124. package/docs/reference/type-aliases/IntegrationSpecification.md +111 -0
  125. package/docs/reference/type-aliases/IntegrationSpecificationOptions.md +42 -0
  126. package/docs/reference/type-aliases/Intercept.md +19 -0
  127. package/docs/reference/type-aliases/InterceptOptions.md +28 -0
  128. package/docs/reference/type-aliases/InterceptScope.md +11 -0
  129. package/docs/reference/type-aliases/IsolationStrategy.md +75 -0
  130. package/docs/reference/type-aliases/JobHandle.md +34 -0
  131. package/docs/reference/type-aliases/JobsHandle.md +57 -0
  132. package/docs/reference/type-aliases/JobsResult.md +16 -0
  133. package/docs/reference/type-aliases/JobsSpecification.md +94 -0
  134. package/docs/reference/type-aliases/JobsSpecificationOptions.md +56 -0
  135. package/docs/reference/type-aliases/LandmarkKind.md +20 -0
  136. package/docs/reference/type-aliases/LiterateRunFlags.md +27 -0
  137. package/docs/reference/type-aliases/LiterateServeRegistration.md +70 -0
  138. package/docs/reference/type-aliases/MatchFixtureOptions.md +27 -0
  139. package/docs/reference/type-aliases/MatchableRequest.md +61 -0
  140. package/docs/reference/type-aliases/MatcherKind.md +34 -0
  141. package/docs/reference/type-aliases/MobileBackendOptions.md +28 -0
  142. package/docs/reference/type-aliases/MobileElementKind.md +14 -0
  143. package/docs/reference/type-aliases/MobileElementMatch.md +60 -0
  144. package/docs/reference/type-aliases/MobileElementRef.md +20 -0
  145. package/docs/reference/type-aliases/MobileHandle.md +65 -0
  146. package/docs/reference/type-aliases/MobileScenario.md +20 -0
  147. package/docs/reference/type-aliases/MobileSpecification.md +51 -0
  148. package/docs/reference/type-aliases/MobileSpecificationOptions.md +126 -0
  149. package/docs/reference/type-aliases/MobileVisitor.md +81 -0
  150. package/docs/reference/type-aliases/MockOfOptions.md +26 -0
  151. package/docs/reference/type-aliases/MockPort.md +10 -0
  152. package/docs/reference/type-aliases/PinnedClock.md +10 -0
  153. package/docs/reference/type-aliases/PostgresOptions.md +32 -0
  154. package/docs/reference/type-aliases/ProcessOptions.md +112 -0
  155. package/docs/reference/type-aliases/RedisOptions.md +20 -0
  156. package/docs/reference/type-aliases/RenderSubject.md +12 -0
  157. package/docs/reference/type-aliases/ScreenNode.md +67 -0
  158. package/docs/reference/type-aliases/ServerPort.md +36 -0
  159. package/docs/reference/type-aliases/ServerResponse.md +46 -0
  160. package/docs/reference/type-aliases/ServerSpec.md +21 -0
  161. package/docs/reference/type-aliases/ServiceHandle.md +216 -0
  162. package/docs/reference/type-aliases/ServiceRecord.md +12 -0
  163. package/docs/reference/type-aliases/SpecDocument.md +84 -0
  164. package/docs/reference/type-aliases/SpecEnvToken.md +21 -0
  165. package/docs/reference/type-aliases/SpecFileAssertion.md +27 -0
  166. package/docs/reference/type-aliases/SpecFixture.md +30 -0
  167. package/docs/reference/type-aliases/SpecKind.md +8 -0
  168. package/docs/reference/type-aliases/SpecRun.md +108 -0
  169. package/docs/reference/type-aliases/SpecServeEntry.md +40 -0
  170. package/docs/reference/type-aliases/SpecStream.md +32 -0
  171. package/docs/reference/type-aliases/SpecificationConfig.md +290 -0
  172. package/docs/reference/type-aliases/SqliteOptions.md +36 -0
  173. package/docs/reference/type-aliases/SseEvent.md +58 -0
  174. package/docs/reference/type-aliases/StreamBody.md +61 -0
  175. package/docs/reference/type-aliases/TextFilter.md +22 -0
  176. package/docs/reference/type-aliases/VisitScenario.md +20 -0
  177. package/docs/reference/type-aliases/Visitor.md +215 -0
  178. package/docs/reference/type-aliases/WaitUntilOptions.md +46 -0
  179. package/docs/reference/type-aliases/WebsiteBackendOptions.md +37 -0
  180. package/docs/reference/type-aliases/WebsiteHandle.md +51 -0
  181. package/docs/reference/type-aliases/WebsiteSpecification.md +118 -0
  182. package/docs/reference/type-aliases/WebsiteSpecificationOptions.md +40 -0
  183. package/docs/reference/variables/anthropic.md +19 -0
  184. package/docs/reference/variables/banner.md +10 -0
  185. package/docs/reference/variables/button.md +10 -0
  186. package/docs/reference/variables/clock.md +16 -0
  187. package/docs/reference/variables/complementary.md +10 -0
  188. package/docs/reference/variables/component.md +10 -0
  189. package/docs/reference/variables/content.md +10 -0
  190. package/docs/reference/variables/contentinfo.md +10 -0
  191. package/docs/reference/variables/dialog.md +10 -0
  192. package/docs/reference/variables/field.md +10 -0
  193. package/docs/reference/variables/form.md +10 -0
  194. package/docs/reference/variables/heading.md +10 -0
  195. package/docs/reference/variables/http.md +40 -0
  196. package/docs/reference/variables/intercept.md +11 -0
  197. package/docs/reference/variables/link.md +10 -0
  198. package/docs/reference/variables/listitem.md +10 -0
  199. package/docs/reference/variables/main.md +10 -0
  200. package/docs/reference/variables/match.md +8 -0
  201. package/docs/reference/variables/navigation.md +10 -0
  202. package/docs/reference/variables/openai.md +21 -0
  203. package/docs/reference/variables/option.md +17 -0
  204. package/docs/reference/variables/region.md +10 -0
  205. package/docs/reference/variables/row.md +10 -0
  206. package/docs/reference/variables/search.md +10 -0
  207. package/docs/reference/variables/specification.md +8 -0
  208. package/docs/reference/variables/status.md +10 -0
  209. package/docs/reference/variables/table.md +10 -0
  210. package/package.json +2 -1
@@ -0,0 +1,245 @@
1
+ # ADR-006: The catalogue reaches a file by its role, states its reach, and is born on a count
2
+
3
+ **Status:** Accepted
4
+ **Date:** 2026-09-20
5
+
6
+ ## Context
7
+
8
+ The catalogue of 15.x held sixty-odd rows and could not answer three questions
9
+ a reader asks of any one of them: which files does this reach, what do I do
10
+ about it, and what proves it is true.
11
+
12
+ **Reach was a path segment.** Five rules gated on `parts.includes('specs')` or
13
+ `includes('src')` — I2, I4, J2, d12w, d15w — and each of them drew the line in
14
+ a slightly different place. The consequences were not theoretical: a sleep in a
15
+ module test beside `src/` was invisible to J2, while the same sleep two folders
16
+ away failed a build; a repository's consistency suite was an "orphan module
17
+ test" to I2 because it sat under a folder called `specs`. The gate was also
18
+ unreadable: nothing in a row said which files it judged, so the only way to
19
+ find out was to read the implementation.
20
+
21
+ **A row could not say what to do.** A ban with no destination is an argument
22
+ rather than a rule, and forty-odd messages ended on `see docs/19-linting.md`
23
+ with no fragment — a route to a chapter, not to a row. Nothing failed when a
24
+ heading moved, so the routes rotted silently.
25
+
26
+ **Nothing said which pass a finding came from.** The manifest's `channel` field
27
+ was a union a row could name loosely, and three of the seven values (`type`,
28
+ `meta`, `upstream`) had no rows at all: the conventions they stood for were
29
+ held by tests nobody could find from the catalogue, or by nothing.
30
+
31
+ **And a row could be born out of nothing.** The A-family's `allowedPrefixes`
32
+ story is the warning: a rule shipped at `error` on a shape no consumer had ever
33
+ been run against, and every consumer paid for it.
34
+
35
+ ## Decision
36
+
37
+ ### One gate, by role
38
+
39
+ **One gate, by ROLE.** `roleOf(file)` returns `{ role, inSpecs, legacyDir }`,
40
+ and the role is read from the SUFFIX: `.specification.ts(x)`, `.spec.yaml`,
41
+ `.spec.ts`, `.test.tsx`, `.test.ts`, `vitest.config.*`, a ground ancestor, a
42
+ `contracts/` ancestor. A statique rule reads those three fields and, where it
43
+ must know where the file sits, the ONE package-bounded anchor every pass shares
44
+ (`specsAnchor` in `src/lint/ast.ts`) — never a bare path segment. The rules
45
+ that need it say so: C1, C4, C8, C13, F2, F3, I1, I4. Walking a TREE is the
46
+ checker's — C1's depth, C12, C18, C20, C21w.
47
+
48
+ ### A row says what it reaches, and what to do
49
+
50
+ **Every row states its REACH and its FIX**, both required by the type, and the
51
+ fix is one imperative line the message carries too.
52
+
53
+ ### Seven channels, each answering for its rows
54
+
55
+ **Seven channels, one per row** — `statique`, `upstream`, `checker`, `runtime`,
56
+ `type`, `meta`, `process` — and each channel answers for its rows the way that
57
+ channel can: a rule file and a fixture pair, an assertion on the resolved
58
+ option, a bundled pass, a `// RUNTIME <ID>` marker above the spec that drives
59
+ the refusal, an `@ts-expect-error` in `src/type-channel.test-d.ts`, a named
60
+ meta-test. One meta-test holds that contract for all seven.
61
+
62
+ **English, and anchored.** Every sentence the catalogue publishes is English
63
+ (K5 holds the line with a deny-list of the tokens the manifest actually
64
+ carried), and every message the PLUGIN ships ends with a generated
65
+ `(<ID> — <chapter>#<rule>)` tail whose anchor is asserted to exist (K3). A
66
+ checker finding carries its id and its chapter; several of its passes report
67
+ under a family code (`d4`, `d4b`, `d10w`) rather than a row name, so the tail
68
+ routes to the chapter and the id says which row.
69
+
70
+ ### A row is born on a count
71
+
72
+ **A row is born on a COUNT.** A rule is written when its defect class has been
73
+ seen once and its criterion is decidable. A class nobody has seen is a backlog
74
+ line with its criterion written, coded on its first occurrence. The R8 dry run
75
+ — the whole catalogue run over every clone of the workbench, read-only — is
76
+ what settles which of the two a row is, and it is re-run whenever a criterion
77
+ changes. The counts below are the run of 2026-09-20, re-run after the fix pass
78
+ that bounded six false classes: 27 clones plus the estate's own `apps`,
79
+ `packages` and `specs`, with each package's own violation FIXTURES excluded —
80
+ they violate on purpose, and counting them would let a rule justify itself.
81
+ `jterrazz-web-astro-react` and `signews-web-astro` are not repositories: they
82
+ are clones of `jterrazz-web` and `signews-web` checked out on a merged
83
+ experiment branch, counted here as the folders the run walked.
84
+
85
+ | rule | total | where |
86
+ | ----------------------------- | ----- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
87
+ | `b4-given-then` | 2569 | jterrazz-design 902, signews-mobile 532, archive 419, hoverfly-lsp 246, extensions 216, package-attestation 144, spwn 104, package-typescript 4, package-test 2 |
88
+ | `b11-marker-one-line` | 240 | package-test 160, signews-api 40, hoverfly-lsp 13, jterrazz-web-astro-react 5, jterrazz-web 5, archive 4, package-typescript 4, spwn 4, jterrazz-studio 3, jterrazz-os 2 |
89
+ | `i2-sibling-test-naming` | 224 | archive 169, signews-mobile 35, hoverfly-lsp 15, package-typescript 2, jterrazz-design 1, package-test 1, spwn 1 |
90
+ | `c12-spec-file-name` | 180 | spwn 40, package-test 37, jterrazz-web 22, jterrazz-web-astro-react 21, signews-api 15, package-typescript 9, signews-mobile 8, jterrazz-os 6, package-attestation 6, package-intelligence 3, signews-web 3, jterrazz-design 2, jterrazz-studio 2, spwn-web 2, cap01 1, package-analytics 1, package-broadcast 1, signews-web-astro 1 |
91
+ | `j6w-given-in-the-test` | 165 | archive 54, package-test 41, signews-api 19, package-typescript 17, hoverfly-lsp 14, jterrazz-os 6, spwn 6, package-telemetry 4, signews-mobile 2, package-analytics 1, package-intelligence 1 |
92
+ | `d16w-ambient-value` | 57 | signews-api 36, package-test 10, archive 6, hoverfly-lsp 2, jterrazz-os 2, signews-mobile 1 |
93
+ | `e9w-env-assignment-in-test` | 49 | package-test 47, jterrazz-os 2 |
94
+ | `d18w-existence-only-oracle` | 37 | package-test 14, hoverfly-lsp 10, archive 4, package-intelligence 2, signews-mobile 2, jterrazz-os 1, jterrazz-web-astro-react 1, jterrazz-web 1, package-typescript 1, signews-api 1 |
95
+ | `c1-domain-structure` | 33 | jterrazz-os 26, package-typescript 7 |
96
+ | `c18-module-test-under-facet` | 31 | package-typescript 27, jterrazz-web 2, spwn 2 |
97
+ | `i4-no-module-doubles` | 23 | signews-mobile 13, archive 5, package-intelligence 2, jterrazz-web 1, package-typescript 1, signews-api 1 |
98
+ | `d19w-probe-cluster` | 22 | package-typescript 7, spwn 6, jterrazz-os 3, jterrazz-web 3, archive 2, jterrazz-web-astro-react 1 |
99
+ | `f2-no-test-imports-in-prod` | 21 | package-test 13, jterrazz-design 3, archive 2, package-manifest 2, hoverfly-lsp 1 |
100
+ | `e3-config-present` | 17 | archive 16, extensions 1 |
101
+ | `d12w-response-body-probe` | 14 | signews-api 9, archive 5 |
102
+ | `d15w-status-only-probe` | 14 | package-test 4, archive 3, jterrazz-os 3, jterrazz-web-astro-react 2, jterrazz-web 1, signews-api 1 |
103
+ | `d5w-spec-pinned-value` | 10 | jterrazz-os 9, package-test 1 |
104
+ | `d8w-text-bypass` | 9 | jterrazz-web-astro-react 3, jterrazz-web 3, archive 2, spwn 1 |
105
+ | `c9-dead-fixtures` | 8 | package-test 7, spwn 1 |
106
+ | `d17w-double-only-oracle` | 8 | signews-api 4, signews-mobile 4 |
107
+ | `j2-no-sleep` | 8 | package-test 3, archive 2, jterrazz-os 1, signews-mobile 1, spwn 1 |
108
+ | `w5w-scenario-settles` | 8 | package-test 4, cap01 1, jterrazz-web-astro-react 1, jterrazz-web 1, signews-mobile 1 |
109
+ | `a1-specification-file` | 7 | package-test 7 |
110
+ | `e2-preset-config` | 6 | package-test 3, spwn 2, archive 1 |
111
+ | `c21w-ground-owned-by-one` | 5 | spwn 2, jterrazz-web-astro-react 1, package-attestation 1, signews-api 1 |
112
+ | `d5-spec-volatile-literal` | 3 | package-test 3 |
113
+ | `e7w-include-prefix-exists` | 3 | spwn 2, package-test 1 |
114
+ | `f5-fixtures-only-from-tests` | 3 | jterrazz-design 3 |
115
+ | `f8-no-seam-dependency` | 3 | archive 1, jterrazz-design 1, spwn 1 |
116
+ | `b10-when-between-markers` | 2 | archive 1, spwn 1 |
117
+ | `e4w-project-binding` | 1 | package-test 1 |
118
+ | `f6-no-foreign-test-runtime` | 1 | signews-web 1 |
119
+
120
+ Four rows were at zero with no new surface to be the boundary of, and the gate
121
+ moved them to the backlog with their criteria written: **B12** (a marker inside
122
+ a declarator chain), **C19** (backend ground under a screen facet — the
123
+ component facet that was its reason stopped being a folder when component tests
124
+ became colocated), **D21w** (a volatile literal in a golden: 108 findings, every
125
+ one a publication date the PRODUCT pins rather than a value a run minted; once
126
+ the criterion excludes midnight UTC, which a clock read never is, it falls to
127
+ zero) and **D22w**. Three rows ship at zero as the boundary of a surface born
128
+ with them: **W2** (the escape hatch nobody uses yet), **E8** (the literate door
129
+ the `cli()` helper now defaults) and **C20** (folder = constructor, which the
130
+ `integration` facet of 15.3 is the first new folder to answer to).
131
+
132
+ Two rows ship at zero for a reason the re-run wrote itself. **D16** is the
133
+ error half of a class d16w counts 57 times: the one occurrence the first run
134
+ found was a test that PINS its clock and then reads it, which is what the rule
135
+ tells an author to do — so the exemption that made it disappear is the rule
136
+ working. **J9** has no occurrence because the toolchain's suppression gate
137
+ reads `oxlint-disable*` and nothing else: the checker's own directive has never
138
+ been held by anything, and the 16 of them on the workbench were written under
139
+ no obligation to say why.
140
+
141
+ Six false classes the re-run bounded, each of which had made a row look larger
142
+ than it is: C18 read a spec importing `../x.specification` (no extension) as
143
+ reaching no runner — 13 of its 44; C12 and C18 both claimed the same file, and
144
+ `--fix` performed the wrong one; C21w counted a golden named through a template
145
+ as no reader at all; W5w read a `db.select()` as a visitor's action and every
146
+ component test as a screen scenario — 13 of its 26 were the estate's console;
147
+ D18w called a precise negative (`not.toHaveBeenCalled()`) an existence check;
148
+ D19w called three reads of one `value` a cluster.
149
+
150
+ The chapters are renumbered ONCE, in the same release, so a link repointed by
151
+ this change is repointed for good. The map it lands on runs the fork's own
152
+ order: the spine, then the kinds of test from the one with no runner to the one
153
+ that drives a simulator, then the shared references every kind links into, then
154
+ the enforcement. Two chapters are BORN by it — 05, the majority kind that had no
155
+ page, and 13, the element vocabulary two facet chapters were each holding half
156
+ of — and every kind chapter is rewritten on one seven-section skeleton.
157
+
158
+ | Old | New | Chapter |
159
+ | --- | --- | ----------------------------------------- |
160
+ | 01 | 01 | Architecture |
161
+ | 02 | 02 | Developing |
162
+ | 03 | 03 | Testing |
163
+ | 04 | 04 | Operating |
164
+ | — | 05 | Module tests (new) |
165
+ | 17 | 06 | Integration specs |
166
+ | 16 | 07 | Component specs |
167
+ | 14 | 08 | Website specs |
168
+ | 15 | 09 | Mobile specs |
169
+ | 05 | 10 | API specs |
170
+ | 06 | 11 | Jobs specs |
171
+ | 07 | 12 | CLI specs |
172
+ | — | 13 | Elements (new) |
173
+ | 08 | 14 | Assertions |
174
+ | 09 | 15 | Tokens (+ update mode end to end) |
175
+ | 10 | 16 | Contracts (+ `intercept()`) |
176
+ | 11 | 17 | Services |
177
+ | 12 | 18 | Conventions |
178
+ | 13 | 19 | Linting (carries the generated catalogue) |
179
+
180
+ A rule message anchored at `docs/13-linting.md#<name>` now reads
181
+ `docs/19-linting.md#<name>`; K3 holds that every one of them resolves, so a
182
+ renumbering that missed a message fails the suite rather than a reader.
183
+
184
+ ## What the proof holds, and what it does not
185
+
186
+ The release proof of this wave reads: the package's own tree green under
187
+ `typescript check`, the `unit` project inside the budget
188
+ [03 — Testing](../03-testing.md) states, the
189
+ catalogue's own meta-tests holding freshness, completeness, reach and channel,
190
+ and the R8 counts above re-derivable from the branch head. All of it holds.
191
+
192
+ **Suppressions are the one stated exception**, and it has two halves, both
193
+ counted. The proof as written asked for zero directives added to this package's
194
+ own tree: `src/` and `specs/` carry 66 `oxlint-disable` outside fixtures and
195
+ goldens where `main` carried 51, so the wave adds 15. They are three shapes,
196
+ and none of them is debt: a test whose SUBJECT is the primitive the rule bans —
197
+ the clock seam, `waitUntil`, the adapter deadlines, the marker rule's own
198
+ one-line fixture; a negative spec whose violation IS the behaviour under test;
199
+ and one skipped spec, the repro of the seam defect chapter 16 names, which
200
+ leaves the day the seam answers. A rule cannot exempt the test that proves it
201
+ without exempting the class it guards, so the directive carries the reason
202
+ instead.
203
+
204
+ The second half is the RATCHET, and it is debt rather than exemption: the wave
205
+ absorbs 107 findings of this package's own rules into `oxlint.baseline.json` —
206
+ `e9w` 39, `j6w` 37, `d18w` 14, `d16w` 10, `w5w` 4, `d15w` 3, beside the single
207
+ `i1` line `main` already carried. A ratchet key names a convention, never a
208
+ pass, so those are 107 lines a reader can spend one convention at a time, and
209
+ the baseline may only fall.
210
+
211
+ Both numbers are written here so the next release holds itself to them: 66
212
+ directives and 107 absorbed findings, and a rise in either asks for the same
213
+ reading.
214
+
215
+ **Not done in this cut**, deliberately, each with the reason:
216
+
217
+ - **The website and mobile duplicates**, and **the eight hand-written skill
218
+ references**, were both deferred from the catalogue cut to the renumbering
219
+ that follows it in the same release: the vocabulary had no page to move to
220
+ until chapter 13 existed, and the references had no generated card to be
221
+ replaced by. Both landed with it — 13 owns the vocabulary, and
222
+ `references/<kind>.md` is generated from the facet matrix.
223
+ - **`response.body.cancel()`.** A seam defect, not a catalogue one: chapter 16
224
+ states it and M3's row names the one suppression it sanctions, with the repro
225
+ skipped beside the other intercept specs.
226
+ - **W4 stays a runtime row** rather than a type one, for the reason written in
227
+ `src/type-channel.test-d.ts`.
228
+ - **The three statuses.** ADR-006, 007 and 008 are `Proposed`; only the owner
229
+ writes `Accepted`, in the commit that cuts the version.
230
+
231
+ ## Consequences
232
+
233
+ - A reader deciding whether a rule applies to the file in front of them reads
234
+ the row, never the implementation; a rule that wants a different reach must
235
+ change `roleOf`, where every rule sees it at once.
236
+ - The three channels that were empty carry rows, and a row of any channel that
237
+ loses its proof fails a meta-test rather than going quietly stale.
238
+ - The gate costs rules: four written, tested and fixtured rows went to the
239
+ backlog on the strength of the dry run. That is the price of the criterion,
240
+ and the criterion is the reason a consumer can trust a new `error`.
241
+ - A count is evidence of a CLASS, not a migration estimate: `b4-given-then` at
242
+ 2575 is narration debt that is already baselined everywhere, and no row's
243
+ tier is decided by how expensive it would be to fix.
244
+ - Every consumer's first 16.0 run is a baseline update. The counts above are
245
+ what that update will hold.
@@ -0,0 +1,53 @@
1
+ # ADR-007: Compose mode leaves the package
2
+
3
+ **Status:** Accepted
4
+ **Date:** 2026-09-20
5
+
6
+ ## Context
7
+
8
+ `specification.api({ mode: 'compose' })` let a spec meet the application as a
9
+ container stack described by a `docker/compose.test.yaml` rather than as a Hono
10
+ app handed to `server`. It carried a binding resolver, a compose-file reader, a
11
+ `composeService` name on every service handle, a `TEST_MODE` environment
12
+ variable, a fetch adapter for the api facet, five lint rules (A5, A6, A6w, A10,
13
+ I3) with their fixtures and specs, an `api-stack` project, and an orchestrator
14
+ that had to start two shapes of world.
15
+
16
+ A no-ignore grep of every clone on the workbench found **zero** consumer files
17
+ using it. The one trace outside this package is a prose mention in one
18
+ repository's testing chapter.
19
+
20
+ The mode was also the source of a whole class of confusion the surveys kept
21
+ finding: two ways to say what the subject is (`server` and a compose service),
22
+ two names for one service (its record key and its `composeName`), and a set of
23
+ rules whose only job was to keep the two from contradicting each other.
24
+
25
+ ## Decision
26
+
27
+ Compose mode leaves, with no deprecation window: none opens for a consumer that
28
+ does not exist.
29
+
30
+ What goes: `mode`, `TEST_MODE`, the `docker/compose.test.yaml` binding,
31
+ `composeService`, `src/integrations/compose/`, the api facet's fetch adapter,
32
+ rules A5, A6, A6w, A10 and I3 with every fixture and spec of theirs, and the
33
+ `api-stack` project.
34
+
35
+ The record KEY becomes the only name a service has: `serviceName`, assigned
36
+ from the key at start, and the init script a database runs is read from
37
+ `<root>/docker/<serviceName>/init.sql`. `ROOT_MARKERS` collapses to
38
+ `package.json`.
39
+
40
+ ## Consequences
41
+
42
+ - One shape of world: a specification starts the services its record declares
43
+ and hands the subject to `server`. An agent that knows one facet knows them
44
+ all, and the orchestrator has one path through startup instead of two.
45
+ - A consumer config naming a removed rule id fails oxlint's unknown-rule check
46
+ — the same failure mode ADR-002 had for J1/J3/J4/J5, and the survey found no
47
+ consumer config naming any of the five.
48
+ - A future need to drive a deployed stack is not closed: `process()` is the one
49
+ shape an external process takes in either slot, and `url` already targets a
50
+ world this run did not start. What is closed is a SECOND vocabulary for it.
51
+ - The package's own specs lost the one place where a spec reached past the
52
+ public entry to build an `Orchestrator` by hand; both were rewritten through
53
+ the entry, which is what rule F3 asks of every consumer.
@@ -0,0 +1,75 @@
1
+ # ADR-008: Vitest 5, Node 24, the native seams as optional peers, and every artefact under `.artifacts/`
2
+
3
+ **Status:** Accepted
4
+ **Date:** 2026-09-20
5
+
6
+ ## Context
7
+
8
+ Three questions came due together at the major.
9
+
10
+ **Which runner?** 15.2 and 15.3 shipped against `vitest ^4.1.10 || ^5`, which
11
+ meant the package proved itself on two runners and a consumer could be on
12
+ either. Vitest 5 is not a drop-in: `Assertion` gained a type parameter (an
13
+ augmentation whose parameter list differs is refused outright), and Browser Mode
14
+ pins its provider to the runner's EXACT patch — `@vitest/browser-playwright@X`
15
+ peers `vitest: X`.
16
+
17
+ **Which dependencies?** `better-sqlite3`, `pg`, `redis` and `testcontainers`
18
+ were plain dependencies: every consumer installed four native packages, and
19
+ three of them built native code on install, to run a suite most of them never
20
+ pointed at a database. Under pnpm a native seam only builds when it is named in
21
+ `only-built-dependencies`, so the cost was not even paid consistently.
22
+
23
+ **Where do artefacts go?** Vitest 5 writes to `.vitest/` at the repository root,
24
+ Browser Mode leaks `.vitest-attachments/` there and `__screenshots__/` beside
25
+ the tests. The estate's doctrine says an artefact is never on the row, and the
26
+ toolchain's gate enforces it — which would have failed every consumer's first
27
+ run on 5.
28
+
29
+ ## Decision
30
+
31
+ **`vitest ^5`, and only 5.** The peer is `^5`; the package's own devDependency
32
+ pins `vitest` and `@vitest/browser-playwright` to the same exact patch, and
33
+ `component()` asserts that equality at startup, naming both versions. The adopt
34
+ flow bumps the pair in one unit.
35
+
36
+ **`engines.node: ">=24"`** — the toolchain's floor, not a third one.
37
+
38
+ **The four native seams become OPTIONAL peers**, each loaded on first use
39
+ through `loadPeer()`, whose refusal names the facet, the peer, the install
40
+ command of the package manager the project's own lockfile names, and — under
41
+ pnpm — the `onlyBuiltDependencies` line. What stays a dependency is what every
42
+ consumer uses and none should declare: `msw`, `vitest-mock-extended`, `yaml`.
43
+ That list is what rule F8 reads.
44
+
45
+ The saving is npm's and Bun's. pnpm resolves a peer it can satisfy whatever
46
+ the consumer declares — with `auto-install-peers` (its default since 8) all
47
+ four arrive anyway, and the native one builds — so under pnpm the change buys
48
+ the DECLARATION, not the install: a member that uses `sqlite()` says so, and a
49
+ member that does not is no longer described by its dependency tree as a
50
+ database consumer.
51
+
52
+ **Every artefact under `.artifacts/vitest/`**: `attachmentsDir`, the
53
+ json/junit/html/blob `outputFile` map, and both screenshot directories, set by
54
+ the preset. A path the tool pins and cannot relocate is the toolchain map's to
55
+ list, not this package's to hide.
56
+
57
+ The preset also takes the hygiene defaults a suite should not have to restate:
58
+ `retry: 0`, `restoreMocks`, `unstubGlobals`, `unstubEnvs`.
59
+
60
+ ## Consequences
61
+
62
+ - A consumer on vitest 4 stays on `@jterrazz/test` 15.x until it adopts 5. The
63
+ package no longer pays for two runners, and the type augmentation can state
64
+ vitest 5's signature character for character.
65
+ - A consumer using `sqlite()`, `postgres()`, `redis()` or a container declares
66
+ that peer — three repositories on the workbench use `sqlite()` today. Every
67
+ other consumer stops installing four native packages it never loads.
68
+ - The failure mode for a missing peer is a startup message naming the install
69
+ command, not a module-resolution error from inside an adapter.
70
+ - The artefact paths are the package's to set and the toolchain's to allow: one
71
+ entry in its allowlist, one row in the estate's toolchain map, and the gate
72
+ holds for every consumer from their first run.
73
+ - The version pin is exact on purpose. It is the one dependency where "compatible"
74
+ is not enough: the provider and the runner exchange a protocol, and a patch
75
+ apart they refuse each other at startup rather than at type-check.
@@ -0,0 +1,22 @@
1
+ # ADR-NNN: Title
2
+
3
+ **Status:** Proposed
4
+ **Date:** YYYY-MM-DD
5
+
6
+ An agent leaves the status `Proposed`; only the owner writes `Accepted`.
7
+
8
+ A retroactive record carries one honest line here: written YYYY-MM-DD from
9
+ the evidence it was reconstructed from. A record written at decision time
10
+ carries nothing.
11
+
12
+ ## Context
13
+
14
+ The situation that forced a decision — the forces, not the answer.
15
+
16
+ ## Decision
17
+
18
+ What was decided, and the shape of the choice.
19
+
20
+ ## Consequences
21
+
22
+ - What follows: costs accepted, freedoms gained, doors closed and opened.
@@ -0,0 +1,120 @@
1
+ <!-- GENERATED by `typescript docs` — DO NOT EDIT -->
2
+ # Class: Matcher
3
+
4
+ Defined in: [src/model/matching/match.ts:70](https://github.com/jterrazz/package-test/blob/main/src/model/matching/match.ts#L70)
5
+
6
+ A dynamic-value matcher. Created via the [match](../variables/match.md) factories — never
7
+ constructed directly by user code.
8
+
9
+ ## Constructors
10
+
11
+ ### Constructor
12
+
13
+ ```ts
14
+ new Matcher(kind, options?): Matcher;
15
+ ```
16
+
17
+ Defined in: [src/model/matching/match.ts:81](https://github.com/jterrazz/package-test/blob/main/src/model/matching/match.ts#L81)
18
+
19
+ #### Parameters
20
+
21
+ | Parameter | Type |
22
+ | ------ | ------ |
23
+ | `kind` | [`MatcherKind`](../type-aliases/MatcherKind.md) |
24
+ | `options` | \{ `includes?`: `string`; `notRef?`: `string`; `refName?`: `string`; `regex?`: `RegExp`; \} |
25
+ | `options.includes?` | `string` |
26
+ | `options.notRef?` | `string` |
27
+ | `options.refName?` | `string` |
28
+ | `options.regex?` | `RegExp` |
29
+
30
+ #### Returns
31
+
32
+ `Matcher`
33
+
34
+ ## Properties
35
+
36
+ ### includes?
37
+
38
+ ```ts
39
+ readonly optional includes?: string;
40
+ ```
41
+
42
+ Defined in: [src/model/matching/match.ts:72](https://github.com/jterrazz/package-test/blob/main/src/model/matching/match.ts#L72)
43
+
44
+ For kind 'includes': the substring the actual value must contain.
45
+
46
+ ***
47
+
48
+ ### kind
49
+
50
+ ```ts
51
+ readonly kind: MatcherKind;
52
+ ```
53
+
54
+ Defined in: [src/model/matching/match.ts:73](https://github.com/jterrazz/package-test/blob/main/src/model/matching/match.ts#L73)
55
+
56
+ ***
57
+
58
+ ### notRef?
59
+
60
+ ```ts
61
+ readonly optional notRef?: string;
62
+ ```
63
+
64
+ Defined in: [src/model/matching/match.ts:75](https://github.com/jterrazz/package-test/blob/main/src/model/matching/match.ts#L75)
65
+
66
+ For kind 'ref': the capture to assert inequality against.
67
+
68
+ ***
69
+
70
+ ### refName?
71
+
72
+ ```ts
73
+ readonly optional refName?: string;
74
+ ```
75
+
76
+ Defined in: [src/model/matching/match.ts:77](https://github.com/jterrazz/package-test/blob/main/src/model/matching/match.ts#L77)
77
+
78
+ For kind 'ref': the capture name.
79
+
80
+ ***
81
+
82
+ ### regex?
83
+
84
+ ```ts
85
+ readonly optional regex?: RegExp;
86
+ ```
87
+
88
+ Defined in: [src/model/matching/match.ts:79](https://github.com/jterrazz/package-test/blob/main/src/model/matching/match.ts#L79)
89
+
90
+ For kind 'regex': the pattern the actual value must match.
91
+
92
+ ## Methods
93
+
94
+ ### toJSON()
95
+
96
+ ```ts
97
+ toJSON(): string;
98
+ ```
99
+
100
+ Defined in: [src/model/matching/match.ts:117](https://github.com/jterrazz/package-test/blob/main/src/model/matching/match.ts#L117)
101
+
102
+ #### Returns
103
+
104
+ `string`
105
+
106
+ ***
107
+
108
+ ### toString()
109
+
110
+ ```ts
111
+ toString(): string;
112
+ ```
113
+
114
+ Defined in: [src/model/matching/match.ts:98](https://github.com/jterrazz/package-test/blob/main/src/model/matching/match.ts#L98)
115
+
116
+ Placeholder-style rendering used in failure diffs and serialization.
117
+
118
+ #### Returns
119
+
120
+ `string`