@roomi-fields/grillhouse 0.54.1 → 0.55.2

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 (238) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/CHANGELOG.md +73 -0
  3. package/cadre/templates/projet/.github/workflows/ci.yml +4 -2
  4. package/cadre/templates/projet/.github/workflows/machine-vierge.yml +5 -42
  5. package/cadre/templates/projet/CONTRIBUTING.md +0 -5
  6. package/cadre/templates/projet/README.md +0 -126
  7. package/cadre/templates/projet/_npmignore +1 -6
  8. package/cadre/templates/projet/package.json +5 -32
  9. package/cadre/templates/projet/tsconfig.json +4 -4
  10. package/cadre/templates/projet/vitest.config.cjs +3 -2
  11. package/charte/tests.md +14 -0
  12. package/dist/machine/part-par-sorte.d.ts +9 -9
  13. package/dist/machine/part-par-sorte.js +20 -24
  14. package/dist/machine/part-par-sorte.js.map +1 -1
  15. package/dist/machine/table-des-consommations.d.ts +65 -0
  16. package/dist/machine/table-des-consommations.js +94 -0
  17. package/dist/machine/table-des-consommations.js.map +1 -0
  18. package/dist/temporal/circuit/activites.d.ts +2 -0
  19. package/dist/temporal/circuit/activites.js +87 -3
  20. package/dist/temporal/circuit/activites.js.map +1 -1
  21. package/dist/temporal/circuit/client.js +9 -4
  22. package/dist/temporal/circuit/client.js.map +1 -1
  23. package/dist/temporal/circuit/contrat.d.ts +32 -4
  24. package/dist/temporal/circuit/deroule.js +54 -4
  25. package/dist/temporal/circuit/deroule.js.map +1 -1
  26. package/dist/temporal/circuit/versions.d.ts +12 -0
  27. package/dist/temporal/circuit/versions.js +22 -0
  28. package/dist/temporal/circuit/versions.js.map +1 -0
  29. package/dist/temporal/consommation/activites.d.ts +2 -0
  30. package/dist/temporal/consommation/activites.js +9 -0
  31. package/dist/temporal/consommation/activites.js.map +1 -0
  32. package/dist/temporal/consommation/actualisation.d.ts +2 -0
  33. package/dist/temporal/consommation/actualisation.js +71 -0
  34. package/dist/temporal/consommation/actualisation.js.map +1 -0
  35. package/dist/temporal/consommation/client.d.ts +12 -0
  36. package/dist/temporal/consommation/client.js +28 -0
  37. package/dist/temporal/consommation/client.js.map +1 -0
  38. package/dist/temporal/consommation/commande.d.ts +5 -0
  39. package/dist/temporal/consommation/commande.js +32 -0
  40. package/dist/temporal/consommation/commande.js.map +1 -0
  41. package/dist/temporal/consommation/contrat.d.ts +15 -0
  42. package/dist/temporal/consommation/contrat.js +13 -0
  43. package/dist/temporal/consommation/contrat.js.map +1 -0
  44. package/dist/temporal/consommation/deroule.d.ts +2 -0
  45. package/dist/temporal/consommation/deroule.js +14 -0
  46. package/dist/temporal/consommation/deroule.js.map +1 -0
  47. package/dist/temporal/deroules.d.ts +2 -1
  48. package/dist/temporal/deroules.js +3 -2
  49. package/dist/temporal/deroules.js.map +1 -1
  50. package/dist/temporal/file/contrat.d.ts +2 -0
  51. package/dist/temporal/file/deroule.js +14 -4
  52. package/dist/temporal/file/deroule.js.map +1 -1
  53. package/dist/temporal/installation.d.ts +6 -0
  54. package/dist/temporal/installation.js +15 -0
  55. package/dist/temporal/installation.js.map +1 -1
  56. package/dist/temporal/nuits/activites.d.ts +2 -1
  57. package/dist/temporal/nuits/activites.js +127 -3
  58. package/dist/temporal/nuits/activites.js.map +1 -1
  59. package/dist/temporal/nuits/client.d.ts +19 -5
  60. package/dist/temporal/nuits/client.js +33 -23
  61. package/dist/temporal/nuits/client.js.map +1 -1
  62. package/dist/temporal/nuits/commande.js +16 -11
  63. package/dist/temporal/nuits/commande.js.map +1 -1
  64. package/dist/temporal/nuits/contrat.d.ts +29 -0
  65. package/dist/temporal/nuits/contrat.js +10 -0
  66. package/dist/temporal/nuits/contrat.js.map +1 -1
  67. package/dist/temporal/nuits/deroule.d.ts +5 -0
  68. package/dist/temporal/nuits/deroule.js +18 -1
  69. package/dist/temporal/nuits/deroule.js.map +1 -1
  70. package/dist/temporal/nuits/pc2.d.ts +72 -0
  71. package/dist/temporal/nuits/pc2.js +206 -0
  72. package/dist/temporal/nuits/pc2.js.map +1 -0
  73. package/dist/temporal/places/activites.d.ts +23 -1
  74. package/dist/temporal/places/activites.js +38 -2
  75. package/dist/temporal/places/activites.js.map +1 -1
  76. package/dist/temporal/places/client.d.ts +18 -2
  77. package/dist/temporal/places/client.js +28 -3
  78. package/dist/temporal/places/client.js.map +1 -1
  79. package/dist/temporal/places/contrat.d.ts +79 -14
  80. package/dist/temporal/places/contrat.js +7 -0
  81. package/dist/temporal/places/contrat.js.map +1 -1
  82. package/dist/temporal/places/deroule.js +159 -23
  83. package/dist/temporal/places/deroule.js.map +1 -1
  84. package/dist/temporal/places/reservation.d.ts +54 -0
  85. package/dist/temporal/places/reservation.js +69 -0
  86. package/dist/temporal/places/reservation.js.map +1 -0
  87. package/dist/temporal/planification.d.ts +6 -0
  88. package/dist/temporal/planification.js +26 -0
  89. package/dist/temporal/planification.js.map +1 -0
  90. package/dist/temporal/tickets/activites.d.ts +0 -2
  91. package/dist/temporal/tickets/activites.js +2 -52
  92. package/dist/temporal/tickets/activites.js.map +1 -1
  93. package/dist/temporal/tickets/contrat.d.ts +7 -26
  94. package/dist/temporal/tickets/deroule.js +35 -23
  95. package/dist/temporal/tickets/deroule.js.map +1 -1
  96. package/dist/temporal/travailleur.js +2 -0
  97. package/dist/temporal/travailleur.js.map +1 -1
  98. package/docs/ARCHITECTURE.md +2 -2
  99. package/docs/CADRE.md +1 -1
  100. package/docs/INTERFACE.md +16 -11
  101. package/docs/architecture/circuit.md +62 -58
  102. package/docs/architecture/entree.md +87 -63
  103. package/docs/architecture/greffon.md +24 -21
  104. package/docs/architecture/installation.md +35 -30
  105. package/docs/architecture/machine.md +48 -40
  106. package/docs/architecture/tests.md +37 -33
  107. package/docs/lexique.md +4 -3
  108. package/package.json +1 -1
  109. package/scripts/activites.mjs +351 -180
  110. package/scripts/aiguillage.mjs +1 -0
  111. package/scripts/attente-de-la-machine.mjs +3 -22
  112. package/scripts/avancement.mjs +21 -30
  113. package/scripts/bilan.mjs +22 -2
  114. package/scripts/branche-de-nuit.mjs +1 -1
  115. package/scripts/circuit.mjs +75 -39
  116. package/scripts/codes-de-sortie.mjs +0 -6
  117. package/scripts/coeurs-dedies.mjs +19 -2
  118. package/scripts/consommation-des-passes.mjs +67 -35
  119. package/scripts/consommation.mjs +152 -24
  120. package/scripts/copies-finies.mjs +15 -35
  121. package/scripts/dernier-vert.mjs +4 -5
  122. package/scripts/dette.mjs +5 -3
  123. package/scripts/droits.mjs +2 -2
  124. package/scripts/echantillonneur-de-la-passe.mjs +7 -31
  125. package/scripts/engendres.mjs +5 -61
  126. package/scripts/enveloppe/enveloppe.mjs +30 -34
  127. package/scripts/enveloppe/travail-de-la-copie.mjs +5 -0
  128. package/scripts/etapes.mjs +21 -7
  129. package/scripts/etat-du-depot.mjs +61 -0
  130. package/scripts/faits-du-circuit.mjs +7 -4
  131. package/scripts/fermeture-de-la-machine.d.mts +6 -4
  132. package/scripts/fermeture-de-la-machine.mjs +12 -16
  133. package/scripts/fichier-du-poste.d.mts +9 -0
  134. package/scripts/file-des-tickets.d.mts +0 -18
  135. package/scripts/file-des-tickets.mjs +0 -42
  136. package/scripts/fusion-du-changelog.mjs +1 -1
  137. package/scripts/grillhouse-maj.mjs +1 -1
  138. package/scripts/index-des-rouges.d.mts +40 -0
  139. package/scripts/index-des-rouges.mjs +104 -0
  140. package/scripts/integration/file.mjs +13 -63
  141. package/scripts/integration/integrer.mjs +157 -424
  142. package/scripts/integration/jugement.mjs +109 -0
  143. package/scripts/integration/rejeu.mjs +94 -71
  144. package/scripts/jointure.d.ts +34 -27
  145. package/scripts/journal-des-etats.d.mts +1 -1
  146. package/scripts/langages/c/commandes.mjs +27 -12
  147. package/scripts/langages/cargo/commandes.mjs +148 -94
  148. package/scripts/langages/cargo/index.mjs +2 -1
  149. package/scripts/langages/cargo/lectures-des-tests.mjs +132 -0
  150. package/scripts/langages/cargo/migrations/lectures-des-tests.mjs +31 -0
  151. package/scripts/langages/python/commandes.mjs +31 -15
  152. package/scripts/langages/python/index.mjs +2 -1
  153. package/scripts/langages/python/lectures-des-tests.mjs +148 -0
  154. package/scripts/langages/python/migrations/lectures-des-tests.mjs +31 -0
  155. package/scripts/langages/typescript/consommateurs-arbitres.mjs +2 -2
  156. package/scripts/langages/typescript/index.mjs +4 -0
  157. package/scripts/langages/typescript/lectures-des-tests.mjs +95 -0
  158. package/scripts/langages/typescript/migrations/lectures-des-tests.mjs +31 -0
  159. package/scripts/langages/typescript/tests-de-nuit.mjs +9 -15
  160. package/scripts/langages/typescript/tests.mjs +11 -37
  161. package/scripts/langages/typescript/titres-de-tests.mjs +5 -4
  162. package/scripts/langages/typescript/verifier.mjs +74 -44
  163. package/scripts/langages/typescript/vitest-config/base.mjs +3 -3
  164. package/scripts/langages/typescript/vitest-config/machine.setup.mjs +6 -25
  165. package/scripts/lectures-communes.mjs +234 -0
  166. package/scripts/machine.mjs +11 -18
  167. package/scripts/mesure/base-de-passe.mjs +1 -2
  168. package/scripts/mesure-de-la-machine.d.mts +43 -3
  169. package/scripts/mesure-de-la-machine.mjs +209 -11
  170. package/scripts/migrations/0.33.0-ci-du-cadre.mjs +3 -3
  171. package/scripts/migrations/nuit-yml-retire.mjs +25 -0
  172. package/scripts/migrations/part-retiree.mjs +31 -0
  173. package/scripts/migrations/table-des-consommations.mjs +36 -0
  174. package/scripts/migrations.mjs +6 -0
  175. package/scripts/montee.mjs +9 -0
  176. package/scripts/nuit-de-pc2.mjs +628 -0
  177. package/scripts/nuit.sh +8 -131
  178. package/scripts/paquets.mjs +1 -1
  179. package/scripts/passe-de-la-machine.mjs +365 -105
  180. package/scripts/place-du-circuit.d.mts +15 -0
  181. package/scripts/place-du-circuit.mjs +32 -0
  182. package/scripts/places-de-la-machine.mjs +148 -627
  183. package/scripts/places-du-serveur.mjs +43 -16
  184. package/scripts/plafond-de-la-machine.d.mts +8 -13
  185. package/scripts/plafond-de-la-machine.mjs +37 -69
  186. package/scripts/registre-des-entrees.mjs +57 -0
  187. package/scripts/regles-des-places.d.mts +84 -50
  188. package/scripts/regles-des-places.mjs +200 -156
  189. package/scripts/retirer-copie.sh +2 -2
  190. package/scripts/seances.mjs +181 -63
  191. package/scripts/secours.mjs +95 -0
  192. package/scripts/services-du-noyau.mjs +11 -19
  193. package/scripts/sous-commandes.mjs +1 -0
  194. package/scripts/sous-modules.sh +1 -1
  195. package/scripts/superviseur.mjs +16 -7
  196. package/scripts/table-des-consommations.d.mts +9 -0
  197. package/scripts/table-des-consommations.mjs +35 -0
  198. package/scripts/tableau.mjs +33 -19
  199. package/scripts/taches-du-graphe.mjs +124 -2
  200. package/scripts/transitions.d.mts +27 -5
  201. package/scripts/transitions.mjs +125 -104
  202. package/scripts/verdict-de-la-nuit.d.mts +13 -0
  203. package/scripts/verdict-de-la-nuit.mjs +34 -7
  204. package/scripts/verrou-de-fichier.mjs +1 -2
  205. package/scripts/workflows-du-cadre.mjs +2 -2
  206. package/skills/developpeur/SKILL.md +8 -2
  207. package/skills/direct/SKILL.md +5 -0
  208. package/skills/explorateur/SKILL.md +10 -1
  209. package/skills/grill/SKILL.md +2 -4
  210. package/skills/pitmaster/SKILL.md +7 -5
  211. package/skills/pitmaster/references/consigne-agent.md +1 -1
  212. package/skills/relecteur/SKILL.md +4 -1
  213. package/skills/testwriter/SKILL.md +15 -2
  214. package/cadre/templates/projet/.env.example +0 -57
  215. package/cadre/templates/projet/.github/workflows/nuit.yml +0 -139
  216. package/cadre/templates/projet/deployment/README.md +0 -98
  217. package/cadre/templates/projet/deployment/docs/01-INSTALL.md +0 -145
  218. package/cadre/templates/projet/deployment/docs/02-CONFIGURATION.md +0 -117
  219. package/cadre/templates/projet/deployment/docs/03-API.md +0 -264
  220. package/cadre/templates/projet/deployment/docs/04-TROUBLESHOOTING.md +0 -262
  221. package/cadre/templates/projet/deployment/scripts/install.ps1 +0 -100
  222. package/cadre/templates/projet/deployment/scripts/start.ps1 +0 -61
  223. package/cadre/templates/projet/deployment/scripts/stop.ps1 +0 -37
  224. package/cadre/templates/projet/deployment/scripts/test.ps1 +0 -118
  225. package/cadre/templates/projet/ecosystem.config.cjs +0 -73
  226. package/cadre/templates/projet/src/config.ts +0 -68
  227. package/cadre/templates/projet/src/errors.ts +0 -102
  228. package/cadre/templates/projet/src/index.ts +0 -46
  229. package/cadre/templates/projet/src/services/.gitkeep +0 -8
  230. package/cadre/templates/projet/src/types/index.ts +0 -24
  231. package/cadre/templates/projet/src/utils/logger.ts +0 -106
  232. package/cadre/templates/projet/tests/unit/config.spec.ts +0 -68
  233. package/cadre/templates/projet/tests/unit/errors.spec.ts +0 -132
  234. package/cadre/templates/projet/tests/unit/types.spec.ts +0 -73
  235. package/cadre/templates/projet/tsconfig.build.json +0 -14
  236. package/scripts/flux-de-la-nuit.mjs +0 -39
  237. package/scripts/garde-de-la-memoire.mjs +0 -231
  238. package/scripts/repli-de-la-nuit.mjs +0 -184
