@hublo/sentinel 1.7.0-alpha.26 → 1.7.0-alpha.28

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 (49) hide show
  1. package/README.md +1 -2
  2. package/dist/bin/sentinel.js +45 -16
  3. package/dist/{chunk-LX7EG6PJ.js → chunk-AO526UPR.js} +10 -6
  4. package/dist/chunk-AO526UPR.js.map +1 -0
  5. package/dist/{chunk-D2Z7H3AD.js → chunk-CZFZRF3I.js} +4496 -5215
  6. package/dist/chunk-F5WISUN3.js +17 -0
  7. package/dist/chunk-F5WISUN3.js.map +1 -0
  8. package/dist/chunk-FY3P5QPH.js +15 -0
  9. package/dist/chunk-FY3P5QPH.js.map +1 -0
  10. package/dist/{chunk-F3Q3JQJ6.js → chunk-KGZLTDUT.js} +3 -5
  11. package/dist/chunk-NE3IEJBN.js +59 -0
  12. package/dist/chunk-NE3IEJBN.js.map +1 -0
  13. package/dist/{chunk-JT7ZMH44.js → chunk-VE37F4A5.js} +5 -5
  14. package/dist/chunk-VE37F4A5.js.map +1 -0
  15. package/dist/chunk-VWASE6NN.js +34 -0
  16. package/dist/chunk-VWASE6NN.js.map +1 -0
  17. package/dist/{chunk-PMRL4MH6.js → chunk-ZDSSUW6A.js} +2 -2
  18. package/dist/index.d.ts +1 -1
  19. package/dist/index.js +8 -6
  20. package/dist/roles/runtime-analysis/config.d.ts +92 -0
  21. package/dist/roles/runtime-analysis/config.js +10 -0
  22. package/dist/roles/runtime-analysis/gateway.d.ts +2 -0
  23. package/dist/roles/runtime-analysis/gateway.js +89 -0
  24. package/dist/roles/runtime-analysis/gateway.js.map +1 -0
  25. package/dist/roles/runtime-analysis/mock-api.d.ts +2 -0
  26. package/dist/roles/runtime-analysis/mock-api.js +43 -0
  27. package/dist/roles/runtime-analysis/mock-api.js.map +1 -0
  28. package/dist/roles/static-analysis/config.js +1 -2
  29. package/dist/roles/test/setup/jest-parity.js +2 -2
  30. package/dist/roles/test/setup/workspace-entry.js +2 -2
  31. package/dist/{validate-IES226NX.js → validate-D7MW2XE6.js} +2 -2
  32. package/docs/runtime-analysis-adoption.md +197 -0
  33. package/docs/typescript-traces.md +2 -218
  34. package/docs/using-sentinel.md +1 -2
  35. package/package.json +9 -6
  36. package/runtime-analysis-deps/load.mjs +6 -0
  37. package/runtime-analysis-deps/package-lock.json +1766 -0
  38. package/runtime-analysis-deps/package.json +11 -0
  39. package/dist/chunk-JT7ZMH44.js.map +0 -1
  40. package/dist/chunk-LX7EG6PJ.js.map +0 -1
  41. package/dist/chunk-NGLEGAEN.js +0 -190
  42. package/dist/chunk-NGLEGAEN.js.map +0 -1
  43. package/dist/chunk-PXTU5MPW.js +0 -9
  44. package/dist/chunk-PXTU5MPW.js.map +0 -1
  45. package/dist/roles/sql/config.d.ts +0 -68
  46. package/dist/roles/sql/config.js +0 -8
  47. package/docs/sql-adoption.md +0 -598
  48. /package/dist/{chunk-PMRL4MH6.js.map → chunk-ZDSSUW6A.js.map} +0 -0
  49. /package/dist/roles/{sql → runtime-analysis}/config.js.map +0 -0
