@jskit-ai/agent-docs 0.1.374 → 0.1.376

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 (53) hide show
  1. package/guide/agent/app-extras/assistant-conversation.md +15 -5
  2. package/guide/agent/app-extras/assistant.md +10 -1
  3. package/guide/agent/app-setup/database-layer.md +42 -18
  4. package/guide/agent/framework/data-access.md +4 -2
  5. package/guide/agent/framework/material-3.md +4 -2
  6. package/guide/agent/framework/test-pass.md +55 -4
  7. package/guide/agent/framework/typed-features.md +45 -3
  8. package/package.json +1 -1
  9. package/patterns/feature-package/example/booking-engine/package.json +1 -1
  10. package/patterns/minimal-foundation/example/AGENTS.md +4 -2
  11. package/patterns/minimal-foundation/example/package.json +3 -3
  12. package/patterns/shell-foundation/example/AGENTS.md +4 -2
  13. package/patterns/shell-foundation/example/package.json +4 -4
  14. package/patterns/shell-foundation/example/packages/main/package.json +1 -1
  15. package/patterns/shell-foundation/example/src/components/ShellLayout.vue +13 -10
  16. package/reference/autogen/KERNEL_MAP.md +2 -0
  17. package/reference/autogen/PATTERN_INDEX.md +39 -39
  18. package/reference/autogen/packages/agent-docs.md +1 -1
  19. package/reference/autogen/packages/assistant-core.md +24 -11
  20. package/reference/autogen/packages/assistant-runtime.md +1 -0
  21. package/reference/autogen/packages/database-runtime.md +26 -4
  22. package/reference/autogen/packages/kernel.md +5 -2
  23. package/reference/autogen/packages/oidc-issuer-core.md +2 -2
  24. package/reference/autogen/packages/resource-runtime.md +1 -1
  25. package/reference/autogen/packages/shell-web.md +9 -1
  26. package/reference/autogen/tooling/jskit-catalog.md +31 -16
  27. package/reference/autogen/tooling/jskit-release.md +2 -1
  28. package/reference/autogen/tooling/testUtils.md +7 -0
  29. package/skills/jskit/references/data-access.md +4 -2
  30. package/skills/jskit/references/database-layer.md +42 -18
  31. package/skills/jskit/references/material-3.md +4 -2
  32. package/skills/jskit/references/pattern-index.md +39 -39
  33. package/skills/jskit/references/patterns/app/minimal-foundation/example/AGENTS.md +4 -2
  34. package/skills/jskit/references/patterns/app/minimal-foundation/example/package.json +3 -3
  35. package/skills/jskit/references/patterns/app/shell-foundation/example/AGENTS.md +4 -2
  36. package/skills/jskit/references/patterns/app/shell-foundation/example/package.json +4 -4
  37. package/skills/jskit/references/patterns/app/shell-foundation/example/packages/main/package.json +1 -1
  38. package/skills/jskit/references/patterns/app/shell-foundation/example/src/components/ShellLayout.vue +13 -10
  39. package/skills/jskit/references/patterns/auth/accounts-hub/example/package.json +3 -3
  40. package/skills/jskit/references/patterns/auth/oidc-sign-in/example/package.json +2 -2
  41. package/skills/jskit/references/patterns/auth/supabase-auth/example/package.json +1 -1
  42. package/skills/jskit/references/patterns/connectors/calendar-cli/example/package.json +5 -5
  43. package/skills/jskit/references/patterns/crud/crud-feature-package/example/packages/books/package.json +3 -3
  44. package/skills/jskit/references/patterns/crud/crud-screen-set/PATTERN.md +3 -1
  45. package/skills/jskit/references/patterns/database/mysql-application/example/package.json +2 -2
  46. package/skills/jskit/references/patterns/database/postgres-application/example/package.json +2 -2
  47. package/skills/jskit/references/patterns/realtime/realtime-application/example/package.json +2 -2
  48. package/skills/jskit/references/patterns/server/feature-package/example/booking-engine/package.json +1 -1
  49. package/skills/jskit/references/patterns/shell/application-shell/example/src/components/ShellLayout.vue +13 -10
  50. package/skills/jskit/references/patterns/users/user-administration-server/example/packages/users/package.json +3 -3
  51. package/skills/jskit/references/patterns/users/user-administration-server/example/packages/users-workspace/package.json +6 -6
  52. package/skills/jskit/references/test-pass.md +55 -4
  53. package/skills/jskit/references/typed-features.md +45 -3
