@roomi-fields/grillhouse 0.46.0 → 0.47.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 (66) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/CHANGELOG.md +20 -0
  3. package/cadre/templates/c/package.json +19 -0
  4. package/cadre/templates/projet/.github/workflows/ci.yml +34 -49
  5. package/cadre/templates/projet/CLAUDE.md +6 -0
  6. package/cadre/templates/projet/docs/agents/issue-tracker.md +1 -1
  7. package/charte.md +17 -9
  8. package/dist/temporal/circuit/client.d.ts +14 -5
  9. package/dist/temporal/circuit/client.js +39 -9
  10. package/dist/temporal/circuit/client.js.map +1 -1
  11. package/dist/temporal/file/activites.d.ts +2 -0
  12. package/dist/temporal/file/activites.js +7 -0
  13. package/dist/temporal/file/activites.js.map +1 -1
  14. package/dist/temporal/file/contrat.d.ts +26 -18
  15. package/dist/temporal/file/contrat.js +8 -5
  16. package/dist/temporal/file/contrat.js.map +1 -1
  17. package/dist/temporal/file/deroule.d.ts +1 -1
  18. package/dist/temporal/file/deroule.js +91 -42
  19. package/dist/temporal/file/deroule.js.map +1 -1
  20. package/dist/temporal/tickets/activites.js +4 -13
  21. package/dist/temporal/tickets/activites.js.map +1 -1
  22. package/docs/ARCHITECTURE.md +117 -82
  23. package/docs/INTERFACE.md +36 -19
  24. package/hooks/register.tsx +1 -1
  25. package/package.json +1 -1
  26. package/scripts/activites.mjs +5 -11
  27. package/scripts/arbres-juges.mjs +59 -0
  28. package/scripts/avancement.mjs +2 -38
  29. package/scripts/branche-de-nuit.mjs +14 -45
  30. package/scripts/ci-de-main.mjs +276 -0
  31. package/scripts/circuit.mjs +2 -1
  32. package/scripts/commandes-composees.mjs +36 -6
  33. package/scripts/dernier-vert.mjs +12 -8
  34. package/scripts/etapes.mjs +1 -1
  35. package/scripts/faits-du-circuit.mjs +41 -25
  36. package/scripts/integration/file.mjs +126 -587
  37. package/scripts/integration/integrer.mjs +6 -5
  38. package/scripts/langages/c/binaires.json +4 -0
  39. package/scripts/langages/c/binaires.mjs +83 -0
  40. package/scripts/langages/c/clang-format.mjs +62 -0
  41. package/scripts/langages/c/clang-tidy.mjs +93 -0
  42. package/scripts/langages/c/clang.mjs +42 -0
  43. package/scripts/langages/c/commandes.mjs +530 -0
  44. package/scripts/langages/c/composants.mjs +209 -0
  45. package/scripts/langages/c/exemples.mjs +250 -0
  46. package/scripts/langages/c/index-interfaces.mjs +77 -0
  47. package/scripts/langages/c/index.mjs +120 -0
  48. package/scripts/langages/c/lot.mjs +41 -0
  49. package/scripts/langages/c/mise-a-jour.mjs +70 -0
  50. package/scripts/langages/c/squelette.mjs +61 -0
  51. package/scripts/langages/c/verdict.mjs +99 -0
  52. package/scripts/langages/typescript/turbo-des-paquets.mjs +16 -5
  53. package/scripts/langages-des-paquets.mjs +30 -2
  54. package/scripts/langages.mjs +1 -0
  55. package/scripts/mesure/avancement.mjs +1 -1
  56. package/scripts/migrations/0.47.0-ci-de-main.mjs +48 -0
  57. package/scripts/migrations.mjs +2 -2
  58. package/scripts/session-start.sh +0 -9
  59. package/scripts/sortie.mjs +1 -1
  60. package/scripts/superviseur.mjs +146 -88
  61. package/scripts/tableau.mjs +23 -8
  62. package/skills/grill/SKILL.md +6 -5
  63. package/skills/pitmaster/SKILL.md +9 -7
  64. package/skills/redacteur/references/documents-d-un-composant.md +1 -1
  65. package/scripts/ci-des-branches.mjs +0 -93
  66. package/scripts/migrations/0.33.0-ci-des-branches-de-ticket.mjs +0 -31
@@ -34,14 +34,14 @@
34
34
  // removes at its end.
35
35
  // - `npm test` measures itself against the last green under the circuit's mark,
36
36
  // `GRILLHOUSE_DEPUIS_LE_VERT` (scripts/langages/typescript/tests.mjs, scripts/circuit.mjs); it never keeps one.