@@ -0,0 +1,43 @@
1
+ import {
2
+ answer,
3
+ loadApi
4
+ } from "../../chunk-NE3IEJBN.js";
5
+ import {
6
+ loadRuntimeConfig
7
+ } from "../../chunk-VWASE6NN.js";
8
+ import "../../chunk-F5WISUN3.js";
9
+
10
+ // src/roles/runtime-analysis/serve/mock-api-main.ts
11
+ import { resolve } from "node:path";
12
+ import { parseArgs } from "node:util";
13
+
14
+ // src/roles/runtime-analysis/serve/mock-api.ts
15
+ import http from "node:http";
16
+ function createMockApi(api) {
17
+ return http.createServer((request, response) => {
18
+ request.resume();
19
+ const { status, body, mock } = answer(api, request.method ?? "GET", request.url ?? "/");
20
+ response.writeHead(status, {
21
+ "content-type": mock === "handled" ? "application/json" : "text/plain",
22
+ "x-cwv-mock": mock
23
+ });
24
+ response.end(body);
25
+ });
26
+ }
27
+
28
+ // src/roles/runtime-analysis/serve/mock-api-main.ts
29
+ var { values: args } = parseArgs({
30
+ options: { module: { type: "string" }, port: { type: "string" } }
31
+ });
32
+ var moduleDir = resolve(String(args.module));
33
+ var loaded = await loadRuntimeConfig(moduleDir);
34
+ if (!("config" in loaded)) {
35
+ console.error(`no runtime-analysis config in ${args.module}`);
36
+ process.exit(2);
37
+ }
38
+ createMockApi(loadApi(loaded.config.api, moduleDir)).listen(
39
+ Number(args.port),
40
+ "127.0.0.1",
41
+ () => console.log(`mock API on http://127.0.0.1:${args.port}`)
42
+ );
43
+ //# sourceMappingURL=mock-api.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/roles/runtime-analysis/serve/mock-api-main.ts","../../../src/roles/runtime-analysis/serve/mock-api.ts"],"sourcesContent":["/** The mock API as its own process: `node mock-api.js --module <dir> --port 4199`. */\nimport { resolve } from 'node:path'\nimport { parseArgs } from 'node:util'\n\nimport { loadApi } from '../config/api.js'\nimport { loadRuntimeConfig } from '../config/resolve.js'\n\nimport { createMockApi } from './mock-api.js'\n\nconst { values: args } = parseArgs({\n options: { module: { type: 'string' }, port: { type: 'string' } },\n})\nconst moduleDir = resolve(String(args.module))\nconst loaded = await loadRuntimeConfig(moduleDir)\nif (!('config' in loaded)) {\n console.error(`no runtime-analysis config in ${args.module}`)\n process.exit(2)\n}\ncreateMockApi(loadApi(loaded.config.api, moduleDir)).listen(Number(args.port), '127.0.0.1', () =>\n console.log(`mock API on http://127.0.0.1:${args.port}`),\n)\n","/**\n * The mock API: answers a front's API calls from the `api` list of its config, nothing else. A\n * request no entry matches is answered 501, which fails the flow's \"no unhandled request\" proof.\n * Moved from the monorepo's harness (`engine/serve/mock-api.mjs`), unchanged in behaviour; its own\n * process (`mock-api-main.ts`), like the gateway.\n */\nimport http from 'node:http'\n\nimport { answer, type LoadedAnswer } from '../config/api.js'\n\nexport function createMockApi(api: readonly LoadedAnswer[]): http.Server {\n return http.createServer((request, response) => {\n // The body is not read: an entry answers by method and path only.\n request.resume()\n const { status, body, mock } = answer(api, request.method ?? 'GET', request.url ?? '/')\n response.writeHead(status, {\n 'content-type': mock === 'handled' ? 'application/json' : 'text/plain',\n 'x-cwv-mock': mock,\n })\n response.end(body)\n })\n}\n"],"mappings":";;;;;;;;;;AACA,SAAS,eAAe;AACxB,SAAS,iBAAiB;;;ACI1B,OAAO,UAAU;AAIV,SAAS,cAAc,KAA2C;AACvE,SAAO,KAAK,aAAa,CAAC,SAAS,aAAa;AAE9C,YAAQ,OAAO;AACf,UAAM,EAAE,QAAQ,MAAM,KAAK,IAAI,OAAO,KAAK,QAAQ,UAAU,OAAO,QAAQ,OAAO,GAAG;AACtF,aAAS,UAAU,QAAQ;AAAA,MACzB,gBAAgB,SAAS,YAAY,qBAAqB;AAAA,MAC1D,cAAc;AAAA,IAChB,CAAC;AACD,aAAS,IAAI,IAAI;AAAA,EACnB,CAAC;AACH;;;ADZA,IAAM,EAAE,QAAQ,KAAK,IAAI,UAAU;AAAA,EACjC,SAAS,EAAE,QAAQ,EAAE,MAAM,SAAS,GAAG,MAAM,EAAE,MAAM,SAAS,EAAE;AAClE,CAAC;AACD,IAAM,YAAY,QAAQ,OAAO,KAAK,MAAM,CAAC;AAC7C,IAAM,SAAS,MAAM,kBAAkB,SAAS;AAChD,IAAI,EAAE,YAAY,SAAS;AACzB,UAAQ,MAAM,iCAAiC,KAAK,MAAM,EAAE;AAC5D,UAAQ,KAAK,CAAC;AAChB;AACA,cAAc,QAAQ,OAAO,OAAO,KAAK,SAAS,CAAC,EAAE;AAAA,EAAO,OAAO,KAAK,IAAI;AAAA,EAAG;AAAA,EAAa,MAC1F,QAAQ,IAAI,gCAAgC,KAAK,IAAI,EAAE;AACzD;","names":[]}
@@ -1,7 +1,6 @@
1
1
  import {
2
2
  defineStaticAnalysis
3
- } from "../../chunk-LX7EG6PJ.js";
4
- import "../../chunk-PXTU5MPW.js";
3
+ } from "../../chunk-AO526UPR.js";
5
4
  export {
6
5
  defineStaticAnalysis
7
6
  };
