@roomi-fields/grillhouse 0.50.3 → 0.51.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 (131) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/CHANGELOG.md +48 -0
  3. package/agents/developpeur.md +1 -1
  4. package/agents/direct.md +1 -1
  5. package/agents/explorateur.md +1 -1
  6. package/agents/questionneur.md +1 -1
  7. package/agents/relecteur.md +1 -1
  8. package/agents/testwriter.md +1 -1
  9. package/cadre/templates/c/package.json +1 -0
  10. package/cadre/templates/cargo/package.json +1 -0
  11. package/cadre/templates/python/package.json +1 -0
  12. package/charte.md +17 -12
  13. package/dist/machine/part-par-sorte.d.ts +16 -0
  14. package/dist/machine/part-par-sorte.js +36 -0
  15. package/dist/machine/part-par-sorte.js.map +1 -0
  16. package/dist/temporal/circuit/appel.js +1 -1
  17. package/dist/temporal/circuit/appel.js.map +1 -1
  18. package/dist/temporal/circuit/client.d.ts +5 -4
  19. package/dist/temporal/circuit/client.js +39 -16
  20. package/dist/temporal/circuit/client.js.map +1 -1
  21. package/dist/temporal/circuit/contrat.d.ts +11 -7
  22. package/dist/temporal/circuit/contrat.js +5 -9
  23. package/dist/temporal/circuit/contrat.js.map +1 -1
  24. package/dist/temporal/circuit/deroule.js +18 -6
  25. package/dist/temporal/circuit/deroule.js.map +1 -1
  26. package/dist/temporal/commande.js +12 -3
  27. package/dist/temporal/commande.js.map +1 -1
  28. package/dist/temporal/installation.d.ts +54 -3
  29. package/dist/temporal/installation.js +187 -17
  30. package/dist/temporal/installation.js.map +1 -1
  31. package/dist/temporal/places/client.d.ts +5 -1
  32. package/dist/temporal/places/client.js +23 -11
  33. package/dist/temporal/places/client.js.map +1 -1
  34. package/docs/ARCHITECTURE.md +23 -2700
  35. package/docs/INTERFACE.md +23 -8
  36. package/docs/architecture/circuit.md +59 -12
  37. package/docs/architecture/entree.md +20 -7
  38. package/docs/architecture/greffon.md +6 -2
  39. package/docs/architecture/installation.md +30 -11
  40. package/docs/architecture/machine.md +50 -37
  41. package/docs/architecture/tests.md +52 -14
  42. package/docs/lexique.md +154 -0
  43. package/hooks/register.tsx +1 -1
  44. package/package.json +1 -1
  45. package/scripts/activites.mjs +85 -60
  46. package/scripts/aiguillage.mjs +15 -7
  47. package/scripts/attente-de-la-machine.mjs +4 -8
  48. package/scripts/avancement.mjs +12 -8
  49. package/scripts/bilan.mjs +10 -7
  50. package/scripts/branche-de-nuit.mjs +2 -2
  51. package/scripts/ci-de-main.mjs +18 -21
  52. package/scripts/circuit.mjs +86 -43
  53. package/scripts/circuits-du-serveur.mjs +5 -5
  54. package/scripts/composants-affectes.mjs +30 -12
  55. package/scripts/composition-des-langages.mjs +5 -3
  56. package/scripts/conformite.mjs +1 -1
  57. package/scripts/consommation-des-passes.mjs +8 -6
  58. package/scripts/copies-finies.mjs +3 -14
  59. package/scripts/depart-du-ticket.d.mts +8 -2
  60. package/scripts/depart-du-ticket.mjs +26 -8
  61. package/scripts/direct.mjs +158 -72
  62. package/scripts/droits.mjs +63 -185
  63. package/scripts/engendres.mjs +3 -14
  64. package/scripts/enveloppe/enveloppe.mjs +75 -30
  65. package/scripts/enveloppe/lancer.sh +59 -45
  66. package/scripts/enveloppe/paquets-du-plan.mjs +38 -11
  67. package/scripts/enveloppe/travail-de-la-copie.mjs +115 -3
  68. package/scripts/etapes.mjs +84 -22
  69. package/scripts/faits-du-circuit.mjs +8 -2
  70. package/scripts/grillhouse-maj.mjs +43 -18
  71. package/scripts/groupe-cles.d.mts +15 -0
  72. package/scripts/groupe-cles.mjs +77 -2
  73. package/scripts/init.mjs +9 -2
  74. package/scripts/integration/rejeu.mjs +8 -1
  75. package/scripts/jointure.d.ts +22 -3
  76. package/scripts/langages/c/index.mjs +5 -2
  77. package/scripts/langages/cargo/commandes.mjs +35 -15
  78. package/scripts/langages/cargo/composants.mjs +45 -3
  79. package/scripts/langages/cargo/index.mjs +6 -3
  80. package/scripts/langages/python/index.mjs +5 -2
  81. package/scripts/langages/typescript/chemins-des-tests.mjs +1 -1
  82. package/scripts/langages/typescript/index.mjs +4 -2
  83. package/scripts/langages/typescript/mise-a-jour.mjs +1 -1
  84. package/scripts/langages/typescript/rapports-aux-lignes.mjs +74 -0
  85. package/scripts/langages/typescript/turbo-des-paquets.mjs +99 -36
  86. package/scripts/langages/typescript/verdict.mjs +29 -3
  87. package/scripts/langages/typescript/verifier.mjs +1 -1
  88. package/scripts/langages/typescript/vitest-config/changements.mjs +8 -6
  89. package/scripts/langages/typescript/vitest-config/lances.mjs +15 -32
  90. package/scripts/langages.mjs +54 -4
  91. package/scripts/matieres-lues.mjs +1 -1
  92. package/scripts/mesure/base-de-passe.mjs +32 -90
  93. package/scripts/migrations/serveurs-de-l-index.mjs +79 -0
  94. package/scripts/migrations.mjs +21 -7
  95. package/scripts/paquets.d.ts +3 -0
  96. package/scripts/paquets.mjs +88 -1
  97. package/scripts/passe-de-la-machine.mjs +109 -36
  98. package/scripts/places-de-la-machine.mjs +81 -29
  99. package/scripts/plafond-de-la-machine.d.mts +2 -5
  100. package/scripts/plafond-de-la-machine.mjs +9 -9
  101. package/scripts/reprise.mjs +42 -13
  102. package/scripts/resultats.mjs +76 -54
  103. package/scripts/retirer-les-copies-finies.mjs +1 -1
  104. package/scripts/seances.mjs +426 -115
  105. package/scripts/services-du-noyau.mjs +9 -1
  106. package/scripts/session-start.sh +14 -1
  107. package/scripts/sortie.mjs +37 -6
  108. package/scripts/sous-commandes.mjs +0 -2
  109. package/scripts/superviseur.mjs +33 -13
  110. package/scripts/tableau.mjs +61 -16
  111. package/scripts/transitions.d.mts +25 -2
  112. package/scripts/transitions.mjs +137 -29
  113. package/scripts/verrous/ecriture-hors-enveloppe.mjs +31 -9
  114. package/skills/codebase-design/DESIGN-IT-TWICE.md +1 -1
  115. package/skills/developpeur/SKILL.md +38 -15
  116. package/skills/direct/SKILL.md +29 -9
  117. package/skills/domain-modeling/GLOSSARY-FORMAT.md +9 -9
  118. package/skills/domain-modeling/SKILL.md +14 -12
  119. package/skills/explorateur/SKILL.md +30 -6
  120. package/skills/pitmaster/SKILL.md +12 -16
  121. package/skills/pitmaster/references/consigne-agent.md +12 -11
  122. package/skills/relecteur/SKILL.md +12 -5
  123. package/skills/systematic-debugging/SKILL.md +281 -0
  124. package/skills/systematic-debugging/condition-based-waiting-example.ts +158 -0
  125. package/skills/systematic-debugging/condition-based-waiting.md +115 -0
  126. package/skills/systematic-debugging/defense-in-depth.md +122 -0
  127. package/skills/systematic-debugging/find-polluter.sh +72 -0
  128. package/skills/systematic-debugging/root-cause-tracing.md +169 -0
  129. package/skills/testwriter/SKILL.md +35 -29
  130. package/scripts/verrous/commande.mjs +0 -214
  131. package/scripts/verrous/verrou.mjs +0 -311
