@roomi-fields/grillhouse 0.49.0 → 0.50.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 (315) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/CHANGELOG.md +38 -0
  3. package/bin/grillhouse.mjs +2 -0
  4. package/cadre/templates/projet/.github/workflows/ci.yml +5 -0
  5. package/cadre/templates/projet/.github/workflows/nuit.yml +6 -4
  6. package/cadre/templates/projet/CLAUDE.md +13 -96
  7. package/cadre/templates/projet/docs/agents/issue-tracker.md +5 -5
  8. package/charte.md +88 -96
  9. package/dist/temporal/acte.d.ts +9 -0
  10. package/dist/temporal/acte.js +45 -21
  11. package/dist/temporal/acte.js.map +1 -1
  12. package/dist/temporal/circuit/activites.js +2 -1
  13. package/dist/temporal/circuit/activites.js.map +1 -1
  14. package/dist/temporal/circuit/appel.js +2 -2
  15. package/dist/temporal/circuit/appel.js.map +1 -1
  16. package/dist/temporal/circuit/client.d.ts +2 -4
  17. package/dist/temporal/circuit/client.js +5 -8
  18. package/dist/temporal/circuit/client.js.map +1 -1
  19. package/dist/temporal/circuit/commande.js +5 -4
  20. package/dist/temporal/circuit/commande.js.map +1 -1
  21. package/dist/temporal/circuit/contrat.d.ts +3 -3
  22. package/dist/temporal/circuit/contrat.js +2 -2
  23. package/dist/temporal/circuit/contrat.js.map +1 -1
  24. package/dist/temporal/circuit/deroule.js +4 -4
  25. package/dist/temporal/circuit/deroule.js.map +1 -1
  26. package/dist/temporal/commande.js +1 -1
  27. package/dist/temporal/commande.js.map +1 -1
  28. package/dist/temporal/deroules.js +3 -4
  29. package/dist/temporal/deroules.js.map +1 -1
  30. package/dist/temporal/etat.js +1 -1
  31. package/dist/temporal/etat.js.map +1 -1
  32. package/dist/temporal/file/activites.js +2 -1
  33. package/dist/temporal/file/activites.js.map +1 -1
  34. package/dist/temporal/file/client.js.map +1 -1
  35. package/dist/temporal/file/contrat.js +3 -2
  36. package/dist/temporal/file/contrat.js.map +1 -1
  37. package/dist/temporal/file/deroule.js +2 -1
  38. package/dist/temporal/file/deroule.js.map +1 -1
  39. package/dist/temporal/installation.js +2 -0
  40. package/dist/temporal/installation.js.map +1 -1
  41. package/dist/temporal/nuits/activites.js +4 -3
  42. package/dist/temporal/nuits/activites.js.map +1 -1
  43. package/dist/temporal/nuits/appel.js +2 -1
  44. package/dist/temporal/nuits/appel.js.map +1 -1
  45. package/dist/temporal/nuits/choix.js +2 -1
  46. package/dist/temporal/nuits/choix.js.map +1 -1
  47. package/dist/temporal/nuits/client.js +2 -1
  48. package/dist/temporal/nuits/client.js.map +1 -1
  49. package/dist/temporal/nuits/commande.js +2 -1
  50. package/dist/temporal/nuits/commande.js.map +1 -1
  51. package/dist/temporal/nuits/contrat.js +2 -1
  52. package/dist/temporal/nuits/contrat.js.map +1 -1
  53. package/dist/temporal/nuits/deroule.js +2 -1
  54. package/dist/temporal/nuits/deroule.js.map +1 -1
  55. package/dist/temporal/places/activites.js +2 -1
  56. package/dist/temporal/places/activites.js.map +1 -1
  57. package/dist/temporal/places/client.js +1 -0
  58. package/dist/temporal/places/client.js.map +1 -1
  59. package/dist/temporal/places/deroule.js +4 -5
  60. package/dist/temporal/places/deroule.js.map +1 -1
  61. package/dist/temporal/tickets/activites.js +1 -1
  62. package/dist/temporal/tickets/activites.js.map +1 -1
  63. package/dist/temporal/tickets/deroule.js +4 -4
  64. package/dist/temporal/tickets/deroule.js.map +1 -1
  65. package/docs/ARCHITECTURE.md +35 -13
  66. package/docs/CADRE.md +10 -68
  67. package/docs/INTERFACE.md +59 -179
  68. package/docs/architecture/circuit.md +440 -0
  69. package/docs/architecture/entree.md +281 -0
  70. package/docs/architecture/greffon.md +284 -0
  71. package/docs/architecture/installation.md +306 -0
  72. package/docs/architecture/machine.md +383 -0
  73. package/docs/architecture/tests.md +337 -0
  74. package/package.json +1 -1
  75. package/scripts/abi-des-dependances.mjs +2 -1
  76. package/scripts/activites.mjs +8 -8
  77. package/scripts/aiguillage.mjs +4 -4
  78. package/scripts/arbitrages.mjs +1 -1
  79. package/scripts/arbres-juges.mjs +2 -1
  80. package/scripts/attente-de-la-machine.mjs +10 -16
  81. package/scripts/avancement.mjs +2 -0
  82. package/scripts/base-des-workflows.mjs +2 -1
  83. package/scripts/binaires.mjs +2 -1
  84. package/scripts/branche-de-nuit.mjs +2 -1
  85. package/scripts/cadre.mjs +12 -3
  86. package/scripts/ci-de-main.mjs +2 -1
  87. package/scripts/circuit.mjs +101 -618
  88. package/scripts/circuits-cles.mjs +4 -6
  89. package/scripts/circuits-du-serveur.mjs +1 -1
  90. package/scripts/codes-de-sortie.mjs +1 -1
  91. package/scripts/coeurs-dedies.mjs +2 -4
  92. package/scripts/commande-du-langage.mjs +2 -0
  93. package/scripts/commandes-composees.mjs +3 -3
  94. package/scripts/commandes-du-path.mjs +1 -1
  95. package/scripts/composants-affectes.mjs +3 -1
  96. package/scripts/composition-des-langages.mjs +2 -0
  97. package/scripts/conformite.d.ts +2 -1
  98. package/scripts/conformite.mjs +2 -0
  99. package/scripts/consommation-des-passes.mjs +5 -4
  100. package/scripts/consommation.mjs +1 -0
  101. package/scripts/copies-finies.mjs +9 -10
  102. package/scripts/crochets.mjs +2 -1
  103. package/scripts/depart-du-ticket.mjs +2 -2
  104. package/scripts/dependances-internes.mjs +4 -2
  105. package/scripts/dernier-vert.mjs +3 -3
  106. package/scripts/dette.d.ts +2 -1
  107. package/scripts/dette.mjs +2 -0
  108. package/scripts/direct.mjs +2 -1
  109. package/scripts/disque-des-copies.mjs +1 -1
  110. package/scripts/donnees-cles.mjs +2 -0
  111. package/scripts/droits.mjs +12 -10
  112. package/scripts/echantillonneur-de-la-passe.mjs +1 -1
  113. package/scripts/effets.mjs +3 -3
  114. package/scripts/engendres.mjs +1 -1
  115. package/scripts/enveloppe/codes.mjs +1 -0
  116. package/scripts/enveloppe/enveloppe.mjs +113 -89
  117. package/scripts/enveloppe/lancer.sh +5 -3
  118. package/scripts/enveloppe/paquets-du-plan.mjs +4 -6
  119. package/scripts/enveloppe/travail-de-la-copie.mjs +11 -16
  120. package/scripts/etapes.mjs +10 -9
  121. package/scripts/etat-du-depot.mjs +2 -1
  122. package/scripts/faits-du-circuit.mjs +19 -19
  123. package/scripts/fermeture-de-la-machine.mjs +2 -2
  124. package/scripts/fichier-du-poste.mjs +3 -4
  125. package/scripts/fichiers-nommes.mjs +2 -1
  126. package/scripts/file-des-tickets.mjs +3 -1
  127. package/scripts/flux-de-la-nuit.mjs +39 -0
  128. package/scripts/flux-des-paquets.mjs +2 -1
  129. package/scripts/fusion-du-changelog.mjs +2 -1
  130. package/scripts/garde-de-la-memoire.mjs +1 -1
  131. package/scripts/gardes-du-cadre.mjs +2 -0
  132. package/scripts/greffons.mjs +2 -2
  133. package/scripts/grillhouse-maj.mjs +55 -150
  134. package/scripts/groupe-cles.mjs +2 -1
  135. package/scripts/index-interfaces.mjs +2 -0
  136. package/scripts/init.mjs +2 -1
  137. package/scripts/integration/file.mjs +3 -3
  138. package/scripts/integration/integrer.mjs +5 -6
  139. package/scripts/integration/rejeu.mjs +4 -2
  140. package/scripts/integration/verdict.mjs +2 -1
  141. package/scripts/jointure.d.ts +5 -1
  142. package/scripts/journal-des-etats.mjs +2 -2
  143. package/scripts/langages/cargo/binaires.mjs +3 -2
  144. package/scripts/langages/cargo/clippy.mjs +2 -0
  145. package/scripts/langages/cargo/commandes.mjs +72 -17
  146. package/scripts/langages/cargo/composants.mjs +4 -3
  147. package/scripts/langages/cargo/elements-du-lot.mjs +2 -0
  148. package/scripts/langages/cargo/etiquettes.mjs +87 -0
  149. package/scripts/langages/cargo/executables-de-tests.mjs +3 -1
  150. package/scripts/langages/cargo/exemples.mjs +6 -4
  151. package/scripts/langages/cargo/frontieres.mjs +2 -0
  152. package/scripts/langages/cargo/index-interfaces.mjs +2 -0
  153. package/scripts/langages/cargo/index.mjs +8 -9
  154. package/scripts/langages/cargo/migrations/0.28.4-tailles-des-tests.mjs +8 -8
  155. package/scripts/langages/cargo/migrations/0.34.0-executables-de-tests.mjs +7 -8
  156. package/scripts/langages/cargo/mise-a-jour.mjs +6 -3
  157. package/scripts/langages/cargo/sccache.mjs +10 -6
  158. package/scripts/langages/cargo/squelette.mjs +2 -0
  159. package/scripts/langages/cargo/tailles-des-tests.mjs +2 -0
  160. package/scripts/langages/cargo/verdict.mjs +8 -6
  161. package/scripts/langages/typescript/chemins-des-tests.mjs +2 -1
  162. package/scripts/langages/typescript/code-mort.mjs +2 -1
  163. package/scripts/langages/typescript/composants.mjs +7 -5
  164. package/scripts/langages/typescript/consommateurs-arbitres.mjs +17 -4
  165. package/scripts/langages/typescript/consommateurs.d.ts +2 -1
  166. package/scripts/langages/typescript/consommateurs.mjs +5 -7
  167. package/scripts/langages/typescript/construire.mjs +2 -1
  168. package/scripts/langages/typescript/elements-du-lot.mjs +2 -1
  169. package/scripts/langages/typescript/exemples.mjs +2 -1
  170. package/scripts/langages/typescript/frontieres.mjs +3 -2
  171. package/scripts/langages/typescript/index-interfaces.mjs +3 -2
  172. package/scripts/langages/typescript/index.mjs +3 -2
  173. package/scripts/langages/typescript/interfaces-contre-code.mjs +2 -1
  174. package/scripts/langages/typescript/lecteurs.mjs +2 -1
  175. package/scripts/langages/typescript/migrations/0.23.0-config-vitest.mjs +5 -6
  176. package/scripts/langages/typescript/migrations/0.24.4-noms-declares-inutilises.mjs +4 -8
  177. package/scripts/langages/typescript/migrations/0.24.6-lignes-mal-formees.mjs +5 -9
  178. package/scripts/langages/typescript/migrations/0.24.7-matiere-dans-les-tests.mjs +6 -10
  179. package/scripts/langages/typescript/migrations/0.25.0-chemins-des-tests.mjs +5 -6
  180. package/scripts/langages/typescript/migrations/0.25.0-tailles-des-tests.mjs +6 -8
  181. package/scripts/langages/typescript/migrations/0.30.0-prefixe-des-tickets.mjs +5 -4
  182. package/scripts/langages/typescript/migrations/0.30.0-tailles-des-outils-lourds.mjs +7 -7
  183. package/scripts/langages/typescript/migrations/0.30.0-titres-nommant-un-ticket.mjs +5 -6
  184. package/scripts/langages/typescript/migrations/0.33.0-binaire-de-jour.mjs +6 -6
  185. package/scripts/langages/typescript/migrations/0.33.0-tests-du-poste.mjs +5 -5
  186. package/scripts/langages/typescript/migrations/0.34.1-cache-des-outils.mjs +4 -4
  187. package/scripts/langages/typescript/migrations/0.49.0-tests-equipes.mjs +7 -7
  188. package/scripts/langages/typescript/mise-a-jour.mjs +5 -5
  189. package/scripts/langages/typescript/module-absent.mjs +2 -1
  190. package/scripts/langages/typescript/parcours.mjs +2 -1
  191. package/scripts/langages/typescript/references-par-les-types.mjs +2 -1
  192. package/scripts/langages/typescript/regle-des-tests.mjs +2 -1
  193. package/scripts/langages/typescript/resume-du-lanceur.mjs +1 -1
  194. package/scripts/langages/typescript/resumes.mjs +2 -1
  195. package/scripts/langages/typescript/squelette.mjs +2 -1
  196. package/scripts/langages/typescript/tailles-des-tests.mjs +5 -4
  197. package/scripts/langages/typescript/tests-de-nuit.mjs +12 -5
  198. package/scripts/langages/typescript/tests-du-poste.mjs +60 -21
  199. package/scripts/langages/typescript/tests.mjs +44 -66
  200. package/scripts/langages/typescript/titres-de-tests.mjs +2 -2
  201. package/scripts/langages/typescript/tranches.mjs +2 -1
  202. package/scripts/langages/typescript/turbo-des-paquets.mjs +87 -148
  203. package/scripts/langages/typescript/verdict.mjs +2 -1
  204. package/scripts/langages/typescript/verifier.mjs +64 -99
  205. package/scripts/langages/typescript/verrou-des-dependances.mjs +2 -1
  206. package/scripts/langages/typescript/vitest-config/avancement.reporter.mjs +1 -0
  207. package/scripts/langages/typescript/vitest-config/base.mjs +5 -5
  208. package/scripts/langages/typescript/vitest-config/bornes.mjs +1 -0
  209. package/scripts/langages/typescript/vitest-config/changements.mjs +6 -10
  210. package/scripts/langages/typescript/vitest-config/cibles.mjs +3 -3
  211. package/scripts/langages/typescript/vitest-config/delais.mjs +1 -0
  212. package/scripts/langages/typescript/vitest-config/delais.setup.mjs +1 -0
  213. package/scripts/langages/typescript/vitest-config/duree.classement.mjs +1 -1
  214. package/scripts/langages/typescript/vitest-config/duree.reporter.mjs +4 -3
  215. package/scripts/langages/typescript/vitest-config/lances.mjs +3 -2
  216. package/scripts/langages/typescript/vitest-config/machine.setup.mjs +1 -0
  217. package/scripts/langages/typescript/vitest-config/mesure.mjs +1 -1
  218. package/scripts/langages/typescript/vitest-config/mesure.setup.mjs +1 -0
  219. package/scripts/langages/typescript/vitest-config/registre.setup.mjs +1 -0
  220. package/scripts/langages/typescript/vitest-config/resultats.mjs +2 -1
  221. package/scripts/langages/typescript/vitest-config/resultats.setup.mjs +1 -0
  222. package/scripts/langages/typescript/vitest.nuit.config.mjs +3 -2
  223. package/scripts/langages-des-paquets.mjs +3 -1
  224. package/scripts/langages.mjs +5 -3
  225. package/scripts/lecture-unique.mjs +2 -1
  226. package/scripts/lint-des-scripts.mjs +1 -0
  227. package/scripts/machine.mjs +4 -4
  228. package/scripts/matiere-de-test.d.ts +2 -1
  229. package/scripts/matieres-lues.mjs +2 -0
  230. package/scripts/mesure/avancement.mjs +1 -1
  231. package/scripts/mesure/base-de-passe.mjs +10 -13
  232. package/scripts/mesure/pression.mjs +3 -4
  233. package/scripts/mesure-de-la-machine.mjs +2 -1
  234. package/scripts/migrations/0.23.0-charte-importee.mjs +7 -13
  235. package/scripts/migrations/0.23.0-crochets-de-seance.mjs +6 -8
  236. package/scripts/migrations/0.23.0-marche-du-projet.mjs +8 -12
  237. package/scripts/migrations/0.23.2-copies-du-cadre.mjs +9 -32
  238. package/scripts/migrations/0.24.0-circuit-simplifie.mjs +11 -39
  239. package/scripts/migrations/0.24.12-tri-des-decouvertes.mjs +6 -9
  240. package/scripts/migrations/0.24.2-api-extractor-du-paquet.mjs +8 -19
  241. package/scripts/migrations/0.25.0-script-des-tests.mjs +7 -13
  242. package/scripts/migrations/0.27.0-langages-dans-l-architecture.mjs +9 -23
  243. package/scripts/migrations/0.30.0-ci-appelle-la-verification.mjs +7 -9
  244. package/scripts/migrations/0.31.0-paquets-dans-le-graphe.mjs +7 -18
  245. package/scripts/migrations/0.33.0-cache-distant.mjs +6 -9
  246. package/scripts/migrations/0.33.0-ci-du-cadre.mjs +5 -8
  247. package/scripts/migrations/0.33.0-node-26.mjs +5 -8
  248. package/scripts/migrations/0.35.0-greffon-mattpocock-retire.mjs +5 -10
  249. package/scripts/migrations/0.44.0-node-26-seul.mjs +6 -9
  250. package/scripts/migrations/0.44.0-seuil-des-codes-de-tickets.mjs +6 -7
  251. package/scripts/migrations/0.47.0-ci-de-main.mjs +6 -7
  252. package/scripts/migrations/0.48.0-ci-declenchee-par-la-file.mjs +6 -6
  253. package/scripts/migrations/0.48.0-poussee-retiree.mjs +3 -5
  254. package/scripts/migrations/0.49.0-reservation-de-trois-coeurs.mjs +3 -4
  255. package/scripts/migrations/0.50.0-reglages-hors-de-la-charte.mjs +81 -0
  256. package/scripts/migrations-des-gardes.mjs +2 -0
  257. package/scripts/migrations.mjs +4 -0
  258. package/scripts/nuit.sh +48 -15
  259. package/scripts/outil.mjs +2 -1
  260. package/scripts/outils-cles.mjs +6 -6
  261. package/scripts/paquet-npm.mjs +3 -2
  262. package/scripts/paquet.mjs +3 -4
  263. package/scripts/paquets.d.ts +1 -1
  264. package/scripts/paquets.mjs +2 -0
  265. package/scripts/passe-de-la-machine.mjs +9 -12
  266. package/scripts/places-de-la-machine.mjs +36 -53
  267. package/scripts/places-du-serveur.mjs +5 -4
  268. package/scripts/plafond-de-la-machine.mjs +19 -19
  269. package/scripts/poussee-retiree.mjs +2 -1
  270. package/scripts/prefixe-des-tickets.mjs +1 -0
  271. package/scripts/preparation.mjs +2 -1
  272. package/scripts/recommencer.mjs +2 -2
  273. package/scripts/references-changees.mjs +1 -1
  274. package/scripts/registre-des-resultats.mjs +3 -1
  275. package/scripts/regles-des-places.mjs +4 -6
  276. package/scripts/repli-de-la-nuit.mjs +107 -35
  277. package/scripts/reponses-du-circuit.mjs +4 -3
  278. package/scripts/reprise.mjs +3 -2
  279. package/scripts/resultats.mjs +71 -93
  280. package/scripts/retirer-copie.sh +2 -1
  281. package/scripts/retirer-les-copies-finies.mjs +2 -1
  282. package/scripts/seances.mjs +3 -2
  283. package/scripts/services-du-noyau.mjs +3 -0
  284. package/scripts/session-start.sh +0 -6
  285. package/scripts/sortie.mjs +2 -1
  286. package/scripts/sources.mjs +2 -0
  287. package/scripts/sous-commandes.mjs +2 -1
  288. package/scripts/sous-modules.sh +24 -43
  289. package/scripts/style-a-l-ecriture.mjs +2 -0
  290. package/scripts/tableau-des-composants.mjs +5 -7
  291. package/scripts/tableau.mjs +6 -5
  292. package/scripts/taches-du-graphe.mjs +3 -0
  293. package/scripts/ticket-du-circuit.mjs +1 -1
  294. package/scripts/ticket.mjs +3 -0
  295. package/scripts/transitions.mjs +30 -19
  296. package/scripts/un-commit-par-ticket.mjs +2 -1
  297. package/scripts/verdict-de-la-nuit.mjs +2 -1
  298. package/scripts/verrou-de-fichier.mjs +1 -0
  299. package/scripts/verrous/commande.mjs +2 -1
  300. package/scripts/verrous/ecriture-hors-enveloppe.mjs +1 -0
  301. package/scripts/verrous/ticket-du-sous-agent.mjs +1 -0
  302. package/scripts/verrous/verrou.mjs +3 -3
  303. package/scripts/workflows-du-cadre.mjs +2 -1
  304. package/skills/architecte/SKILL.md +203 -0
  305. package/skills/architecte/references/exemple-d-architecture.md +159 -0
  306. package/skills/developpeur/SKILL.md +6 -10
  307. package/skills/explorateur/SKILL.md +1 -1
  308. package/skills/grill/SKILL.md +4 -5
  309. package/skills/grill/references/paquets.md +5 -8
  310. package/skills/pitmaster/SKILL.md +179 -268
  311. package/skills/pitmaster/references/cadre.md +7 -6
  312. package/skills/pitmaster/references/consigne-agent.md +36 -32
  313. package/skills/pitmaster/references/tour.md +2 -2
  314. package/skills/redacteur/references/documents-d-un-composant.md +10 -8
  315. package/skills/testwriter/SKILL.md +8 -11