@@ -29,8 +29,10 @@ Read the guide's page before the work it covers:
29
29
  `https://mobily-enterprises.github.io/jskit-ai/guide/framework/material-3`
30
30
  - tests:
31
31
  `https://mobily-enterprises.github.io/jskit-ai/guide/framework/typed-features#test-files-run-in-parallel`,
32
- and browser tests:
33
- `https://mobily-enterprises.github.io/jskit-ai/guide/framework/ui-operations#browser-verification`
32
+ browser tests:
33
+ `https://mobily-enterprises.github.io/jskit-ai/guide/framework/ui-operations#browser-verification`,
34
+ and a slow or failing suite, run whole first:
35
+ `https://mobily-enterprises.github.io/jskit-ai/guide/framework/test-pass`
34
36
  - a new capability: the pattern library; read the narrow pattern completely
35
37
  before implementing.
36
38
 
@@ -34,7 +34,7 @@
34
34
  "dependencies": {
35
35
  "@local/main": "0.1.0",
36
36
  "@fastify/static": "^10.1.3",
37
- "@jskit-ai/kernel": "0.2.37",
37
+ "@jskit-ai/kernel": "0.2.38",
38
38
  "@jskit-ai/material-web": "0.1.17",
39
39
  "@tanstack/vue-query": "^5.101.0",
40
40
  "fastify": "^5.12.7",
@@ -44,13 +44,13 @@
44
44
  "vue": "^3.5.44",
45
45
  "vue-router": "^5.3.1",
46
46
  "vuetify": "^4.3.0",
47
- "@jskit-ai/http-runtime": "0.2.38",
47
+ "@jskit-ai/http-runtime": "0.2.39",
48
48
  "@fastify/fast-json-stringify-compiler": "^5.1.0",
49
49
  "@vue/devtools-api": "^8.2.1"
50
50
  },
