@roomi-fields/grillhouse 0.47.1 → 0.48.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 (101) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/CHANGELOG.md +48 -0
  3. package/cadre/templates/projet/.github/workflows/ci.yml +18 -38
  4. package/cadre/templates/projet/.github/workflows/machine-vierge.yml +5 -0
  5. package/cadre/templates/projet/.github/workflows/nuit.yml +5 -0
  6. package/cadre/templates/projet/CLAUDE.md +23 -6
  7. package/charte.md +9 -2
  8. package/dist/temporal/circuit/commande.js +5 -3
  9. package/dist/temporal/circuit/commande.js.map +1 -1
  10. package/dist/temporal/commande.js +2 -13
  11. package/dist/temporal/commande.js.map +1 -1
  12. package/dist/temporal/deroules.d.ts +1 -1
  13. package/dist/temporal/deroules.js +2 -2
  14. package/dist/temporal/deroules.js.map +1 -1
  15. package/dist/temporal/file/activites.d.ts +1 -4
  16. package/dist/temporal/file/activites.js +13 -14
  17. package/dist/temporal/file/activites.js.map +1 -1
  18. package/dist/temporal/file/contrat.d.ts +20 -91
  19. package/dist/temporal/file/contrat.js +7 -3
  20. package/dist/temporal/file/contrat.js.map +1 -1
  21. package/dist/temporal/file/deroule.d.ts +1 -9
  22. package/dist/temporal/file/deroule.js +54 -163
  23. package/dist/temporal/file/deroule.js.map +1 -1
  24. package/dist/temporal/installation.d.ts +26 -1
  25. package/dist/temporal/installation.js +111 -2
  26. package/dist/temporal/installation.js.map +1 -1
  27. package/dist/temporal/nuits/activites.d.ts +11 -2
  28. package/dist/temporal/nuits/activites.js +16 -5
  29. package/dist/temporal/nuits/activites.js.map +1 -1
  30. package/dist/temporal/nuits/choix.d.ts +15 -0
  31. package/dist/temporal/nuits/choix.js +20 -0
  32. package/dist/temporal/nuits/choix.js.map +1 -1
  33. package/dist/temporal/nuits/contrat.d.ts +16 -3
  34. package/dist/temporal/nuits/deroule.js +9 -2
  35. package/dist/temporal/nuits/deroule.js.map +1 -1
  36. package/dist/temporal/places/client.d.ts +13 -2
  37. package/dist/temporal/places/client.js +17 -2
  38. package/dist/temporal/places/client.js.map +1 -1
  39. package/dist/temporal/places/contrat.d.ts +41 -4
  40. package/dist/temporal/places/contrat.js +8 -0
  41. package/dist/temporal/places/contrat.js.map +1 -1
  42. package/dist/temporal/places/deroule.js +46 -6
  43. package/dist/temporal/places/deroule.js.map +1 -1
  44. package/docs/ARCHITECTURE.md +166 -41
  45. package/docs/INTERFACE.md +13 -3
  46. package/package.json +1 -1
  47. package/scripts/activites.mjs +48 -10
  48. package/scripts/aiguillage.mjs +1 -0
  49. package/scripts/attente-a-l-arret.mjs +2 -5
  50. package/scripts/attente-au-tour.mjs +2 -5
  51. package/scripts/branche-de-nuit.mjs +32 -44
  52. package/scripts/ci-de-main.mjs +215 -16
  53. package/scripts/circuit.mjs +45 -33
  54. package/scripts/composition-des-langages.mjs +2 -0
  55. package/scripts/crochets.mjs +2 -2
  56. package/scripts/effets.mjs +2 -1
  57. package/scripts/enveloppe/enveloppe.mjs +61 -6
  58. package/scripts/enveloppe/travail-de-la-copie.mjs +2 -0
  59. package/scripts/etapes.mjs +11 -1
  60. package/scripts/etat-du-depot.mjs +23 -0
  61. package/scripts/faits-du-circuit.mjs +12 -23
  62. package/scripts/fermeture-de-la-machine.d.mts +27 -0
  63. package/scripts/fermeture-de-la-machine.mjs +108 -0
  64. package/scripts/greffons.mjs +1 -1
  65. package/scripts/integration/file.mjs +16 -13
  66. package/scripts/integration/integrer.mjs +2 -0
  67. package/scripts/jointure.d.ts +5 -0
  68. package/scripts/langages/c/index.mjs +2 -0
  69. package/scripts/langages/c/squelette.mjs +1 -1
  70. package/scripts/langages/cargo/index.mjs +2 -0
  71. package/scripts/langages/python/index.mjs +2 -0
  72. package/scripts/langages/typescript/index.mjs +3 -0
  73. package/scripts/langages/typescript/module-absent.mjs +24 -0
  74. package/scripts/langages/typescript/turbo-des-paquets.mjs +19 -1
  75. package/scripts/langages/typescript/vitest-config/lances.mjs +3 -1
  76. package/scripts/langages.mjs +25 -3
  77. package/scripts/machine.mjs +103 -0
  78. package/scripts/matieres-cles.mjs +17 -0
  79. package/scripts/matieres-lues.mjs +104 -0
  80. package/scripts/migrations/0.48.0-ci-declenchee-par-la-file.mjs +32 -0
  81. package/scripts/migrations/0.48.0-poussee-retiree.mjs +31 -0
  82. package/scripts/migrations.mjs +4 -0
  83. package/scripts/nuit.sh +16 -44
  84. package/scripts/passe-de-la-machine.mjs +9 -7
  85. package/scripts/places-de-la-machine.mjs +74 -11
  86. package/scripts/places-du-serveur.mjs +29 -8
  87. package/scripts/poussee-retiree.mjs +18 -0
  88. package/scripts/registre.d.mts +2 -2
  89. package/scripts/regles-des-places.d.mts +36 -5
  90. package/scripts/regles-des-places.mjs +56 -9
  91. package/scripts/reponses-du-circuit.d.mts +2 -0
  92. package/scripts/reponses-du-circuit.mjs +26 -0
  93. package/scripts/resultats.mjs +40 -0
  94. package/scripts/sous-commandes.mjs +15 -2
  95. package/scripts/superviseur.mjs +64 -57
  96. package/scripts/tableau.mjs +132 -67
  97. package/scripts/transitions.d.mts +8 -0
  98. package/scripts/transitions.mjs +21 -3
  99. package/skills/pitmaster/SKILL.md +6 -3
  100. package/skills/relecteur/SKILL.md +3 -1
  101. package/scripts/poussee-cles.mjs +0 -46