@@ -1,169 +1,106 @@
1
1
  #!/usr/bin/env node
2
- // The `turbo.json` of each package of a repository of packages, generated from its package.json
3
- // (its dependencies, its build, the paths its tests read and the traces it writes), its
4
- // configurations of TypeScript, the root's turbo.json and the list of the packages out of the
5
- // frame; and, in the root's turbo.json, the `dependsOn` of the guard tasks, the typing task, the
6
- // `env` of the tests, the variable of the results directory and the exclusion of a submodule's
7
- // `.git`.
2
+ // The generator of the graph: writes the `turbo.json` of the root and of each package of a
3
+ // repository of packages, from their package.json and TypeScript configurations, and refuses one
4
+ // that is absent or stale. A repository without `workspaces` has no package: none is written or
5
+ // refused. The dependencies are read in the package.json only. Packages come from `paquets`
6
+ // (scripts/paquets.mjs). Mechanism: packages/grillhouse/docs/architecture/tests.md, §3.1
7
+ // (generator of the graph), §5.1.
8
8
  //
9
9
  // npx grillhouse turbo-des-paquets refuses a turbo.json absent or stale, and a
10
- // declaration of a path read or trace refused (below)
11
- // npx grillhouse turbo-des-paquets --ecrire writes the guards' dependsOn, the typing task and
12
- // the tests' env in the root's turbo.json, then the
13
- // turbo.json of each package, in one pass
10
+ // declaration of a path read or trace refused
11
+ // npx grillhouse turbo-des-paquets --ecrire writes the root's guard `dependsOn`, typing task and
12
+ // tests' `env`, then each package's turbo.json
14
13
  //