@@ -11,7 +11,7 @@
11
11
  // - `etat`, the run at its step: `{ etape, tentative, rapport, finale, relanceSurLeRefus }`;
12
12
  // - `memoire`, what the circuit keeps between steps (`controlesRouges`, `renvoiAuTestwriter`,
13
13
  // `refus`, `rienALivrer`, `regeneration`, `regenereSur`, `aRegenerer`, `verifie`,
14
- // `toursDeLaPasseFinale`, `constats`);
14
+ // `constats`);
15
15
  // - `ticket`, `{ id, paquets, sorte, copie, circuit }`, `circuit` being `long`, `court` or
16
16
  // `direct` (without it, the rule decides as a long or short circuit);
17
17
  // - `reprend`, whether this step is the first of a `--reprendre`;
@@ -37,16 +37,23 @@ import {
37
37
  boucle,
38
38
  DEMANDE_UN_PLAN,
39
39
  joue,
40
- LOT_NE_S_APPLIQUE_PAS,
41
40
  nomDuRole,
41
+ phaseDeLaSeance,
42
42
  RESPONSABLE,
43
43
  SUITE,
44
44
  } from './etapes.mjs';
45
+ import { guideDeLIndex, ligneDeLEntree } from './index-des-rouges.mjs';
45
46
  import { attribuerLeRouge, departDepuis, refusDeLaReprise } from './reprise.mjs';