@@ -7,9 +7,9 @@ import {
7
7
  } from "../../../chunk-NUOQXAYR.js";
8
8
  import {
9
9
  installWorkspaceSetup
10
- } from "../../../chunk-PMRL4MH6.js";
10
+ } from "../../../chunk-ZDSSUW6A.js";
11
11
  import "../../../chunk-ELZHIN6E.js";
12
- import "../../../chunk-JT7ZMH44.js";
12
+ import "../../../chunk-VE37F4A5.js";
13
13
 
14
14
  // src/roles/test/setup/jest-parity.ts
15
15
  import { expect, vi } from "vitest";
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  pinWorkspaceTimezone
3
- } from "../../../chunk-PMRL4MH6.js";
3
+ } from "../../../chunk-ZDSSUW6A.js";
4
4
  import "../../../chunk-ELZHIN6E.js";
5
- import "../../../chunk-JT7ZMH44.js";
5
+ import "../../../chunk-VE37F4A5.js";
6
6
 
7
7
  // src/roles/test/setup/workspace-entry.ts
8
8
  await pinWorkspaceTimezone();
@@ -7,8 +7,8 @@ import {
7
7
  readTestAdoption,
8
8
  resolveVitest,
9
9
  suiteOf
10
- } from "./chunk-F3Q3JQJ6.js";
11
- import "./chunk-JT7ZMH44.js";
10
+ } from "./chunk-KGZLTDUT.js";
11
+ import "./chunk-VE37F4A5.js";
12
12
  import "./chunk-O7REVMOC.js";
13
13
  import "./chunk-QXFCZON7.js";
14
14
 