15
- // Turborepo's `^build` waits for the build of every internal package a package declares, its
16
- // devDependencies included; a package whose tests import a neighbour that depends on it (the
17
- // shared test material, two stages testing each other) makes a cycle that `turbo run build`
18
- // refuses. A build waits for its runtime dependencies only, as Bazel separates the deps of a
19
- // library from those of its test. So each package receives a package configuration
20
- // (https://turborepo.dev/docs/reference/package-configurations): `extends: ["//"]`, and a `build`
21
- // whose `dependsOn`, which replaces the root's, holds the `<name>#build` of each internal package
22
- // its `dependencies`, `peerDependencies` and `optionalDependencies` name that has a `build`
23
- // script, sorted. The tests keep the root's `build` and `^build`: a test waits for its own package's build, whose
24
- // built entry it imports, and for everything it imports.
14
+ // Per package (a package configuration, `extends: ["//"]`):
15
+ // - `build` waits for the `<name>#build` of each internal package named in `dependencies`,
16
+ // `peerDependencies` and `optionalDependencies` that has a `build` script, sorted; never the
17
+ // devDependencies, which would make a cycle with the shared test material. The tests keep the
18
+ // root's `build` and `^build`.
19
+ // - `build` inputs, for a package with a `tsconfig.build.json`: the root's build inputs without
20
+ // `$TURBO_DEFAULT$`, then, sorted, its package.json, its tsconfig.build.json, each configuration
21
+ // it extends inside the package, `<dir>/**` per included directory (an `include` entry, its fixed
22
+ // part before a glob; a `files` entry, its directory), the same for each configuration a `tsc` of
23
+ // its `build` script compiles (`-p`, `--project`, `-b`, `--build`, else tsconfig.json). tsc's
24
+ // rules hold: a configuration's `include` and `files` replace its bases', a later base of an
25
+ // `extends` list replaces an earlier one, each path is relative to the file that writes it
26
+ // (`${configDir}`, to the configuration compiled). What is unknown leaves Turborepo's default,
27
+ // every file hashed: a tsconfig.build.json absent or not JSON, a `build` command other than
28
+ // `tsc …`, a base that cannot be read, a configuration with neither `include` nor `files`, an
29
+ // included path out of the package or at its root.
30
+ // - A package out of the frame (`docs/agents/hors-cadre.txt`) stays a workspace and excludes each
31
+ // task of the root's turbo.json (`"extends": false`). A `^` dependency still reaches an excluded
32
+ // task, so a package of the frame that declares one (`dependencies`, `devDependencies`,
33
+ // `optionalDependencies`) has each root task whose `dependsOn` holds a `^<task>` written out:
34
+ // its other entries kept, then the `<name>#<task>` of each internal package it declares, those
35
+ // out of the frame left out, sorted. The check refuses a configuration that is not so.
25
36
  //