51
51
  "devDependencies": {
52
52
  "@jskit-ai/config-eslint": "0.1.255",
53
- "@jskit-ai/jskit-catalog": "0.2.126",
53
+ "@jskit-ai/jskit-catalog": "0.2.128",
54
54
  "@playwright/test": "1.61.1",
55
55
  "@vitejs/plugin-vue": "^6.0.7",
56
56
  "eslint": "^10.8.0",
@@ -29,8 +29,10 @@ Read the guide's page before the work it covers:
29
29
  `https://mobily-enterprises.github.io/jskit-ai/guide/framework/material-3`
30
30
  - tests:
31
31
  `https://mobily-enterprises.github.io/jskit-ai/guide/framework/typed-features#test-files-run-in-parallel`,
32
- and browser tests:
33
- `https://mobily-enterprises.github.io/jskit-ai/guide/framework/ui-operations#browser-verification`
32
+ browser tests:
33
+ `https://mobily-enterprises.github.io/jskit-ai/guide/framework/ui-operations#browser-verification`,
34
+ and a slow or failing suite, run whole first:
35
+ `https://mobily-enterprises.github.io/jskit-ai/guide/framework/test-pass`
34
36
  - a new capability: the pattern library; read the narrow pattern completely
35
37
  before implementing.
36
38
 
@@ -34,7 +34,7 @@
34
34
  "dependencies": {
35
35
  "@local/main": "0.1.0",
36
36
  "@fastify/static": "^10.1.3",
37
- "@jskit-ai/kernel": "0.2.37",
37
+ "@jskit-ai/kernel": "0.2.38",
38
38
  "@jskit-ai/material-web": "0.1.17",
39
39
  "@tanstack/vue-query": "^5.101.0",
40
40
  "fastify": "^5.12.7",
@@ -44,14 +44,14 @@
44
44
  "vue": "^3.5.44",
45
45
  "vue-router": "^5.3.1",
46
46
  "vuetify": "^4.3.0",
47
- "@jskit-ai/http-runtime": "0.2.38",
48
- "@jskit-ai/shell-web": "0.2.62",
47
+ "@jskit-ai/http-runtime": "0.2.39",
48
+ "@jskit-ai/shell-web": "0.2.63",
49
49
  "@fastify/fast-json-stringify-compiler": "^5.1.0",
50
50
  "@vue/devtools-api": "^8.2.1"
51
51
  },
52
52
  "devDependencies": {
53
53
  "@jskit-ai/config-eslint": "0.1.255",
54
- "@jskit-ai/jskit-catalog": "0.2.126",
54
+ "@jskit-ai/jskit-catalog": "0.2.128",
55
55
  "@playwright/test": "1.61.1",
56
56
  "@vitejs/plugin-vue": "^6.0.7",
57
57
  "eslint": "^10.8.0",
@@ -9,7 +9,7 @@
9
9
  },
10
10
  "description": "App-local runtime composition and lightweight glue.",
11
11
  "dependencies": {
12
- "@jskit-ai/kernel": "0.2.37"
12
+ "@jskit-ai/kernel": "0.2.38"
13
13
  },
14
14
  "jskit": {
15
15
  "kind": "runtime",
@@ -1,13 +1,16 @@
1
- <script>
2
- import { h } from "vue";
1
+ <script setup>
3
2
  import PackageShellLayout from "@jskit-ai/shell-web/client/components/ShellLayout";
4
3
 
5
- export default {
6
- name: "ShellLayout",
7
- inheritAttrs: false,
8
- setup(_, { attrs, slots }) {
9
- // Keep drawerWidth, railWidth, navigationItemSpacing, and future shell props package-owned.
10
- return () => h(PackageShellLayout, attrs, slots);
11
- }
12
- };
4
+ // Keep drawerWidth, railWidth, navigationItemSpacing, and future shell props package-owned.
5
+ // A template, not a render function, whose root is the layout alone (no comment beside it): the page a surface gives
6
+ // reaches the layout as a stable slot, so the layout redraws its app bar, navigation and page area only when what they
7
+ // show changes. Pages give the layout their content; write the layout's own slots (top-left, top-right, menu) here, as
8
+ // template slots.
9
+ defineOptions({ name: "ShellLayout", inheritAttrs: false });
13
10
  </script>
11
+
12
+ <template>
13
+ <PackageShellLayout v-bind="$attrs">
14
+ <slot />
15
+ </PackageShellLayout>
16
+ </template>
@@ -2,8 +2,8 @@
2
2
  "private": true,
3
3
  "type": "module",
4
4
  "dependencies": {
5
- "@jskit-ai/database-runtime": "0.1.294",
6
- "@jskit-ai/database-runtime-mysql": "0.1.292",
7
- "@jskit-ai/oidc-issuer-core": "0.1.63"
5
+ "@jskit-ai/database-runtime": "0.1.295",
6
+ "@jskit-ai/database-runtime-mysql": "0.1.293",
7
+ "@jskit-ai/oidc-issuer-core": "0.1.65"
8
8
  }
9
9
  }
@@ -2,7 +2,7 @@
2
2
  "private": true,
3
3
  "type": "module",
4
4
  "dependencies": {
5
- "@jskit-ai/auth-provider-oidc-core": "0.2.79",
6
- "@jskit-ai/auth-web": "0.2.70"
5
+ "@jskit-ai/auth-provider-oidc-core": "0.2.81",
6
+ "@jskit-ai/auth-web": "0.2.71"
7
7
  }
8
8
  }
@@ -2,6 +2,6 @@
2
2
  "private": true,
3
3
  "type": "module",
4
4
  "dependencies": {
5
- "@jskit-ai/auth-provider-supabase-core": "0.2.45"
5
+ "@jskit-ai/auth-provider-supabase-core": "0.2.46"
6
6
  }
