@roomi-fields/grillhouse 0.54.0 → 0.55.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.
- package/.claude-plugin/plugin.json +1 -1
- package/CHANGELOG.md +75 -0
- package/cadre/templates/projet/.github/workflows/ci.yml +4 -2
- package/cadre/templates/projet/.github/workflows/machine-vierge.yml +5 -42
- package/cadre/templates/projet/CONTRIBUTING.md +0 -5
- package/cadre/templates/projet/README.md +0 -126
- package/cadre/templates/projet/_npmignore +1 -6
- package/cadre/templates/projet/package.json +5 -32
- package/cadre/templates/projet/tsconfig.json +4 -4
- package/cadre/templates/projet/vitest.config.cjs +3 -2
- package/charte/tests.md +14 -0
- package/dist/machine/part-par-sorte.d.ts +9 -9
- package/dist/machine/part-par-sorte.js +20 -24
- package/dist/machine/part-par-sorte.js.map +1 -1
- package/dist/machine/table-des-consommations.d.ts +65 -0
- package/dist/machine/table-des-consommations.js +94 -0
- package/dist/machine/table-des-consommations.js.map +1 -0
- package/dist/temporal/circuit/activites.d.ts +2 -0
- package/dist/temporal/circuit/activites.js +87 -3
- package/dist/temporal/circuit/activites.js.map +1 -1
- package/dist/temporal/circuit/client.js +9 -4
- package/dist/temporal/circuit/client.js.map +1 -1
- package/dist/temporal/circuit/contrat.d.ts +32 -4
- package/dist/temporal/circuit/deroule.js +54 -4
- package/dist/temporal/circuit/deroule.js.map +1 -1
- package/dist/temporal/circuit/versions.d.ts +12 -0
- package/dist/temporal/circuit/versions.js +22 -0
- package/dist/temporal/circuit/versions.js.map +1 -0
- package/dist/temporal/consommation/activites.d.ts +2 -0
- package/dist/temporal/consommation/activites.js +9 -0
- package/dist/temporal/consommation/activites.js.map +1 -0
- package/dist/temporal/consommation/actualisation.d.ts +2 -0
- package/dist/temporal/consommation/actualisation.js +71 -0
- package/dist/temporal/consommation/actualisation.js.map +1 -0
- package/dist/temporal/consommation/client.d.ts +12 -0
- package/dist/temporal/consommation/client.js +28 -0
- package/dist/temporal/consommation/client.js.map +1 -0
- package/dist/temporal/consommation/commande.d.ts +5 -0
- package/dist/temporal/consommation/commande.js +32 -0
- package/dist/temporal/consommation/commande.js.map +1 -0
- package/dist/temporal/consommation/contrat.d.ts +15 -0
- package/dist/temporal/consommation/contrat.js +13 -0
- package/dist/temporal/consommation/contrat.js.map +1 -0
- package/dist/temporal/consommation/deroule.d.ts +2 -0
- package/dist/temporal/consommation/deroule.js +14 -0
- package/dist/temporal/consommation/deroule.js.map +1 -0
- package/dist/temporal/deroules.d.ts +2 -1
- package/dist/temporal/deroules.js +3 -2
- package/dist/temporal/deroules.js.map +1 -1
- package/dist/temporal/file/contrat.d.ts +2 -0
- package/dist/temporal/file/deroule.js +14 -4
- package/dist/temporal/file/deroule.js.map +1 -1
- package/dist/temporal/installation.d.ts +6 -0
- package/dist/temporal/installation.js +15 -0
- package/dist/temporal/installation.js.map +1 -1
- package/dist/temporal/nuits/activites.d.ts +2 -1
- package/dist/temporal/nuits/activites.js +127 -3
- package/dist/temporal/nuits/activites.js.map +1 -1
- package/dist/temporal/nuits/client.d.ts +19 -5
- package/dist/temporal/nuits/client.js +33 -23
- package/dist/temporal/nuits/client.js.map +1 -1
- package/dist/temporal/nuits/commande.js +16 -11
- package/dist/temporal/nuits/commande.js.map +1 -1
- package/dist/temporal/nuits/contrat.d.ts +29 -0
- package/dist/temporal/nuits/contrat.js +10 -0
- package/dist/temporal/nuits/contrat.js.map +1 -1
- package/dist/temporal/nuits/deroule.d.ts +5 -0
- package/dist/temporal/nuits/deroule.js +18 -1
- package/dist/temporal/nuits/deroule.js.map +1 -1
- package/dist/temporal/nuits/pc2.d.ts +72 -0
- package/dist/temporal/nuits/pc2.js +206 -0
- package/dist/temporal/nuits/pc2.js.map +1 -0
- package/dist/temporal/places/activites.d.ts +23 -1
- package/dist/temporal/places/activites.js +38 -2
- package/dist/temporal/places/activites.js.map +1 -1
- package/dist/temporal/places/client.d.ts +16 -0
- package/dist/temporal/places/client.js +25 -1
- package/dist/temporal/places/client.js.map +1 -1
- package/dist/temporal/places/contrat.d.ts +79 -14
- package/dist/temporal/places/contrat.js +7 -0
- package/dist/temporal/places/contrat.js.map +1 -1
- package/dist/temporal/places/deroule.js +159 -23
- package/dist/temporal/places/deroule.js.map +1 -1
- package/dist/temporal/places/reservation.d.ts +54 -0
- package/dist/temporal/places/reservation.js +69 -0
- package/dist/temporal/places/reservation.js.map +1 -0
- package/dist/temporal/planification.d.ts +6 -0
- package/dist/temporal/planification.js +26 -0
- package/dist/temporal/planification.js.map +1 -0
- package/dist/temporal/tickets/activites.d.ts +0 -2
- package/dist/temporal/tickets/activites.js +2 -52
- package/dist/temporal/tickets/activites.js.map +1 -1
- package/dist/temporal/tickets/contrat.d.ts +7 -26
- package/dist/temporal/tickets/deroule.js +35 -23
- package/dist/temporal/tickets/deroule.js.map +1 -1
- package/dist/temporal/travailleur.js +2 -0
- package/dist/temporal/travailleur.js.map +1 -1
- package/docs/ARCHITECTURE.md +2 -2
- package/docs/CADRE.md +1 -1
- package/docs/INTERFACE.md +16 -11
- package/docs/architecture/circuit.md +62 -58
- package/docs/architecture/entree.md +87 -63
- package/docs/architecture/greffon.md +32 -27
- package/docs/architecture/installation.md +43 -32
- package/docs/architecture/machine.md +48 -40
- package/docs/architecture/tests.md +37 -33
- package/docs/lexique.md +4 -3
- package/package.json +1 -1
- package/scripts/activites.mjs +351 -180
- package/scripts/aiguillage.mjs +1 -0
- package/scripts/attente-de-la-machine.mjs +3 -22
- package/scripts/avancement.mjs +21 -30
- package/scripts/bilan.mjs +22 -2
- package/scripts/branche-de-nuit.mjs +1 -1
- package/scripts/circuit.mjs +75 -39
- package/scripts/codes-de-sortie.mjs +0 -6
- package/scripts/consommation-des-passes.mjs +67 -31
- package/scripts/consommation.mjs +152 -24
- package/scripts/copies-finies.mjs +15 -35
- package/scripts/dernier-vert.mjs +4 -5
- package/scripts/dette.mjs +5 -3
- package/scripts/droits.mjs +2 -2
- package/scripts/echantillonneur-de-la-passe.mjs +7 -31
- package/scripts/engendres.mjs +5 -61
- package/scripts/enveloppe/enveloppe.mjs +30 -34
- package/scripts/enveloppe/travail-de-la-copie.mjs +5 -0
- package/scripts/etapes.mjs +21 -7
- package/scripts/etat-du-depot.mjs +61 -0
- package/scripts/faits-du-circuit.mjs +7 -4
- package/scripts/fermeture-de-la-machine.d.mts +6 -4
- package/scripts/fermeture-de-la-machine.mjs +12 -16
- package/scripts/fichier-du-poste.d.mts +9 -0
- package/scripts/file-des-tickets.d.mts +0 -18
- package/scripts/file-des-tickets.mjs +0 -42
- package/scripts/fusion-du-changelog.mjs +1 -1
- package/scripts/greffons.mjs +282 -17
- package/scripts/grillhouse-maj.mjs +1 -1
- package/scripts/index-des-rouges.d.mts +40 -0
- package/scripts/index-des-rouges.mjs +104 -0
- package/scripts/integration/file.mjs +13 -63
- package/scripts/integration/integrer.mjs +157 -424
- package/scripts/integration/jugement.mjs +109 -0
- package/scripts/integration/rejeu.mjs +94 -71
- package/scripts/jointure.d.ts +34 -27
- package/scripts/journal-des-etats.d.mts +1 -1
- package/scripts/langages/c/commandes.mjs +27 -12
- package/scripts/langages/cargo/commandes.mjs +148 -94
- package/scripts/langages/cargo/index.mjs +2 -1
- package/scripts/langages/cargo/lectures-des-tests.mjs +132 -0
- package/scripts/langages/cargo/migrations/lectures-des-tests.mjs +31 -0
- package/scripts/langages/python/commandes.mjs +31 -15
- package/scripts/langages/python/index.mjs +2 -1
- package/scripts/langages/python/lectures-des-tests.mjs +148 -0
- package/scripts/langages/python/migrations/lectures-des-tests.mjs +31 -0
- package/scripts/langages/typescript/consommateurs-arbitres.mjs +2 -2
- package/scripts/langages/typescript/index.mjs +4 -0
- package/scripts/langages/typescript/lectures-des-tests.mjs +95 -0
- package/scripts/langages/typescript/migrations/lectures-des-tests.mjs +31 -0
- package/scripts/langages/typescript/tests-de-nuit.mjs +9 -15
- package/scripts/langages/typescript/tests.mjs +11 -37
- package/scripts/langages/typescript/titres-de-tests.mjs +5 -4
- package/scripts/langages/typescript/verifier.mjs +74 -44
- package/scripts/langages/typescript/vitest-config/base.mjs +3 -3
- package/scripts/langages/typescript/vitest-config/machine.setup.mjs +6 -25
- package/scripts/lectures-communes.mjs +234 -0
- package/scripts/machine.mjs +11 -18
- package/scripts/mesure/base-de-passe.mjs +1 -2
- package/scripts/mesure-de-la-machine.d.mts +40 -3
- package/scripts/mesure-de-la-machine.mjs +201 -11
- package/scripts/migrations/0.33.0-ci-du-cadre.mjs +3 -3
- package/scripts/migrations/nuit-yml-retire.mjs +25 -0
- package/scripts/migrations/part-retiree.mjs +31 -0
- package/scripts/migrations.mjs +4 -0
- package/scripts/montee.mjs +22 -1
- package/scripts/nuit-de-pc2.mjs +628 -0
- package/scripts/nuit.sh +8 -131
- package/scripts/paquets.mjs +1 -1
- package/scripts/passe-de-la-machine.mjs +340 -103
- package/scripts/place-du-circuit.d.mts +15 -0
- package/scripts/place-du-circuit.mjs +32 -0
- package/scripts/places-de-la-machine.mjs +148 -626
- package/scripts/places-du-serveur.mjs +26 -13
- package/scripts/plafond-de-la-machine.d.mts +8 -13
- package/scripts/plafond-de-la-machine.mjs +26 -56
- package/scripts/registre-des-entrees.mjs +57 -0
- package/scripts/regles-des-places.d.mts +82 -50
- package/scripts/regles-des-places.mjs +192 -156
- package/scripts/retirer-copie.sh +9 -2
- package/scripts/seances.mjs +181 -63
- package/scripts/secours.mjs +95 -0
- package/scripts/services-du-noyau.mjs +11 -19
- package/scripts/sous-commandes.mjs +1 -0
- package/scripts/sous-modules.sh +1 -1
- package/scripts/superviseur.mjs +98 -20
- package/scripts/table-des-consommations.d.mts +9 -0
- package/scripts/table-des-consommations.mjs +35 -0
- package/scripts/tableau.mjs +33 -19
- package/scripts/taches-du-graphe.mjs +124 -2
- package/scripts/transitions.d.mts +27 -5
- package/scripts/transitions.mjs +122 -104
- package/scripts/verdict-de-la-nuit.d.mts +13 -0
- package/scripts/verdict-de-la-nuit.mjs +34 -7
- package/scripts/verrou-de-fichier.mjs +1 -2
- package/scripts/workflows-du-cadre.mjs +2 -2
- package/skills/developpeur/SKILL.md +8 -2
- package/skills/direct/SKILL.md +5 -0
- package/skills/explorateur/SKILL.md +10 -1
- package/skills/grill/SKILL.md +2 -4
- package/skills/pitmaster/SKILL.md +14 -7
- package/skills/pitmaster/references/consigne-agent.md +1 -1
- package/skills/relecteur/SKILL.md +4 -1
- package/skills/testwriter/SKILL.md +15 -2
- package/cadre/templates/projet/.env.example +0 -57
- package/cadre/templates/projet/.github/workflows/nuit.yml +0 -139
- package/cadre/templates/projet/deployment/README.md +0 -98
- package/cadre/templates/projet/deployment/docs/01-INSTALL.md +0 -145
- package/cadre/templates/projet/deployment/docs/02-CONFIGURATION.md +0 -117
- package/cadre/templates/projet/deployment/docs/03-API.md +0 -264
- package/cadre/templates/projet/deployment/docs/04-TROUBLESHOOTING.md +0 -262
- package/cadre/templates/projet/deployment/scripts/install.ps1 +0 -100
- package/cadre/templates/projet/deployment/scripts/start.ps1 +0 -61
- package/cadre/templates/projet/deployment/scripts/stop.ps1 +0 -37
- package/cadre/templates/projet/deployment/scripts/test.ps1 +0 -118
- package/cadre/templates/projet/ecosystem.config.cjs +0 -73
- package/cadre/templates/projet/src/config.ts +0 -68
- package/cadre/templates/projet/src/errors.ts +0 -102
- package/cadre/templates/projet/src/index.ts +0 -46
- package/cadre/templates/projet/src/services/.gitkeep +0 -8
- package/cadre/templates/projet/src/types/index.ts +0 -24
- package/cadre/templates/projet/src/utils/logger.ts +0 -106
- package/cadre/templates/projet/tests/unit/config.spec.ts +0 -68
- package/cadre/templates/projet/tests/unit/errors.spec.ts +0 -132
- package/cadre/templates/projet/tests/unit/types.spec.ts +0 -73
- package/cadre/templates/projet/tsconfig.build.json +0 -14
- package/scripts/flux-de-la-nuit.mjs +0 -39
- package/scripts/garde-de-la-memoire.mjs +0 -231
- package/scripts/repli-de-la-nuit.mjs +0 -184
package/scripts/transitions.mjs
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
// - `etat`, the run at its step: `{ etape, tentative, rapport, finale, relanceSurLeRefus }`;
|
|
12
12
|
// - `memoire`, what the circuit keeps between steps (`controlesRouges`, `renvoiAuTestwriter`,
|
|
13
13
|
// `refus`, `rienALivrer`, `regeneration`, `regenereSur`, `aRegenerer`, `verifie`,
|
|
14
|
-
// `
|
|
14
|
+
// `constats`);
|
|
15
15
|
// - `ticket`, `{ id, paquets, sorte, copie, circuit }`, `circuit` being `long`, `court` or
|
|
16
16
|
// `direct` (without it, the rule decides as a long or short circuit);
|
|
17
17
|
// - `reprend`, whether this step is the first of a `--reprendre`;
|
|
@@ -37,16 +37,23 @@ import {
|
|
|
37
37
|
boucle,
|
|
38
38
|
DEMANDE_UN_PLAN,
|
|
39
39
|
joue,
|
|
40
|
-
LOT_NE_S_APPLIQUE_PAS,
|
|
41
40
|
nomDuRole,
|
|
41
|
+
phaseDeLaSeance,
|
|
42
42
|
RESPONSABLE,
|
|
43
43
|
SUITE,
|
|
44
44
|
} from './etapes.mjs';
|
|
45
|
+
import { guideDeLIndex, ligneDeLEntree } from './index-des-rouges.mjs';
|
|
45
46
|
import { attribuerLeRouge, departDepuis, refusDeLaReprise } from './reprise.mjs';
|
|
46
47
|
|
|
47
48
|
// The resumptions `--depuis` names and the one rule that accepts them (./reprise.mjs), as the
|
|
48
49
|
// workflow of a ticket reads them.
|
|
49
50
|
export { ETAPES_DE_REPRISE } from './reprise.mjs';
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Whether the lot out of the rule `hors` (`{ fichiers, rendus }`) holds a file the circuit did not
|
|
54
|
+
* give back: the one case the step goes back to its author.
|
|
55
|
+
*/
|
|
56
|
+
export const resteAuLot = hors => hors.fichiers.some(c => !(hors.rendus ?? []).includes(c));
|
|
50
57
|
export { refusDeLaReprise };
|
|
51
58
|
|
|
52
59
|
/**
|
|
@@ -68,6 +75,11 @@ export const circuitDeLaSorte = sorte => {
|
|
|
68
75
|
export const circuitSuivant = (circuit, sorte) =>
|
|
69
76
|
circuit === 'direct' ? circuit : circuitDeLaSorte(sorte);
|
|
70
77
|
|
|
78
|
+
// The stop of a circuit reopened on the old form of the reds (their whole output in
|
|
79
|
+
// `controlesRouges`, without the mark): no reader reads both forms.
|
|
80
|
+
const FORME_ANCIENNE =
|
|
81
|
+
"La mémoire du circuit garde les rouges sous leur ancienne forme (la sortie entière, sans l'index) : aucun lecteur ne la lit. La passe finale les redonne (`--depuis <rôle>`).";
|
|
82
|
+
|
|
71
83
|
// What the circuit keeps between steps, which the decisions read and change: the one list the
|
|
72
84
|
// opening reads back (scripts/faits-du-circuit.mjs `GARDEE`) and the memo of a circuit keeps
|
|
73
85
|
// (src/temporal/circuit/contrat.ts `etatPourLeMemo`).
|
|
@@ -80,7 +92,6 @@ export const MEMOIRE = [
|
|
|
80
92
|
'regenereSur',
|
|
81
93
|
'aRegenerer',
|
|
82
94
|
'verifie',
|
|
83
|
-
'toursDeLaPasseFinale',
|
|
84
95
|
'constats',
|
|
85
96
|
'verts',
|
|
86
97
|
'reprise',
|
|
@@ -119,11 +130,6 @@ export const [
|
|
|
119
130
|
export const RELANCES_TESTWRITER = boucle('tests').max - 1;
|
|
120
131
|
export const SEANCES_DEVELOPPEUR = boucle('code').max;
|
|
121
132
|
export const RELECTURES = boucle('relecture').max;
|
|
122
|
-
// The tours of the cycle ACCEPTÉ → final pass → review the circuit plays before it stops on a
|
|
123
|
-
// question: a lot whose tree never settles between the final pass and the review (a
|
|
124
|
-
// non-deterministic build artifact of the copy, a build output no task declares) would replay
|
|
125
|
-
// the pass and the reviewer without end, so after this many the circuit goes up to the supervisor.
|
|
126
|
-
export const TOURS_DE_LA_PASSE_FINALE = 2;
|
|
127
133
|
|
|
128
134
|
// What changed for a developpeur relaunched on the integration's refusal of the lot he left as it was.
|
|
129
135
|
export const CHANGE_DU_REFUS =
|
|
@@ -266,6 +272,36 @@ export const pasDuPlan = e =>
|
|
|
266
272
|
? 'reponse'
|
|
267
273
|
: 'conclure';
|
|
268
274
|
|
|
275
|
+
/**
|
|
276
|
+
* The phase of the session the step <pas> of the plan launches (the explorateur's, the
|
|
277
|
+
* questionneur's, the explorateur's answer), null for the conclusion, which launches none.
|
|
278
|
+
* @param {'explorateur' | 'questionneur' | 'reponse' | 'conclure'} pas
|
|
279
|
+
* @returns {string | null}
|
|
280
|
+
*/
|
|
281
|
+
export const phaseDuPasDuPlan = pas =>
|
|
282
|
+
pas === 'conclure'
|
|
283
|
+
? null
|
|
284
|
+
: phaseDeLaSeance(pas === 'questionneur' ? pas : 'explorateur', undefined);
|
|
285
|
+
|
|
286
|
+
/**
|
|
287
|
+
* The phase of the session the fact <fait> of a decision launches, with its parameters
|
|
288
|
+
* <parametres> (the role and the object of a session), null for a fact that launches none.
|
|
289
|
+
* @param {string} fait
|
|
290
|
+
* @param {Record<string, unknown>} parametres
|
|
291
|
+
* @returns {string | null}
|
|
292
|
+
*/
|
|
293
|
+
export const phaseDuFait = (fait, parametres) => {
|
|
294
|
+
if (fait === 'seanceDuGeste') {
|
|
295
|
+
return phaseDeLaSeance('explorateur', 'geste');
|
|
296
|
+
}
|
|
297
|
+
return fait === 'seance' && typeof parametres.role === 'string'
|
|
298
|
+
? phaseDeLaSeance(
|
|
299
|
+
parametres.role,
|
|
300
|
+
typeof parametres.objet === 'string' ? parametres.objet : undefined
|
|
301
|
+
)
|
|
302
|
+
: null;
|
|
303
|
+
};
|
|
304
|
+
|
|
269
305
|
// The questions the explorateur answers in the questionneur's sheet <lu>: its questions, or its
|
|
270
306
|
// disagreement as one; none for « AUCUNE ».
|
|
271
307
|
export const questionsPosees = lu =>
|
|
@@ -478,7 +514,6 @@ export function depart({
|
|
|
478
514
|
reprise: null,
|
|
479
515
|
relancesTestwriter: null,
|
|
480
516
|
verifie: null,
|
|
481
|
-
toursDeLaPasseFinale: null,
|
|
482
517
|
constats: [],
|
|
483
518
|
refus: null,
|
|
484
519
|
controlesRouges: null,
|
|
@@ -495,7 +530,7 @@ export function depart({
|
|
|
495
530
|
// After the reviewer asks for a plan (`demande-un-plan`), --reprendre keeps the direct circuit:
|
|
496
531
|
// the agent direct, the findings of that verdict as his task.
|
|
497
532
|
if (etat.etape === RELECTURE && etat.motif === DEMANDE_UN_PLAN) {
|
|
498
|
-
Object.assign(memoire, { verifie: null
|
|
533
|
+
Object.assign(memoire, { verifie: null });
|
|
499
534
|
return { suivant: { etape: CODE, tentative: 1, rapport: null, finale: false }, memoire };
|
|
500
535
|
}
|
|
501
536
|
const compteGarde =
|
|
@@ -526,27 +561,32 @@ export function renvoiDe({ fiche, passation, controlesRouges, fichiersRouges = [
|
|
|
526
561
|
const fichiers = fichiersRouges.length
|
|
527
562
|
? `\n\nLes fichiers de test rouges, tous à lever en une séance : ${fichiersRouges.join(', ')}.`
|
|
528
563
|
: '';
|
|
529
|
-
const controles = controlesRouges
|
|
530
|
-
? `\n\nLa sortie rouge des derniers contrôles :\n\n${
|
|
564
|
+
const controles = marqueDesRouges(controlesRouges)
|
|
565
|
+
? `\n\nLa sortie rouge des derniers contrôles :\n\n${[
|
|
566
|
+
guideDeLIndex(controlesRouges.index, controlesRouges.detail),
|
|
567
|
+
...controlesRouges.index.entrees.map(e => ligneDeLEntree(e, controlesRouges.index.regroupement)),
|
|
568
|
+
].join('\n')}`
|
|
531
569
|
: '';
|
|
532
570
|
return `Le développeur renvoie le rouge qui reste aux tests du lot${raison}.${fichiers}\n\nSa passation :\n\n${passation ?? 'aucune'}${controles}`;
|
|
533
571
|
}
|
|
534
572
|
|
|
535
|
-
//
|
|
536
|
-
// and
|
|
573
|
+
// Whether <controlesRouges> is the mark of the reds a memory keeps (`forme: 'index'`): its index, the
|
|
574
|
+
// fingerprint of their whole text and the address of their detail. Any other value (the whole red
|
|
575
|
+
// output of a circuit opened before the index) is the old form, which no reader reads.
|
|
576
|
+
const marqueDesRouges = controlesRouges =>
|
|
577
|
+
Boolean(controlesRouges) && typeof controlesRouges === 'object' && controlesRouges.forme === 'index';
|
|
578
|
+
|
|
579
|
+
// The test files the mark <controlesRouges> of checks names, each once, in order: the files of the
|
|
580
|
+
// entries of its index that are tests.
|
|
537
581
|
export function fichiersDeTestRouges(controlesRouges) {
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
if (!ligne.startsWith('- test ')) {
|
|
541
|
-
continue;
|
|
542
|
-
}
|
|
543
|
-
const mot = ligne.slice('- test '.length).split(' ')[0];
|
|
544
|
-
const suite = ligne.slice('- test '.length + mot.length).trimStart();
|
|
545
|
-
if (mot && (suite.startsWith('›') || suite.startsWith('—'))) {
|
|
546
|
-
vus.add(mot);
|
|
547
|
-
}
|
|
582
|
+
if (!marqueDesRouges(controlesRouges)) {
|
|
583
|
+
return [];
|
|
548
584
|
}
|
|
549
|
-
return [
|
|
585
|
+
return [
|
|
586
|
+
...new Set(
|
|
587
|
+
controlesRouges.index.entrees.filter(e => e.test && e.fichier).map(e => e.fichier)
|
|
588
|
+
),
|
|
589
|
+
];
|
|
550
590
|
}
|
|
551
591
|
|
|
552
592
|
// The context `--etendre` gives the sessions of the run it resumes on the stop <question>: the
|
|
@@ -772,7 +812,7 @@ function decider({ etat, memoire = {}, ticket, reprend = false }, lire, partiel)
|
|
|
772
812
|
}
|
|
773
813
|
// No checks have run since this session.
|
|
774
814
|
maj.controlesRouges = null;
|
|
775
|
-
if (fiche.horsRole) {
|
|
815
|
+
if (fiche.horsRole && resteAuLot(fiche.horsRole)) {
|
|
776
816
|
return rendreLeLot('testwriter', TESTS, fiche.horsRole);
|
|
777
817
|
}
|
|
778
818
|
commenter('testwriter', `séance ${tentative} finie, sa fiche lue.`);
|
|
@@ -882,8 +922,16 @@ function decider({ etat, memoire = {}, ticket, reprend = false }, lire, partiel)
|
|
|
882
922
|
// integration stop (17, scripts/etapes.mjs), its piece the output.
|
|
883
923
|
return arreter(r.nom, fin(r.sortie, 60), { piece: fin(r.sortie, 30) });
|
|
884
924
|
}
|
|
885
|
-
if (r.
|
|
886
|
-
|
|
925
|
+
if (r.rejuger) {
|
|
926
|
+
// The copy does not hold the commit judged: the final pass judges it again (circuit.md §9.1,
|
|
927
|
+
// point 4).
|
|
928
|
+
maj.verifie = null;
|
|
929
|
+
garderLeVert('passe-finale', null);
|
|
930
|
+
etape = CONTROLES;
|
|
931
|
+
tentative = 0;
|
|
932
|
+
finale = true;
|
|
933
|
+
commenter('integration', `${r.rejuger.split('\n')[0]} : le lot repart à la passe finale.`);
|
|
934
|
+
return decision();
|
|
887
935
|
}
|
|
888
936
|
if (r.code !== 0) {
|
|
889
937
|
return refuser(
|
|
@@ -954,8 +1002,8 @@ function decider({ etat, memoire = {}, ticket, reprend = false }, lire, partiel)
|
|
|
954
1002
|
return decision();
|
|
955
1003
|
}
|
|
956
1004
|
|
|
957
|
-
// A lot that no longer applies on the tip of main (
|
|
958
|
-
//
|
|
1005
|
+
// A lot that no longer applies on the tip of main (in the queue, on a conflict) goes back to the
|
|
1006
|
+
// pass that judges it, whose preparation
|
|
959
1007
|
// advances the copy and plays the gesture `conflit-de-l-avance` on what conflicts, as a merge
|
|
960
1008
|
// queue sends back a lot that no longer applies on its tip: no refusal is kept, and the final
|
|
961
1009
|
// pass played before stands no more. <auteur> signs the line at the ticket, which says <fait>.
|
|
@@ -1020,7 +1068,7 @@ function decider({ etat, memoire = {}, ticket, reprend = false }, lire, partiel)
|
|
|
1020
1068
|
arret: { nom: 'besoin', statut: { role: auteur.role, tentative, fiche } },
|
|
1021
1069
|
});
|
|
1022
1070
|
}
|
|
1023
|
-
if (fiche.horsRole) {
|
|
1071
|
+
if (fiche.horsRole && resteAuLot(fiche.horsRole)) {
|
|
1024
1072
|
return rendreLeLot('developpeur', CODE, fiche.horsRole);
|
|
1025
1073
|
}
|
|
1026
1074
|
// The agent direct writes the tests: no red of his goes to the testwriter.
|
|
@@ -1031,7 +1079,13 @@ function decider({ etat, memoire = {}, ticket, reprend = false }, lire, partiel)
|
|
|
1031
1079
|
// developpeur. `renvoiAuTestwriter` keeps the red output of the checks the sending before
|
|
1032
1080
|
// carried ('' for none), null after green checks: the same output twice in a row is a
|
|
1033
1081
|
// round trip without a new fact.
|
|
1034
|
-
|
|
1082
|
+
// The mark of the reds of the last checks: its fingerprint (the whole text of the reds) is what
|
|
1083
|
+
// two sendings compare. A memory that holds them in the old form is read by no one.
|
|
1084
|
+
const marque = m('controlesRouges');
|
|
1085
|
+
if (marque && !marqueDesRouges(marque)) {
|
|
1086
|
+
return arreter('references', FORME_ANCIENNE);
|
|
1087
|
+
}
|
|
1088
|
+
const sortie = marque?.empreinte ?? '';
|
|
1035
1089
|
const dejaRenvoye = m('renvoiAuTestwriter') !== null;
|
|
1036
1090
|
if (m('renvoiAuTestwriter') === sortie || (dejaRenvoye && testwriterSaute())) {
|
|
1037
1091
|
if (lire('empreinte') === avant) {
|
|
@@ -1132,10 +1186,9 @@ function decider({ etat, memoire = {}, ticket, reprend = false }, lire, partiel)
|
|
|
1132
1186
|
|
|
1133
1187
|
function controles() {
|
|
1134
1188
|
const passeFinale = finale;
|
|
1135
|
-
// The final pass
|
|
1136
|
-
//
|
|
1137
|
-
//
|
|
1138
|
-
// regeneration that changed nothing: none plays, the reds of the checks before standing.
|
|
1189
|
+
// The final pass plays the whole band of the commit of the lot, whatever came before it, as
|
|
1190
|
+
// bors tests the commit that will enter main. The checks of the plan after a regeneration that
|
|
1191
|
+
// changed nothing: none plays, the reds of the checks before standing.
|
|
1139
1192
|
const regeneration = m('regeneration');
|
|
1140
1193
|
maj.regeneration = null;
|
|
1141
1194
|
const nomEtape = passeFinale ? 'passe-finale' : 'controles';
|
|
@@ -1164,22 +1217,23 @@ function decider({ etat, memoire = {}, ticket, reprend = false }, lire, partiel)
|
|
|
1164
1217
|
etape = lire('lotAccepte', { arbre: vert.arbre }) ? INTEGRATION : RELECTURE;
|
|
1165
1218
|
return decision();
|
|
1166
1219
|
}
|
|
1167
|
-
const passe =
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
: lire('passeFinale');
|
|
1220
|
+
const passe = passeFinale ? lire('passeFinale') : { arbre: null, restreinte: null };
|
|
1221
|
+
if (passe.refus) {
|
|
1222
|
+
return refuser(passe.refus.motif, passe.refus.piece);
|
|
1223
|
+
}
|
|
1172
1224
|
const k = lire('controles', {
|
|
1173
1225
|
finale: passeFinale,
|
|
1174
1226
|
restreinte: passe.restreinte,
|
|
1175
|
-
reportes: regeneration?.reportes ?? null,
|
|
1176
|
-
...(reprise ? { fichiers: reprise.fichiers } : {}),
|
|
1227
|
+
reportes: passeFinale ? null : (regeneration?.reportes ?? null),
|
|
1228
|
+
...(reprise && !passeFinale ? { fichiers: reprise.fichiers } : {}),
|
|
1177
1229
|
});
|
|
1178
1230
|
if (k.rouge || k.aRepasser) {
|
|
1179
1231
|
garderLeVert(nomEtape, null);
|
|
1180
1232
|
}
|
|
1181
1233
|
// The output of these checks, red, which a sending to the testwriter carries.
|
|
1182
|
-
maj.controlesRouges = k.rouge
|
|
1234
|
+
maj.controlesRouges = k.rouge
|
|
1235
|
+
? { forme: 'index', index: k.index, empreinte: k.empreinte, detail: k.detail }
|
|
1236
|
+
: null;
|
|
1183
1237
|
// The outcome the bilan reads (scripts/bilan.mjs): with the reds, each its place and its
|
|
1184
1238
|
// text, by which it knows two checks that measured the same thing.
|
|
1185
1239
|
const resultat = issue => ({
|
|
@@ -1349,9 +1403,7 @@ function decider({ etat, memoire = {}, ticket, reprend = false }, lire, partiel)
|
|
|
1349
1403
|
// The red goes back to the step that carries it, by the files it names (scripts/reprise.mjs).
|
|
1350
1404
|
const portes =
|
|
1351
1405
|
k.rouge && suivante <= SEANCES_DEVELOPPEUR ? lire('portes', { lieux: k.lieux }) : null;
|
|
1352
|
-
const a = portes
|
|
1353
|
-
? attribuerLeRouge({ lieux: k.lieux, portes, circuit: ticket.circuit })
|
|
1354
|
-
: null;
|
|
1406
|
+
const a = portes ? attribuerLeRouge({ lieux: k.lieux, portes, circuit: ticket.circuit }) : null;
|
|
1355
1407
|
// A developpeur who had nothing to deliver stops the circuit on a red that is his: the stop
|
|
1356
1408
|
// stands at his step, which a resumption plays again. A red that names a test file of the lot
|
|
1357
1409
|
// is the testwriter's, who is relaunched: the developpeur had nothing to write for it.
|
|
@@ -1368,8 +1420,8 @@ function decider({ etat, memoire = {}, ticket, reprend = false }, lire, partiel)
|
|
|
1368
1420
|
return arret('controles', null);
|
|
1369
1421
|
}
|
|
1370
1422
|
maj.relancesTestwriter = relances;
|
|
1371
|
-
// The final pass red in one test file alone: that file is replayed, then the checks
|
|
1372
|
-
// the final pass
|
|
1423
|
+
// The final pass red in one test file alone: that file is replayed, then the checks on it,
|
|
1424
|
+
// then the final pass, with no session for the rest of the lot.
|
|
1373
1425
|
maj.reprise =
|
|
1374
1426
|
passeFinale && a.fichiers.length === 1 && portes.tests.includes(a.fichiers[0])
|
|
1375
1427
|
? { fichiers: a.fichiers }
|
|
@@ -1409,9 +1461,8 @@ function decider({ etat, memoire = {}, ticket, reprend = false }, lire, partiel)
|
|
|
1409
1461
|
if (!inchangeSansTestwriter()) {
|
|
1410
1462
|
maj.renvoiAuTestwriter = null;
|
|
1411
1463
|
}
|
|
1412
|
-
const entierement = !reprise && !regeneration;
|
|
1413
1464
|
if (!passeFinale) {
|
|
1414
|
-
if (
|
|
1465
|
+
if (!reprise && !regeneration && k.empreinte) {
|
|
1415
1466
|
garderLeVert('controles', { empreinte: k.empreinte, ms: k.ms });
|
|
1416
1467
|
}
|
|
1417
1468
|
// The checks green: the final pass, its sessions counted apart.
|
|
@@ -1427,17 +1478,16 @@ function decider({ etat, memoire = {}, ticket, reprend = false }, lire, partiel)
|
|
|
1427
1478
|
// the reader, are green in between, and would else start the count again without end.
|
|
1428
1479
|
maj.relancesTestwriter = 0;
|
|
1429
1480
|
// The lot the last review accepted goes to the integration, any other to the review.
|
|
1430
|
-
// A final pass green on the band of the lot
|
|
1431
|
-
//
|
|
1432
|
-
// integration.
|
|
1481
|
+
// A final pass green on the band of the lot verifies its tree: the lot accepted on it goes to
|
|
1482
|
+
// the integration.
|
|
1433
1483
|
if (passe.arbre) {
|
|
1434
1484
|
maj.verifie = passe.arbre;
|
|
1435
1485
|
}
|
|
1436
|
-
if (
|
|
1486
|
+
if (k.empreinte) {
|
|
1437
1487
|
garderLeVert('passe-finale', { empreinte: k.empreinte, arbre: passe.arbre, ms: k.ms });
|
|
1438
1488
|
}
|
|
1439
1489
|
if (reprise) {
|
|
1440
|
-
// The
|
|
1490
|
+
// The final pass is green: the resumption ends.
|
|
1441
1491
|
maj.reprise = null;
|
|
1442
1492
|
}
|
|
1443
1493
|
etape = lire('lotAccepte', { arbre: passe.arbre }) ? INTEGRATION : RELECTURE;
|
|
@@ -1448,6 +1498,9 @@ function decider({ etat, memoire = {}, ticket, reprend = false }, lire, partiel)
|
|
|
1448
1498
|
// The references to regenerate and the reds of the pass before, kept in the state from
|
|
1449
1499
|
// the pass that called for them (the checks of the plan, `suite`, or the final pass), so
|
|
1450
1500
|
// that a regeneration resumed knows them.
|
|
1501
|
+
if (m('controlesRouges') && !marqueDesRouges(m('controlesRouges'))) {
|
|
1502
|
+
return arreter('references', FORME_ANCIENNE);
|
|
1503
|
+
}
|
|
1451
1504
|
const a = m('aRegenerer');
|
|
1452
1505
|
if (!a) {
|
|
1453
1506
|
return arreter(
|
|
@@ -1485,8 +1538,8 @@ function decider({ etat, memoire = {}, ticket, reprend = false }, lire, partiel)
|
|
|
1485
1538
|
// After the checks, the pass that judges the regenerated tree, which does not regenerate
|
|
1486
1539
|
// again the references just regenerated on it: beside other reds, the checks of the plan
|
|
1487
1540
|
// again (none plays when the regeneration changed nothing, the reds of the checks before
|
|
1488
|
-
// standing); without, the final pass that is due. After a final pass,
|
|
1489
|
-
//
|
|
1541
|
+
// standing); without, the final pass that is due. After a final pass, that pass
|
|
1542
|
+
// again on the whole band of the lot, regenerating no more.
|
|
1490
1543
|
maj.regenereSur = a.suite ? { arbre: lire('arbreApres'), noms: a.noms } : null;
|
|
1491
1544
|
maj.regeneration =
|
|
1492
1545
|
a.suite === 'passe'
|
|
@@ -1495,10 +1548,7 @@ function decider({ etat, memoire = {}, ticket, reprend = false }, lire, partiel)
|
|
|
1495
1548
|
? g.fichiers.length
|
|
1496
1549
|
? null
|
|
1497
1550
|
: { reportes: { rouges: a.rouges, rejouee: false } }
|
|
1498
|
-
: {
|
|
1499
|
-
restreinte: g.restreinte,
|
|
1500
|
-
reportes: { rouges: a.rouges, rejouee: g.fichiers.length > 0 },
|
|
1501
|
-
};
|
|
1551
|
+
: {};
|
|
1502
1552
|
maj.aRegenerer = null;
|
|
1503
1553
|
etape = CONTROLES;
|
|
1504
1554
|
finale = a.suite !== 'controles';
|
|
@@ -1507,6 +1557,10 @@ function decider({ etat, memoire = {}, ticket, reprend = false }, lire, partiel)
|
|
|
1507
1557
|
|
|
1508
1558
|
function relecture() {
|
|
1509
1559
|
const v = lire('relecture');
|
|
1560
|
+
if (v.verdict === 'RENDU') {
|
|
1561
|
+
// After any lot rendered, the final pass plays again, even on a tree already judged.
|
|
1562
|
+
garderLeVert('passe-finale', null);
|
|
1563
|
+
}
|
|
1510
1564
|
const demandeUnPlan = direct && v.fiche.motif === DEMANDE_UN_PLAN;
|
|
1511
1565
|
// A question for the owner: nothing is committed nor relaunched before his answer. A RENDU
|
|
1512
1566
|
// keeps its findings first, those of a direct lot that asks for a plan all for the agent
|
|
@@ -1534,44 +1588,11 @@ function decider({ etat, memoire = {}, ticket, reprend = false }, lire, partiel)
|
|
|
1534
1588
|
// The review that accepts the lot closes every finding, each one it judged lifted
|
|
1535
1589
|
// (`suiviDesConstats`).
|
|
1536
1590
|
maj.constats = [];
|
|
1537
|
-
// A
|
|
1538
|
-
//
|
|
1539
|
-
//
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
// and keep the lot out of the integration for ever. A lot the review kept none of (`!v.arbre`,
|
|
1543
|
-
// git could not commit it) goes there too.
|
|
1544
|
-
if (!v.arbre || m('verifie')) {
|
|
1545
|
-
maj.toursDeLaPasseFinale = null;
|
|
1546
|
-
commenter('relecture', 'ACCEPTÉ ; le lot va à l’intégration.');
|
|
1547
|
-
etape = INTEGRATION;
|
|
1548
|
-
return decision();
|
|
1549
|
-
}
|
|
1550
|
-
// No final pass has verified this lot (a resumption, or git could not hash the copy): its
|
|
1551
|
-
// band plays once, then the integration. The cycle is bounded — after
|
|
1552
|
-
// `TOURS_DE_LA_PASSE_FINALE` tours without reaching the integration, the circuit stops on a
|
|
1553
|
-
// question to the supervisor naming the probable cause, instead of replaying the pass and the
|
|
1554
|
-
// reviewer without end.
|
|
1555
|
-
const tours = (m('toursDeLaPasseFinale') ?? 0) + 1;
|
|
1556
|
-
if (tours > TOURS_DE_LA_PASSE_FINALE) {
|
|
1557
|
-
return arreter(
|
|
1558
|
-
'relecture-arret',
|
|
1559
|
-
`Le relecteur rend ACCEPTÉ, mais ${TOURS_DE_LA_PASSE_FINALE} passes finales n’ont pas mené le lot à l’intégration : l’arbre de la copie ne se stabilise pas entre la passe finale et la relecture.\n\nLe verdict :\n\n${v.texte}`,
|
|
1560
|
-
{
|
|
1561
|
-
piece: v.fiche.piece,
|
|
1562
|
-
question:
|
|
1563
|
-
'Un artefact de construction non déterministe dans la copie, ou une sortie de construction qu’aucune tâche ne déclare, empêche l’arbre de la copie de se stabiliser entre la passe finale et la relecture : qu’est-ce qui le déstabilise, et se lève-t-il pour reprendre ?',
|
|
1564
|
-
}
|
|
1565
|
-
);
|
|
1566
|
-
}
|
|
1567
|
-
maj.toursDeLaPasseFinale = tours;
|
|
1568
|
-
commenter(
|
|
1569
|
-
'relecture',
|
|
1570
|
-
'ACCEPTÉ ; la passe finale sur la bande du lot (sa base et ses dépendants), qui n’a pas joué sur ce lot, puis l’intégration.'
|
|
1571
|
-
);
|
|
1572
|
-
etape = CONTROLES;
|
|
1573
|
-
tentative = 0;
|
|
1574
|
-
finale = true;
|
|
1591
|
+
// A verdict ACCEPTÉ always sends the lot to the integration: the final pass (4.1) judged
|
|
1592
|
+
// and registered its tree before the review, and 5.1 refuses a tree absent from the registry
|
|
1593
|
+
// or a copy changed since, which goes back to 4.1 (circuit.md §9.1, point 4).
|
|
1594
|
+
commenter('relecture', 'ACCEPTÉ ; le lot va à l’intégration.');
|
|
1595
|
+
etape = INTEGRATION;
|
|
1575
1596
|
return decision();
|
|
1576
1597
|
}
|
|
1577
1598
|
// A direct lot rendered because its ticket asks for a plan goes up to the supervisor, before
|
|
@@ -1623,7 +1644,6 @@ function decider({ etat, memoire = {}, ticket, reprend = false }, lire, partiel)
|
|
|
1623
1644
|
rapport = null;
|
|
1624
1645
|
finale = false;
|
|
1625
1646
|
maj.verifie = null;
|
|
1626
|
-
maj.toursDeLaPasseFinale = null;
|
|
1627
1647
|
commenter(
|
|
1628
1648
|
'relecture',
|
|
1629
1649
|
`RENDU (relecture ${rendus}) : le lot du circuit court change un comportement ; la sorte du ticket devient comportement, le plan reste, et le circuit reprend à 2 Tests.`
|
|
@@ -1651,10 +1671,8 @@ function decider({ etat, memoire = {}, ticket, reprend = false }, lire, partiel)
|
|
|
1651
1671
|
tentative = 1;
|
|
1652
1672
|
rapport = null;
|
|
1653
1673
|
finale = false;
|
|
1654
|
-
// Relaunching a role reworks the lot: its earlier final pass no longer verifies it
|
|
1655
|
-
// tours of the ACCEPTÉ ↔ final pass cycle start over.
|
|
1674
|
+
// Relaunching a role reworks the lot: its earlier final pass no longer verifies it.
|
|
1656
1675
|
maj.verifie = null;
|
|
1657
|
-
maj.toursDeLaPasseFinale = null;
|
|
1658
1676
|
commenter(
|
|
1659
1677
|
'relecture',
|
|
1660
1678
|
`RENDU (relecture ${rendus}) ; le circuit relance ${auTestwriter ? 'le testwriter' : auteur.le}, ses ${lus.constats.length} constat(s) ouvert(s) dans la consigne de chaque séance, puis la passe finale sur la bande du lot (sa base et ses dépendants), et le relecteur sur la différence.`
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/** Notes the verdict of a part of the night: 'vert' or 'rouge', null for 75 (to replay, nothing written). */
|
|
2
|
+
export function noterLeVerdict(
|
|
3
|
+
commun: string,
|
|
4
|
+
code: number,
|
|
5
|
+
part?: 'pc2' | 'pc3',
|
|
6
|
+
raisons?: string[]
|
|
7
|
+
): 'vert' | 'rouge' | null;
|
|
8
|
+
export function lireLesVerdicts(commun: string | null): {
|
|
9
|
+
pc2: 'vert' | 'rouge' | null;
|
|
10
|
+
pc3: 'vert' | 'rouge' | null;
|
|
11
|
+
};
|
|
12
|
+
export function lireLesRaisonsAPasser(commun: string | null): string[];
|
|
13
|
+
export function lireLeVerdict(commun: string | null): 'vert' | 'rouge' | null;
|
|
@@ -7,22 +7,33 @@
|
|
|
7
7
|
// repasser ») writes nothing and leaves the previous verdict of that part, the other untouched. The
|
|
8
8
|
// night is `rouge` when a part is, else `vert` when a part is, else none. A read that fails gives
|
|
9
9
|
// no verdict for that part.
|
|
10
|
-
import { mkdirSync, readFileSync, writeFileSync } from 'node:fs';
|
|
10
|
+
import { mkdirSync, readFileSync, rmSync, writeFileSync } from 'node:fs';
|
|
11
11
|
import path from 'node:path';
|
|
12
12
|
import { fileURLToPath } from 'node:url';
|
|
13
13
|
import { A_REPASSER } from './codes-de-sortie.mjs';
|
|
14
14
|
|
|
15
15
|
const FICHIERS = { pc2: 'verdict-pc2', pc3: 'verdict' };
|
|
16
16
|
const fichierDuVerdict = (commun, part) => path.join(commun, 'nuit', FICHIERS[part]);
|
|
17
|
+
// The reasons the part of PC2 is « à repasser », one per line, written with its 75.
|
|
18
|
+
const fichierDesRaisons = commun => path.join(commun, 'nuit', 'verdict-pc2-raisons');
|
|
17
19
|
|
|
18
20
|
/**
|
|
19
21
|
* @param {string} commun the git common dir of the project
|
|
20
22
|
* @param {number} code the exit code of the part's pass
|
|
21
23
|
* @param {'pc2' | 'pc3'} [part] the part noted: that of the machine that plays, PC3 by default
|
|
24
|
+
* @param {string[]} [raisons] the reasons the part of PC2 is « à repasser » (75), one per tranche
|
|
25
|
+
* concerned; a 75 replaces those of the night before, a verdict of the part of PC2 erases them
|
|
22
26
|
* @returns {'vert' | 'rouge' | null} the verdict written, null when the part is to be replayed
|
|
23
27
|
*/
|
|
24
|
-
export function noterLeVerdict(commun, code, part = 'pc3') {
|
|
28
|
+
export function noterLeVerdict(commun, code, part = 'pc3', raisons = []) {
|
|
29
|
+
if (part === 'pc2') {
|
|
30
|
+
rmSync(fichierDesRaisons(commun), { force: true });
|
|
31
|
+
}
|
|
25
32
|
if (code === A_REPASSER) {
|
|
33
|
+
if (part === 'pc2' && raisons.length > 0) {
|
|
34
|
+
mkdirSync(path.join(commun, 'nuit'), { recursive: true });
|
|
35
|
+
writeFileSync(fichierDesRaisons(commun), `${raisons.join('\n')}\n`);
|
|
36
|
+
}
|
|
26
37
|
return null;
|
|
27
38
|
}
|
|
28
39
|
const verdict = code === 0 ? 'vert' : 'rouge';
|
|
@@ -45,31 +56,47 @@ function lireLaPart(commun, part) {
|
|
|
45
56
|
* @returns {{ pc2: 'vert' | 'rouge' | null, pc3: 'vert' | 'rouge' | null }} each part's last verdict,
|
|
46
57
|
* null when it has none or it does not read
|
|
47
58
|
*/
|
|
48
|
-
export function
|
|
59
|
+
export function lireLesVerdicts(commun) {
|
|
49
60
|
if (!commun) {
|
|
50
61
|
return { pc2: null, pc3: null };
|
|
51
62
|
}
|
|
52
63
|
return { pc2: lireLaPart(commun, 'pc2'), pc3: lireLaPart(commun, 'pc3') };
|
|
53
64
|
}
|
|
54
65
|
|
|
66
|
+
/**
|
|
67
|
+
* @param {string | null} commun the git common dir of the project
|
|
68
|
+
* @returns {string[]} the reasons the part of PC2 is « à repasser », none when it is not
|
|
69
|
+
*/
|
|
70
|
+
export function lireLesRaisonsAPasser(commun) {
|
|
71
|
+
if (!commun) {
|
|
72
|
+
return [];
|
|
73
|
+
}
|
|
74
|
+
try {
|
|
75
|
+
return readFileSync(fichierDesRaisons(commun), 'utf8').split('\n').filter(Boolean);
|
|
76
|
+
} catch {
|
|
77
|
+
return [];
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
55
81
|
/**
|
|
56
82
|
* @param {string | null} commun the git common dir of the project
|
|
57
83
|
* @returns {'vert' | 'rouge' | null} the last night's verdict over its two parts, null when none is known
|
|
58
84
|
*/
|
|
59
85
|
export function lireLeVerdict(commun) {
|
|
60
|
-
const parts = Object.values(
|
|
86
|
+
const parts = Object.values(lireLesVerdicts(commun));
|
|
61
87
|
if (parts.includes('rouge')) {
|
|
62
88
|
return 'rouge';
|
|
63
89
|
}
|
|
64
90
|
return parts.includes('vert') ? 'vert' : null;
|
|
65
91
|
}
|
|
66
92
|
|
|
67
|
-
// `node verdict-de-la-nuit.mjs <commun> <code> [pc2|pc3]`: what nuit.sh calls at the end of the night.
|
|
93
|
+
// `node verdict-de-la-nuit.mjs <commun> <code> [pc2|pc3] [<raison>...]`: what nuit.sh calls at the end of the night.
|
|
68
94
|
if (process.argv[1] && fileURLToPath(import.meta.url) === path.resolve(process.argv[1])) {
|
|
69
|
-
const [commun, code, part] = process.argv.slice(2);
|
|
95
|
+
const [commun, code, part, ...raisons] = process.argv.slice(2);
|
|
70
96
|
noterLeVerdict(
|
|
71
97
|
commun,
|
|
72
98
|
code === undefined || code === '' ? NaN : Number(code),
|
|
73
|
-
part === 'pc2' ? 'pc2' : 'pc3'
|
|
99
|
+
part === 'pc2' ? 'pc2' : 'pc3',
|
|
100
|
+
raisons
|
|
74
101
|
);
|
|
75
102
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
// The lock of a file shared between processes: the file `<verrou>` stands while someone holds it.
|
|
2
|
-
// Taken by the
|
|
3
|
-
// and by the creation of a ticket (`.beads/grillhouse-ticket.lock`, scripts/ticket.mjs).
|
|
2
|
+
// Taken by the register (`registre.jsonl.verrou`) and by the creation of a ticket (`.beads/grillhouse-ticket.lock`, scripts/ticket.mjs).
|
|
4
3
|
// Architecture: docs/architecture/machine.md (§4.1).
|
|
5
4
|
//
|
|
6
5
|
// - A lock is created whole and exclusively: its mark (the owner's process number, then a token
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// The frame's workflows of GitHub Actions in a project, as a generator rewrites the file whose
|
|
2
2
|
// header says it generated it (the « Généré par … ; ne pas éditer » of the frame's generated files):
|
|
3
|
-
// the CI of a lot (`ci.yml`) and the
|
|
3
|
+
// the CI of a lot (`ci.yml`) and the clean machine (`machine-vierge.yml`), the template's
|
|
4
4
|
// `.github/workflows/` (templates/projet), which `grillhouse init` copies and `grillhouse maj`
|
|
5
5
|
// keeps (scripts/grillhouse-maj.mjs). The mechanism is installation.md §5.2 and §4.4
|
|
6
6
|
// (packages/grillhouse/docs/architecture/).
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
// template that the project holds with it, when its text differs; one without it is the project's,
|
|
10
10
|
// and stays as it is.
|
|
11
11
|
// - A project that holds a workflow of the frame has adopted the frame's CI: it receives each
|
|
12
|
-
// workflow of the template it lacks (the
|
|
12
|
+
// workflow of the template it lacks (the clean machine, for a project that adopted the CI alone). A
|
|
13
13
|
// project that holds none receives none: the update starts no CI on its repository.
|
|
14
14
|
// - The machine of the jobs is the repository's variable RUNNER (`vars.RUNNER`), which lives in the
|
|
15
15
|
// settings of the repository on GitHub, never in a file: the template writes no value of it.
|
|
@@ -88,6 +88,11 @@ la cause se trouve avant le correctif.
|
|
|
88
88
|
fait, et le retrait les emporte.
|
|
89
89
|
- **Le comportement tient dans les critères** : ton code fait ce que disent les critères
|
|
90
90
|
d'acceptation, et rien d'autre.
|
|
91
|
+
- **Un document prescriptif change sur décision seule** : quand ton ticket porte la décision du
|
|
92
|
+
responsable qui change un document prescriptif, tu charges la compétence `grillhouse:architecte`
|
|
93
|
+
(outil Skill) pour son travail 3, « Mettre un document en conformité ». Sans cette décision écrite
|
|
94
|
+
au ticket, tu ne retouches aucun document prescriptif, et tu remontes la tension au superviseur
|
|
95
|
+
par ta fiche. Ainsi le document reste la décision, et non la trace du code.
|
|
91
96
|
|
|
92
97
|
Tu lis toute la copie, index compris. Tu écris les seuls paquets du plan de ton ticket (les
|
|
93
98
|
paquets de son titre) : le reste de la copie est en lecture seule, et une écriture hors d'eux
|
|
@@ -113,8 +118,9 @@ son texte : `sed` qui ne trouve rien réussit sans rien changer. Un fichier temp
|
|
|
113
118
|
`$TMPDIR`. Les tests se lancent par `npm test -- <fichiers>`, jamais par l'outil de test
|
|
114
119
|
directement. **Ton lot se juge à la fin de ta séance** : un fichier de test ou de la matière de
|
|
115
120
|
test partagée qu'il change, par tout outil, une commande qui le régénère comprise, te rend l'étape,
|
|
116
|
-
le fichier
|
|
117
|
-
|
|
121
|
+
le fichier nommé : le circuit le rend lui-même à son état d'avant ta séance (depuis l'objet que le
|
|
122
|
+
lot garde, sauf sur l'arbre principal, ou si un autre rôle l'a récrit depuis), et ce que tu y avais
|
|
123
|
+
écrit reste au journal ; tu ne le remets pas à HEAD. Ainsi ton lot ne porte que le code.
|
|
118
124
|
|
|
119
125
|
**Cargo compile sans compilation incrémentale** (`CARGO_INCREMENTAL=0`, posé par le cadre, comme
|
|
120
126
|
la CI de Rust) : une copie compile une fois, et son `target/` reste petit. Pour déboguer, tu la
|
package/skills/direct/SKILL.md
CHANGED
|
@@ -61,6 +61,11 @@ la cause se trouve avant le correctif.
|
|
|
61
61
|
shell, le client d'une base ; ton lot n'est pas jugé sur une règle de rôle, le relecteur le lit.
|
|
62
62
|
Un fichier temporaire va dans `$TMPDIR`, et le retrait d'un fichier par un script
|
|
63
63
|
`node $TMPDIR/retire.mjs` (`rmSync` de `node:fs`).
|
|
64
|
+
- **Un document prescriptif change sur décision seule** : quand ton ticket porte la décision du
|
|
65
|
+
responsable qui change un document prescriptif, tu charges la compétence `grillhouse:architecte`
|
|
66
|
+
(outil Skill) pour son travail 3, « Mettre un document en conformité ». Sans cette décision écrite
|
|
67
|
+
au ticket, tu ne retouches aucun document prescriptif, et tu remontes la tension au superviseur
|
|
68
|
+
par ta fiche. Ainsi le document reste la décision, et non la trace du code.
|
|
64
69
|
- **Les tests se lancent par `npm test -- <fichiers>`**, jamais par l'outil de test directement ;
|
|
65
70
|
`npm run api`, après lui, écrit le rapport d'API des paquets du plan.
|
|
66
71
|
- **Tu attends au premier plan ce que tu lances** : ta séance n'a aucune tâche de fond.
|
|
@@ -93,7 +93,16 @@ avant de nommer un correctif ou un verdict. Ainsi le plan part de la cause.
|
|
|
93
93
|
un mauvais argument, que le ticket décrit en entier, avec sa `raison` et sa `piece`
|
|
94
94
|
(fichier:ligne, « $ commande » et sa sortie, ou « ticket, critère N » ou « ticket, §
|
|
95
95
|
<section> ») : le plan passé, le circuit bascule sans arrêt au circuit direct, où l'agent
|
|
96
|
-
direct écrit tests et code dans les paquets du plan ; le doute va au circuit long.
|
|
96
|
+
direct écrit tests et code dans les paquets du plan ; le doute va au circuit long. Un lot qui ne fait que supprimer des tests, que le ticket nomme
|
|
97
|
+
en entier, est aussi une correction triviale : seule suppression = le lot ne retire que des
|
|
98
|
+
fichiers ou des cas de test (et ce que seuls ces tests lisaient, comme un fichier d'essai
|
|
99
|
+
propre à eux), aucun autre fichier changé ; dès qu'un code, une garde, un réglage ou un texte
|
|
100
|
+
lu par un test change, le lot est du circuit complet, et le doute va au circuit long. Le plan
|
|
101
|
+
de seule suppression nomme, pour chaque test supprimé, sa raison (code retiré, doublon d'un
|
|
102
|
+
test nommé, comportement retiré) en `piece` ; le relecteur du circuit direct, qui tient la
|
|
103
|
+
preuve, rend le lot qui supprime un test dont le comportement vit encore sans test nommé qui
|
|
104
|
+
le couvre. Un plan qui supprime des tests et change un comportement garde le circuit complet.
|
|
105
|
+
Le circuit
|
|
97
106
|
la refuse sur un ticket que l'agent direct a déjà travaillé. `mécanique` pour un geste sans comportement
|
|
98
107
|
neuf (montée du cadre, documents seuls, renommage ou déplacement, montée de dépendance,
|
|
99
108
|
configuration seule, correction de style, seuil relevé), avec sa `commande`, la commande ou
|