26
- // A build hashes what it reads, as Turborepo's `inputs` limit what invalidates a task
27
- // (https://turborepo.dev/docs/reference/configuration#inputs): a test file changed leaves its
28
- // package's build as it is, and so the builds and tests of every package depending on it. A
29
- // package with a `tsconfig.build.json` has its `build` hash the root's build inputs, Turborepo's
30
- // default (`$TURBO_DEFAULT$`) left out, then, sorted: its package.json, its tsconfig.build.json and
31
- // each configuration it extends inside the package, `<dir>/**` per directory it includes (an
32
- // `include` entry, its fixed part before a glob; a `files` entry, its directory, since tsc compiles
33
- // what a listed file imports, its neighbours most often), the same for each configuration a `tsc`
34
- // of its `build` script compiles (`-p`, `--project`, `-b`, `--build`, else tsconfig.json). tsc's
35
- // own rules hold: a configuration's `include`
36
- // and `files` replace its bases', a later base of an `extends` list replacing an earlier one, each
37
- // path relative to the file that writes it (`${configDir}`, to the configuration compiled). What is
38
- // unknown leaves the build on Turborepo's default, every file of its package hashed, so that it
39
- // never gives a stale cache: a tsconfig.build.json absent or not JSON, a command of the `build`
40
- // script other than `tsc …` (`vite build`, `node copier.mjs`), a base that cannot be read, a
41
- // configuration setting
42
- // neither `include` nor `files` (tsc then takes every file), an included path out of the package
43
- // or at its root.
44
- //
45
- // A package out of the frame (`docs/agents/hors-cadre.txt`: a directory under `packages/` or
46
- // `src/`) stays a workspace, which a neighbour may import by its name, and Turborepo plays none
47
- // of its tasks: its configuration excludes each task of the root's turbo.json (or turbo.jsonc),
48
- // `"extends": false`, by which the task does not exist for it. A `^` dependency still reaches an excluded task, so no `dependsOn`
49
- // written here names a package out of the frame, and a package of the frame that declares one
50
- // (in its `dependencies`, `devDependencies` or `optionalDependencies`, the fields `^` follows)
51
- // has each root task whose `dependsOn` holds a `^<task>` written out: its other entries kept, then
52
- // the `<name>#<task>` of each internal package it declares there, out of the frame left out,
53
- // sorted. The check refuses a configuration that is not so, which Turborepo would play.
54
- //
55
- // What a package's tests read, as Bazel's `data`, and the traces a stage writes, as Bazel's
56
- // genrule: the test task of a package depends on its code, on what it imports and on the paths it
57
- // declares only. A package declares in its package.json, each path from the root:
37
+ // What a package's tests read and the traces it writes. A package declares in its package.json,
38
+ // each path from the root:
58
39
  //
59
40
  // "grillhouse": {
60
41
  // "lit": ["packages/990-corpus/test/060-encoder/paires-v1"],
61
42
  // "traces": { "trace:grammaires": { "lit": ["…/paires-v1"], "ecrit": "packages/060-encoder/trace/grammaires-du-corpus" } }
62
43
  // }
63
44
  //
64
- // - `lit`: the paths its tests read, directories or files, data or code, a neighbour's scripts and
65
- // sources included, as Bazel's `data` takes any file. Its `test:unit` hashes them
66
- // (`inputs`: the root's, `$TURBO_EXTENDS$`, or Turborepo's default, `$TURBO_DEFAULT$`, when the
67
- // root's task sets none, since `$TURBO_EXTENDS$` then extends an empty list; then
68
- // `$TURBO_ROOT$/<dir>/**` each) and waits, beside the root's `dependsOn`, for each trace whose
69
- // output one of them overlaps (`<producer>#trace:<name>`); the producer declares nothing for it.
70
- // The patterns its test files declare they read (`// @lit <motif>` at their head,
71
- // ./vitest-config/lances.mjs) are hashed with them (`$TURBO_ROOT$/<motif>` each, those `lit`
72
- // already covers left out), a package without `lit` included: one declaration, read by the
73
- // choice of the tests of a pass and by Turborepo's cache.
45
+ // - `lit`: the paths its tests read, directories or files, data or code. Its `test:unit` hashes
46
+ // them (`inputs`: the root's, `$TURBO_EXTENDS$`, or `$TURBO_DEFAULT$` when the root's task sets
47
+ // none; then `$TURBO_ROOT$/<dir>/**` each) and waits, beside the root's `dependsOn`, for each
48
+ // trace whose output one of them overlaps (`<producer>#trace:<name>`). The patterns its test
49
+ // files declare they read (`// @lit <motif>` at their head, ./vitest-config/lances.mjs) are
50
+ // hashed with them (`$TURBO_ROOT$/<motif>` each, those `lit` already covers left out), a
51
+ // package without `lit` included.
74
52
  // - `traces`: each trace the package produces, its command the package's script of the same name,
75
- // `trace:<name>`. Its task waits for `build` and `^build`, and for the traces its `lit` overlaps;
53
+ // `trace:<name>`. Its task waits for `build` and `^build` and for the traces its `lit` overlaps;
76
54
  // it hashes the package's files and its `lit`, its output left out, and Turborepo caches its
77
55
  // output, `ecrit`, a directory inside the package that git ignores. A restore from the cache
78
- // adds files and removes none: the command empties its directory before writing it.
79
- // The traces a package's tests wait for are read in Turborepo's plan of its tests
80
- // (`tracesDuPlan` of scripts/taches-du-graphe.mjs), by the targeted run
81
- // (scripts/langages/typescript/tests.mjs) and the build of an agent's copy
82
- // (scripts/taches-du-graphe.mjs, every language's), which produce them before the tests; the envelope shows the
83
- // directory of a neighbour's trace read-only (scripts/enveloppe/enveloppe.mjs), and the targeted
84
- // run inside it plays the traces of the agent's package only.
56
+ // adds files and removes none: the command empties its directory before writing it. The traces
57
+ // a package's tests wait for are read in Turborepo's plan of its tests (`tracesDuPlan` of
58
+ // scripts/taches-du-graphe.mjs).
85
59
  // - The package holding a declared path of data alone (the shared test material) has its `build`
86
- // leave it out (`inputs`: the root's, then `!<dir>/**` each): its data no longer moves its build,
87
- // nor the tests of every package that waits for it. A declared path holding code (a file a build
88
- // compiles: `.ts`, `.tsx`, `.mts`, `.cts`, `.d.ts` included, whose types tsc checks, `.js`,
89
- // `.jsx`, `.mjs`, `.cjs`) stays an input of its package's build, as Bazel's `data` leaves a file
90
- // in the rule that builds it; what a trace writes is no code of it. The builds a package's
91
- // dependencies give stay as they are: a package reduces them in its package.json.
60
+ // leave it out (`inputs`: the root's, then `!<dir>/**` each). A declared path holding code
61
+ // (`.ts`, `.tsx`, `.mts`, `.cts`, `.d.ts`, `.js`, `.jsx`, `.mjs`, `.cjs`) stays an input of its
62
+ // package's build; what a trace writes is no code of it.
92
63
  //
