@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
package/scripts/nuit.sh CHANGED
@@ -1,9 +1,11 @@
1
1
  #!/usr/bin/env bash
2
- # The night: once a day, the full pass played for real, then what the day never plays: the night
2
+ # The night pass (packages/grillhouse/docs/architecture/entree.md §3.1 « Passe de nuit », §5.3):
3
+ # once a day, the full pass played for real, then what the day never plays: the night
3
4
  # tests and the measures of time (the time budget benches and the time witnesses). During the day `npm run verifier` (the integration's) plays
4
5
  # what the changes since the last green touch (scripts/integration/integrer.mjs,
5
6
  # scripts/dernier-vert.mjs); the module of the project's language plays each step
6
- # (scripts/jointure.d.ts).
7
+ # (scripts/jointure.d.ts). The paragraphs below are the details only this script knows (marks,
8
+ # files, bounds, the text of a night ticket).
7
9
  #
8
10
  # npx grillhouse nuit from the root of the project, which runs it alone
9
11
  # (src/temporal/nuits/commande.ts): the workflow of the nights of the
@@ -55,8 +57,8 @@
55
57
  # a project that installs the frame, even with a copy of the frame's package.json under
56
58
  # packages/grillhouse/, builds nothing. A failed build turns the night red, and nothing runs.
57
59
  # - The night tests: after the full pass, the night tests, then the measures of time alone (the
58
- # time budget benches and the time witnesses), which `npm test` and the integration leave out
59
- # (grillhouse-bd7), played by the command `tests-de-nuit` of the module of the copy's language
60
+ # time budget benches and the time witnesses), which `npm test` and the integration leave out,
61
+ # played by the command `tests-de-nuit` of the module of the copy's language
60
62
  # (the module typescript's: the files `*.nuit.test.*` and `*.nuit.spec.*`, then the files
61
63
  # `*.budget.test.*`, `*.budget.spec.*` and those that import `mesurerAuRepos`, one at a time, by
62
64
  # Vitest; the module python's, `*_nuit_test.py`; the module cargo's, the test targets
@@ -67,9 +69,13 @@
67
69
  # bound 15 min) and plays once more; green then, the night goes on; à repasser again, or no rest in the bound, the night
68
70
  # ends there, « à repasser », red if the full pass is.
69
71
  # - The two parts of the night: a project whose `.github/workflows/nuit.yml` plays on the label
70
- # `pc2` leaves PC2 its night tests but those tagged @poste and the measures of time (the flow's
71
- # tranches, `tests-de-nuit --hors-du-poste`, then `--mesures`). The night of PC3 plays the tests
72
- # tagged @poste alone (`tests-de-nuit --du-poste`, on its part), then reads the day's flow by `gh`
72
+ # `pc2` leaves PC2 its night tests but those tagged @poste (the flow's tranches,
73
+ # `tests-de-nuit --hors-du-poste`). The measures of time play on PC3, on dedicated cores, unless
74
+ # the flow declares a job that plays them (a command `tests-de-nuit --mesures`, as the flow of
75
+ # Grillhouse: scripts/flux-de-la-nuit.mjs): then that job's verdict, read for the commit of the
76
+ # night, stands for them, and PC3 plays them only when the job was interrupted. The night of PC3
77
+ # plays the tests tagged @poste, then the measures (`tests-de-nuit --du-poste`, on its part), then
78
+ # reads the flow of its commit by `gh`
73
79
  # (scripts/repli-de-la-nuit.mjs): a tranche whose job has not started 60 minutes after the flow's
74
80
  # hour is cancelled and played on PC3, a tranche started then interrupted plays whole again, a
75
81
  # tranche finished on PC2, green or red, is never replayed; the log says which tranches played
@@ -99,13 +105,14 @@
99
105
  # why and the place it holds, a kept copy whose ticket is closed losing what the tools of its
100
106
  # languages wrote there. The night names its own copy to the removal, its steps played: the copy
101
107
  # stays, and loses what the tools of its languages wrote there (`target`, `.turbo`), its
102
- # `node_modules` kept, which its next preparation would remove anyway (grillhouse-k5y). The
108
+ # `node_modules` kept, which its next preparation would remove anyway. The
103
109
  # removal never changes the night's verdict; the end of each circuit runs it too
104
110
  # (scripts/circuit.mjs), the night's copy untouched.
105
111
  # - It takes no lock of the integration or of the queue (scripts/integration/file.mjs): an
106
112
  # integration and the queue run during the night, each in its own copy.
107
113
  # - Its log is <git common dir>/nuit/<date>.log. Green: HEAD becomes the last green commit
108
- # (<git common dir>/nuit/dernier-vert). Red: the red tasks, each grouped by its cause as an
114
+ # (<git common dir>/nuit/dernier-vert), only once the measures of time were played and are green,
115
+ # by PC3 or by the flow's job for that commit. Red: the red tasks, each grouped by its cause as an
109
116
  # alerting system groups by fingerprint: each red task of the full pass (the file
