@roomi-fields/grillhouse 0.48.0 → 0.49.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 +90 -0
- package/agents/direct.md +9 -0
- package/cadre/templates/projet/.github/workflows/ci.yml +11 -0
- package/cadre/templates/projet/.github/workflows/nuit.yml +15 -6
- package/cadre/templates/projet/CLAUDE.md +10 -6
- 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 +51 -14
- package/dist/temporal/acte.d.ts +9 -0
- package/dist/temporal/acte.js +43 -20
- package/dist/temporal/acte.js.map +1 -1
- 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 +30 -57
- 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/file/contrat.d.ts +16 -2
- package/dist/temporal/file/contrat.js +27 -3
- package/dist/temporal/file/contrat.js.map +1 -1
- package/dist/temporal/file/deroule.js +4 -4
- package/dist/temporal/file/deroule.js.map +1 -1
- package/dist/temporal/nuits/activites.d.ts +1 -15
- package/dist/temporal/nuits/activites.js +3 -62
- package/dist/temporal/nuits/activites.js.map +1 -1
- package/dist/temporal/nuits/contrat.d.ts +3 -21
- package/dist/temporal/nuits/deroule.js +38 -74
- package/dist/temporal/nuits/deroule.js.map +1 -1
- package/dist/temporal/places/client.d.ts +3 -16
- package/dist/temporal/places/client.js +3 -26
- package/dist/temporal/places/client.js.map +1 -1
- package/dist/temporal/places/contrat.d.ts +15 -51
- package/dist/temporal/places/contrat.js +3 -13
- package/dist/temporal/places/contrat.js.map +1 -1
- package/dist/temporal/places/deroule.js +11 -61
- 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 +337 -120
- package/docs/CADRE.md +16 -13
- package/docs/INTERFACE.md +90 -25
- package/hooks/hooks.json +9 -0
- package/hooks/register.tsx +59 -5
- package/package.json +1 -1
- package/scripts/activites.mjs +271 -42
- package/scripts/aiguillage.mjs +4 -1
- package/scripts/bilan.mjs +125 -2
- package/scripts/circuit.mjs +233 -159
- 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/dette.d.ts +2 -1
- package/scripts/dette.mjs +49 -6
- package/scripts/direct.mjs +343 -0
- package/scripts/droits.mjs +26 -4
- package/scripts/effets.mjs +4 -4
- package/scripts/engendres.mjs +2 -1
- package/scripts/enveloppe/enveloppe.mjs +119 -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 +119 -21
- package/scripts/etapes.mjs +3 -3
- package/scripts/faits-du-circuit.mjs +12 -11
- package/scripts/fermeture-de-la-machine.d.mts +4 -4
- package/scripts/fermeture-de-la-machine.mjs +10 -20
- 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/flux-de-la-nuit.mjs +38 -0
- 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 +148 -37
- package/scripts/jointure.d.ts +20 -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/cargo/commandes.mjs +5 -6
- package/scripts/langages/python/commandes.mjs +5 -5
- package/scripts/langages/python/composants.mjs +10 -2
- package/scripts/langages/typescript/composants.mjs +10 -3
- package/scripts/langages/typescript/consommateurs-arbitres.mjs +15 -3
- package/scripts/langages/typescript/construire.mjs +2 -0
- package/scripts/langages/typescript/exemples.mjs +33 -1
- package/scripts/langages/typescript/index.mjs +19 -0
- package/scripts/langages/typescript/migrations/0.49.0-tests-equipes.mjs +32 -0
- package/scripts/langages/typescript/tests-de-nuit.mjs +158 -32
- package/scripts/langages/typescript/tests-du-poste.mjs +112 -32
- package/scripts/langages/typescript/titres-de-tests.mjs +11 -7
- package/scripts/langages/typescript/turbo-des-paquets.mjs +21 -4
- 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/machine.setup.mjs +11 -5
- package/scripts/langages/typescript/vitest.nuit.config.mjs +53 -5
- package/scripts/machine.mjs +1 -1
- package/scripts/mesure/base-de-passe.mjs +2 -1
- package/scripts/migrations/0.49.0-reservation-de-trois-coeurs.mjs +30 -0
- package/scripts/migrations.mjs +2 -0
- package/scripts/nuit.sh +129 -3
- 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 +4 -7
- package/scripts/places-de-la-machine.mjs +55 -42
- package/scripts/places-du-serveur.mjs +2 -2
- package/scripts/plafond-de-la-machine.d.mts +7 -13
- package/scripts/plafond-de-la-machine.mjs +19 -35
- package/scripts/prefixe-des-tickets.mjs +1 -1
- package/scripts/references-changees.mjs +159 -0
- package/scripts/regles-des-places.d.mts +8 -31
- package/scripts/regles-des-places.mjs +14 -64
- package/scripts/repli-de-la-nuit.mjs +183 -0
- package/scripts/reponses-du-circuit.d.mts +2 -2
- package/scripts/reponses-du-circuit.mjs +21 -12
- package/scripts/reprise.mjs +27 -8
- package/scripts/resultats.mjs +21 -9
- package/scripts/seances.mjs +258 -40
- package/scripts/services-du-noyau.mjs +4 -0
- package/scripts/sous-commandes.mjs +24 -7
- package/scripts/superviseur.mjs +185 -39
- package/scripts/tableau.mjs +226 -94
- package/scripts/taches-du-graphe.mjs +84 -4
- package/scripts/ticket.mjs +348 -0
- package/scripts/transitions.d.mts +44 -0
- package/scripts/transitions.mjs +188 -17
- 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/architecte/SKILL.md +203 -0
- package/skills/architecte/references/exemple-d-architecture.md +159 -0
- 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/redacteur/references/documents-d-un-composant.md +2 -1
- package/skills/relecteur/SKILL.md +8 -0
- package/skills/testwriter/SKILL.md +10 -0
- 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';
|
|
@@ -637,22 +644,22 @@ import {
|
|
|
637
644
|
EXPLORATEUR,
|
|
638
645
|
libelle,
|
|
639
646
|
monteeDe,
|
|
640
|
-
nomDuRole,
|
|
641
647
|
QUESTIONNEUR,
|
|
642
648
|
SUITE,
|
|
643
649
|
} from './etapes.mjs';
|
|
644
650
|
import {
|
|
645
|
-
CODE,
|
|
646
651
|
CONTROLES,
|
|
647
652
|
correctionsDuPlan,
|
|
648
653
|
ouvertesDuPlan,
|
|
649
654
|
pasDuPlan,
|
|
650
655
|
questionsPosees,
|
|
651
|
-
|
|
656
|
+
contexteDeLExtension,
|
|
657
|
+
depart,
|
|
658
|
+
etendre as reprendreEtendu,
|
|
659
|
+
renvoiDe,
|
|
660
|
+
fichiersDeTestRouges,
|
|
652
661
|
TESTS,
|
|
653
|
-
testwriterDemande,
|
|
654
662
|
} from './transitions.mjs';
|
|
655
|
-
import { departDepuis } from './reprise.mjs';
|
|
656
663
|
import {
|
|
657
664
|
arbreDeLaCopie,
|
|
658
665
|
controles,
|
|
@@ -700,7 +707,15 @@ import {
|
|
|
700
707
|
} from './ticket-du-circuit.mjs';
|
|
701
708
|
import { emettre } from './effets.mjs';
|
|
702
709
|
import { heureLocale } from './journal-des-etats.mjs';
|
|
703
|
-
import {
|
|
710
|
+
import {
|
|
711
|
+
arretDuStatut,
|
|
712
|
+
consigne,
|
|
713
|
+
auLancement,
|
|
714
|
+
idDeSeance,
|
|
715
|
+
jusquALaFiche,
|
|
716
|
+
rouleDeTest,
|
|
717
|
+
seance,
|
|
718
|
+
} from './seances.mjs';
|
|
704
719
|
import { releve } from './composants-affectes.mjs';
|
|
705
720
|
import { ligneDEtape, transcriptionsDeLaCopie } from './registre.mjs';
|
|
706
721
|
import {
|
|
@@ -721,6 +736,7 @@ import { refusArbitrage } from './integration/integrer.mjs';
|
|
|
721
736
|
import { prendreUnRang } from './places-de-la-machine.mjs';
|
|
722
737
|
import { langageDe, langageDeLaCopie } from './langages.mjs';
|
|
723
738
|
import { leTitre, ticketAuLancement } from './depart-du-ticket.mjs';
|
|
739
|
+
import { fichiersNommesAuTicket } from './fichiers-nommes.mjs';
|
|
724
740
|
import { ouvrirBase } from './mesure/base-de-passe.mjs';
|
|
725
741
|
import { GREFFON } from './cadre.mjs';
|
|
726
742
|
import { retirerLesCopiesDuDepot } from './copies-finies.mjs';
|
|
@@ -844,6 +860,10 @@ export function contexte(o) {
|
|
|
844
860
|
};
|
|
845
861
|
// The extension of the plan a write out of the plan in a file the ticket names asks for.
|
|
846
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);
|
|
847
867
|
// The components the plan set apart from the survey, which the checks keep verifying.
|
|
848
868
|
ctx.ecartes = ecartesDuPlan(fichesDuPlan(ctx), ctx.paquets, resoudre);
|
|
849
869
|
return ctx;
|
|
@@ -907,6 +927,82 @@ function etendreAuxEcartes(ctx, { composants, rouges = [] }) {
|
|
|
907
927
|
ctx.ecartes = ctx.ecartes.filter(d => !gagnes.includes(d));
|
|
908
928
|
}
|
|
909
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
|
+
|
|
910
1006
|
// The plan of <ctx> extended to the package <paquet>, the home of <chemin>, a file the ticket's
|
|
911
1007
|
// description names (<piece>: « ticket, § Architecture » or « ticket, critère N »): the package
|
|
912
1008
|
// enters the title in the order of `ordonnerLePlan`, written by bd and said at the ticket with its
|
|
@@ -1009,18 +1105,6 @@ function inscrireEtape(ctx, { etape, debut }) {
|
|
|
1009
1105
|
});
|
|
1010
1106
|
}
|
|
1011
1107
|
|
|
1012
|
-
// The rule of a test file of the module of the language of the copy of <ctx> (`estUnTest`); a copy
|
|
1013
|
-
// the module does not read judges every file the developpeur's.
|
|
1014
|
-
function rouleDeTest(ctx) {
|
|
1015
|
-
return fichier => {
|
|
1016
|
-
try {
|
|
1017
|
-
return langageDe(ctx.copie).estUnTest(fichier, ctx.copie);
|
|
1018
|
-
} catch {
|
|
1019
|
-
return null;
|
|
1020
|
-
}
|
|
1021
|
-
};
|
|
1022
|
-
}
|
|
1023
|
-
|
|
1024
1108
|
// The steps whose pass judges the lot, 3.1 and 4.1 (one state, `finale` apart): the copy is
|
|
1025
1109
|
// prepared on the tip of main before each of them.
|
|
1026
1110
|
export const SUR_LA_POINTE = new Set([CONTROLES]);
|
|
@@ -1237,26 +1321,6 @@ export function fluxAuLancement(racine) {
|
|
|
1237
1321
|
}
|
|
1238
1322
|
}
|
|
1239
1323
|
|
|
1240
|
-
// The stop for the sheet <fiche> of the session <tentative> of <role>, BLOQUÉ (« hors-portee »)
|
|
1241
|
-
// or BESOIN (« besoin »): its reason or question first, then its handover; the sheet's piece as
|
|
1242
|
-
// its own, and the agent's question as its own.
|
|
1243
|
-
function arretDuStatut(ctx, role, tentative, fiche) {
|
|
1244
|
-
const passation = derniereDe(ctx, role)?.text ?? 'aucune';
|
|
1245
|
-
const qui = `Le ${nomDuRole(role)}`;
|
|
1246
|
-
const { piece } = fiche;
|
|
1247
|
-
return fiche.statut === 'BESOIN'
|
|
1248
|
-
? new Arret(
|
|
1249
|
-
'besoin',
|
|
1250
|
-
`${qui} attend une réponse (séance ${tentative}) : ${fiche.question}\n\nSa passation :\n\n${passation}`,
|
|
1251
|
-
{ piece, question: `${qui} demande : ${fiche.question}` }
|
|
1252
|
-
)
|
|
1253
|
-
: new Arret(
|
|
1254
|
-
'hors-portee',
|
|
1255
|
-
`${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}`,
|
|
1256
|
-
{ piece }
|
|
1257
|
-
);
|
|
1258
|
-
}
|
|
1259
|
-
|
|
1260
1324
|
// The stop « hors-portee » for the developpeur's sheet FAIT <fiche> of the session <tentative>
|
|
1261
1325
|
// that does not hold criteria out of the plan (`hors_plan`), as a required check keeps a merge
|
|
1262
1326
|
// from a change that does not pass it: each criterion and its package in the fact and in the
|
|
@@ -1276,21 +1340,16 @@ function arretHorsDuPlan(ctx, tentative, fiche) {
|
|
|
1276
1340
|
);
|
|
1277
1341
|
}
|
|
1278
1342
|
|
|
1279
|
-
// The sending to the testwriter in the developpeur's sheet <fiche> (its `renvoi`)
|
|
1280
|
-
//
|
|
1281
|
-
//
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
const controles = ctx.controlesRouges
|
|
1290
|
-
? `\n\nLa sortie rouge des derniers contrôles :\n\n${ctx.controlesRouges}`
|
|
1291
|
-
: '';
|
|
1292
|
-
return `Le développeur renvoie le rouge qui reste aux tests du lot${raison}.\n\nSa passation :\n\n${passation}${controles}`;
|
|
1293
|
-
}
|
|
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
|
+
});
|
|
1294
1353
|
|
|
1295
1354
|
// The findings still open once the reviewer's sheet RENDU <fiche> is read, as the issues of a
|
|
1296
1355
|
// review stay open until the review that resolves them: each blocking finding of the sheet (a
|
|
@@ -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,61 +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
|
-
// the state <e> (null without one) on --reprendre, the integration or the queue played again on
|
|
1676
|
-
// the same lot after their stop, as bors retries, else the testwriter, the run starting over.
|
|
1677
|
-
function depart(ctx, e) {
|
|
1678
|
-
// The supervisor's command wins over the sort of the plan: the mark of his `--depuis testwriter`.
|
|
1679
|
-
ctx.testwriterDemande = testwriterDemande({
|
|
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({
|
|
1680
1737
|
depuis: ctx.depuis ?? null,
|
|
1681
1738
|
reprendre: Boolean(ctx.reprendre),
|
|
1682
1739
|
marque: Boolean(ctx.testwriterDemande),
|
|
1740
|
+
etat: e,
|
|
1741
|
+
refus: ctx.refus,
|
|
1742
|
+
ticket: ctx.ticket,
|
|
1683
1743
|
});
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
if (ctx.depuis) {
|
|
1687
|
-
ctx.verts = {};
|
|
1688
|
-
ctx.reprise = null;
|
|
1689
|
-
ctx.relancesTestwriter = null;
|
|
1744
|
+
if (d.usage) {
|
|
1745
|
+
throw new Usage(d.usage);
|
|
1690
1746
|
}
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
return { etape: CODE, tentative: 1, rapport: rapportDuRefus(ctx.refus), finale: false };
|
|
1694
|
-
}
|
|
1695
|
-
if (ctx.depuis === 'testwriter') {
|
|
1696
|
-
ctx.refus = null;
|
|
1697
|
-
}
|
|
1698
|
-
if (ctx.depuis) {
|
|
1699
|
-
const { etape, tentative, rapport, finale } = departDepuis(ctx.depuis);
|
|
1700
|
-
return { etape, tentative, rapport, finale };
|
|
1701
|
-
}
|
|
1702
|
-
if (!ctx.reprendre) {
|
|
1703
|
-
// The run starts over: no lot verified, no finding of a review open, no refusal, no checks played.
|
|
1704
|
-
ctx.verts = null;
|
|
1705
|
-
ctx.reprise = null;
|
|
1706
|
-
ctx.relancesTestwriter = null;
|
|
1707
|
-
ctx.verifie = null;
|
|
1708
|
-
ctx.toursDeLaPasseFinale = null;
|
|
1709
|
-
ctx.constats = [];
|
|
1710
|
-
ctx.refus = null;
|
|
1711
|
-
ctx.controlesRouges = null;
|
|
1712
|
-
return { etape: TESTS, tentative: 1, rapport: null, finale: false };
|
|
1713
|
-
}
|
|
1714
|
-
if (!e) {
|
|
1715
|
-
throw new Usage(`rien à reprendre : le circuit de ${ctx.ticket} n'a aucun état d'arrêt.`);
|
|
1716
|
-
}
|
|
1717
|
-
if (e.etape === 'integre') {
|
|
1718
|
-
throw new Usage(`rien à reprendre : le lot de ${ctx.ticket} est intégré.`);
|
|
1719
|
-
}
|
|
1720
|
-
return {
|
|
1721
|
-
etape: e.etape,
|
|
1722
|
-
tentative: e.etape === CONTROLES ? 0 : 1,
|
|
1723
|
-
rapport: e.rapport,
|
|
1724
|
-
finale: e.finale === true,
|
|
1725
|
-
};
|
|
1747
|
+
Object.assign(ctx, d.memoire);
|
|
1748
|
+
return d.suivant;
|
|
1726
1749
|
}
|
|
1727
1750
|
|
|
1728
1751
|
// The end of the run, its exit code <code>: an end on a stop kept with the circuit's results
|
|
@@ -2021,8 +2044,8 @@ function ecrireLaSorte(ctx, sorte) {
|
|
|
2021
2044
|
commenter(ctx, 'plan', `la sorte du ticket devient ${texteDeLaSorte(sorte)} ; le plan reste.`);
|
|
2022
2045
|
}
|
|
2023
2046
|
|
|
2024
|
-
// The `--mecanique` answer of <ctx> to the stop <e> of the testwriter
|
|
2025
|
-
// 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
|
|
2026
2049
|
// ticket already mechanical: a Usage): the sort turned, the plan kept as it is, and the stop's
|
|
2027
2050
|
// state moved to the step the sort asks, 1.1 with a command, the developpeur without.
|
|
2028
2051
|
function basculer(ctx, e) {
|
|
@@ -2042,6 +2065,29 @@ function basculer(ctx, e) {
|
|
|
2042
2065
|
return { ...e, etape: r.suivant.etape, raison: null, question: null, rapport: null };
|
|
2043
2066
|
}
|
|
2044
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
|
+
|
|
2045
2091
|
/**
|
|
2046
2092
|
* The plan <paquets> the explorateur writes for <ctx>, with each package the supervisor gave the
|
|
2047
2093
|
* plan (`--etendre`, kept among the sheets, `etendus`) that it leaves out, in its order
|
|
@@ -2052,10 +2098,7 @@ function basculer(ctx, e) {
|
|
|
2052
2098
|
* the plan over without them.
|
|
2053
2099
|
*/
|
|
2054
2100
|
export function avecLesEtendus(ctx, paquets) {
|
|
2055
|
-
const
|
|
2056
|
-
e.role === AUTEUR_DU_CIRCUIT ? (e.plan?.etendus ?? []) : []
|
|
2057
|
-
);
|
|
2058
|
-
const gardes = [...new Set(donnes)].filter(c => !paquets.includes(c));
|
|
2101
|
+
const gardes = etendusDuPlan(ctx).filter(c => !paquets.includes(c));
|
|
2059
2102
|
if (!gardes.length) {
|
|
2060
2103
|
return paquets;
|
|
2061
2104
|
}
|
|
@@ -2072,8 +2115,17 @@ export function avecLesEtendus(ctx, paquets) {
|
|
|
2072
2115
|
// (by its name and by its path), or a component of the survey of the plan's description
|
|
2073
2116
|
// <description> (scripts/composants-affectes.mjs, `releve`, played by the circuit with no
|
|
2074
2117
|
// session, as it checks the packages) that the sheet neither puts in its packages nor sets apart
|
|
2075
|
-
// with its reason (`ecartes`)
|
|
2076
|
-
|
|
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) {
|
|
2077
2129
|
const dossier = p => {
|
|
2078
2130
|
try {
|
|
2079
2131
|
return ctx.resoudre(p);
|
|
@@ -2090,12 +2142,37 @@ function fautesDesPaquets(ctx, fiche, description) {
|
|
|
2090
2142
|
if (doubles.length) {
|
|
2091
2143
|
return `paquets : ${doubles.join(', ')} nomme un paquet déjà nommé dans le plan`;
|
|
2092
2144
|
}
|
|
2093
|
-
const
|
|
2145
|
+
const aPart = ecartes.map(e => dossier(e.composant));
|
|
2146
|
+
const tenus = [...dossiers, ...aPart];
|
|
2094
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
|
+
}
|
|
2095
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
|
+
}
|
|
2096
2173
|
const absents = releve(racine, description).composants.filter(c => {
|
|
2097
2174
|
const d = dossier(c);
|
|
2098
|
-
return d !== null && !
|
|
2175
|
+
return d !== null && !tenu(d);
|
|
2099
2176
|
});
|
|
2100
2177
|
return absents.length
|
|
2101
2178
|
? `paquets : ${absents.join(', ')}, que le relevé nomme, n'est ni dans les paquets ni dans les écartés (ecartes, avec sa raison)`
|
|
@@ -2127,12 +2204,16 @@ const ecartsDe = fiche =>
|
|
|
2127
2204
|
// passed, its title and criteria unchanged since (`empreinteDuPlan`), passes. The workflow of a
|
|
2128
2205
|
// ticket plays each step of the plan in an activity of its own (grillhouse-4nr.6.3): one of
|
|
2129
2206
|
// `PAS_DU_PLAN` (`unPasDuPlan`), the one that follows decided by `pasDuPlan` of
|
|
2130
|
-
// scripts/transitions.mjs, on the state of the plan (`{ avant, plan, premier, seance,
|
|
2131
|
-
// 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.
|
|
2132
2209
|
|
|
2133
|
-
/**
|
|
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
|
+
*/
|
|
2134
2214
|
export const planAuDebut = ctx => ({
|
|
2135
2215
|
avant: leTicket(ctx).description,
|
|
2216
|
+
composants: leTitre(ctx.ticket, leTicket(ctx).titre, ctx.resoudre).plan,
|
|
2136
2217
|
plan: null,
|
|
2137
2218
|
premier: null,
|
|
2138
2219
|
seance: null,
|
|
@@ -2170,10 +2251,20 @@ async function sessionDuPlan(ctx, role, texte, options) {
|
|
|
2170
2251
|
return { fiche, seance };
|
|
2171
2252
|
}
|
|
2172
2253
|
|
|
2173
|
-
// The explorateur's options on the plan of <ctx> whose description before
|
|
2174
|
-
|
|
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) => ({
|
|
2175
2259
|
droits: horsDeLEnveloppe(ctx, EXPLORATEUR, 'sonnet'),
|
|
2176
|
-
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
|
+
),
|
|
2177
2268
|
});
|
|
2178
2269
|
|
|
2179
2270
|
/**
|
|
@@ -2226,7 +2317,7 @@ const PAS_DU_PLAN = {
|
|
|
2226
2317
|
},
|
|
2227
2318
|
5
|
|
2228
2319
|
),
|
|
2229
|
-
{ ...optionsDeLExplorateur(ctx, e
|
|
2320
|
+
{ ...optionsDeLExplorateur(ctx, e), id: idDeSeance(ctx, 'plan'), evenement: 'plan' }
|
|
2230
2321
|
);
|
|
2231
2322
|
ecrireLePlan(
|
|
2232
2323
|
ctx,
|
|
@@ -2280,7 +2371,7 @@ const PAS_DU_PLAN = {
|
|
|
2280
2371
|
},
|
|
2281
2372
|
// The explorateur's session, resumed, answers the questions put once.
|
|
2282
2373
|
async reponse(ctx, e) {
|
|
2283
|
-
const explorateur = optionsDeLExplorateur(ctx, e
|
|
2374
|
+
const explorateur = optionsDeLExplorateur(ctx, e);
|
|
2284
2375
|
const { fiche: plan } = await sessionDuPlan(
|
|
2285
2376
|
ctx,
|
|
2286
2377
|
EXPLORATEUR,
|
|
@@ -2484,26 +2575,12 @@ const ORDRE_LU = {
|
|
|
2484
2575
|
" (le paquet gagné va en fin de plan : ni la copie ni l'arbre principal ne se chargent pour l'ordonner)",
|
|
2485
2576
|
};
|
|
2486
2577
|
|
|
2487
|
-
|
|
2488
|
-
// 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
|
|
2489
|
-
// and piece stay out of it: they say the plan as it was and tell a session to stop (a lock's
|
|
2490
|
-
// message), and a session reads its context as the supervisor's word. Without a question, his
|
|
2491
|
-
// text alone, or null.
|
|
2492
|
-
export function contexteDeLExtension({ question, etendus, plan, contexte }) {
|
|
2493
|
-
const reponse = question
|
|
2494
|
-
? `Le superviseur a étendu le plan à ${etendus.join(', ')} ; le plan du ticket est maintenant : ${plan}.`
|
|
2495
|
-
: null;
|
|
2496
|
-
return [reponse, contexte].filter(Boolean).join('\n\n') || null;
|
|
2497
|
-
}
|
|
2578
|
+
export { contexteDeLExtension };
|
|
2498
2579
|
|
|
2499
2580
|
// The plan extended by the supervisor to the packages of `--etendre` (each a path or a package
|
|
2500
2581
|
// name of the repository, else a Usage): each one enters the title in the order of
|
|
2501
|
-
// `ordonnerLePlan`, written by bd and said at the ticket.
|
|
2502
|
-
//
|
|
2503
|
-
// (`contexteDeLExtension`) and the text of `--contexte` as the context of its sessions; a stop « sans-livraison » whose developpeur's last
|
|
2504
|
-
// sheet sends the red to the testwriter (`renvoi`, twice in a row) resumes at the step of the role
|
|
2505
|
-
// it names, the testwriter's, as a retry plays the job that failed. Without a state, it starts on
|
|
2506
|
-
// 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.
|
|
2507
2584
|
function etendre(ctx, e) {
|
|
2508
2585
|
const gagnes = [...new Set(ctx.etendre.map(ctx.resoudre))].filter(c => !ctx.paquets.includes(c));
|
|
2509
2586
|
const { plan, lu } = planEtendu(ctx, ctx.paquets, gagnes);
|
|
@@ -2523,21 +2600,18 @@ function etendre(ctx, e) {
|
|
|
2523
2600
|
'plan',
|
|
2524
2601
|
`le superviseur étend le plan à ${ctx.etendre.join(', ')} : ${titre.split(' — ').at(-1)}${ORDRE_LU[lu]}.`
|
|
2525
2602
|
);
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
}
|
|
2529
|
-
ctx.contexte = contexteDeLExtension({
|
|
2530
|
-
question: e.question,
|
|
2603
|
+
const d = reprendreEtendu({
|
|
2604
|
+
etat: e,
|
|
2531
2605
|
etendus: ctx.etendre,
|
|
2532
2606
|
plan: titre.split(' — ').at(-1),
|
|
2533
2607
|
contexte: ctx.contexte,
|
|
2608
|
+
renvoi: fichesDe(ctx, 'developpeur').at(-1)?.renvoi ?? null,
|
|
2534
2609
|
});
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
|
-
|
|
2538
|
-
|
|
2539
|
-
|
|
2540
|
-
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;
|
|
2541
2615
|
}
|
|
2542
2616
|
|
|
2543
2617
|
// The opening of <ctx> on <e> before its plan: `{ debut }`, or `{ code }`, a stop gone up.
|
|
@@ -2564,7 +2638,7 @@ async function avantLePlan(ctx, e) {
|
|
|
2564
2638
|
commenter(ctx, 'questionnement', 'le plan passe tel qu’il est, sur la reprise du superviseur.');
|
|
2565
2639
|
inscrire(ctx, { role: AUTEUR_DU_CIRCUIT, plan: { empreinte: empreinteDuPlan(leTicket(ctx)) } });
|
|
2566
2640
|
}
|
|
2567
|
-
const d =
|
|
2641
|
+
const d = departDuCircuit(ctx, e);
|
|
2568
2642
|
// A ticket labelled arbitrage starts and resumes only on the arbitrage its integration will
|
|
2569
2643
|
// ask for: the integration's rule, before any session.
|
|
2570
2644
|
const arbitrage = refusArbitrage({ id: ctx.ticket, ...leTicket(ctx) }, lesCommentaires(ctx));
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
/** The number of circuits at once (1 when absent), or the fault by its name. */
|
|
4
4
|
export function reglageDesCircuits(pkg: unknown): { max: number | null; faute: string | null };
|
|
5
5
|
|
|
6
|
-
/** The minutes between
|
|
6
|
+
/** The minutes between the reading of a question not answered and its reminder, by default (10). */
|
|
7
7
|
export const RAPPEL_PAR_DEFAUT: number;
|
|
8
8
|
|
|
9
|
-
/** The
|
|
9
|
+
/** The reminder delay in minutes (10 when absent), or the fault by its name. */
|
|
10
10
|
export function reglageDuRappel(pkg: unknown): { minutes: number | null; faute: string | null };
|
|
11
11
|
|
|
12
|
-
/** The
|
|
12
|
+
/** The reminder delay of the project at <racine>; 10 when it does not read. */
|
|
13
13
|
export function rappelDuProjet(racine: string): number;
|
|
14
14
|
|
|
15
15
|
/** The number of circuits at once of the project at <racine>, undefined when it does not read. */
|