46
47
 
47
48
  // The resumptions `--depuis` names and the one rule that accepts them (./reprise.mjs), as the
48
49
  // workflow of a ticket reads them.
49
50
  export { ETAPES_DE_REPRISE } from './reprise.mjs';
51
+
52
+ /**
53
+ * Whether the lot out of the rule `hors` (`{ fichiers, rendus }`) holds a file the circuit did not
54
+ * give back: the one case the step goes back to its author.
55
+ */
56
+ export const resteAuLot = hors => hors.fichiers.some(c => !(hors.rendus ?? []).includes(c));
50
57
  export { refusDeLaReprise };
51
58
 
52
59
  /**
@@ -68,6 +75,11 @@ export const circuitDeLaSorte = sorte => {
68
75
  export const circuitSuivant = (circuit, sorte) =>
69
76
  circuit === 'direct' ? circuit : circuitDeLaSorte(sorte);
70
77
 
78
+ // The stop of a circuit reopened on the old form of the reds (their whole output in
79
+ // `controlesRouges`, without the mark): no reader reads both forms.
80
+ const FORME_ANCIENNE =
81
+ "La mémoire du circuit garde les rouges sous leur ancienne forme (la sortie entière, sans l'index) : aucun lecteur ne la lit. La passe finale les redonne (`--depuis <rôle>`).";
82
+
71
83
  // What the circuit keeps between steps, which the decisions read and change: the one list the
72
84
  // opening reads back (scripts/faits-du-circuit.mjs `GARDEE`) and the memo of a circuit keeps
73
85
  // (src/temporal/circuit/contrat.ts `etatPourLeMemo`).
@@ -80,7 +92,6 @@ export const MEMOIRE = [
80
92
  'regenereSur',
81
93
  'aRegenerer',
82
94
  'verifie',
83
- 'toursDeLaPasseFinale',
84
95
  'constats',
85
96
  'verts',
86
97
  'reprise',
@@ -119,11 +130,6 @@ export const [
119
130
  export const RELANCES_TESTWRITER = boucle('tests').max - 1;
120
131
  export const SEANCES_DEVELOPPEUR = boucle('code').max;
121
132
  export const RELECTURES = boucle('relecture').max;
122
- // The tours of the cycle ACCEPTÉ → final pass → review the circuit plays before it stops on a
123
- // question: a lot whose tree never settles between the final pass and the review (a
124
- // non-deterministic build artifact of the copy, a build output no task declares) would replay
125
- // the pass and the reviewer without end, so after this many the circuit goes up to the supervisor.
126
- export const TOURS_DE_LA_PASSE_FINALE = 2;
127
133
 
128
134
  // What changed for a developpeur relaunched on the integration's refusal of the lot he left as it was.
129
135
  export const CHANGE_DU_REFUS =
@@ -266,6 +272,39 @@ export const pasDuPlan = e =>
266
272
  ? 'reponse'
267
273
  : 'conclure';
268
274
 
275
+ /**
276
+ * The phase of the session the step <pas> of the plan launches (the explorateur's, the
277
+ * questionneur's, the explorateur's answer), null for the conclusion, which launches none.
278
+ * @param {'explorateur' | 'questionneur' | 'reponse' | 'conclure'} pas
279
+ * @returns {string | null}
280
+ */
281
+ export const phaseDuPasDuPlan = pas =>
282
+ pas === 'conclure'
283
+ ? null
284
+ : phaseDeLaSeance(pas === 'questionneur' ? pas : 'explorateur', undefined);
285
+
286
+ /**
287
+ * The phase of the session the fact <fait> of a decision launches, with its parameters
288
+ * <parametres> (the role and the object of a session), null for a fact that launches none.
289
+ * @param {string} fait
290
+ * @param {Record<string, unknown>} parametres
291
+ * @returns {string | null}
292
+ */
293
+ export const phaseDuFait = (fait, parametres) => {
294
+ if (fait === 'seanceDuGeste') {
295
+ return phaseDeLaSeance('explorateur', 'geste');
296
+ }
297
+ if (fait === 'relecture') {
298
+ return phaseDeLaSeance('relecteur', undefined);
299
+ }
300
+ return fait === 'seance' && typeof parametres.role === 'string'
301
+ ? phaseDeLaSeance(
302
+ parametres.role,
303
+ typeof parametres.objet === 'string' ? parametres.objet : undefined
304
+ )
305
+ : null;
306
+ };
307
+
269
308
  // The questions the explorateur answers in the questionneur's sheet <lu>: its questions, or its