37
- // - The circuit's passes, in a project whose CI runs on a ticket's branch, measure themselves
38
- // against the base of their lot (`lot`, the variable `GRILLHOUSE_BASE_DU_LOT` that the circuit
39
- // gives to `npm test` and `npm run verifier`): the copy's HEAD, which main reached green by that
40
- // CI, as Google's presubmit plays the tests a change affects. Their changes carry the mark
37
+ // - The circuit's passes, in every project, measure themselves against the base of their lot
38
+ // (`lot`, the variable `GRILLHOUSE_BASE_DU_LOT` that the circuit gives to `npm test` and
39
+ // `npm run verifier`, and the queue to its final pass): the copy's HEAD, the tip of main of its
40
+ // time, as Google's presubmit plays the tests a change affects. Their changes carry the mark
41
41
  // `cible`: each package plays the tests Vitest relates to them, a file out of its graph playing
42
42
  // neither the whole package nor the tests that read it by its path
43
- // (scripts/langages/typescript/vitest-config/changements.mjs); the complete pass is the CI's and
44
- // the night's. Such a pass keeps no green.
43
+ // (scripts/langages/typescript/vitest-config/changements.mjs); the complete pass is the CI's of
44
+ // main and the night's. Such a pass keeps no green.
45
45
  // - Only the measure of the changed files and the keeping of the green live here: the files go to
46
46
  // `vitest --changed`, and no module of language chooses the packages it plays by the last green
47
47
  // (the tests of a crate or a Python project are tasks of Turborepo, which its cache selects).
