@roomi-fields/grillhouse 0.47.1 → 0.49.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 +116 -0
- package/agents/direct.md +9 -0
- package/cadre/templates/projet/.github/workflows/ci.yml +24 -38
- package/cadre/templates/projet/.github/workflows/machine-vierge.yml +5 -0
- package/cadre/templates/projet/.github/workflows/nuit.yml +14 -2
- package/cadre/templates/projet/CLAUDE.md +31 -10
- package/cadre/templates/projet/docs/agents/issue-tracker.md +1 -1
- package/cadre/templates/turbo/paquets.json +3 -1
- package/cadre/templates/turbo/sans-paquets.json +3 -1
- package/charte.md +46 -13
- package/dist/temporal/circuit/appel.d.ts +4 -1
- package/dist/temporal/circuit/appel.js +15 -1
- package/dist/temporal/circuit/appel.js.map +1 -1
- package/dist/temporal/circuit/client.d.ts +7 -1
- package/dist/temporal/circuit/client.js +54 -1
- package/dist/temporal/circuit/client.js.map +1 -1
- package/dist/temporal/circuit/commande.js +35 -60
- package/dist/temporal/circuit/commande.js.map +1 -1
- package/dist/temporal/circuit/contrat.d.ts +2 -1
- package/dist/temporal/circuit/contrat.js +2 -1
- package/dist/temporal/circuit/contrat.js.map +1 -1
- package/dist/temporal/circuit/deroule.js +9 -2
- package/dist/temporal/circuit/deroule.js.map +1 -1
- package/dist/temporal/commande.js +2 -13
- package/dist/temporal/commande.js.map +1 -1
- package/dist/temporal/deroules.d.ts +1 -1
- package/dist/temporal/deroules.js +2 -2
- package/dist/temporal/deroules.js.map +1 -1
- package/dist/temporal/file/activites.d.ts +1 -4
- package/dist/temporal/file/activites.js +13 -14
- package/dist/temporal/file/activites.js.map +1 -1
- package/dist/temporal/file/contrat.d.ts +34 -91
- package/dist/temporal/file/contrat.js +33 -5
- package/dist/temporal/file/contrat.js.map +1 -1
- package/dist/temporal/file/deroule.d.ts +1 -9
- package/dist/temporal/file/deroule.js +57 -166
- package/dist/temporal/file/deroule.js.map +1 -1
- package/dist/temporal/installation.d.ts +26 -1
- package/dist/temporal/installation.js +111 -2
- package/dist/temporal/installation.js.map +1 -1
- package/dist/temporal/nuits/activites.d.ts +5 -10
- package/dist/temporal/nuits/activites.js +9 -57
- package/dist/temporal/nuits/activites.js.map +1 -1
- package/dist/temporal/nuits/choix.d.ts +15 -0
- package/dist/temporal/nuits/choix.js +20 -0
- package/dist/temporal/nuits/choix.js.map +1 -1
- package/dist/temporal/nuits/contrat.d.ts +11 -16
- package/dist/temporal/nuits/deroule.js +38 -67
- package/dist/temporal/nuits/deroule.js.map +1 -1
- package/dist/temporal/places/client.d.ts +9 -11
- package/dist/temporal/places/client.js +11 -19
- package/dist/temporal/places/client.js.map +1 -1
- package/dist/temporal/places/contrat.d.ts +25 -24
- package/dist/temporal/places/contrat.js +5 -7
- package/dist/temporal/places/contrat.js.map +1 -1
- package/dist/temporal/places/deroule.js +26 -36
- package/dist/temporal/places/deroule.js.map +1 -1
- package/dist/temporal/tickets/activites.js +4 -2
- package/dist/temporal/tickets/activites.js.map +1 -1
- package/dist/temporal/tickets/contrat.d.ts +2 -1
- package/docs/ARCHITECTURE.md +453 -133
- package/docs/CADRE.md +16 -13
- package/docs/INTERFACE.md +100 -25
- package/hooks/hooks.json +9 -0
- package/hooks/register.tsx +59 -5
- package/package.json +1 -1
- package/scripts/activites.mjs +319 -52
- package/scripts/aiguillage.mjs +5 -1
- package/scripts/attente-a-l-arret.mjs +2 -5
- package/scripts/attente-au-tour.mjs +2 -5
- package/scripts/bilan.mjs +125 -2
- package/scripts/branche-de-nuit.mjs +32 -44
- package/scripts/ci-de-main.mjs +215 -16
- package/scripts/circuit.mjs +275 -189
- package/scripts/circuits-cles.d.mts +3 -3
- package/scripts/circuits-cles.mjs +6 -5
- package/scripts/coeurs-dedies.mjs +4 -4
- package/scripts/commandes-composees.mjs +12 -5
- package/scripts/composition-des-langages.mjs +2 -0
- package/scripts/crochets.mjs +2 -2
- package/scripts/dette.d.ts +2 -1
- package/scripts/dette.mjs +49 -6
- package/scripts/direct.mjs +343 -0
- package/scripts/droits.mjs +19 -0
- package/scripts/effets.mjs +6 -5
- package/scripts/engendres.mjs +2 -1
- package/scripts/enveloppe/enveloppe.mjs +127 -18
- package/scripts/enveloppe/lancer.sh +14 -3
- package/scripts/enveloppe/paquets-du-plan.mjs +9 -0
- package/scripts/enveloppe/travail-de-la-copie.mjs +121 -21
- package/scripts/etapes.mjs +14 -4
- package/scripts/etat-du-depot.mjs +23 -0
- package/scripts/faits-du-circuit.mjs +24 -34
- package/scripts/fermeture-de-la-machine.d.mts +27 -0
- package/scripts/fermeture-de-la-machine.mjs +98 -0
- package/scripts/fichiers-nommes.mjs +27 -1
- package/scripts/file-des-tickets.d.mts +18 -1
- package/scripts/file-des-tickets.mjs +63 -15
- package/scripts/greffons.mjs +1 -1
- package/scripts/grillhouse-maj.mjs +13 -25
- package/scripts/groupe-cles.d.mts +6 -0
- package/scripts/groupe-cles.mjs +29 -1
- package/scripts/integration/file.mjs +162 -48
- package/scripts/integration/integrer.mjs +2 -0
- package/scripts/jointure.d.ts +22 -3
- package/scripts/journal-des-etats.d.mts +16 -0
- package/scripts/journal-des-etats.mjs +44 -2
- package/scripts/journal.mjs +3 -0
- package/scripts/langages/c/commandes.mjs +5 -5
- package/scripts/langages/c/composants.mjs +13 -5
- package/scripts/langages/c/index.mjs +2 -0
- package/scripts/langages/c/squelette.mjs +1 -1
- package/scripts/langages/cargo/commandes.mjs +5 -6
- package/scripts/langages/cargo/index.mjs +2 -0
- package/scripts/langages/python/commandes.mjs +5 -5
- package/scripts/langages/python/composants.mjs +10 -2
- package/scripts/langages/python/index.mjs +2 -0
- package/scripts/langages/typescript/composants.mjs +10 -3
- package/scripts/langages/typescript/construire.mjs +2 -0
- package/scripts/langages/typescript/exemples.mjs +33 -1
- package/scripts/langages/typescript/index.mjs +22 -0
- package/scripts/langages/typescript/migrations/0.49.0-tests-equipes.mjs +32 -0
- package/scripts/langages/typescript/module-absent.mjs +24 -0
- package/scripts/langages/typescript/tests-de-nuit.mjs +152 -32
- package/scripts/langages/typescript/tests-du-poste.mjs +65 -23
- package/scripts/langages/typescript/titres-de-tests.mjs +11 -7
- package/scripts/langages/typescript/turbo-des-paquets.mjs +40 -5
- package/scripts/langages/typescript/verifier.mjs +3 -5
- package/scripts/langages/typescript/verrou-des-dependances.mjs +161 -0
- package/scripts/langages/typescript/vitest-config/cibles.mjs +57 -6
- package/scripts/langages/typescript/vitest-config/lances.mjs +3 -1
- package/scripts/langages/typescript/vitest-config/machine.setup.mjs +11 -5
- package/scripts/langages/typescript/vitest.nuit.config.mjs +53 -5
- package/scripts/langages.mjs +25 -3
- package/scripts/machine.mjs +103 -0
- package/scripts/matieres-cles.mjs +17 -0
- package/scripts/matieres-lues.mjs +104 -0
- package/scripts/mesure/base-de-passe.mjs +2 -1
- package/scripts/migrations/0.48.0-ci-declenchee-par-la-file.mjs +32 -0
- package/scripts/migrations/0.48.0-poussee-retiree.mjs +31 -0
- package/scripts/migrations/0.49.0-reservation-de-trois-coeurs.mjs +30 -0
- package/scripts/migrations.mjs +6 -0
- package/scripts/nuit.sh +113 -46
- package/scripts/paquet.mjs +16 -5
- package/scripts/paquets.d.ts +4 -0
- package/scripts/paquets.mjs +57 -0
- package/scripts/passe-de-la-machine.mjs +13 -14
- package/scripts/places-de-la-machine.mjs +120 -44
- package/scripts/places-du-serveur.mjs +29 -8
- package/scripts/plafond-de-la-machine.d.mts +7 -13
- package/scripts/plafond-de-la-machine.mjs +19 -35
- package/scripts/poussee-retiree.mjs +18 -0
- package/scripts/prefixe-des-tickets.mjs +1 -1
- package/scripts/references-changees.mjs +159 -0
- package/scripts/registre.d.mts +2 -2
- package/scripts/regles-des-places.d.mts +20 -12
- package/scripts/regles-des-places.mjs +27 -30
- package/scripts/repli-de-la-nuit.mjs +112 -0
- package/scripts/reponses-du-circuit.d.mts +4 -2
- package/scripts/reponses-du-circuit.mjs +44 -9
- package/scripts/reprise.mjs +27 -8
- package/scripts/resultats.mjs +61 -9
- package/scripts/seances.mjs +258 -40
- package/scripts/services-du-noyau.mjs +3 -0
- package/scripts/sous-commandes.mjs +37 -7
- package/scripts/superviseur.mjs +241 -88
- package/scripts/tableau.mjs +327 -131
- package/scripts/taches-du-graphe.mjs +84 -4
- package/scripts/ticket.mjs +345 -0
- package/scripts/transitions.d.mts +52 -0
- package/scripts/transitions.mjs +194 -16
- package/scripts/un-commit-par-ticket.mjs +4 -3
- package/scripts/verdict-de-la-nuit.mjs +47 -20
- package/scripts/verrou-de-fichier.mjs +2 -2
- package/scripts/verrous/ecriture-hors-enveloppe.mjs +86 -0
- package/scripts/verrous/verrou.mjs +17 -1
- package/skills/developpeur/SKILL.md +1 -1
- package/skills/direct/SKILL.md +57 -0
- package/skills/explorateur/SKILL.md +10 -6
- package/skills/pitmaster/SKILL.md +37 -14
- package/skills/pitmaster/references/consigne-agent.md +7 -1
- package/skills/relecteur/SKILL.md +11 -1
- package/skills/testwriter/SKILL.md +10 -0
- package/scripts/poussee-cles.mjs +0 -46
- package/scripts/ticket.sh +0 -25
package/scripts/circuit.mjs
CHANGED
|
@@ -54,7 +54,9 @@
|
|
|
54
54
|
// which the circuit plays no more as a step. A package the repository does not hold, one named
|
|
55
55
|
// twice, or a component of the survey of the plan (`releve`, which the circuit plays with no
|
|
56
56
|
// session to check the sheet) that the sheet neither puts in its packages nor sets apart with
|
|
57
|
-
// its reason (`ecartes`, written at the ticket) makes the sheet out of conformity
|
|
57
|
+
// its reason (`ecartes`, written at the ticket) makes the sheet out of conformity; so does a
|
|
58
|
+
// component the title named before the plan, the root (« . ») included, that the sheet neither
|
|
59
|
+
// keeps nor sets apart with its reason. The circuit
|
|
58
60
|
// writes the plan at the ticket (`bd update --title -d`): the packages end its title, the list the envelope of every later
|
|
59
61
|
// session writes; the criteria already written stay as they are, the owner's decision, and the
|
|
60
62
|
// criteria of the sheet, those the plan adds, follow them, numbered after them (a change or a
|
|
@@ -146,7 +148,7 @@
|
|
|
146
148
|
// (`lancement`, its role and its session id), each end of a run on a question (`montee`: its
|
|
147
149
|
// code, its stop and the supervisor's session that ran it, `superviseur`, the session the
|
|
148
150
|
// entry of the workflow carries, `ctx.superviseur`), which the bilan reads; and each
|
|
149
|
-
// of its discoveries (`decouvertes`) filed closed under the ticket (scripts/ticket.
|
|
151
|
+
// of its discoveries (`decouvertes`) filed closed under the ticket (scripts/ticket.mjs, label
|
|
150
152
|
// `decouverte`). A session that ends without a sheet that conforms (none, one out of its schema,
|
|
151
153
|
// a code other than 0) is resumed once, the same session, with the third template, which names
|
|
152
154
|
// what lacks; a second one stops the circuit at « sans-fiche ». The handover at the ticket (`bd
|
|
@@ -238,7 +240,9 @@
|
|
|
238
240
|
// of the lot, or with a green the sheet names; under a plan « comportement
|
|
239
241
|
// tests-adaptés », nothing has to turn red and every green passes, so only a broken
|
|
240
242
|
// file fails it (`preuveReussie`). A failed proof relaunches the
|
|
241
|
-
// testwriter with its report, twice at most.
|
|
243
|
+
// testwriter with its report, twice at most. A proof whose pass is at 75 (« à repasser ») proved
|
|
244
|
+
// nothing: neither passed nor failed, it counts no file and relaunches no testwriter, and the
|
|
245
|
+
// circuit stops at « a-repasser » as on a check, its report naming the wait of the machine. The report (reds, justified greens) is written at
|
|
242
246
|
// the ticket. A proof with a red launches the developpeur, and so does a proof without a red
|
|
243
247
|
// when a finding of the reviewer still open names him, or under a plan « comportement tests-adaptés »,
|
|
244
248
|
// whose lot has code to write though nothing turns red; else it skips him (`apresLaPreuve`): the
|
|
@@ -283,8 +287,10 @@
|
|
|
283
287
|
// - The checks after the developpeur judge the plan, as Bazel plays the targets of a change: `npm
|
|
284
288
|
// test -- <package>` for each package of the plan, touched by the lot or not (a package that plays no
|
|
285
289
|
// tests, `joueDesTests`, plays only when the lot touches it), `npm test -- <test files of the lot>`
|
|
286
|
-
// that none of them holds, each test played once, then the
|
|
287
|
-
//
|
|
290
|
+
// that none of them holds, each test played once, then the build of what the guard tasks wait for in
|
|
291
|
+
// the graph (`npm exec --no -- grillhouse construire --gardes`, scripts/taches-du-graphe.mjs: a guard
|
|
292
|
+
// never plays before the build of what it reads), then the guards in the envelope of the plan
|
|
293
|
+
// (`GRILLHOUSE_ENVELOPPE=<plan> npm run grillhouse:gardes`, and `npm run gardes` when the project has it). Each red is read in the
|
|
288
294
|
// results of its command: a failed test of the reports of Vitest, a finding of level error of
|
|
289
295
|
// the guards' SARIF, a failed build or task of the summary; a red check none of them situates is
|
|
290
296
|
// one red of the command. As SARIF 2.1.0 and GitHub code scanning, a warning or a note shows
|
|
@@ -382,7 +388,7 @@
|
|
|
382
388
|
// others and the path of the log; the report of a stop names every red with its package.
|
|
383
389
|
// - A check at 75 (« à repasser ») out of the final pass plays once more, the gesture `rejeu`;
|
|
384
390
|
// the 75 of verifier, the final pass's, is final (its wait for the lock of the machine reached
|
|
385
|
-
// its bound). A check still at 75 ends the circuit at 75, the gesture `a-repasser`. A red relaunches the developpeur
|
|
391
|
+
// its bound). A check still at 75, or a proof at 75, ends the circuit at 75, the gesture `a-repasser`. A red relaunches the developpeur
|
|
386
392
|
// with its report, twice at most, the third session on the strong model (`lancer.sh --modele
|
|
387
393
|
// opus`; the other sessions name `sonnet`, and none fixes the effort): three sessions for the checks, and three for the final pass.
|
|
388
394
|
// - After the final pass, green, the reviewer: a session out of the envelope, which sees the whole
|
|
@@ -607,7 +613,7 @@
|
|
|
607
613
|
// stops on a write out of the plan, `hors-plan` that lancer.sh ranges under the session's id), 25 inattendu
|
|
608
614
|
// (an act that fails, an exception no rule of the circuit settles: its message, its stack and its
|
|
609
615
|
// step in its question, `arretInattendu`), each a question for the supervisor; 26 limite-d-usage (a session the
|
|
610
|
-
// usage limit cuts: no question, the circuit reports itself to the hour the usage returns and resumes the step); 75 a-repasser (a check or the integration still at 75 once played again,
|
|
616
|
+
// usage limit cuts: no question, the circuit reports itself to the hour the usage returns and resumes the step); 75 a-repasser (a check or the integration still at 75 once played again, a proof at 75,
|
|
611
617
|
// or the branch still in the queue), the gesture `a-repasser`.
|
|
612
618
|
import { spawnSync } from 'node:child_process';
|
|
613
619
|
import { createHash } from 'node:crypto';
|
|
@@ -619,6 +625,7 @@ import {
|
|
|
619
625
|
appendFileSync,
|
|
620
626
|
readFileSync,
|
|
621
627
|
rmSync,
|
|
628
|
+
statSync,
|
|
622
629
|
writeFileSync,
|
|
623
630
|
} from 'node:fs';
|
|
624
631
|
import os from 'node:os';
|
|
@@ -626,6 +633,7 @@ import path from 'node:path';
|
|
|
626
633
|
import { empreintesDe, outilsDe } from './outils-cles.mjs';
|
|
627
634
|
import { donneesDe } from './donnees-cles.mjs';
|
|
628
635
|
import { engendresDe } from './engendres.mjs';
|
|
636
|
+
import { matieresDeclareesDe } from './matieres-cles.mjs';
|
|
629
637
|
import { fluxDe } from './flux-des-paquets.mjs';
|
|
630
638
|
import {
|
|
631
639
|
AGENTS_DU_LOT,
|
|
@@ -636,21 +644,22 @@ import {
|
|
|
636
644
|
EXPLORATEUR,
|
|
637
645
|
libelle,
|
|
638
646
|
monteeDe,
|
|
639
|
-
nomDuRole,
|
|
640
647
|
QUESTIONNEUR,
|
|
641
648
|
SUITE,
|
|
642
649
|
} from './etapes.mjs';
|
|
643
650
|
import {
|
|
644
|
-
CODE,
|
|
645
651
|
CONTROLES,
|
|
646
652
|
correctionsDuPlan,
|
|
647
653
|
ouvertesDuPlan,
|
|
648
654
|
pasDuPlan,
|
|
649
655
|
questionsPosees,
|
|
650
|
-
|
|
656
|
+
contexteDeLExtension,
|
|
657
|
+
depart,
|
|
658
|
+
etendre as reprendreEtendu,
|
|
659
|
+
renvoiDe,
|
|
660
|
+
fichiersDeTestRouges,
|
|
651
661
|
TESTS,
|
|
652
662
|
} from './transitions.mjs';
|
|
653
|
-
import { departDepuis } from './reprise.mjs';
|
|
654
663
|
import {
|
|
655
664
|
arbreDeLaCopie,
|
|
656
665
|
controles,
|
|
@@ -698,20 +707,36 @@ import {
|
|
|
698
707
|
} from './ticket-du-circuit.mjs';
|
|
699
708
|
import { emettre } from './effets.mjs';
|
|
700
709
|
import { heureLocale } from './journal-des-etats.mjs';
|
|
701
|
-
import {
|
|
710
|
+
import {
|
|
711
|
+
arretDuStatut,
|
|
712
|
+
consigne,
|
|
713
|
+
auLancement,
|
|
714
|
+
idDeSeance,
|
|
715
|
+
jusquALaFiche,
|
|
716
|
+
rouleDeTest,
|
|
717
|
+
seance,
|
|
718
|
+
} from './seances.mjs';
|
|
702
719
|
import { releve } from './composants-affectes.mjs';
|
|
703
720
|
import { ligneDEtape, transcriptionsDeLaCopie } from './registre.mjs';
|
|
704
721
|
import {
|
|
705
722
|
bloquantsDeLaFiche,
|
|
706
723
|
cleDuConstat,
|
|
724
|
+
estUneBascule,
|
|
725
|
+
estUnPlan,
|
|
726
|
+
ficheDuPlan,
|
|
707
727
|
reponsesAuxQuestions,
|
|
728
|
+
sorteDesFiches,
|
|
708
729
|
sorteDuPlan,
|
|
709
730
|
} from './resultats.mjs';
|
|
731
|
+
|
|
732
|
+
// The sheet of the plan that says a field, as scripts/resultats.mjs reads it.
|
|
733
|
+
export { ficheDuPlan };
|
|
710
734
|
import { preparer, rolesDuConflit } from './enveloppe/travail-de-la-copie.mjs';
|
|
711
735
|
import { refusArbitrage } from './integration/integrer.mjs';
|
|
712
736
|
import { prendreUnRang } from './places-de-la-machine.mjs';
|
|
713
737
|
import { langageDe, langageDeLaCopie } from './langages.mjs';
|
|
714
738
|
import { leTitre, ticketAuLancement } from './depart-du-ticket.mjs';
|
|
739
|
+
import { fichiersNommesAuTicket } from './fichiers-nommes.mjs';
|
|
715
740
|
import { ouvrirBase } from './mesure/base-de-passe.mjs';
|
|
716
741
|
import { GREFFON } from './cadre.mjs';
|
|
717
742
|
import { retirerLesCopiesDuDepot } from './copies-finies.mjs';
|
|
@@ -835,6 +860,10 @@ export function contexte(o) {
|
|
|
835
860
|
};
|
|
836
861
|
// The extension of the plan a write out of the plan in a file the ticket names asks for.
|
|
837
862
|
ctx.etendreEnVol = e => etendreEnVol(ctx, e);
|
|
863
|
+
// The same for a write of the testwriter in a test file of a reader package out of the plan.
|
|
864
|
+
ctx.etendreTestsEnVol = e => etendreTestsEnVol(ctx, e);
|
|
865
|
+
// The reader packages the plan extended to their tests (kept among the circuit's sheets).
|
|
866
|
+
ctx.testsEtendus = testsEtendusDuPlan(ctx, ctx.paquets);
|
|
838
867
|
// The components the plan set apart from the survey, which the checks keep verifying.
|
|
839
868
|
ctx.ecartes = ecartesDuPlan(fichesDuPlan(ctx), ctx.paquets, resoudre);
|
|
840
869
|
return ctx;
|
|
@@ -898,6 +927,82 @@ function etendreAuxEcartes(ctx, { composants, rouges = [] }) {
|
|
|
898
927
|
ctx.ecartes = ctx.ecartes.filter(d => !gagnes.includes(d));
|
|
899
928
|
}
|
|
900
929
|
|
|
930
|
+
// The test files <rouges> (the texts of reds) name inside the directory <dossier>, each once.
|
|
931
|
+
const fichiersRougesDe = (rouges, dossier) => [
|
|
932
|
+
...new Set(
|
|
933
|
+
rouges
|
|
934
|
+
.flatMap(r => [r.fichier, ...String(r.texte ?? '').split(' ')])
|
|
935
|
+
.filter(t => typeof t === 'string' && t.startsWith(`${dossier}/`))
|
|
936
|
+
.map(t => t.split(':')[0]),
|
|
937
|
+
),
|
|
938
|
+
];
|
|
939
|
+
|
|
940
|
+
// The plan of <ctx> extended, without a stop, to the tests alone of the reader packages
|
|
941
|
+
// <composants> (directories) whose reds all lie in test files (`testsLecteurs` of the checks): the
|
|
942
|
+
// title of the plan does not change, the package does not enter the plan, and the testwriter alone
|
|
943
|
+
// writes those test files (the lock and the envelope read `ctx.testsEtendus`). Said at the ticket
|
|
944
|
+
// with its piece, the package, its red test files and, for one the plan set apart, the reason that
|
|
945
|
+
// the red belies; kept among the circuit's sheets (`testsEtendus`) as `etendus` is. A package
|
|
946
|
+
// already extended to its tests, or that the plan holds, is not extended again.
|
|
947
|
+
function etendreAuxTests(ctx, { composants, rouges = [] }) {
|
|
948
|
+
const dedans = d => ctx.paquets.some(p => p === '.' || d === p || d.startsWith(`${p}/`));
|
|
949
|
+
const gagnes = composants.filter(c => !(ctx.testsEtendus ?? []).includes(c) && !dedans(c));
|
|
950
|
+
if (!gagnes.length) {
|
|
951
|
+
return;
|
|
952
|
+
}
|
|
953
|
+
// The reasons of the last sheet of the explorateur that says `ecartes` (his answer to the
|
|
954
|
+
// questionneur that says none leaves those of the plan it answers).
|
|
955
|
+
const raisons = new Map(
|
|
956
|
+
(
|
|
957
|
+
lesFiches(ctx)
|
|
958
|
+
.filter(e => e.role === EXPLORATEUR && Array.isArray(e.fiche?.ecartes))
|
|
959
|
+
.at(-1)?.fiche.ecartes ?? []
|
|
960
|
+
).flatMap(e => {
|
|
961
|
+
try {
|
|
962
|
+
return [[ctx.resoudre(e.composant), e.raison]];
|
|
963
|
+
} catch {
|
|
964
|
+
return [];
|
|
965
|
+
}
|
|
966
|
+
})
|
|
967
|
+
);
|
|
968
|
+
const pieces = gagnes.map(c => {
|
|
969
|
+
const fichiers = fichiersRougesDe(rouges, c);
|
|
970
|
+
const rouge = fichiers.length ? fichiers.join(', ') : 'un rouge de test';
|
|
971
|
+
return raisons.has(c)
|
|
972
|
+
? `${c} : ${rouge} ; écarté du relevé pour « ${raisons.get(c)} », ce que ce rouge dément`
|
|
973
|
+
: `${c} : ${rouge} ; hors du titre du plan, que le plan n'a pas écarté`;
|
|
974
|
+
});
|
|
975
|
+
inscrire(ctx, {
|
|
976
|
+
role: AUTEUR_DU_CIRCUIT,
|
|
977
|
+
// No fingerprint: the plan has passed already, and the title does not change.
|
|
978
|
+
plan: { testsEtendus: gagnes },
|
|
979
|
+
});
|
|
980
|
+
commenter(
|
|
981
|
+
ctx,
|
|
982
|
+
'plan',
|
|
983
|
+
`le circuit étend le plan aux tests de ${gagnes.join(', ')}, des paquets lecteurs que le lot fait rougir : leurs fichiers de test seuls entrent au plan, pour le testwriter ; le code de ces paquets reste hors du plan, et ils n'entrent pas au titre (${ctx.paquets.join(', ')}).\n${pieces.map(p => `- ${p}`).join('\n')}`
|
|
984
|
+
);
|
|
985
|
+
ctx.testsEtendus = [...(ctx.testsEtendus ?? []), ...gagnes];
|
|
986
|
+
}
|
|
987
|
+
|
|
988
|
+
// The same extension for the package <paquet> of a test file <chemin> that the lock stopped the
|
|
989
|
+
// testwriter on (« hors-plan »), <piece> saying why: the session resumes.
|
|
990
|
+
function etendreTestsEnVol(ctx, { paquet, chemin, piece }) {
|
|
991
|
+
if ((ctx.testsEtendus ?? []).includes(paquet)) {
|
|
992
|
+
return;
|
|
993
|
+
}
|
|
994
|
+
inscrire(ctx, {
|
|
995
|
+
role: AUTEUR_DU_CIRCUIT,
|
|
996
|
+
plan: { testsEtendus: [paquet] },
|
|
997
|
+
});
|
|
998
|
+
commenter(
|
|
999
|
+
ctx,
|
|
1000
|
+
'plan',
|
|
1001
|
+
`le circuit étend le plan aux tests de ${paquet} : ${chemin}, un fichier de test d'un paquet lecteur que le testwriter écrit (${piece}) ; le code de ${paquet} reste hors du plan.`
|
|
1002
|
+
);
|
|
1003
|
+
ctx.testsEtendus = [...(ctx.testsEtendus ?? []), paquet];
|
|
1004
|
+
}
|
|
1005
|
+
|
|
901
1006
|
// The plan of <ctx> extended to the package <paquet>, the home of <chemin>, a file the ticket's
|
|
902
1007
|
// description names (<piece>: « ticket, § Architecture » or « ticket, critère N »): the package
|
|
903
1008
|
// enters the title in the order of `ordonnerLePlan`, written by bd and said at the ticket with its
|
|
@@ -1000,18 +1105,6 @@ function inscrireEtape(ctx, { etape, debut }) {
|
|
|
1000
1105
|
});
|
|
1001
1106
|
}
|
|
1002
1107
|
|
|
1003
|
-
// The rule of a test file of the module of the language of the copy of <ctx> (`estUnTest`); a copy
|
|
1004
|
-
// the module does not read judges every file the developpeur's.
|
|
1005
|
-
function rouleDeTest(ctx) {
|
|
1006
|
-
return fichier => {
|
|
1007
|
-
try {
|
|
1008
|
-
return langageDe(ctx.copie).estUnTest(fichier, ctx.copie);
|
|
1009
|
-
} catch {
|
|
1010
|
-
return null;
|
|
1011
|
-
}
|
|
1012
|
-
};
|
|
1013
|
-
}
|
|
1014
|
-
|
|
1015
1108
|
// The steps whose pass judges the lot, 3.1 and 4.1 (one state, `finale` apart): the copy is
|
|
1016
1109
|
// prepared on the tip of main before each of them.
|
|
1017
1110
|
export const SUR_LA_POINTE = new Set([CONTROLES]);
|
|
@@ -1187,6 +1280,27 @@ export function engendresAuLancement(racine) {
|
|
|
1187
1280
|
}
|
|
1188
1281
|
}
|
|
1189
1282
|
|
|
1283
|
+
// The folders of test material the project declares (`grillhouse.matieres`,
|
|
1284
|
+
// scripts/matieres-cles.mjs), read at the launch of a run from its main tree: `{ matieres }`, or
|
|
1285
|
+
// `{ arret }`, the stop « lancement » that goes up to the supervisor before any session, the
|
|
1286
|
+
// faults of the key named.
|
|
1287
|
+
export function matieresAuLancement(racine) {
|
|
1288
|
+
try {
|
|
1289
|
+
return { matieres: matieresDeclareesDe(racine) };
|
|
1290
|
+
} catch (err) {
|
|
1291
|
+
const rapport = `La clé grillhouse.matieres du package.json est refusée :\n${err.message}`;
|
|
1292
|
+
return {
|
|
1293
|
+
arret: {
|
|
1294
|
+
code: ARRETS.lancement,
|
|
1295
|
+
nom: 'lancement',
|
|
1296
|
+
rapport,
|
|
1297
|
+
piece: `$ npm pkg get grillhouse.matieres\n${rapport}`,
|
|
1298
|
+
question: `${rapport}\nLa clé se corrige au package.json du projet, puis \`--reprendre\`.`,
|
|
1299
|
+
},
|
|
1300
|
+
};
|
|
1301
|
+
}
|
|
1302
|
+
}
|
|
1303
|
+
|
|
1190
1304
|
// The flows of the CI the project declares (`grillhouse.flux`, scripts/flux-des-paquets.mjs), read
|
|
1191
1305
|
// at the launch of a run from its main tree: `{ flux }`, or `{ arret }`, the stop « lancement »
|
|
1192
1306
|
// that goes up to the supervisor before any session, the faults of the key named.
|
|
@@ -1207,26 +1321,6 @@ export function fluxAuLancement(racine) {
|
|
|
1207
1321
|
}
|
|
1208
1322
|
}
|
|
1209
1323
|
|
|
1210
|
-
// The stop for the sheet <fiche> of the session <tentative> of <role>, BLOQUÉ (« hors-portee »)
|
|
1211
|
-
// or BESOIN (« besoin »): its reason or question first, then its handover; the sheet's piece as
|
|
1212
|
-
// its own, and the agent's question as its own.
|
|
1213
|
-
function arretDuStatut(ctx, role, tentative, fiche) {
|
|
1214
|
-
const passation = derniereDe(ctx, role)?.text ?? 'aucune';
|
|
1215
|
-
const qui = `Le ${nomDuRole(role)}`;
|
|
1216
|
-
const { piece } = fiche;
|
|
1217
|
-
return fiche.statut === 'BESOIN'
|
|
1218
|
-
? new Arret(
|
|
1219
|
-
'besoin',
|
|
1220
|
-
`${qui} attend une réponse (séance ${tentative}) : ${fiche.question}\n\nSa passation :\n\n${passation}`,
|
|
1221
|
-
{ piece, question: `${qui} demande : ${fiche.question}` }
|
|
1222
|
-
)
|
|
1223
|
-
: new Arret(
|
|
1224
|
-
'hors-portee',
|
|
1225
|
-
`${qui} se déclare bloqué (séance ${tentative}) : ${fiche.raison}\n\nLe circuit ne le relance pas sur ce rouge. Sa passation :\n\n${passation}`,
|
|
1226
|
-
{ piece }
|
|
1227
|
-
);
|
|
1228
|
-
}
|
|
1229
|
-
|
|
1230
1324
|
// The stop « hors-portee » for the developpeur's sheet FAIT <fiche> of the session <tentative>
|
|
1231
1325
|
// that does not hold criteria out of the plan (`hors_plan`), as a required check keeps a merge
|
|
1232
1326
|
// from a change that does not pass it: each criterion and its package in the fact and in the
|
|
@@ -1246,21 +1340,16 @@ function arretHorsDuPlan(ctx, tentative, fiche) {
|
|
|
1246
1340
|
);
|
|
1247
1341
|
}
|
|
1248
1342
|
|
|
1249
|
-
// The sending to the testwriter in the developpeur's sheet <fiche> (its `renvoi`)
|
|
1250
|
-
//
|
|
1251
|
-
//
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
const controles = ctx.controlesRouges
|
|
1260
|
-
? `\n\nLa sortie rouge des derniers contrôles :\n\n${ctx.controlesRouges}`
|
|
1261
|
-
: '';
|
|
1262
|
-
return `Le développeur renvoie le rouge qui reste aux tests du lot${raison}.\n\nSa passation :\n\n${passation}${controles}`;
|
|
1263
|
-
}
|
|
1343
|
+
// The sending to the testwriter in the developpeur's sheet <fiche> (its `renvoi`), as the table of
|
|
1344
|
+
// the transitions words it (`renvoiDe`) from the developpeur's last handover and the red output of
|
|
1345
|
+
// the last checks (`ctx.controlesRouges`).
|
|
1346
|
+
const renvoiDuTestwriter = (ctx, fiche) =>
|
|
1347
|
+
renvoiDe({
|
|
1348
|
+
fiche,
|
|
1349
|
+
passation: derniereDe(ctx, 'developpeur')?.text ?? null,
|
|
1350
|
+
controlesRouges: ctx.controlesRouges,
|
|
1351
|
+
fichiersRouges: fichiersDeTestRouges(ctx.controlesRouges),
|
|
1352
|
+
});
|
|
1264
1353
|
|
|
1265
1354
|
// The findings still open once the reviewer's sheet RENDU <fiche> is read, as the issues of a
|
|
1266
1355
|
// review stay open until the review that resolves them: each blocking finding of the sheet (a
|
|
@@ -1294,39 +1383,9 @@ export function constatsOuverts(ctx, fiche, texte) {
|
|
|
1294
1383
|
return [...restes, ...neufs];
|
|
1295
1384
|
}
|
|
1296
1385
|
|
|
1297
|
-
// The
|
|
1298
|
-
//
|
|
1299
|
-
|
|
1300
|
-
// answers, so that the field survives the answer; null without a sheet of the plan.
|
|
1301
|
-
export function ficheDuPlan(plans, champ) {
|
|
1302
|
-
const derniere = plans.at(-1);
|
|
1303
|
-
if (!derniere) {
|
|
1304
|
-
return null;
|
|
1305
|
-
}
|
|
1306
|
-
if (derniere.reponse && !(champ in derniere.fiche) && plans.length > 1) {
|
|
1307
|
-
return plans.at(-2).fiche;
|
|
1308
|
-
}
|
|
1309
|
-
return derniere.fiche;
|
|
1310
|
-
}
|
|
1311
|
-
|
|
1312
|
-
// A sheet of the plan (the explorateur's, which holds criteria), and a line of the circuit that
|
|
1313
|
-
// turns the sort of the ticket on the same plan (`ecrireLaSorte`: the supervisor's `--mecanique`,
|
|
1314
|
-
// the reviewer's `comportement-change`).
|
|
1315
|
-
const estUnPlan = e => e.role === EXPLORATEUR && Array.isArray(e.fiche?.criteres);
|
|
1316
|
-
const estUneBascule = e =>
|
|
1317
|
-
e.role === AUTEUR_DU_CIRCUIT && typeof e.sorte === 'object' && e.sorte !== null;
|
|
1318
|
-
|
|
1319
|
-
// The sort of the ticket its plan says (`sorteDuPlan` of scripts/resultats.mjs): the sheet of the
|
|
1320
|
-
// plan that says it (`ficheDuPlan`), comportement without one (grillhouse-sos); a line that turns
|
|
1321
|
-
// the sort after the last sheet of the plan stands over it, the plan kept as it is.
|
|
1322
|
-
function sorteDuTicket(ctx) {
|
|
1323
|
-
const tous = lesFiches(ctx);
|
|
1324
|
-
const bascule = tous.findLastIndex(estUneBascule);
|
|
1325
|
-
if (bascule > tous.findLastIndex(estUnPlan)) {
|
|
1326
|
-
return tous[bascule].sorte;
|
|
1327
|
-
}
|
|
1328
|
-
return sorteDuPlan(ficheDuPlan(tous.filter(estUnPlan), 'sorte'));
|
|
1329
|
-
}
|
|
1386
|
+
// The sort of the ticket of <ctx>, read from its kept results (`sorteDesFiches` of
|
|
1387
|
+
// scripts/resultats.mjs).
|
|
1388
|
+
const sorteDuTicket = ctx => sorteDesFiches(lesFiches(ctx));
|
|
1330
1389
|
|
|
1331
1390
|
// Whether a testwriter or a developpeur has worked the lot since the last sheet of the plan or the
|
|
1332
1391
|
// last turn of its sort.
|
|
@@ -1344,7 +1403,7 @@ export const cheminMecanique = ctx =>
|
|
|
1344
1403
|
ctx.sorte?.genre === 'mécanique' && !ctx.depuis && !lotTravaille(ctx);
|
|
1345
1404
|
|
|
1346
1405
|
// The RENDU verdicts since the ticket's last ACCEPTÉ: a lot the queue sent back starts a new count.
|
|
1347
|
-
function rendusDepuisAccepte(ctx) {
|
|
1406
|
+
export function rendusDepuisAccepte(ctx) {
|
|
1348
1407
|
const verdicts = fichesDe(ctx, 'relecteur').map(f => f.verdict);
|
|
1349
1408
|
return verdicts.length - (verdicts.lastIndexOf('ACCEPTÉ') + 1);
|
|
1350
1409
|
}
|
|
@@ -1519,11 +1578,14 @@ export async function lireLeFait(ctx, fait, parametres, faits) {
|
|
|
1519
1578
|
case 'etendreAuxEcartes':
|
|
1520
1579
|
etendreAuxEcartes(ctx, parametres);
|
|
1521
1580
|
return true;
|
|
1581
|
+
case 'etendreAuxTests':
|
|
1582
|
+
etendreAuxTests(ctx, parametres);
|
|
1583
|
+
return true;
|
|
1522
1584
|
case 'empreinteAvant':
|
|
1523
1585
|
case 'empreinte':
|
|
1524
1586
|
return empreinte(ctx);
|
|
1525
1587
|
case 'renvoi':
|
|
1526
|
-
return
|
|
1588
|
+
return renvoiDuTestwriter(ctx, faits.seance);
|
|
1527
1589
|
case 'passation':
|
|
1528
1590
|
return passations(ctx).at(-1)?.text ?? null;
|
|
1529
1591
|
case 'arbreAvant':
|
|
@@ -1668,55 +1730,22 @@ export function monter(ctx, a) {
|
|
|
1668
1730
|
const laQuestion = (ticket, { arret, qui, ou, question }) =>
|
|
1669
1731
|
`⛔ Circuit de ${ticket} : question au ${qui} (${arret}, à ${ou}) : ${String(question ?? '').trim()}\n\nLa réponse : \`${lesReponses(ticket, 'RUNNING', true)}\`.\n`;
|
|
1670
1732
|
|
|
1671
|
-
// Where the run starts
|
|
1672
|
-
//
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
}
|
|
1685
|
-
if (ctx.depuis === 'developpeur' && e?.raison === 'integration' && ctx.refus) {
|
|
1686
|
-
ctx.refus = { ...ctx.refus, lance: true, relance: false };
|
|
1687
|
-
return { etape: CODE, tentative: 1, rapport: rapportDuRefus(ctx.refus), finale: false };
|
|
1688
|
-
}
|
|
1689
|
-
if (ctx.depuis === 'testwriter') {
|
|
1690
|
-
ctx.refus = null;
|
|
1691
|
-
}
|
|
1692
|
-
if (ctx.depuis) {
|
|
1693
|
-
const { etape, tentative, rapport, finale } = departDepuis(ctx.depuis);
|
|
1694
|
-
return { etape, tentative, rapport, finale };
|
|
1695
|
-
}
|
|
1696
|
-
if (!ctx.reprendre) {
|
|
1697
|
-
// The run starts over: no lot verified, no finding of a review open, no refusal, no checks played.
|
|
1698
|
-
ctx.verts = null;
|
|
1699
|
-
ctx.reprise = null;
|
|
1700
|
-
ctx.relancesTestwriter = null;
|
|
1701
|
-
ctx.verifie = null;
|
|
1702
|
-
ctx.toursDeLaPasseFinale = null;
|
|
1703
|
-
ctx.constats = [];
|
|
1704
|
-
ctx.refus = null;
|
|
1705
|
-
ctx.controlesRouges = null;
|
|
1706
|
-
return { etape: TESTS, tentative: 1, rapport: null, finale: false };
|
|
1707
|
-
}
|
|
1708
|
-
if (!e) {
|
|
1709
|
-
throw new Usage(`rien à reprendre : le circuit de ${ctx.ticket} n'a aucun état d'arrêt.`);
|
|
1710
|
-
}
|
|
1711
|
-
if (e.etape === 'integre') {
|
|
1712
|
-
throw new Usage(`rien à reprendre : le lot de ${ctx.ticket} est intégré.`);
|
|
1733
|
+
// Where the run starts (`depart` of the table of the transitions): the memory it changes is applied
|
|
1734
|
+
// to <ctx>, a refusal is a Usage; the state <e> (null without one) is the one of the stop.
|
|
1735
|
+
function departDuCircuit(ctx, e) {
|
|
1736
|
+
const d = depart({
|
|
1737
|
+
depuis: ctx.depuis ?? null,
|
|
1738
|
+
reprendre: Boolean(ctx.reprendre),
|
|
1739
|
+
marque: Boolean(ctx.testwriterDemande),
|
|
1740
|
+
etat: e,
|
|
1741
|
+
refus: ctx.refus,
|
|
1742
|
+
ticket: ctx.ticket,
|
|
1743
|
+
});
|
|
1744
|
+
if (d.usage) {
|
|
1745
|
+
throw new Usage(d.usage);
|
|
1713
1746
|
}
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
tentative: e.etape === CONTROLES ? 0 : 1,
|
|
1717
|
-
rapport: e.rapport,
|
|
1718
|
-
finale: e.finale === true,
|
|
1719
|
-
};
|
|
1747
|
+
Object.assign(ctx, d.memoire);
|
|
1748
|
+
return d.suivant;
|
|
1720
1749
|
}
|
|
1721
1750
|
|
|
1722
1751
|
// The end of the run, its exit code <code>: an end on a stop kept with the circuit's results
|
|
@@ -2015,8 +2044,8 @@ function ecrireLaSorte(ctx, sorte) {
|
|
|
2015
2044
|
commenter(ctx, 'plan', `la sorte du ticket devient ${texteDeLaSorte(sorte)} ; le plan reste.`);
|
|
2016
2045
|
}
|
|
2017
2046
|
|
|
2018
|
-
// The `--mecanique` answer of <ctx> to the stop <e> of the testwriter
|
|
2019
|
-
// scripts/reponses-du-circuit.mjs, which refuses out of
|
|
2047
|
+
// The `--mecanique` answer of <ctx> to the stop <e> of the testwriter or of the proof of the red
|
|
2048
|
+
// (`reponseMecanique` of scripts/reponses-du-circuit.mjs, which refuses out of those stops, without a reason or on a
|
|
2020
2049
|
// ticket already mechanical: a Usage): the sort turned, the plan kept as it is, and the stop's
|
|
2021
2050
|
// state moved to the step the sort asks, 1.1 with a command, the developpeur without.
|
|
2022
2051
|
function basculer(ctx, e) {
|
|
@@ -2036,6 +2065,29 @@ function basculer(ctx, e) {
|
|
|
2036
2065
|
return { ...e, etape: r.suivant.etape, raison: null, question: null, rapport: null };
|
|
2037
2066
|
}
|
|
2038
2067
|
|
|
2068
|
+
// The packages the plan of <ctx> gained by an extension (`etendus`, kept among the circuit's
|
|
2069
|
+
// sheets), which the circuit keeps in the plan by itself (`avecLesEtendus`).
|
|
2070
|
+
const etendusDuPlan = ctx => [
|
|
2071
|
+
...new Set(
|
|
2072
|
+
lesFiches(ctx).flatMap(e => (e.role === AUTEUR_DU_CIRCUIT ? (e.plan?.etendus ?? []) : []))
|
|
2073
|
+
),
|
|
2074
|
+
];
|
|
2075
|
+
|
|
2076
|
+
/**
|
|
2077
|
+
* The directories of the reader packages the plan of <ctx> extended to their tests alone
|
|
2078
|
+
* (`testsEtendus`, kept among the circuit's sheets), less those the plan <paquets> holds: a package
|
|
2079
|
+
* that enters the plan leaves the list. A plan written again keeps it, and never reads it into
|
|
2080
|
+
* its title (`avecLesEtendus` reads `etendus` alone).
|
|
2081
|
+
*/
|
|
2082
|
+
export function testsEtendusDuPlan(ctx, paquets) {
|
|
2083
|
+
const dedans = d => paquets.some(p => p === '.' || d === p || d.startsWith(`${p}/`));
|
|
2084
|
+
return [
|
|
2085
|
+
...new Set(
|
|
2086
|
+
lesFiches(ctx).flatMap(e => (e.role === AUTEUR_DU_CIRCUIT ? (e.plan?.testsEtendus ?? []) : []))
|
|
2087
|
+
),
|
|
2088
|
+
].filter(d => !dedans(d));
|
|
2089
|
+
}
|
|
2090
|
+
|
|
2039
2091
|
/**
|
|
2040
2092
|
* The plan <paquets> the explorateur writes for <ctx>, with each package the supervisor gave the
|
|
2041
2093
|
* plan (`--etendre`, kept among the sheets, `etendus`) that it leaves out, in its order
|
|
@@ -2046,10 +2098,7 @@ function basculer(ctx, e) {
|
|
|
2046
2098
|
* the plan over without them.
|
|
2047
2099
|
*/
|
|
2048
2100
|
export function avecLesEtendus(ctx, paquets) {
|
|
2049
|
-
const
|
|
2050
|
-
e.role === AUTEUR_DU_CIRCUIT ? (e.plan?.etendus ?? []) : []
|
|
2051
|
-
);
|
|
2052
|
-
const gardes = [...new Set(donnes)].filter(c => !paquets.includes(c));
|
|
2101
|
+
const gardes = etendusDuPlan(ctx).filter(c => !paquets.includes(c));
|
|
2053
2102
|
if (!gardes.length) {
|
|
2054
2103
|
return paquets;
|
|
2055
2104
|
}
|
|
@@ -2066,8 +2115,17 @@ export function avecLesEtendus(ctx, paquets) {
|
|
|
2066
2115
|
// (by its name and by its path), or a component of the survey of the plan's description
|
|
2067
2116
|
// <description> (scripts/composants-affectes.mjs, `releve`, played by the circuit with no
|
|
2068
2117
|
// session, as it checks the packages) that the sheet neither puts in its packages nor sets apart
|
|
2069
|
-
// with its reason (`ecartes`)
|
|
2070
|
-
|
|
2118
|
+
// with its reason (`ecartes`); or a component the title of the ticket named before the plan
|
|
2119
|
+
// (<composants>, their directories; those an extension gave, which the circuit keeps by itself,
|
|
2120
|
+
// left out) that the sheet neither keeps in its packages nor sets apart with its reason: the
|
|
2121
|
+
// declared scope of a change bounds what it writes (the OWNERS of Chromium, the affected projects
|
|
2122
|
+
// of Nx), and a plan narrows it by its word alone; or a component of the title set apart, its
|
|
2123
|
+
// reason given or not, while the description names a file of it the packages do not hold
|
|
2124
|
+
// (`fichiersNommesAuTicket`; a file of the root is one no component holds). <ecartes> are the
|
|
2125
|
+
// components the sheet sets apart in effect: its own, or, for an answer to the questionneur that
|
|
2126
|
+
// says none, those of the plan it answers. A session that writes one is resumed once
|
|
2127
|
+
// (`jusquALaFiche`).
|
|
2128
|
+
function fautesDesPaquets(ctx, fiche, description, composants, ecartes) {
|
|
2071
2129
|
const dossier = p => {
|
|
2072
2130
|
try {
|
|
2073
2131
|
return ctx.resoudre(p);
|
|
@@ -2084,12 +2142,37 @@ function fautesDesPaquets(ctx, fiche, description) {
|
|
|
2084
2142
|
if (doubles.length) {
|
|
2085
2143
|
return `paquets : ${doubles.join(', ')} nomme un paquet déjà nommé dans le plan`;
|
|
2086
2144
|
}
|
|
2087
|
-
const
|
|
2145
|
+
const aPart = ecartes.map(e => dossier(e.composant));
|
|
2146
|
+
const tenus = [...dossiers, ...aPart];
|
|
2088
2147
|
const couvre = (d, c) => d === '.' || c === d || c.startsWith(`${d}/`);
|
|
2148
|
+
const tenu = d => tenus.some(t => t !== null && couvre(t, d));
|
|
2149
|
+
const etendus = etendusDuPlan(ctx);
|
|
2150
|
+
const duTitre = composants.filter(d => !etendus.includes(d) && !tenu(d));
|
|
2151
|
+
if (duTitre.length) {
|
|
2152
|
+
return `paquets : ${nomsDe(ctx, duTitre).join(', ')}, que le titre du ticket nomme, n'est ni dans les paquets ni dans les écartés (ecartes, avec sa raison)`;
|
|
2153
|
+
}
|
|
2089
2154
|
const racine = existsSync(ctx.copie) ? ctx.copie : ctx.racine;
|
|
2155
|
+
const duTitreAPart = aPart.filter(d => d !== null && composants.includes(d));
|
|
2156
|
+
if (duTitreAPart.length) {
|
|
2157
|
+
const estUnFichier = c => statSync(path.join(racine, c), { throwIfNoEntry: false })?.isFile();
|
|
2158
|
+
const autres = composantsDe(racine)
|
|
2159
|
+
.map(c => c.dossier)
|
|
2160
|
+
.filter(d => d !== '.');
|
|
2161
|
+
// Whether the component <d> holds <f>: the root holds what no other component does.
|
|
2162
|
+
const porte = (d, f) =>
|
|
2163
|
+
d === '.' ? !autres.some(a => f.startsWith(`${a}/`)) : f.startsWith(`${d}/`);
|
|
2164
|
+
for (const { chemin, piece } of fichiersNommesAuTicket(description, estUnFichier)) {
|
|
2165
|
+
const d = dossiers.some(p => couvre(p, chemin))
|
|
2166
|
+
? undefined
|
|
2167
|
+
: duTitreAPart.find(a => porte(a, chemin));
|
|
2168
|
+
if (d !== undefined) {
|
|
2169
|
+
return `ecartes : ${nomsDe(ctx, [d]).join('')}, que le titre du ticket nomme, porte ${chemin}, que le ticket nomme (${piece}) : il reste dans les paquets`;
|
|
2170
|
+
}
|
|
2171
|
+
}
|
|
2172
|
+
}
|
|
2090
2173
|
const absents = releve(racine, description).composants.filter(c => {
|
|
2091
2174
|
const d = dossier(c);
|
|
2092
|
-
return d !== null && !
|
|
2175
|
+
return d !== null && !tenu(d);
|
|
2093
2176
|
});
|
|
2094
2177
|
return absents.length
|
|
2095
2178
|
? `paquets : ${absents.join(', ')}, que le relevé nomme, n'est ni dans les paquets ni dans les écartés (ecartes, avec sa raison)`
|
|
@@ -2121,12 +2204,16 @@ const ecartsDe = fiche =>
|
|
|
2121
2204
|
// passed, its title and criteria unchanged since (`empreinteDuPlan`), passes. The workflow of a
|
|
2122
2205
|
// ticket plays each step of the plan in an activity of its own (grillhouse-4nr.6.3): one of
|
|
2123
2206
|
// `PAS_DU_PLAN` (`unPasDuPlan`), the one that follows decided by `pasDuPlan` of
|
|
2124
|
-
// scripts/transitions.mjs, on the state of the plan (`{ avant, plan, premier, seance,
|
|
2125
|
-
// reponse }`), which `planAuDebut` starts.
|
|
2207
|
+
// scripts/transitions.mjs, on the state of the plan (`{ avant, composants, plan, premier, seance,
|
|
2208
|
+
// lu, posees, reponse }`), which `planAuDebut` starts.
|
|
2126
2209
|
|
|
2127
|
-
/**
|
|
2210
|
+
/**
|
|
2211
|
+
* The state of the plan of <ctx> before its first session: the description it starts from, and the
|
|
2212
|
+
* components its title names (`composants`, their directories), which the plan keeps.
|
|
2213
|
+
*/
|
|
2128
2214
|
export const planAuDebut = ctx => ({
|
|
2129
2215
|
avant: leTicket(ctx).description,
|
|
2216
|
+
composants: leTitre(ctx.ticket, leTicket(ctx).titre, ctx.resoudre).plan,
|
|
2130
2217
|
plan: null,
|
|
2131
2218
|
premier: null,
|
|
2132
2219
|
seance: null,
|
|
@@ -2164,10 +2251,20 @@ async function sessionDuPlan(ctx, role, texte, options) {
|
|
|
2164
2251
|
return { fiche, seance };
|
|
2165
2252
|
}
|
|
2166
2253
|
|
|
2167
|
-
// The explorateur's options on the plan of <ctx> whose description before
|
|
2168
|
-
|
|
2254
|
+
// The explorateur's options on the plan of <ctx> whose state is <e>: its description before the
|
|
2255
|
+
// plan (`avant`), the components its title named then (`composants`), and the plan a sheet
|
|
2256
|
+
// answers (`plan`, null before it), whose `ecartes` an answer that says none keeps
|
|
2257
|
+
// (`ficheDuPlan`).
|
|
2258
|
+
const optionsDeLExplorateur = (ctx, e) => ({
|
|
2169
2259
|
droits: horsDeLEnveloppe(ctx, EXPLORATEUR, 'sonnet'),
|
|
2170
|
-
valider: f =>
|
|
2260
|
+
valider: f =>
|
|
2261
|
+
fautesDesPaquets(
|
|
2262
|
+
ctx,
|
|
2263
|
+
f,
|
|
2264
|
+
decrireLePlan(e.avant, f.criteres, f.questions),
|
|
2265
|
+
e.composants ?? [],
|
|
2266
|
+
('ecartes' in f ? f.ecartes : e.plan?.ecartes) ?? []
|
|
2267
|
+
),
|
|
2171
2268
|
});
|
|
2172
2269
|
|
|
2173
2270
|
/**
|
|
@@ -2220,7 +2317,7 @@ const PAS_DU_PLAN = {
|
|
|
2220
2317
|
},
|
|
2221
2318
|
5
|
|
2222
2319
|
),
|
|
2223
|
-
{ ...optionsDeLExplorateur(ctx, e
|
|
2320
|
+
{ ...optionsDeLExplorateur(ctx, e), id: idDeSeance(ctx, 'plan'), evenement: 'plan' }
|
|
2224
2321
|
);
|
|
2225
2322
|
ecrireLePlan(
|
|
2226
2323
|
ctx,
|
|
@@ -2274,7 +2371,7 @@ const PAS_DU_PLAN = {
|
|
|
2274
2371
|
},
|
|
2275
2372
|
// The explorateur's session, resumed, answers the questions put once.
|
|
2276
2373
|
async reponse(ctx, e) {
|
|
2277
|
-
const explorateur = optionsDeLExplorateur(ctx, e
|
|
2374
|
+
const explorateur = optionsDeLExplorateur(ctx, e);
|
|
2278
2375
|
const { fiche: plan } = await sessionDuPlan(
|
|
2279
2376
|
ctx,
|
|
2280
2377
|
EXPLORATEUR,
|
|
@@ -2478,26 +2575,12 @@ const ORDRE_LU = {
|
|
|
2478
2575
|
" (le paquet gagné va en fin de plan : ni la copie ni l'arbre principal ne se chargent pour l'ordonner)",
|
|
2479
2576
|
};
|
|
2480
2577
|
|
|
2481
|
-
|
|
2482
|
-
// supervisor's answer (the packages <etendus> the plan gains, the plan <plan> as it is now), then his own text <contexte>. The stop's fact
|
|
2483
|
-
// and piece stay out of it: they say the plan as it was and tell a session to stop (a lock's
|
|
2484
|
-
// message), and a session reads its context as the supervisor's word. Without a question, his
|
|
2485
|
-
// text alone, or null.
|
|
2486
|
-
export function contexteDeLExtension({ question, etendus, plan, contexte }) {
|
|
2487
|
-
const reponse = question
|
|
2488
|
-
? `Le superviseur a étendu le plan à ${etendus.join(', ')} ; le plan du ticket est maintenant : ${plan}.`
|
|
2489
|
-
: null;
|
|
2490
|
-
return [reponse, contexte].filter(Boolean).join('\n\n') || null;
|
|
2491
|
-
}
|
|
2578
|
+
export { contexteDeLExtension };
|
|
2492
2579
|
|
|
2493
2580
|
// The plan extended by the supervisor to the packages of `--etendre` (each a path or a package
|
|
2494
2581
|
// name of the repository, else a Usage): each one enters the title in the order of
|
|
2495
|
-
// `ordonnerLePlan`, written by bd and said at the ticket.
|
|
2496
|
-
//
|
|
2497
|
-
// (`contexteDeLExtension`) and the text of `--contexte` as the context of its sessions; a stop « sans-livraison » whose developpeur's last
|
|
2498
|
-
// sheet sends the red to the testwriter (`renvoi`, twice in a row) resumes at the step of the role
|
|
2499
|
-
// it names, the testwriter's, as a retry plays the job that failed. Without a state, it starts on
|
|
2500
|
-
// the plan extended. The state the run resumes from.
|
|
2582
|
+
// `ordonnerLePlan`, written by bd and said at the ticket. Where the run then resumes is the
|
|
2583
|
+
// decision `etendre` of the table of the transitions. The state the run resumes from.
|
|
2501
2584
|
function etendre(ctx, e) {
|
|
2502
2585
|
const gagnes = [...new Set(ctx.etendre.map(ctx.resoudre))].filter(c => !ctx.paquets.includes(c));
|
|
2503
2586
|
const { plan, lu } = planEtendu(ctx, ctx.paquets, gagnes);
|
|
@@ -2517,21 +2600,18 @@ function etendre(ctx, e) {
|
|
|
2517
2600
|
'plan',
|
|
2518
2601
|
`le superviseur étend le plan à ${ctx.etendre.join(', ')} : ${titre.split(' — ').at(-1)}${ORDRE_LU[lu]}.`
|
|
2519
2602
|
);
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
}
|
|
2523
|
-
ctx.contexte = contexteDeLExtension({
|
|
2524
|
-
question: e.question,
|
|
2603
|
+
const d = reprendreEtendu({
|
|
2604
|
+
etat: e,
|
|
2525
2605
|
etendus: ctx.etendre,
|
|
2526
2606
|
plan: titre.split(' — ').at(-1),
|
|
2527
2607
|
contexte: ctx.contexte,
|
|
2608
|
+
renvoi: fichesDe(ctx, 'developpeur').at(-1)?.renvoi ?? null,
|
|
2528
2609
|
});
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
|
|
2534
|
-
return renvoi?.role === 'testwriter' ? { ...e, etape: TESTS } : e;
|
|
2610
|
+
if (d.reprend) {
|
|
2611
|
+
ctx.contexte = d.contexte;
|
|
2612
|
+
ctx.reprendre = true;
|
|
2613
|
+
}
|
|
2614
|
+
return d.suivant;
|
|
2535
2615
|
}
|
|
2536
2616
|
|
|
2537
2617
|
// The opening of <ctx> on <e> before its plan: `{ debut }`, or `{ code }`, a stop gone up.
|
|
@@ -2558,7 +2638,7 @@ async function avantLePlan(ctx, e) {
|
|
|
2558
2638
|
commenter(ctx, 'questionnement', 'le plan passe tel qu’il est, sur la reprise du superviseur.');
|
|
2559
2639
|
inscrire(ctx, { role: AUTEUR_DU_CIRCUIT, plan: { empreinte: empreinteDuPlan(leTicket(ctx)) } });
|
|
2560
2640
|
}
|
|
2561
|
-
const d =
|
|
2641
|
+
const d = departDuCircuit(ctx, e);
|
|
2562
2642
|
// A ticket labelled arbitrage starts and resumes only on the arbitrage its integration will
|
|
2563
2643
|
// ask for: the integration's rule, before any session.
|
|
2564
2644
|
const arbitrage = refusArbitrage({ id: ctx.ticket, ...leTicket(ctx) }, lesCommentaires(ctx));
|
|
@@ -2596,6 +2676,12 @@ async function avantLePlan(ctx, e) {
|
|
|
2596
2676
|
return { code: monter(ctx, { ...engendres.arret, etat: d }) };
|
|
2597
2677
|
}
|
|
2598
2678
|
ctx.engendres = engendres.engendres;
|
|
2679
|
+
// The folders of test material the project declares: refused at the launch when the key is
|
|
2680
|
+
// faulty, before any session.
|
|
2681
|
+
const matieres = matieresAuLancement(ctx.racine);
|
|
2682
|
+
if (matieres.arret) {
|
|
2683
|
+
return { code: monter(ctx, { ...matieres.arret, etat: d }) };
|
|
2684
|
+
}
|
|
2599
2685
|
// The flows of the CI, refused at the launch when their key is faulty: the reviewer's instruction
|
|
2600
2686
|
// reads those the lot touches (`consigneDesFlux`).
|
|
2601
2687
|
const flux = fluxAuLancement(ctx.racine);
|