7
7
  }
@@ -7,11 +7,11 @@
7
7
  "db:migrate:status": "knex --knexfile ./knexfile.js migrate:list"
8
8
  },
9
9
  "dependencies": {
10
- "@jskit-ai/connectors-core": "0.2.63",
11
- "@jskit-ai/connector-google-calendar": "0.2.63",
12
- "@jskit-ai/database-runtime": "0.1.294",
13
- "@jskit-ai/database-runtime-mysql": "0.1.292",
14
- "@jskit-ai/kernel": "0.2.37",
10
+ "@jskit-ai/connectors-core": "0.2.64",
11
+ "@jskit-ai/connector-google-calendar": "0.2.64",
12
+ "@jskit-ai/database-runtime": "0.1.295",
13
+ "@jskit-ai/database-runtime-mysql": "0.1.293",
14
+ "@jskit-ai/kernel": "0.2.38",
15
15
  "knex": "^3.1.0"
16
16
  }
17
17
  }
@@ -9,9 +9,9 @@
9
9
  "./shared": "./src/shared/index.js"
10
10
  },
11
11
  "dependencies": {
12
- "@jskit-ai/crud-core": "0.2.64",
13
- "@jskit-ai/resource-core": "0.1.228",
14
- "@jskit-ai/resource-crud-core": "0.1.230"
12
+ "@jskit-ai/crud-core": "0.2.65",
13
+ "@jskit-ai/resource-core": "0.1.229",
14
+ "@jskit-ai/resource-crud-core": "0.1.231"
15
15
  },
16
16
  "jskit": {
17
17
  "kind": "runtime",
@@ -215,7 +215,9 @@ relation's `labelKey`, and what `fields.serviceId.output.includeFields` names.
215
215
  - Verify create, edit, validation failure, delete confirmation, and navigation.
216
216
  - Verify filters and actions when declared.
217
217
  - Delay lookup options and confirm a selection field never shows a stored id.
218
- - Exercise compact, medium, and expanded widths with Playwright.
218
+ - Run the journeys at desktop, and at phone where their steps differ; check the
219
+ layout of the finished pages at compact, medium, and expanded widths with
220
+ Playwright.
219
221
  - Confirm keyboard access, 48 CSS-pixel compact targets, no horizontal overflow,
220
222
  and toast-based mutation feedback.
221
223
 
@@ -9,7 +9,7 @@
9
9
  "test": "jskit test --databases"
10
10
  },
11
11
  "dependencies": {
12
- "@jskit-ai/database-runtime": "0.1.294",
13
- "@jskit-ai/database-runtime-mysql": "0.1.292"
12
+ "@jskit-ai/database-runtime": "0.1.295",
13
+ "@jskit-ai/database-runtime-mysql": "0.1.293"
14
14
  }
15
15
  }
@@ -9,7 +9,7 @@
9
9
  "test": "jskit test --databases"
10
10
  },
11
11
  "dependencies": {
12
- "@jskit-ai/database-runtime": "0.1.294",
13
- "@jskit-ai/database-runtime-postgres": "0.1.291"
12
+ "@jskit-ai/database-runtime": "0.1.295",
13
+ "@jskit-ai/database-runtime-postgres": "0.1.292"
14
14
  }
15
15
  }
@@ -2,7 +2,7 @@
2
2
  "private": true,
3
3
  "type": "module",
4
4
  "dependencies": {
5
- "@jskit-ai/realtime": "0.2.65",
6
- "@jskit-ai/shell-web": "0.2.62"
5
+ "@jskit-ai/realtime": "0.2.66",
6
+ "@jskit-ai/shell-web": "0.2.63"
7
7
  }
8
8
  }
@@ -5,7 +5,7 @@
5
5
  "private": true,
6
6
  "type": "module",
7
7
  "dependencies": {
8
- "@jskit-ai/kernel": "0.2.37",
8
+ "@jskit-ai/kernel": "0.2.38",
9
9
  "json-rest-schema": "^1.0.20"
10
10
  },
