@roomi-fields/grillhouse 0.48.0 → 0.49.1

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 (155) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/CHANGELOG.md +90 -0
  3. package/agents/direct.md +9 -0
  4. package/cadre/templates/projet/.github/workflows/ci.yml +11 -0
  5. package/cadre/templates/projet/.github/workflows/nuit.yml +15 -6
  6. package/cadre/templates/projet/CLAUDE.md +10 -6
  7. package/cadre/templates/projet/docs/agents/issue-tracker.md +1 -1
  8. package/cadre/templates/turbo/paquets.json +3 -1
  9. package/cadre/templates/turbo/sans-paquets.json +3 -1
  10. package/charte.md +51 -14
  11. package/dist/temporal/acte.d.ts +9 -0
  12. package/dist/temporal/acte.js +43 -20
  13. package/dist/temporal/acte.js.map +1 -1
  14. package/dist/temporal/circuit/appel.d.ts +4 -1
  15. package/dist/temporal/circuit/appel.js +15 -1
  16. package/dist/temporal/circuit/appel.js.map +1 -1
  17. package/dist/temporal/circuit/client.d.ts +7 -1
  18. package/dist/temporal/circuit/client.js +54 -1
  19. package/dist/temporal/circuit/client.js.map +1 -1
  20. package/dist/temporal/circuit/commande.js +30 -57
  21. package/dist/temporal/circuit/commande.js.map +1 -1
  22. package/dist/temporal/circuit/contrat.d.ts +2 -1
  23. package/dist/temporal/circuit/contrat.js +2 -1
  24. package/dist/temporal/circuit/contrat.js.map +1 -1
  25. package/dist/temporal/circuit/deroule.js +9 -2
  26. package/dist/temporal/circuit/deroule.js.map +1 -1
  27. package/dist/temporal/file/contrat.d.ts +16 -2
  28. package/dist/temporal/file/contrat.js +27 -3
  29. package/dist/temporal/file/contrat.js.map +1 -1
  30. package/dist/temporal/file/deroule.js +4 -4
  31. package/dist/temporal/file/deroule.js.map +1 -1
  32. package/dist/temporal/nuits/activites.d.ts +1 -15
  33. package/dist/temporal/nuits/activites.js +3 -62
  34. package/dist/temporal/nuits/activites.js.map +1 -1
  35. package/dist/temporal/nuits/contrat.d.ts +3 -21
  36. package/dist/temporal/nuits/deroule.js +38 -74
  37. package/dist/temporal/nuits/deroule.js.map +1 -1
  38. package/dist/temporal/places/client.d.ts +3 -16
  39. package/dist/temporal/places/client.js +3 -26
  40. package/dist/temporal/places/client.js.map +1 -1
  41. package/dist/temporal/places/contrat.d.ts +15 -51
  42. package/dist/temporal/places/contrat.js +3 -13
  43. package/dist/temporal/places/contrat.js.map +1 -1
  44. package/dist/temporal/places/deroule.js +11 -61
  45. package/dist/temporal/places/deroule.js.map +1 -1
  46. package/dist/temporal/tickets/activites.js +4 -2
  47. package/dist/temporal/tickets/activites.js.map +1 -1
  48. package/dist/temporal/tickets/contrat.d.ts +2 -1
  49. package/docs/ARCHITECTURE.md +337 -120
  50. package/docs/CADRE.md +16 -13
  51. package/docs/INTERFACE.md +90 -25
  52. package/hooks/hooks.json +9 -0
  53. package/hooks/register.tsx +59 -5
  54. package/package.json +1 -1
  55. package/scripts/activites.mjs +271 -42
  56. package/scripts/aiguillage.mjs +4 -1
  57. package/scripts/bilan.mjs +125 -2
  58. package/scripts/circuit.mjs +233 -159
  59. package/scripts/circuits-cles.d.mts +3 -3
  60. package/scripts/circuits-cles.mjs +6 -5
  61. package/scripts/coeurs-dedies.mjs +4 -4
  62. package/scripts/commandes-composees.mjs +12 -5
  63. package/scripts/dette.d.ts +2 -1
  64. package/scripts/dette.mjs +49 -6
  65. package/scripts/direct.mjs +343 -0
  66. package/scripts/droits.mjs +26 -4
  67. package/scripts/effets.mjs +4 -4
  68. package/scripts/engendres.mjs +2 -1
  69. package/scripts/enveloppe/enveloppe.mjs +119 -18
  70. package/scripts/enveloppe/lancer.sh +14 -3
  71. package/scripts/enveloppe/paquets-du-plan.mjs +9 -0
  72. package/scripts/enveloppe/travail-de-la-copie.mjs +119 -21
  73. package/scripts/etapes.mjs +3 -3
  74. package/scripts/faits-du-circuit.mjs +12 -11
  75. package/scripts/fermeture-de-la-machine.d.mts +4 -4
  76. package/scripts/fermeture-de-la-machine.mjs +10 -20
  77. package/scripts/fichiers-nommes.mjs +27 -1
  78. package/scripts/file-des-tickets.d.mts +18 -1
  79. package/scripts/file-des-tickets.mjs +63 -15
  80. package/scripts/flux-de-la-nuit.mjs +38 -0
  81. package/scripts/grillhouse-maj.mjs +13 -25
  82. package/scripts/groupe-cles.d.mts +6 -0
  83. package/scripts/groupe-cles.mjs +29 -1
  84. package/scripts/integration/file.mjs +148 -37
  85. package/scripts/jointure.d.ts +20 -3
  86. package/scripts/journal-des-etats.d.mts +16 -0
  87. package/scripts/journal-des-etats.mjs +44 -2
  88. package/scripts/journal.mjs +3 -0
  89. package/scripts/langages/c/commandes.mjs +5 -5
  90. package/scripts/langages/c/composants.mjs +13 -5
  91. package/scripts/langages/cargo/commandes.mjs +5 -6
  92. package/scripts/langages/python/commandes.mjs +5 -5
  93. package/scripts/langages/python/composants.mjs +10 -2
  94. package/scripts/langages/typescript/composants.mjs +10 -3
  95. package/scripts/langages/typescript/consommateurs-arbitres.mjs +15 -3
  96. package/scripts/langages/typescript/construire.mjs +2 -0
  97. package/scripts/langages/typescript/exemples.mjs +33 -1
  98. package/scripts/langages/typescript/index.mjs +19 -0
  99. package/scripts/langages/typescript/migrations/0.49.0-tests-equipes.mjs +32 -0
  100. package/scripts/langages/typescript/tests-de-nuit.mjs +158 -32
  101. package/scripts/langages/typescript/tests-du-poste.mjs +112 -32
  102. package/scripts/langages/typescript/titres-de-tests.mjs +11 -7
  103. package/scripts/langages/typescript/turbo-des-paquets.mjs +21 -4
  104. package/scripts/langages/typescript/verifier.mjs +3 -5
  105. package/scripts/langages/typescript/verrou-des-dependances.mjs +161 -0
  106. package/scripts/langages/typescript/vitest-config/cibles.mjs +57 -6
  107. package/scripts/langages/typescript/vitest-config/machine.setup.mjs +11 -5
  108. package/scripts/langages/typescript/vitest.nuit.config.mjs +53 -5
  109. package/scripts/machine.mjs +1 -1
  110. package/scripts/mesure/base-de-passe.mjs +2 -1
  111. package/scripts/migrations/0.49.0-reservation-de-trois-coeurs.mjs +30 -0
  112. package/scripts/migrations.mjs +2 -0
  113. package/scripts/nuit.sh +129 -3
  114. package/scripts/paquet.mjs +16 -5
  115. package/scripts/paquets.d.ts +4 -0
  116. package/scripts/paquets.mjs +57 -0
  117. package/scripts/passe-de-la-machine.mjs +4 -7
  118. package/scripts/places-de-la-machine.mjs +55 -42
  119. package/scripts/places-du-serveur.mjs +2 -2
  120. package/scripts/plafond-de-la-machine.d.mts +7 -13
  121. package/scripts/plafond-de-la-machine.mjs +19 -35
  122. package/scripts/prefixe-des-tickets.mjs +1 -1
  123. package/scripts/references-changees.mjs +159 -0
  124. package/scripts/regles-des-places.d.mts +8 -31
  125. package/scripts/regles-des-places.mjs +14 -64
  126. package/scripts/repli-de-la-nuit.mjs +183 -0
  127. package/scripts/reponses-du-circuit.d.mts +2 -2
  128. package/scripts/reponses-du-circuit.mjs +21 -12
  129. package/scripts/reprise.mjs +27 -8
  130. package/scripts/resultats.mjs +21 -9
  131. package/scripts/seances.mjs +258 -40
  132. package/scripts/services-du-noyau.mjs +4 -0
  133. package/scripts/sous-commandes.mjs +24 -7
  134. package/scripts/superviseur.mjs +185 -39
  135. package/scripts/tableau.mjs +226 -94
  136. package/scripts/taches-du-graphe.mjs +84 -4
  137. package/scripts/ticket.mjs +348 -0
  138. package/scripts/transitions.d.mts +44 -0
  139. package/scripts/transitions.mjs +188 -17
  140. package/scripts/un-commit-par-ticket.mjs +4 -3
  141. package/scripts/verdict-de-la-nuit.mjs +47 -20
  142. package/scripts/verrou-de-fichier.mjs +2 -2
  143. package/scripts/verrous/ecriture-hors-enveloppe.mjs +86 -0
  144. package/scripts/verrous/verrou.mjs +17 -1
  145. package/skills/architecte/SKILL.md +203 -0
  146. package/skills/architecte/references/exemple-d-architecture.md +159 -0
  147. package/skills/developpeur/SKILL.md +1 -1
  148. package/skills/direct/SKILL.md +57 -0
  149. package/skills/explorateur/SKILL.md +10 -6
  150. package/skills/pitmaster/SKILL.md +37 -14
  151. package/skills/pitmaster/references/consigne-agent.md +7 -1
  152. package/skills/redacteur/references/documents-d-un-composant.md +2 -1
  153. package/skills/relecteur/SKILL.md +8 -0
  154. package/skills/testwriter/SKILL.md +10 -0
  155. package/scripts/ticket.sh +0 -25
