@roomi-fields/grillhouse 0.30.0 → 0.31.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 +30 -0
- package/agents/developpeur.md +0 -1
- package/agents/explorateur.md +0 -1
- package/agents/questionneur.md +0 -1
- package/agents/testwriter.md +0 -1
- package/dist/temporal/circuit/client.d.ts +2 -2
- package/dist/temporal/circuit/client.js.map +1 -1
- package/dist/temporal/circuit/commande.js +4 -4
- package/dist/temporal/circuit/commande.js.map +1 -1
- package/dist/temporal/circuit/contrat.d.ts +3 -3
- package/dist/temporal/circuit/contrat.js +8 -2
- package/dist/temporal/circuit/contrat.js.map +1 -1
- package/dist/temporal/circuit/deroule.js +3 -3
- package/dist/temporal/circuit/deroule.js.map +1 -1
- package/dist/temporal/commande.js +5 -6
- package/dist/temporal/commande.js.map +1 -1
- package/dist/temporal/installation.d.ts +0 -4
- package/dist/temporal/installation.js +12 -34
- package/dist/temporal/installation.js.map +1 -1
- package/docs/ARCHITECTURE.md +49 -19
- package/docs/CADRE.md +10 -0
- package/docs/INTERFACE.md +8 -3
- package/package.json +2 -2
- package/scripts/activites.mjs +150 -77
- package/scripts/aiguillage.mjs +33 -11
- package/scripts/avancement.mjs +27 -10
- package/scripts/bilan.mjs +101 -25
- package/scripts/cadre.mjs +5 -2
- package/scripts/circuit.mjs +153 -57
- package/scripts/composants-affectes.mjs +64 -21
- package/scripts/composition-des-langages.mjs +5 -3
- package/scripts/conformite.mjs +54 -19
- package/scripts/dependances-internes.mjs +9 -3
- package/scripts/dernier-vert.mjs +54 -19
- package/scripts/dette.mjs +32 -11
- package/scripts/donnees-cles.mjs +24 -8
- package/scripts/droits.mjs +40 -15
- package/scripts/empreinte-d-etape.mjs +17 -0
- package/scripts/engendres.mjs +15 -5
- package/scripts/enveloppe/enveloppe.mjs +141 -48
- package/scripts/enveloppe/travail-de-la-copie.mjs +36 -12
- package/scripts/faits-du-circuit.mjs +1 -1
- package/scripts/flux-des-paquets.mjs +21 -7
- package/scripts/gardes-du-cadre.mjs +9 -3
- package/scripts/init.mjs +11 -4
- package/scripts/integration/file.mjs +84 -29
- package/scripts/integration/integrer.mjs +70 -24
- package/scripts/integration/rejeu.mjs +26 -9
- package/scripts/jointure.d.ts +6 -1
- package/scripts/langages/cargo/commandes.mjs +97 -18
- package/scripts/langages/cargo/composants.mjs +24 -8
- package/scripts/langages/cargo/index.mjs +4 -0
- package/scripts/langages/cargo/tests-de-head.mjs +25 -9
- package/scripts/langages/python/commandes.mjs +3 -1
- package/scripts/langages/python/index.mjs +4 -0
- package/scripts/langages/typescript/chemins-des-tests.mjs +6 -2
- package/scripts/langages/typescript/composants.mjs +9 -3
- package/scripts/langages/typescript/consommateurs-arbitres.mjs +40 -14
- package/scripts/langages/typescript/consommateurs.mjs +39 -14
- package/scripts/langages/typescript/elements-du-lot.mjs +36 -12
- package/scripts/langages/typescript/frontieres.mjs +66 -22
- package/scripts/langages/typescript/index-interfaces.mjs +36 -13
- package/scripts/langages/typescript/index.mjs +10 -3
- package/scripts/langages/typescript/interfaces-contre-code.mjs +109 -41
- package/scripts/langages/typescript/lecteurs.mjs +36 -11
- package/scripts/langages/typescript/migrations/0.23.0-config-vitest.mjs +15 -5
- package/scripts/langages/typescript/migrations/0.25.0-chemins-des-tests.mjs +6 -2
- package/scripts/langages/typescript/migrations/0.25.0-tailles-des-tests.mjs +6 -2
- package/scripts/langages/typescript/migrations/0.30.0-tailles-des-outils-lourds.mjs +3 -1
- package/scripts/langages/typescript/parcours.mjs +12 -4
- package/scripts/langages/typescript/regle-des-tests.mjs +9 -3
- package/scripts/langages/typescript/resumes.mjs +9 -3
- package/scripts/langages/typescript/tailles-des-tests.mjs +58 -16
- package/scripts/langages/typescript/tests-de-nuit.mjs +3 -1
- package/scripts/langages/typescript/tests.mjs +24 -8
- package/scripts/langages/typescript/titres-de-tests.mjs +35 -12
- package/scripts/langages/typescript/turbo-des-paquets.mjs +152 -51
- package/scripts/langages/typescript/verdict.mjs +3 -1
- package/scripts/langages/typescript/verifier.mjs +28 -10
- package/scripts/langages/typescript/vitest-config/avancement.reporter.mjs +15 -5
- package/scripts/langages/typescript/vitest-config/base.mjs +7 -2
- package/scripts/langages/typescript/vitest-config/changements.mjs +21 -8
- package/scripts/langages/typescript/vitest-config/delais.mjs +9 -3
- package/scripts/langages/typescript/vitest-config/duree.classement.mjs +12 -4
- package/scripts/langages/typescript/vitest-config/duree.reporter.mjs +17 -6
- package/scripts/langages/typescript/vitest-config/lances.mjs +83 -27
- package/scripts/langages/typescript/vitest-config/machine.setup.mjs +7 -0
- package/scripts/langages/typescript/vitest-config/resultats.mjs +3 -1
- package/scripts/lint-des-scripts.mjs +58 -0
- package/scripts/mesure/base-de-passe.mjs +117 -25
- package/scripts/mesure/pression.mjs +9 -3
- package/scripts/migrations/0.23.0-charte-importee.mjs +6 -2
- package/scripts/migrations/0.23.0-crochets-de-seance.mjs +25 -8
- package/scripts/migrations/0.23.0-marche-du-projet.mjs +18 -6
- package/scripts/migrations/0.23.2-copies-du-cadre.mjs +48 -16
- package/scripts/migrations/0.24.12-tri-des-decouvertes.mjs +6 -2
- package/scripts/migrations/0.25.0-script-des-tests.mjs +15 -5
- package/scripts/migrations/0.30.0-ci-appelle-la-verification.mjs +6 -2
- package/scripts/migrations/0.31.0-paquets-dans-le-graphe.mjs +7 -7
- package/scripts/nuit.sh +15 -0
- package/scripts/outil.mjs +3 -1
- package/scripts/outils-cles.mjs +18 -7
- package/scripts/paquet-npm.mjs +15 -5
- package/scripts/paquets.mjs +12 -4
- package/scripts/passe-de-la-machine.mjs +7 -2
- package/scripts/places-de-la-machine.mjs +66 -12
- package/scripts/preparation.mjs +15 -5
- package/scripts/registre.mjs +6 -2
- package/scripts/reprise.mjs +66 -0
- package/scripts/resultats.mjs +105 -37
- package/scripts/seances.mjs +22 -4
- package/scripts/services-du-noyau.mjs +1 -0
- package/scripts/sous-commandes.mjs +3 -1
- package/scripts/style-a-l-ecriture.mjs +48 -17
- package/scripts/tableau.mjs +34 -9
- package/scripts/taches-du-graphe.mjs +33 -13
- package/scripts/ticket-du-circuit.mjs +10 -0
- package/scripts/transitions.mjs +141 -24
- package/scripts/verrou-de-fichier.mjs +6 -2
- package/scripts/verrou-de-machine.mjs +123 -39
- package/scripts/verrous/commande.mjs +50 -17
- package/scripts/verrous/ticket-du-sous-agent.mjs +9 -3
- package/scripts/verrous/verrou.mjs +42 -14
- package/skills/explorateur/SKILL.md +7 -1
- package/skills/grill/SKILL.md +1 -1
- package/skills/mesure/SKILL.md +3 -0
- package/skills/relecteur/SKILL.md +1 -1
- package/skills/testwriter/SKILL.md +12 -6
package/scripts/circuit.mjs
CHANGED
|
@@ -309,14 +309,12 @@
|
|
|
309
309
|
// changed since the last green of the copy (scripts/dernier-vert.mjs, main's while the copy has
|
|
310
310
|
// none); what the lot reaches plays again, by the dependencies, the inputs of the tasks and
|
|
311
311
|
// `grillhouse.lit` (a reader out of the plan whose tests read a directory the lot changes
|
|
312
|
-
// included).
|
|
313
|
-
//
|
|
314
|
-
// (`laPasseFinale`): the circuit keeps the copy as it stands as a commit on
|
|
315
|
-
//
|
|
316
|
-
//
|
|
317
|
-
//
|
|
318
|
-
// base, the lot read, where a single `[<commit>]` would be read against HEAD. The whole final
|
|
319
|
-
// pass green keeps the tree of its lot (`verifie`). A red of a package of the plan goes to the
|
|
312
|
+
// included). The final pass always plays the band of the lot, never the whole repository, as
|
|
313
|
+
// Bazel and Nx `affected` play the reverse-dependency closure of a change
|
|
314
|
+
// (`laPasseFinale`): the circuit keeps the copy as it stands as a commit on the copy's HEAD,
|
|
315
|
+
// the base of the lot, and plays `npm run verifier --
|
|
316
|
+
// --filter=...[<base>...<copie>] --filter=//`, the root's tasks (the guards) with them; the
|
|
317
|
+
// complete one is the night's and the integration's. The final pass green on the band keeps the tree of its lot (`verifie`). A red of a package of the plan goes to the
|
|
320
318
|
// developpeur, three sessions for the final pass, counted apart from those of the checks, the
|
|
321
319
|
// third on the strong model. A red in a package out of the plan, or that no package of the plan
|
|
322
320
|
// holds, stops at « controles », a question for the supervisor: he extends the plan to that
|
|
@@ -368,7 +366,7 @@
|
|
|
368
366
|
// package that pass does not play again stands, and a regeneration that changes nothing plays no
|
|
369
367
|
// pass, every red of the pass before standing. What remains goes each to its owner, as any red
|
|
370
368
|
// of the final pass; a ceiling never rises (its command lowers it), so a lot beyond it stays red.
|
|
371
|
-
// That pass green
|
|
369
|
+
// That pass green keeps its tree as verified. The files regenerated stay in
|
|
372
370
|
// the copy: the lot carries them, without a word of the plan, as a genrule writes its output,
|
|
373
371
|
// and the reviewer reads them with the rest of the lot, the step's report among the circuit's. A
|
|
374
372
|
// file changed that the files of no reference run cover, or a command that fails stops at
|
|
@@ -394,10 +392,10 @@
|
|
|
394
392
|
// the 75 of verifier, the final pass's, is final (its wait for the lock of the machine reached
|
|
395
393
|
// its bound). A check still at 75 ends the circuit at 75, the gesture `a-repasser`. A red relaunches the developpeur
|
|
396
394
|
// with its report, twice at most, the third session on the strong model (`lancer.sh --modele
|
|
397
|
-
// opus
|
|
395
|
+
// opus`; the other sessions name `sonnet`, and none fixes the effort): three sessions for the checks, and three for the final pass.
|
|
398
396
|
// - After the final pass, green, the reviewer: a session out of the envelope, which sees the whole
|
|
399
397
|
// repository with its index, claude itself (`claude -p --agent relecteur --session-id <uuid>`,
|
|
400
|
-
// CLAUDE_BIN replaces claude) in the ticket's copy, on
|
|
398
|
+
// CLAUDE_BIN replaces claude) in the ticket's copy, on Sonnet, under the rights and the
|
|
401
399
|
// context of its role (scripts/droits.mjs: the commands its skill names, its index), its instruction from the second template of
|
|
402
400
|
// consigne-agent.md: the ticket, its plan, the path of the claims file (the ticket's
|
|
403
401
|
// description as `bd show` gives it at the session's launch, written by the circuit in its
|
|
@@ -451,7 +449,7 @@
|
|
|
451
449
|
// (`arretDuTestwriterSaute`; OSC Bridge SH-13y.1: three RENDU « Agent : testwriter » on a
|
|
452
450
|
// package whose tests no command of the frame plays, the developpeur relaunched on an empty
|
|
453
451
|
// diff each time); its question, declare the tests of the package or settle the finding.
|
|
454
|
-
// - ACCEPTÉ: the integration, once the
|
|
452
|
+
// - ACCEPTÉ: the integration, once the final pass has played its band on the lot accepted (its tree
|
|
455
453
|
// is `verifie`); else that pass first, once, its red going to the developpeur and the lot then
|
|
456
454
|
// to the reviewer again. The circuit builds the lot from the copy: the files the copy changes
|
|
457
455
|
// against its HEAD, the testwriter's (`estUnTest`: test files and the shared test material)
|
|
@@ -511,7 +509,7 @@
|
|
|
511
509
|
// agent; `boucles` the counts of the bounded loops of the step under way, by their key (`tests`,
|
|
512
510
|
// the testwriter's sessions with their proofs; `code`, the developpeur's with their checks;
|
|
513
511
|
// `relecture`, the reviews), null at a step without one; `finale` whether the final pass has
|
|
514
|
-
// begun; `verifie` the tree of the lot the last
|
|
512
|
+
// begun; `verifie` the tree of the lot the last final pass green played, null before;
|
|
515
513
|
// `mene` the start (an ISO date) of the step the circuit leads itself while it runs, null
|
|
516
514
|
// otherwise; `reprise` the session of the testwriter or developpeur its relaunches resume,
|
|
517
515
|
// `{ agent, seance }`, null before any; `refus` the integration's refusal of the lot (`{ rapport,
|
|
@@ -525,7 +523,12 @@
|
|
|
525
523
|
// lot, as bors retries: a refusal can come from the load or from main (BP 320.16, 320.16.2). On
|
|
526
524
|
// a stop « questionnement », it lets the plan pass as it is then (the supervisor
|
|
527
525
|
// changed it or kept it), from the testwriter.
|
|
528
|
-
// - `--depuis <testwriter|developpeur>`
|
|
526
|
+
// - `--depuis <testwriter|preuve|developpeur|controles|passe-finale>` (`departDepuis` of
|
|
527
|
+
// scripts/reprise.mjs) plays that step and the ones after it, no fingerprint kept (`verts`
|
|
528
|
+
// emptied, no resumption at a red): nothing is read back. Without it, a red of the checks or
|
|
529
|
+
// of the final pass resumes at the step that carries it, and a step whose inputs did not
|
|
530
|
+
// change since its last green is read back (scripts/transitions.mjs). With the developpeur's
|
|
531
|
+
// or the testwriter's step, it has the lot corrected: the whole ticket from
|
|
529
532
|
// that step, the text of `--contexte` the task at the head of each agent's instruction in the
|
|
530
533
|
// run, the reviewer's line CONTEXTE (after a stop
|
|
531
534
|
// « integration », from the developpeur, the refusal as his report, the red to lift, as a merge
|
|
@@ -640,11 +643,13 @@ import {
|
|
|
640
643
|
rapportDuRefus,
|
|
641
644
|
TESTS,
|
|
642
645
|
} from './transitions.mjs';
|
|
646
|
+
import { departDepuis } from './reprise.mjs';
|
|
643
647
|
import {
|
|
644
648
|
arbreDeLaCopie,
|
|
645
649
|
balayerLesSoeurs,
|
|
646
650
|
controles,
|
|
647
651
|
empreinte,
|
|
652
|
+
empreinteDeLEtape,
|
|
648
653
|
environnementDeLaPasse,
|
|
649
654
|
horsDeLEnveloppe,
|
|
650
655
|
integrer,
|
|
@@ -653,6 +658,7 @@ import {
|
|
|
653
658
|
leLotGarde,
|
|
654
659
|
lesReferences,
|
|
655
660
|
livre,
|
|
661
|
+
portesDuRouge,
|
|
656
662
|
preuve,
|
|
657
663
|
referencesDesRouges,
|
|
658
664
|
regenerer,
|
|
@@ -665,6 +671,7 @@ import {
|
|
|
665
671
|
ACTEUR,
|
|
666
672
|
Arret,
|
|
667
673
|
AUTEUR_DU_CIRCUIT,
|
|
674
|
+
codeDejaPresent,
|
|
668
675
|
commenter,
|
|
669
676
|
composantsDe,
|
|
670
677
|
derniereDe,
|
|
@@ -706,7 +713,7 @@ import { lesReponses } from './reponses-du-circuit.mjs';
|
|
|
706
713
|
// The time a session's transcripts may stand still before the circuit stops it.
|
|
707
714
|
export const IMMOBILE_MS = 20 * 60 * 1000;
|
|
708
715
|
// The exit code of each stop, from the list of the steps and stops.
|
|
709
|
-
export { ARRETS };
|
|
716
|
+
export { ARRETS, codeDejaPresent };
|
|
710
717
|
// The steps the circuit leads itself, with no agent: each one counts in the ticket's working time.
|
|
711
718
|
const MENEES = new Set(SUITE.filter(e => e.qui.includes(AUTO) && e.etat).map(e => e.etat));
|
|
712
719
|
|
|
@@ -754,7 +761,9 @@ function arbrePrincipal() {
|
|
|
754
761
|
const r = spawnSync('git', ['rev-parse', '--path-format=absolute', '--git-common-dir'], {
|
|
755
762
|
encoding: 'utf8',
|
|
756
763
|
});
|
|
757
|
-
if (r.status !== 0)
|
|
764
|
+
if (r.status !== 0) {
|
|
765
|
+
throw new Usage("le dossier courant n'est pas dans un dépôt git.");
|
|
766
|
+
}
|
|
758
767
|
return path.dirname(r.stdout.trim());
|
|
759
768
|
}
|
|
760
769
|
|
|
@@ -858,6 +867,8 @@ export function ecrireEtat(ctx, etat) {
|
|
|
858
867
|
paquets: ctx.paquets,
|
|
859
868
|
constats: ctx.constats ?? [],
|
|
860
869
|
verifie: ctx.verifie ?? null,
|
|
870
|
+
seanceReprise: ctx.seanceReprise ?? null,
|
|
871
|
+
verts: ctx.verts ?? null,
|
|
861
872
|
reprise: ctx.reprise ?? null,
|
|
862
873
|
aRegenerer: ctx.aRegenerer ?? null,
|
|
863
874
|
refus: ctx.refus ?? null,
|
|
@@ -902,7 +913,9 @@ export function avantLaPasse(
|
|
|
902
913
|
regeneration,
|
|
903
914
|
env = environnementDeLaPasse(ctx, process.env)
|
|
904
915
|
) {
|
|
905
|
-
if (!SUR_LA_POINTE.has(etape))
|
|
916
|
+
if (!SUR_LA_POINTE.has(etape)) {
|
|
917
|
+
return { avancee: false, regeneration };
|
|
918
|
+
}
|
|
906
919
|
const tete = dossier =>
|
|
907
920
|
spawnSync('git', ['-C', dossier, 'rev-parse', 'HEAD'], { encoding: 'utf8' });
|
|
908
921
|
const cible = tete(ctx.racine);
|
|
@@ -1061,7 +1074,9 @@ function arretHorsDuPlan(ctx, tentative, fiche) {
|
|
|
1061
1074
|
// checks when checks ran since the testwriter's session (`ctx.controlesRouges`); null without a
|
|
1062
1075
|
// sending.
|
|
1063
1076
|
function renvoiDe(ctx, fiche) {
|
|
1064
|
-
if (!fiche.renvoi)
|
|
1077
|
+
if (!fiche.renvoi) {
|
|
1078
|
+
return null;
|
|
1079
|
+
}
|
|
1065
1080
|
const passation = derniereDe(ctx, 'developpeur')?.text ?? 'aucune';
|
|
1066
1081
|
const raison = fiche.raison ? ` : ${fiche.raison}` : '';
|
|
1067
1082
|
const controles = ctx.controlesRouges
|
|
@@ -1083,8 +1098,9 @@ export function constatsOuverts(ctx, fiche, texte) {
|
|
|
1083
1098
|
const arret = raison =>
|
|
1084
1099
|
new Arret('relecture-arret', `${raison}\n\nLe verdict :\n\n${texte}`, { piece: raison });
|
|
1085
1100
|
const neufs = bloquantsDeLaFiche(fiche).map(c => {
|
|
1086
|
-
if (c.critere_en_cause)
|
|
1101
|
+
if (c.critere_en_cause) {
|
|
1087
1102
|
throw arret(`Le constat « ${c.titre} » met en cause un critère du ticket.`);
|
|
1103
|
+
}
|
|
1088
1104
|
if (!AGENTS_DU_LOT.includes(c.role)) {
|
|
1089
1105
|
throw arret(
|
|
1090
1106
|
`Le constat « ${c.titre} » n'a pas de destinataire valide : il nomme ${c.role ? `« ${c.role} »` : 'personne'}, quand le rôle est ${AGENTS_DU_LOT.join(' ou ')}.`
|
|
@@ -1107,7 +1123,9 @@ export function constatsOuverts(ctx, fiche, texte) {
|
|
|
1107
1123
|
// answers, so that the field survives the answer; null without a sheet of the plan.
|
|
1108
1124
|
export function ficheDuPlan(plans, champ) {
|
|
1109
1125
|
const derniere = plans.at(-1);
|
|
1110
|
-
if (!derniere)
|
|
1126
|
+
if (!derniere) {
|
|
1127
|
+
return null;
|
|
1128
|
+
}
|
|
1111
1129
|
if (derniere.reponse && !(champ in derniere.fiche) && plans.length > 1) {
|
|
1112
1130
|
return plans.at(-2).fiche;
|
|
1113
1131
|
}
|
|
@@ -1184,7 +1202,9 @@ export function commencerLEtape(ctx, { etape, tentative, rapport, finale }) {
|
|
|
1184
1202
|
// The end of a step of the run of <ctx> the circuit led itself (<menee>, null for another): its
|
|
1185
1203
|
// line to the register.
|
|
1186
1204
|
export function finirLEtape(ctx, menee) {
|
|
1187
|
-
if (menee)
|
|
1205
|
+
if (menee) {
|
|
1206
|
+
inscrireEtape(ctx, menee);
|
|
1207
|
+
}
|
|
1188
1208
|
}
|
|
1189
1209
|
|
|
1190
1210
|
// The stop <erreur> of the run of <ctx> at the step <etat>, written: any exception but an Arret is
|
|
@@ -1240,6 +1260,9 @@ export const MEMOIRE = [
|
|
|
1240
1260
|
'aRegenerer',
|
|
1241
1261
|
'verifie',
|
|
1242
1262
|
'constats',
|
|
1263
|
+
'verts',
|
|
1264
|
+
'reprise',
|
|
1265
|
+
'relancesTestwriter',
|
|
1243
1266
|
];
|
|
1244
1267
|
|
|
1245
1268
|
// The fact <fait> of the circuit of <ctx>, with its <parametres>, the facts <faits> of the step
|
|
@@ -1286,9 +1309,9 @@ export async function lireLeFait(ctx, fait, parametres, faits) {
|
|
|
1286
1309
|
const { fiche, constats } = await seance(ctx, role, {
|
|
1287
1310
|
...options,
|
|
1288
1311
|
constats: ctx.constats ?? [],
|
|
1289
|
-
reprise: ctx.
|
|
1312
|
+
reprise: ctx.seanceReprise ?? null,
|
|
1290
1313
|
retenir: reprise => {
|
|
1291
|
-
ctx.
|
|
1314
|
+
ctx.seanceReprise = reprise;
|
|
1292
1315
|
},
|
|
1293
1316
|
signeDeVie: ctx.ports?.signeDeVie,
|
|
1294
1317
|
seanceId: idDeSeance(ctx, `neuve:${role}`),
|
|
@@ -1305,14 +1328,19 @@ export async function lireLeFait(ctx, fait, parametres, faits) {
|
|
|
1305
1328
|
// own, and a measure is too large for the memory of the workflow.
|
|
1306
1329
|
const fichier = path.join(ctx.tmp, 'mesure-de-la-preuve.json');
|
|
1307
1330
|
const derniere = existsSync(fichier) ? JSON.parse(readFileSync(fichier, 'utf8')) : null;
|
|
1308
|
-
const
|
|
1331
|
+
const debut = Date.now();
|
|
1332
|
+
const { mesure, ...p } = preuve(ctx, { mesure: derniere, fichiers: parametres.fichiers });
|
|
1309
1333
|
if (mesure) {
|
|
1310
1334
|
writeFileSync(fichier, JSON.stringify(mesure));
|
|
1311
1335
|
} else {
|
|
1312
1336
|
rmSync(fichier, { force: true });
|
|
1313
1337
|
}
|
|
1314
|
-
return p;
|
|
1338
|
+
return { ...p, empreinte: empreinteDeLEtape(ctx, 'preuve'), ms: Date.now() - debut };
|
|
1315
1339
|
}
|
|
1340
|
+
case 'empreinteEtape':
|
|
1341
|
+
return empreinteDeLEtape(ctx, parametres.etape);
|
|
1342
|
+
case 'portes':
|
|
1343
|
+
return portesDuRouge(ctx, parametres.lieux);
|
|
1316
1344
|
case 'empreinteAvant':
|
|
1317
1345
|
case 'empreinte':
|
|
1318
1346
|
return empreinte(ctx);
|
|
@@ -1325,8 +1353,26 @@ export async function lireLeFait(ctx, fait, parametres, faits) {
|
|
|
1325
1353
|
return arbreDeLaCopie(ctx);
|
|
1326
1354
|
case 'passeFinale':
|
|
1327
1355
|
return laPasseFinale(ctx);
|
|
1328
|
-
case 'controles':
|
|
1329
|
-
|
|
1356
|
+
case 'controles': {
|
|
1357
|
+
const debut = Date.now();
|
|
1358
|
+
const k = controles(
|
|
1359
|
+
ctx,
|
|
1360
|
+
parametres.finale,
|
|
1361
|
+
parametres.restreinte,
|
|
1362
|
+
parametres.reportes,
|
|
1363
|
+
parametres.fichiers
|
|
1364
|
+
);
|
|
1365
|
+
const ms = Date.now() - debut;
|
|
1366
|
+
// The fingerprint of a green step, which its next pass on the same inputs reads back.
|
|
1367
|
+
return {
|
|
1368
|
+
...k,
|
|
1369
|
+
empreinte:
|
|
1370
|
+
k.rouge || k.aRepasser
|
|
1371
|
+
? null
|
|
1372
|
+
: empreinteDeLEtape(ctx, parametres.finale ? 'passe-finale' : 'controles'),
|
|
1373
|
+
ms,
|
|
1374
|
+
};
|
|
1375
|
+
}
|
|
1330
1376
|
case 'referencesDesRouges':
|
|
1331
1377
|
return referencesDesRouges(ctx, parametres.lieux, parametres.aElaguer);
|
|
1332
1378
|
case 'lotAccepte':
|
|
@@ -1342,7 +1388,9 @@ export async function lireLeFait(ctx, fait, parametres, faits) {
|
|
|
1342
1388
|
try {
|
|
1343
1389
|
return { constats: constatsOuverts(ctx, faits.relecture.fiche, faits.relecture.texte) };
|
|
1344
1390
|
} catch (e) {
|
|
1345
|
-
if (!(e instanceof Arret))
|
|
1391
|
+
if (!(e instanceof Arret)) {
|
|
1392
|
+
throw e;
|
|
1393
|
+
}
|
|
1346
1394
|
return { arret: { nom: e.nom, rapport: e.rapport, piece: e.piece } };
|
|
1347
1395
|
}
|
|
1348
1396
|
case 'integration': {
|
|
@@ -1368,19 +1416,29 @@ export async function lireLeFait(ctx, fait, parametres, faits) {
|
|
|
1368
1416
|
// The effect <e> of a decision of the circuit of <ctx>: a line at the ticket, a gesture, a report,
|
|
1369
1417
|
// a result kept.
|
|
1370
1418
|
export function appliquer(ctx, e) {
|
|
1371
|
-
if (e.genre === 'commenter')
|
|
1372
|
-
|
|
1373
|
-
else if (e.genre === '
|
|
1374
|
-
|
|
1375
|
-
else
|
|
1419
|
+
if (e.genre === 'commenter') {
|
|
1420
|
+
commenter(ctx, e.etape, e.texte);
|
|
1421
|
+
} else if (e.genre === 'geste') {
|
|
1422
|
+
geste(ctx, e.nom);
|
|
1423
|
+
} else if (e.genre === 'rapport') {
|
|
1424
|
+
ecrireRapport(ctx, e.etape, e.texte, e.resultat, e.rapport);
|
|
1425
|
+
} else if (e.genre === 'inscrire') {
|
|
1426
|
+
inscrire(ctx, { role: AUTEUR_DU_CIRCUIT, ...e.entree });
|
|
1427
|
+
} else {
|
|
1428
|
+
throw new Error(`effet inconnu des décisions du circuit : ${e.genre}`);
|
|
1429
|
+
}
|
|
1376
1430
|
}
|
|
1377
1431
|
|
|
1378
1432
|
// The Arret of the stop <a> a decision of the circuit of <ctx> returns: an agent's sheet that is
|
|
1379
1433
|
// not FAIT (`statut`) or that does not hold criteria out of the plan (`horsDuPlan`), with its
|
|
1380
1434
|
// handover; else its name, its report and its options.
|
|
1381
1435
|
export function arretDe(ctx, a) {
|
|
1382
|
-
if (a.statut)
|
|
1383
|
-
|
|
1436
|
+
if (a.statut) {
|
|
1437
|
+
return arretDuStatut(ctx, a.statut.role, a.statut.tentative, a.statut.fiche);
|
|
1438
|
+
}
|
|
1439
|
+
if (a.horsDuPlan) {
|
|
1440
|
+
return arretHorsDuPlan(ctx, a.horsDuPlan.tentative, a.horsDuPlan.fiche);
|
|
1441
|
+
}
|
|
1384
1442
|
const { nom, rapport, ...options } = a;
|
|
1385
1443
|
return new Arret(nom, rapport, options);
|
|
1386
1444
|
}
|
|
@@ -1429,30 +1487,41 @@ const laQuestion = (ticket, { arret, qui, ou, question }) =>
|
|
|
1429
1487
|
// the state <e> (null without one) on --reprendre, the integration or the queue played again on
|
|
1430
1488
|
// the same lot after their stop, as bors retries, else the testwriter, the run starting over.
|
|
1431
1489
|
function depart(ctx, e) {
|
|
1490
|
+
// A --depuis plays its step and the ones after it, no result read back: no fingerprint kept, no
|
|
1491
|
+
// resumption at a red, no attribution counted.
|
|
1492
|
+
if (ctx.depuis) {
|
|
1493
|
+
ctx.verts = {};
|
|
1494
|
+
ctx.reprise = null;
|
|
1495
|
+
ctx.relancesTestwriter = null;
|
|
1496
|
+
}
|
|
1432
1497
|
if (ctx.depuis === 'developpeur' && e?.raison === 'integration' && ctx.refus) {
|
|
1433
1498
|
ctx.refus = { ...ctx.refus, lance: true, relance: false };
|
|
1434
1499
|
return { etape: CODE, tentative: 1, rapport: rapportDuRefus(ctx.refus), finale: false };
|
|
1435
1500
|
}
|
|
1436
|
-
if (ctx.depuis === 'testwriter')
|
|
1501
|
+
if (ctx.depuis === 'testwriter') {
|
|
1502
|
+
ctx.refus = null;
|
|
1503
|
+
}
|
|
1437
1504
|
if (ctx.depuis) {
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
tentative: 1,
|
|
1441
|
-
rapport: null,
|
|
1442
|
-
finale: false,
|
|
1443
|
-
};
|
|
1505
|
+
const { etape, tentative, rapport, finale } = departDepuis(ctx.depuis);
|
|
1506
|
+
return { etape, tentative, rapport, finale };
|
|
1444
1507
|
}
|
|
1445
1508
|
if (!ctx.reprendre) {
|
|
1446
1509
|
// The run starts over: no lot verified, no finding of a review open, no refusal, no checks played.
|
|
1510
|
+
ctx.verts = null;
|
|
1511
|
+
ctx.reprise = null;
|
|
1512
|
+
ctx.relancesTestwriter = null;
|
|
1447
1513
|
ctx.verifie = null;
|
|
1448
1514
|
ctx.constats = [];
|
|
1449
1515
|
ctx.refus = null;
|
|
1450
1516
|
ctx.controlesRouges = null;
|
|
1451
1517
|
return { etape: TESTS, tentative: 1, rapport: null, finale: false };
|
|
1452
1518
|
}
|
|
1453
|
-
if (!e)
|
|
1454
|
-
|
|
1519
|
+
if (!e) {
|
|
1520
|
+
throw new Usage(`rien à reprendre : le circuit de ${ctx.ticket} n'a aucun état d'arrêt.`);
|
|
1521
|
+
}
|
|
1522
|
+
if (e.etape === 'integre') {
|
|
1455
1523
|
throw new Usage(`rien à reprendre : le lot de ${ctx.ticket} est intégré.`);
|
|
1524
|
+
}
|
|
1456
1525
|
return {
|
|
1457
1526
|
etape: e.etape,
|
|
1458
1527
|
tentative: e.etape === CONTROLES ? 0 : 1,
|
|
@@ -1534,7 +1603,9 @@ const lignesOuvertes = questions =>
|
|
|
1534
1603
|
function rubrique(ctx, titre) {
|
|
1535
1604
|
const lignes = lire(path.join(ctx.racine, 'CLAUDE.md')).split('\n');
|
|
1536
1605
|
const i = lignes.findIndex(l => l.trim() === `## ${titre}`);
|
|
1537
|
-
if (i < 0)
|
|
1606
|
+
if (i < 0) {
|
|
1607
|
+
return 'absente de la charte du projet (CLAUDE.md)';
|
|
1608
|
+
}
|
|
1538
1609
|
const fin = lignes.findIndex((l, j) => j > i && l.startsWith('## '));
|
|
1539
1610
|
return (
|
|
1540
1611
|
lignes
|
|
@@ -1595,8 +1666,11 @@ const texteDeLaSorte = sorte =>
|
|
|
1595
1666
|
function sectionsDe(description) {
|
|
1596
1667
|
const sections = [{ tete: null, lignes: [] }];
|
|
1597
1668
|
for (const l of description.trimEnd().split('\n')) {
|
|
1598
|
-
if (l.startsWith('## '))
|
|
1599
|
-
|
|
1669
|
+
if (l.startsWith('## ')) {
|
|
1670
|
+
sections.push({ tete: l, lignes: [] });
|
|
1671
|
+
} else {
|
|
1672
|
+
sections.at(-1).lignes.push(l);
|
|
1673
|
+
}
|
|
1600
1674
|
}
|
|
1601
1675
|
return sections;
|
|
1602
1676
|
}
|
|
@@ -1638,7 +1712,9 @@ export function decrireLePlan(description, criteres, questions, sorte = null, no
|
|
|
1638
1712
|
const ecrits = gardees[i].lignes.map(numerotee).filter(c => c !== null);
|
|
1639
1713
|
const ajouts = criteres.map(c => c.trim());
|
|
1640
1714
|
const avant = [...gardees[i].lignes];
|
|
1641
|
-
while (avant.length && avant.at(-1).trim() === '')
|
|
1715
|
+
while (avant.length && avant.at(-1).trim() === '') {
|
|
1716
|
+
avant.pop();
|
|
1717
|
+
}
|
|
1642
1718
|
const liste = ajouts.map((c, n) => `${ecrits.length + n + 1}. ${c}`);
|
|
1643
1719
|
gardees[i] = {
|
|
1644
1720
|
tete: gardees[i].tete,
|
|
@@ -1814,7 +1890,9 @@ export async function unPasDuPlan(ctx, pas, e) {
|
|
|
1814
1890
|
return r;
|
|
1815
1891
|
} catch (x) {
|
|
1816
1892
|
// A session of the plan that cannot end goes up, before any testwriter.
|
|
1817
|
-
if (!(x instanceof Arret))
|
|
1893
|
+
if (!(x instanceof Arret)) {
|
|
1894
|
+
throw x;
|
|
1895
|
+
}
|
|
1818
1896
|
return {
|
|
1819
1897
|
code: monter(ctx, {
|
|
1820
1898
|
code: ARRETS[x.nom],
|
|
@@ -1993,6 +2071,8 @@ export async function arreter(ctx, e) {
|
|
|
1993
2071
|
const lu = e;
|
|
1994
2072
|
ctx.constats = [...(lu.constats ?? [])];
|
|
1995
2073
|
ctx.verifie = lu.verifie ?? null;
|
|
2074
|
+
ctx.seanceReprise = lu.seanceReprise ?? null;
|
|
2075
|
+
ctx.verts = lu.verts ?? null;
|
|
1996
2076
|
ctx.reprise = lu.reprise ?? null;
|
|
1997
2077
|
ctx.refus = lu.refus ?? null;
|
|
1998
2078
|
ecrireEtat(ctx, {
|
|
@@ -2059,7 +2139,9 @@ function etendre(ctx, e) {
|
|
|
2059
2139
|
'plan',
|
|
2060
2140
|
`le superviseur étend le plan à ${ctx.etendre.join(', ')} : ${titre.split(' — ').at(-1)}.`
|
|
2061
2141
|
);
|
|
2062
|
-
if (!e)
|
|
2142
|
+
if (!e) {
|
|
2143
|
+
return e;
|
|
2144
|
+
}
|
|
2063
2145
|
ctx.contexte =
|
|
2064
2146
|
[e.question ? `${e.question.fait}\n\n${e.question.piece}` : null, ctx.contexte]
|
|
2065
2147
|
.filter(Boolean)
|
|
@@ -2075,7 +2157,9 @@ function etendre(ctx, e) {
|
|
|
2075
2157
|
// The opening of <ctx> on <e> before its plan: `{ debut }`, or `{ code }`, a stop gone up.
|
|
2076
2158
|
async function avantLePlan(ctx, e) {
|
|
2077
2159
|
if (ctx.etendre) {
|
|
2078
|
-
if (e?.etape === 'integre')
|
|
2160
|
+
if (e?.etape === 'integre') {
|
|
2161
|
+
throw new Usage(`--etendre : le lot de ${ctx.ticket} est intégré.`);
|
|
2162
|
+
}
|
|
2079
2163
|
e = etendre(ctx, e);
|
|
2080
2164
|
}
|
|
2081
2165
|
// The findings open at the launch of a run with the supervisor's context (`--contexte`, or the
|
|
@@ -2110,21 +2194,29 @@ async function avantLePlan(ctx, e) {
|
|
|
2110
2194
|
// The tools of the project, which every pass of the circuit plays with: a faulty key stops the
|
|
2111
2195
|
// run before any session, by its name.
|
|
2112
2196
|
const lancement = outilsAuLancement(ctx.racine);
|
|
2113
|
-
if (lancement.arret)
|
|
2197
|
+
if (lancement.arret) {
|
|
2198
|
+
return { code: monter(ctx, { ...lancement.arret, etat: d }) };
|
|
2199
|
+
}
|
|
2114
2200
|
ctx.outils = lancement.outils;
|
|
2115
2201
|
const donnees = donneesAuLancement(ctx.racine);
|
|
2116
|
-
if (donnees.arret)
|
|
2202
|
+
if (donnees.arret) {
|
|
2203
|
+
return { code: monter(ctx, { ...donnees.arret, etat: d }) };
|
|
2204
|
+
}
|
|
2117
2205
|
ctx.donnees = donnees.donnees;
|
|
2118
2206
|
// The generated files the project declares: references of the circuit, which 4.2 regenerates
|
|
2119
2207
|
// only when a red of a pass lies in their files (`referencesDesRouges`); the integration
|
|
2120
2208
|
// regenerates them whenever the lot touches their files or what they read.
|
|
2121
2209
|
const engendres = engendresAuLancement(ctx.racine);
|
|
2122
|
-
if (engendres.arret)
|
|
2210
|
+
if (engendres.arret) {
|
|
2211
|
+
return { code: monter(ctx, { ...engendres.arret, etat: d }) };
|
|
2212
|
+
}
|
|
2123
2213
|
ctx.engendres = engendres.engendres;
|
|
2124
2214
|
// The flows of the CI, refused at the launch when their key is faulty: the reviewer's instruction
|
|
2125
2215
|
// reads those the lot touches (`consigneDesFlux`).
|
|
2126
2216
|
const flux = fluxAuLancement(ctx.racine);
|
|
2127
|
-
if (flux.arret)
|
|
2217
|
+
if (flux.arret) {
|
|
2218
|
+
return { code: monter(ctx, { ...flux.arret, etat: d }) };
|
|
2219
|
+
}
|
|
2128
2220
|
return { debut: d };
|
|
2129
2221
|
}
|
|
2130
2222
|
|
|
@@ -2136,7 +2228,9 @@ async function avantLePlan(ctx, e) {
|
|
|
2136
2228
|
*/
|
|
2137
2229
|
export async function ouvrirJusquAuPlan(ctx, e) {
|
|
2138
2230
|
const o = await avantLePlan(ctx, e);
|
|
2139
|
-
if ('code' in o)
|
|
2231
|
+
if ('code' in o) {
|
|
2232
|
+
return o;
|
|
2233
|
+
}
|
|
2140
2234
|
const aEcrire = o.debut.etape === TESTS && !planPasse(ctx, empreinteDuPlan(leTicket(ctx)));
|
|
2141
2235
|
return { debut: o.debut, plan: aEcrire ? planAuDebut(ctx) : null };
|
|
2142
2236
|
}
|
|
@@ -2146,6 +2240,8 @@ export function finirLOuverture(ctx, d) {
|
|
|
2146
2240
|
// The sort of the ticket its plan says, which the run reads at each step.
|
|
2147
2241
|
ctx.sorte = sorteDuTicket(ctx);
|
|
2148
2242
|
// A sibling of HEAD's version a killed circuit left in the copy never enters the lot.
|
|
2149
|
-
if (existsSync(ctx.copie))
|
|
2243
|
+
if (existsSync(ctx.copie)) {
|
|
2244
|
+
balayerLesSoeurs(ctx);
|
|
2245
|
+
}
|
|
2150
2246
|
return { debut: d };
|
|
2151
2247
|
}
|
|
@@ -68,7 +68,9 @@ import { langageDe } from './langages.mjs';
|
|
|
68
68
|
*/
|
|
69
69
|
export function cheminsLus(dir) {
|
|
70
70
|
const manifeste = path.join(dir, 'package.json');
|
|
71
|
-
if (!existsSync(manifeste))
|
|
71
|
+
if (!existsSync(manifeste)) {
|
|
72
|
+
return [];
|
|
73
|
+
}
|
|
72
74
|
const { grillhouse } = JSON.parse(readFileSync(manifeste, 'utf8'));
|
|
73
75
|
const liste = v => (Array.isArray(v) ? v.filter(l => typeof l === 'string') : []);
|
|
74
76
|
return [
|
|
@@ -83,8 +85,11 @@ function lesSections(description) {
|
|
|
83
85
|
let dedans = false;
|
|
84
86
|
for (const l of String(description ?? '').split('\n')) {
|
|
85
87
|
const m = /^## (.+)$/.exec(l);
|
|
86
|
-
if (m)
|
|
87
|
-
|
|
88
|
+
if (m) {
|
|
89
|
+
dedans = /^(Architecture|Critères)\b/.test(m[1].trim());
|
|
90
|
+
} else if (dedans) {
|
|
91
|
+
out.push(l);
|
|
92
|
+
}
|
|
88
93
|
}
|
|
89
94
|
return out.join('\n');
|
|
90
95
|
}
|
|
@@ -112,7 +117,9 @@ function elementsNommes(texte) {
|
|
|
112
117
|
const vus = new Set();
|
|
113
118
|
for (const [, brut] of texte.matchAll(/`([^`\n]+)`/g)) {
|
|
114
119
|
const m = /^([A-Za-z_$][\w$]*)((?:\.[A-Za-z_$][\w$]*|\([^)]*\))*)$/.exec(brut.trim());
|
|
115
|
-
if (m)
|
|
120
|
+
if (m) {
|
|
121
|
+
vus.add(m[1]);
|
|
122
|
+
}
|
|
116
123
|
}
|
|
117
124
|
return [...vus];
|
|
118
125
|
}
|
|
@@ -123,10 +130,16 @@ function cheminsEcrits(racine, texte) {
|
|
|
123
130
|
const out = new Set();
|
|
124
131
|
for (const [brut] of texte.matchAll(/[\w.@-]+(?:\/[\w.@-]+)*/g)) {
|
|
125
132
|
const p = brut.replace(/\.+$/, '');
|
|
126
|
-
if (!p.includes('/') && !/\.\w+$/.test(p))
|
|
133
|
+
if (!p.includes('/') && !/\.\w+$/.test(p)) {
|
|
134
|
+
continue;
|
|
135
|
+
}
|
|
127
136
|
const net = path.normalize(p);
|
|
128
|
-
if (net.startsWith('..') || path.isAbsolute(net))
|
|
129
|
-
|
|
137
|
+
if (net.startsWith('..') || path.isAbsolute(net)) {
|
|
138
|
+
continue;
|
|
139
|
+
}
|
|
140
|
+
if (existsSync(path.join(racine, net))) {
|
|
141
|
+
out.add(net.split(path.sep).join('/'));
|
|
142
|
+
}
|
|
130
143
|
}
|
|
131
144
|
return [...out];
|
|
132
145
|
}
|
|
@@ -144,9 +157,13 @@ function lecteursDesChemins(racine, tous, changes) {
|
|
|
144
157
|
for (const brut of new Set(cheminsLus(c.dossier))) {
|
|
145
158
|
const lu = brut.replace(/^\.\//, '').replace(/\/+$/, '');
|
|
146
159
|
const atteints = changes.filter(ch => !recouvre(propre, ch) && recouvre(lu, ch)).sort();
|
|
147
|
-
if (atteints.length)
|
|
160
|
+
if (atteints.length) {
|
|
161
|
+
par.add(`lit ${lu} (${atteints.join(', ')})`);
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
if (par.size) {
|
|
165
|
+
out.set(c, par);
|
|
148
166
|
}
|
|
149
|
-
if (par.size) out.set(c, par);
|
|
150
167
|
}
|
|
151
168
|
return out;
|
|
152
169
|
}
|
|
@@ -184,18 +201,28 @@ export function releve(racine, description) {
|
|
|
184
201
|
const trouves = new Set(ceuxNommes);
|
|
185
202
|
for (const e of code.elements) {
|
|
186
203
|
trouves.add(e.fournisseur);
|
|
187
|
-
for (const l of e.lecteurs)
|
|
204
|
+
for (const l of e.lecteurs) {
|
|
205
|
+
trouves.add(l.composant);
|
|
206
|
+
}
|
|
188
207
|
}
|
|
189
208
|
for (const e of code.types.elements) {
|
|
190
|
-
for (const d of e.declarations)
|
|
191
|
-
|
|
209
|
+
for (const d of e.declarations) {
|
|
210
|
+
if (d.publie) {
|
|
211
|
+
trouves.add(d.composant);
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
for (const c of e.lecteurs.keys()) {
|
|
215
|
+
trouves.add(c);
|
|
216
|
+
}
|
|
192
217
|
}
|
|
193
218
|
// By the paths read: the components whose tests declare they read a path the ticket changes.
|
|
194
219
|
const parChemins = lecteursDesChemins(racine, tous, [
|
|
195
220
|
...cheminsEcrits(racine, texte),
|
|
196
221
|
...ceuxNommes.map(c => path.relative(racine, c.dossier).split(path.sep).join('/')),
|
|
197
222
|
]);
|
|
198
|
-
for (const c of parChemins.keys())
|
|
223
|
+
for (const c of parChemins.keys()) {
|
|
224
|
+
trouves.add(c);
|
|
225
|
+
}
|
|
199
226
|
// By the architecture: the Rend of the CADRE.md of each component that publishes an element.
|
|
200
227
|
const declarants = new Set([
|
|
201
228
|
...code.elements.map(e => e.fournisseur),
|
|
@@ -205,8 +232,12 @@ export function releve(racine, description) {
|
|
|
205
232
|
for (const p of declarants) {
|
|
206
233
|
for (const { regle, texte: ligne } of rendus(p)) {
|
|
207
234
|
for (const c of nommes(racine, tous, ligne)) {
|
|
208
|
-
if (c === p)
|
|
209
|
-
|
|
235
|
+
if (c === p) {
|
|
236
|
+
continue;
|
|
237
|
+
}
|
|
238
|
+
if (!architecture.has(c)) {
|
|
239
|
+
architecture.set(c, new Set());
|
|
240
|
+
}
|
|
210
241
|
architecture.get(c).add(`CADRE de ${nomAuTitre(racine, p)}, Rend ${regle}`);
|
|
211
242
|
trouves.add(c);
|
|
212
243
|
}
|
|
@@ -251,7 +282,9 @@ export function releve(racine, description) {
|
|
|
251
282
|
// lines included.
|
|
252
283
|
function rendus(c) {
|
|
253
284
|
const f = path.join(c.dossier, 'docs', 'CADRE.md');
|
|
254
|
-
if (!existsSync(f))
|
|
285
|
+
if (!existsSync(f)) {
|
|
286
|
+
return [];
|
|
287
|
+
}
|
|
255
288
|
const texte = readFileSync(f, 'utf8');
|
|
256
289
|
const out = [];
|
|
257
290
|
let dedans = false;
|
|
@@ -261,11 +294,15 @@ function rendus(c) {
|
|
|
261
294
|
dedans = /Rend\s*$/.test(h[1].trim());
|
|
262
295
|
continue;
|
|
263
296
|
}
|
|
264
|
-
if (!dedans)
|
|
297
|
+
if (!dedans) {
|
|
298
|
+
continue;
|
|
299
|
+
}
|
|
265
300
|
if (/^[-*] /.test(l)) {
|
|
266
301
|
const regle = /^[-*] \*\*(R\d+)\.?\*\*/.exec(l)?.[1] ?? `l.${i + 1}`;
|
|
267
302
|
out.push({ regle, texte: l });
|
|
268
|
-
} else if (/^\s+\S/.test(l) && out.length)
|
|
303
|
+
} else if (/^\s+\S/.test(l) && out.length) {
|
|
304
|
+
out.at(-1).texte += ` ${l.trim()}`;
|
|
305
|
+
}
|
|
269
306
|
}
|
|
270
307
|
return out;
|
|
271
308
|
}
|
|
@@ -273,7 +310,9 @@ function rendus(c) {
|
|
|
273
310
|
// The components of the survey <r> the title <titre> does not name (its components as written,
|
|
274
311
|
// package names or paths, or `.`), in the survey's order.
|
|
275
312
|
export function manquants(racine, r, titre) {
|
|
276
|
-
if (titre.includes('.'))
|
|
313
|
+
if (titre.includes('.')) {
|
|
314
|
+
return [];
|
|
315
|
+
}
|
|
277
316
|
const tous = langageDe(racine).composants(racine);
|
|
278
317
|
const couvre = c => {
|
|
279
318
|
const rel = path.relative(racine, c.dossier).split(path.sep).join('/');
|
|
@@ -323,7 +362,9 @@ export function texteDuReleve(r) {
|
|
|
323
362
|
const cle = `${ou} ; lu par ${lus || 'aucun autre'}.`;
|
|
324
363
|
lignes.set(cle, [...(lignes.get(cle) ?? []), `\`${e.nom}\``]);
|
|
325
364
|
}
|
|
326
|
-
for (const [cle, noms] of lignes)
|
|
365
|
+
for (const [cle, noms] of lignes) {
|
|
366
|
+
out.push(` - ${noms.join(', ')} : ${cle}`);
|
|
367
|
+
}
|
|
327
368
|
}
|
|
328
369
|
if (r.lit.length) {
|
|
329
370
|
const lus = r.lit.map(l => `${l.composant} (${l.par.join(' ; ')})`).join(', ');
|
|
@@ -333,7 +374,9 @@ export function texteDuReleve(r) {
|
|
|
333
374
|
const lus = r.architecture.map(l => `${l.composant} (${l.par.join(' ; ')})`).join(', ');
|
|
334
375
|
out.push(`- Par l'architecture : ${lus}.`);
|
|
335
376
|
}
|
|
336
|
-
if (r.nommes.length)
|
|
377
|
+
if (r.nommes.length) {
|
|
378
|
+
out.push(`- Nommés au ticket : ${r.nommes.join(', ')}.`);
|
|
379
|
+
}
|
|
337
380
|
if (r.sansFournisseur.length) {
|
|
338
381
|
out.push(
|
|
339
382
|
`- Sans interface qui les publie : ${r.sansFournisseur.map(n => `\`${n}\``).join(', ')}.`
|