11
11
  "exports": {
@@ -1,13 +1,16 @@
1
- <script>
2
- import { h } from "vue";
1
+ <script setup>
3
2
  import PackageShellLayout from "@jskit-ai/shell-web/client/components/ShellLayout";
4
3
 
5
- export default {
6
- name: "ShellLayout",
7
- inheritAttrs: false,
8
- setup(_, { attrs, slots }) {
9
- // Keep drawerWidth, railWidth, navigationItemSpacing, and future shell props package-owned.
10
- return () => h(PackageShellLayout, attrs, slots);
11
- }
12
- };
4
+ // Keep drawerWidth, railWidth, navigationItemSpacing, and future shell props package-owned.
5
+ // A template, not a render function, whose root is the layout alone (no comment beside it): the page a surface gives
6
+ // reaches the layout as a stable slot, so the layout redraws its app bar, navigation and page area only when what they
7
+ // show changes. Pages give the layout their content; write the layout's own slots (top-left, top-right, menu) here, as
8
+ // template slots.
9
+ defineOptions({ name: "ShellLayout", inheritAttrs: false });
13
10
  </script>
11
+
12
+ <template>
13
+ <PackageShellLayout v-bind="$attrs">
14
+ <slot />
15
+ </PackageShellLayout>
16
+ </template>
@@ -10,9 +10,9 @@
10
10
  "./shared": "./src/shared/index.js"
11
11
  },
12
12
  "dependencies": {
13
- "@jskit-ai/crud-core": "0.2.64",
14
- "@jskit-ai/resource-crud-core": "0.1.230",
15
- "@jskit-ai/users-core": "0.2.75"
13
+ "@jskit-ai/crud-core": "0.2.65",
14
+ "@jskit-ai/resource-crud-core": "0.1.231",
15
+ "@jskit-ai/users-core": "0.2.76"
16
16
  },
17
17
  "jskit": {
18
18
  "kind": "runtime",
@@ -10,14 +10,14 @@
10
10
  "./shared": "./src/shared/index.js"
11
11
  },
12
12
  "dependencies": {
13
- "@jskit-ai/crud-core": "0.2.64",
14
- "@jskit-ai/resource-crud-core": "0.1.230",
15
- "@jskit-ai/users-core": "0.2.75",
16
- "@jskit-ai/workspaces-core": "0.2.75"
13
+ "@jskit-ai/crud-core": "0.2.65",
14
+ "@jskit-ai/resource-crud-core": "0.1.231",
15
+ "@jskit-ai/users-core": "0.2.76",
16
+ "@jskit-ai/workspaces-core": "0.2.76"
17
17
  },
18
18
  "peerDependencies": {
19
- "@jskit-ai/kernel": "0.2.37",
20
- "@jskit-ai/resource-runtime": "0.2.60"
19
+ "@jskit-ai/kernel": "0.2.38",
20
+ "@jskit-ai/resource-runtime": "0.2.61"
21
21
  },