@@ -90,7 +90,8 @@
90
90
  // its prefix (`courtDuTicket`). Such a line is marked `avancement`, which the pane measures
91
91
  // again more often.
92
92
  // - Signs: each sign keeps one sense (the owner's decisions of 2026-11-01 and 2026-11-12). A
93
- // ticket's line in AGENTS takes one of three, by the tone of its state: ▶ its step works (cyan),
93
+ // ticket's line in AGENTS takes one of three, by the tone of its state: ▶ its step works (cyan,
94
+ // the hollow ▷ in a short circuit, counted with it),
94
95
  // a ticket led in direct included; ⏸ it waits, under the step about to be launched, the reason
95
96
  // on its right (« attend une place », « verrou », « disque », « démarre » in grey, the
96
97
  // circuit waiting for the machine; « question au superviseur », « question au responsable »,
@@ -140,7 +141,12 @@ import { maxDuProjet } from './circuits-cles.mjs';
140
141
  import { bilansGardes, enBref } from './bilan.mjs';
141
142
  import { REGISTRE } from './adresse-du-registre.mjs';
142
143
  import { lireLaMesure } from './avancement.mjs';
143
- import { ciDeMainGardee, ligneDeLaCiDeMain } from './ci-de-main.mjs';
144
+ import {
145
+ alerteDeDeclenchement,
146
+ ciDeMainGardee,
147
+ fauteDeDeclenchement,
148
+ ligneDeLaCiDeMain,
149
+ } from './ci-de-main.mjs';
144
150
  import {
145
151
  SANS_REPONSE_EN,
146
152
  ServeurMuet,
@@ -155,8 +161,23 @@ import {
155
161
  lireLesExternes,
156
162
  } from './file-des-tickets.mjs';
157
163
  import { etatDesPlaces } from './places-de-la-machine.mjs';
164
+ import { duree as dureeDeLaFermeture } from './regles-des-places.mjs';
158
165
  import { prefixe as prefixeDeLaRacine } from './prefixe-des-tickets.mjs';
159
166
  import { sigleDuProjet } from './sigle-du-projet.mjs';
167
+ import { versionDuPaquet } from './greffons.mjs';
168
+ import { estLeCircuitCourt, sorteDesFiches } from './resultats.mjs';
169
+
170
+ // The version of the package whose code draws the panel, « v0.47.1 », read once, at the first
171
+ // request, and kept: a long-lived process keeps the loaded code's version after an upgrade. Only
172
+ // an x.y.z version shows; any other, or none, is null.
173
+ let versionAffichee;
174
+ const versionDuPanneau = () => {
175
+ if (versionAffichee === undefined) {
176
+ const v = versionDuPaquet();
177
+ versionAffichee = typeof v === 'string' && /^\d+\.\d+\.\d+$/.test(v) ? `v${v}` : null;
178
+ }
179
+ return versionAffichee;
180
+ };
160
181
 
161
182
  const MINUTE = 60_000;
162
183
  export const SILENCE = 10 * MINUTE;
@@ -877,7 +898,8 @@ export function lignesDesParts({
877
898
  * places?: { prises: number, plafond: number, faute?: string | null, charge: number,
878
899
  * coeurs: number, memoireGo: number, memoireTotaleGo: number,
879
900
  * tenues?: { ticket: string | null, racine?: string | null }[], attentes: { ticket: string,
880
- * depuis: number, disque?: string | null }[], nuit?: 'attend' | 'en cours' | null } | null,
901
+ * depuis: number, disque?: string | null }[], nuit?: 'attend' | 'en cours' | null,
902
+ * fermeture?: { auteur: 'nuit' | 'superviseur', depuis: number, phase: string } | null } | null,
881
903
  * nuit?: { racine: string, depuis: number | null } | null, muet?: boolean, faute?: string | null,
882
904
  * echecPrefixe?: string | null, voies?: Record<string, 'complet' | 'court'> }} lu