@@ -30,7 +30,7 @@ import { A_REPASSER, MEMOIRE_COUPEE } from './codes-de-sortie.mjs';
30
30
  import { BASE_DU_LOT, DEPUIS_LE_VERT } from './dernier-vert.mjs';
31
31
  import { empreinteDEtape } from './empreinte-d-etape.mjs';
32
32
  import { BASE as GARDES_DE_LA_BASE, FICHIER as DETTE } from './dette.mjs';
33
- import { commandesPermises, optionsDuRole } from './droits.mjs';
33
+ import { optionsDuRole } from './droits.mjs';
34
34
  import { cheminsLus } from './composants-affectes.mjs';
35
35
  import { couvertPar } from './engendres.mjs';
36
36
  import {
@@ -39,7 +39,7 @@ import {
39
39
  texteDesDifferences,
40
40
  } from './references-changees.mjs';
41
41
  import { ecrireLaListe, VARIABLE as VARIABLE_ENVELOPPE } from './enveloppe/paquets-du-plan.mjs';
42
- import { etapeDuCircuit, EXPLORATEUR, SUITE } from './etapes.mjs';
42
+ import { auteurDuCode, etapeDuCircuit, EXPLORATEUR, SUITE } from './etapes.mjs';
43
43
  import { gardesDuCadre, nomsDesGardes } from './gardes-du-cadre.mjs';
44
44
  import { INTEGRE } from './integration/file.mjs';
45
45
  import { lotSurMain, refusLotAbsent } from './integration/integrer.mjs';
@@ -66,7 +66,7 @@ import {
66
66
  VERDICTS_DU_TRI,
67
67
  VERDICTS_ROUVERTS,
68
68
  } from './resultats.mjs';
69
- import { consigne, idDeSeance, jusquALaFiche } from './seances.mjs';
69
+ import { consigne, consigneDuRelecteurDUnLotDirect, idDeSeance, jusquALaFiche } from './seances.mjs';
70
70
  import {
71
71
  Arret,
72
72
  AUTEUR_DU_CIRCUIT,
@@ -179,7 +179,8 @@ const bloquants = bloquantsDeLaFiche;
179
179
 
180
180
  // The blocking findings <constats>, each under its heading, the criterion or rule it holds, its
181
181
  // recipient (or the criterion in question), its body and its piece (an element judged not
182
- // conforming carries it in its body), then the developpeur's answer to it, when he gave one: lines.
182
+ // conforming carries it in its body), then the answer of the author of the code to it, when he
183
+ // gave one: lines.
183
184
  const lignesDesConstats = constats =>
184
185
  constats.flatMap((c, i) => [
185
186
  `### Constat ${i + 1} — ${c.titre}`,
@@ -189,7 +190,7 @@ const lignesDesConstats = constats =>
189
190
  ...(c.piece ? [`Pièce : ${c.piece}`] : []),
190
191
  ...(c.reponse
191
192
  ? [
192
- `Réponse du développeur : ${c.reponse.etat}${c.reponse.raison ? ` — ${c.reponse.raison}` : ''}`,
193
+ `Réponse ${c.role === 'direct' ? 'de l’agent direct' : 'du développeur'} : ${c.reponse.etat}${c.reponse.raison ? ` — ${c.reponse.raison}` : ''}`,
193
194
  `Pièce de la réponse : ${c.reponse.piece}`,
194
195
  ]
195
196
  : []),
@@ -248,7 +249,11 @@ export function texteDuVerdict(fiche) {
248
249
  // still open with their recipients.
249
250
  export async function relire(
250
251
  ctx,
251
- { constats = [], consigneDuRelecteur = valeurs => consigne(valeurs, 1) } = {}
252
+ {
253
+ constats = [],
254
+ consigneDuRelecteur = valeurs =>
255
+ ctx.circuit === 'direct' ? consigneDuRelecteurDUnLotDirect(valeurs) : consigne(valeurs, 1),
256
+ } = {}
252
257
  ) {
253
258
  const { tests, code } = fichiersDuLot(ctx);
254
259
  const rapports = rapportsDuCircuit(ctx);
@@ -603,7 +608,7 @@ export function laPasseFinale(ctx) {
603
608
 
604
609
  // The filters of Turborepo the band <restreinte> (`{ avant, apres }`, two lots kept) plays at the
605
610
  // final pass: the packages that changed from one to the other and their dependents, each package
606
- // of <liste> whose tests declare they read a path the band changes (`grillhouse.lit`,
611
+ // of <liste> whose tests declare they read a path the band changes (`grillhouse.lit`, `// @lit`,
607
612
  // `cheminsLus`: the `data` of Bazel, which Turborepo's graph does not see) and its dependents, then
608
613
  // the root's tasks, the guards.
609
614
  export function filtresDeLaBande(ctx, liste, restreinte) {
@@ -612,7 +617,7 @@ export function filtresDeLaBande(ctx, liste, restreinte) {
612
617
  .filter(
613
618
  p =>
614
619
  p.pkg?.name &&
615
- fichiers.some(f => couvertPar(cheminsLus(path.join(ctx.copie, p.dossier)), f))
620
+ fichiers.some(f => couvertPar(cheminsLus(path.join(ctx.copie, p.dossier), ctx.copie), f))
616
621
  )
617
622
  .map(p => p.pkg.name)
618
623
  .sort();
@@ -950,9 +955,10 @@ function restaurer(ctx, commit, fichiers) {
950
955
 
951
956
  // Whether a proof of the counts <compte> passes: no file of the lot that does not load (one that
952
957
  // imports a module the copy does not hold is a red, `casseDeChargement`), no green
953
- // the sheet names in `portent_le_travail` (`nommes`), and at least one red (of the lot, existing
954
- // or of a build); the greens the sheet does not name and the ones HEAD holds are accepted but prove
955
- // nothing. Under a plan « comportement tests-adaptés » (<inchange>), nothing has to turn red and every
958
+ // the sheet names in `portent_le_travail` (`nommes`), and at least one red that proves the work
959
+ // (`rouges`: with test files of the lot played, a red of the lot or of a build; without, the
960
+ // existing reds of the packages played whole too); the greens the sheet does not name and the ones
961
+ // HEAD holds are accepted but prove nothing. Under a plan « comportement tests-adaptés » (<inchange>), nothing has to turn red and every
956
962
  // green passes: a proof passes with no file of the lot that does not load, its reds going to the
957
963
  // developpeur.
958
964
  // The files of the lot that only the night plays (<misDeCote>, `separerLesFichiersDuJour`) are no
@@ -1199,7 +1205,7 @@ export function integrer(ctx) {
1199
1205
  // envelope, on Sonnet, in the main tree, under the rights of its role (reading, the build of a
1200
1206
  // package, no pass), its instruction from the eighth template (the ticket, its commit on main, the
1201
1207
  // one the queue names in the reason it closes the ticket with, `commitIntegre`, its discoveries,
1202
- // one per line, the commands its rights permit, `commandesPermises`), its sheet the tri's (`tri` of scripts/resultats.mjs): one line per discovery
1208
+ // one per line), its sheet the tri's (`tri` of scripts/resultats.mjs): one line per discovery
1203
1209
  // (`conformiteDuTri`), asked again once of the same session. Each verdict is written at the ticket
1204
1210
  // of its discovery (`Circuit · tri : <verdict> — <texte> (<piece>)`), its label set there; an
1205
1211
  // a-porter or a non-confirmee reopens under `a-valider`, the pane's list « à valider »; the others
@@ -1241,7 +1247,6 @@ export async function trier(ctx) {
1241
1247
  sujet: ctx.sujet,
1242
1248
  commit: commit || 'inconnu',
1243
1249
  decouvertes: decouvertes.map(d => `- ${d.id} — ${d.sujet}`).join('\n'),
1244
- commandes: commandesPermises(EXPLORATEUR),
1245
1250
  },
1246
1251
  7
1247
1252
  ),
@@ -1330,8 +1335,8 @@ export function commitIntegre(raison) {
1330
1335
  const TYPES_DE_COMMIT = { bug: 'fix', chore: 'chore', docs: 'docs' };
1331
1336
 
1332
1337
  // The commit message of the lot: `<type>(<paquets>): <sujet> (<ticket>)`, the packages of the
1333
- // plan by their name; then the message the sheets of the developpeur and of the reviewer give, in
1334
- // their order, written once from the final state (`messageDuLot`).
1338
+ // plan by their name; then the message the sheets of the author of the code (the developpeur or
1339
+ // the agent direct) and of the reviewer give, in their order, written once from the final state (`messageDuLot`).
1335
1340
  function messageDeCommit(ctx) {
1336
1341
  const liste = composantsDe(existsSync(ctx.copie) ? ctx.copie : ctx.racine);
1337
1342
  const noms = ctx.paquets.flatMap(c => {
@@ -1354,7 +1359,7 @@ function messageDeCommit(ctx) {
1354
1359
  entete: `${type}${portee}: ${ctx.sujet} (${ctx.ticket})`,
1355
1360
  description: leTicket(ctx).description,
1356
1361
  fiches: lesFiches(ctx)
1357
- .filter(e => e.role === 'developpeur' || e.role === 'relecteur')
1362
+ .filter(e => [auteurDuCode(ctx.circuit), 'relecteur'].includes(e.role))
1358
1363
  .map(e => e.fiche),
1359
1364
  });
1360
1365
  }
@@ -1470,9 +1475,22 @@ function nommesParLeMessage(message, fichier, dossier, candidats) {
1470
1475
  );
1471
1476
  }
1472
1477
 
1473
- // The test files of the lot that the testwriter writes, present in the copy: in the packages of
1474
- // the plan and in the shared test material. <langage> reads the class of a file: the strict join
1475
- // by default, the join of the copy (`langageDeLaCopie`) for the launch of a session, which must
1478
+ // The files the runner plays for the test files <fichiers> of the copy of <ctx>, as the module of
1479
+ // its language <l> tells it (`estUnTest`): a file it plays itself, or the file that plays it
1480
+ // (`jouePar`, the executable of a module), each once; none for another file.
1481
+ /** @returns {string[]} */
1482
+ const joues = (ctx, l, fichiers) => [
1483
+ ...new Set(
1484
+ fichiers.flatMap(f => {
1485
+ const classe = l.estUnTest(f, ctx.copie);
1486
+ return classe?.jouePar ? [classe.jouePar] : classe?.joue ? [f] : [];
1487
+ })
1488
+ ),
1489
+ ];
1490
+
1491
+ // What the runner plays for the test files of the lot that the testwriter writes, present in the
1492
+ // copy: in the packages of the plan and in the shared test material (`joues`). <langage> reads the
1493
+ // class of a file: the strict join by default, the join of the copy (`langageDeLaCopie`) for the launch of a session, which must
1476
1494
  // go on in a copy its tool no longer loads.
1477
1495
  // A copy not made yet (the launch of the first session of the testwriter) has no change, and
1478
1496
  // the language is read only when a file is to class.
@@ -1483,19 +1501,17 @@ export function testsDuLot(ctx, langage = langageDe) {
1483
1501
  if (fichiers.length === 0) {
1484
1502
  return [];
1485
1503
  }
1486
- const l = langage(ctx.copie);
1487
- return fichiers.filter(f => l.estUnTest(f, ctx.copie)?.joue).sort();
1504
+ return joues(ctx, langage(ctx.copie), fichiers).sort();
1488
1505
  }
1489
1506
 
1490
- // The files a proof resumed at a red plays: of the files the red names <nommes>, the tests the
1491
- // runner of the copy's language plays. A red of a guard names what it found, a document among it
1507
+ // The files a proof resumed at a red plays: what the runner of the copy's language plays for the
1508
+ // files the red names <nommes> (`joues`). A red of a guard names what it found, a document among it
1492
1509
  // (a line « Consommateurs » of an INTERFACE.md): no test, so nothing for the proof to play.
1493
1510
  export function testsDeLaReprise(ctx, nommes, langage = langageDe) {
1494
1511
  if (nommes.length === 0) {
1495
1512
  return [];
1496
1513
  }
1497
- const l = langage(ctx.copie);
1498
- return nommes.filter(f => l.estUnTest(f, ctx.copie)?.joue);
1514
+ return joues(ctx, langage(ctx.copie), nommes);
1499
1515
  }
1500
1516
 
1501
1517
  // The package directory of the copy that holds <fichier>, or « . ».
@@ -1507,7 +1523,8 @@ function paquetDe(liste, fichier) {
1507
1523
  // One npm command in the copy, under <env> added to the circuit's environment, its results written
1508
1524
  // to a directory of its own (RESULTATS, scripts/resultats.mjs: the summaries of Turborepo, the
1509
1525
  // JSON reports of Vitest, the SARIF of the guards), its output added to the log for the human:
1510
- // `{ code, dossier }`. The circuit reads its results, never its output. Every pass (the proof of
1526
+ // `{ code, dossier }`. The circuit reads its results by the verdict of the language, never its
1527
+ // output; a runner without a report test by test is read there, from the log of its task. Every pass (the proof of
1511
1528
  // the red, the checks, the final pass `npm run verifier`) takes its part of the budget of the
1512
1529
  // machine (`avecLaPasse` of scripts/passe-de-la-machine.mjs) and plays held to it, in a control
1513
1530
  // group of its own, its command launched by the circuit (`lancementSousPart`); it passes the mark
@@ -1659,7 +1676,7 @@ function mesureDeLaPreuve(ctx, liste, fichiers, derniere = null) {
1659
1676
  commande: `npm test -- ${(entier ? [dossier] : ['--force', ...groupe]).join(' ')}`,
1660
1677
  attente: Boolean(pass.attente),
1661
1678
  raison: pass.raison ?? null,
1662
- resultats: langageDe(ctx.copie).verdict(pass.dossier).rapports,
1679
+ resultats: langageDe(ctx.copie).verdict(pass.dossier, ctx.copie).rapports,
1663
1680
  // The builds of the plan's packages that failed: each one a red, not compiling is failing.
1664
1681
  constructions: constructionsEchouees(ctx, liste, pass.dossier),
1665
1682
  });
@@ -1714,9 +1731,12 @@ export function preuveARepasser(ctx, runs) {
1714
1731
  }
1715
1732
 
1716
1733
  // The proof of the red, on every test of the lot: `{ ok, rouges, texte, resume }`, `texte` the
1717
- // report, written whole to its file beside the copy. The tests judged are those of the files the
1718
- // lot changes: a module of a single integration binary the lot does not change is main's, its
1719
- // greens left out and its reds existing reds. A
1734
+ // report, written whole to its file beside the copy. In a file the proof plays for the lot (not a
1735
+ // package played whole), the tests judged as the lot's are those of the files the lot changes and
1736
+ // those the testwriter's sheets name, whatever their module; the others are main's, as a module of
1737
+ // a single integration binary the lot does not change: their greens are left out and their failures
1738
+ // are existing reds. With test files of the lot played and a plan that expects a red, existing reds
1739
+ // alone do not pass the proof: it takes a red of the lot or a failed build. A
1720
1740
  // green test is a defect when the testwriter's sheets name it (`portent_le_travail`), read at
1721
1741
  // each proof, and accepted when they do not; a test's full name is read whatever the
1722
1742
  // separator between its group and its title, a blank, or « > » as Vitest prints it, or « › » as
@@ -1771,7 +1791,8 @@ export function preuve(ctx, { mesure: derniere = null, fichiers: duRouge = null
1771
1791
  // A plan « comportement tests-adaptés », or a testwriter session the supervisor asked
1772
1792
  // (`--depuis testwriter`, `ctx.testwriterDemande`): every green of the lot is expected.
1773
1793
  const inchange = ctx.sorte?.comportement === 'tests-adaptés' || Boolean(ctx.testwriterDemande);
1774
- // The files the lot changes: a result of the run under another file is main's.
1794
+ // The files the lot changes: of a result of the run under another file, only the tests the sheet
1795
+ // names are the lot's.
1775
1796
  const duLot = new Set(
1776
1797
  changements(ctx)
1777
1798
  .filter(c => !c.supprime)
@@ -1802,24 +1823,15 @@ export function preuve(ctx, { mesure: derniere = null, fichiers: duRouge = null
1802
1823
  }
1803
1824
  }
1804
1825
  }
1805
- // The files judged: those of the lot in the group, and, for a single integration binary that
1806
- // plays its modules (Rust `tests/it/main.rs`), each module file the run reports that the lot
1807
- // changes — the group names the binary, the results name the modules, so a module's reds are
1808
- // credited to the lot, and the aggregator is no false casse. A module the lot does not change
1809
- // is main's: its greens say nothing of the lot, and its reds are existing reds, as those of a
1810
- // package played whole (`entier`), which keeps its own branch above.
1811
- const modules = entier ? [] : resultats.map(r => path.relative(ctx.copie, r.fichier));
1812
- const fichiersDuGroupe = [...new Set([...groupe, ...modules.filter(f => duLot.has(f))])];
1813
- for (const res of entier ? [] : resultats) {
1814
- const f = path.relative(ctx.copie, res.fichier);
1815
- if (fichiersDuGroupe.includes(f)) {
1816
- continue;
1817
- }
1818
- for (const a of res.tests.filter(x => x.etat === 'failed')) {
1819
- rouges.push(`rouge existant : ${f} › ${a.nom} — ${premiereLigne(a.message)}`);
1820
- }
1821
- }
1822
- for (const f of fichiersDuGroupe) {
1826
+ // The files read: those of the group, and each file the run reports, as the modules of a
1827
+ // single integration binary (Rust `tests/it/main.rs`): the group names the binary, the results
1828
+ // name the modules. The tests judged as the lot's are those of the files the lot changes and
1829
+ // those the sheet names; the others are main's: their greens say nothing of the lot, and their
1830
+ // reds are existing reds, as those of a package played whole (`entier`), which keeps its own
1831
+ // branch above. A file of the group or of the lot that does not load proves nothing, so the
1832
+ // aggregator is no false casse.
1833
+ const rapportes = entier ? [] : resultats.map(r => path.relative(ctx.copie, r.fichier));
1834
+ for (const f of new Set([...groupe, ...rapportes])) {
1823
1835
  const res = resultats.find(t => t.fichier === path.join(ctx.copie, f));
1824
1836
  const tests = res?.tests ?? [];
1825
1837
  const deHead = vertsDuRegistre(registre, f);
@@ -1828,13 +1840,16 @@ export function preuve(ctx, { mesure: derniere = null, fichiers: duRouge = null
1828
1840
  res && tests.length === 0
1829
1841
  ? langage.moduleAbsent(res.message ?? '', path.join(ctx.copie, f))
1830
1842
  : null;
1831
- const casse = casseDeChargement({
1832
- res,
1833
- code,
1834
- constructions,
1835
- aDesResultats: resultats.length > 0,
1836
- absent: Boolean(importe) && !existsSync(importe),
1837
- });
1843
+ const casse =
1844
+ groupe.includes(f) || duLot.has(f)
1845
+ ? casseDeChargement({
1846
+ res,
1847
+ code,
1848
+ constructions,
1849
+ aDesResultats: resultats.length > 0,
1850
+ absent: Boolean(importe) && !existsSync(importe),
1851
+ })
1852
+ : null;
1838
1853
  if (casse === 'non-joue') {
1839
1854
  casses.push(
1840
1855
  `${f} — ne se charge pas : non joué (code ${code}) ; le journal du ticket : ${ctx.journal} (il se cite en pièce, \`${ctx.ticket}.log:<ligne>\`)`
@@ -1848,7 +1863,11 @@ export function preuve(ctx, { mesure: derniere = null, fichiers: duRouge = null
1848
1863
  rougesDuLot++;
1849
1864
  }
1850
1865
  for (const a of tests) {
1851
- if (a.etat === 'failed') {
1866
+ if (!duLot.has(f) && !nomme(f, a)) {
1867
+ if (a.etat === 'failed') {
1868
+ rouges.push(`rouge existant : ${f} › ${a.nom} — ${premiereLigne(a.message)}`);
1869
+ }
1870
+ } else if (a.etat === 'failed') {
1852
1871
  rouges.push(`${f} › ${a.nom} — ${premiereLigne(a.message)}`);
1853
1872
  rougesDuLot++;
1854
1873
  } else if (a.etat === 'passed' && deHead.has(a.nom)) {
@@ -1861,12 +1880,15 @@ export function preuve(ctx, { mesure: derniere = null, fichiers: duRouge = null
1861
1880
  }
1862
1881
  const section = (titre, l) =>
1863
1882
  l.length ? [`${titre} (${l.length}) :`, ...l.map(x => `- ${x}`), ''] : [];
1883
+ // With test files of the lot played, an existing red proves nothing of the ticket's work: the
1884
+ // proof needs a red of the lot or a failed build. A package played whole has existing reds alone.
1885
+ const rougesProbants = fichiers.length ? rougesDuLot + reportes.length : rouges.length;
1864
1886
  const ok = seuls
1865
1887
  ? casses.length === 0
1866
1888
  : preuveReussie(
1867
1889
  {
1868
1890
  fichiers: fichiers.length,
1869
- rouges: rouges.length,
1891
+ rouges: rougesProbants,
1870
1892
  casses: casses.length,
1871
1893
  nommes: nommes.length,
1872
1894
  nonNommes: nonNommes.length,
@@ -1891,6 +1913,9 @@ export function preuve(ctx, { mesure: derniere = null, fichiers: duRouge = null
1891
1913
  ? ['Aucun fichier de test du lot : le plan dit « tests-adaptés », rien à prouver.', '']
1892
1914
  : ['Aucun fichier de test du lot dans le plan : rien ne prouve le rouge.', '']),
1893
1915
  ...section('Rouges', rouges),
1916
+ ...(!ok && rouges.length && !rougesProbants
1917
+ ? ['Aucun rouge du lot ni construction rouge : ces rouges seuls ne prouvent rien.', '']
1918
+ : []),
1894
1919
  ...sections,
1895
1920
  ...(nommes.length
1896
1921
  ? [
@@ -2006,7 +2031,7 @@ function situer(ctx, liste, chemin) {
2006
2031
  }
2007
2032
 
2008
2033
  // Whether <chemin> is a test file of the module of the language of the copy (not the shared
2009
- // test material, which the lock lets the testwriter write anywhere).
2034
+ // test material, which the testwriter writes anywhere).
2010
2035
  function estUnFichierDeTest(ctx, chemin) {
2011
2036
  try {
2012
2037
  const classe = langageDe(ctx.copie).estUnTest(chemin, ctx.copie);
@@ -2063,7 +2088,7 @@ export function rougesDe(ctx, liste, c) {
2063
2088
  const langage = langageDe(ctx.copie);
2064
2089
  // The files of the lot the testwriter writes, read at the first failed test.
2065
2090
  let duLot = null;
2066
- for (const res of langage.verdict(c.dossier).rapports) {
2091
+ for (const res of langage.verdict(c.dossier, ctx.copie).rapports) {
2067
2092
  const f = path.relative(ctx.copie, res.fichier);
2068
2093
  const lieu = situer(ctx, liste, f);
2069
2094
  if (res.tests.length === 0 && res.etat === 'failed') {
@@ -28,7 +28,8 @@
28
28
  // that runs, the ticket's copy for a session of the circuit: those of the copy (DU_CODE_EN_COURS,
29
29
  // and the commands of the modules of language) and the tools of the repository
30
30
  // (OUTILS_DU_DEPOT). Each subcommand of the core is in one of the three lists, which a test
31
- // holds. The code that runs is the version installed when their paths are the same: it runs in
31
+ // holds; a name the package retired that an earlier published version still calls (RETIREES) runs
32
+ // by that version too. The code that runs is the version installed when their paths are the same: it runs in
32
33
  // place.
33
34
  import { spawnSync } from 'node:child_process';
34
35
  import {
@@ -53,8 +54,8 @@ const PAQUET_QUI_TOURNE = path.resolve(import.meta.dirname, '..');
53
54
 
54
55
  /**
55
56
  * The subcommands of the orchestration, which the published version runs: the circuit, the
56
- * supervisor, the night, the board and the status line, the hooks of Claude Code, the locks and
57
- * the rights of the sessions, the direct (its agent and its reviewer), the envelope and its
57
+ * supervisor, the night, the board and the status line, the hooks of Claude Code, the lock out of
58
+ * the envelope and the rights of the sessions, the direct (its agent and its reviewer), the envelope and its
58
59
  * launcher, the integration, the
59
60
  * results, the removal of a copy and the balance, even when the supervisor runs one by hand.
60
61
  */
@@ -63,7 +64,6 @@ export const REDIRIGEES = new Set([
63
64
  'attente-au-tour',
64
65
  'bilan',
65
66
  'circuit',
66
- 'commande',
67
67
  'consommation',
68
68
  'direct',
69
69
  'droits',
@@ -84,10 +84,17 @@ export const REDIRIGEES = new Set([
84
84
  'superviseur',
85
85
  'tableau',
86
86
  'ticket-du-sous-agent',
87
- 'verrou',
88
87
  'verrou-hors-enveloppe',
89
88
  ]);
90
89
 
90
+ /**
91
+ * The names the package no longer carries that the settings of a session opened by an earlier
92
+ * published version still declare as hooks (its locks, on this copy's command or the main tree's):
93
+ * the published version runs them, until the key names a version whose sessions declare none (a
94
+ * transition path of the charter, as Temporal's `patched`).
95
+ */
96
+ export const RETIREES = new Set(['commande', 'verrou']);
97
+
91
98
  /**
92
99
  * The subcommands that play the code of the copy: the tests, the verification, the guards, the
93
100
  * temporary folder, the git hooks and the merge driver, the affected components; the commands of
@@ -171,7 +178,8 @@ export function versionDeLOutil(racine = process.cwd()) {
171
178
  /**
172
179
  * Where the subcommand <nom> runs in the project at <racine>: `{ version, dossier, commande }`, the
173
180
  * version of the key and its command under <cache>, for a subcommand of the orchestration that the
174
- * package <paquet> (the one that runs) is not; null otherwise (see the header).
181
+ * package <paquet> (the one that runs) is not, or for a retired name (RETIREES); null otherwise
182
+ * (see the header).
175
183
  * @param {string} nom
176
184
  * @param {{ racine?: string, cache?: string, paquet?: string }} [options]
177
185
  * @returns {{ version: string, dossier: string, commande: string } | null}
@@ -180,7 +188,7 @@ export function aiguillage(
180
188
  nom,
181
189
  { racine = process.cwd(), cache = cacheDesOutils(), paquet = PAQUET_QUI_TOURNE } = {}
182
190
  ) {
183
- if (!REDIRIGEES.has(nom)) {
191
+ if (!REDIRIGEES.has(nom) && !RETIREES.has(nom)) {
184
192
  return null;
185
193
  }
186
194
  const version = versionDeLOutil(racine);
@@ -6,9 +6,9 @@
6
6
  // under LIBRE_MIN, 4 GB free (GRILLHOUSE_TEMPORAIRE_LIBRE names another floor, in bytes; the
7
7
  // base configuration of the tests sets 0, scripts/langages/typescript/vitest-config/
8
8
  // machine.setup.mjs), it waits for room instead of failing for lack of it. It says so, with
9
- // what holds the directory (its largest entries, by the blocks their files hold, the
10
- // temporary directory of a ticket naming its ticket), when it begins and every 30 s, under a
11
- // bound (GRILLHOUSE_ATTENTE_MACHINE_MS, ATTENTE_MACHINE_MS, 60 min), then « à repasser » (75).
9
+ // what holds the directory (its largest entries, by the blocks their files hold), when it
10
+ // begins and every 30 s, under a bound (GRILLHOUSE_ATTENTE_MACHINE_MS, ATTENTE_MACHINE_MS,
11
+ // 60 min), then « à repasser » (75).
12
12
  // - It then wants room on the disk of the copy it plays in (its root, `racine`), where cargo
13
13
  // writes its target directories: under LIBRE_MIN as well (GRILLHOUSE_COPIE_LIBRE names another
14
14
  // floor, in bytes; the base configuration of the tests sets 0), it waits the same way, under
@@ -27,7 +27,6 @@ import { tmpdir } from 'node:os';
27
27
  import path from 'node:path';
28
28
  import { A_REPASSER } from './codes-de-sortie.mjs';
29
29
  import { occupantsDesCopies } from './copies-finies.mjs';
30
- import { ticketDeLaBase } from './mesure/base-de-passe.mjs';
31
30
  import { paquets } from './paquets.mjs';
32
31
  import { duree } from './regles-des-places.mjs';
33
32
  import { attendreUnPeu } from './verrou-de-fichier.mjs';
@@ -172,10 +171,7 @@ function occupants(dossier) {
172
171
  .map(nom => ({ nom, octets: taille(path.join(dossier, nom)) }))
173
172
  .sort((a, b) => b.octets - a.octets)
174
173
  .slice(0, 5)
175
- .map(o => {
176
- const ticket = ticketDeLaBase(o.nom);
177
- return `${o.nom} (${ticket ? `le ticket ${ticket}, ` : ''}${go(o.octets)})`;
178
- })
174
+ .map(o => `${o.nom} (${go(o.octets)})`)
179
175
  .join(', ');
180
176
  }
181
177
 
@@ -268,11 +268,12 @@ export function garderLeTotal(dossier) {
268
268
  * The parts of the machine under <env>, as the board shows them (scripts/tableau.mjs): `budget`
269
269
  * (the cores and the memory the parts share, null when the reserve of the user is faulty, `faute`
270
270
  * then naming it), `prises`, each pass that holds a part (its repository `depot`, the root of its
271
- * main tree, and `projet`, its folder; its working tree `copie`; ticket, kind, `coeurs` and
272
- * `memoire` of its part, since when, what it consumes beyond its part `depasse`, and its progress
273
- * `avancement`: its files done and planned and its last sign, null while it names no progress
274
- * directory, or that directory does not read), and `attentes`, each live wait in the order of
275
- * its rank, with what it waits for (`raison`) (`lireLesParts` of scripts/places-de-la-machine.mjs).
271
+ * main tree, and `projet`, its folder; its working tree `copie`; ticket, kind, `coeurs`,
272
+ * `memoire` and `limite` of its part, since when, what it consumes beyond its part `depasse`,
273
+ * and its progress `avancement`: its files done and planned and its last sign, null while it
274
+ * names no progress directory, or that directory does not read), and `attentes`, each live wait
275
+ * in the order of its rank, with the part it asks for and what it waits for (`raison`)
276
+ * (`lireLesParts` of scripts/places-de-la-machine.mjs).
276
277
  * @param {Record<string, string | undefined>} [env]
277
278
  */
278
279
  export function lireLaMesure(env = process.env) {
@@ -284,21 +285,24 @@ export function lireLaMesure(env = process.env) {
284
285
  } catch (e) {
285
286
  faute = e.message;
286
287
  }
287
- const nom = ({ depot, copie, projet, ticket, sorte, depuis }) => ({
288
+ // What a pass holds or asks for; `limite`, where its group is cut (null, a session; absent from
289
+ // a part that names none).
290
+ const nom = ({ depot, copie, projet, ticket, sorte, depuis, coeurs, memoire, limite }) => ({
288
291
  depot,
289
292
  copie: copie ?? null,
290
293
  projet,
291
294
  ticket: ticket ?? null,
292
295
  sorte,
293
296
  depuis,
297
+ coeurs,
298
+ memoire,
299
+ limite,
294
300
  });
295
301
  return {
296
302
  budget,
297
303
  faute,
298
304
  prises: prises.map(p => ({
299
305
  ...nom(p),
300
- coeurs: p.coeurs,
301
- memoire: p.memoire,
302
306
  depasse: p.depasse ?? null,
303
307
  avancement: typeof p.dossier === 'string' ? lireAvancement(p.dossier) : null,
304
308
  })),
package/scripts/bilan.mjs CHANGED
@@ -79,7 +79,7 @@ import { lireLaConsommation } from './consommation-des-passes.mjs';
79
79
  import { lireLeJournal } from './journal-des-etats.mjs';
80
80
  import { pathToFileURL } from 'node:url';
81
81
  import {
82
- AGENTS_DU_LOT,
82
+ AUTEURS_DE_LOT,
83
83
  etapeDuCircuit,
84
84
  nomDuRole,
85
85
  QUESTIONNEUR,
@@ -87,6 +87,7 @@ import {
87
87
  roleDeLAgent,
88
88
  SUITE,
89
89
  SUPERVISEUR,
90
+ tousLesRolesDe,
90
91
  } from './etapes.mjs';
91
92
 
92
93
  // The role of a register line that a step of the circuit writes, and of its results.
@@ -157,7 +158,9 @@ function nuits([d, f], nuit) {
157
158
  return out;
158
159
  }
159
160
  // The roles of the circuit, by the steps they work at.
160
- const ROLES = new Set(SUITE.flatMap(e => e.qui));
161
+ const ROLES = new Set(SUITE.flatMap(tousLesRolesDe));
162
+ // The agents who write the code (3), in any circuit.
163
+ const AUTEURS_DU_CODE = tousLesRolesDe(SUITE.find(e => e.numero === '3'));
161
164
 
162
165
  // The results the circuit kept, `{ t, …entrée }`, in their order; an entry without a time counts
163
166
  // nothing.
@@ -364,7 +367,7 @@ export function bilan({
364
367
  }
365
368
  return null;
366
369
  };
367
- // Whether the circuit measured that the developer's session <s> changed no file of the plan.
370
+ // Whether the circuit measured that the session of the author of the code <s> changed no file of the plan.
368
371
  const inchangee = s =>
369
372
  duCircuit.some(
370
373
  e => e.etape === 'developpeur' && e.inchange && e.t >= s.f - JEU && e.t <= s.suivant + JEU
@@ -374,7 +377,7 @@ export function bilan({
374
377
  for (const s of segments.filter(x => x.role !== CIRCUIT)) {
375
378
  if (s.role === QUESTIONNEUR) {
376
379
  s.categorie = 'questionnement';
377
- } else if (s.role === 'developpeur') {
380
+ } else if (AUTEURS_DU_CODE.includes(s.role)) {
378
381
  s.categorie = inchangee(s) ? 'sansEffet' : 'travail';
379
382
  } else if (s.role === 'testwriter') {
380
383
  const p = preuves.find(x => x.d >= s.f - JEU);
@@ -383,8 +386,8 @@ export function bilan({
383
386
  s.categorie = 'travail';
384
387
  }
385
388
  }
386
- // A session that changed the lot: the testwriter's or the developpeur's, that delivered.
387
- const livre = s => AGENTS_DU_LOT.includes(s.role) && s.categorie === 'travail';
389
+ // A session that changed the lot: of an agent who writes it, that delivered.
390
+ const livre = s => AUTEURS_DE_LOT.includes(s.role) && s.categorie === 'travail';
388
391
  for (const s of etapes) {
389
392
  if (s.etape === 'preuve') {
390
393
  s.categorie = parLaPreuve(s) ?? 'automatique';
@@ -501,7 +504,7 @@ export function bilan({
501
504
  // The sessions <l> by role, in the order of the steps.
502
505
  const parRoleDe = l => {
503
506
  const out = {};
504
- for (const role of new Set(SUITE.flatMap(e => e.qui))) {
507
+ for (const role of ROLES) {
505
508
  const n = l.filter(x => x.role === role).length;
506
509
  if (n) {
507
510
  out[role] = n;
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  // The judged main guard (packages/grillhouse/docs/architecture/entree.md §3.1 « Garde de main »,
3
3
  // §3.3, §5.1): a push to origin of the branch main carries only a commit whose tree a
4
- // final pass of the circuit, or the verification of a lot of the direct way, judged green
4
+ // final pass of the circuit, or the verification of the rescue way, judged green
5
5
  // (scripts/arbres-juges.mjs), as bors and the merge queues enter only a tree already judged
6
6
  // (`refusSurMain`), in every project. Run by the pre-push hook of the frame with git's arguments
7
7
  // (remote name, remote URL) and, on the standard input, the lines
@@ -40,7 +40,7 @@ export function refusSurMain(remote, refs, { jugee, tete, ecarts }) {
40
40
  .filter(r => r.distante === 'refs/heads/main' && !SUPPRESSION.test(r.sha))
41
41
  .filter(r => !jugee(r.sha))
42
42
  .map(r => {
43
- const base = `⛔ ${r.sha.slice(0, 8)} n'est jugé vert par aucune passe finale ni vérification de lot : main n'avance que sur un arbre jugé. Joue \`npm run verifier\` sur ce commit (lot direct), ou laisse la file du circuit jouer sa passe finale.`;
43
+ const base = `⛔ ${r.sha.slice(0, 8)} n'est jugé vert par aucune passe finale ni vérification de lot : main n'avance que sur un arbre jugé. Joue \`npm run verifier\` sur ce commit (vérification de la voie de secours), ou laisse la file du circuit jouer sa passe finale.`;
44
44
  const fichiers = tete === r.sha && ecarts ? ecarts() : [];
45
45
  return fichiers.length
46
46
  ? `${base} Le dossier diffère du commit par : ${fichiers.join(', ')} (commite-les ou restaure-les).`