@roomi-fields/grillhouse 0.45.1 → 0.47.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.
- package/.claude-plugin/plugin.json +1 -1
- package/CHANGELOG.md +52 -0
- package/cadre/templates/c/package.json +19 -0
- package/cadre/templates/projet/.github/workflows/ci.yml +34 -49
- package/cadre/templates/projet/.github/workflows/machine-vierge.yml +101 -0
- package/cadre/templates/projet/CLAUDE.md +28 -5
- package/cadre/templates/projet/docs/agents/issue-tracker.md +1 -1
- package/charte.md +61 -23
- package/dist/temporal/circuit/appel.d.ts +7 -0
- package/dist/temporal/circuit/appel.js +17 -0
- package/dist/temporal/circuit/appel.js.map +1 -1
- package/dist/temporal/circuit/client.d.ts +28 -5
- package/dist/temporal/circuit/client.js +56 -13
- package/dist/temporal/circuit/client.js.map +1 -1
- package/dist/temporal/circuit/commande.js +16 -4
- package/dist/temporal/circuit/commande.js.map +1 -1
- package/dist/temporal/circuit/contrat.d.ts +22 -2
- package/dist/temporal/circuit/contrat.js +76 -0
- package/dist/temporal/circuit/contrat.js.map +1 -1
- package/dist/temporal/circuit/deroule.js +68 -11
- package/dist/temporal/circuit/deroule.js.map +1 -1
- package/dist/temporal/file/activites.d.ts +2 -0
- package/dist/temporal/file/activites.js +7 -0
- package/dist/temporal/file/activites.js.map +1 -1
- package/dist/temporal/file/contrat.d.ts +28 -18
- package/dist/temporal/file/contrat.js +8 -5
- package/dist/temporal/file/contrat.js.map +1 -1
- package/dist/temporal/file/deroule.d.ts +1 -1
- package/dist/temporal/file/deroule.js +91 -42
- package/dist/temporal/file/deroule.js.map +1 -1
- package/dist/temporal/tickets/activites.d.ts +1 -0
- package/dist/temporal/tickets/activites.js +37 -11
- package/dist/temporal/tickets/activites.js.map +1 -1
- package/dist/temporal/tickets/contrat.d.ts +14 -0
- package/dist/temporal/tickets/deroule.js +16 -3
- package/dist/temporal/tickets/deroule.js.map +1 -1
- package/docs/ARCHITECTURE.md +309 -128
- package/docs/INTERFACE.md +42 -22
- package/hooks/register.tsx +30 -0
- package/package.json +1 -1
- package/scripts/activites.mjs +60 -21
- package/scripts/arbres-juges.mjs +59 -0
- package/scripts/attente-a-l-arret.mjs +29 -52
- package/scripts/attente-au-tour.mjs +8 -26
- package/scripts/avancement.mjs +2 -38
- package/scripts/branche-de-nuit.mjs +14 -45
- package/scripts/ci-de-main.mjs +273 -0
- package/scripts/circuit.mjs +204 -64
- package/scripts/circuits-cles.d.mts +9 -0
- package/scripts/circuits-cles.mjs +38 -0
- package/scripts/coeurs-dedies.mjs +4 -3
- package/scripts/dernier-vert.mjs +78 -10
- package/scripts/enveloppe/travail-de-la-copie.mjs +5 -2
- package/scripts/etapes.mjs +7 -2
- package/scripts/faits-du-circuit.mjs +63 -28
- package/scripts/fichiers-nommes.mjs +55 -0
- package/scripts/file-des-tickets.d.mts +17 -0
- package/scripts/file-des-tickets.mjs +39 -0
- package/scripts/grillhouse-maj.mjs +20 -1
- package/scripts/integration/file.mjs +137 -592
- package/scripts/integration/integrer.mjs +10 -7
- package/scripts/langages/c/binaires.json +4 -0
- package/scripts/langages/c/binaires.mjs +83 -0
- package/scripts/langages/c/clang-format.mjs +62 -0
- package/scripts/langages/c/clang-tidy.mjs +93 -0
- package/scripts/langages/c/clang.mjs +42 -0
- package/scripts/langages/c/commandes.mjs +530 -0
- package/scripts/langages/c/composants.mjs +209 -0
- package/scripts/langages/c/exemples.mjs +250 -0
- package/scripts/langages/c/index-interfaces.mjs +77 -0
- package/scripts/langages/c/index.mjs +120 -0
- package/scripts/langages/c/lot.mjs +41 -0
- package/scripts/langages/c/mise-a-jour.mjs +70 -0
- package/scripts/langages/c/squelette.mjs +61 -0
- package/scripts/langages/c/verdict.mjs +99 -0
- package/scripts/langages/cargo/clippy.mjs +16 -9
- package/scripts/langages/cargo/commandes.mjs +7 -2
- package/scripts/langages/cargo/sccache.mjs +19 -6
- package/scripts/langages/typescript/tests.mjs +31 -5
- package/scripts/langages/typescript/turbo-des-paquets.mjs +67 -8
- package/scripts/langages/typescript/vitest-config/changements.mjs +32 -3
- package/scripts/langages/typescript/vitest-config/lances.mjs +16 -0
- package/scripts/langages-des-paquets.mjs +30 -2
- package/scripts/langages.mjs +1 -0
- package/scripts/limite-d-usage.mjs +88 -0
- package/scripts/mesure/avancement.mjs +1 -1
- package/scripts/migrations/0.47.0-ci-de-main.mjs +48 -0
- package/scripts/migrations.mjs +2 -2
- package/scripts/outils-cles.d.mts +13 -5
- package/scripts/outils-cles.mjs +157 -17
- package/scripts/passe-de-la-machine.mjs +26 -2
- package/scripts/places-de-la-machine.mjs +52 -6
- package/scripts/plafond-de-la-machine.d.mts +10 -2
- package/scripts/plafond-de-la-machine.mjs +39 -13
- package/scripts/reponses-du-circuit.d.mts +16 -0
- package/scripts/reponses-du-circuit.mjs +39 -3
- package/scripts/resultats.mjs +32 -11
- package/scripts/seances.mjs +211 -59
- package/scripts/session-start.sh +2 -11
- package/scripts/sortie.mjs +1 -1
- package/scripts/sous-commandes.mjs +5 -2
- package/scripts/superviseur.mjs +305 -295
- package/scripts/tableau.mjs +73 -45
- package/scripts/transitions.d.mts +22 -1
- package/scripts/transitions.mjs +111 -13
- package/scripts/workflows-du-cadre.mjs +21 -1
- package/skills/explorateur/SKILL.md +34 -13
- package/skills/grill/SKILL.md +6 -5
- package/skills/pitmaster/SKILL.md +33 -27
- package/skills/redacteur/references/documents-d-un-composant.md +1 -1
- package/skills/relecteur/SKILL.md +6 -0
- package/skills/testwriter/SKILL.md +4 -0
- package/scripts/ci-des-branches.mjs +0 -93
- package/scripts/migrations/0.33.0-ci-des-branches-de-ticket.mjs +0 -31
package/scripts/etapes.mjs
CHANGED
|
@@ -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 :
|
|
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
|
],
|
|
@@ -142,6 +142,9 @@ export const ARRETS = {
|
|
|
142
142
|
references: 23,
|
|
143
143
|
'hors-plan': 24,
|
|
144
144
|
inattendu: 25,
|
|
145
|
+
// A session the usage limit stops: the circuit reports itself to the hour the usage returns and
|
|
146
|
+
// resumes the step, no question gone up.
|
|
147
|
+
'limite-d-usage': 26,
|
|
145
148
|
'a-repasser': A_REPASSER,
|
|
146
149
|
};
|
|
147
150
|
|
|
@@ -254,7 +257,7 @@ export const RESPONSABLE = 'responsable';
|
|
|
254
257
|
// The commands by which the supervisor answers a question (scripts/circuit.mjs): resume, extend
|
|
255
258
|
// the plan, stop.
|
|
256
259
|
const REPONSES =
|
|
257
|
-
'Le superviseur répond par une commande du circuit : `--reprendre` (avec `--contexte`) ou `--depuis <testwriter|developpeur>` (avec `--contexte`), `--etendre <paquet>` (le plan gagne ce paquet, puis l’étape en cours reprend), `--reporter <heure>` (la question se tait jusqu’à l’heure, le circuit en attente), ou `--arreter`.';
|
|
260
|
+
'Le superviseur répond par une commande du circuit : `--reprendre` (avec `--contexte`) ou `--depuis <testwriter|developpeur>` (avec `--contexte`), `--mecanique [<commande>]` (avec `--contexte` : à l’arrêt du testwriter qui ne trouve aucun comportement à tester, le ticket bascule en circuit court sur le même plan, vers 1.1 avec sa commande, vers le développeur sans elle), `--etendre <paquet>` (le plan gagne ce paquet, puis l’étape en cours reprend), `--reporter <heure>` (la question se tait jusqu’à l’heure, le circuit en attente), ou `--arreter`.';
|
|
258
261
|
|
|
259
262
|
// The question of each stop no gesture settles, as a CI calls a person only for what no rule
|
|
260
263
|
// settles (the approval of a review): every stop of ARRETS, « a-repasser » once the circuit has
|
|
@@ -298,6 +301,8 @@ export const MONTEES = Object.fromEntries(
|
|
|
298
301
|
'La séance écrit hors du plan du ticket : le plan s’étend-il à ce paquet (`--etendre`), ou l’écriture est-elle refusée (`--reprendre` avec son contexte) ?',
|
|
299
302
|
inattendu:
|
|
300
303
|
'Une exception que le circuit ne prévoit pas (une lecture de la copie, une commande, un fichier illisible) l’a arrêté : sa cause se lève-t-elle, pour reprendre (`--reprendre`, qui écrit de nouveau cet arrêt si la cause reste), ou le circuit s’arrête-t-il ?',
|
|
304
|
+
'limite-d-usage':
|
|
305
|
+
'La limite d’usage arrête la séance : le circuit se reporte seul à l’heure de reprise et reprend l’étape, il ne monte que si le superviseur l’a interrompu ; reprendre avant l’heure, ou arrêter le circuit ?',
|
|
301
306
|
}).map(([arret, question]) => [arret, { question: `${question} ${REPONSES}`, qui: SUPERVISEUR }])
|
|
302
307
|
);
|
|
303
308
|
|
|
@@ -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,
|
|
@@ -73,7 +72,6 @@ import {
|
|
|
73
72
|
ecrireEtat,
|
|
74
73
|
finirLOuverture,
|
|
75
74
|
lireLeFait,
|
|
76
|
-
MEMOIRE,
|
|
77
75
|
monter,
|
|
78
76
|
ouvrirJusquAuPlan,
|
|
79
77
|
publierLArret,
|
|
@@ -84,20 +82,23 @@ import {
|
|
|
84
82
|
} from './circuit.mjs';
|
|
85
83
|
import {
|
|
86
84
|
avancerMain,
|
|
87
|
-
conclureLaCI,
|
|
88
85
|
direLIssue,
|
|
89
86
|
fermerLEntree,
|
|
90
|
-
|
|
91
|
-
lireLesPassagesDeLaCI,
|
|
92
|
-
relireLesLecturesDues,
|
|
87
|
+
jugerLeCandidat,
|
|
93
88
|
outilsDeLaFile,
|
|
94
89
|
preparerLaBranche,
|
|
95
90
|
situerLeLot,
|
|
96
91
|
} from './integration/file.mjs';
|
|
97
|
-
import {
|
|
92
|
+
import {
|
|
93
|
+
ghDans,
|
|
94
|
+
lireLaCiDeMain,
|
|
95
|
+
lotsDepuisLeVert,
|
|
96
|
+
ouvrirLeDefautDeMain,
|
|
97
|
+
} from './ci-de-main.mjs';
|
|
98
98
|
|
|
99
99
|
import { ecrireLEffet } from './effets.mjs';
|
|
100
|
-
import { Arret, geste } from './ticket-du-circuit.mjs';
|
|
100
|
+
import { Arret, commenter, geste } from './ticket-du-circuit.mjs';
|
|
101
|
+
import { arretDeLaLimiteDUsage, MEMOIRE } from './transitions.mjs';
|
|
101
102
|
|
|
102
103
|
// What the workflow keeps of the circuit's memory besides the decisions': the session a relaunch
|
|
103
104
|
// resumes, the rank of arrival, the sort of the ticket, what the opening reads of the project's
|
|
@@ -197,6 +198,14 @@ const optionsDe = reponse => {
|
|
|
197
198
|
destinataire: ['testwriter', 'developpeur'].includes(reponse.role) ? reponse.role : null,
|
|
198
199
|
};
|
|
199
200
|
}
|
|
201
|
+
if (reponse.genre === 'mecanique') {
|
|
202
|
+
// The gesture written by hand goes to the developpeur, who gets the reason as his context.
|
|
203
|
+
return {
|
|
204
|
+
mecanique: { commande: reponse.commande ?? null },
|
|
205
|
+
contexte: contexteDuSuperviseur,
|
|
206
|
+
destinataire: reponse.commande ? null : 'developpeur',
|
|
207
|
+
};
|
|
208
|
+
}
|
|
200
209
|
return { etendre: reponse.paquets, contexte: contexteDuSuperviseur, destinataire: null };
|
|
201
210
|
};
|
|
202
211
|
|
|
@@ -289,7 +298,9 @@ const ACTES = {
|
|
|
289
298
|
const avec = fait === 'seance' ? { ...parametres, precedent, annulation } : parametres;
|
|
290
299
|
try {
|
|
291
300
|
const valeur = await lireLeFait(ctx, fait, avec, faits);
|
|
292
|
-
|
|
301
|
+
// The plan as the fact leaves it: a session may extend it (a write in a file the ticket
|
|
302
|
+
// names), which the workflow keeps for the acts after.
|
|
303
|
+
return { valeur: valeur ?? null, memoire: laMemoire(ctx), paquets: ctx.paquets };
|
|
293
304
|
} catch (e) {
|
|
294
305
|
if (!(e instanceof Arret)) {
|
|
295
306
|
throw e;
|
|
@@ -298,6 +309,7 @@ const ACTES = {
|
|
|
298
309
|
return {
|
|
299
310
|
leve: { nom, rapport, rouges, motif, resultat, piece, question, qui, etape },
|
|
300
311
|
memoire: laMemoire(ctx),
|
|
312
|
+
paquets: ctx.paquets,
|
|
301
313
|
};
|
|
302
314
|
}
|
|
303
315
|
});
|
|
@@ -317,6 +329,14 @@ const ACTES = {
|
|
|
317
329
|
return rendre(ctx, () => {
|
|
318
330
|
const a = publierLArret(ctx, erreurDe(ctx, arret), etat);
|
|
319
331
|
finirLEtape(ctx, menee ?? null);
|
|
332
|
+
if (a.nom === 'limite-d-usage' && !aMonter) {
|
|
333
|
+
// The usage limit is no question: the circuit reports itself (the workflow waits for the
|
|
334
|
+
// hour the usage returns), the report said at the ticket.
|
|
335
|
+
const l = arretDeLaLimiteDUsage(a.etat, arret.leve.resultat);
|
|
336
|
+
commenter(ctx, 'limite-d-usage', l.commentaire);
|
|
337
|
+
aLaFin(ctx, l.code);
|
|
338
|
+
return { code: l.code, nom: l.nom, question: null, etat: l.etat };
|
|
339
|
+
}
|
|
320
340
|
if (a.nom === 'a-repasser' && !aMonter) {
|
|
321
341
|
geste(ctx, 'a-repasser');
|
|
322
342
|
aLaFin(ctx, a.code);
|
|
@@ -448,29 +468,44 @@ Object.assign(ACTES, {
|
|
|
448
468
|
const o = laFile(racine);
|
|
449
469
|
return { ...fermerLEntree(o, { ticket, branche, commit }), effets: o.rendus };
|
|
450
470
|
},
|
|
451
|
-
//
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
const
|
|
455
|
-
|
|
456
|
-
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 };
|
|
457
476
|
},
|
|
458
|
-
// The
|
|
459
|
-
|
|
460
|
-
|
|
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' };
|
|
500
|
+
},
|
|
501
|
+
async 'inscrire-flux-de-main'() {
|
|
461
502
|
return null;
|
|
462
503
|
},
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
const o = laFile(racine);
|
|
466
|
-
return {
|
|
467
|
-
...relireLesLecturesDues(o, { maintenant, ci }),
|
|
468
|
-
effets: o.rendus,
|
|
469
|
-
};
|
|
504
|
+
async 'relire-flux-de-main'() {
|
|
505
|
+
return { dues: 0, effets: [] };
|
|
470
506
|
},
|
|
471
|
-
async conclure(
|
|
472
|
-
|
|
473
|
-
return { ...conclureLaCI(o, e), effets: o.rendus };
|
|
507
|
+
async conclure() {
|
|
508
|
+
return { avancer: true, effets: [] };
|
|
474
509
|
},
|
|
475
510
|
// One effect an act of the queue gave back, under the key of its activity, with the outcome of
|
|
476
511
|
// the queue when it is not written (`ecrireLEffet`).
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
// The files a ticket's description names: a path written from the root, between backticks or bare,
|
|
2
|
+
// in its « Architecture » section or in an acceptance criterion. A file named there is one the
|
|
3
|
+
// ticket's plan covers by its own word: a write out of the plan in it extends the plan, with the
|
|
4
|
+
// piece that names it. A parent directory, a base name alone, another section, and the documents
|
|
5
|
+
// the responsable owns (ARCHITECTURE.md, CADRE.md, INTERFACE.md) are not named.
|
|
6
|
+
|
|
7
|
+
const DOCUMENTS_DU_RESPONSABLE = /(^|\/)(ARCHITECTURE|CADRE|INTERFACE)\.md$/;
|
|
8
|
+
|
|
9
|
+
// The path <chemin> as a token of <ligne>: delimited by a space, a backtick, a quote, a bracket or
|
|
10
|
+
// a comma around it, or by a closing full stop, a colon or a semicolon after it.
|
|
11
|
+
function figureDans(ligne, chemin) {
|
|
12
|
+
const echappe = chemin.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
13
|
+
return new RegExp(`(^|[\\s\`'"(\\[,])${echappe}($|[\\s\`'")\\],;:]|\\.(\\s|$))`).test(ligne);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* The piece (`{ piece }`, « ticket, § Architecture » or « ticket, critère N ») by which the
|
|
18
|
+
* description <description> names the file <chemin>, or null when it does not.
|
|
19
|
+
*/
|
|
20
|
+
export function fichierNommeAuTicket(description, chemin) {
|
|
21
|
+
if (!chemin || DOCUMENTS_DU_RESPONSABLE.test(chemin)) {
|
|
22
|
+
return null;
|
|
23
|
+
}
|
|
24
|
+
let section = null;
|
|
25
|
+
let critere = null;
|
|
26
|
+
for (const ligne of String(description ?? '').split('\n')) {
|
|
27
|
+
const titre = /^#{1,6}\s+(.*?)\s*$/.exec(ligne);
|
|
28
|
+
if (titre) {
|
|
29
|
+
const t = titre[1].toLowerCase();
|
|
30
|
+
section = t.startsWith('architecture')
|
|
31
|
+
? 'architecture'
|
|
32
|
+
: t.startsWith('crit')
|
|
33
|
+
? 'criteres'
|
|
34
|
+
: null;
|
|
35
|
+
critere = null;
|
|
36
|
+
continue;
|
|
37
|
+
}
|
|
38
|
+
if (section === 'criteres') {
|
|
39
|
+
const numero = /^\s{0,3}(\d+)[.)]\s/.exec(ligne);
|
|
40
|
+
if (numero) {
|
|
41
|
+
critere = numero[1];
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
if (!figureDans(ligne, chemin)) {
|
|
45
|
+
continue;
|
|
46
|
+
}
|
|
47
|
+
if (section === 'architecture') {
|
|
48
|
+
return { piece: 'ticket, § Architecture' };
|
|
49
|
+
}
|
|
50
|
+
if (section === 'criteres' && critere) {
|
|
51
|
+
return { piece: `ticket, critère ${critere}` };
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
return null;
|
|
55
|
+
}
|
|
@@ -31,6 +31,23 @@ export function attentesExternes(
|
|
|
31
31
|
o?: { enCours?: Set<string>; externes?: Record<string, TicketDeBeads[]> }
|
|
32
32
|
): Array<{ ticket: string; attend: string; faute: string | null }>;
|
|
33
33
|
|
|
34
|
+
/**
|
|
35
|
+
* The circuits that hold a place in the limit of the project: those that work, those resumed and
|
|
36
|
+
* waiting for their place of the machine, and those stopped on a question to the supervisor (no
|
|
37
|
+
* recipient, or « superviseur »); the question to the owner, the ticket deferred and the wait for
|
|
38
|
+
* another project release it. `superviseur`: those of `tenant` that wait for the supervisor.
|
|
39
|
+
*/
|
|
40
|
+
export function circuitsDeLaLimite(
|
|
41
|
+
circuits: Array<{
|
|
42
|
+
ticket: string;
|
|
43
|
+
etape?: string | null;
|
|
44
|
+
question?: { qui?: string } | null;
|
|
45
|
+
report?: object | null;
|
|
46
|
+
}>,
|
|
47
|
+
tous: TicketDeBeads[],
|
|
48
|
+
o?: { externes?: Record<string, TicketDeBeads[]> }
|
|
49
|
+
): { tenant: string[]; superviseur: string[] };
|
|
50
|
+
|
|
34
51
|
/** The tickets of <tous> in the queue that never start for want of their section « ## Architecture ». */
|
|
35
52
|
export function enFileSansArchitecture<T extends TicketDeBeads>(
|
|
36
53
|
tous: T[],
|
|
@@ -143,6 +143,45 @@ export function fermesHorsCircuit(tous, circuits) {
|
|
|
143
143
|
.sort();
|
|
144
144
|
}
|
|
145
145
|
|
|
146
|
+
/**
|
|
147
|
+
* The circuits of <circuits> that hold a place in the limit of the project (`grillhouse.circuits`),
|
|
148
|
+
* as a Kanban limit of work in progress keeps a blocked card in it: a circuit that works, one
|
|
149
|
+
* resumed and waiting for its place of the machine, and one stopped on a question to the
|
|
150
|
+
* supervisor (no recipient, or `qui` « superviseur »). A question to the owner, a ticket deferred
|
|
151
|
+
* (`--reporter`) and a wait for another project release their place. Each circuit is judged by
|
|
152
|
+
* its own memo, read again at every wake of the queue.
|
|
153
|
+
* @param {Array<{ ticket: string, etape?: string | null, question?: { qui?: string } | null }>} circuits
|
|
154
|
+
* the circuits alive, each with its memo
|
|
155
|
+
* @param {Parameters<typeof ticketsAPartir>[0]} tous every ticket of the project
|
|
156
|
+
* @param {{ externes?: Record<string, typeof tous> }} [o]
|
|
157
|
+
* @returns {{ tenant: string[], superviseur: string[] }} the circuits that hold the limit, and
|
|
158
|
+
* among them those that wait for the supervisor, each sorted
|
|
159
|
+
*/
|
|
160
|
+
export function circuitsDeLaLimite(circuits, tous, { externes } = {}) {
|
|
161
|
+
const parId = new Map(tous.map(t => [t.id, t]));
|
|
162
|
+
const tenant = [];
|
|
163
|
+
const superviseur = [];
|
|
164
|
+
for (const c of circuits) {
|
|
165
|
+
const t = parId.get(c.ticket);
|
|
166
|
+
if (t && (t.status === 'deferred' || attendDeLAutreProjet(t, externes).length > 0)) {
|
|
167
|
+
continue;
|
|
168
|
+
}
|
|
169
|
+
// A circuit reported for the usage limit (its kept report) waits for an hour, as a ticket
|
|
170
|
+
// deferred does: it releases its place.
|
|
171
|
+
if (c.report) {
|
|
172
|
+
continue;
|
|
173
|
+
}
|
|
174
|
+
if (c.question) {
|
|
175
|
+
if (c.question.qui === 'responsable') {
|
|
176
|
+
continue;
|
|
177
|
+
}
|
|
178
|
+
superviseur.push(c.ticket);
|
|
179
|
+
}
|
|
180
|
+
tenant.push(c.ticket);
|
|
181
|
+
}
|
|
182
|
+
return { tenant: tenant.sort(), superviseur: superviseur.sort() };
|
|
183
|
+
}
|
|
184
|
+
|
|
146
185
|
/**
|
|
147
186
|
* The tickets of <tous> in the queue that never start for want of their section
|
|
148
187
|
* « ## Architecture », their dependencies open or closed, sorted by id.
|
|
@@ -166,7 +166,13 @@ import { migrer, restesAuProjet } from './migrations.mjs';
|
|
|
166
166
|
import { langageDe, langagesDe } from './langages.mjs';
|
|
167
167
|
import * as langagesDansLArchitecture from './migrations/0.27.0-langages-dans-l-architecture.mjs';
|
|
168
168
|
import { CONFIG_BEADS, ecrireLePrefixe, prefixe, prefixeDuStore } from './prefixe-des-tickets.mjs';
|
|
169
|
-
import {
|
|
169
|
+
import { paquets } from './paquets.mjs';
|
|
170
|
+
import {
|
|
171
|
+
NOM_MACHINE_VIERGE,
|
|
172
|
+
poserLesWorkflows,
|
|
173
|
+
poseraLaMachineVierge,
|
|
174
|
+
WORKFLOWS,
|
|
175
|
+
} from './workflows-du-cadre.mjs';
|
|
170
176
|
|
|
171
177
|
const SCRIPTS = {
|
|
172
178
|
tableau: 'grillhouse tableau --texte',
|
|
@@ -507,6 +513,19 @@ export function mettreAJour(projet, source, { inscrite = VERSION, bd = jouerBd }
|
|
|
507
513
|
sansVerifier: bilan.duLangage.sansVerifier ?? part.sansVerifier,
|
|
508
514
|
};
|
|
509
515
|
}
|
|
516
|
+
// The workflow « machine vierge » that the update poses is declared with every package of the
|
|
517
|
+
// project's graph; an entry already declared stays as it is.
|
|
518
|
+
const fichierVierge = `${WORKFLOWS}/${NOM_MACHINE_VIERGE}`;
|
|
519
|
+
if (
|
|
520
|
+
p.grillhouse?.flux?.[fichierVierge] === undefined &&
|
|
521
|
+
poseraLaMachineVierge(projet, source)
|
|
522
|
+
) {
|
|
523
|
+
const noms = [...new Set(paquets(projet).map(q => q.pkg.name))].sort();
|
|
524
|
+
p.grillhouse = {
|
|
525
|
+
...(p.grillhouse ?? {}),
|
|
526
|
+
flux: { ...(p.grillhouse?.flux ?? {}), [fichierVierge]: noms },
|
|
527
|
+
};
|
|
528
|
+
}
|
|
510
529
|
writeFileSync(pkg, `${JSON.stringify(p, null, 2)}\n`);
|
|
511
530
|
// The flows of the CI without entry in `grillhouse.flux` (the guard's read), with the entries
|
|
512
531
|
// already declared, which the command of the report keeps.
|