@@ -0,0 +1,197 @@
1
+ # Runtime analysis adoption cheat sheet
2
+
3
+ `--runtime-analysis` measures the Core Web Vitals (LCP, CLS, INP) of a pull request on a React front's real builds. It builds the front twice, at the merge base and at the head, and serves both on the machine behind a gateway, with every API call answered from JSON files. It then measures the screens the diff can change in a real Chrome and fails the pull request only for a breach the pull request **creates**.
4
+
5
+ It is on demand: a measure costs minutes and a build, so `sentinel --run` never sweeps it, and a bare `--init` never adopts it. It runs only when you name it.
6
+
7
+ Scope: React fronts on TanStack Router file routes. A Next.js or Svelte front is reported as out of scope, not measured.
8
+
9
+ ## Adopt a front in two steps
10
+
11
+ ```bash
12
+ cd apps/front/<front>
13
+ # 1. write the front's config and the `runtime-analysis` script
14
+ npx --yes @hublo/sentinel@<exact version> --init --runtime-analysis
15
+ # 2. fill runtime-analysis.config.mjs with the front's screens, mocks and build, then check it
16
+ pnpm exec sentinel --inspect --runtime-analysis
17
+ ```
18
+
19
+ `--init` writes `runtime-analysis.config.mjs` with every key and what it means. A re-init never rewrites it, because its screens and mocks are the front's own. `--inspect` checks it before anything is built, and names each problem by its field.
20
+
21
+ ## The config, key by key
22
+
23
+ ```js
24
+ // runtime-analysis.config.mjs, at the front's root
25
+ import { defineRuntimeAnalysis } from '@hublo/sentinel/runtime-analysis'
26
+
27
+ export default defineRuntimeAnalysis({
28
+ root: import.meta.dirname,
29
+ basePath: '/admin',
30
+ health: '/admin/api/health',
31
+ ready: '/bff-admin/session',
32
+ build: {
33
+ output: '.output',
34
+ server: 'server/index.mjs',
35
+ env: { VITE_API_URL: '{origin}/bff-admin' },
36
+ },
37
+ api: [{ path: '/bff-admin/session', file: 'runtime-analysis/api/session.json' }],
38
+ router: { tsconfig: 'tsconfig.app.json', shell: ['src/router.tsx'], routes: 'src/routes' },
39
+ translations: 'src/assets/locales',
40
+ locale: 'fr-FR',
41
+ screens: [
42
+ {
43
+ id: 'contract-types',
44
+ route: 'contract-types/index.tsx',
45
+ path: '/admin/contract-types',
46
+ expectText: ['Types de contrat'],
47
+ interact: { click: 'main button' },
48
+ },
49
+ ],
50
+ })
51
+ ```
52
+
53
+ Every path is relative to the front.
54
+
55
+ | Key | What it is |
56
+ | ------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
57
+ | `basePath` or `mockPrefixes` | Where the app is served. Under `basePath`, the app gets that path and the mocks get the rest. At the root, `mockPrefixes` lists the paths sent to the mocks. Give one, not both. |
58
+ | `health` | The app's health path, polled until the server is up. |
59
+ | `ready` | The call that tells the app is ready, usually the session. A mock in `api` must answer it with 200. |
60
+ | `build.output`, `build.server` | The build output, and the server it starts with (`node <server>`, with `HOST` and `PORT` set). |
61
+ | `build.env` | The build variables. `{origin}` is replaced by the gateway the build is served behind: point every API there, never at a real one. Use placeholders, never a secret. |
62
+ | `api` | One entry per call the screens make: `path`, `file`, optional `method` (GET by default) and `status` (200). |
63
+ | `router` | `tsconfig` resolves the route imports, `shell` lists the files every screen loads, and `routes` is the file routes folder holding `__root.tsx`. |
64
+ | `translations` | Optional. The folder holding `<lang>/<namespace>.json`. A change to one namespace measures only the screens whose code names it. |
65
+ | `locale` | Optional, `en-US` by default. The browser's language, matching how `expectText` is written. |
66
+ | `screens` | What is measured. `route` is relative to `router.routes`, `path` is what is opened, `expectText` lists what must be visible before a figure counts, and `interact` is the one interaction timed for INP (`click`, `clickText` or `type`). Optional: `rows` (a count or a minimum of rows) and `expectSelector`. |
67
+
68
+ A mocked list is written once, not copied out by hand:
69
+
70
+ ```json
71
+ {
72
+ "$repeat": 25,
73
+ "item": { "id": "cwv-{n}", "name": "Type {nn}", "kind": { "$cycle": ["CDI", "CDD"] } }
74
+ }
75
+ ```
76
+
77
+ That is 25 items. `{n}` is the item's number from 1, `{nn}` the same on two digits, and `$cycle` takes its values in turn.
78
+
79
+ ## A front whose server keeps its session
80
+
81
+ host-admin and career read their session through an HTTP call, so `api/session.json` answers it. A front that reads its session in its SERVER (console: better-auth, Redis, a signed cookie) needs two more files, found by name next to its mocks. Neither is a key of the config, and a front without them is measured as before.
82
+
83
+ ```
84
+ runtime-analysis/
85
+ ├── server.env the variables its server reads: test values only
86
+ ├── session.json its test session, as data
87
+ └── api/ its mocks, as for any front
88
+ ```
89
+
90
+ `server.env` is `KEY=VALUE` per line. `{origin}` is the gateway of the side being served, and `{host}` the same without the scheme, for a server that only trusts `https` origins and compares the host:
91
+
92
+ ```
93
+ DEPLOY_ENV=cwv
94
+ BFF_BACKOFFICE_BASE_URL={origin}
95
+ CONSOLE_TRUSTED_ORIGINS=https://{host}
96
+ CACHE_REDIS_URL=redis://127.0.0.1:6379
97
+ ```
98
+
99
+ `session.json` is what the server's store holds for one session, and the cookies the browser sends back. The secret that signs the cookie is a test value in `server.env`, the token is fixed and the expiry far away, so the cookie is a constant written once:
100
+
101
+ ```json
102
+ {
103
+ "store": {
104
+ "url": "redis://127.0.0.1:6379",
105
+ "entries": [{ "key": "console-cwv:cwv-token", "value": { "session": {}, "user": {} } }]
106
+ },
107
+ "cookies": [{ "name": "__Secure-console.session_token", "value": "cwv-token.<signature>" }]
108
+ }
109
+ ```
110
+
111
+ Sentinel writes `store.entries` to the store before the servers start, and sets the cookies on every screen. It never starts the store: in CI it is a service of the workflow, on a machine whatever runs it there (in the monorepo, `pnpm redis:start`).
112
+
113
+ ## Run it on your machine
114
+
115
+ ```bash
116
+ pnpm run runtime-analysis # sentinel --run --runtime-analysis
117
+ ```
118
+
119
+ With no phase, it builds the front once and measures it against itself, base against head on the same build. It judges the result and writes the comment to `runtime-analysis-report/runtime-analysis.md`. Every ❌ in that run is the machine's own noise, which makes it the way to check a new screen before a pull request relies on it.
120
+
121
+ It needs a real Google Chrome: the macOS or Linux install, or `CHROME_PATH`.
122
+
123
+ ## In CI: one command, in phases
124
+
125
+ A CI splits the measure over parallel jobs: one build job per front, then one measure job per front and screen. Each phase is the same command with its name after `--`:
126
+
127
+ | Phase | Where it runs | What it does |
128
+ | --------------------------------------------------------- | ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
129
+ | `detect --base SHA --head SHA` (or `--all`) | in each affected front | Finds which of the front's screens the diff can change. Writes `runtime-analysis-report/detect.json` and prints `screens=a,b`. Fails on an invalid config. |
130
+ | `verdict --pending --detect DIR [--affected FILE]` | once | Writes the first comment, before any build: building, nothing to measure, or an invalid config. |
131
+ | `env --origin URL` | in the build job | Prints the front's build variables as shell exports, `{origin}` replaced. |
132
+ | `measure --screens a,b --base-build DIR --head-build DIR` | per front and screen | Serves both builds behind their gateways and measures. Writes the evidence to `--out`. |
133
+ | `verdict --evidence DIR --detect DIR` | once, at the end | Judges every measure job's evidence. Writes the comment, `verdict.json` and the budget, and exits 1 on a breach. |
134
+
135
+ Options of the final `verdict`:
136
+
137
+ - `--base` and `--head` print the commits.
138
+ - `--run-url` links the run's artifacts.
139
+ - `--jobs` and `--run` take the run's jobs and its creation time, read from the GitHub API, for the time of each phase.
140
+ - `--affected FILE` takes the projects the pull request affects (a JSON array or one per line), for the line saying none of them is a frontend.
141
+ - `--state closed|merged --report-url URL` adds a `notice.md` when the measure fails on a pull request closed meanwhile: GitHub notifies nobody of an edited comment, so the notice is posted as a new one.
142
+
143
+ sentinel never calls nx or the GitHub API. Which fronts a pull request affects, their builds and the posting of the comment stay the workflow's.
144
+
145
+ ## The browser packages: installed only where a measure runs
146
+
147
+ Lighthouse, Puppeteer and Playwright are not dependencies of sentinel, so a module that installs sentinel does not carry them. sentinel ships their manifest and lockfile in `runtime-analysis-deps/`. The `measure` phase installs them with `npm ci` into sentinel's cache, outside the repository: the workspace, its lockfile and its node_modules never change.
148
+
149
+ | Where | |
150
+ | -------------------------- | ------------------------------------------------------------------------------------------------- |
151
+ | The cache | `~/.cache/sentinel/runtime-analysis/<lockfile hash>`, or the folder named by `SENTINEL_CACHE_DIR` |
152
+ | First measure of a version | about 11 s and 213 MB, from the npm registry |
153
+ | Next measures | nothing to install |
154
+
155
+ In CI, set `SENTINEL_CACHE_DIR` to a folder and cache it with `actions/cache`, with the sentinel version as the key, so each version downloads once.
156
+
157
+ ## Reading the comment
158
+
159
+ The title says what happened: ✅ nothing degraded, ❌ a degradation with its metric and screen, ❌ flows not proven, or ❌ a measure that did not complete. Under it come the detection (what was measured and why), then one row per screen with each metric from base to head.
160
+
161
+ **What blocks, and only that:** a metric within Google's "good" threshold at the base (LCP 2500 ms, CLS 0.1, INP 200 ms) and over it at the head, by more than this run's noise. The noise is the base measured against itself in the same run, per round (the p90 of the gaps). These are reported without blocking:
162
+
163
+ - a breach already at the base;
164
+ - a breach within the noise;
165
+ - a move above the noise that stays within the threshold;
166
+ - TBT, which has no threshold of its own.
167
+
168
+ **Every figure is proven first.** Each flow must show:
169
+
170
+ - the screen opened, with its texts;
171
+ - every call answered by a mock;
172
+ - an LCP element that is neither a placeholder nor the login form;
173
+ - a second reading of the browser's own entries that agrees with Lighthouse.
174
+
175
+ A flow that fails a proof fails its screen. Its figure is not judged.
176
+
177
+ The folded sections hold the proof of every flow, the medians and the noise, the builds and settings, the time of each phase, and every flow's values.
178
+
179
+ The comment is sized to the 65,536 characters GitHub keeps of a comment: past that, GitHub cuts it mid-sentence. The headline, the detection and the verdict table always stay. Only the last folded sections drop out, and the comment names them. The full comment is then written beside it, to `runtime-analysis-report/runtime-analysis.full.md`.
180
+
181
+ ## Troubleshooting
182
+
183
+ | What you see | What it means |
184
+ | ------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
185
+ | `runtime-analysis.config.mjs is not valid`, with fields | Fix each named field; `--inspect --runtime-analysis` checks it in seconds. |
186
+ | `no Google Chrome found` | Install Chrome or set `CHROME_PATH`. |
187
+ | `could not install the measure's browser packages … ENOTFOUND on …` | The npm registry was unreachable. In CI, cache `SENTINEL_CACHE_DIR`. |
188
+ | A screen ❌ with `ready 200 (mocked)` failed | The `ready` call has no mock answering 200. |
189
+ | A screen ❌ with `no unhandled request` failed | The screen calls a path no `api` entry answers: add the entry. |
190
+ | `could not write the session to redis://…` | The store `session.json` names is not running. Start it (`pnpm redis:start`, or the workflow's service) and run again. |
191
+ | `this PR changes none of its screens` | The diff reaches none of the screen's route chain, its shell, its translations or the workspace's build inputs. A change the bundler erases (a type, a comment) does not count. |
192
+
193
+ ## What the role will not do
194
+
195
+ - Measure a real environment: both builds are served on the runner, with mocks, so only the code changes between base and head.
196
+ - Measure a screen that is not in the config: a screen is measured only once it is declared with its proofs.
197
+ - Block on a breach the base already had: that is reported, not blamed on the pull request.
@@ -236,11 +236,9 @@ $ sentinel --report --json 2>/dev/null
236
236
  "typescript",
237
237
  "build",
238
238
  "test",
239
- "static-analysis",
240
- "sql"
239
+ "static-analysis"
241
240
  ],