22
22
  "jskit": {
23
23
  "kind": "runtime",
@@ -14,8 +14,19 @@ The rules it applies are in [Typed features](typed-features.md),
14
14
  [UI operations](ui-operations.md); query counts belong to the
15
15
  [data pass](data-pass.md).
16
16
 
17
- ## Run the checks first
17
+ ## Run the whole suite first
18
18
 
19
+ - Start from one run of the whole suite, as `npm run verify` runs it: each of
20
+ its parts once, with the same commands, environment and
21
+ `V64_TEST_CONCURRENCY`, going on past a part that fails, each part's full
22
+ output and exit status kept in a file, with `jskit test`'s
23
+ `file-times.json`. This run is the pass's measurement before.
24
+ - Read that run to find what is wrong: the slowest files and parametrized
25
+ tests and where their time goes, tests repeated per width, locale, theme,
26
+ role or provider, each test's time before its first check, files or
27
+ packages run one after another, failures, skips with no covering run, and
28
+ `JSKIT_TEST_NETWORK_REFUSED` or warning lines. Fix from that run's evidence,
29
+ never from guesses or partial runs, and prove each fix against its numbers.
19
30
  - `npx jskit check` reads the test scripts, test files, Playwright and Vitest
20
31
  configs, CI workflows and the root Vite config, and names what makes a run
21
32
  slow, fragile or unsafe, each finding with the change to make
@@ -52,6 +63,14 @@ The rules it applies are in [Typed features](typed-features.md),
52
63
  of serial runs queued one after another. Run on the host's test machine, when the host offers one, not on a
53
64
  shared development host; a time taken while other work loads the machine is
54
65
  reported as such and never used as a baseline.
66
+ - From that run, rank the time by file and by parametrized test:
67
+ `file-times.json` and each part's 10 slowest files and tests, with a
68
+ parametrized test's variants (a loop over widths, roles or providers) summed
69
+ from the kept output. For each top item, say where its time goes:
70
+ preparation, server start, page load, sign-in, or its own checks.
71
+ - List the tests repeated per width, locale, theme, role or provider, with the
72
+ minutes in their repeated parts, and take each browser test's time before its
73
+ first check from its trace or from a timestamp at that check.
55
74
  - The pass's own measurement, one run of each part before the work and one
56
75
  after, is part of the pass the person asked for. `npm run verify`, the whole
57
76
  run, runs once, at the end, only with the person's OK.
@@ -136,6 +155,35 @@ The rules it applies are in [Typed features](typed-features.md),
136
155
  A build that writes into its own inputs is never reused (`not kept for
137
156
  reuse, as src changed while it ran`): vue-router's generated types go to
138
157
  `types/typed-router.d.ts`, outside `src`.
158
+ - Screen sizes are covered once each, not by repeating journeys. The full
159
+ journey runs once at desktop. At phone, it runs only the steps that differ
160
+ there: the drawer, the bottom navigation, a dialog that goes full screen. The
161
+ other widths get layout checks on the finished pages, with
162
+ `page.setViewportSize()` and the layout's assertions. A page that decides its
163
+ layout when it loads is reloaded at the new size first. A test for several
164
+ locales, themes, roles or providers repeats only the checks the variant
165
+ changes. A parametrized test's variants share the setup they don't change: a
166
+ `before` hook or a worker-scoped fixture, not a rebuild per variant. The
167
+ minutes in repeated parts, before and after, prove it.
168
+ - What most of a test's time goes to before its first check is paid once per
169
+ worker or file: `browserTestConfig()`'s `signIn` module signs each worker in
170
+ once, and a worker-scoped fixture holds an app or page every test of the
171
+ worker shares. Each test's time before its first check, before and after,
172
+ proves it.
173
+ - No test runs `npm install`, `npm ci`, `git clone` or a build of its own:
174
+ what it needs is made once by `--test-global-setup`. A search of the test
175
+ files and helpers for those commands proves it.
176
+ - A file that holds a large share of a part's wall time is split at its real
177
+ seams, as its tests run in turn: `file-times.json` shows its share, and the
178
+ part's wall time before and after proves the split.
179
+ - An app of several packages runs every package's test files in one parallel
180
+ pool: `npm --workspaces test` runs them package after package. The whole
181
+ run's wall time, near the sum of all files' times divided by the budget,
182
+ proves it.
183
+ - No script runs a suite, build or check twice: `npm run verify` and CI run
184
+ each part once, a preliminary check repeats nothing the run after it covers,
185
+ and a check that passed on the exact tree is never run again. Each part
186
+ starting once in the whole run's output proves it.
139
187
  - No fixed sleep: a web-first assertion (`await expect(locator).toBeVisible()`),
140
188
  `expect.poll()`, the event itself, or a fake clock (`mock.timers`,
141
189
  `vi.useFakeTimers()`, `page.clock`) for the app's own delays. A poll's
@@ -146,10 +194,13 @@ The rules it applies are in [Typed features](typed-features.md),
146
194
  `// jskit-test: fixed-wait - <what the window proves, or the latency the stand-in simulates>`.
147
195
  - A file imports what it needs at its top level, so loading counts against the
148
196
  file, not a test's time limit.
149
- - The bounds stay: `jskit test`'s 10 minutes a file and 45 a run, and
197
+ - The bounds stay: `jskit test`'s 10 minutes a file and 45 a run, its 10
198
+ seconds a file's process may live on after its last test (the linger
199
+ bound, which names what a test left open, or says the file was busy), and
150
200
  `browserTestConfig()`'s `actionTimeout`, `navigationTimeout` and