93
64
  // The check refuses a declared path absent that no trace writes; a trace written out of its
94
- // package, followed by git, or not ignored; a `trace:*` script without
95
- // declaration, a declaration without script or not named `trace:<name>`. In the root's
96
- // turbo.json, which is the project's, it refuses what the generator owns: a task of one package
97
- // (`<package>#<task>`, the root's own `//#…` kept), a `trace:*` task, an input (`inputs` under
98
- // `$TURBO_ROOT$/`, `globalDependencies`) naming a package directory.
65
+ // package, followed by git, or not ignored; a `trace:*` script without declaration, a declaration
66
+ // without script or not named `trace:<name>`. In the root's turbo.json, which is the project's, it
67
+ // refuses what the generator owns: a task of one package (`<package>#<task>`, the root's own
68
+ // `//#…` kept), a `trace:*` task, an input (`inputs` under `$TURBO_ROOT$/`, `globalDependencies`)
69
+ // naming a package directory.
99
70
  //
100
71
  // A submodule's `.git`, in a copy (a worktree), is a file naming that copy: an input reaching it
101
- // changes the hash of its task in each new copy, and the cache never serves. Beside each input
102
- // that can reach the `.git` of a submodule the .gitmodules declares (a pattern of the root under
103
- // `$TURBO_ROOT$/`, of any task, or a global dependency, whose fixed part is the submodule or holds
104
- // it, then a glob), the generator writes its exclusion, `!$TURBO_ROOT$/<path>/.git`
105
- // (`!<path>/.git` for a global dependency), in the root's turbo.json, the rest of the file kept,
106
- // and in the inputs it writes in a package's turbo.json; the check refuses a root input lacking it.
72
+ // changes the hash of its task in each copy. Beside each input that can reach the `.git` of a
73
+ // submodule `.gitmodules` declares (a pattern of the root under `$TURBO_ROOT$/`, of any task, or
74
+ // a global dependency, whose fixed part is the submodule or holds it, then a glob), the generator
75
+ // writes its exclusion, `!$TURBO_ROOT$/<path>/.git` (`!<path>/.git` for a global dependency), in
76
+ // the root's turbo.json and in the inputs of a package's; the check refuses a root input lacking it.
107
77
  //
108
78
  // The configuration of Vitest of the package of the shared test material (`matieres` of
109
- // scripts/langages/typescript/consommateurs.mjs) is CommonJS (`vitest.config.cjs`): the envelope shows that package
110
- // read-only to every role but the testwriter (scripts/enveloppe/enveloppe.mjs), and Vite 5 loads a
111
- // CommonJS configuration in memory, where it bundles an ESM one into a file beside it
112
- // (`vitest.config.mjs.timestamp-<n>.mjs`). The check refuses a `vitest.config.mjs` or `.mts` of
113
- // that package, and a `.js` or `.ts` when its `type` is `module`, as Vite tells ESM from CommonJS.
114
- //
115
- // The guard tasks of the root: the frame's controls (`grillhouse:gardes`) and the project's own
116
- // guards (`gardes`, the root script the frame reserves for them; a root without it plays none),
117
- // which `npm run verifier` plays beside the tests. They read what the builds write (the API
118
- // reports and the code-mort check read the `dist/`; a project's guards may read its built form):
119
- // each waits for the build of each package of the frame that has a `build` script, sorted, a
120
- // package out of the frame left out (`//#grillhouse:gardes`, `//#gardes` in a repository of
121
- // packages), or for the root's build (`grillhouse:gardes`, `gardes`) in a repository without
122
- // packages. The generator writes their `dependsOn` in the root's turbo.json (or turbo.jsonc), and
123
- // adds a guard task the root lacks (`{ dependsOn, outputs: [] }`); the rest of that file is the
124
- // project's, its comments and its layout kept (jsonc-parser, the library of the JSON editing of
125
- // VS Code: each edit touches the value it sets). The check refuses a guard task absent or whose
126
- // `dependsOn` differs. A repository without a root turbo.json (or turbo.jsonc) has nothing written
127
- // or refused at its root.
128
- //
129
- // The typing of each package (`typecheck`, its script, as `check-types` in the examples of
130
- // create-turbo), which `npm run verifier` plays beside the guards and the tests: a task of the
131
- // root's turbo.json (or turbo.jsonc), cached per package, that waits, as `test:unit`, for the
132
- // build of its own package (`build`: the tests of BPScript's 990-corpus import its built entry,
133
- // `990-corpus/test-fixtures`) and, in a repository of packages, for the build of each package its
134
- // package declares (`^build`), whose types it reads; a package without a `typecheck` script plays
135
- // none. The generator adds the task the root lacks (`{ dependsOn: ["build", "^build"], outputs:
136
- // [] }`, `["build"]` without packages), and each of those builds a `dependsOn` of the project's
137
- // lacks, the rest of the task kept; the check refuses either. Witness: BPScript 320.21.4, whose type errors in test/ showed only at night.
138
- //
139
- // The tests of a targeted run: the paths reach Vitest in the variable `GRILLHOUSE_TESTS`
140
- // (scripts/langages/typescript/vitest-config/cibles.mjs, scripts/langages/typescript/tests.mjs), which the `env` of the root's
141
- // `test:unit` names: it enters the hash of the tests alone, and reaches their process alone
142
- // (Turborepo's strict mode of the variables). A package's own `test:unit` sets no `env`, and
143
- // inherits the root's. The generator adds the variable to the `env` of the root's `test:unit`,
144
- // the project's entries kept, and the check refuses a `test:unit` of the root without it.
145
- //
146
- // Some variables pass to every task without entering any hash: the root's `globalPassThroughEnv`
147
- // names them, Turborepo's strict mode of the variables keeping out of a task every variable its
148
- // configuration does not name. The results directory of a run (`GRILLHOUSE_RESULTATS`,
149
- // scripts/resultats.mjs), where the guards write their SARIF, Turborepo its summaries and Vitest
150
- // its JSON reports; the changes since the last green (`GRILLHOUSE_CHANGEMENTS`,
151
- // scripts/dernier-vert.mjs), by which the tests of a package Turborepo plays again are those
152
- // Vitest relates to them, while a package whose inputs did not move replays from the cache; the
153
- // progress directory of a pass (`GRILLHOUSE_AVANCEMENT`, scripts/avancement.mjs), where Vitest
154
- // writes the files done and planned of each task, which the board reads; the temporary directory
155
- // (`TMPDIR`), the base of a pass (scripts/mesure/base-de-passe.mjs), where every task writes
156
- // its temporary files and which goes at the end of the pass; the workers of the tests of a task
157
- // (`GRILLHOUSE_TRAVAILLEURS`, scripts/places-de-la-machine.mjs), the bound a session or a pass
158
- // sets, which the tool of each language reads; the Rust toolchain of a runner (`CARGO_HOME`,
159
- // `RUSTUP_HOME`), which a runner of the repository holds per executor. The generator adds each
160
- // one the root lacks, the project's entries kept, and the check refuses a
161
- // root without one.
79
+ // ./consommateurs.mjs) is CommonJS (`vitest.config.cjs`): the envelope shows that package
80
+ // read-only to every role but the testwriter, and Vite 5 bundles an ESM configuration into a file
81
+ // beside it (`vitest.config.mjs.timestamp-<n>.mjs`). The check refuses a `vitest.config.mjs` or
82
+ // `.mts` of that package, and a `.js` or `.ts` when its `type` is `module`.
162
83
  //