242
241
  "skipped": [
243
- "runtime-analysis",
244
242
  "arch"
245
243
  ],
246
244
  "results": [
@@ -320,32 +318,6 @@ $ sentinel --report --json 2>/dev/null
320
318
  "preset": null,
321
319
  "conformant": false
322
320
  },
323
- {
324
- "project": "svelte-app",
325
- "target": "sql",
326
- "flavour": "svelte",
327
- "ok": true,
328
- "status": "ok",
329
- "migrations": 0,
330
- "codeFiles": 1,
331
- "unsafeFiles": 0,
332
- "base": null,
333
- "migrationsRead": 0,
334
- "migrationsUnchanged": 0,
335
- "migrationsUnread": 0,
336
- "unsafeFilesRead": 0,
337
- "unsafeCalls": 0,
338
- "rawFragmentCalls": 0,
339
- "unsafeUnparsed": 0,
340
- "findings": 0,
341
- "errors": 0,
342
- "rulesOff": [],
343
- "syntaxErrors": 0,
344
- "findingsByRule": {},
345
- "adopted": false,
346
- "preset": null,
347
- "conformant": false
348
- },
349
321
  {
350
322
  "project": "bff-admin",
351
323
  "target": "lint",
@@ -422,32 +394,6 @@ $ sentinel --report --json 2>/dev/null
422
394
  "preset": null,
423
395
  "conformant": false
424
396
  },