151
- `globalTimeout`. A bound in `test-time-bounds.json` rises only with a
152
- measurement of the work's real need.
201
+ `globalTimeout`. A bound in
202
+ `test-time-bounds.json` rises only with a measurement of the work's real
203
+ need; a file stopped at the linger bound closes what its tests leave open.
153
204
  - A passing run prints what a person reads: test servers log at
154
205
  `LOG_LEVEL=warn` unless the shell asks for more.
155
206
 
@@ -1101,8 +1101,14 @@ the last run's largest app server reached.**
1101
1101
  same number for a config.
1102
1102
  - A Node test file is named `<name>.test.js`, and a database test
1103
1103
  `<name>.integration.test.js`: given no files, `jskit test` runs node's
1104
- default pattern and fails on a `tests/` file it would leave out, such as
1105
- `<name>.integration.js` or `<name>.spec.js`.
1104
+ default pattern, less the files under a `support/` or `fixtures/` folder or
1105
+ `src/test/` not named as tests, and fails on a `tests/` file it would leave
1106
+ out, such as `<name>.integration.js` or `<name>.spec.js`, and on a run that
1107
+ takes no test file at all, before it prepares any test database.
1108
+ - A helper or fixture that tests import goes under `test/support/` or
1109
+ `test/fixtures/`, named as no test is (not `test-*.js`, `*.test.js`,
1110
+ `*_test.js` or `*-test.js`): `jskit test` fails a file it takes that declares
1111
+ no tests, naming it.
1106
1112
  - No script passes a fixed concurrency or worker count. `jskit check` fails a
1107
1113
  package script that runs `node --test` directly or passes one, a Vitest
1108
1114
  config those scripts use whose `maxWorkers` does not come from
@@ -1150,6 +1156,26 @@ the last run's largest app server reached.**
1150
1156
  each test signing in. `jskit check` fails a webServer that runs the development server
1151
1157
  (`npm run develop`, `vite`), one webServer shared by every worker, and a
1152
1158
  config without a `globalTimeout`.
1159
+ - Every test of a worker reaches its server from 127.0.0.1, as a different
1160
+ person each time, so the servers `jskit browser tests` starts count no
1161
+ per-address rate limit: a route's `rateLimit`, auth's sign-in limits and the
1162
+ accounts hub's per-address counters. The launcher sets
1163
+ `JSKIT_BROWSER_TEST_SERVER=1`, and a server with it whose `APP_ENV` is not
1164
+ `test` refuses to start. Prove a limit with a Node test against an ordinary
1165
+ server.
1166
+ - A failed test keeps its trace with DOM snapshots. To take them, Playwright
1167
+ runs a script in every frame, and Chromium logs `Blocked script execution in
1168
+ 'about:srcdoc' because the document's frame is sandboxed and the
1169
+ 'allow-scripts' permission is not set.` for each frame sandboxed without
1170
+ `allow-scripts`, such as an email preview: the sandbox at work, not the app.
1171
+ A test that fails on console errors leaves out that line, and only that line.
1172
+ - JSKIT's realtime connects by WebSocket only, which `page.route()` and
1173
+ `context.route()` never see, so an HTTP route that aborts `/socket.io`
1174
+ changes nothing. A test that must run without live updates closes the socket
1175
+ with `context.routeWebSocket(/\/socket\.io\//, (socket) => socket.close())`
1176
+ before its page opens. Any HTTP route also turns the browser's cache off for
1177
+ its page or context, so a guard that only watches requests listens to
1178
+ `page.on("request")` instead.
1153
1179
  - A file that truly cannot run beside others, because it holds a resource of