883
905
  */
@@ -1239,7 +1261,7 @@ export function assembler({
1239
1261
  }
1240
1262
  const debutJour = jour;
1241
1263
  // The way of a ticket done (grillhouse-592): `direct` when labelled so; else the way its kept
1242
- // results give (`voies`, `voiesDesCircuits`: `court` through 1.1, else `complet`); else
1264
+ // results give (`voies`, `voiesDesCircuits`: `court` for the short circuit, else `complet`); else
1243
1265
  // `complet` when a circuit led a step of it (the register) or is read for it; else `direct`,
1244
1266
  // closed with no circuit.
1245
1267
  const parUnCircuit = new Set([...etapesFinies.map(r => r.ticket), ...parCircuit.keys()]);
@@ -1473,6 +1495,8 @@ export function assembler({
1473
1495
  .map(c => ({
1474
1496
  ...c,
1475
1497
  id: c.ticket,
1498
+ // Its way so far, read from its kept results (`voiesDesCircuits`).
1499
+ court: voies[c.ticket] === 'court',
1476
1500
  numero: numero(c.ticket),
1477
1501
  sujet: titre(parId.get(c.ticket)).sujet,
1478
1502
  }));
@@ -1509,7 +1533,9 @@ export function assembler({
1509
1533
  machine,
1510
1534
  places: placesDeLaMachine && {
1511
1535
  ...placesDeLaMachine,
1512
- noms: nommerLesPrises(placesDeLaMachine.tenues ?? [], { racine, prefix }),
1536
+ siennes: (placesDeLaMachine.tenues ?? []).filter(
1537
+ x => x.racine && racine && path.resolve(x.racine) === path.resolve(racine)
1538
+ ).length,
1513
1539
  },
1514
1540
  nuit: nuitEnCours,
1515
1541
  faitsDuJour,
@@ -1572,16 +1598,18 @@ function temoinDe(c, maintenant) {
1572
1598
  }
1573
1599
 
1574
1600
  // A ticket's time and tokens, « 12 min · 310 k »; nothing when both are zero.
1575
- // The sign of a ticket done by its way (grillhouse-592): a full circuit, a short one (1.1 Geste
1576
- // mécanique), a ticket led directly.
1601
+ // The sign of a ticket done by its way (grillhouse-592): a full circuit, a short one (its gesture
1602
+ // played by a command, 1.1, or written by hand), a ticket led directly.
1577
1603
  export const SIGNE_DE_LA_VOIE = Object.freeze({ complet: '●', court: '○', direct: '✎' });
1578
1604
 
1579
1605
  /**
1580
1606
  * The way of the circuit each ticket of <tickets> went, read from its kept results in the main tree
1581
1607
  * <racine> (`.claude/worktrees/<ticket>.fiches.jsonl`, which the circuit writes and keeps once the
1582
- * ticket is done): `court` when the launch of a session carries the object `geste` (1.1 Geste
1583
- * mécanique), else `complet`; a ticket without the file has no entry. A line that does not parse
1584
- * counts nothing.
1608
+ * ticket is done): `court` when the sort of the ticket (`sorteDesFiches` of scripts/resultats.mjs:
1609
+ * its plan's, or the one a turn gave it since) is the short circuit's, its gesture played by a
1610
+ * command (1.1 Geste mécanique) or written by hand by the developpeur (`estLeCircuitCourt`), else
1611
+ * `complet`: a ticket that turned bears the way it ended on. A ticket without the file has no
1612
+ * entry. A line that does not parse counts nothing.
1585
1613
  * @param {string} racine
1586
1614
  * @param {string[]} tickets
1587
1615
  * @returns {Record<string, 'complet' | 'court'>}
@@ -1595,14 +1623,15 @@ export function voiesDesCircuits(racine, tickets) {
1595
1623
  } catch {
1596
1624
  continue;
1597
1625
  }
1598
- const geste = texte.split('\n').some(l => {
1626
+ const fiches = texte.split('\n').flatMap(l => {
1599
1627
  try {
1600
- return JSON.parse(l)?.lancement?.objet === 'geste';
1628
+ const e = JSON.parse(l);
1629
+ return e && typeof e === 'object' ? [e] : [];
1601
1630
  } catch {
1602
- return false;
1631
+ return [];
1603
1632
  }
1604
1633
  });
1605
- out[id] = geste ? 'court' : 'complet';
1634
+ out[id] = estLeCircuitCourt(sorteDesFiches(fiches)) ? 'court' : 'complet';
1606
1635
  }
1607
1636
  return out;
1608
1637
  }
@@ -1654,32 +1683,12 @@ const signeDe = a => a.signe ?? '⚠';
1654
1683
  // « SH-ae6.5 » → « ae6.5 ».
1655
1684
  const courtDuTicket = id => id.slice(id.lastIndexOf('-') + 1);
1656
1685
 
1657
- // Who holds each place of the machine, in the order of the places: the project of the board (the
1658
- // root <racine> of its main tree, its ticket prefix <prefix>) by the short number of its ticket,
1659
- // another project by « <sigle> <short number> » (its sigle and its prefix read from its own root),
1660
- // a place with no ticket « passe »; a place with no root (a state of before) is the board's.
1661
- function nommerLesPrises(tenues, { racine, prefix }) {
1662
- return tenues.map(({ ticket, racine: deLaPrise }) => {
1663
- const ici = !deLaPrise || (racine && path.resolve(deLaPrise) === path.resolve(racine));
1664
- let prefixeDuProjet = prefix;
1665
- if (!ici) {
1666
- try {
1667
- prefixeDuProjet = prefixeDeLaRacine(deLaPrise);
1668
- } catch {
1669
- prefixeDuProjet = '';
1670
- }
1671
- }
1672
- const numero = !ticket
1673
- ? 'passe'
1674
- : prefixeDuProjet && ticket.startsWith(`${prefixeDuProjet}-`)
1675
- ? ticket.slice(prefixeDuProjet.length + 1)
1676
- : courtDuTicket(ticket);
1677
- return ici ? numero : `${sigleDuProjet(deLaPrise).sigle ?? path.basename(deLaPrise)} ${numero}`;
1678
- });
1679
- }
1680
1686
  // The sign of a ticket's line in AGENTS, by the tone of its state: ▶ what runs, ⛔ what asks for a
1681
1687
  // correction, ⏸ a wait, for the machine (grey) or for someone (yellow).
1682
- const signeDuTon = ton => (ton === TONS.enCours ? '▶' : ton === 'alerte' ? '⛔' : '⏸');
1688
+ // A circuit that runs bears the full triangle, the hollow one in a short circuit (<court>), as
1689
+ // its line of FAITS AUJOURD'HUI bears the full or the hollow round (`SIGNE_DE_LA_VOIE`).
1690
+ const signeDuTon = (ton, court = false) =>
1691
+ ton === TONS.enCours ? (court ? '▷' : '▶') : ton === 'alerte' ? '⛔' : '⏸';
1683
1692
  // The step of the circuit <c>, by its state or its stop.
1684
1693
  const etapeDuCircuitLu = c => etapeDuCircuit({ ...c, raison: c.arret });
1685
1694
  // A circuit that waits for the supervisor (`attendLeSuperviseur`, the one rule): who must answer
@@ -1775,7 +1784,13 @@ export function etatsDAgents(t) {
1775
1784
  partDe.get(c.id) ??
1776
1785
  (c.vivant && etape?.qui.includes(AUTO) ? temoinDe(c, maintenant) : null);
1777
1786
  const [etat, raison] = etatDuCircuit(c, temoin);
1778
- circuits.set(c.id, { etat, raison, ton: TONS[etat], signe: signeDuTon(TONS[etat]), temoin });
1787
+ circuits.set(c.id, {
1788
+ etat,
1789
+ raison,
1790
+ ton: TONS[etat],
1791
+ signe: signeDuTon(TONS[etat], c.court),
1792
+ temoin,
1793
+ });
1779
1794
  }
1780
1795
  const ligne = (x, signe) => ({ id: x.id, projet: x.projet, signe });
1781
1796
  return {
@@ -1797,7 +1812,7 @@ export function etatsDAgents(t) {
1797
1812
  export function comptesDAgents(t, projet) {
1798
1813
  const l = etatsDAgents(t).lignes.filter(x => projet === undefined || x.projet === projet);
1799
1814
  const n = s => l.filter(x => x.signe === s).length;
1800
- return { enCours: n('▶'), enAttente: n('⏸'), arretes: n('⛔') };
1815
+ return { enCours: n('▶') + n('▷'), enAttente: n('⏸'), arretes: n('⛔') };
1801
1816
  }
1802
1817
 
1803
1818
  // The board's lines, `largeur` columns wide, each with its tone (titre, alerte, attention, actif,
@@ -1825,7 +1840,9 @@ export function lignes(t, nom, largeur = LARGEUR, groupes = {}) {
1825
1840
  // The labels' column of the head and of AGENTS, « [OB] », « [OSD] ».
1826
1841
  const large = Math.max(0, ...(t.projets ?? []).map(p => p.etiquette.length + 3));
1827
1842
  const colonneDe = etiquette => `[${etiquette}]`.padEnd(large);
1828
- L(nom.toUpperCase(), TONS.titre);
1843
+ // The first line: the project's name, the frame's version at its right edge.
1844
+ const version = versionDuPanneau();
1845
+ L(version ? couper(nom.toUpperCase(), version, largeur) : nom.toUpperCase(), TONS.titre);
1829
1846
  // The state of each ticket's line of AGENTS, which AGENTS draws and the head counts.
1830
1847
  const etats = etatsDAgents(t);
1831
1848
  // The three lines of the head, grouped by who acts, each with its tone from TONS; an absent
@@ -1931,32 +1948,21 @@ export function lignes(t, nom, largeur = LARGEUR, groupes = {}) {
1931
1948
  L('AGENTS ▶ en cours · en attente', TONS.titre);
1932
1949
  const maintenant = t.maintenant ?? Date.now();
1933
1950
  // The places of the machine (scripts/places-de-la-machine.mjs), the first line of AGENTS:
1934
- // « Places 3/3 · charge 11,2/12 · mémoire 9/30 Go », the places taken of the ceiling, the load
1951
+ // « Places 2/9/10 · charge 11,2/12 · mémoire 9/30 Go », the places of circuits the board's
1952
+ // projects hold, those held on the machine and the ceiling, the load
1935
1953
  // over one minute of the cores, the free memory of the total; a value of the ceiling the poste names and the
1936
1954
  // server refused, in place of the load and the memory, by its name.
1937
1955
  const p = t.places;
1938
1956
  if (p) {
1939
1957
  const nb = n => (Number.isInteger(n) ? String(n) : n.toFixed(1).replace('.', ','));
1940
- // Who holds each place stands between the count and the load: the most names that keep the
1941
- // line within the width, the others counted « +n ».
1942
- const noms = p.noms ?? [];
1943
1958
  const suite = p.faute
1944
1959
  ? `plafond refusé : ${p.faute}`
1945
1960
  : `charge ${nb(p.charge)}/${p.coeurs} · mémoire ${p.memoireGo}/${p.memoireTotaleGo} Go`;
1946
- const ligne = k =>
1947
- `Places ${p.prises}/${p.plafond} · ${
1948
- noms.length
1949
- ? `${[noms.slice(0, k).join(', '), ...(k < noms.length ? [`+${noms.length - k}`] : [])]
1950
- .filter(Boolean)
1951
- .join(' ')} · `
1952
- : ''
1953
- }${suite}`;
1954
- let k = noms.length;
1955
- while (k > 0 && colonnes(ligne(k)) > largeur) {
1956
- k--;
1957
- }
1961
+ // The places of circuits: the board's own (its project's, its projects' on a board of several),
1962
+ // those held on the whole machine, the ceiling.
1963
+ const ligne = `Places ${p.siennes ?? 0}/${p.prises}/${p.plafond} · ${suite}`;
1958
1964
  poser({
1959
- texte: cadre(ligne(k), '', largeur),
1965
+ texte: cadre(ligne, '', largeur),
1960
1966
  ton: p.faute ? TONS.plafondRefuse : p.charge >= p.coeurs ? TONS.machineChargee : TONS.mesure,
1961
1967
  });
1962
1968
  // A ticket that waits for the disk of its project's copies: what holds it, the ticket named.
@@ -1979,6 +1985,32 @@ export function lignes(t, nom, largeur = LARGEUR, groupes = {}) {
1979
1985
  ton: p.nuit === 'attend' ? TONS.attendLeDisque : TONS.nuitEnCours,
1980
1986
  });
1981
1987
  }
1988
+ // The machine closed (`fermeture` of the places: its author, `superviseur` or `nuit`, since
1989
+ // when, its phase): said, with how long it has lasted, so a closure forgotten is seen.
1990
+ if (p.fermeture) {
1991
+ const { auteur, depuis, phase } = p.fermeture;
1992
+ const duJour = auteur === 'superviseur';
1993
+ poser({
1994
+ texte: couperAvant(
1995
+ `machine fermée par ${duJour ? 'le superviseur' : 'la nuit'}`,
1996
+ ` · depuis ${dureeDeLaFermeture(maintenant - depuis)}`,
1997
+ '',
1998
+ largeur
1999
+ ),
2000
+ ton: duJour ? TONS.attendLeDisque : TONS.nuitEnCours,
2001
+ });
2002
+ // The closure of the supervisor holds no place itself: it says what its places still do.
2003
+ if (duJour) {
2004
+ poser({
2005
+ texte: cadre(
2006
+ phase === 'vide' ? 'la machine est vide' : 'attend la fin des étapes en cours',
2007
+ '',
2008
+ largeur
2009
+ ),
2010
+ ton: TONS.attendLeDisque,
2011
+ });
2012
+ }
2013
+ }
1982
2014
  }
1983
2015
  // A project at its limit of circuits (`grillhouse.circuits`) names the circuits that hold it
1984
2016
  // waiting for the supervisor: « Limite 2/2 · en attente du superviseur : 11, 12 ».
@@ -2354,10 +2386,17 @@ export function lignes(t, nom, largeur = LARGEUR, groupes = {}) {
2354
2386
  const n = t.faitsDuJour.length;
2355
2387
  const temps = t.faitsDuJour.reduce((s, x) => s + x.travail, 0);
2356
2388
  const jetons = t.faitsDuJour.reduce((s, x) => s + x.jetons, 0);
2389
+ // The tickets of the day that took the short circuit.
2390
+ const courts = t.faitsDuJour.filter(x => x.voie === 'court').length;
2357
2391
  L(
2358
2392
  cadre(
2359
2393
  "FAITS AUJOURD'HUI",
2360
- `${n} ticket${n > 1 ? 's' : ''} · ${duree(temps)} · ${k(jetons)}`,
2394
+ [
2395
+ `${n} ticket${n > 1 ? 's' : ''}`,
2396
+ ...(courts ? [`${courts} court${courts > 1 ? 's' : ''}`] : []),
2397
+ duree(temps),
2398
+ k(jetons),
2399
+ ].join(' · '),
2361
2400
  largeur
2362
2401
  ),
2363
2402
  TONS.titre
@@ -2742,11 +2781,12 @@ function lire(
2742
2781
  // A read-only place keeps the board working, without its cache.
2743
2782
  }
2744
2783
  const jour = jourLu;
2745
- // The kept results of the circuits of the tickets done since the day's marker, in the main tree.
2746
- const voies = voiesDesCircuits(
2747
- commun ? path.dirname(commun) : racine,
2748
- tous.filter(x => x.closed_at && Date.parse(x.closed_at) >= jour).map(x => x.id)
2749
- );
2784
+ // The kept results of the circuits of the tickets done since the day's marker, and of the
2785
+ // circuits read, in the main tree.
2786
+ const voies = voiesDesCircuits(commun ? path.dirname(commun) : racine, [
2787
+ ...tous.filter(x => x.closed_at && Date.parse(x.closed_at) >= jour).map(x => x.id),
2788
+ ...lesCircuitsLus.liste.map(c => c.ticket),
2789
+ ]);
2750
2790
  const t = assembler({
2751
2791
  tous,
2752
2792
  prefix,
@@ -2789,7 +2829,8 @@ function lireLesPlaces() {
2789
2829
 
2790
2830
  // The boards of several projects as one (grillhouse-erp.1), as the multi-root explorer of VS Code
2791
2831
  // keeps one view and files each root under its name: <lus> holds each project's label
2792
- // (`etiquette`, its ticket prefix) and its board (`t`) or the fault that keeps it out (`erreur`),
2832
+ // (`etiquette`, its ticket prefix), the root of its main tree (`racine`, by which the places of
2833
+ // its circuits are counted) and its board (`t`) or the fault that keeps it out (`erreur`),
2793
2834
  // the session's project first. Each ticket, alert and chantier is marked with its project's label
2794
2835
  // (`projet`), the agents' blocks hold every project's tickets at their step, and `projets` gives
2795
2836
  // each project's counters or fault, which the head shows one line each.
@@ -2830,7 +2871,14 @@ export function ensemble(lus) {
2830
2871
  }),
2831
2872
  maintenant: premier.t.maintenant,
2832
2873
  machine: premier.t.machine,
2833
- places: premier.t.places,
2874
+ places: premier.t.places && {
2875
+ ...premier.t.places,
2876
+ siennes: (premier.t.places.tenues ?? []).filter(
2877
+ x =>
2878
+ x.racine &&
2879
+ lisibles.some(l => l.racine && path.resolve(l.racine) === path.resolve(x.racine))
2880
+ ).length,
2881
+ },
2834
2882
  nuit: premier.t.nuit,
2835
2883
  faitsDuJour: tous('faitsDuJour'),
2836
2884
  decouvertes: lisibles.reduce(
@@ -2970,6 +3018,15 @@ export async function tableau(
2970
3018
  ici.t.alertes.push({ etat: 'panne', ton: TONS.panne, texte: ligneDeLaCiDeMain(ci) });
2971
3019
  }
2972
3020
  }
3021
+ // A start of the CI that GitHub refused is an alert apart (scripts/ci-de-main.mjs), until a start succeeds.
3022
+ const fauteDeLaCi = ici.t && ci ? fauteDeDeclenchement(racine) : null;
3023
+ if (fauteDeLaCi) {
3024
+ ici.t.alertes.push({
3025
+ etat: 'panne',
3026
+ ton: TONS.panne,
3027
+ texte: alerteDeDeclenchement(fauteDeLaCi).texte,
3028
+ });
3029
+ }
2973
3030
  // A project is labelled by its sigle (scripts/sigle-du-projet.mjs: the key `grillhouse.sigle`, else
2974
3031
  // its ticket prefix), as the line of the places names it; a project with neither keeps its
2975
3032
  // folder's name. A faulty key is said in an alert, the prefix staying the sigle; two projects of
@@ -3009,7 +3066,15 @@ export async function tableau(
3009
3066
  );
3010
3067
  const etat = ligneEtat(ici.t, autres.map(l => l.t).filter(Boolean));
3011
3068
  const t = projets.length
3012
- ? ensemble(lus.map(l => ({ etiquette: etiquette(l), t: l.t, erreur: l.erreur })))
3069
+ ? ensemble(
3070
+ lus.map(l => ({
3071
+ etiquette: etiquette(l),
3072
+ // The root of the project's main tree, which each place of a circuit carries.
3073
+ racine: l.commun ? path.dirname(l.commun) : l.dossier,
3074
+ t: l.t,
3075
+ erreur: l.erreur,
3076
+ }))
3077
+ )
3013
3078
  : ici.t;
3014
3079
  // The project is named by its repository's folder, as a shell prompt names it.
3015
3080
  const nom = [path.basename(racine), ...lus.slice(1).map(etiquette)].join(' + ');
@@ -166,8 +166,16 @@ export function refusDeLaFile(issue?: { raison?: string | null; conflit?: boolea
166
166
  export function etapeApresLePlan(e: {
167
167
  sorte?: { genre?: string; comportement?: string } | null;
168
168
  sansTests?: boolean;
169
+ demande?: boolean;
169
170
  }): string;
170
171
 
172
+ /** The mark « the supervisor asked the testwriter » after a start: set by `--depuis testwriter`, kept by a `--reprendre` without `--depuis`, dropped otherwise. */
173
+ export function testwriterDemande(e: {
174
+ depuis?: string | null;
175
+ reprendre?: boolean;
176
+ marque?: boolean;
177
+ }): boolean;
178
+
171
179
  /** The step after a proof that passes: the developpeur, or the checks. */
172
180
  export function apresLaPreuve(e: {
173
181
  rouges: number;
@@ -52,8 +52,16 @@ export const MEMOIRE = [
52
52
  'conflitsRelances',
53
53
  'fichiersDuConflit',
54
54
  'retourDuConflit',
55
+ 'testwriterDemande',
55
56
  ];
56
57
 
58
+ // The mark « the supervisor asked the testwriter » after a start: set by `--depuis testwriter`, kept
59
+ // by a `--reprendre` without `--depuis`, dropped by any other start (a new plan, no `--depuis`, a
60
+ // `--depuis` of another step). As an operator replays a named step whatever the automatic rule
61
+ // would have chosen.
62
+ export const testwriterDemande = ({ depuis, reprendre, marque }) =>
63
+ depuis === 'testwriter' || Boolean(!depuis && reprendre && marque);
64
+
57
65
  // The steps of the circuit's state, read from the list of the steps.
58
66
  const etatDe = n => SUITE.find(e => e.numero === n).etat;
59
67
  export const [
@@ -91,7 +99,7 @@ export const rapportDuRefus = refus =>
91
99
  `L’intégration refuse ce lot : son refus, ci-dessous, est le rouge à lever ; les contrôles de ta copie, verts, ne le voient pas, et le lot ne repasse à l’intégration qu’avec un changement.\n\n${refus.rapport}`;
92
100
 
93
101
  // The stop of a ticket the queue reopens on its issue `{ raison, conflit }`, as it gives the circuit
94
- // (`direLIssue`, `conclureLaCI` of scripts/integration/file.mjs): `motif`, whose first line, the
102
+ // (`direLIssue` of scripts/integration/file.mjs): `motif`, whose first line, the
95
103
  // fact of the question gone up, says why (the first line of the reason that is not a title), the
96
104
  // whole reason after it; `question`, for a branch that does not replay on main (its conflict), the
97
105
  // answer that serves, null for any other reason.
@@ -111,10 +119,11 @@ export function refusDeLaFile({ raison, conflit = false } = {}) {
111
119
  // developpeur of a plan without tests (<sansTests>) or of a plan whose `comportement` is inchangé
112
120
  // (a gesture written by hand: no test can turn red, the existing suite proves it); else the
113
121
  // testwriter, for changé and tests-adaptés alike.
114
- export const etapeApresLePlan = ({ sorte, sansTests }) =>
122
+ // The supervisor's `--depuis testwriter` (<demande>) wins over `inchangé`: the testwriter plays.
123
+ export const etapeApresLePlan = ({ sorte, sansTests, demande = false }) =>
115
124
  sorte?.genre === 'mécanique'
116
125
  ? GESTE
117
- : sansTests || sorte?.comportement === 'inchangé'
126
+ : sansTests || (sorte?.comportement === 'inchangé' && !demande)
118
127
  ? CODE
119
128
  : TESTS;
120
129
 
@@ -463,8 +472,17 @@ function decider({ etat, memoire = {}, ticket, reprend = false }, lire, partiel)
463
472
  sorte:
464
473
  lire('mecanique') || ticket.sorte?.comportement === 'inchangé' ? ticket.sorte : null,
465
474
  sansTests: lire('sansTests'),
475
+ demande: Boolean(m('testwriterDemande')),
466
476
  })
467
477
  : null;
478
+ const demandeDuSuperviseur =
479
+ Boolean(m('testwriterDemande')) && ticket.sorte?.comportement === 'inchangé';
480
+ if (etape === TESTS && route === TESTS && demandeDuSuperviseur) {
481
+ commenter(
482
+ 'testwriter',
483
+ 'plan « comportement inchangé » : le superviseur a demandé la séance du testwriter (`--depuis testwriter`), qui l’emporte sur la sorte du plan.'
484
+ );
485
+ }
468
486
  if (route === GESTE) {
469
487
  geste('mecanique');
470
488
  etape = GESTE;
@@ -202,10 +202,13 @@ nomme le responsable, ce qui décide, les documents qu'il valide et les commande
202
202
  - **Le greffon pousse les questions, ma réponse les acquitte** : le greffon de ma séance met
203
203
  dans la file de mes messages, qui arrive à la fin du tour en cours sans l'interrompre, un seul
204
204
  message par relevé (une question neuve d'un circuit lancé seul, dans une file ou par une autre
205
- séance : le ticket, l'étape, la question et la commande qui répond ; un circuit intégré, une
206
- fois, sous « Circuit intégré »). Une question qu'aucune réponse n'a levée (son circuit est
205
+ séance, en trois lignes : « Question · ticket · étape · arrêt », la question, puis « → npx
206
+ grillhouse circuit <ticket> <réponse> », où je mets ma réponse, `--reprendre`, `--depuis`,
207
+ `--mecanique`, `--etendre`, `--reporter` ou `--arreter` ; un circuit intégré, une fois, sur
208
+ une ligne « Intégré · ticket » ; la ligne d'un autre projet de mon groupe porte son sigle
209
+ (« [SH] … ») et sa commande son dossier (`env -C`)). Une question qu'aucune réponse n'a levée (son circuit est
207
210
  toujours arrêté sur le même arrêt) revient à intervalle réglable (`grillhouse.rappel` du
208
- `package.json`, 5 min par défaut), marquée « toujours sans réponse », jusqu'à sa réponse : je
211
+ `package.json`, 5 min par défaut), sur une ligne « Toujours sans réponse · ticket · étape », jusqu'à sa réponse : je
209
212
  la réponds, ou je la porte au responsable. Je ne me mets pas en attente du responsable tant
210
213
  qu'une question d'un circuit attend ma réponse : le crochet de fin de tour me bloque une fois
211
214
  par question, la liste à l'appui. Le tableau montre au responsable une alerte horodatée pour
@@ -30,7 +30,9 @@ des rapports d'API).
30
30
  « de 030-binder, § Les frontières »), `piece` son `fichier:ligne` et ce qu'il montre, que le
31
31
  circuit cherche dans la copie. Un export neuf cite son entrée dans l'INTERFACE de son paquet
32
32
  (`document` `INTERFACE`, son nom dans `reference`) ; un export neuf sans entrée est `non`. Un
33
- élément supprimé se juge aussi : ses lecteurs et ses textes partent avec lui.
33
+ élément supprimé se juge aussi : ses lecteurs et ses textes partent avec lui. Sa `piece` est
34
+ « $ git status --short <chemin> » et sa sortie, ou « ticket, critère N » : son fichier a quitté
35
+ la copie, où le circuit cherche tout `fichier:ligne`.
34
36
  3. Un `non` rend le lot : il nomme son agent (`role`), comme un constat
35
37
  bloquant. Le circuit refuse une fiche à laquelle il manque un élément, ou dont une ligne n'a
36
38
  pas sa référence.
@@ -1,46 +0,0 @@
1
- // The reading of the `grillhouse.poussee` keys of a package.json, shared by the night
2
- // (scripts/nuit.sh), the pre-push guard (scripts/branche-de-nuit.mjs) and the queue
3
- // (scripts/integration/file.mjs): the keys are read as written. `grillhouse.poussee` is absent,
4
- // null or an object; `grillhouse.poussee.nuit` and `grillhouse.poussee.commit` are absent, null or
5
- // a non-blank string.
6
-
7
- // Returns { nuit, fautes }: `nuit` the night branch, or null when the key is absent or faulty;
8
- // `fautes` one entry { cle, valeur } per faulty key, `valeur` as JSON.
9
- export function lirePoussee(pkg) {
10
- const fautes = [];
11
- let nuit = null;
12
- const p = pkg?.grillhouse?.poussee;
13
- if (p !== undefined && p !== null) {
14
- if (typeof p !== 'object' || Array.isArray(p)) {
15
- fautes.push({ cle: 'grillhouse.poussee', valeur: JSON.stringify(p) });
16
- } else if (p.nuit !== undefined && p.nuit !== null) {
17
- if (typeof p.nuit !== 'string' || !p.nuit.trim()) {
18
- fautes.push({ cle: 'grillhouse.poussee.nuit', valeur: JSON.stringify(p.nuit) });
19
- } else {
20
- nuit = p.nuit;
21
- }
22
- }
23
- }
24
- return { nuit, fautes };
25
- }
26
-
27
- // The branch the queue pushes main to: `grillhouse.poussee.commit`, `main` without the key (or with
28
- // null). Returns { commit, faute }: `faute` is the faulty value as JSON, and `commit` null, when the
29
- // key is not a non-blank string.
30
- export function lireCommit(pkg) {
31
- const p = pkg?.grillhouse?.poussee;
32
- if (p === undefined || p === null) {
33
- return { commit: 'main', faute: null };
34
- }
35
- if (typeof p !== 'object' || Array.isArray(p)) {
36
- return { commit: null, faute: JSON.stringify(p) };
37
- }
38
- const c = p.commit;
39
- if (c === undefined || c === null) {
40
- return { commit: 'main', faute: null };
41
- }
42
- if (typeof c !== 'string' || !c.trim()) {
43
- return { commit: null, faute: JSON.stringify(c) };
44
- }
45
- return { commit: c, faute: null };
46
- }