270
309
  // disagreement as one; none for « AUCUNE ».
271
310
  export const questionsPosees = lu =>
@@ -478,7 +517,6 @@ export function depart({
478
517
  reprise: null,
479
518
  relancesTestwriter: null,
480
519
  verifie: null,
481
- toursDeLaPasseFinale: null,
482
520
  constats: [],
483
521
  refus: null,
484
522
  controlesRouges: null,
@@ -495,7 +533,7 @@ export function depart({
495
533
  // After the reviewer asks for a plan (`demande-un-plan`), --reprendre keeps the direct circuit:
496
534
  // the agent direct, the findings of that verdict as his task.
497
535
  if (etat.etape === RELECTURE && etat.motif === DEMANDE_UN_PLAN) {
498
- Object.assign(memoire, { verifie: null, toursDeLaPasseFinale: null });
536
+ Object.assign(memoire, { verifie: null });
499
537
  return { suivant: { etape: CODE, tentative: 1, rapport: null, finale: false }, memoire };
500
538
  }
501
539
  const compteGarde =
@@ -526,27 +564,32 @@ export function renvoiDe({ fiche, passation, controlesRouges, fichiersRouges = [
526
564
  const fichiers = fichiersRouges.length
527
565
  ? `\n\nLes fichiers de test rouges, tous à lever en une séance : ${fichiersRouges.join(', ')}.`
528
566
  : '';
529
- const controles = controlesRouges
530
- ? `\n\nLa sortie rouge des derniers contrôles :\n\n${controlesRouges}`
567
+ const controles = marqueDesRouges(controlesRouges)
568
+ ? `\n\nLa sortie rouge des derniers contrôles :\n\n${[
569
+ guideDeLIndex(controlesRouges.index, controlesRouges.detail),
570
+ ...controlesRouges.index.entrees.map(e => ligneDeLEntree(e, controlesRouges.index.regroupement)),
571
+ ].join('\n')}`
531
572
  : '';
532
573
  return `Le développeur renvoie le rouge qui reste aux tests du lot${raison}.${fichiers}\n\nSa passation :\n\n${passation ?? 'aucune'}${controles}`;
533
574
  }
534
575
 
535
- // The test files the red output <controlesRouges> of checks names (its lines `- test <fichier> › …`
536
- // and `- test <fichier> — …`), each once, in order.
576
+ // Whether <controlesRouges> is the mark of the reds a memory keeps (`forme: 'index'`): its index, the
577
+ // fingerprint of their whole text and the address of their detail. Any other value (the whole red
578
+ // output of a circuit opened before the index) is the old form, which no reader reads.
579
+ const marqueDesRouges = controlesRouges =>
580
+ Boolean(controlesRouges) && typeof controlesRouges === 'object' && controlesRouges.forme === 'index';
581
+
582
+ // The test files the mark <controlesRouges> of checks names, each once, in order: the files of the
583
+ // entries of its index that are tests.
537
584
  export function fichiersDeTestRouges(controlesRouges) {
538
- const vus = new Set();
539
- for (const ligne of String(controlesRouges ?? '').split('\n')) {
540
- if (!ligne.startsWith('- test ')) {
541
- continue;
542
- }
543
- const mot = ligne.slice('- test '.length).split(' ')[0];
544
- const suite = ligne.slice('- test '.length + mot.length).trimStart();
545
- if (mot && (suite.startsWith('›') || suite.startsWith('—'))) {
546
- vus.add(mot);
547
- }
585
+ if (!marqueDesRouges(controlesRouges)) {
586
+ return [];
548
587
  }
549
- return [...vus];
588
+ return [
589
+ ...new Set(
590
+ controlesRouges.index.entrees.filter(e => e.test && e.fichier).map(e => e.fichier)
591
+ ),
592
+ ];
550
593
  }
551
594
 
552
595
  // The context `--etendre` gives the sessions of the run it resumes on the stop <question>: the
@@ -772,7 +815,7 @@ function decider({ etat, memoire = {}, ticket, reprend = false }, lire, partiel)
772
815
  }
773
816
  // No checks have run since this session.
774
817
  maj.controlesRouges = null;
775
- if (fiche.horsRole) {
818
+ if (fiche.horsRole && resteAuLot(fiche.horsRole)) {
776
819
  return rendreLeLot('testwriter', TESTS, fiche.horsRole);
777
820
  }
778
821
  commenter('testwriter', `séance ${tentative} finie, sa fiche lue.`);
@@ -882,8 +925,16 @@ function decider({ etat, memoire = {}, ticket, reprend = false }, lire, partiel)
882
925
  // integration stop (17, scripts/etapes.mjs), its piece the output.
883
926
  return arreter(r.nom, fin(r.sortie, 60), { piece: fin(r.sortie, 30) });
884
927
  }
885
- if (r.code === LOT_NE_S_APPLIQUE_PAS && lire('mainAvancee')) {
886
- return repasserSurMain('integration', "le lot ne s'applique plus sur la pointe de main");
928
+ if (r.rejuger) {
929
+ // The copy does not hold the commit judged: the final pass judges it again (circuit.md §9.1,
930
+ // point 4).
931
+ maj.verifie = null;
932
+ garderLeVert('passe-finale', null);
933
+ etape = CONTROLES;
934
+ tentative = 0;
935
+ finale = true;
936
+ commenter('integration', `${r.rejuger.split('\n')[0]} : le lot repart à la passe finale.`);
937
+ return decision();
887
938
  }
888
939
  if (r.code !== 0) {
889
940
  return refuser(
@@ -954,8 +1005,8 @@ function decider({ etat, memoire = {}, ticket, reprend = false }, lire, partiel)
954
1005
  return decision();
955
1006
  }
956
1007
 
957
- // A lot that no longer applies on the tip of main (at the integration while main moved past the
958
- // copy, or in the queue on a conflict) goes back to the pass that judges it, whose preparation
1008
+ // A lot that no longer applies on the tip of main (in the queue, on a conflict) goes back to the
1009
+ // pass that judges it, whose preparation
959
1010
  // advances the copy and plays the gesture `conflit-de-l-avance` on what conflicts, as a merge
960
1011
  // queue sends back a lot that no longer applies on its tip: no refusal is kept, and the final
961
1012
  // pass played before stands no more. <auteur> signs the line at the ticket, which says <fait>.
@@ -1020,7 +1071,7 @@ function decider({ etat, memoire = {}, ticket, reprend = false }, lire, partiel)
1020
1071
  arret: { nom: 'besoin', statut: { role: auteur.role, tentative, fiche } },
1021
1072
  });
1022
1073
  }
1023
- if (fiche.horsRole) {
1074
+ if (fiche.horsRole && resteAuLot(fiche.horsRole)) {
1024
1075
  return rendreLeLot('developpeur', CODE, fiche.horsRole);
1025
1076
  }
1026
1077
  // The agent direct writes the tests: no red of his goes to the testwriter.
@@ -1031,7 +1082,13 @@ function decider({ etat, memoire = {}, ticket, reprend = false }, lire, partiel)
1031
1082
  // developpeur. `renvoiAuTestwriter` keeps the red output of the checks the sending before
1032
1083
  // carried ('' for none), null after green checks: the same output twice in a row is a
1033
1084
  // round trip without a new fact.
1034
- const sortie = m('controlesRouges') ?? '';
1085
+ // The mark of the reds of the last checks: its fingerprint (the whole text of the reds) is what
1086
+ // two sendings compare. A memory that holds them in the old form is read by no one.
1087
+ const marque = m('controlesRouges');
1088
+ if (marque && !marqueDesRouges(marque)) {
1089
+ return arreter('references', FORME_ANCIENNE);
1090
+ }
1091
+ const sortie = marque?.empreinte ?? '';
1035
1092
  const dejaRenvoye = m('renvoiAuTestwriter') !== null;
1036
1093
  if (m('renvoiAuTestwriter') === sortie || (dejaRenvoye && testwriterSaute())) {
1037
1094
  if (lire('empreinte') === avant) {
@@ -1132,10 +1189,9 @@ function decider({ etat, memoire = {}, ticket, reprend = false }, lire, partiel)
1132
1189
 
1133
1190
  function controles() {
1134
1191
  const passeFinale = finale;
1135
- // The final pass: after a regeneration of the references, restricted to what it changed,
1136
- // the reds of the pass before it carried (none plays when it changed nothing); else the band
1137
- // of the lot, its base and its dependents. The checks of the plan after a
1138
- // regeneration that changed nothing: none plays, the reds of the checks before standing.
1192
+ // The final pass plays the whole band of the commit of the lot, whatever came before it, as
1193
+ // bors tests the commit that will enter main. The checks of the plan after a regeneration that
1194
+ // changed nothing: none plays, the reds of the checks before standing.
1139
1195
  const regeneration = m('regeneration');
1140
1196
  maj.regeneration = null;
1141
1197
  const nomEtape = passeFinale ? 'passe-finale' : 'controles';
@@ -1164,22 +1220,23 @@ function decider({ etat, memoire = {}, ticket, reprend = false }, lire, partiel)
1164
1220
  etape = lire('lotAccepte', { arbre: vert.arbre }) ? INTEGRATION : RELECTURE;
1165
1221
  return decision();
1166
1222
  }
1167
- const passe = !passeFinale
1168
- ? { arbre: null, restreinte: null }
1169
- : regeneration
1170
- ? { arbre: lire('arbreAvant'), restreinte: regeneration.restreinte }
1171
- : lire('passeFinale');
1223
+ const passe = passeFinale ? lire('passeFinale') : { arbre: null, restreinte: null };
1224
+ if (passe.refus) {
1225
+ return refuser(passe.refus.motif, passe.refus.piece);
1226
+ }
1172
1227
  const k = lire('controles', {
1173
1228
  finale: passeFinale,
1174
1229
  restreinte: passe.restreinte,
1175
- reportes: regeneration?.reportes ?? null,
1176
- ...(reprise ? { fichiers: reprise.fichiers } : {}),
1230
+ reportes: passeFinale ? null : (regeneration?.reportes ?? null),
1231
+ ...(reprise && !passeFinale ? { fichiers: reprise.fichiers } : {}),
1177
1232
  });
1178
1233
  if (k.rouge || k.aRepasser) {
1179
1234
  garderLeVert(nomEtape, null);
1180
1235
  }
1181
1236
  // The output of these checks, red, which a sending to the testwriter carries.
1182
- maj.controlesRouges = k.rouge ? k.texte : null;
1237
+ maj.controlesRouges = k.rouge
1238
+ ? { forme: 'index', index: k.index, empreinte: k.empreinte, detail: k.detail }
1239
+ : null;
1183
1240
  // The outcome the bilan reads (scripts/bilan.mjs): with the reds, each its place and its
1184
1241
  // text, by which it knows two checks that measured the same thing.
1185
1242
  const resultat = issue => ({
@@ -1349,9 +1406,7 @@ function decider({ etat, memoire = {}, ticket, reprend = false }, lire, partiel)
1349
1406
  // The red goes back to the step that carries it, by the files it names (scripts/reprise.mjs).
1350
1407
  const portes =
1351
1408
  k.rouge && suivante <= SEANCES_DEVELOPPEUR ? lire('portes', { lieux: k.lieux }) : null;
1352
- const a = portes
1353
- ? attribuerLeRouge({ lieux: k.lieux, portes, circuit: ticket.circuit })
1354
- : null;
1409
+ const a = portes ? attribuerLeRouge({ lieux: k.lieux, portes, circuit: ticket.circuit }) : null;
1355
1410
  // A developpeur who had nothing to deliver stops the circuit on a red that is his: the stop
1356
1411
  // stands at his step, which a resumption plays again. A red that names a test file of the lot
1357
1412
  // is the testwriter's, who is relaunched: the developpeur had nothing to write for it.
@@ -1368,8 +1423,8 @@ function decider({ etat, memoire = {}, ticket, reprend = false }, lire, partiel)
1368
1423
  return arret('controles', null);
1369
1424
  }
1370
1425
  maj.relancesTestwriter = relances;
1371
- // The final pass red in one test file alone: that file is replayed, then the checks and
1372
- // the final pass restricted to what it reaches, with no session for the rest of the lot.
1426
+ // The final pass red in one test file alone: that file is replayed, then the checks on it,
1427
+ // then the final pass, with no session for the rest of the lot.
1373
1428
  maj.reprise =
1374
1429
  passeFinale && a.fichiers.length === 1 && portes.tests.includes(a.fichiers[0])
1375
1430
  ? { fichiers: a.fichiers }
@@ -1409,9 +1464,8 @@ function decider({ etat, memoire = {}, ticket, reprend = false }, lire, partiel)
1409
1464
  if (!inchangeSansTestwriter()) {
1410
1465
  maj.renvoiAuTestwriter = null;
1411
1466
  }
1412
- const entierement = !reprise && !regeneration;
1413
1467
  if (!passeFinale) {
1414
- if (entierement && k.empreinte) {
1468
+ if (!reprise && !regeneration && k.empreinte) {
1415
1469
  garderLeVert('controles', { empreinte: k.empreinte, ms: k.ms });
1416
1470
  }
1417
1471
  // The checks green: the final pass, its sessions counted apart.
@@ -1427,17 +1481,16 @@ function decider({ etat, memoire = {}, ticket, reprend = false }, lire, partiel)
1427
1481
  // the reader, are green in between, and would else start the count again without end.
1428
1482
  maj.relancesTestwriter = 0;
1429
1483
  // The lot the last review accepted goes to the integration, any other to the review.
1430
- // A final pass green on the band of the lot (after a regeneration, on what it changed, or not
1431
- // played when it changed nothing) verifies its tree: the lot accepted on it goes to the
1432
- // integration.
1484
+ // A final pass green on the band of the lot verifies its tree: the lot accepted on it goes to
1485
+ // the integration.
1433
1486
  if (passe.arbre) {
1434
1487
  maj.verifie = passe.arbre;
1435
1488
  }
1436
- if (entierement && k.empreinte) {
1489
+ if (k.empreinte) {
1437
1490
  garderLeVert('passe-finale', { empreinte: k.empreinte, arbre: passe.arbre, ms: k.ms });
1438
1491
  }
1439
1492
  if (reprise) {
1440
- // The restricted pass is green: the resumption ends.
1493
+ // The final pass is green: the resumption ends.
1441
1494
  maj.reprise = null;
1442
1495
  }
1443
1496
  etape = lire('lotAccepte', { arbre: passe.arbre }) ? INTEGRATION : RELECTURE;
@@ -1448,6 +1501,9 @@ function decider({ etat, memoire = {}, ticket, reprend = false }, lire, partiel)
1448
1501
  // The references to regenerate and the reds of the pass before, kept in the state from
1449
1502
  // the pass that called for them (the checks of the plan, `suite`, or the final pass), so
1450
1503
  // that a regeneration resumed knows them.
1504
+ if (m('controlesRouges') && !marqueDesRouges(m('controlesRouges'))) {
1505
+ return arreter('references', FORME_ANCIENNE);
1506
+ }
1451
1507
  const a = m('aRegenerer');
1452
1508
  if (!a) {
1453
1509
  return arreter(
@@ -1485,8 +1541,8 @@ function decider({ etat, memoire = {}, ticket, reprend = false }, lire, partiel)
1485
1541
  // After the checks, the pass that judges the regenerated tree, which does not regenerate
1486
1542
  // again the references just regenerated on it: beside other reds, the checks of the plan
1487
1543
  // again (none plays when the regeneration changed nothing, the reds of the checks before
1488
- // standing); without, the final pass that is due. After a final pass, the pass restricted
1489
- // to what the regeneration changed, with the reds of the pass before.
1544
+ // standing); without, the final pass that is due. After a final pass, that pass
1545
+ // again on the whole band of the lot, regenerating no more.
1490
1546
  maj.regenereSur = a.suite ? { arbre: lire('arbreApres'), noms: a.noms } : null;
1491
1547
  maj.regeneration =
1492
1548
  a.suite === 'passe'
@@ -1495,10 +1551,7 @@ function decider({ etat, memoire = {}, ticket, reprend = false }, lire, partiel)
1495
1551
  ? g.fichiers.length
1496
1552
  ? null
1497
1553
  : { reportes: { rouges: a.rouges, rejouee: false } }
1498
- : {
1499
- restreinte: g.restreinte,
1500
- reportes: { rouges: a.rouges, rejouee: g.fichiers.length > 0 },
1501
- };
1554
+ : {};
1502
1555
  maj.aRegenerer = null;
1503
1556
  etape = CONTROLES;
1504
1557
  finale = a.suite !== 'controles';
@@ -1507,6 +1560,10 @@ function decider({ etat, memoire = {}, ticket, reprend = false }, lire, partiel)
1507
1560
 
1508
1561
  function relecture() {
1509
1562
  const v = lire('relecture');
1563
+ if (v.verdict === 'RENDU') {
1564
+ // After any lot rendered, the final pass plays again, even on a tree already judged.
1565
+ garderLeVert('passe-finale', null);
1566
+ }
1510
1567
  const demandeUnPlan = direct && v.fiche.motif === DEMANDE_UN_PLAN;
1511
1568
  // A question for the owner: nothing is committed nor relaunched before his answer. A RENDU
1512
1569
  // keeps its findings first, those of a direct lot that asks for a plan all for the agent
@@ -1534,44 +1591,11 @@ function decider({ etat, memoire = {}, ticket, reprend = false }, lire, partiel)
1534
1591
  // The review that accepts the lot closes every finding, each one it judged lifted
1535
1592
  // (`suiviDesConstats`).
1536
1593
  maj.constats = [];
1537
- // A green final pass stands behind this lot (`verifie`, set by the pass that routed to this
1538
- // review, with no session changing the copy since): the reviewer accepted the lot the final
1539
- // pass verified, so it goes to the integration, as a merge queue merges the commit it tested
1540
- // (bors, Zuul). The decision reads `verifie` as that fact, never re-hashing the live working
1541
- // tree, whose non-deterministic build artifact would differ between the pass and the review
1542
- // and keep the lot out of the integration for ever. A lot the review kept none of (`!v.arbre`,
1543
- // git could not commit it) goes there too.
1544
- if (!v.arbre || m('verifie')) {
1545
- maj.toursDeLaPasseFinale = null;
1546
- commenter('relecture', 'ACCEPTÉ ; le lot va à l’intégration.');
1547
- etape = INTEGRATION;
1548
- return decision();
1549
- }
1550
- // No final pass has verified this lot (a resumption, or git could not hash the copy): its
1551
- // band plays once, then the integration. The cycle is bounded — after
1552
- // `TOURS_DE_LA_PASSE_FINALE` tours without reaching the integration, the circuit stops on a
1553
- // question to the supervisor naming the probable cause, instead of replaying the pass and the
1554
- // reviewer without end.
1555
- const tours = (m('toursDeLaPasseFinale') ?? 0) + 1;
1556
- if (tours > TOURS_DE_LA_PASSE_FINALE) {
1557
- return arreter(
1558
- 'relecture-arret',
1559
- `Le relecteur rend ACCEPTÉ, mais ${TOURS_DE_LA_PASSE_FINALE} passes finales n’ont pas mené le lot à l’intégration : l’arbre de la copie ne se stabilise pas entre la passe finale et la relecture.\n\nLe verdict :\n\n${v.texte}`,
1560
- {
1561
- piece: v.fiche.piece,
1562
- question:
1563
- 'Un artefact de construction non déterministe dans la copie, ou une sortie de construction qu’aucune tâche ne déclare, empêche l’arbre de la copie de se stabiliser entre la passe finale et la relecture : qu’est-ce qui le déstabilise, et se lève-t-il pour reprendre ?',
1564
- }
1565
- );
1566
- }
1567
- maj.toursDeLaPasseFinale = tours;
1568
- commenter(
1569
- 'relecture',
1570
- 'ACCEPTÉ ; la passe finale sur la bande du lot (sa base et ses dépendants), qui n’a pas joué sur ce lot, puis l’intégration.'
1571
- );
1572
- etape = CONTROLES;
1573
- tentative = 0;
1574
- finale = true;
1594
+ // A verdict ACCEPTÉ always sends the lot to the integration: the final pass (4.1) judged
1595
+ // and registered its tree before the review, and 5.1 refuses a tree absent from the registry
1596
+ // or a copy changed since, which goes back to 4.1 (circuit.md §9.1, point 4).
1597
+ commenter('relecture', 'ACCEPTÉ ; le lot va à l’intégration.');
1598
+ etape = INTEGRATION;
1575
1599
  return decision();
1576
1600
  }
1577
1601
  // A direct lot rendered because its ticket asks for a plan goes up to the supervisor, before
@@ -1623,7 +1647,6 @@ function decider({ etat, memoire = {}, ticket, reprend = false }, lire, partiel)
1623
1647
  rapport = null;
1624
1648
  finale = false;
1625
1649
  maj.verifie = null;
1626
- maj.toursDeLaPasseFinale = null;
1627
1650
  commenter(
1628
1651
  'relecture',
1629
1652
  `RENDU (relecture ${rendus}) : le lot du circuit court change un comportement ; la sorte du ticket devient comportement, le plan reste, et le circuit reprend à 2 Tests.`
@@ -1651,10 +1674,8 @@ function decider({ etat, memoire = {}, ticket, reprend = false }, lire, partiel)
1651
1674
  tentative = 1;
1652
1675
  rapport = null;
1653
1676
  finale = false;
1654
- // Relaunching a role reworks the lot: its earlier final pass no longer verifies it, and the
1655
- // tours of the ACCEPTÉ ↔ final pass cycle start over.
1677
+ // Relaunching a role reworks the lot: its earlier final pass no longer verifies it.
1656
1678
  maj.verifie = null;
1657
- maj.toursDeLaPasseFinale = null;
1658
1679
  commenter(
1659
1680
  'relecture',
1660
1681
  `RENDU (relecture ${rendus}) ; le circuit relance ${auTestwriter ? 'le testwriter' : auteur.le}, ses ${lus.constats.length} constat(s) ouvert(s) dans la consigne de chaque séance, puis la passe finale sur la bande du lot (sa base et ses dépendants), et le relecteur sur la différence.`
@@ -0,0 +1,13 @@
1
+ /** Notes the verdict of a part of the night: 'vert' or 'rouge', null for 75 (to replay, nothing written). */
2
+ export function noterLeVerdict(
3
+ commun: string,
4
+ code: number,
5
+ part?: 'pc2' | 'pc3',
6
+ raisons?: string[]
7
+ ): 'vert' | 'rouge' | null;
8
+ export function lireLesVerdicts(commun: string | null): {
9
+ pc2: 'vert' | 'rouge' | null;
10
+ pc3: 'vert' | 'rouge' | null;
11
+ };
12
+ export function lireLesRaisonsAPasser(commun: string | null): string[];
13
+ export function lireLeVerdict(commun: string | null): 'vert' | 'rouge' | null;
@@ -7,22 +7,33 @@
7
7
  // repasser ») writes nothing and leaves the previous verdict of that part, the other untouched. The
8
8
  // night is `rouge` when a part is, else `vert` when a part is, else none. A read that fails gives
9
9
  // no verdict for that part.
10
- import { mkdirSync, readFileSync, writeFileSync } from 'node:fs';
10
+ import { mkdirSync, readFileSync, rmSync, writeFileSync } from 'node:fs';
11
11
  import path from 'node:path';
12
12
  import { fileURLToPath } from 'node:url';
13
13
  import { A_REPASSER } from './codes-de-sortie.mjs';
14
14
 
15
15
  const FICHIERS = { pc2: 'verdict-pc2', pc3: 'verdict' };
16
16
  const fichierDuVerdict = (commun, part) => path.join(commun, 'nuit', FICHIERS[part]);
17
+ // The reasons the part of PC2 is « à repasser », one per line, written with its 75.
18
+ const fichierDesRaisons = commun => path.join(commun, 'nuit', 'verdict-pc2-raisons');
17
19
 
18
20
  /**
19
21
  * @param {string} commun the git common dir of the project
20
22
  * @param {number} code the exit code of the part's pass
21
23
  * @param {'pc2' | 'pc3'} [part] the part noted: that of the machine that plays, PC3 by default
24
+ * @param {string[]} [raisons] the reasons the part of PC2 is « à repasser » (75), one per tranche
25
+ * concerned; a 75 replaces those of the night before, a verdict of the part of PC2 erases them
22
26
  * @returns {'vert' | 'rouge' | null} the verdict written, null when the part is to be replayed
23
27
  */
24
- export function noterLeVerdict(commun, code, part = 'pc3') {
28
+ export function noterLeVerdict(commun, code, part = 'pc3', raisons = []) {
29
+ if (part === 'pc2') {
30
+ rmSync(fichierDesRaisons(commun), { force: true });
31
+ }
25
32
  if (code === A_REPASSER) {
33
+ if (part === 'pc2' && raisons.length > 0) {
34
+ mkdirSync(path.join(commun, 'nuit'), { recursive: true });
35
+ writeFileSync(fichierDesRaisons(commun), `${raisons.join('\n')}\n`);
36
+ }
26
37
  return null;
27
38
  }
28
39
  const verdict = code === 0 ? 'vert' : 'rouge';
@@ -45,31 +56,47 @@ function lireLaPart(commun, part) {
45
56
  * @returns {{ pc2: 'vert' | 'rouge' | null, pc3: 'vert' | 'rouge' | null }} each part's last verdict,
46
57
  * null when it has none or it does not read
47
58
  */
48
- export function lireLesParts(commun) {
59
+ export function lireLesVerdicts(commun) {
49
60
  if (!commun) {
50
61
  return { pc2: null, pc3: null };
51
62
  }
52
63
  return { pc2: lireLaPart(commun, 'pc2'), pc3: lireLaPart(commun, 'pc3') };
53
64
  }
54
65
 
66
+ /**
67
+ * @param {string | null} commun the git common dir of the project
68
+ * @returns {string[]} the reasons the part of PC2 is « à repasser », none when it is not
69
+ */
70
+ export function lireLesRaisonsAPasser(commun) {
71
+ if (!commun) {
72
+ return [];
73
+ }
74
+ try {
75
+ return readFileSync(fichierDesRaisons(commun), 'utf8').split('\n').filter(Boolean);
76
+ } catch {
77
+ return [];
78
+ }
79
+ }
80
+
55
81
  /**
56
82
  * @param {string | null} commun the git common dir of the project
57
83
  * @returns {'vert' | 'rouge' | null} the last night's verdict over its two parts, null when none is known
58
84
  */
59
85
  export function lireLeVerdict(commun) {
60
- const parts = Object.values(lireLesParts(commun));
86
+ const parts = Object.values(lireLesVerdicts(commun));
61
87
  if (parts.includes('rouge')) {
62
88
  return 'rouge';
63
89
  }
64
90
  return parts.includes('vert') ? 'vert' : null;
65
91
  }
66
92
 
67
- // `node verdict-de-la-nuit.mjs <commun> <code> [pc2|pc3]`: what nuit.sh calls at the end of the night.
93
+ // `node verdict-de-la-nuit.mjs <commun> <code> [pc2|pc3] [<raison>...]`: what nuit.sh calls at the end of the night.
68
94
  if (process.argv[1] && fileURLToPath(import.meta.url) === path.resolve(process.argv[1])) {
69
- const [commun, code, part] = process.argv.slice(2);
95
+ const [commun, code, part, ...raisons] = process.argv.slice(2);
70
96
  noterLeVerdict(
71
97
  commun,
72
98
  code === undefined || code === '' ? NaN : Number(code),
73
- part === 'pc2' ? 'pc2' : 'pc3'
99
+ part === 'pc2' ? 'pc2' : 'pc3',
100
+ raisons
74
101
  );
75
102
  }
@@ -1,6 +1,5 @@
1
1
  // The lock of a file shared between processes: the file `<verrou>` stands while someone holds it.
2
- // Taken by the integration (`.git/integration.lock`), by the register (`registre.jsonl.verrou`)
3
- // and by the creation of a ticket (`.beads/grillhouse-ticket.lock`, scripts/ticket.mjs).
2
+ // Taken by the register (`registre.jsonl.verrou`) and by the creation of a ticket (`.beads/grillhouse-ticket.lock`, scripts/ticket.mjs).
4
3
  // Architecture: docs/architecture/machine.md (§4.1).
5
4
  //
6
5
  // - A lock is created whole and exclusively: its mark (the owner's process number, then a token
@@ -1,6 +1,6 @@
1
1
  // The frame's workflows of GitHub Actions in a project, as a generator rewrites the file whose
2
2
  // header says it generated it (the « Généré par … ; ne pas éditer » of the frame's generated files):
3
- // the CI of a lot (`ci.yml`) and the night of a shared machine (`nuit.yml`), the template's
3
+ // the CI of a lot (`ci.yml`) and the clean machine (`machine-vierge.yml`), the template's
4
4
  // `.github/workflows/` (templates/projet), which `grillhouse init` copies and `grillhouse maj`
5
5
  // keeps (scripts/grillhouse-maj.mjs). The mechanism is installation.md §5.2 and §4.4
6
6
  // (packages/grillhouse/docs/architecture/).
@@ -9,7 +9,7 @@
9
9
  // template that the project holds with it, when its text differs; one without it is the project's,
10
10
  // and stays as it is.
11
11
  // - A project that holds a workflow of the frame has adopted the frame's CI: it receives each
12
- // workflow of the template it lacks (the night, for a project that adopted the CI alone). A
12
+ // workflow of the template it lacks (the clean machine, for a project that adopted the CI alone). A
13
13
  // project that holds none receives none: the update starts no CI on its repository.
14
14
  // - The machine of the jobs is the repository's variable RUNNER (`vars.RUNNER`), which lives in the
15
15
  // settings of the repository on GitHub, never in a file: the template writes no value of it.
@@ -88,6 +88,11 @@ la cause se trouve avant le correctif.
88
88
  fait, et le retrait les emporte.
89
89
  - **Le comportement tient dans les critères** : ton code fait ce que disent les critères
90
90
  d'acceptation, et rien d'autre.
91
+ - **Un document prescriptif change sur décision seule** : quand ton ticket porte la décision du
92
+ responsable qui change un document prescriptif, tu charges la compétence `grillhouse:architecte`
93
+ (outil Skill) pour son travail 3, « Mettre un document en conformité ». Sans cette décision écrite
94
+ au ticket, tu ne retouches aucun document prescriptif, et tu remontes la tension au superviseur
95
+ par ta fiche. Ainsi le document reste la décision, et non la trace du code.
91
96
 
92
97
  Tu lis toute la copie, index compris. Tu écris les seuls paquets du plan de ton ticket (les
93
98
  paquets de son titre) : le reste de la copie est en lecture seule, et une écriture hors d'eux
@@ -113,8 +118,9 @@ son texte : `sed` qui ne trouve rien réussit sans rien changer. Un fichier temp
113
118
  `$TMPDIR`. Les tests se lancent par `npm test -- <fichiers>`, jamais par l'outil de test
114
119
  directement. **Ton lot se juge à la fin de ta séance** : un fichier de test ou de la matière de
115
120
  test partagée qu'il change, par tout outil, une commande qui le régénère comprise, te rend l'étape,
116
- le fichier nommé, jusqu'à ce qu'il revienne à son état d'avant. Ainsi ton lot ne porte que le
117
- code.
121
+ le fichier nommé : le circuit le rend lui-même à son état d'avant ta séance (depuis l'objet que le
122
+ lot garde, sauf sur l'arbre principal, ou si un autre rôle l'a récrit depuis), et ce que tu y avais
123
+ écrit reste au journal ; tu ne le remets pas à HEAD. Ainsi ton lot ne porte que le code.
118
124
 
119
125
  **Cargo compile sans compilation incrémentale** (`CARGO_INCREMENTAL=0`, posé par le cadre, comme
120
126
  la CI de Rust) : une copie compile une fois, et son `target/` reste petit. Pour déboguer, tu la
@@ -61,6 +61,11 @@ la cause se trouve avant le correctif.
61
61
  shell, le client d'une base ; ton lot n'est pas jugé sur une règle de rôle, le relecteur le lit.
62
62
  Un fichier temporaire va dans `$TMPDIR`, et le retrait d'un fichier par un script
63
63
  `node $TMPDIR/retire.mjs` (`rmSync` de `node:fs`).
64
+ - **Un document prescriptif change sur décision seule** : quand ton ticket porte la décision du
65
+ responsable qui change un document prescriptif, tu charges la compétence `grillhouse:architecte`
66
+ (outil Skill) pour son travail 3, « Mettre un document en conformité ». Sans cette décision écrite
67
+ au ticket, tu ne retouches aucun document prescriptif, et tu remontes la tension au superviseur
68
+ par ta fiche. Ainsi le document reste la décision, et non la trace du code.
64
69
  - **Les tests se lancent par `npm test -- <fichiers>`**, jamais par l'outil de test directement ;
65
70
  `npm run api`, après lui, écrit le rapport d'API des paquets du plan.
66
71
  - **Tu attends au premier plan ce que tu lances** : ta séance n'a aucune tâche de fond.
@@ -93,7 +93,16 @@ avant de nommer un correctif ou un verdict. Ainsi le plan part de la cause.
93
93
  un mauvais argument, que le ticket décrit en entier, avec sa `raison` et sa `piece`
94
94
  (fichier:ligne, « $ commande » et sa sortie, ou « ticket, critère N » ou « ticket, §
95
95
  <section> ») : le plan passé, le circuit bascule sans arrêt au circuit direct, où l'agent
96
- direct écrit tests et code dans les paquets du plan ; le doute va au circuit long. Le circuit
96
+ direct écrit tests et code dans les paquets du plan ; le doute va au circuit long. Un lot qui ne fait que supprimer des tests, que le ticket nomme
97
+ en entier, est aussi une correction triviale : seule suppression = le lot ne retire que des
98
+ fichiers ou des cas de test (et ce que seuls ces tests lisaient, comme un fichier d'essai
99
+ propre à eux), aucun autre fichier changé ; dès qu'un code, une garde, un réglage ou un texte
100
+ lu par un test change, le lot est du circuit complet, et le doute va au circuit long. Le plan
101
+ de seule suppression nomme, pour chaque test supprimé, sa raison (code retiré, doublon d'un
102
+ test nommé, comportement retiré) en `piece` ; le relecteur du circuit direct, qui tient la
103
+ preuve, rend le lot qui supprime un test dont le comportement vit encore sans test nommé qui
104
+ le couvre. Un plan qui supprime des tests et change un comportement garde le circuit complet.
105
+ Le circuit
97
106
  la refuse sur un ticket que l'agent direct a déjà travaillé. `mécanique` pour un geste sans comportement
98
107
  neuf (montée du cadre, documents seuls, renommage ou déplacement, montée de dépendance,
99
108
  configuration seule, correction de style, seuil relevé), avec sa `commande`, la commande ou