@@ -51,6 +51,7 @@ import { mkdirSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from 'nod
51
51
  import { createRequire } from 'node:module';
52
52
  import os from 'node:os';
53
53
  import path from 'node:path';
54
+ import { garderLArbreJuge } from './arbres-juges.mjs';
54
55
  import { etatDuDepot, fichierSous, git, SHA, sortie } from './etat-du-depot.mjs';
55
56
  // The variable that names the file of the changes since the last green, which the runner of the
56
57
  // tests of the module of the language reads in each package.
@@ -122,8 +123,11 @@ function lireLaBase(etat, base) {
122
123
  return { commit, arbre, branche: null };
123
124
  }
124
125
 
125
- // Keeps <etat> (etatDuDepot) as the last green of its branch, of main when HEAD is detached.
126
+ // Keeps <etat> (etatDuDepot) as the last green of its branch, of main when HEAD is detached; its
127
+ // tree is judged too (scripts/arbres-juges.mjs): the complete verification of a lot of the direct
128
+ // way is what lets its commit go to main.
126
129
  export function garderLeVert(etat) {
130
+ garderLArbreJuge(etat.racine, etat.arbre);
127
131
  const branche = etat.branche ?? etat.main;
128
132
  const f = branche ? fichierDuVert(etat.racine, branche) : null;
129
133
  if (!f) {
@@ -296,7 +300,7 @@ export function mesure(racine, { tout = false, base, lot, dans = os.tmpdir() } =
296
300
  etat: donnee ? null : etat,
297
301
  env: { [CHANGEMENTS]: fichier },
298
302
  ligne: cible
299
- ? `↳ depuis la base du lot ${vert.commit.slice(0, 7)} : ${n} fichier(s) changé(s) ; chaque paquet rejoué joue les tests que ses changements atteignent, la passe complète à la CI de la branche et à la nuit.`
303
+ ? `↳ depuis la base du lot ${vert.commit.slice(0, 7)} : ${n} fichier(s) changé(s) ; chaque paquet rejoué joue les tests que ses changements atteignent, la passe complète à la CI de main et à la nuit.`
300
304
  : donnee
301
305
  ? `↳ depuis la base ${vert.commit.slice(0, 7)} : ${n} fichier(s) changé(s) ; chaque paquet rejoué joue les tests que ses changements atteignent.`
302
306
  : `↳ depuis le dernier vert de ${vert.branche} (${vert.commit.slice(0, 12)}, arbre ${vert.arbre.slice(0, 12)}) : ${n} fichier(s) changé(s) ; chaque paquet rejoué joue les tests que ses changements atteignent.`,
@@ -98,7 +98,7 @@ export const ETAPES = [
98
98
  etat: null,
99
99
  sous: [
100
100
  { numero: '5.1', titre: 'Commit', qui: [AUTO], etat: 'integration' },
101
- { numero: '5.2', titre: 'File : main, poussée, CI', qui: [AUTO], etat: 'file' },
101
+ { numero: '5.2', titre: 'File : passe finale, main', qui: [AUTO], etat: 'file' },
102
102
  // The tri of the discoveries of the ticket, on the lot entered on main (grillhouse-0yu.5).
103
103
  { numero: '5.3', titre: 'Tri des découvertes', qui: [EXPLORATEUR], etat: 'tri' },
104
104
  ],
@@ -59,7 +59,6 @@
59
59
  // pushed (`fermerLEntree`); `effet-de-la-file`, one effect they gave back, under the key of its
60
60
  // activity. Their lines go to the error output.
61
61
  import { appendFileSync, readFileSync } from 'node:fs';
62
- import path from 'node:path';
63
62
  import { pathToFileURL } from 'node:url';
64
63
  import {
65
64
  aLaFin,
@@ -83,17 +82,19 @@ import {
83
82
  } from './circuit.mjs';
84
83
  import {
85
84
  avancerMain,
86
- conclureLaCI,
87
85
  direLIssue,
88
86
  fermerLEntree,
89
- inscrireLesFluxDeMain,
90
- lireLesPassagesDeLaCI,
91
- relireLesLecturesDues,
87
+ jugerLeCandidat,
92
88
  outilsDeLaFile,
93
89
  preparerLaBranche,
94
90
  situerLeLot,
95
91
  } from './integration/file.mjs';
96
- import { avancementDeLaCI } from './avancement.mjs';
92
+ import {
93
+ ghDans,
94
+ lireLaCiDeMain,
95
+ lotsDepuisLeVert,
96
+ ouvrirLeDefautDeMain,
97
+ } from './ci-de-main.mjs';
97
98
 
98
99
  import { ecrireLEffet } from './effets.mjs';
99
100
  import { Arret, commenter, geste } from './ticket-du-circuit.mjs';
@@ -467,29 +468,44 @@ Object.assign(ACTES, {
467
468
  const o = laFile(racine);
468
469
  return { ...fermerLEntree(o, { ticket, branche, commit }), effets: o.rendus };
469
470
  },
470
- // A reading of the CI of every expected workflow of the commit (`lireLesPassagesDeLaCI`), its
471
- // steps written to the progress directory of the ticket.
472
- async passages({ racine, ticket, sha, branche }) {
473
- const travail = path.join(racine, '.claude', 'worktrees', `${ticket}.travail`);
474
- const avancement = avancementDeLaCI(travail);
475
- return lireLesPassagesDeLaCI(laFile(racine, avancement), { sha, branche });
471
+ // The final pass on the candidate, played in the queue's copy (`jugerLeCandidat`).
472
+ async juger({ racine, ticket, branche, commit }) {
473
+ const o = laFile(racine);
474
+ const r = jugerLeCandidat(o, { ticket, branche, commit });
475
+ return { ...r, effets: o.rendus };
476
+ },
477
+ // The CI of main read once, in the main tree: the defect ticket of a red passage opened for the
478
+ // owner (`ouvrirLeDefautDeMain`, one per passage), the lots entered since the last green named by
479
+ // git. `{ etat }`: `verte`, `rouge` or `non-lue`.
480
+ async 'surveiller-la-ci-de-main'({ racine }) {
481
+ const o = laFile(racine);
482
+ const lecture = lireLaCiDeMain({ racine, gh: ghDans(racine) });
483
+ if (lecture.etat === 'rouge') {
484
+ const pointe = o.principale ?? 'main';
485
+ const lots = lotsDepuisLeVert(racine, { vert: lecture.vert, pointe });
486
+ const r = ouvrirLeDefautDeMain({ racine, bd: o.bd }, lecture, lots);
487
+ if (r.faute) {
488
+ o.dire(`⚠ ${r.faute}`);
489
+ }
490
+ }
491
+ return { etat: lecture.etat };
492
+ },
493
+ // The acts of the former path of the queue (the CI of a ticket's branch, the readings of the
494
+ // workflows of main), kept for the executions in flight whose history replays them, retired
495
+ // by grillhouse-3uv.131 once they are drained: they read nothing and judge nothing, the lot
496
+ // having been prepared as the queue's former path did, and the final pass of its circuit
497
+ // having judged it.
498
+ async passages() {
499
+ return { etat: 'verte', passage: 'ancien-chemin' };
476
500
  },
477
- // The reading of the workflows of main recorded as due after the push of a lot (nothing read).
478
- async 'inscrire-flux-de-main'({ racine, ...e }) {
479
- inscrireLesFluxDeMain(laFile(racine), e);
501
+ async 'inscrire-flux-de-main'() {
480
502
  return null;
481
503
  },
482
- // Every reading due of the workflows of main read once, without waiting; its comments given back.
483
- async 'relire-flux-de-main'({ racine, maintenant, ci }) {
484
- const o = laFile(racine);
485
- return {
486
- ...relireLesLecturesDues(o, { maintenant, ci }),
487
- effets: o.rendus,
488
- };
504
+ async 'relire-flux-de-main'() {
505
+ return { dues: 0, effets: [] };
489
506
  },
490
- async conclure({ racine, ...e }) {
491
- const o = laFile(racine);
492
- return { ...conclureLaCI(o, e), effets: o.rendus };
507
+ async conclure() {
508
+ return { avancer: true, effets: [] };
493
509
  },
494
510
  // One effect an act of the queue gave back, under the key of its activity, with the outcome of
495
511
  // the queue when it is not written (`ecrireLEffet`).