425
- {
426
- "project": "bff-admin",
427
- "target": "sql",
428
- "flavour": "nest",
429
- "ok": true,
430
- "status": "ok",
431
- "migrations": 0,
432
- "codeFiles": 1,
433
- "unsafeFiles": 0,
434
- "base": null,
435
- "migrationsRead": 0,
436
- "migrationsUnchanged": 0,
437
- "migrationsUnread": 0,
438
- "unsafeFilesRead": 0,
439
- "unsafeCalls": 0,
440
- "rawFragmentCalls": 0,
441
- "unsafeUnparsed": 0,
442
- "findings": 0,
443
- "errors": 0,
444
- "rulesOff": [],
445
- "syntaxErrors": 0,
446
- "findingsByRule": {},
447
- "adopted": false,
448
- "preset": null,
449
- "conformant": false
450
- },
451
397
  {
452
398
  "project": "react-app",
453
399
  "target": "lint",
@@ -524,32 +470,6 @@ $ sentinel --report --json 2>/dev/null
524
470
  "preset": null,
525
471
  "conformant": false
526
472
  },
527
- {
528
- "project": "react-app",
529
- "target": "sql",
530
- "flavour": "react",
531
- "ok": true,
532
- "status": "ok",
533
- "migrations": 0,
534
- "codeFiles": 1,
535
- "unsafeFiles": 0,
536
- "base": null,
537
- "migrationsRead": 0,
538
- "migrationsUnchanged": 0,
539
- "migrationsUnread": 0,
540
- "unsafeFilesRead": 0,
541
- "unsafeCalls": 0,
542
- "rawFragmentCalls": 0,
543
- "unsafeUnparsed": 0,
544
- "findings": 0,
545
- "errors": 0,
546
- "rulesOff": [],
547
- "syntaxErrors": 0,
548
- "findingsByRule": {},
549
- "adopted": false,
550
- "preset": null,
551
- "conformant": false
552
- },
553
473
  {
554
474
  "project": "utils",
555
475
  "target": "lint",
@@ -613,32 +533,6 @@ $ sentinel --report --json 2>/dev/null
613
533
  "adopted": false,
614
534
  "preset": null,
615
535
  "conformant": false
616
- },
617
- {
618
- "project": "utils",
619
- "target": "sql",
620
- "flavour": "node",
621
- "ok": true,
622
- "status": "ok",
623
- "migrations": 0,
624
- "codeFiles": 1,
625
- "unsafeFiles": 0,
626
- "base": null,
627
- "migrationsRead": 0,
628
- "migrationsUnchanged": 0,
629
- "migrationsUnread": 0,
630
- "unsafeFilesRead": 0,
631
- "unsafeCalls": 0,
632
- "rawFragmentCalls": 0,
633
- "unsafeUnparsed": 0,
634
- "findings": 0,
635
- "errors": 0,
636
- "rulesOff": [],
637
- "syntaxErrors": 0,
638
- "findingsByRule": {},
639
- "adopted": false,
640
- "preset": null,
641
- "conformant": false
642
536
  }