1154
1180
  the whole machine, says why on its first line,
1155
1181
  `// jskit-test: alone - <reason>`. `jskit test` runs it after the others,
@@ -1180,6 +1206,22 @@ the last run's largest app server reached.**
1180
1206
  files still finish and report: look for what it leaves open (a server, child
1181
1207
  process, timer or socket) or a test without a timeout. A file with its own
1182
1208
  bound is stopped at twice that bound.
1209
+ - A file whose tests have all ended but whose process is still running 10
1210
+ seconds later (the linger bound, `lingerMs`; its `after` hooks run within
1211
+ it) is stopped too, and fails the run by name with what its process still
1212
+ holds open, from `process.getActiveResourcesInfo()` read inside it, less
1213
+ its own stdout and stderr, and stdin unless something reads it: `Timeout`
1214
+ for an interval or timer, `TCPServerWrap` for a listening server,
1215
+ `TCPSocketWrap` for a connection, `ProcessWrap` for a child process,
1216
+ `PipeWrap` for a pipe or stdin being read. A test left it running: close
1217
+ it in the test or an `after` hook. A file still busy past the bound with
1218
+ nothing open fails the run as `busy, not held open`, with how long it
1219
+ lived on, whether its stop met it late or it ended by itself first: finish
1220
+ the work it does after its last test within the tests. A file's process
1221
+ normally ends within moments of its last test, and the report says the
1222
+ longest any took against the bound. Files marked `alone` or `network` get
1223
+ the same bound. A suite whose measured cleanup needs longer sets `lingerMs` in
1224
+ `test-time-bounds.json`, with the measurement in the commit that raises it.
1183
1225
 
1184
1226
  Why: `jskit test` and `testConcurrency()` read one budget, so every runner
1185
1227
  uses the machine without starving the other runs on it.
@@ -1441,7 +1483,7 @@ that must run alone says so on its own first line instead.
1441
1483
  | `test/playwright-isolation` | a Playwright webServer every worker shares, without `browserTestConfig()` | [Test files run in parallel](#test-files-run-in-parallel) |
1442
1484
  | `test/playwright-global-timeout` | a Playwright config without a `globalTimeout` (or `browserTestConfig()`), or with `globalTimeout: 0` | [Test files run in parallel](#test-files-run-in-parallel) |
1443
1485
  | `test/vitest-workers` | `--maxWorkers`, `--minWorkers` or `--no-file-parallelism` passed to Vitest, or its config without `maxWorkers: testConcurrency()` or with `fileParallelism: false` | [Test files run in parallel](#test-files-run-in-parallel) |
1444
- | `test/script-files` | a script that gives `jskit test` the files node's default pattern selects anyway (`jskit test --databases tests/**/*.test.js`), so `npm test -- <file>` runs every file and that one; drop them, as `jskit test` finds those files itself. A script that runs some of them (`tests/server/*.test.js`) or files the pattern leaves out (`tests/*.integration.js`) names them for a reason and is not reported | [Test files run in parallel](#test-files-run-in-parallel) |
1486
+ | `test/script-files` | a script that gives `jskit test` the files node's default pattern selects anyway (`jskit test --databases tests/**/*.test.js`), so `npm test -- <file>` runs every file and that one; drop them, as `jskit test` finds those files itself. While a `tests/` file named as a test ends in no `.test.js` (`x.integration.js`), which `jskit test` given no files refuses, the finding names it to rename first (a database test: `<name>.integration.test.js`). A script that runs some of them (`tests/server/*.test.js`) or files the pattern leaves out (`tests/bench/*.bench.js`) names them for a reason and is not reported | [Test files run in parallel](#test-files-run-in-parallel) |
1445
1487
 
1446
1488
  The rules see shapes, not intent. Feature files, owned state beyond
1447
1489
  registries, shutdown, loggers, shared action fields, strict inputs, the action