163
- // The packages are those of `paquets` (scripts/paquets.mjs, the frame's one list of the packages of
164
- // a repository, each marked out of the frame or not). A repository without `workspaces` has none:
165
- // no package turbo.json is written or refused. The dependencies are written in the package.json
166
- // only; this file is their only reader for the tasks' order.
84
+ // The root's tasks, in its turbo.json or turbo.jsonc (the rest of the file is the project's,
85
+ // its comments and layout kept by jsonc-parser; a repository without one has nothing written or
86
+ // refused at its root). The generator adds a task the root lacks and writes its entries; the
87
+ // check refuses a task absent or differing:
88
+ // - the guard tasks, `grillhouse:gardes` and `gardes` (the root script the frame reserves for the
89
+ // project's guards; a root without it plays none): each waits for the build of each package of
90
+ // the frame that has a `build` script, sorted (`//#grillhouse:gardes`, `//#gardes` in a
91
+ // repository of packages), or for the root's build in a repository without packages; the task
92
+ // added is `{ dependsOn, outputs: [] }`;
93
+ // - `typecheck`, cached per package: it waits for `build` and, in a repository of packages, for
94
+ // `^build`; a package without a `typecheck` script plays none; the task added is
95
+ // `{ dependsOn: ["build", "^build"], outputs: [] }` (`["build"]` without packages), and a
96
+ // `dependsOn` of the project's lacking one of them is completed, the rest kept;
97
+ // - `test:unit`: its `env` names `GRILLHOUSE_TESTS` (cibles.mjs, tests.mjs), which so enters the
98
+ // hash of the tests alone; a package's own `test:unit` sets no `env` and inherits the root's;
99
+ // the project's entries are kept;
100
+ // - `globalPassThroughEnv`: the variables that pass to every task without entering any hash:
101
+ // `GRILLHOUSE_RESULTATS`, `GRILLHOUSE_CHANGEMENTS`, `GRILLHOUSE_AVANCEMENT`, `TMPDIR`,
102
+ // `GRILLHOUSE_TRAVAILLEURS`, and the Rust toolchain of a runner (`CARGO_HOME`, `RUSTUP_HOME`);
103
+ // the project's entries are kept.
167
104
  import { spawnSync } from 'node:child_process';
168
105
  import { existsSync, readFileSync, statSync, writeFileSync } from 'node:fs';
169
106
  import { createRequire } from 'node:module';
@@ -199,8 +136,8 @@ const TOPOLOGIE = ['dependencies', 'devDependencies', 'optionalDependencies'];
199
136
  const RACINES = ['turbo.json', 'turbo.jsonc'];
200
137
  // The guard tasks of the root: the frame's controls, and the project's own guards.
201
138
  export const GARDES = SCRIPTS_DE_GARDES;
202
- // The controls of the root the CI used to play beside the verification: the format check and the
203
- // lint (grillhouse-61z). A root plays those its package.json holds a script for, none demanded.
139
+ // The controls of the root that the CI plays beside the verification: the format check and the
140
+ // lint. A root plays those its package.json holds a script for, none demanded.
204
141
  export const CONTROLES = ['format:check', 'lint'];
205
142
  // The controls the root package.json of <racine> holds a script for.