643
537
  ]
644
538
  }
@@ -671,11 +565,9 @@ $ sentinel --report --all --json 2>/dev/null
671
565
  "typescript",
672
566
  "build",
673
567
  "test",
674
- "static-analysis",
675
- "sql"
568
+ "static-analysis"
676
569
  ],
677
570
  "skipped": [
678
- "runtime-analysis",
679
571
  "arch"
680
572
  ],
681
573
  "results": [
@@ -755,32 +647,6 @@ $ sentinel --report --all --json 2>/dev/null
755
647
  "preset": null,
756
648
  "conformant": false
757
649
  },
758
- {
759
- "project": "svelte-app",
760
- "target": "sql",
761
- "flavour": "svelte",
762
- "ok": true,
763
- "status": "ok",
764
- "migrations": 0,
765
- "codeFiles": 1,
766
- "unsafeFiles": 0,
767
- "base": null,
768
- "migrationsRead": 0,
769
- "migrationsUnchanged": 0,
770
- "migrationsUnread": 0,
771
- "unsafeFilesRead": 0,
772
- "unsafeCalls": 0,
773
- "rawFragmentCalls": 0,
774
- "unsafeUnparsed": 0,
775
- "findings": 0,
776
- "errors": 0,
777
- "rulesOff": [],
778
- "syntaxErrors": 0,
779
- "findingsByRule": {},
780
- "adopted": false,
781
- "preset": null,
782
- "conformant": false
783
- },
784
650
  {
785
651
  "project": "bff-admin",
786
652
  "target": "lint",
@@ -857,32 +723,6 @@ $ sentinel --report --all --json 2>/dev/null
857
723
  "preset": null,
858
724
  "conformant": false
859
725
  },
860
- {
861
- "project": "bff-admin",
862
- "target": "sql",
863
- "flavour": "nest",
864
- "ok": true,
865
- "status": "ok",
866
- "migrations": 0,
867
- "codeFiles": 1,
868
- "unsafeFiles": 0,
869
- "base": null,
870
- "migrationsRead": 0,
871
- "migrationsUnchanged": 0,
872
- "migrationsUnread": 0,
873
- "unsafeFilesRead": 0,
874
- "unsafeCalls": 0,
875
- "rawFragmentCalls": 0,
876
- "unsafeUnparsed": 0,
877
- "findings": 0,
878
- "errors": 0,
879
- "rulesOff": [],
880
- "syntaxErrors": 0,
881
- "findingsByRule": {},
882
- "adopted": false,
883
- "preset": null,
884
- "conformant": false
885
- },
886
726
  {
887
727
  "project": "react-app",
888
728
  "target": "lint",
@@ -959,32 +799,6 @@ $ sentinel --report --all --json 2>/dev/null
959
799
  "preset": null,
960
800
  "conformant": false
961
801
  },
