@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
@@ -33,6 +33,11 @@ import { BASE as GARDES_DE_LA_BASE, FICHIER as DETTE } from './dette.mjs';
33
33
  import { commandesPermises, optionsDuRole } from './droits.mjs';
34
34
  import { cheminsLus } from './composants-affectes.mjs';
35
35
  import { couvertPar } from './engendres.mjs';
36
+ import {
37
+ differencesDesReferences,
38
+ ligneDesReferences,
39
+ texteDesDifferences,
40
+ } from './references-changees.mjs';
36
41
  import { ecrireLaListe, VARIABLE as VARIABLE_ENVELOPPE } from './enveloppe/paquets-du-plan.mjs';
37
42
  import { etapeDuCircuit, EXPLORATEUR, SUITE } from './etapes.mjs';
38
43
  import { gardesDuCadre, nomsDesGardes } from './gardes-du-cadre.mjs';
@@ -47,6 +52,7 @@ import { avecLesOutils } from './outils-cles.mjs';
47
52
  import { avecLesDonnees } from './donnees-cles.mjs';
48
53
  import { consigneDesFlux } from './flux-des-paquets.mjs';
49
54
  import { avecLaPasse, lancementSousPart, passeLourde } from './passe-de-la-machine.mjs';
55
+ import { POUR_LES_GARDES, SCRIPTS_DE_GARDES } from './taches-du-graphe.mjs';
50
56
  import {
51
57
  A_INSCRIRE,
52
58
  bloquantsDeLaFiche,
@@ -240,7 +246,10 @@ export function texteDuVerdict(fiche) {
240
246
  // Gerrit has the next review read the difference between two patch sets, each against its own
241
247
  // base: the files of the lot that changed since, the command of the difference, the findings
242
248
  // still open with their recipients.
243
- export async function relire(ctx, { constats = [] } = {}) {
249
+ export async function relire(
250
+ ctx,
251
+ { constats = [], consigneDuRelecteur = valeurs => consigne(valeurs, 1) } = {}
252
+ ) {
244
253
  const { tests, code } = fichiersDuLot(ctx);
245
254
  const rapports = rapportsDuCircuit(ctx);
246
255
  const precedents = fichesDe(ctx, 'relecteur').length;
@@ -269,6 +278,15 @@ export async function relire(ctx, { constats = [] } = {}) {
269
278
  }
270
279
  const affirmations = path.join(ctx.tmp, 'affirmations.md');
271
280
  writeFileSync(affirmations, leTicket(ctx).description);
281
+ // The reference files the lot changes, measured on the tree between its base and the lot kept.
282
+ const differences = lot
283
+ ? differencesDesReferences({
284
+ copie: ctx.copie,
285
+ references: lesReferences(ctx),
286
+ base: lot.base,
287
+ lot: lot.commit,
288
+ })
289
+ : [];
272
290
  const liste = lot
273
291
  ? langageDe(ctx.copie).elementsDuLot(ctx.copie, { avant: 'HEAD', apres: lot.commit })
274
292
  : { etat: 'impossible', raison: 'le lot n’a pas pu être gardé', elements: [] };
@@ -302,12 +320,13 @@ export async function relire(ctx, { constats = [] } = {}) {
302
320
  precedente,
303
321
  affirmations,
304
322
  elements: texteDesElements(liste, bornee),
323
+ differences: texteDesDifferences(differences),
305
324
  flux: consigneDesFlux(ctx.racine, [...tests, ...code]),
306
325
  rapports: rapports.join('\n\n') || 'aucun',
307
326
  // The supervisor's context of a resumption, his answer to a question of the reviewer among them.
308
327
  contexte: contexteDe(ctx),
309
328
  };
310
- const fiche = await jusquALaFiche(ctx, 'relecteur', consigne(valeurs, 1), {
329
+ const fiche = await jusquALaFiche(ctx, 'relecteur', consigneDuRelecteur(valeurs), {
311
330
  signeDeVie: ctx.ports?.signeDeVie,
312
331
  id: idDeSeance(ctx, 'relecture'),
313
332
  evenement: 'relecture',
@@ -316,7 +335,9 @@ export async function relire(ctx, { constats = [] } = {}) {
316
335
  avec: lot ? { lot: { ...lot, fichiers: [...tests, ...code] } } : {},
317
336
  // Every review judges the findings still open, bounded or whole (`suiviDesConstats`).
318
337
  valider: f =>
319
- [conformiteDuLot(f, liste), suiviDesConstats(f, ouvertsALaRelecture)]
338
+ [
339
+ conformiteDuLot(f, { ...liste, references: differences.map(d => d.fichier) }),
340
+ suiviDesConstats(f, ouvertsALaRelecture)]
320
341
  .filter(Boolean)
321
342
  .join(' ; ') || null,
322
343
  });
@@ -354,7 +375,7 @@ export function relectureEntiere(constats) {
354
375
  // every one, and the lines of the review before by element), each marked to judge again, or to
355
376
  // take up with its line before; then the changed sources the language service does not read,
356
377
  // whose elements he surveys himself, one line of conformity each as `<fichier>#<nom>`, and why.
357
- function texteDesElements(liste, bornee = null) {
378
+ export function texteDesElements(liste, bornee = null) {
358
379
  if (liste.etat !== 'fait') {
359
380
  return `aucun : la liste n'a pas pu être calculée (${liste.raison}) ; tu relèves toi-même chaque élément du lot.`;
360
381
  }
@@ -386,7 +407,7 @@ function texteDesElements(liste, bornee = null) {
386
407
  // The last review of the ticket and the lot it read: its sheet's entry (`{ fiche, lot: { commit,
387
408
  // arbre, base, fichiers } }`), or null before any, without a copy, or when the lot or its base is
388
409
  // not kept (the repository no longer holds one of them).
389
- function relectureDAvant(ctx) {
410
+ export function relectureDAvant(ctx) {
390
411
  const e = lesFiches(ctx).findLast(x => x.role === 'relecteur');
391
412
  if (!e?.lot?.commit || !e.lot.base || !existsSync(ctx.copie)) {
392
413
  return null;
@@ -1044,8 +1065,7 @@ export function integrer(ctx) {
1044
1065
  // The integration is not played when the lot is already on main or the copy holds no file to
1045
1066
  // commit: one check, as a merge queue closes an entry already merged (Zuul). It is looked for
1046
1067
  // when the ticket is labelled `en-file` (the queue takes it off) or the copy holds no file of the
1047
- // lot (a copy that holds one still has a lot to commit — a second commit of a reopened ticket, for
1048
- // example).
1068
+ // lot (a copy that holds one still has a lot to commit).
1049
1069
  const sansLot = !(tests.length || code.length);
1050
1070
  if (enFile || sansLot) {
1051
1071
  // A lot already on main (`lotSurMain`, the one rule the integrator publishes): the ticket
@@ -1305,7 +1325,17 @@ function messageDeCommit(ctx) {
1305
1325
  });
1306
1326
  const type = TYPES_DE_COMMIT[ctx.type] ?? 'feat';
1307
1327
  const portee = noms.length ? `(${noms.join(',')})` : '';
1328
+ // The reference files the lot changes, measured on the tree of the lot (the copy against HEAD).
1329
+ const lot = garderLeLot(ctx, null);
1308
1330
  return messageDuLot({
1331
+ references: lot
1332
+ ? differencesDesReferences({
1333
+ copie: ctx.copie,
1334
+ references: lesReferences(ctx),
1335
+ base: lot.base,
1336
+ lot: lot.commit,
1337
+ })
1338
+ : [],
1309
1339
  entete: `${type}${portee}: ${ctx.sujet} (${ctx.ticket})`,
1310
1340
  description: leTicket(ctx).description,
1311
1341
  fiches: lesFiches(ctx)
@@ -1319,8 +1349,9 @@ function messageDeCommit(ctx) {
1319
1349
  // section of the criteria of the plan <description> (its heading begins with « Critères »), what
1320
1350
  // the lot changes; a paragraph per deviation the sheets <fiches> carry (`ecarts`), each subject
1321
1351
  // once, in the order it first appears, with the value of the last sheet that carries it (a
1322
- // subject known again whatever its case and spacing); then the trailer.
1323
- export function messageDuLot({ entete, description, fiches }) {
1352
+ // subject known again whatever its case and spacing); the line of the reference files the lot
1353
+ // changes (<references>, `ligneDesReferences`, none when it changes none); then the trailer.
1354
+ export function messageDuLot({ entete, description, fiches, references = [] }) {
1324
1355
  const criteres = [];
1325
1356
  let dedans = false;
1326
1357
  for (const ligne of String(description ?? '').split('\n')) {
@@ -1340,6 +1371,7 @@ export function messageDuLot({ entete, description, fiches }) {
1340
1371
  return [
1341
1372
  entete,
1342
1373
  criteres.join('\n').trim(),
1374
+ ligneDesReferences(references),
1343
1375
  ...[...ecarts.values()].map(e => `${e.sujet} : ${e.texte}`),
1344
1376
  'Co-Authored-By: Claude <noreply@anthropic.com>',
1345
1377
  ]
@@ -1379,6 +1411,50 @@ function changements(ctx) {
1379
1411
  // language (`estUnTest`, scripts/jointure.d.ts).
1380
1412
  const duTestwriter = (ctx, fichier) => langageDe(ctx.copie).estUnTest(fichier, ctx.copie) !== null;
1381
1413
 
1414
+ // The files of the lot the testwriter writes (test files and the shared test material), present
1415
+ // in the copy, from its root.
1416
+ const fichiersDuTestwriter = ctx =>
1417
+ changements(ctx)
1418
+ .filter(c => !c.supprime && duTestwriter(ctx, c.fichier))
1419
+ .map(c => c.fichier);
1420
+
1421
+ // The characters of a file name, and those of a path.
1422
+ const DE_NOM = new Set('abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-');
1423
+ const DE_CHEMIN = new Set([...DE_NOM, '.', '/']);
1424
+
1425
+ // The files of <candidats> (from the root of the copy) that <message>, the message of a failed
1426
+ // test of the file <fichier>, names: each written from the root, or from the directory <dossier>
1427
+ // of the package of <fichier>, as a guard written as a test lists what it finds (« tests/a.spec.ts:23:
1428
+ // ESSAIS »). The stack of the error is not read: a file it goes through is not named. <fichier>
1429
+ // itself is never one of them.
1430
+ function nommesParLeMessage(message, fichier, dossier, candidats) {
1431
+ const lignes = String(message ?? '').split('\n');
1432
+ // The first line of the stack: indented, « at … ».
1433
+ const pile = lignes.findIndex(l => l !== l.trimStart() && l.trimStart().startsWith('at '));
1434
+ const texte = (pile < 0 ? lignes : lignes.slice(0, pile)).join('\n');
1435
+ // Whether <texte> holds <chemin> as a whole path: no character of a path right before it, and
1436
+ // after it neither one of a longer name nor a further extension (« .ts:23 » and « .ts. » end it).
1437
+ const nomme = chemin => {
1438
+ for (let i = texte.indexOf(chemin); i >= 0; i = texte.indexOf(chemin, i + 1)) {
1439
+ const avant = texte[i - 1] ?? '\n';
1440
+ const apres = texte[i + chemin.length] ?? '\n';
1441
+ const suite = texte[i + chemin.length + 1] ?? '\n';
1442
+ if (
1443
+ !DE_CHEMIN.has(avant) &&
1444
+ !DE_NOM.has(apres) &&
1445
+ apres !== '/' &&
1446
+ !(apres === '.' && DE_NOM.has(suite))
1447
+ ) {
1448
+ return true;
1449
+ }
1450
+ }
1451
+ return false;
1452
+ };
1453
+ return candidats.filter(
1454
+ c => c !== fichier && (nomme(c) || (dossier ? nomme(path.posix.relative(dossier, c)) : false))
1455
+ );
1456
+ }
1457
+
1382
1458
  // The test files of the lot that the testwriter writes, present in the copy: in the packages of
1383
1459
  // the plan and in the shared test material. <langage> reads the class of a file: the strict join
1384
1460
  // by default, the join of the copy (`langageDeLaCopie`) for the launch of a session, which must
@@ -1422,8 +1498,8 @@ function paquetDe(liste, fichier) {
1422
1498
  // group of its own, its command launched by the circuit (`lancementSousPart`); it passes the mark
1423
1499
  // of its part to the `npm run verifier` it runs, which takes none of its own; its wait is written
1424
1500
  // to the log. A wait that stops (its bound, 75; a faulty key or reserve, 1) is the command's
1425
- // code, its message in the log; `attente`, a 75 that is a wait for a part or for room at its
1426
- // bound (the pass's own, or that of the `npm run verifier` it runs). Once it holds its part, the
1501
+ // code, its message in the log and in `raison`; `attente`, a 75 that is a wait for a part or for
1502
+ // room at its bound (the pass's own, or that of the `npm run verifier` it runs). Once it holds its part, the
1427
1503
  // pass plays under a progress directory of its own (`avancement`), of the kind `genreDeLaPasse`
1428
1504
  // names. It plays in the environment of a pass (`environnementDeLaPasse`).
1429
1505
  function npm(ctx, etape, args, env = {}, cwd = ctx.copie) {
@@ -1489,7 +1565,7 @@ function npm(ctx, etape, args, env = {}, cwd = ctx.copie) {
1489
1565
  throw e;
1490
1566
  }
1491
1567
  appendFileSync(ctx.journal, `${e.message}\n`);
1492
- return { code: e.code, dossier, attente: e.code === A_REPASSER };
1568
+ return { code: e.code, dossier, attente: e.code === A_REPASSER, raison: e.message };
1493
1569
  } finally {
1494
1570
  closeSync(fd);
1495
1571
  }
@@ -1530,7 +1606,10 @@ function journalDeTache(ctx, t) {
1530
1606
 
1531
1607
  // The measure of the proof of the red: one run per package, `npm test -- --force <files>` of the
1532
1608
  // lot that lie in it, or, with no file of the lot, `npm test -- <package>` for each package of the
1533
- // plan, played whole. Each run `{ groupe, entier, code, resultats, constructions }`. A measure of
1609
+ // plan, played whole. Each run `{ groupe, entier, code, resultats, constructions, commande,
1610
+ // attente, raison }`, the last three its command line, whether its 75 is a wait of the machine at
1611
+ // its bound, and the reason of that wait. A run at 75 (« à repasser ») ends the measure: the runs
1612
+ // after it would wait as it did. A measure of
1534
1613
  // the same files on the same tree (`cleDeLaMesure`) is not played again, as Turborepo replays a
1535
1614
  // task whose inputs and arguments did not move: the last one, <derniere>, its caller keeps.
1536
1615
  // `{ cle, runs }`. The tests main already holds green are read from the registry of results
@@ -1538,7 +1617,8 @@ function journalDeTache(ctx, t) {
1538
1617
  // the lot.
1539
1618
  function mesureDeLaPreuve(ctx, liste, fichiers, derniere = null) {
1540
1619
  const cle = cleDeLaMesure(ctx, fichiers);
1541
- if (derniere?.cle === cle) {
1620
+ // A measure with a run at 75 is no verdict: it is never read back, and plays again.
1621
+ if (derniere?.cle === cle && !derniere.runs.some(r => r.code === A_REPASSER)) {
1542
1622
  return derniere;
1543
1623
  }
1544
1624
  const entiers = fichiers.length ? [] : paquetsDuPlan(ctx, liste);
@@ -1561,10 +1641,16 @@ function mesureDeLaPreuve(ctx, liste, fichiers, derniere = null) {
1561
1641
  groupe,
1562
1642
  entier,
1563
1643
  code: pass.code,
1644
+ commande: `npm test -- ${(entier ? [dossier] : ['--force', ...groupe]).join(' ')}`,
1645
+ attente: Boolean(pass.attente),
1646
+ raison: pass.raison ?? null,
1564
1647
  resultats: langageDe(ctx.copie).verdict(pass.dossier).rapports,
1565
1648
  // The builds of the plan's packages that failed: each one a red, not compiling is failing.
1566
1649
  constructions: constructionsEchouees(ctx, liste, pass.dossier),
1567
1650
  });
1651
+ if (pass.code === A_REPASSER) {
1652
+ break;
1653
+ }
1568
1654
  }
1569
1655
  return { cle, runs };
1570
1656
  }
@@ -1582,13 +1668,46 @@ const sansSeparateur = nom =>
1582
1668
  export const portentLeTravail = fiches =>
1583
1669
  fiches.filter(f => Array.isArray(f.portent_le_travail)).at(-1)?.portent_le_travail ?? [];
1584
1670
 
1671
+ // The proof of the measure <runs> when one of them is at 75 (« à repasser »: the part of the
1672
+ // machine awaited to its bound, a pass cut), null otherwise. Such a measure proved nothing, neither
1673
+ // a red nor a file that does not load: the proof is `aRepasser`, as a check at 75 is
1674
+ // (`controles`), `attente` when every such run is a wait of the machine, its report naming each
1675
+ // command, its code and its reason; it counts nothing and keeps no measure (`mesure` null: neither
1676
+ // written nor read back), which the next proof plays.
1677
+ export function preuveARepasser(ctx, runs) {
1678
+ const aRepasser = runs.filter(r => r.code === A_REPASSER);
1679
+ if (!aRepasser.length) {
1680
+ return null;
1681
+ }
1682
+ const resume = `à repasser : ${aRepasser
1683
+ .map(r => `${r.commande} (code ${r.code})${r.raison ? ` : ${r.raison}` : ''}`)
1684
+ .join(' ; ')}`;
1685
+ return {
1686
+ ok: false,
1687
+ aRepasser: true,
1688
+ attente: aRepasser.every(r => r.attente),
1689
+ rouges: 0,
1690
+ resume,
1691
+ texte: [
1692
+ `${SUITE.find(e => e.etat === PREUVE).titre} : ${resume}`,
1693
+ '',
1694
+ 'La passe n’a rien prouvé : aucun test du lot n’est jugé, aucun fichier n’est compté.',
1695
+ `Le journal du ticket, pour le détail de la passe : ${ctx.journal} (il se cite en pièce, \`${ctx.ticket}.log:<ligne>\`)`,
1696
+ ].join('\n'),
1697
+ mesure: null,
1698
+ };
1699
+ }
1700
+
1585
1701
  // The proof of the red, on every test of the lot: `{ ok, rouges, texte, resume }`, `texte` the
1586
- // report, written whole to its file beside the copy. A
1702
+ // report, written whole to its file beside the copy. The tests judged are those of the files the
1703
+ // lot changes: a module of a single integration binary the lot does not change is main's, its
1704
+ // greens left out and its reds existing reds. A
1587
1705
  // green test is a defect when the testwriter's sheets name it (`portent_le_travail`), read at
1588
1706
  // each proof, and accepted when they do not; a test's full name is read whatever the
1589
1707
  // separator between its group and its title, a blank, or « > » as Vitest prints it, or « › » as
1590
1708
  // Jest and the report of the proof print it (`sansSeparateur`); the measure plays again only when
1591
1709
  // the copy changed (`mesureDeLaPreuve`).
1710
+ // A measure with a run at 75 proved nothing: the proof is « à repasser » (`preuveARepasser`).
1592
1711
  export function preuve(ctx, { mesure: derniere = null, fichiers: duRouge = null } = {}) {
1593
1712
  // Only the files of the day are proved; the ones only the night plays are put aside, named.
1594
1713
  // Resumed at a red (<duRouge>, the files it names), the proof plays the tests among them alone
@@ -1626,6 +1745,10 @@ export function preuve(ctx, { mesure: derniere = null, fichiers: duRouge = null
1626
1745
  ? mesureDeLaPreuve(ctx, liste, fichiers, derniere)
1627
1746
  : null;
1628
1747
  const mesure = mesuree?.runs ?? [];
1748
+ const aRepasser = preuveARepasser(ctx, mesure);
1749
+ if (aRepasser) {
1750
+ return aRepasser;
1751
+ }
1629
1752
  // The tests main already holds green, read from the registry of results of the copy's branch, or
1630
1753
  // main's (scripts/registre-des-resultats.mjs): a test of the lot the registry holds existed, its
1631
1754
  // green accepted; one absent is new.
@@ -1633,6 +1756,12 @@ export function preuve(ctx, { mesure: derniere = null, fichiers: duRouge = null
1633
1756
  // A plan « comportement tests-adaptés », or a testwriter session the supervisor asked
1634
1757
  // (`--depuis testwriter`, `ctx.testwriterDemande`): every green of the lot is expected.
1635
1758
  const inchange = ctx.sorte?.comportement === 'tests-adaptés' || Boolean(ctx.testwriterDemande);
1759
+ // The files the lot changes: a result of the run under another file is main's.
1760
+ const duLot = new Set(
1761
+ changements(ctx)
1762
+ .filter(c => !c.supprime)
1763
+ .map(c => c.fichier)
1764
+ );
1636
1765
  // The developpeur already ran after the last testwriter: the code is there, no test can turn red.
1637
1766
  const codePresent = codeDejaPresent(ctx);
1638
1767
  for (const { groupe, entier, code, resultats, constructions } of mesure) {
@@ -1659,12 +1788,22 @@ export function preuve(ctx, { mesure: derniere = null, fichiers: duRouge = null
1659
1788
  }
1660
1789
  }
1661
1790
  // The files judged: those of the lot in the group, and, for a single integration binary that
1662
- // plays its modules (Rust `tests/it/main.rs`), each module file the run reports — the group names
1663
- // the binary, the results name the modules, so a module's reds are credited to the lot, and the
1664
- // aggregator is no false casse. A package played whole (`entier`) keeps its own branch above.
1665
- const fichiersDuGroupe = entier
1666
- ? groupe
1667
- : [...new Set([...groupe, ...resultats.map(r => path.relative(ctx.copie, r.fichier))])];
1791
+ // plays its modules (Rust `tests/it/main.rs`), each module file the run reports that the lot
1792
+ // changes — the group names the binary, the results name the modules, so a module's reds are
1793
+ // credited to the lot, and the aggregator is no false casse. A module the lot does not change
1794
+ // is main's: its greens say nothing of the lot, and its reds are existing reds, as those of a
1795
+ // package played whole (`entier`), which keeps its own branch above.
1796
+ const modules = entier ? [] : resultats.map(r => path.relative(ctx.copie, r.fichier));
1797
+ const fichiersDuGroupe = [...new Set([...groupe, ...modules.filter(f => duLot.has(f))])];
1798
+ for (const res of entier ? [] : resultats) {
1799
+ const f = path.relative(ctx.copie, res.fichier);
1800
+ if (fichiersDuGroupe.includes(f)) {
1801
+ continue;
1802
+ }
1803
+ for (const a of res.tests.filter(x => x.etat === 'failed')) {
1804
+ rouges.push(`rouge existant : ${f} › ${a.nom} — ${premiereLigne(a.message)}`);
1805
+ }
1806
+ }
1668
1807
  for (const f of fichiersDuGroupe) {
1669
1808
  const res = resultats.find(t => t.fichier === path.join(ctx.copie, f));
1670
1809
  const tests = res?.tests ?? [];
@@ -1834,9 +1973,12 @@ const STYLE = new Set(['lint', 'format:check']);
1834
1973
  // names « . », which holds the whole copy.
1835
1974
  // A path of a component the plan set apart from the survey (`ctx.ecartes`) counts as the plan's:
1836
1975
  // `ecarte`, its directory, says so, and the circuit extends the plan to it.
1976
+ // A test file of a reader package the plan extended to its tests (`ctx.testsEtendus`, their
1977
+ // directories) counts as the plan's.
1837
1978
  function situer(ctx, liste, chemin) {
1838
- const dedans = chemin ? dansLePlan(ctx, chemin) : nommeLaRacine(ctx);
1839
1979
  const p = chemin ? liste.find(x => chemin.startsWith(`${x.dossier}/`)) : null;
1980
+ const etendu = Boolean(chemin) && dansLesTestsEtendus(ctx, chemin);
1981
+ const dedans = chemin ? dansLePlan(ctx, chemin) || etendu : nommeLaRacine(ctx);
1840
1982
  const paquet = p ? p.pkg.name : null;
1841
1983
  const ecarte = !dedans && p && dansLesEcartes(ctx, chemin) ? p.dossier : null;
1842
1984
  return {
@@ -1844,9 +1986,32 @@ function situer(ctx, liste, chemin) {
1844
1986
  paquet,
1845
1987
  horsTitre: dedans || ecarte !== null ? null : paquet,
1846
1988
  ecarte,
1989
+ // The package out of the plan that holds the path, and whether the path is a test file: the
1990
+ // reds of one package that all lie in test files extend the plan to its tests.
1991
+ lecteur: !dedans && p ? p.dossier : null,
1992
+ test: Boolean(chemin) && estUnFichierDeTest(ctx, chemin),
1847
1993
  };
1848
1994
  }
1849
1995
 
1996
+ // Whether <chemin> is a test file of the module of the language of the copy (not the shared
1997
+ // test material, which the lock lets the testwriter write anywhere).
1998
+ function estUnFichierDeTest(ctx, chemin) {
1999
+ try {
2000
+ const classe = langageDe(ctx.copie).estUnTest(chemin, ctx.copie);
2001
+ return Boolean(classe?.test) && !classe.matiere;
2002
+ } catch {
2003
+ return false;
2004
+ }
2005
+ }
2006
+
2007
+ // Whether <chemin> is a test file of a package the plan extended to its tests.
2008
+ function dansLesTestsEtendus(ctx, chemin) {
2009
+ return (
2010
+ (ctx.testsEtendus ?? []).some(d => chemin.startsWith(`${d}/`)) &&
2011
+ estUnFichierDeTest(ctx, chemin)
2012
+ );
2013
+ }
2014
+
1850
2015
  // Whether a directory of the components the plan set apart (`ctx.ecartes`) holds <chemin>.
1851
2016
  function dansLesEcartes(ctx, chemin) {
1852
2017
  return (ctx.ecartes ?? []).some(c => chemin === c || chemin.startsWith(`${c}/`));
@@ -1855,13 +2020,14 @@ function dansLesEcartes(ctx, chemin) {
1855
2020
  // The reds of the check <c> (`{ args, env, code, dossier }`), read in its results: each failed
1856
2021
  // test of the reports of Vitest, each finding of the guards' SARIF, each failed build, and each
1857
2022
  // failed task none of those situates; a red check with none of them is one red of the command.
1858
- // Each red `{ texte, fichier, gardes, detail, dansLePlan, paquet, horsTitre, arbitrer, joue }`: the
2023
+ // Each red `{ texte, fichier, gardes, nommes, detail, dansLePlan, paquet, horsTitre, arbitrer, joue }`: the
1859
2024
  // line that names it (test or finding, file, message), its file (null for a red of a task), the
1860
- // names its finding carries (its guard and its rule), the beginning of its task's log for a build,
2025
+ // names its finding carries (its guard and its rule), the files of the lot the testwriter writes
2026
+ // that the message of a failed test names (`nommesParLeMessage`), the beginning of its task's log for a build,
1861
2027
  // whether a path of the plan holds it (none for a red without a file), the package that holds it
1862
2028
  // and that package again when it is out of the plan, whether it is a finding to settle
1863
2029
  // (`a-arbitrer`), and the package whose task gave it, as Turborepo names it (« // » for the
1864
- // root's guards; null for a red of the command).
2030
+ // root's guards; null for a red of the command, which carries `sansResultat`).
1865
2031
  // As SARIF 2.1.0 and GitHub code scanning, a finding of level error fails, a warning or a note
1866
2032
  // shows without failing: `{ rouges, avertissements }`, `avertissements` the lines of the findings
1867
2033
  // of another level, which the report lists apart. A guards' task red without a finding of level
@@ -1883,6 +2049,8 @@ export function rougesDe(ctx, liste, c) {
1883
2049
  const out = [];
1884
2050
  const testes = new Set();
1885
2051
  const langage = langageDe(ctx.copie);
2052
+ // The files of the lot the testwriter writes, read at the first failed test.
2053
+ let duLot = null;
1886
2054
  for (const res of langage.verdict(c.dossier).rapports) {
1887
2055
  const f = path.relative(ctx.copie, res.fichier);
1888
2056
  const lieu = situer(ctx, liste, f);
@@ -1896,9 +2064,24 @@ export function rougesDe(ctx, liste, c) {
1896
2064
  testes.add(paquetDe(liste, f));
1897
2065
  }
1898
2066
  for (const a of res.tests.filter(x => x.etat === 'failed')) {
2067
+ duLot ??= fichiersDuTestwriter(ctx);
2068
+ // The files of the lot the message of a test out of the lot names (a guard written as a
2069
+ // test), which the first line of the red may not show. The message of a test of the lot is
2070
+ // not read: its red is the developpeur's, whatever it names.
2071
+ const nommes = duLot.includes(f)
2072
+ ? []
2073
+ : nommesParLeMessage(
2074
+ a.message,
2075
+ f,
2076
+ liste.find(x => f.startsWith(`${x.dossier}/`))?.dossier ?? null,
2077
+ duLot
2078
+ );
2079
+ const premiere = premiereLigne(a.message);
2080
+ const tus = nommes.filter(n => !premiere.includes(n));
1899
2081
  out.push({
1900
- texte: `test ${f} › ${a.nom} — ${premiereLigne(a.message)}`,
2082
+ texte: `test ${f} › ${a.nom} — ${premiere}${tus.length ? ` (il nomme ${tus.join(', ')})` : ''}`,
1901
2083
  fichier: f,
2084
+ nommes,
1902
2085
  ...lieu,
1903
2086
  joue: lieu.paquet,
1904
2087
  });
@@ -1963,11 +2146,25 @@ export function rougesDe(ctx, liste, c) {
1963
2146
  out.push({
1964
2147
  texte: `${ligneDeCommande(c)} rouge (code ${c.code}), sans résultat qui situe son rouge — le journal du ticket : ${ctx.journal} (il se cite en pièce, \`${ctx.ticket}.log:<ligne>\`)`,
1965
2148
  ...situer(ctx, liste, null),
2149
+ sansResultat: true,
1966
2150
  });
1967
2151
  }
1968
2152
  return { rouges: out, avertissements };
1969
2153
  }
1970
2154
 
2155
+ // The lines of the reds of a red pass `npm run verifier` played out of a circuit, in the copy
2156
+ // <copie>, its results under <dossier>: the reading of the checks (`rougesDe`) on the whole copy,
2157
+ // each red its line (test, file, message; finding; failed task), a failed build with the beginning
2158
+ // of its log. A pass whose results situate no red gives none: its caller holds its output (the
2159
+ // queue's final pass, scripts/integration/file.mjs).
2160
+ export function rougesDUnePasse({ copie, dossier, code, ticket, journal }) {
2161
+ const ctx = { copie, paquets: ['.'], ecartes: [], ticket, journal };
2162
+ const liste = composantsDe(copie).filter(p => !p.hors);
2163
+ return rougesDe(ctx, liste, { args: ['run', 'verifier'], code, dossier })
2164
+ .rouges.filter(r => !r.sansResultat)
2165
+ .map(r => (r.detail ? `${r.texte}\n\n${r.detail}` : r.texte));
2166
+ }
2167
+
1971
2168
  const ligneDeCommande = c =>
1972
2169
  `${Object.entries(c.env ?? {})
1973
2170
  .map(([k, v]) => `${k}=${v} `)
@@ -1988,8 +2185,9 @@ const ligneDeCommande = c =>
1988
2185
  // report of the checks (empty without one); `auDeveloppeur` whether a red lies
1989
2186
  // in a package of the plan; `horsTitre` the packages out of the plan that hold a red; `arbitrer`
1990
2187
  // when every red of the plan is a finding to settle; `lieux` the place of each red, `{ fichier,
1991
- // gardes, dansLePlan }`, its file (null for a red without one), the names its finding carries
1992
- // (none for a test or a task), and whether a path of the plan holds it; `references`, out of the final pass, the references whose reds the checks saw,
2188
+ // gardes, dansLePlan, nommes }`, its file (null for a red without one), the names its finding carries
2189
+ // (none for a test or a task), whether a path of the plan holds it, and, when there are some, the
2190
+ // files of the lot the testwriter writes that the message of its failed test names; `references`, out of the final pass, the references whose reds the checks saw,
1993
2191
  // which their regeneration lifts before the checks judge the lot again, or before the final pass; `tous` every red as it was read; `notes`,
1994
2192
  // at the final pass, each key of the debt a guard wrote inscribed above what it finds, `{ garde,
1995
2193
  // fichier, regle, trouve }`.
@@ -2037,7 +2235,7 @@ export function controles(ctx, finale, restreinte = null, reportes = null, fichi
2037
2235
  // A red two commands both play (a package of the plan and a component set apart that share a
2038
2236
  // task) is one red.
2039
2237
  const vusDesCommandes = new Set();
2040
- const tous = [
2238
+ const lus = [
2041
2239
  ...resultats
2042
2240
  .flatMap(r => r.rouges)
2043
2241
  .filter(r => {
@@ -2048,6 +2246,20 @@ export function controles(ctx, finale, restreinte = null, reportes = null, fichi
2048
2246
  r => !reportes.rejouee || (Boolean(r.joue) && !joues.has(r.joue))
2049
2247
  ),
2050
2248
  ];
2249
+ // A reader package out of the plan (set apart from the survey, or out of the title) whose every
2250
+ // red lies in a test file (not yet extended to its tests): the plan extends to those test files
2251
+ // alone, and its reds go on as the plan's. One red in its code, or in a task of the package (a
2252
+ // build, a typing), keeps the package out of the plan: the circuit does not guess the repair.
2253
+ const testsLecteurs = [
2254
+ ...new Set(lus.filter(r => r.lecteur && r.test).map(r => r.lecteur)),
2255
+ ]
2256
+ .filter(d => lus.filter(r => r.lecteur === d).every(r => r.test))
2257
+ .sort();
2258
+ const tous = lus.map(r =>
2259
+ r.lecteur && testsLecteurs.includes(r.lecteur)
2260
+ ? { ...r, dansLePlan: true, horsTitre: null, ecarte: null }
2261
+ : r
2262
+ );
2051
2263
  // Out of the final pass, the reds of the plan are the developpeur's; a red of a reference goes to
2052
2264
  // its regeneration (4.2), before any red goes to him; the others (the root, a red no file situates, a
2053
2265
  // package out of the plan) wait for the final pass.
@@ -2055,6 +2267,7 @@ export function controles(ctx, finale, restreinte = null, reportes = null, fichi
2055
2267
  fichier: r.fichier ?? null,
2056
2268
  gardes: r.gardes ?? [],
2057
2269
  dansLePlan: Boolean(r.dansLePlan),
2270
+ ...(r.nommes?.length ? { nommes: r.nommes } : {}),
2058
2271
  });
2059
2272
  const deReference = r => referencesDesRouges(ctx, [lieu(r)]).length > 0;
2060
2273
  const siens = r => finale || (r.dansLePlan && !deReference(r));
@@ -2146,6 +2359,9 @@ export function controles(ctx, finale, restreinte = null, reportes = null, fichi
2146
2359
  horsTitre: [...new Set(rouges.map(r => r.horsTitre).filter(Boolean))].sort(),
2147
2360
  // The directories of the components the plan set apart that hold a red: the plan extends to them.
2148
2361
  ecartesRouges: [...new Set(rouges.map(r => r.ecarte).filter(Boolean))].sort(),
2362
+ // The directories of the reader packages whose reds all lie in test files: the plan extends to
2363
+ // those tests, and not to the packages.
2364
+ testsLecteurs,
2149
2365
  lieux: rouges.map(lieu),
2150
2366
  references,
2151
2367
  tous,
@@ -2163,6 +2379,10 @@ export function controles(ctx, finale, restreinte = null, reportes = null, fichi
2163
2379
  };
2164
2380
  }
2165
2381
 
2382
+ // The command of npm that builds what the guard tasks of the root wait for in the graph, by the
2383
+ // command `construire --gardes` of the module of the language (scripts/taches-du-graphe.mjs).
2384
+ const CONSTRUCTION_DES_GARDES = ['exec', '--no', '--', 'grillhouse', 'construire', POUR_LES_GARDES];
2385
+
2166
2386
  // The test files <fichiers> of the lot that the checks name to `npm test`: all but the ones out of
2167
2387
  // every package of the language (`horsDesPaquets` of `separerLesFichiersDuJour`: the tests of the
2168
2388
  // frame's plugin), which `npm test` refuses and the guards play (`claude plugin test`).
@@ -2174,7 +2394,11 @@ export function testsNommesAuxControles(ctx, fichiers) {
2174
2394
  // The checks of the plan, out of the final pass: `npm test -- <package>` for each package of the
2175
2395
  // plan and each the lot touches in it, `npm test -- <test files of the lot>` that none of them
2176
2396
  // holds (the shared test material's out of the plan), each test played once, then the guards in
2177
- // the envelope of the plan, whose findings on its files alone count.
2397
+ // the envelope of the plan, whose findings on its files alone count. A guard reads what the builds
2398
+ // write (the `dist/` of every package, one out of the plan included), and its task of the graph
2399
+ // waits for them, as the deps of a Bazel target: before the guards, out of the envelope, the build
2400
+ // of what the guard tasks wait for (CONSTRUCTION_DES_GARDES), which the tests of the plan do not
2401
+ // build (BPScript 320.14.2.8.1: `npm run gardes` red on the `dist/` of six packages out of the plan).
2178
2402
  export function commandesDuPlan(ctx, liste, seuls = null) {
2179
2403
  const lot = changements(ctx);
2180
2404
  const touches = liste.length
@@ -2204,13 +2428,13 @@ export function commandesDuPlan(ctx, liste, seuls = null) {
2204
2428
  .sort();
2205
2429
  const scripts = lireJson(path.join(ctx.copie, 'package.json'))?.scripts ?? {};
2206
2430
  const enveloppe = { [VARIABLE_ENVELOPPE]: ecrireLaListe(ctx.paquets) };
2431
+ const gardes = SCRIPTS_DE_GARDES.filter(s => s in scripts);
2207
2432
  return [
2208
2433
  ...(tests.length ? [{ args: ['test', '--', ...tests] }] : []),
2209
2434
  ...entiers.map(d => ({ args: d === '.' ? ['test'] : ['test', '--', d] })),
2210
2435
  ...jouesDesEcartes.map(d => ({ args: ['test', '--', d] })),
2211
- ...['grillhouse:gardes', 'gardes']
2212
- .filter(s => s in scripts)
2213
- .map(s => ({ args: ['run', s], env: enveloppe })),
2436
+ ...(gardes.length ? [{ args: CONSTRUCTION_DES_GARDES }] : []),
2437
+ ...gardes.map(s => ({ args: ['run', s], env: enveloppe })),
2214
2438
  ];
2215
2439
  }
2216
2440
 
@@ -2326,17 +2550,22 @@ export function empreinteDeLEtape(ctx, etape) {
2326
2550
  // The test files and the files of code a red lies in (<lieux>, the places of the red as the
2327
2551
  // checks name them) that the testwriter and the developpeur carry (scripts/reprise.mjs
2328
2552
  // `attribuerLeRouge`): `{ tests, code }`. The testwriter carries the test files of the lot; the
2329
- // developpeur, every other file of a path of the plan.
2553
+ // developpeur, every other file of a path of the plan. A file the message of a failed test names
2554
+ // (`nommes` of its place) is one the red lies in, as the file that fails.
2330
2555
  export function portesDuRouge(ctx, lieux) {
2331
- const dulot = new Set(
2332
- changements(ctx)
2333
- .filter(c => !c.supprime && duTestwriter(ctx, c.fichier))
2334
- .map(c => c.fichier)
2335
- );
2336
- const nommes = [...new Set((lieux ?? []).map(l => l.fichier).filter(Boolean))];
2556
+ const dulot = new Set(fichiersDuTestwriter(ctx));
2557
+ const nommes = [
2558
+ ...new Set((lieux ?? []).flatMap(l => [l.fichier, ...(l.nommes ?? [])]).filter(Boolean)),
2559
+ ];
2560
+ // The test files of the readers the plan extended to their tests are the testwriter's too: he
2561
+ // alone writes them (`lecteurs`).
2562
+ const lecteurs = nommes.filter(f => !dulot.has(f) && dansLesTestsEtendus(ctx, f));
2337
2563
  return {
2338
- tests: nommes.filter(f => dulot.has(f)),
2339
- code: nommes.filter(f => !dulot.has(f) && (dansLePlan(ctx, f) || dansLesEcartes(ctx, f))),
2564
+ tests: nommes.filter(f => dulot.has(f) || lecteurs.includes(f)),
2565
+ code: nommes.filter(
2566
+ f => !dulot.has(f) && !lecteurs.includes(f) && (dansLePlan(ctx, f) || dansLesEcartes(ctx, f))
2567
+ ),
2568
+ ...(lecteurs.length ? { lecteurs } : {}),
2340
2569
  };
2341
2570
  }
2342
2571
 
@@ -54,7 +54,8 @@ const PAQUET_QUI_TOURNE = path.resolve(import.meta.dirname, '..');
54
54
  /**
55
55
  * The subcommands of the orchestration, which the published version runs: the circuit, the
56
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 envelope and its launcher, the integration, the
57
+ * the rights of the sessions, the direct (its agent and its reviewer), the envelope and its
58
+ * launcher, the integration, the
58
59
  * results, the removal of a copy and the balance, even when the supervisor runs one by hand.
59
60
  */
60
61
  export const REDIRIGEES = new Set([
@@ -64,6 +65,7 @@ export const REDIRIGEES = new Set([
64
65
  'circuit',
65
66
  'commande',
66
67
  'consommation',
68
+ 'direct',
67
69
  'droits',
68
70
  'enveloppe',
69
71
  'integrer',
@@ -83,6 +85,7 @@ export const REDIRIGEES = new Set([
83
85
  'tableau',
84
86
  'ticket-du-sous-agent',
85
87
  'verrou',
88
+ 'verrou-hors-enveloppe',
86
89
  ]);
87
90
 
88
91
  /**