206
143
  export function controlesDeRacine(racine) {
@@ -271,7 +208,7 @@ const relanceLesPaquets = script =>
271
208
  /(^|[\s;&|])(npx\s+)?turbo\s+run(\s|$)/.test(String(script));
272
209
 
273
210
  // The refusals of the root's format and lint scripts at <racine> that name a file a package holds,
274
- // or launch the packages' scripts again: the root keeps its own files (grillhouse-44b.9), a package
211
+ // or launch the packages' scripts again: the root keeps its own files, a package
275
212
  // plays its own.
276
213
  function controlesDeRacineRefuses(racine) {
277
214
  const dossiers = paquets(racine)
@@ -1067,7 +1004,9 @@ export function ecrire(racine) {
1067
1004
  const abs = path.join(racine, controles[0].f);
1068
1005
  let texte = readFileSync(abs, 'utf8');
1069
1006
  for (const { cle } of controles) {
1070
- texte = applyEdits(texte, modify(texte, ['tasks', cle], { outputs: [] }, MISE_EN_FORME));
1007
+ // The lint of a package reads the types its build writes (and its neighbours'), as the typing.
1008
+ const tache = cle === 'lint' ? { dependsOn: ['build', '^build'], outputs: [] } : { outputs: [] };
1009
+ texte = applyEdits(texte, modify(texte, ['tasks', cle], tache, MISE_EN_FORME));
1071
1010
  }
1072
1011
  writeFileSync(abs, texte);
1073
1012
  if (!ecrits.includes(controles[0].f)) {
@@ -1,6 +1,7 @@
1
1
  // The verdict of a run of the module typescript, the third demand of the join
2
2
  // (scripts/jointure.d.ts, `verdict`): what a run of Turborepo and of Vitest left in the results
3
- // directory of a pass (`GRILLHOUSE_RESULTATS`, scripts/resultats.mjs).
3
+ // directory of a pass (`GRILLHOUSE_RESULTATS`, scripts/resultats.mjs; packages/grillhouse/docs/architecture/tests.md
4
+ // §3.3).
4
5
  //
5
6
  // - The summary of a run of Turborepo (./resume-du-lanceur.mjs): `lireLesResumes` gives each task.
6
7
  // - The JSON report of Vitest, which the frame's base configuration writes under
@@ -1,7 +1,9 @@
1
1
  #!/usr/bin/env node
2
- // `npm run verifier`: the full pass, what the integration, the queue, the continuous integration
3
- // and the night play. Its verdict is green (0) or red (1); « à repasser » (75) only when the wait
4
- // for the lock of the machine, or for room in the temporary directory, reaches its bound.
2
+ // `npm run verifier`: the verification pass, one run of Turborepo on the whole graph. Its verdict
3
+ // is green (0) or red (1); « à repasser » (75) only when the wait for the part of the machine, or
4
+ // for room in the temporary directory, reaches its bound, or the memory watch cuts it.
5
+ // Mechanism: packages/grillhouse/docs/architecture/tests.md, §5.1 (the pass), §5.3 (the tests
6
+ // replayed), §3.1.
5
7
  //
6
8
  // npx grillhouse verifier [<argument of Turborepo>…] (npm run verifier -- --force)
7
9
  // npx grillhouse verifier --tout [<argument>…] every test, played for real
@@ -9,104 +11,67 @@
9
11
  // npx grillhouse verifier --sans-tests [<argument>…] every control but the tests
10
12
  // npx grillhouse verifier --tranche i/n [<argument>…] the tests of the tranche i of n
11
13
  //
12
- // - A pass measures itself against the last green (scripts/dernier-vert.mjs), as
13
- // `vitest --changed` and `jest --onlyChanged` do: the tree of the last pass green on every
14
- // package, kept per branch (main's for a copy that has none yet). When it counts (its commit an ancestor of HEAD), each package
15
- // Turborepo plays again plays the tests Vitest relates to the files changed since it, or all
16
- // its tests when a change lies out of Vitest's graph (scripts/langages/typescript/vitest-config/changements.mjs);
17
- // a package whose inputs did not move replays from Turborepo's cache, the guards play whole,
18
- // and so do the builds. The changes reach Vitest in a variable no hash counts
19
- // (`GRILLHOUSE_CHANGEMENTS`). Without a last green that counts, the pass is complete. The
20
- // line `↳` says which. The final pass of a circuit gives the base of its lot
21
- // (`GRILLHOUSE_BASE_DU_LOT`, scripts/dernier-vert.mjs): it measures itself against it, targeted,
22
- // the tests Vitest relates to the lot, never the whole package for a file out of its graph; a
23
- // `--base` given takes precedence. A pass green, restricted by no filter, keeps its tree as the last green;
24
- // a red one keeps the last green as it was. The pass is the one that keeps it, for every language
25
- // of the project: it plays the tasks of every package of the graph, a crate's and a Python
26
- // project's beside a TypeScript package's (their `test:unit` and `typecheck`, scripts of their
27
- // package.json), so it is green only when every task of every language is, and no module of
28
- // language keeps a green of its own (scripts/dernier-vert.mjs).
29
- // - `--tout`, and `--force` (the night, scripts/nuit.sh), play the complete pass: no measure
30
- // against the last green, and each task of tests played for real (the variable of the tests
31
- // carries the moment of the pass, `rejouer`, which no cached run holds).
32
- // - The pass takes its part of the budget of the machine (scripts/places-de-la-machine.mjs,
33
- // `avecLaPasse`), shared by every repository of the machine: a pass whose part does not fit in
34
- // what the parts held leave, or that the load and the memory refuse, waits, and says so, with
35
- // what it waits for, when it begins and every 30 s. The wait bounded (60 min), the pass ends at
36
- // 75, « à repasser »; a key `grillhouse.part` or a reserve that is faulty ends it at once, red
37
- // (1); either way without playing. A pass in the frame's own repository passes before a
38
- // project's. It plays held to its part by the system, in a control group of its own.
39
- // - Turborepo plays the build, then the guards (the frame's, `grillhouse:gardes`, and the
40
- // project's own, its root script `gardes`), the typing of each package (`typecheck`, its
41
- // sources and its tests, cached per package: scripts/langages/typescript/turbo-des-paquets.mjs) and the tests
42
- // (`test:unit`) beside each other:
14
+ // - The measure: against the last green (scripts/dernier-vert.mjs), the changes reach Vitest in
15
+ // `GRILLHOUSE_CHANGEMENTS`, which no hash counts (vitest-config/changements.mjs); the line `↳`
16
+ // says whether the pass is targeted or complete. The final pass of a circuit gives the base of
17
+ // its lot (`GRILLHOUSE_BASE_DU_LOT`) and measures against it, targeted; a `--base` given takes
18
+ // precedence. The guards and the builds play whole. A pass green and restricted by no filter
19
+ // keeps its tree as the last green; a red one leaves it. The pass alone keeps it, for every
20
+ // language: it plays the tasks of every package of the graph, a crate's and a Python
21
+ // project's beside a TypeScript package's (their `test:unit` and `typecheck`).
22
+ // - `--tout`, and `--force` (the night, scripts/nuit.sh), play the complete pass: each task of
23
+ // tests for real (`GRILLHOUSE_TESTS` carries only `rejouer`, the moment of the pass, no path).
24
+ // - The part of the budget of the machine (scripts/places-de-la-machine.mjs, `avecLaPasse`): a
25
+ // pass whose part does not fit waits, says so with what it waits for, when it begins and every
26
+ // 30 s; the wait bounded (60 min), it ends at 75; a key `grillhouse.part` or a reserve that is
27
+ // faulty ends it at once, red (1); either way without playing. A pass in the frame's own
28
+ // repository passes before a project's. It plays held to its part in a control group of its own.
29
+ // - Turborepo plays the build, the guards (`grillhouse:gardes`, the project's `gardes`), the
30
+ // typing (`typecheck`, ./turbo-des-paquets.mjs) and the tests (`test:unit`) beside each other:
43
31
  // `turbo run grillhouse:gardes gardes typecheck test:unit --continue=dependencies-successful
44
- // --concurrency=<n> --summarize`, each argument given after it. A red does not stop the pass:
45
- // every task whose prerequisites passed plays, and each red is named. <n>, the tasks side by
46
- // side, is half the cores of the pass's part, one at least (`tachesCoteACote` of the core): each task of tests is
47
- // itself parallel (Vitest's workers), as make's `-j` and Bazel's `--local_cpu_resources` bound a
48
- // build by the machine; a `--concurrency` among the arguments replaces it. The workers of each
49
- // task of tests are the cores shared between the tasks of tests side by side
50
- // (`travailleursDeLaPasse`, GRILLHOUSE_TRAVAILLEURS): the test processes of a pass never
51
- // outnumber the cores.
52
- // - The run of Turborepo plays under the watch of the memory (scripts/garde-de-la-memoire.mjs): cut
53
- // when the memory available and the free swap run out, or when the machine waits for its memory
54
- // half of the time, the pass says why and ends at 75, « à repasser », no task judged.
55
- // - The pass plays no measure of time (grillhouse-bd7): the time budget benches and the time
56
- // witnesses (a test file that imports `mesurerAuRepos`) are out of the day, as the night tests
57
- // are, and the night plays them (scripts/langages/typescript/vitest-config/cibles.mjs,
58
- // scripts/langages/typescript/tests-de-nuit.mjs), as Bazel leaves a test tagged `manual` out of
59
- // its patterns and the benchmarks of Chromium and rustc-perf leave the CI of each commit for a
60
- // machine at rest. The day waits for no rest: a delay past is a red (the duration reporter
61
- // classifies a delay of a day test as a real red), and so is a task at 75.
62
- // - The pass plays too the format check and the lint (grillhouse-61z, grillhouse-44b.9), per
63
- // package: the scripts `format:check` and `lint` of each package that holds them, as its tasks
64
- // (`<package>#format:check`, `<package>#lint`), and the root's for its own files only, as root
65
- // tasks (`//#format:check`, `//#lint`), under the same `--continue`: a red lint hides no red
66
- // test, each red is named with its package. The CI calls the pass alone.
67
- // - `--gardes` plays the tasks of guards and these two controls alone, `turbo run grillhouse:gardes
68
- // gardes format:check lint …`, the repository whole (ESLint and Prettier have no notion of a lot;
69
- // their cache reads again what changed), with the same verdict: what the reviewer plays on the
70
- // ticket's copy, the tests aside.
32
+ // --concurrency=<n> --summarize`, each argument given after it; a `--concurrency` among them
33
+ // replaces <n>, half the cores of the pass's part, one at least (`tachesCoteACote`). A red
34
+ // stops no task whose prerequisites passed, and each red is named. The workers of each task of
35
+ // tests (`travailleursDeLaPasse`, GRILLHOUSE_TRAVAILLEURS) share the cores between the tasks of
36
+ // tests side by side: the test processes of a pass never outnumber the cores.
37
+ // - The memory watch (scripts/garde-de-la-memoire.mjs): the run is cut when the memory available
38
+ // and the free swap run out, or when the machine waits for its memory half of the time; the
39
+ // pass says why and ends at 75, no task judged.
40
+ // - The pass plays no measure of time: a time budget bench and a time witness (a test file that
41
+ // imports `mesurerAuRepos`) are out of the day, as the night tests are (vitest-config/cibles.mjs,
42
+ // ./tests-de-nuit.mjs). A delay past is a red, and so is a task at 75.
43
+ // - The format check and the lint play per package (`<package>#format:check`, `<package>#lint`,
44
+ // the scripts of each package that holds them) and for the root's own files (`//#format:check`,
45
+ // `//#lint`), under the same `--continue`.
46
+ // - `--gardes` plays the guards, `format:check` and `lint` alone (`turbo run grillhouse:gardes
47
+ // gardes format:check lint …`), the repository whole, with the same verdict: what the reviewer
48
+ // plays. `--sans-tests` plays every task but the tests (`turbo run grillhouse:gardes gardes
49
+ // typecheck format:check lint …`), with no measure. `--tranche i/n` plays the tasks of tests
50
+ // alone (`turbo run test:unit …`) with the builds they depend on, each package of Vitest playing
51
+ // the i-th of n parts of its test files (./tranches.mjs); it is measured as the pass is
52
+ // (complete with `--tout`), carries itself in `GRILLHOUSE_TESTS`, which the hash of the tests
53
+ // counts, plays for real since it writes its reports (`.vitest-reports/`, the former ones
54
+ // removed first). Neither a tranche nor `--sans-tests` keeps its tree as the last green. A
55
+ // tranche not of the form `i/n` (1 ≤ i ≤ n), or given with `--gardes` or `--sans-tests`, is
56
+ // refused before any work, code 1.
71
57
  // - The verdict reads the exit code of each task in the summary of each run
72
- // (`.turbo/runs/<id>.json`), since Turborepo exits with the greatest code of its tasks (a 75
73
- // would hide a 1). The summary each run writes is removed, and `.turbo/runs` with it when the
74
- // run created it; while the pass names a results directory (`GRILLHOUSE_RESULTATS`,
75
- // scripts/resultats.mjs), it goes there instead, where the circuit reads it.
76
- // - A task at 0 is green. A task at any other code, 75 included, and a summary that does not read
77
- // while Turborepo failed: red, code 1, each task named.
78
- // - The progress of the pass (scripts/avancement.mjs): the directory its caller names in
79
- // GRILLHOUSE_AVANCEMENT (the circuit's), else one of its own, which it names in the file of the
80
- // part it holds while it plays (`nommerLAvancement`), as the board shows its holder, and
81
- // removes at its end, its total kept. Before its run of Turborepo, the plan of
82
- // the run (`turbo run … --dry=json`) names its tasks of tests and counts done the files of those
83
- // Turborepo replays from its cache.
84
- // - The red tasks: while the variable `GRILLHOUSE_ROUGES` (`ROUGES`) names a file, the pass writes
85
- // there, one Turborepo task id per line (`<package>#<task>`, `//#<task>` for the root), then a
86
- // tab and the command that replays it alone (`npx turbo run <task> --filter=<package>`), each task
87
- // red on its own exit code, once each; a task that did not play is none of them (its
88
- // prerequisite red is). Green, the file is empty. The night reads it for its bisect commands (scripts/nuit.sh), with no second
89
- // reading of the summaries.
90
- // - The pass has a base of its own (scripts/mesure/base-de-passe.mjs), in the temporary
91
- // directory of its environment, which it sweeps first of the bases a killed pass left: every
92
- // run of Turborepo gets it in TMPDIR, TMP and TEMP, the root's `globalPassThroughEnv` passing
93
- // TMPDIR on to every task (scripts/langages/typescript/turbo-des-paquets.mjs), and the pass
94
- // removes it at its end, green, red or interrupted (SIGINT, SIGTERM, SIGHUP).
95
- // - `--sans-tests` plays every task of the pass but the tests: the guards, the typing, the format
96
- // check and the lint (`turbo run grillhouse:gardes gardes typecheck format:check lint …`), with no
97
- // measure; `--tranche i/n` plays the tasks of tests alone (`turbo run test:unit …`), with the
98
- // builds they depend on, each package of Vitest playing the i-th of n parts of its test files
99
- // (./tranches.mjs): the n tranches and `--sans-tests` together play the complete pass, each task
100
- // once, as the CI plays it, one job each. A tranche is measured as the pass is (against the last
101
- // green or its `--base`; complete with `--tout`), carries itself in the variable
102
- // `GRILLHOUSE_TESTS`, which the hash of the tests counts (two tranches never replay one another
103
- // from the cache), plays for real, since it writes its reports (./tranches.mjs, under
104
- // `.vitest-reports/`, its former ones removed first), and never keeps its tree as the last green,
105
- // green or not; neither does `--sans-tests`. A tranche not of the form `i/n` (1 ≤ i ≤ n), or given
106
- // with `--gardes` or `--sans-tests`, is refused before any work, code 1.
107
- // - The run plays without the paths of a targeted run's tests: the variable `GRILLHOUSE_TESTS`
108
- // (scripts/langages/typescript/vitest-config/cibles.mjs) carries only `rejouer`, for a complete
109
- // pass.
58
+ // (`.turbo/runs/<id>.json`), since Turborepo exits with the greatest code of its tasks. The
59
+ // summary is removed, and `.turbo/runs` with it when the run created it; under a results
60
+ // directory (`GRILLHOUSE_RESULTATS`) it goes there. A task at 0 is green; any other code, 75
61
+ // included, and a summary that does not read while Turborepo failed: red, code 1, each task named.
62
+ // - The progress (scripts/avancement.mjs): the directory `GRILLHOUSE_AVANCEMENT` names, else one
63
+ // of its own, named in the file of the part it holds (`nommerLAvancement`) and removed at its
64
+ // end. Before its run, the plan (`turbo run … --dry=json`) names the tasks of tests and counts
65
+ // done the files of those Turborepo replays from its cache.
66
+ // - The red tasks: while `GRILLHOUSE_ROUGES` (`ROUGES`) names a file, the pass writes there, once
67
+ // each, one line per task red on its own exit code: its id (`<package>#<task>`, `//#<task>`
68
+ // for the root), a tab, the command that replays it alone (`npx turbo run <task>
69
+ // --filter=<package>`); a task that did not play is none. Green, the file is empty. The night
70
+ // reads it for its bisect commands (scripts/nuit.sh).
71
+ // - The base of the pass (scripts/mesure/base-de-passe.mjs): in the temporary directory of its
72
+ // environment, swept first of the bases a killed pass left; every run of Turborepo gets it in
73
+ // TMPDIR, TMP and TEMP (`globalPassThroughEnv`, ./turbo-des-paquets.mjs); removed at the end,
74
+ // green, red or interrupted (SIGINT, SIGTERM, SIGHUP).
110
75
  import { spawnSync } from 'node:child_process';
111
76
  import { existsSync, readdirSync, readFileSync, rmdirSync, rmSync, writeFileSync } from 'node:fs';
112
77
  import { availableParallelism, tmpdir } from 'node:os';
@@ -2,7 +2,8 @@
2
2
  // The lock of the dependencies (package-lock.json) against the package.json it locks, on the model
3
3
  // of `npm ci`, which refuses a lock out of step with its package.json: the lock is written by the
4
4
  // frame at the integration (`fichiersEngendres` of ./index.mjs), and this guard refuses a copy
5
- // whose lock is late.
5
+ // whose lock is late: the guard `verrou-des-dependances`
6
+ // (packages/grillhouse/docs/architecture/tests.md §3.4).
6
7
  //
7
8
  // npx grillhouse verrou-des-dependances run from the repository root (a guard of grillhouse:gardes)
8
9
  //
@@ -4,6 +4,7 @@
4
4
  // done, then at the end of the run, every file done. The name of the record is made of the package
5
5
  // directory it runs in and its process; it carries the hash of its Turborepo task (TURBO_HASH), by
6
6
  // which the pass knows it again in Turborepo's cache (scripts/avancement.mjs).
7
+ // Mechanism: packages/grillhouse/docs/architecture/tests.md, §3.1 (progress of a pass).
7
8
  import { fileURLToPath } from 'node:url';
8
9
  import { AVANCEMENT, ecrireTache } from '../../../services-du-noyau.mjs';
9
10
 
@@ -2,6 +2,8 @@
2
2
  // `@roomi-fields/grillhouse/vitest-config`: every Vitest configuration of a project extends it
3
3
  // (`mergeConfig(base, defineConfig({ … }))`) and adds its own `include`, coverage and options
4
4
  // without repeating what this file sets.
5
+ // Mechanism: packages/grillhouse/docs/architecture/tests.md, §3.1, §4.2 (the temporary base),
6
+ // §5.4.
5
7
  //
6
8
  // - Every configuration imports it by its name (`import base from
7
9
  // '@roomi-fields/grillhouse/vitest-config'`), the root's of a project as each package's, as the
@@ -58,9 +60,7 @@
58
60
  // module typescript: what the tests left there at the end of the run, once Vitest removed its
59
61
  // own directory, fails the run, each name written, the caches of the tools a test launches
60
62
  // tolerated by name (`CACHES_DES_OUTILS`, below) (`baseDeVitest`, below; the base,
61
- // scripts/mesure/base-de-passe.mjs). A test makes its temporary directory with
62
- // `mkdtempSync(path.join(tmpdir(), '<prefix>-'))` and removes it in `afterAll` (`rmSync`,
63
- // `recursive` and `force`), a red test included.
63
+ // scripts/mesure/base-de-passe.mjs).
64
64
  // - While a run names the progress directory of its pass (`GRILLHOUSE_AVANCEMENT`,
65
65
  // scripts/mesure/avancement.mjs), the reporter of progress writes there the files done and planned of its
66
66
  // task at each test file done, which the board reads (scripts/avancement.mjs,
@@ -95,8 +95,8 @@ const MARQUE = 'GRILLHOUSE_BASE_DE_VITEST';
95
95
  * tests start, written out of the pass for good;
96
96
  * - `claude-<uid>`: the temporary directory of Claude Code (`CLAUDE_CODE_TMPDIR`, else
97
97
  * `os.tmpdir()`), where a claude a test launches keeps its scratchpads. Its variable named out
98
- * of the pass would bring them back into the machine's /tmp (grillhouse-3uv.93: 18 835
99
- * directories of `/tmp/claude-1000` left by the envelopes of trial copies).
98
+ * of the pass would bring them back into the machine's /tmp (one directory per envelope of a
99
+ * trial copy).
100
100
  */
101
101
  const CACHES_DES_OUTILS = new Set(['node-compile-cache', `claude-${process.getuid?.() ?? ''}`]);
102
102
 
@@ -2,6 +2,7 @@
2
2
  // large. A module of its own, with no import: the configurations of Vitest (./base.mjs,
3
3
  // ../vitest.nuit.config.mjs) are bundled by Vite and read only these numbers, while the
4
4
  // classification that deduces a file's size (./delais.mjs) reads the guard of the sizes, a script.
5
+ // Mechanism: packages/grillhouse/docs/architecture/tests.md, §3.4 (the guard of the sizes).
5
6
 
6
7
  /** The delay of each size, in ms (Bazel: small 60 s, medium 300 s, large 900 s). */
7
8
  export const DELAIS_MS = { petit: 60000, moyen: 300000, grand: 900000 };