962
- {
963
- "project": "react-app",
964
- "target": "sql",
965
- "flavour": "react",
966
- "ok": true,
967
- "status": "ok",
968
- "migrations": 0,
969
- "codeFiles": 1,
970
- "unsafeFiles": 0,
971
- "base": null,
972
- "migrationsRead": 0,
973
- "migrationsUnchanged": 0,
974
- "migrationsUnread": 0,
975
- "unsafeFilesRead": 0,
976
- "unsafeCalls": 0,
977
- "rawFragmentCalls": 0,
978
- "unsafeUnparsed": 0,
979
- "findings": 0,
980
- "errors": 0,
981
- "rulesOff": [],
982
- "syntaxErrors": 0,
983
- "findingsByRule": {},
984
- "adopted": false,
985
- "preset": null,
986
- "conformant": false
987
- },
988
802
  {
989
803
  "project": "utils",
990
804
  "target": "lint",
@@ -1048,32 +862,6 @@ $ sentinel --report --all --json 2>/dev/null
1048
862
  "adopted": false,
1049
863
  "preset": null,
1050
864
  "conformant": false
1051
- },
1052
- {
1053
- "project": "utils",
1054
- "target": "sql",
1055
- "flavour": "node",
1056
- "ok": true,
1057
- "status": "ok",
1058
- "migrations": 0,
1059
- "codeFiles": 1,
1060
- "unsafeFiles": 0,
1061
- "base": null,
1062
- "migrationsRead": 0,
1063
- "migrationsUnchanged": 0,
1064
- "migrationsUnread": 0,
1065
- "unsafeFilesRead": 0,
1066
- "unsafeCalls": 0,
1067
- "rawFragmentCalls": 0,
1068
- "unsafeUnparsed": 0,
1069
- "findings": 0,
1070
- "errors": 0,
1071
- "rulesOff": [],
1072
- "syntaxErrors": 0,
1073
- "findingsByRule": {},
1074
- "adopted": false,
1075
- "preset": null,
1076
- "conformant": false
1077
865
  }
1078
866
  ]
1079
867
  }
@@ -1433,7 +1221,6 @@ $ sentinel --init --dry-run
1433
1221
  + }
1434
1222
  + }
1435
1223
  + }
1436
- sql: no migration (**/migrations/*/migration.sql) and no raw SQL call in this module: nothing for the sql role to read.
1437
1224
  dry run: no files written
1438
1225
  materialized the nest format preset into .oxfmtrc.json (@hublo/sentinel@<version>). oxfmt has no `extends`, so the values live here; `sentinel --status --format` reports modules left behind by a preset change
1439
1226
 
@@ -1512,7 +1299,6 @@ $ sentinel --init --dry-run
1512
1299
  dry run: the lint autofix runs on adoption and can rewrite source, as moving to another linter does; add --rehearse to name the files (it runs the pass in a throwaway copy, as long as the real one)
1513
1300
  dry run: the format autofix runs on adoption and can rewrite source, as moving to another formatter does; add --rehearse to name the files (it runs the pass in a throwaway copy, as long as the real one)
1514
1301
  dry run: would ignore static-analysis-report/ in the root .gitignore
1515
- dry run: would ignore sql-report/ in the root .gitignore
1516
1302
  # exit: 0
1517
1303
  ```
1518
1304
 
@@ -1673,7 +1459,6 @@ $ sentinel --init --dry-run --rehearse
1673
1459
  + }
1674
1460
  + }
1675
1461
  + }
1676
- sql: no migration (**/migrations/*/migration.sql) and no raw SQL call in this module: nothing for the sql role to read.
1677
1462
  dry run: no files written
1678
1463
  materialized the nest format preset into .oxfmtrc.json (@hublo/sentinel@<version>). oxfmt has no `extends`, so the values live here; `sentinel --status --format` reports modules left behind by a preset change
1679
1464
 
@@ -1752,7 +1537,6 @@ $ sentinel --init --dry-run --rehearse
1752
1537
  dry run: the lint autofix cannot be rehearsed yet: its preset is not installed in this module, which is expected before the first `pnpm install`. After it, this dry-run names what it rewrites
1753
1538
  dry run: the format autofix would rewrite 1 file beyond the ones above: project.json
1754
1539
  dry run: would ignore static-analysis-report/ in the root .gitignore
1755
- dry run: would ignore sql-report/ in the root .gitignore
1756
1540
  # exit: 0
1757
1541
  ```
1758
1542
 
@@ -6,8 +6,7 @@ migrating a module see [`lint-adoption.md`](lint-adoption.md),
6
6
  [`typescript-adoption.md`](typescript-adoption.md),
7
7
  [`build-adoption.md`](build-adoption.md),
8
8
  [`test-adoption.md`](test-adoption.md) and
9
- [`static-analysis-adoption.md`](static-analysis-adoption.md); the `sql` role is in
10
- [`sql-adoption.md`](sql-adoption.md). The reference gate `--test` runs a
9
+ [`static-analysis-adoption.md`](static-analysis-adoption.md). The reference gate `--test` runs a
11
10
  migration against is in `test-adoption.md`, not the static-analysis page.
12
11
 
13
12
  ## The grid