@@ -46,6 +46,7 @@ import {
46
46
  avecLaPasse,
47
47
  cheminsDeLaTache,
48
48
  construireDepuisLesArguments,
49
+ constructionDuGraphe,
49
50
  GRAPHE_JOUE,
50
51
  joueCeQuiNeSeDivisePas,
51
52
  lancerLesTaches,
@@ -54,6 +55,7 @@ import {
54
55
  ouvrirBase,
55
56
  retirerALInterruption,
56
57
  SCRIPT_DES_TESTS,
58
+ SCRIPTS_DE_GARDES,
57
59
  surUnePart,
58
60
  testsCibles,
59
61
  travailleursDeLaSeance,
@@ -411,9 +413,6 @@ function verifier(racine, args, env) {
411
413
  return code === 0 ? 0 : 1;
412
414
  }
413
415
 
414
- // The scripts of guards of the project, in the order they play: the frame's, then its own.
415
- const SCRIPTS_DE_GARDES = ['grillhouse:gardes', 'gardes'];
416
-
417
416
  // The pass of `verifier --gardes` in <racine>: each script of SCRIPTS_DE_GARDES the root
418
417
  // package.json holds, a task of the root; no test.
419
418
  function gardes(racine, p) {
@@ -486,8 +485,9 @@ export function lancer(nom, args, { racine = process.cwd(), env = process.env }
486
485
  }
487
486
  }
488
487
  // The launcher's `construire` (`--echec <fichier> <plan>`) builds the copy for a session, the
489
- // plan and its providers, as every language's.
490
- if (nom === 'construire' && args.includes('--echec')) {
488
+ // plan and its providers, as every language's; `construire --gardes`, what the guard tasks wait
489
+ // for.
490
+ if (nom === 'construire' && constructionDuGraphe(args)) {
491
491
  return construireDepuisLesArguments(OUTIL, args, racine);
492
492
  }
493
493
  if (nom === 'typer' || nom === 'construire') {
@@ -3,7 +3,8 @@
3
3
  // `lecteurs`, `estUnTest`, `manifestes`, `entreesDeLIndex`).
4
4
  //
5
5
  // - A component is a folder whose CMakeLists.txt calls `project(<nom>`, found under the root, the
6
- // folders whose name begins with a dot (`.build-cmake` included) and those of LAISSES left out:
6
+ // folders whose name begins with a dot (`.build-cmake` included) and those of LAISSES left out,
7
+ // and a CMakeLists.txt git ignores (the local clone of another repository) left out too:
7
8
  // its folder, its name and its package the name `project()` gives. The CMakeLists.txt of
8
9
  // `tests/`, which calls no `project(`, is the package's matter, never a component. `project(` is
9
10
  // read in any case, after the comments (`#`) are cut, a space before the parenthesis allowed,
@@ -22,6 +23,7 @@
22
23
  // `docs/INTERFACE.md`, and the root's, as the module python's.
23
24
  import { existsSync, readdirSync, readFileSync } from 'node:fs';
24
25
  import path from 'node:path';
26
+ import { ignoresParGit } from '../../paquets.mjs';
25
27
  import { luUneFois } from '../../services-du-noyau.mjs';
26
28
 
27
29
  export const MANIFESTE = 'CMakeLists.txt';
@@ -63,11 +65,17 @@ function dossiersAvecProjet(dossier) {
63
65
  /** The components of the project at <racine>, sorted by folder; read once in a scope of the core
64
66
  * (`luUneFois`): a sweep asks it of every file of a folder. */
65
67
  export function composants(racine) {
66
- return luUneFois(`c composants ${path.resolve(racine)}`, () =>
67
- dossiersAvecProjet(racine)
68
+ return luUneFois(`c composants ${path.resolve(racine)}`, () => {
69
+ const trouves = dossiersAvecProjet(racine);
70
+ const ignores = ignoresParGit(
71
+ racine,
72
+ trouves.map(t => path.join(t.dossier, MANIFESTE))
73
+ );
74
+ return trouves
75
+ .filter(t => !ignores.has(path.join(t.dossier, MANIFESTE)))
68
76
  .sort((a, b) => (a.dossier < b.dossier ? -1 : a.dossier > b.dossier ? 1 : 0))
69
- .map(({ dossier, nom }) => ({ dossier, nom, paquet: nom }))
70
- );
77
+ .map(({ dossier, nom }) => ({ dossier, nom, paquet: nom }));
78
+ });
71
79
  }
72
80
 
73
81
  /** The component of <liste> that holds <fichier> (absolute, or from <racine>), the longest folder. */
@@ -141,6 +141,7 @@ import {
141
141
  avecLaPasse,
142
142
  cheminsDeLaTache,
143
143
  construireDepuisLesArguments,
144
+ constructionDuGraphe,
144
145
  ecrirePression,
145
146
  GRAPHE_JOUE,
146
147
  joueCeQuiNeSeDivisePas,
@@ -151,6 +152,7 @@ import {
151
152
  ouvrirBase,
152
153
  retirerALInterruption,
153
154
  SCRIPT_DES_TESTS,
155
+ SCRIPTS_DE_GARDES,
154
156
  SEUIL_PRESSION,
155
157
  testsCibles,
156
158
  travailleursDeLaSeance,
@@ -740,10 +742,6 @@ function verifier(racine, args, env) {
740
742
  return verdict;
741
743
  }
742
744
 
743
- // The scripts of guards of the project, in the order they play, as the module typescript's
744
- // `--gardes` plays its tasks: the frame's, then the project's own.
745
- const SCRIPTS_DE_GARDES = ['grillhouse:gardes', 'gardes'];
746
-
747
745
  // The pass of `verifier --gardes` in <racine>, the run <p>: each script of SCRIPTS_DE_GARDES the
748
746
  // root package.json holds, a task of the root, whatever the verdict of the one before; no test.
749
747
  function gardes(racine, p) {
@@ -843,8 +841,9 @@ export function lancer(nom, args, { racine = process.cwd(), env = process.env }
843
841
  // `cargo check -p`), as Turborepo's task of one package; `typer` alone checks the workspace.
844
842
  let crate = null;
845
843
  // The launcher's `construire` (`--echec <fichier> <plan>`, scripts/enveloppe/lancer.sh) builds
846
- // the copy for a session, the plan and its providers, as every language's.
847
- if (nom === 'construire' && args.includes('--echec')) {
844
+ // the copy for a session, the plan and its providers, as every language's; `construire --gardes`,
845
+ // what the guard tasks wait for.
846
+ if (nom === 'construire' && constructionDuGraphe(args)) {
848
847
  return construireDepuisLesArguments(OUTIL, args, racine);
849
848
  }
850
849
  if (nom === 'construire' || (nom === 'typer' && args.length)) {
@@ -92,6 +92,7 @@ import {
92
92
  cacheDeCompilation,
93
93
  cheminsDeLaTache,
94
94
  construireDepuisLesArguments,
95
+ constructionDuGraphe,
95
96
  GRAPHE_JOUE,
96
97
  joueCeQuiNeSeDivisePas,
97
98
  lancerLesTaches,
@@ -100,6 +101,7 @@ import {
100
101
  ouvrirBase,
101
102
  retirerALInterruption,
102
103
  SCRIPT_DES_TESTS,
104
+ SCRIPTS_DE_GARDES,
103
105
  testsCibles,
104
106
  travailleursDeLaSeance,
105
107
  } from '../../services-du-noyau.mjs';
@@ -442,9 +444,6 @@ const typerLePaquet = (p, c) =>
442
444
  ])
443
445
  );
444
446
 
445
- // The scripts of guards of the project, in the order they play: the frame's, then its own.
446
- const SCRIPTS_DE_GARDES = ['grillhouse:gardes', 'gardes'];
447
-
448
447
  // The pass of `verifier --gardes` in <racine>: each script of SCRIPTS_DE_GARDES the root
449
448
  // package.json holds, a task of the root; no test.
450
449
  function gardes(racine, p) {
@@ -532,8 +531,9 @@ export function lancer(nom, args, { racine = process.cwd(), env = process.env }
532
531
  }
533
532
  }
534
533
  // The launcher's `construire` (`--echec <fichier> <plan>`, scripts/enveloppe/lancer.sh) builds
535
- // the copy for a session, the plan and its providers, as every language's.
536
- if (nom === 'construire' && args.includes('--echec')) {
534
+ // the copy for a session, the plan and its providers, as every language's; `construire --gardes`,
535
+ // what the guard tasks wait for.
536
+ if (nom === 'construire' && constructionDuGraphe(args)) {
537
537
  return construireDepuisLesArguments(OUTIL, args, racine);
538
538
  }
539
539
  if (nom === 'typer' || nom === 'construire') {
@@ -4,7 +4,8 @@
4
4
  // `entreesDeLIndex`).
5
5
  //
6
6
  // - A component is a folder that holds a pyproject.toml, found under the root, the folders whose
7
- // name begins with a dot and those of LAISSES left out: its folder, its name the folder's, its
7
+ // name begins with a dot and those of LAISSES left out, and a pyproject.toml git ignores (the
8
+ // local clone of another repository) left out too: its folder, its name the folder's, its
8
9
  // package the `name` of its table `[project]`, null without one. The language of a package is
9
10
  // declared in the architecture (decision D2 of grillhouse-1zu); its pyproject.toml, its group
10
11
  // `test` and its uv.lock are there because uv asks them.
@@ -32,6 +33,7 @@ import { existsSync, readdirSync, readFileSync } from 'node:fs';
32
33
  import { createRequire } from 'node:module';
33
34
  import path from 'node:path';
34
35
  import { isDeepStrictEqual } from 'node:util';
36
+ import { ignoresParGit } from '../../paquets.mjs';
35
37
  import { luUneFois } from '../../services-du-noyau.mjs';
36
38
 
37
39
  const require = createRequire(import.meta.url);
@@ -83,7 +85,13 @@ export function composants(racine) {
83
85
 
84
86
  // The components of `composants`, read at each call.
85
87
  function lireLesComposants(racine) {
86
- return dossiersAvecManifeste(racine)
88
+ const trouves = dossiersAvecManifeste(racine);
89
+ const ignores = ignoresParGit(
90
+ racine,
91
+ trouves.map(d => path.join(d, MANIFESTE))
92
+ );
93
+ return trouves
94
+ .filter(d => !ignores.has(path.join(d, MANIFESTE)))
87
95
  .sort()
88
96
  .map(dossier => ({
89
97
  dossier,
@@ -5,9 +5,11 @@
5
5
  // file) both import.
6
6
  import { existsSync, readdirSync, readFileSync } from 'node:fs';
7
7
  import path from 'node:path';
8
- import { horsCadre } from '../../paquets.mjs';
8
+ import { horsCadre, ignoresParGit } from '../../paquets.mjs';
9
9
 
10
- // Every directory under `packages/` and `src/` of the repository at <racine>: [{ nom, dir }].
10
+ // Every directory under `packages/` and `src/` of the repository at <racine>: [{ nom, dir }], a
11
+ // directory git ignores (the local clone of another repository) left out: its package.json when
12
+ // it holds one, the directory itself otherwise.
11
13
  function tousDossiers(racine) {
12
14
  const found = [];
13
15
  for (const parent of ['packages', 'src']) {
@@ -21,7 +23,12 @@ function tousDossiers(racine) {
21
23
  }
22
24
  }
23
25
  }
24
- return found;
26
+ const lu = d => {
27
+ const manifeste = path.join(d.dir, 'package.json');
28
+ return existsSync(manifeste) ? manifeste : d.dir;
29
+ };
30
+ const ignores = ignoresParGit(racine, found.map(lu));
31
+ return found.filter(d => !ignores.has(lu(d)));
25
32
  }
26
33
 
27
34
  // The component directories of the repository at <racine>: [{ nom, dir }], each directory under
@@ -28,6 +28,12 @@
28
28
  // section already gives that consumer were settled before. The plan fixed them before the lot,
29
29
  // as a code owner's approval covers what it reviewed. The plan is read only for such a line; one
30
30
  // that cannot be read refuses, as the comments do.
31
+ // - An interface of a package of the test material (`matieres` of ./consommateurs.mjs, a package
32
+ // that exports `./test-fixtures`) is not judged: the names
33
+ // the testwriter adds to its Consommateurs lines are born with the tests, so no plan can
34
+ // announce them, as Bazel's `testonly` targets leave the dependency rules of released code. A
35
+ // production code that reads such a package stays refused by the guard of the consumers
36
+ // (./consommateurs.mjs).
31
37
  // - A refusal names `<INTERFACE.md> § Consommateurs`, the line and the names the plan misses; a
32
38
  // refusal inscribed in the project's debt (`grillhouse-dette.json`, see `dette.mjs`) passes,
33
39
  // keyed by the interface and `consommateur-sans-arbitrage`. Comments that cannot be read refuse,
@@ -38,7 +44,7 @@ import { spawnSync } from 'node:child_process';
38
44
  import { existsSync, readFileSync } from 'node:fs';
39
45
  import path from 'node:path';
40
46
  import { pathToFileURL } from 'node:url';
41
- import { lireLigne } from './consommateurs.mjs';
47
+ import { lireLigne, matieres } from './consommateurs.mjs';
42
48
  import { trancher } from '../../dette.mjs';
43
49
  import { arbitrageTranche, estArbitrage } from '../../services-du-noyau.mjs';
44
50
  import { aVerifier, marques, mesureDe } from './interfaces-contre-code.mjs';
@@ -131,6 +137,7 @@ export function verifier(racine, env = process.env) {
131
137
  return [];
132
138
  }
133
139
  const interfaces = [];
140
+ const dossiersMatiere = new Set(matieres(racine).map(m => path.resolve(m.dir)));
134
141
  for (const c of aVerifier(racine, env)) {
135
142
  const iface = path.join(c.dir, 'docs', 'INTERFACE.md');
136
143
  if (!existsSync(iface)) {
@@ -142,6 +149,7 @@ export function verifier(racine, env = process.env) {
142
149
  rel,
143
150
  avant: head.status === 0 ? head.stdout : null,
144
151
  apres: readFileSync(iface, 'utf8'),
152
+ matiere: dossiersMatiere.has(path.resolve(c.dir)),
145
153
  });
146
154
  }
147
155
  const principal = () =>
@@ -159,13 +167,17 @@ export function verifier(racine, env = process.env) {
159
167
  /**
160
168
  * The findings on the lot of <ticket>, in the debt's form (`dette.mjs`): <interfaces>
161
169
  * `[{ rel, avant, apres }]`, each interface's path from the root, its text at HEAD (null when
162
- * absent) and in the working tree; `commentaires()` the ticket's comments (`[{ text }]`) and
170
+ * absent) and in the working tree, `matiere` true for a package of the test material, whose lines are
171
+ * not judged (see the header); `commentaires()` the ticket's comments (`[{ text }]`) and
163
172
  * `ticketLu()` the ticket (`{ title, description }`), each read only when a changed line needs it,
164
173
  * throwing when it does not read.
165
174
  */
166
175
  export function juger(ticket, interfaces, commentaires, ticketLu) {
167
176
  const changees = [];
168
- for (const { rel, avant: texteAvant, apres } of interfaces) {
177
+ for (const { rel, avant: texteAvant, apres, matiere } of interfaces) {
178
+ if (matiere) {
179
+ continue;
180
+ }
169
181
  const lignesAvant = texteAvant === null ? [] : lignesConsommateurs(texteAvant);
170
182
  const avant = new Set(lignesAvant);
171
183
  // The names each consumer of HEAD's section reads (`lireLigne` of scripts/langages/typescript/consommateurs.mjs,
@@ -4,6 +4,8 @@
4
4
  // prepared copy, through its mounts: the session finds built what it reads out of its plan.
5
5
  //
6
6
  // node construire.mjs --echec <fichier> <plan> from the root of the copy
7
+ // node construire.mjs --gardes what the guard tasks wait for, before the
8
+ // guards of the checks of a plan
7
9
  //
8
10
  // - The launcher is the core's, one for every language (`construireDepuisLesArguments` of
9
11
  // scripts/taches-du-graphe.mjs): the plan and its providers by `turbo run build
@@ -7,7 +7,8 @@
7
7
  // interface, and the generated files are written by their own commands (the index of the
8
8
  // interfaces, the turbo.json of the packages): `aJour`; the same with each generated file out
9
9
  // of date: the interface of `a` changed after its index, a fault listed that its code never
10
- // produces (the check of the interfaces against the code), the turbo.json of `b` stale:
10
+ // produces (the check of the interfaces against the code), the turbo.json of `b` stale, a
11
+ // dependency of `a` that the lock does not hold:
11
12
  // `enRetard`; the same where the code of `b` imports `a` and the
12
13
  // code of `c` imports `b`: `lus`; the same with a second commit that changes a file of `a`:
13
14
  // `lot`. A directory whose package.json names no package: `vide`. A
@@ -57,6 +58,29 @@ function depot(dans) {
57
58
  `# ${nom}\n\n${nom.toUpperCase()} rend un nombre.\n`
58
59
  );
59
60
  }
61
+ // The lock npm writes for them: the workspaces linked, each entry with its dependencies.
62
+ ecrire(
63
+ 'package-lock.json',
64
+ json({
65
+ name: 'e',
66
+ lockfileVersion: 3,
67
+ requires: true,
68
+ packages: {
69
+ '': { name: 'e', workspaces: ['packages/*'] },
70
+ ...Object.fromEntries(
71
+ Object.keys(PAQUETS).flatMap(nom => [
72
+ [`node_modules/@e/${nom}`, { resolved: `packages/${nom}`, link: true }],
73
+ [
74
+ `packages/${nom}`,
75
+ Object.fromEntries(
76
+ Object.entries(PAQUETS[nom]).filter(([k]) => k !== 'name' && k !== 'exports')
77
+ ),
78
+ ],
79
+ ])
80
+ ),
81
+ },
82
+ })
83
+ );
60
84
  mkdirSync(path.join(racine, 'docs/agents'), { recursive: true });
61
85
  node(racine, 'turbo-des-paquets.mjs', '--ecrire');
62
86
  node(racine, 'index-interfaces.mjs');
@@ -125,6 +149,11 @@ export default {
125
149
  '# a\n\nA rend un autre nombre.\n\n## Les fautes\n\n- `A_ABSENTE` : jamais produite.\n'
126
150
  );
127
151
  writeFileSync(path.join(enRetard, 'packages/b/turbo.json'), '{}\n');
152
+ // A dependency added to `a` that its lock does not hold.
153
+ writeFileSync(
154
+ path.join(enRetard, 'packages/a/package.json'),
155
+ json({ type: 'module', ...PAQUETS.a, devDependencies: { '@e/m': '*' } })
156
+ );
128
157
  // The specifiers are written apart, so that no reading of the package's imports takes a
129
158
  // trial's for its own.
130
159
  const lus = depot(dans);
@@ -181,6 +210,7 @@ export default {
181
210
  'tests-du-poste',
182
211
  'titres-de-tests',
183
212
  'turbo-des-paquets',
213
+ 'verrou-des-dependances',
184
214
  ],
185
215
  invalide: ['tester', 'deployer'],
186
216
  attendu: ['deployer : absente'],
@@ -234,6 +264,7 @@ export default {
234
264
  "l'index des interfaces : en retard",
235
265
  'les turbo.json des paquets : en retard',
236
266
  "les rapports d'API : en retard",
267
+ 'le verrou des dépendances : en retard',
237
268
  ],
238
269
  },
239
270
  gardes: {
@@ -250,6 +281,7 @@ export default {
250
281
  'titres-de-tests',
251
282
  'chemins-des-tests',
252
283
  'resumes',
284
+ 'verrou-des-dependances',
253
285
  ],
254
286
  },
255
287
  elementsDuLot: {
@@ -74,6 +74,8 @@ import * as titresNommantUnTicket from './migrations/0.30.0-titres-nommant-un-ti
74
74
  import * as binaireDeJour from './migrations/0.33.0-binaire-de-jour.mjs';
75
75
  import * as testsDuPoste from './migrations/0.33.0-tests-du-poste.mjs';
76
76
  import * as cacheDesOutils from './migrations/0.34.1-cache-des-outils.mjs';
77
+ import * as testsEquipes from './migrations/0.49.0-tests-equipes.mjs';
78
+ import { COMMANDE as COMMANDE_DU_VERROU } from './verrou-des-dependances.mjs';
77
79
 
78
80
  // The scripts of this module, beside this file.
79
81
  const SCRIPTS = path.dirname(fileURLToPath(import.meta.url));
@@ -97,6 +99,7 @@ const OUTILS = [
97
99
  'tests-du-poste',
98
100
  'titres-de-tests',
99
101
  'turbo-des-paquets',
102
+ 'verrou-des-dependances',
100
103
  ];
101
104
 
102
105
  // The component of <liste> that holds <fichier> (absolute, or from <racine>), null for none.
@@ -324,6 +327,20 @@ export default {
324
327
  'interfaces-contre-code.mjs',
325
328
  []
326
329
  ),
330
+ // The lock of npm, written in full by npm on the lot applied, without the audit; the guard
331
+ // compares it with the package.json it locks (./verrou-des-dependances.mjs).
332
+ engendre(
333
+ {
334
+ nom: 'le verrou des dépendances',
335
+ commande: COMMANDE_DU_VERROU,
336
+ fichiers: ['package-lock.json'],
337
+ lit: ['package.json', '**/package.json'],
338
+ gardes: ['verrou-des-dependances'],
339
+ entiers: ['package-lock.json'],
340
+ },
341
+ 'verrou-des-dependances.mjs',
342
+ []
343
+ ),
327
344
  ],
328
345
  // Loaded at the call: ./index-interfaces.mjs imports the services of the core, which import the
329
346
  // join that loads this module.
@@ -341,6 +358,7 @@ export default {
341
358
  [ici('titres-de-tests.mjs')],
342
359
  [ici('chemins-des-tests.mjs')],
343
360
  [ici('resumes.mjs')],
361
+ [ici('verrou-des-dependances.mjs')],
344
362
  ],
345
363
  migrations: [
346
364
  configVitest,
@@ -355,6 +373,7 @@ export default {
355
373
  binaireDeJour,
356
374
  testsDuPoste,
357
375
  cacheDesOutils,
376
+ testsEquipes,
358
377
  ],
359
378
  miseAJour: miseAJour(joueDesTests),
360
379
  squelette,
@@ -0,0 +1,32 @@
1
+ // From 0.49.0 the guard of the night tests of the poste (scripts/langages/typescript/tests-du-poste.mjs)
2
+ // asks the tag `@equipee` of a night test that needs the equipment of a machine (the envelope, a
3
+ // Temporal server, sccache, the binaries of the module cargo), and `@poste` stays for what only the
4
+ // poste has (the real bd, systemd, the keyring, the user's session, a session of claude). A project
5
+ // whose night tests need equipment without the tag would turn red at its next pass; the update
6
+ // inscribes them as the project's known debt (scripts/dette.mjs), frozen: the count never rises and
7
+ // a new one is refused.
8
+ //
9
+ // - The migration inscribes the findings of the guard that the debt does not hold yet; the debt
10
+ // already inscribed (the guard's, the other guards') stays.
11
+ // - It rewrites no test of the project: the project tags each one (`// @equipee: <raison>` at its
12
+ // head), and the debt comes down with it.
13
+ // - Replayable without effect: once every finding is inscribed, nothing.
14
+ import { FICHIER, lire, trancher } from '../../../dette.mjs';
15
+ import { GARDE, verifier } from '../tests-du-poste.mjs';
16
+
17
+ export const version = '0.49.0';
18
+ export const nom = 'tests equipes';
19
+
20
+ /** Inscribes the night tests of equipment without the tag that the debt of <projet> lacks. */
21
+ export function migrer(projet) {
22
+ const inscrite = lire(projet)[GARDE] ?? {};
23
+ const constats = verifier(projet);
24
+ const neufs = constats.filter(c => !inscrite[c.fichier]?.[c.regle]);
25
+ if (neufs.length === 0) {
26
+ return [];
27
+ }
28
+ trancher(projet, GARDE, constats, 'inscrire', {});
29
+ return [
30
+ `${FICHIER} : ${neufs.length} test(s) de nuit qui exige(nt) l'équipement d'une machine sans l'étiquette @equipee inscrit(s) dans la dette de ${GARDE}, gelée ; un neuf est refusé, et chacun porte « // @equipee: <raison> » en tête`,
31
+ ];
32
+ }