110
117
  # GRILLHOUSE_ROUGES names, which the verification of the module writes: `<task>` per line, then
111
118
  # a tab and the command that replays it alone when the language has one, no task à repasser
@@ -185,7 +192,7 @@ preparer() {
185
192
  fi
186
193
  partages=$(bash "$ici/sous-modules.sh" pose "$copie")
187
194
  }
188
- # The part of PC2: reads the day's Nuit flow by `gh` (scripts/repli-de-la-nuit.mjs), which cancels the
195
+ # The part of PC2: reads the Nuit flow of the commit the night plays by `gh` (scripts/repli-de-la-nuit.mjs), which cancels the
189
196
  # run when a tranche has not started 60 minutes after the flow's hour, then plays on PC3, whole, each
190
197
  # tranche not played on PC2 (never one finished there, green or red). A tranche still running or
191
198
  # waiting leaves the part of PC2 « à repasser » (75). The statement says which tranches played where.
@@ -197,18 +204,19 @@ repli() {
197
204
  code_pc2=75
198
205
  return
199
206
  fi
200
- if ! decision="$(node "$ici/repli-de-la-nuit.mjs" "$depot" "$tranches")"; then
207
+ if ! decision="$(node "$ici/repli-de-la-nuit.mjs" "$depot" "$tranches" "" "$tete")"; then
201
208
  echo "⏱ le repli de la nuit ne lit pas le flux Nuit : la part de PC2 reste à repasser."
202
209
  code_pc2=75
203
210
  return
204
211
  fi
205
- local lignes rejouer= rouges_pc2= attend=
206
- lignes="$(printf '%s' "$decision" | node -e 'let s="";process.stdin.on("data",d=>s+=d).on("end",()=>{const d=JSON.parse(s);const l=k=>(d[k]??[]).join(" ");process.stdout.write(["pc2","pc3","rouges","enAttente","enCours"].map(k=>k+"\t"+l(k)).join("\n")+"\n")})')"
212
+ local lignes rejouer= rouges_pc2= attend= mesures_du_flux=
213
+ lignes="$(printf '%s' "$decision" | node -e 'let s="";process.stdin.on("data",d=>s+=d).on("end",()=>{const d=JSON.parse(s);const l=k=>(d[k]??[]).join(" ");process.stdout.write(["pc2","pc3","rouges","enAttente","enCours","mesures"].map(k=>k+"\t"+l(k)).join("\n")+"\n")})')"
207
214
  while IFS= read -r ligne; do
208
215
  case "$ligne" in
209
216
  pc2$'\t'*) echo "relevé de la nuit : tranches jouées sur PC2 : ${ligne#pc2$'\t'}" ;;
210
217
  pc3$'\t'*) rejouer="${ligne#pc3$'\t'}"; echo "relevé de la nuit : tranches jouées sur PC3 : ${rejouer:-aucune}" ;;
211
218
  rouges$'\t'*) rouges_pc2="${ligne#rouges$'\t'}" ;;
219
+ mesures$'\t'*) mesures_du_flux="${ligne#mesures$'\t'}"; echo "relevé de la nuit : mesures de temps du flux : ${mesures_du_flux}" ;;
212
220
  enAttente$'\t'*|enCours$'\t'*) attend="$attend ${ligne#*$'\t'}" ;;
213
221
  esac
214
222
  done <<< "$lignes"
@@ -229,6 +237,28 @@ repli() {
229
237
  attend="$attend $t"
230
238
  fi
231
239
  done
240
+ # The measures of time: the flow's job plays them when its file declares one; the night of the
241
+ # poste plays them itself otherwise (tests-de-nuit --du-poste), so no last green without them.
242
+ if node "$ici/flux-de-la-nuit.mjs" mesures "$copie"; then
243
+ case "$mesures_du_flux" in
244
+ rouge)
245
+ echo "✗ les mesures de temps du flux sont rouges sur PC2."
246
+ etapes_pc2+=("les mesures de temps de la nuit sur PC2")
247
+ taches_pc2+=("les mesures de temps de la nuit sur PC2") ;;
248
+ a-rejouer)
249
+ (cd "$copie" && monter node "$ici/commande-du-langage.mjs" tests-de-nuit --mesures)
250
+ code=$?
251
+ if [ "$code" -eq 75 ]; then
252
+ attend="$attend mesures"
253
+ elif [ "$code" -ne 0 ]; then
254
+ echo "✗ les mesures de temps, rejouées sur PC3, sont rouges."
255
+ etapes_pc2+=("les mesures de temps de la nuit, rejouées sur PC3")
256
+ taches_pc2+=("les mesures de temps de la nuit sur PC3 (repli)")
257
+ fi ;;
258
+ verte) ;;
259
+ *) attend="$attend mesures" ;;
260
+ esac
261
+ fi
232
262
  if [ "${#etapes_pc2[@]}" -gt 0 ]; then
233
263
  code_pc2=1
234
264
  elif [ -n "${attend// /}" ]; then
@@ -365,8 +395,11 @@ process.exit(paquets(process.argv[2]).some(p => p.pkg.name === "@roomi-fields/gr
365
395
  fi
366
396
  fi
367
397
  # A project whose Nuit flow plays on PC2 (its runner label `pc2`) leaves PC2 the night tests that
368
- # do not need the poste: PC3 plays the tests tagged @poste alone, then the tranches PC2 did not
369
- # play (the fallback, scripts/repli-de-la-nuit.mjs); the measures of time play on PC2.
398
+ # do not need the poste: PC3 plays the tests tagged @poste, then the tranches PC2 did not play
399
+ # (the fallback, scripts/repli-de-la-nuit.mjs). The measures of time play on PC3 too, unless the
400
+ # flow declares a job that plays them (`tests-de-nuit --mesures`, scripts/flux-de-la-nuit.mjs,
401
+ # the flow of Grillhouse): then the verdict of its job, read for the commit of the night, counts.
402
+ # The last green is set only when the measures were played and are green, by PC3 or by that job.
370
403
  local sur_pc2=0 tranches=
371
404
  if grep -q "\bpc2\b" "$copie/.github/workflows/nuit.yml" 2>/dev/null; then
372
405
  sur_pc2=1
package/scripts/outil.mjs CHANGED
@@ -1,6 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  // The installation of the published version that leads the frame's repository
3
- // (scripts/aiguillage.mjs, the key `grillhouse.outil`, the cache, the switch).
3
+ // (scripts/aiguillage.mjs, the key `grillhouse.outil`, the cache, the switch). The mechanism is
4
+ // installation.md §5.5 (packages/grillhouse/docs/architecture/).
4
5
  //
5
6
  // npx grillhouse outil installs the version the key names, nothing when it is there
6
7
  // npx grillhouse outil <x.y.z> writes the key, then installs that version
@@ -1,10 +1,10 @@
1
- // The reading of the `grillhouse.outils` key of a package.json, the tools of the project, as Bazel
2
- // declares what an action sees out of its sandbox (--sandbox_add_mount_pair) and the environment
3
- // it gets (--action_env): `{ "<VARIABLE>": "<chemin>" }`, each path absolute or under `~`. The
4
- // envelope (scripts/enveloppe/enveloppe.mjs) mounts each path read-only and passes each variable to
1
+ // The reading of the `grillhouse.outils` key of a package.json, the tools of the project:
2
+ // `{ "<VARIABLE>": "<chemin>" }`, each path absolute or under `~`. The envelope
3
+ // (scripts/enveloppe/enveloppe.mjs) mounts each path read-only and passes each variable to
5
4
  // the session; the circuit's passes (scripts/circuit.mjs), `npm run verifier`
6
5
  // (bin/grillhouse.mjs) and the night (scripts/nuit.sh) play with the same variables, so that every
7
- // one of them sees the same tool, whatever its launcher's environment.
6
+ // one of them sees the same tool, whatever its launcher's environment. Architecture:
7
+ // docs/architecture/machine.md (§1, §5.5).
8
8
  //
9
9
  // - The key is absent, null or an object; each name is a variable's (`[A-Za-z_][A-Za-z0-9_]*`),
10
10
  // each value a string, a path absolute or under `~` (the home), that exists. Every fault is named
@@ -18,7 +18,7 @@
18
18
  // `~/.local/share/keyrings`, the keyrings of the machine's credentials. A path that is a link is
19
19
  // judged by its target too, which the envelope mounts with it.
20
20
  // - A tool is a string path (unhashed) or `{ "chemin": "<chemin>", "contenu": true }`: hashed by
21
- // content, Bazel counting the tools of an action among its inputs. Its fingerprint
21
+ // content. Its fingerprint
22
22
  // (`empreinteDeLOutil`, `empreintesDe`) is given to every pass as `<VARIABLE>_EMPREINTE`, which
23
23
  // the root turbo.json's `globalEnv` names so that Turborepo hashes its value. Any other object
24
24
  // form is refused, its key named; a hashed tool absent, unreadable or special is refused too.
@@ -2,8 +2,9 @@
2
2
  // the entry by which it enters the graph of Turborepo, which reads a `package.json` beside each
3
3
  // project that is no JavaScript (node_modules/turbo/docs/guides/multi-language.mdx:191), as Turborepo's
4
4
  // own example of Rust writes one beside the crate. `grillhouse paquet` writes it with the package
5
- // (./paquet.mjs), and the migration of 0.31.0 for the packages of an existing project
6
- // (./migrations/0.31.0-paquets-dans-le-graphe.mjs).
5
+ // (./paquet.mjs), and the migration of the packages of an existing project
6
+ // (./migrations/0.31.0-paquets-dans-le-graphe.mjs). The mechanism is installation.md §3.1
7
+ // (« Création d'un paquet »), in packages/grillhouse/docs/architecture/.
7
8
  //
8
9
  // - Its name is the manifest's: the `name` of the `[package]` of a Cargo.toml, of the `[project]`
9
10
  // of a pyproject.toml.
@@ -1,10 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
  // The creation of a package, out of the circuit: the third of the four times of a package's birth
3
3
  // (the common charter, « La naissance d'un paquet »: the grill, the writing of its row and its
4
- // documents, this command, then a ticket of code), as the generators of Nx (`nx g @nx/js:lib`,
5
- // after `nx add` installs the tools of its plugin), `turbo gen workspace` and `cargo new --lib`
6
- // added to the members of the workspace write one. A skeleton has neither behaviour nor test: it
7
- // does not pass by the circuit, which works on a package that exists.
4
+ // documents, this command, then a ticket of code), as the generators of Nx and `cargo new --lib`
5
+ // write one. A skeleton has neither behaviour nor test. The mechanism is installation.md §3.1
6
+ // (« Création d'un paquet »), tests.md §5.6, in packages/grillhouse/docs/architecture/.
8
7
  //
9
8
  // npx grillhouse paquet <chemin> from the root of the project, <chemin> from it
10
9
  //
@@ -1,5 +1,5 @@
1
1
  // The types of ./paquets.mjs as the entry `@roomi-fields/grillhouse/paquets` publishes it, for a
2
- // project's guard that leaves out the packages out of the frame.
2
+ // project's guard that leaves out the packages out of the frame (docs/architecture/tests.md §3.4).
3
3
 
4
4
  /** The code of `src/` (the root's, or a package's under `packages/`), as a pattern of a path from
5
5
  * the root: what a project publishes, out of its tests. */
@@ -19,6 +19,8 @@
19
19
  //
20
20
  // A project's guard imports `horsCadre` by the package's entry `@roomi-fields/grillhouse/paquets`,
21
21
  // its types in ./paquets.d.ts (docs/ARCHITECTURE.md, the package's named entries).
22
+ //
23
+ // The packages are the nodes of the graph of the tasks: docs/architecture/tests.md §2.1 and §3.1.
22
24
  import { spawnSync } from 'node:child_process';
23
25
  import { existsSync, globSync, readdirSync, readFileSync } from 'node:fs';
24
26
  import path from 'node:path';
@@ -1,18 +1,15 @@
1
- // A pass on the machine: each takes its part of the budget (scripts/places-de-la-machine.mjs
2
- // `prendreUnePart`), waiting for it when the parts held leave too little, and plays held to that
3
- // part by the system: a control group of its own (`systemd-run --user --scope`) whose CPU weight
4
- // and memory bound come from the part, with no hard CPU ceiling (a ceiling pauses a pass by jerks;
5
- // a weight slows nothing on a free machine, as the `cpu.weight` of the kernel shares the cores
6
- // only when they are short). Its tools receive the processes of its part
7
- // (GRILLHOUSE_TRAVAILLEURS). A pass takes no place of the machine: a place is a session of an
8
- // agent or a circuit.
1
+ // A pass on the machine: it takes its part of the budget (scripts/places-de-la-machine.mjs
2
+ // `prendreUnePart`), waiting when the parts held leave too little, and plays held to that part
3
+ // by a control group of its own (`systemd-run --user --scope`) whose CPU weight and memory bound
4
+ // come from the part, with no hard CPU ceiling. Its tools receive the cores of its part
5
+ // (GRILLHOUSE_TRAVAILLEURS). A pass takes no place. Architecture:
6
+ // docs/architecture/machine.md (§3.1, §5.1, §6).
9
7
  //
10
8
  // - A pass out of the envelope of an agent is held to its part: the heavy pass of a circuit (its
11
9
  // command, launched by the circuit), `npm run verifier`, a targeted `npm test`, the CI on a
12
- // machine of ours, the night. The commands an agent launches in its envelope take no part (the
13
- // place of its session covers them) and play without a group; where the system gives no group
14
- // (no manager of the user), the pass plays without one too; each says it once, « joue sans part
15
- // tenue ».
10
+ // machine of ours, the night. The commands an agent launches in its envelope take no part and
11
+ // play without a group; where the system gives no group (no manager of the user), the pass
12
+ // plays without one too; each says it once, « joue sans part tenue ».
16
13
  // - A heavy pass keeps what it consumes (scripts/consommation-des-passes.mjs): a pass that is the
17
14
  // process itself (`npm run verifier`) enters its group by `StartTransientUnit` of the manager
18
15
  // of the user, the weight and the bound of its part among its properties; a pass the circuit
@@ -1,61 +1,44 @@
1
- // The places of the machine: a fixed number of places for the whole machine, whatever repository a
2
- // session or a pass plays in, as the executors of Jenkins and the agents of Buildkite are a fixed
3
- // number, and as the job server of GNU make shares its slots between every make of one build.
4
- // Each session of an agent (testwriter, developer, reviewer…) takes a place at its start and gives
5
- // it back at its end; a circuit that waits for a question, or between two sessions, holds none.
6
- // A pass takes no place: it takes its part of the budget of the machine (below), which alone
7
- // bounds it. A place is a session of an agent or a circuit; a part is a pass. Witness: 2026-11-02,
8
- // load 39 on 12 cores with five circuits at once (grillhouse-9kq).
1
+ // The places and the parts of the machine, taken by a synchronous caller: a place is held by a
2
+ // session of an agent or a circuit, a part by a pass. Architecture: docs/architecture/machine.md
3
+ // (§3.1, §5.1, §5.2, §5.4).
9
4
  //
10
- // - The places live on the Temporal server, in the one workflow of the machine
11
- // (src/temporal/places/deroule.ts), which grants them by the rule of scripts/regles-des-places.mjs
12
- // (a free place under the ceiling, the turn of the rank of arrival, the admission at the load and
13
- // the memory as `make -l`'s, the spacing of the starts) and frees the place of a process gone. A
14
- // synchronous caller reads and takes them by ./places-du-serveur.mjs, in a process of its own.
5
+ // - The places live on the Temporal server, in the workflow of the machine
6
+ // (src/temporal/places/deroule.ts), which grants them by the rule of ./regles-des-places.mjs
7
+ // and frees the place of a process gone; this module reads and takes them by
8
+ // ./places-du-serveur.mjs, in a process of its own. A session takes a place at its start and
9
+ // gives it back at its end.
15
10
  // - The server is required on the workstation: one that does not answer stops the taking, named.
16
- // In the CI (CI set) no place is taken. A trial machine (GRILLHOUSE_PARTS_DE_LA_MACHINE, the
17
- // base configuration of the tests) takes its places on the server GRILLHOUSE_PLACES_D_ESSAI
18
- // names, and none without it, so that no test takes a place of the user's machine.
11
+ // In the CI (CI set) no place is taken. A trial machine (GRILLHOUSE_PARTS_DE_LA_MACHINE) takes
12
+ // its places on the server GRILLHOUSE_PLACES_D_ESSAI names, and none without it.
19
13
  // - A session that holds a place carries its mark to its children (GRILLHOUSE_PLACE_TENUE). In
20
14
  // the envelope of an agent (GRILLHOUSE_ENVELOPPE set, ./enveloppe/paquets-du-plan.mjs) no place
21
- // and no part is taken: the place of the session, taken out of it by the circuit, covers its
22
- // commands, and the envelope passes on its mark; a number of process there means nothing on
23
- // the machine.
24
- // - The ceiling is a configuration of the poste (`plafondDe` of ./plafond-de-la-machine.mjs:
25
- // GRILLHOUSE_PLACES of `~/.config/grillhouse/machine.env`, 3 without it), which the workflow
26
- // reads again at each judgement; two starts are spaced by ESPACEMENT_MS
27
- // (GRILLHOUSE_ESPACEMENT_MS names another, in ms), which the workflow reads when it starts.
15
+ // and no part is taken: the envelope passes on the mark of the session's place.
16
+ // - The ceiling of the places is `plafondDe` of ./plafond-de-la-machine.mjs (3 without a
17
+ // setting), read again at each judgement; two starts are spaced by ESPACEMENT_MS
18
+ // (GRILLHOUSE_ESPACEMENT_MS names another, in ms), read when the workflow starts.
28
19
  // - A wait says its reason (place, rank, load, memory or spacing) when it begins and every 30 s,
29
- // and is bounded, GRILLHOUSE_ATTENTE_MACHINE_MS: at the bound, « à repasser » (75), the request
30
- // withdrawn.
31
- // - A wait keeps the rank of its arrival, as the queue of a merge train keeps its order: the rank
32
- // is drawn when the circuit is launched (`prendreUnRang`) and kept from one session to the next.
33
- // - The number of workers of the tests of a session is `travailleursDe`: max(1, cores ÷ places),
34
- // passed to the tool of each language (GRILLHOUSE_TRAVAILLEURS).
35
- //
36
- // The parts of the passes, as Slurm reserves the cores and the memory of a job and waits while
37
- // they lack, and as the job server of GNU make shares its slots between every make of a build:
38
- // - The budget of the machine (its hardware less the reserve of the user,
39
- // ./plafond-de-la-machine.mjs) is shared in parts, which every pass of the machine takes, whatever
40
- // repository it plays in: the heavy pass of a circuit, `npm run verifier`, a targeted
41
- // `npm test`, a slice of the CI on a machine of ours, the night. A pass starts when its part
42
- // fits in what the parts held leave of the budget and the machine admits it (the load under the
43
- // cores, 4 GB free: `admissionDePart` of ./regles-des-places.mjs); else it waits, says what it
44
- // waits for when it begins and every 30 s, keeps its rank (the measure of the frame before a
45
- // project's, then the order of arrival) and stops at « à repasser » (75) at the bound of the wait.
46
- // - The state is shared by the machine, one file per pass in the directory of the user's state
47
- // (`${XDG_STATE_HOME:-~/.local/state}/grillhouse/parts`; GRILLHOUSE_PARTS_DE_LA_MACHINE names
48
- // another, which the base configuration of the tests gives to each test file): the part held
49
- // or waited for, its project, ticket, kind, rank and, once it names it, its progress directory,
50
- // which the board reads (`lireLesParts`). A pass whose process is gone frees its part.
51
- // - A part holds precise threads (`fils` of its file): the passes choose them on the topology of the
52
- // system (./coeurs-dedies.mjs `choisirLesCoeurs`), none held by another. A measure of time
53
- // (`mesure`) takes dedicated cores, physical cores whole (its sibling threads with them), the
54
- // number its project declares (`grillhouse.mesure`) or the default part of the budget, and the
55
- // other passes go on on the cores left; it waits for its cores, keeping its rank, then for the
56
- // rest of them (their load, out of it, under 10 %), within the bound of the wait.
57
- // - A pass that holds a part carries its mark to its children (GRILLHOUSE_PART_TENUE): a pass they
58
- // play takes no second part, and the workers of its tools are the cores of its part
20
+ // and is bounded by GRILLHOUSE_ATTENTE_MACHINE_MS: at the bound, « à repasser » (75), the
21
+ // request withdrawn. It keeps the rank of its arrival (`prendreUnRang`), kept from one session
22
+ // to the next.
23
+ // - The workers of the tests of a session are `travailleursDe`: max(1, cores ÷ places), passed
24
+ // to the tool of each language (GRILLHOUSE_TRAVAILLEURS).
25
+ // - A part is the share of the budget (./plafond-de-la-machine.mjs) that every pass takes: the
26
+ // heavy pass of a circuit, `npm run verifier`, a targeted `npm test`, the CI on a machine of
27
+ // ours, the night. A pass starts when its part fits in what the parts held leave of the budget
28
+ // and the machine admits it (`admissionDePart` of ./regles-des-places.mjs); else it waits, says
29
+ // what for when it begins and every 30 s, keeps its rank (the measure of the frame before a
30
+ // project's, then the order of arrival) and stops at « à repasser » (75) at the bound.
31
+ // - The parts are one file per pass in `${XDG_STATE_HOME:-~/.local/state}/grillhouse/parts`
32
+ // (GRILLHOUSE_PARTS_DE_LA_MACHINE names another): the part held or waited for, its project,
33
+ // ticket, kind, rank and progress directory, which the board reads (`lireLesParts`). A pass
34
+ // whose process is gone frees its part.
35
+ // - A part holds precise threads (`fils` of its file), chosen on the topology by
36
+ // ./coeurs-dedies.mjs `choisirLesCoeurs`, none held by another. A measure of time (`mesure`)
37
+ // takes physical cores whole, the number its project declares (`grillhouse.mesure`) or the
38
+ // default part of the budget; it waits for its cores, then for the load of the others to be
39
+ // under 10 %, within the bound of the wait.
40
+ // - A pass that holds a part carries its mark to its children (GRILLHOUSE_PART_TENUE): a pass
41
+ // they play takes no second part, and the workers of its tools are the cores of its part
59
42
  // (GRILLHOUSE_TRAVAILLEURS).
60
43
  import { randomUUID } from 'node:crypto';
61
44
  import { spawnSync } from 'node:child_process';
@@ -1,7 +1,8 @@
1
- // The places of the machine read and taken on the Temporal server, in a process of its own, so
2
- // that a synchronous caller (scripts/places-de-la-machine.mjs) waits for them as it waits for a
3
- // lock: the workflow of the machine (src/temporal/places/deroule.ts) holds them, its client
4
- // (src/temporal/places/client.ts) speaks to it.
1
+ // The synchronous bridge to the places of the machine: it reads and takes them on the Temporal
2
+ // server in a process of its own, so that a synchronous caller (scripts/places-de-la-machine.mjs)
3
+ // waits for them as for a lock. The workflow (src/temporal/places/deroule.ts) holds them, its
4
+ // client (src/temporal/places/client.ts) speaks to it. Architecture:
5
+ // docs/architecture/machine.md (§3.1, §5.1).
5
6
  //
6
7
  // node places-du-serveur.mjs rang
7
8
  // node places-du-serveur.mjs prendre <demande>
@@ -1,30 +1,30 @@
1
- // The settings of the poste for the machine (scripts/places-de-la-machine.mjs), configurations of
2
- // the poste read again at each judgement, as Buildkite reads the number of its agents from its
3
- // configuration and Nomad its `client.reserved`: the workflow of the machine reads the ceiling of
4
- // the places by an activity (src/temporal/places/activites.ts), the board and the number of workers
5
- // of the tests by this same function, so that a ceiling changed counts without restarting anything.
1
+ // The settings of the poste for the machine and the budget they give, read again at each
2
+ // judgement so that a setting changed counts without restarting anything: the workflow of the
3
+ // machine reads the ceiling of the places by an activity (src/temporal/places/activites.ts), the
4
+ // board and the number of workers of the tests by the same function. Architecture:
5
+ // docs/architecture/machine.md (§3.1, §4.1).
6
6
  //
7
+ // The ceiling of the places (`plafondDe`; it bounds the places only, not the parts):
7
8
  // - The file of the poste `machine.env`, under the frame's directory of configuration
8
- // (`~/.config/grillhouse/`, scripts/fichier-du-poste.mjs), holds `GRILLHOUSE_PLACES=<n>`, as
9
- // `turbo-cache.env` holds the server of the cache.
10
- // - The environment wins, as for every file of the poste: GRILLHOUSE_PLACES set (a trial machine,
11
- // a test) is read instead of the file. Without either, PLAFOND_PAR_DEFAUT, 3.
9
+ // (`~/.config/grillhouse/`, scripts/fichier-du-poste.mjs), holds `GRILLHOUSE_PLACES=<n>`.
10
+ // - The environment wins: GRILLHOUSE_PLACES set (a trial machine, a test) is read instead of the
11
+ // file. Without either, PLAFOND_PAR_DEFAUT, 3.
12
12
  // - A value that is not a positive integer is refused by its name and its place.
13
13
  //
14
14
  // The budget of the machine and the part of a pass (functions with the hardware and the settings
15
- // as input, nothing read from the machine), as Slurm reserves the cores and the memory of a job
16
- // and Bazel bounds `--local_resources`:
15
+ // as input, nothing read from the machine):
17
16
  // - The reserve of the user, the share of the machine no pass takes: GRILLHOUSE_RESERVE_COEURS
18
- // (by default min(4, max(0, cores − 4)): 0 on 4 cores or fewer, 2 on 6, 4 from 8) and GRILLHOUSE_RESERVE_MEMOIRE_GO (4 GB), the environment first, then
19
- // `machine.env`; zero is admitted, a value that is not a whole number ≥ 0 is refused by its name.
17
+ // (by default min(4, max(0, cores − 4)): 0 on 4 cores or fewer, 2 on 6, 4 from 8) and
18
+ // GRILLHOUSE_RESERVE_MEMOIRE_GO (4 GB), the environment first, then `machine.env`; zero is
19
+ // admitted, a value that is not a whole number ≥ 0 is refused by its name.
20
20
  // - The budget is the cores and the memory of the machine less the reserve; a reserve that leaves
21
21
  // no core or no memory is refused by its name.
22
- // - The part of a pass is its cores and its memory: the default part has the budget divided by the
23
- // places of the machine in cores (whole division, 2 at least), and in memory the largest peak the
24
- // project measured plus a quarter, never under its floor (the cores' proportion of the budget
25
- // before the division, a third of it, which it is without a measure); a
26
- // part a project declares (`grillhouse.part` of its `package.json`) replaces its own values; a
27
- // part larger than the budget is the budget (one pass at a time), and never under one core.
22
+ // - The part of a pass (`partDe`) is its cores and its memory, within the budget and one core at
23
+ // least. Its cores are those its project declares (`grillhouse.part` of its `package.json`),
24
+ // else COEURS_PAR_DEFAUT; a direct pass has COEURS_DU_DIRECT, fixed. Its memory is the declared
25
+ // one, else the largest peak the project measured plus a quarter, never under a floor (the
26
+ // share of the budget that max(4, a third of its cores) cores hold, which it is without a
27
+ // measure). A part larger than the budget is the budget (one pass at a time).
28
28
  import { readFileSync } from 'node:fs';
29
29
  import { cpus, totalmem } from 'node:os';
30
30
  import path from 'node:path';
@@ -1,4 +1,5 @@
1
- // The key `grillhouse.poussee` is retired from the frame: one branch, main, receives every lot (the
1
+ // The refusal of the key `grillhouse.poussee` (packages/grillhouse/docs/architecture/entree.md
2
+ // §3.3, « La file et main »; §5.1): the frame carries no such key, one branch, main, receives every lot (the
2
3
  // trunk-based development of Google and Chromium). This one reading serves the queue
3
4
  // (scripts/integration/file.mjs), the night (scripts/nuit.sh) and the pre-push guard
4
5
  // (scripts/branche-de-nuit.mjs): whatever the value of the key (null, an object, a string), the
@@ -4,6 +4,7 @@
4
4
  // commented out and keeps the prefix in its database, so the frame writes the key itself, by one
5
5
  // function: the preparation of a new project (./preparation.mjs) and the update of any project
6
6
  // (`mettreAJour`, which writes the key when no active one exists, the value being the store's).
7
+ // The mechanism is installation.md §5.1 and §5.2 (packages/grillhouse/docs/architecture/).
7
8
  import { readFileSync, writeFileSync } from 'node:fs';
8
9
  import path from 'node:path';
9
10
  import { pathToFileURL } from 'node:url';
@@ -1,5 +1,6 @@
1
1
  // The preparation of a project for its first session, which `grillhouse init` runs on the project
2
- // it creates (scripts/init.mjs). Idempotent: a second preparation changes nothing.
2
+ // it creates (scripts/init.mjs). Idempotent: a second preparation changes nothing. The mechanism
3
+ // is installation.md §5.1 (packages/grillhouse/docs/architecture/).
3
4
  //
4
5
  // - git: the directory becomes a repository when it is none.
5
6
  // - Beads, the ticket store the skills work from: the tool (`bd`, installed by
@@ -1,9 +1,9 @@
1
- // `grillhouse circuit <ticket> --recommencer`: the removal of what a ticket's circuit left, so that
1
+ // `grillhouse circuit <ticket> --recommencer` (circuit.md §5.4): the removal of what a ticket's circuit left, so that
2
2
  // a fresh launch starts from the testwriter in a fresh copy. It resets the copy, not Temporal: the
3
3
  // copy (whatever work it carries, the gesture being asked for), its branch, its sheets, its journal
4
4
  // and its working directory go; the ticket, its description, its plan and its comments are Beads'
5
5
  // and stay. The finished workflow stays on the server, which the queue, counting only the live
6
- // circuits, no more holds the ticket back for (grillhouse-d0t).
6
+ // circuits, no more holds the ticket back for (circuit.md §5.4).
7
7
  import { spawnSync } from 'node:child_process';
8
8
  import { existsSync, rmSync } from 'node:fs';
9
9
  import path from 'node:path';
@@ -2,7 +2,7 @@
2
2
  // of Jest and insta, the review of the goldens of Chromium) shows the difference of each file:
3
3
  // measured by git between the base of the lot and the lot kept (`git diff --numstat`), summarised
4
4
  // by name of field for a JSON file, so that the reviewer judges the change of a reference on the
5
- // tree, not on what the agent declares.
5
+ // tree, not on what the agent declares (docs/architecture/circuit.md §5.3).
6
6
  import { spawnSync } from 'node:child_process';
7
7
  import { couvertPar } from './engendres.mjs';
8
8
 
@@ -1,4 +1,6 @@
1
- // The registry of test results, by branch, of a repository: what the last green pass of
1
+ // The registry of test results, by branch, of a repository (a state of the tests-and-languages
2
+ // document, which entree.md §4.1 names beside the last green; the queue's final pass writes it,
3
+ // §5.1): what the last green pass of
2
4
  // `npm run verifier` (scripts/langages/typescript/verifier.mjs) holds, test by test. As Chromium's
3
5
  // ResultDB and Mozilla's Treeherder keep the result of each test by version of the main branch, and
4
6
  // as `.pytest_cache` keeps the last run's tests, the proof of the red reads here which tests main
@@ -1,10 +1,8 @@
1
1
  // The rules of the places of the machine, with no input nor output: whether a start is admitted
2
- // at a load and a free memory, as `make -l` admits it, and why a taking does not pass now. The
3
- // workflow of the machine (src/temporal/places/, grillhouse-4nr.7) holds the places of the machine
4
- // and decides by them; a session or a pass takes its place there by
5
- // scripts/places-de-la-machine.mjs; the places of the circuits, which the queue of each project
6
- // reserves (`reserverDesCircuits`). The workflow bundles this module, which imports nothing. What
7
- // the machine gives, its load and its memory, is measured by scripts/mesure-de-la-machine.mjs.
2
+ // at a load and a free memory (the load under the cores, MEMOIRE_MIN free), and why a taking does
3
+ // not pass now. The workflow of the machine (src/temporal/places/) decides by them and bundles
4
+ // this module, which imports nothing; the load and the memory come from
5
+ // scripts/mesure-de-la-machine.mjs. Architecture: docs/architecture/machine.md (§3.1, §5.2).
8
6
 
9
7
  /** The memory a start wants free, in bytes: 4 GB. */
10
8
  export const MEMOIRE_MIN = 4 * 1024 ** 3;