@roomi-fields/grillhouse 0.50.3 → 0.52.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 +68 -0
- package/agents/developpeur.md +1 -1
- package/agents/direct.md +1 -1
- package/agents/explorateur.md +1 -1
- package/agents/questionneur.md +1 -1
- package/agents/relecteur.md +1 -1
- package/agents/testwriter.md +1 -1
- package/cadre/templates/c/package.json +1 -0
- package/cadre/templates/cargo/package.json +1 -0
- package/cadre/templates/python/package.json +1 -0
- package/charte/plan.md +47 -0
- package/charte/preuve.md +39 -0
- package/charte/superviseur.md +61 -0
- package/charte/tests.md +38 -0
- package/charte.md +39 -189
- package/dist/machine/part-par-sorte.d.ts +16 -0
- package/dist/machine/part-par-sorte.js +36 -0
- package/dist/machine/part-par-sorte.js.map +1 -0
- package/dist/temporal/circuit/appel.js +1 -1
- package/dist/temporal/circuit/appel.js.map +1 -1
- package/dist/temporal/circuit/client.d.ts +4 -4
- package/dist/temporal/circuit/client.js +38 -16
- package/dist/temporal/circuit/client.js.map +1 -1
- package/dist/temporal/circuit/contrat.d.ts +11 -7
- package/dist/temporal/circuit/contrat.js +5 -9
- package/dist/temporal/circuit/contrat.js.map +1 -1
- package/dist/temporal/circuit/deroule.js +18 -6
- package/dist/temporal/circuit/deroule.js.map +1 -1
- package/dist/temporal/commande.js +12 -3
- package/dist/temporal/commande.js.map +1 -1
- package/dist/temporal/installation.d.ts +54 -3
- package/dist/temporal/installation.js +187 -17
- package/dist/temporal/installation.js.map +1 -1
- package/dist/temporal/places/client.d.ts +5 -1
- package/dist/temporal/places/client.js +23 -11
- package/dist/temporal/places/client.js.map +1 -1
- package/docs/ARCHITECTURE.md +23 -2700
- package/docs/INTERFACE.md +26 -10
- package/docs/architecture/circuit.md +61 -14
- package/docs/architecture/entree.md +21 -8
- package/docs/architecture/greffon.md +49 -20
- package/docs/architecture/installation.md +46 -17
- package/docs/architecture/machine.md +79 -39
- package/docs/architecture/tests.md +59 -16
- package/docs/lexique.md +163 -0
- package/hooks/hooks.json +0 -10
- package/hooks/register.tsx +92 -4
- package/package.json +2 -1
- package/scripts/activites.mjs +105 -65
- package/scripts/aiguillage.mjs +15 -8
- package/scripts/attente-au-tour.mjs +2 -3
- package/scripts/attente-de-la-machine.mjs +4 -8
- package/scripts/avancement.mjs +12 -8
- package/scripts/bilan.mjs +126 -63
- package/scripts/bilans-gardes.mjs +37 -0
- package/scripts/branche-de-nuit.mjs +2 -2
- package/scripts/ci-de-main.mjs +18 -21
- package/scripts/circuit.mjs +89 -44
- package/scripts/circuits-du-serveur.mjs +5 -5
- package/scripts/composants-affectes.mjs +30 -12
- package/scripts/composition-des-langages.mjs +5 -3
- package/scripts/conformite.mjs +1 -1
- package/scripts/consommation-des-passes.mjs +8 -6
- package/scripts/copies-finies.mjs +3 -14
- package/scripts/depart-du-ticket.d.mts +8 -2
- package/scripts/depart-du-ticket.mjs +26 -8
- package/scripts/direct.mjs +158 -72
- package/scripts/droits.mjs +165 -208
- package/scripts/engendres.mjs +3 -14
- package/scripts/entree-de-seance.mjs +35 -0
- package/scripts/enveloppe/enveloppe.mjs +98 -46
- package/scripts/enveloppe/lancer.sh +90 -66
- package/scripts/enveloppe/paquets-du-plan.mjs +38 -11
- package/scripts/enveloppe/travail-de-la-copie.mjs +192 -3
- package/scripts/etapes.mjs +84 -22
- package/scripts/faits-du-circuit.mjs +8 -2
- package/scripts/grillhouse-maj.mjs +43 -18
- package/scripts/groupe-cles.d.mts +15 -0
- package/scripts/groupe-cles.mjs +77 -2
- package/scripts/init.mjs +9 -2
- package/scripts/integration/rejeu.mjs +8 -1
- package/scripts/jointure.d.ts +24 -4
- package/scripts/langages/c/index.mjs +5 -2
- package/scripts/langages/cargo/commandes.mjs +35 -15
- package/scripts/langages/cargo/composants.mjs +45 -3
- package/scripts/langages/cargo/index.mjs +6 -3
- package/scripts/langages/python/commandes.mjs +50 -7
- package/scripts/langages/python/index.mjs +5 -2
- package/scripts/langages/python/squelette.mjs +2 -1
- package/scripts/langages/typescript/chemins-des-tests.mjs +1 -1
- package/scripts/langages/typescript/index.mjs +16 -14
- package/scripts/langages/typescript/mise-a-jour.mjs +1 -1
- package/scripts/langages/typescript/rapports-aux-lignes.mjs +74 -0
- package/scripts/langages/typescript/turbo-des-paquets.mjs +151 -38
- package/scripts/langages/typescript/verdict.mjs +29 -3
- package/scripts/langages/typescript/verifier.mjs +28 -3
- package/scripts/langages/typescript/vitest-config/changements.mjs +8 -6
- package/scripts/langages/typescript/vitest-config/lances.mjs +15 -32
- package/scripts/langages.mjs +54 -4
- package/scripts/matieres-lues.mjs +1 -1
- package/scripts/mesure/base-de-passe.mjs +32 -90
- package/scripts/migrations/serveurs-de-l-index.mjs +79 -0
- package/scripts/migrations/suivi-du-superviseur-retire.mjs +56 -0
- package/scripts/migrations.mjs +23 -7
- package/scripts/nuit.sh +3 -2
- package/scripts/paquet.mjs +1 -1
- package/scripts/paquets.d.ts +3 -0
- package/scripts/paquets.mjs +88 -1
- package/scripts/passe-de-la-machine.mjs +109 -36
- package/scripts/places-de-la-machine.mjs +81 -29
- package/scripts/plafond-de-la-machine.d.mts +2 -5
- package/scripts/plafond-de-la-machine.mjs +9 -9
- package/scripts/reprise.mjs +42 -13
- package/scripts/resultats.mjs +78 -56
- package/scripts/retirer-les-copies-finies.mjs +1 -1
- package/scripts/seances.mjs +471 -133
- package/scripts/services-du-noyau.mjs +9 -1
- package/scripts/session-start.sh +22 -7
- package/scripts/sortie-de-seance.mjs +70 -0
- package/scripts/sortie.mjs +37 -6
- package/scripts/sous-commandes.mjs +0 -3
- package/scripts/superviseur.mjs +400 -162
- package/scripts/tableau.mjs +188 -65
- package/scripts/transitions.d.mts +25 -2
- package/scripts/transitions.mjs +137 -29
- package/scripts/verrous/ecriture-hors-enveloppe.mjs +31 -9
- package/skills/codebase-design/DESIGN-IT-TWICE.md +1 -1
- package/skills/developpeur/SKILL.md +38 -15
- package/skills/direct/SKILL.md +29 -9
- package/skills/domain-modeling/GLOSSARY-FORMAT.md +9 -9
- package/skills/domain-modeling/SKILL.md +14 -12
- package/skills/explorateur/SKILL.md +32 -8
- package/skills/grill/SKILL.md +3 -2
- package/skills/pitmaster/SKILL.md +80 -50
- package/skills/pitmaster/references/cadre.md +1 -1
- package/skills/pitmaster/references/consigne-agent.md +12 -11
- package/skills/pitmaster/references/tour.md +6 -5
- package/skills/relecteur/SKILL.md +13 -6
- package/skills/systematic-debugging/SKILL.md +281 -0
- package/skills/systematic-debugging/condition-based-waiting-example.ts +158 -0
- package/skills/systematic-debugging/condition-based-waiting.md +115 -0
- package/skills/systematic-debugging/defense-in-depth.md +122 -0
- package/skills/systematic-debugging/find-polluter.sh +72 -0
- package/skills/systematic-debugging/root-cause-tracing.md +169 -0
- package/skills/testwriter/SKILL.md +37 -31
- package/cadre/templates/projet/pitmaster/SUIVI.md +0 -22
- package/scripts/attente-a-l-arret.mjs +0 -114
- package/scripts/verrous/commande.mjs +0 -214
- package/scripts/verrous/verrou.mjs +0 -311
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// A pass on the machine: it takes its part of the budget (scripts/places-de-la-machine.mjs
|
|
2
2
|
// `prendreUnePart`), waiting when the parts held leave too little, and plays held to that part
|
|
3
3
|
// by a control group of its own (`systemd-run --user --scope`) whose CPU weight and memory bound
|
|
4
|
-
// come from the part, with no hard CPU ceiling. Its tools receive the cores of its part
|
|
4
|
+
// come from the part (the bound its limit, else its memory), with no hard CPU ceiling. Its tools receive the cores of its part
|
|
5
5
|
// (GRILLHOUSE_TRAVAILLEURS). A pass takes no place. Architecture:
|
|
6
6
|
// docs/architecture/machine.md (§3.1, §5.1, §6).
|
|
7
7
|
//
|
|
@@ -17,7 +17,9 @@
|
|
|
17
17
|
// unit named, which a sampler reads. A pass that consumes clearly more than its part is said to
|
|
18
18
|
// the board and to the figures (`depasseLaPart`).
|
|
19
19
|
// - A pass under the part its parent holds (GRILLHOUSE_PART_TENUE) takes none of its own.
|
|
20
|
+
// - A session of an agent keeps its peak too (`mesureDeLaSeance`), read from its group.
|
|
20
21
|
import { spawnSync } from 'node:child_process';
|
|
22
|
+
import { randomUUID } from 'node:crypto';
|
|
21
23
|
import { readFileSync } from 'node:fs';
|
|
22
24
|
import {
|
|
23
25
|
coeursDeLaMachine,
|
|
@@ -86,7 +88,7 @@ export function lancementDeLaPasse({ lourde, cmd, args, env }) {
|
|
|
86
88
|
/**
|
|
87
89
|
* The command line that runs <cmd> in a control group of its own under the part <part>: `systemd-run
|
|
88
90
|
* --user --scope` (the manager of the user, no privilege), its CPU weight and its memory bound
|
|
89
|
-
* drawn from the part, no hard ceiling of CPU, the command of the pass whole at the end after
|
|
91
|
+
* (the limit of the part, else its memory) drawn from the part, no hard ceiling of CPU, the command of the pass whole at the end after
|
|
90
92
|
* `--`, given as written (`--expand-environment=no`: systemd-run would otherwise expand each
|
|
91
93
|
* `${…}` of its arguments, a shell script's included). <plafond> adds the hard CPU ceiling (`CPUQuota`, the cores of the part: the group of an
|
|
92
94
|
* agent's session); <memoire> false leaves the memory unbound. <unite> names the scope, which a
|
|
@@ -94,8 +96,9 @@ export function lancementDeLaPasse({ lourde, cmd, args, env }) {
|
|
|
94
96
|
* part, the system delegating the cpuset controller to the account) the group allows those
|
|
95
97
|
* threads only (`AllowedCPUs`), under the slice of the frame, which the programs out of the frame
|
|
96
98
|
* are kept out of.
|
|
97
|
-
* @param {{ part: { coeurs: number, memoire: number }, cmd: string,
|
|
98
|
-
* unite?: string | null, fils?: number[] | null, plafond?: boolean,
|
|
99
|
+
* @param {{ part: { coeurs: number, memoire: number, limite?: number | null }, cmd: string,
|
|
100
|
+
* args: string[], unite?: string | null, fils?: number[] | null, plafond?: boolean,
|
|
101
|
+
* memoire?: boolean }} o
|
|
99
102
|
* @returns {{ cmd: string, args: string[] }}
|
|
100
103
|
*/
|
|
101
104
|
export function commandeDuGroupe({ part, cmd, args, unite = null, fils = null, plafond = false, memoire = true }) {
|
|
@@ -112,7 +115,7 @@ export function commandeDuGroupe({ part, cmd, args, unite = null, fils = null, p
|
|
|
112
115
|
'MemoryAccounting=yes',
|
|
113
116
|
'-p',
|
|
114
117
|
`CPUWeight=${poidsDeLaPart(part)}`,
|
|
115
|
-
...(memoire ? ['-p', `MemoryMax=${Math.floor(part.memoire)}`] : []),
|
|
118
|
+
...(memoire ? ['-p', `MemoryMax=${Math.floor(part.limite ?? part.memoire)}`] : []),
|
|
116
119
|
...(plafond ? ['-p', `CPUQuota=${part.coeurs * 100}%`] : []),
|
|
117
120
|
...(fils ? ['-p', `AllowedCPUs=${listeDeCoeurs(fils)}`] : []),
|
|
118
121
|
'--',
|
|
@@ -216,9 +219,47 @@ const issueDe = r => {
|
|
|
216
219
|
return 'verte';
|
|
217
220
|
};
|
|
218
221
|
|
|
219
|
-
//
|
|
220
|
-
//
|
|
221
|
-
|
|
222
|
+
// Keeps in the register of the project the line of what the group <ouvert> consumed since <debut>:
|
|
223
|
+
// the figures, its part when it holds one, and what exceeds it; then closes the group.
|
|
224
|
+
function garderLaMesure({ ouvert, racine, ticket, sorte, part, horloge, coeurs, debut, issue }) {
|
|
225
|
+
let lecture = null;
|
|
226
|
+
try {
|
|
227
|
+
lecture = ouvert.lire();
|
|
228
|
+
} catch {
|
|
229
|
+
// an unreadable scope keeps a line without values
|
|
230
|
+
}
|
|
231
|
+
try {
|
|
232
|
+
const dureeMs = horloge() - debut;
|
|
233
|
+
const depasse =
|
|
234
|
+
lecture && part
|
|
235
|
+
? depasseLaPart({ part, cpuNs: lecture.cpuNs, dureeMs, memoirePic: lecture.memoirePic })
|
|
236
|
+
: null;
|
|
237
|
+
const limite = part?.limite === undefined ? part?.memoire : part.limite;
|
|
238
|
+
garderLaConsommation(racine, {
|
|
239
|
+
sorte,
|
|
240
|
+
...(ticket ? { ticket } : {}),
|
|
241
|
+
dureeMs,
|
|
242
|
+
cpuNs: lecture?.cpuNs ?? null,
|
|
243
|
+
memoirePic: lecture?.memoirePic ?? null,
|
|
244
|
+
coeurs,
|
|
245
|
+
...(part
|
|
246
|
+
? {
|
|
247
|
+
partCoeurs: part.coeurs,
|
|
248
|
+
partMemoire: part.memoire,
|
|
249
|
+
...(limite === null ? {} : { partLimite: limite }),
|
|
250
|
+
}
|
|
251
|
+
: {}),
|
|
252
|
+
...(depasse ? { depasse } : {}),
|
|
253
|
+
issue,
|
|
254
|
+
fin: new Date().toISOString(),
|
|
255
|
+
});
|
|
256
|
+
} finally {
|
|
257
|
+
ouvert.clore?.();
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
// Plays <jouer> in the group <ouvert> (`ouvrir()` of a scope) and, for a heavy pass, keeps its
|
|
262
|
+
// line, the pass red or interrupted included, read before the group goes.
|
|
222
263
|
function jouerMesuree(jouer, { ouvert, racine, ticket, sorte, part, horloge, coeurs, lourde }) {
|
|
223
264
|
const debut = horloge();
|
|
224
265
|
let issue = 'rouge';
|
|
@@ -227,39 +268,71 @@ function jouerMesuree(jouer, { ouvert, racine, ticket, sorte, part, horloge, coe
|
|
|
227
268
|
issue = issueDe(r);
|
|
228
269
|
return r;
|
|
229
270
|
} finally {
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
} catch {
|
|
234
|
-
// an unreadable scope keeps a line without values
|
|
235
|
-
}
|
|
236
|
-
try {
|
|
237
|
-
if (lourde) {
|
|
238
|
-
const dureeMs = horloge() - debut;
|
|
239
|
-
garderLaConsommation(racine, {
|
|
240
|
-
sorte,
|
|
241
|
-
...(ticket ? { ticket } : {}),
|
|
242
|
-
dureeMs,
|
|
243
|
-
cpuNs: lecture?.cpuNs ?? null,
|
|
244
|
-
memoirePic: lecture?.memoirePic ?? null,
|
|
245
|
-
coeurs,
|
|
246
|
-
partCoeurs: part.coeurs,
|
|
247
|
-
partMemoire: part.memoire,
|
|
248
|
-
...(lecture
|
|
249
|
-
? (d => (d ? { depasse: d } : {}))(
|
|
250
|
-
depasseLaPart({ part, cpuNs: lecture.cpuNs, dureeMs, memoirePic: lecture.memoirePic })
|
|
251
|
-
)
|
|
252
|
-
: {}),
|
|
253
|
-
issue,
|
|
254
|
-
fin: new Date().toISOString(),
|
|
255
|
-
});
|
|
256
|
-
}
|
|
257
|
-
} finally {
|
|
271
|
+
if (lourde) {
|
|
272
|
+
garderLaMesure({ ouvert, racine, ticket, sorte, part, horloge, coeurs, debut, issue });
|
|
273
|
+
} else {
|
|
258
274
|
ouvert.clore?.();
|
|
259
275
|
}
|
|
260
276
|
}
|
|
261
277
|
}
|
|
262
278
|
|
|
279
|
+
/**
|
|
280
|
+
* The measure of a session of the agent <role> on the ticket <ticket>, which its control group
|
|
281
|
+
* gives: null where no group is given or on the machine a trial fixes
|
|
282
|
+
* (GRILLHOUSE_MESURE_D_ESSAI, without a <scope> of its own). Else the sampler of the group is
|
|
283
|
+
* started; `unite` names the group the session's command is to run in (`commandeDuGroupe`), and
|
|
284
|
+
* `garder(r)`, at the session's end (`r`, `{ status, signal, error }`), writes its line of the
|
|
285
|
+
* register, sort « seance-<role> ». <part>, the part the session holds, `id` the one that names
|
|
286
|
+
* the group; without one (a session out of the envelope) the line names no part.
|
|
287
|
+
* @param {{ racine: string, role: string, ticket?: string, env?: Record<string, string | undefined>,
|
|
288
|
+
* part?: { id: string, coeurs: number, memoire: number, limite?: number | null } | null,
|
|
289
|
+
* sonde?: () => boolean, scope?: { ouvrir: () => any }, horloge?: () => number,
|
|
290
|
+
* coeurs?: number }} o
|
|
291
|
+
* @returns {{ unite: string, garder: (r: unknown) => void } | null}
|
|
292
|
+
*/
|
|
293
|
+
export function mesureDeLaSeance({
|
|
294
|
+
racine,
|
|
295
|
+
role,
|
|
296
|
+
ticket,
|
|
297
|
+
env = process.env,
|
|
298
|
+
part = null,
|
|
299
|
+
sonde,
|
|
300
|
+
scope,
|
|
301
|
+
horloge = Date.now,
|
|
302
|
+
coeurs = coeursDeLaMachine(),
|
|
303
|
+
}) {
|
|
304
|
+
if (
|
|
305
|
+
(env[VARIABLE_MESURE_D_ESSAI] && !scope) ||
|
|
306
|
+
groupeIndisponible({ env, ...(sonde ? { sonde } : {}) }) !== null
|
|
307
|
+
) {
|
|
308
|
+
return null;
|
|
309
|
+
}
|
|
310
|
+
const sorte = sorteDeLaPasse(`séance ${role}`);
|
|
311
|
+
const ouvert = (
|
|
312
|
+
scope ??
|
|
313
|
+
scopeDeCommande({
|
|
314
|
+
racine,
|
|
315
|
+
sorte,
|
|
316
|
+
ticket,
|
|
317
|
+
coeurs,
|
|
318
|
+
part: {
|
|
319
|
+
coeurs: 1,
|
|
320
|
+
memoire: 0,
|
|
321
|
+
limite: null,
|
|
322
|
+
...part,
|
|
323
|
+
id: part?.id ?? randomUUID(),
|
|
324
|
+
dossier: dossierDesParts(env),
|
|
325
|
+
},
|
|
326
|
+
})
|
|
327
|
+
).ouvrir();
|
|
328
|
+
const debut = horloge();
|
|
329
|
+
return {
|
|
330
|
+
unite: ouvert.unite,
|
|
331
|
+
garder: r =>
|
|
332
|
+
garderLaMesure({ ouvert, racine, ticket, sorte, part, horloge, coeurs, debut, issue: issueDe(r) }),
|
|
333
|
+
};
|
|
334
|
+
}
|
|
335
|
+
|
|
263
336
|
/**
|
|
264
337
|
* How a pass asks whether the controller of the cores is delegated to the account: <delegation>
|
|
265
338
|
* when its caller gives one; on the machine a trial fixes (GRILLHOUSE_MESURE_D_ESSAI) a function
|
|
@@ -28,6 +28,8 @@
|
|
|
28
28
|
// and the machine admits it (`admissionDePart` of ./regles-des-places.mjs); else it waits, says
|
|
29
29
|
// what for when it begins and every 30 s, keeps its rank (the measure of the frame before a
|
|
30
30
|
// project's, then the order of arrival) and stops at « à repasser » (75) at the bound.
|
|
31
|
+
// - The memory of a part is that of its sort (`partDeLaPasse`): at 20 peaks or more of the sort in
|
|
32
|
+
// the register, a reservation the admission counts and a limit where its group is cut.
|
|
31
33
|
// - The parts are one file per pass in `${XDG_STATE_HOME:-~/.local/state}/grillhouse/parts`
|
|
32
34
|
// (GRILLHOUSE_PARTS_DE_LA_MACHINE names another): the part held or waited for, its project,
|
|
33
35
|
// ticket, kind, rank and progress directory, which the board reads (`lireLesParts`). A pass
|
|
@@ -43,10 +45,11 @@
|
|
|
43
45
|
import { randomUUID } from 'node:crypto';
|
|
44
46
|
import { spawnSync } from 'node:child_process';
|
|
45
47
|
import { mkdirSync, readdirSync, readFileSync, rmdirSync, rmSync } from 'node:fs';
|
|
48
|
+
import { createRequire } from 'node:module';
|
|
46
49
|
import { availableParallelism, homedir } from 'node:os';
|
|
47
50
|
import path from 'node:path';
|
|
48
51
|
import { departDe } from './mesure/base-de-passe.mjs';
|
|
49
|
-
import { lireLaConsommation } from './consommation-des-passes.mjs';
|
|
52
|
+
import { lireLaConsommation, sorteDeLaPasse } from './consommation-des-passes.mjs';
|
|
50
53
|
import { ecrireAtomique } from './mesure/avancement.mjs';
|
|
51
54
|
import { A_REPASSER } from './codes-de-sortie.mjs';
|
|
52
55
|
import {
|
|
@@ -95,6 +98,9 @@ export function sousNiceEtIonice(commande) {
|
|
|
95
98
|
}
|
|
96
99
|
/** The mark of a place held, which the children of its holder inherit. */
|
|
97
100
|
export const VARIABLE_TENUE = 'GRILLHOUSE_PLACE_TENUE';
|
|
101
|
+
|
|
102
|
+
/** The sort of the verification of the update (scripts/grillhouse-maj.mjs), a gesture of the maintenance. */
|
|
103
|
+
export const SORTE_DE_LA_MONTEE = 'Montée';
|
|
98
104
|
/** The measure of the machine a trial fixes, in JSON `{ coeurs, charge, memoireLibre, memoireTotale }`. */
|
|
99
105
|
export const VARIABLE_MESURE_D_ESSAI = 'GRILLHOUSE_MESURE_D_ESSAI';
|
|
100
106
|
/** The directory of the state of the parts a trial names, in place of the user's. */
|
|
@@ -434,43 +440,71 @@ export function budgetDeLaPasse(env = process.env) {
|
|
|
434
440
|
return budgetDe({ coeurs: m.coeurs, memoireTotale: m.memoireTotale }, reserveDe(env, { coeurs: m.coeurs }));
|
|
435
441
|
}
|
|
436
442
|
|
|
443
|
+
// The memory of a part by its sort, from the build of src/machine/part-par-sorte.ts; null in a
|
|
444
|
+
// tree not built (a fresh clone before its build), where the part of the project stands.
|
|
445
|
+
function calculParSorte() {
|
|
446
|
+
try {
|
|
447
|
+
return createRequire(import.meta.url)('../dist/machine/part-par-sorte.js');
|
|
448
|
+
} catch (e) {
|
|
449
|
+
if (e?.code === 'MODULE_NOT_FOUND') {
|
|
450
|
+
return null;
|
|
451
|
+
}
|
|
452
|
+
throw e;
|
|
453
|
+
}
|
|
454
|
+
}
|
|
455
|
+
|
|
437
456
|
/**
|
|
438
|
-
* The part of a pass of the project at <racine> under <env
|
|
439
|
-
* its main tree's `package.json` declares, else the default
|
|
440
|
-
*
|
|
441
|
-
*
|
|
457
|
+
* The part of a pass of the sort <sorte> of the project at <racine> under <env>. Its cores are
|
|
458
|
+
* those the key `grillhouse.part` of its main tree's `package.json` declares, else the default
|
|
459
|
+
* ones. Its memory comes from the measure of its sort in the register, at 20 peaks or more:
|
|
460
|
+
* `memoire`, the reservation the admission counts (their 95th percentile), and `limite`, the
|
|
461
|
+
* ceiling of its group (their maximum plus a quarter). Under 20, `memoire` is the declared one,
|
|
462
|
+
* else the default, and stands for both: no `limite`.
|
|
463
|
+
* @param {{ racine: string, env?: Record<string, string | undefined>,
|
|
464
|
+
* sorte?: string }} o <sorte> as the caller names the pass (« Vérification », « séance direct »)
|
|
465
|
+
* @returns {{ coeurs: number, memoire: number, limite?: number }}
|
|
442
466
|
* @throws {AttenteDeLaMachine} naming the key (code 1) when its value is faulty, before any work
|
|
443
467
|
*/
|
|
444
|
-
export function partDeLaPasse({ racine, env = process.env,
|
|
468
|
+
export function partDeLaPasse({ racine, env = process.env, sorte }) {
|
|
445
469
|
const { declaree, faute } = partDeclareeDe(packageDuDepot(racine));
|
|
446
470
|
if (faute) {
|
|
447
471
|
throw new AttenteDeLaMachine(`✗ ${faute}`, 1);
|
|
448
472
|
}
|
|
449
|
-
|
|
473
|
+
const budget = budgetDeLaPasse(env);
|
|
474
|
+
const depot = racineDuDepot(racine);
|
|
475
|
+
const lignes = lireLaConsommation(depot);
|
|
476
|
+
const part = partDe({
|
|
450
477
|
declaree,
|
|
451
|
-
budget
|
|
452
|
-
|
|
453
|
-
pic: plusGrandPicDeJour(racineDuDepot(racine)),
|
|
478
|
+
budget,
|
|
479
|
+
pic: plusGrandPicDeJour(lignes),
|
|
454
480
|
});
|
|
481
|
+
const mesure = sorte
|
|
482
|
+
? calculParSorte()?.memoireDeLaSorte(lignes, sorteDeLaPasse(sorte), budget.memoire)
|
|
483
|
+
: null;
|
|
484
|
+
return mesure
|
|
485
|
+
? { coeurs: part.coeurs, memoire: mesure.reservation, limite: mesure.limite }
|
|
486
|
+
: part;
|
|
455
487
|
}
|
|
456
488
|
|
|
457
|
-
// The kinds of
|
|
489
|
+
// The kinds of line the night and the measures of time write are not those of a day, nor are the
|
|
490
|
+
// sessions of the agents (« seance-<role> »).
|
|
458
491
|
const SORTES_HORS_JOUR = new Set(['nuit', 'tests-de-nuit', 'mesure']);
|
|
459
492
|
|
|
460
493
|
/**
|
|
461
|
-
* The largest peak of memory (bytes) of the day passes
|
|
462
|
-
* undefined without one. A line without a readable peak
|
|
463
|
-
* and of the
|
|
464
|
-
* @param {string}
|
|
494
|
+
* The largest peak of memory (bytes) of the day passes among the <lignes> of a register;
|
|
495
|
+
* undefined without one. A line without a readable peak and those of the night, of the measures
|
|
496
|
+
* of time and of the sessions do not count.
|
|
497
|
+
* @param {Record<string, any>[]} lignes
|
|
465
498
|
* @returns {number | undefined}
|
|
466
499
|
*/
|
|
467
|
-
function plusGrandPicDeJour(
|
|
500
|
+
function plusGrandPicDeJour(lignes) {
|
|
468
501
|
let pic;
|
|
469
|
-
for (const l of
|
|
502
|
+
for (const l of lignes) {
|
|
470
503
|
const p = l.memoirePic;
|
|
471
504
|
if (
|
|
472
505
|
SORTES_HORS_JOUR.has(l.sorte) ||
|
|
473
506
|
l.sorte.startsWith('mesure') ||
|
|
507
|
+
l.sorte.startsWith('seance') ||
|
|
474
508
|
typeof p !== 'number' ||
|
|
475
509
|
!Number.isFinite(p) ||
|
|
476
510
|
p <= 0
|
|
@@ -507,6 +541,12 @@ function coeursDeLaMesure({ racine, budget }) {
|
|
|
507
541
|
return coeursDeLaMesureDe({ declaree, budget });
|
|
508
542
|
}
|
|
509
543
|
|
|
544
|
+
// What a part asks of the memory, as the waiting line says it: « 4,3 Go réservés, limite 7,5 Go ».
|
|
545
|
+
const memoireDite = ({ memoire, limite }) => {
|
|
546
|
+
const go = o => String(Math.round((o / 1024 ** 3) * 10) / 10).replace('.', ',');
|
|
547
|
+
return `${go(memoire)} Go réservés, ${limite === null ? 'sans limite' : `limite ${go(limite)} Go`}`;
|
|
548
|
+
};
|
|
549
|
+
|
|
510
550
|
const RANGS = { 1: 'mesure du cadre', 2: "mesure d'un projet" };
|
|
511
551
|
// The rank of a pass among the parts: the kind of its measure first (the frame's before a
|
|
512
552
|
// project's), then its time of arrival, so that a smaller rank passes first.
|
|
@@ -561,13 +601,16 @@ export function lecteurDeLaCharge(env = process.env, systeme = chargeDesCoeursDu
|
|
|
561
601
|
* The reservation of the machine (<lireLaReservation>, the places of the server by default) is read at each
|
|
562
602
|
* turn of the wait, before the admission lock: under the supervisor's closure the pass waits without bound
|
|
563
603
|
* (« machine fermée par le superviseur »); a reading that fails stands for no reservation. Where no part is taken (the envelope of an agent, a part already
|
|
564
|
-
* held: GRILLHOUSE_PART_TENUE) the part returned holds nothing.
|
|
604
|
+
* held: GRILLHOUSE_PART_TENUE) the part returned holds nothing. <bornee> false (a session of an
|
|
605
|
+
* agent) reserves the memory without a limit.
|
|
565
606
|
* @param {{ env?: Record<string, string | undefined>, racine?: string, ticket?: string | null,
|
|
566
|
-
* sorte?: string, mesure?: boolean,
|
|
607
|
+
* sorte?: string, mesure?: boolean, bornee?: boolean,
|
|
608
|
+
* borneMs?: number, rappelMs?: number,
|
|
567
609
|
* dire?: (l: string) => void, maintenant?: () => number, dormir?: (ms: number) => void,
|
|
568
610
|
* libre?: (d: string) => number, occupe?: (d: string) => string,
|
|
569
611
|
* occupeLaCopie?: (r: string) => string }} [o]
|
|
570
|
-
* @returns {{ id: string | null,
|
|
612
|
+
* @returns {{ id: string | null,
|
|
613
|
+
* part: { coeurs: number, memoire: number, limite?: number | null } | null,
|
|
571
614
|
* env: Record<string, string | undefined>, rendre: () => void, raison: string | null }}
|
|
572
615
|
* `env`, the environment of its holder's children, with the mark of the part and the workers of
|
|
573
616
|
* its tools; `raison`, why no part is held, null when one is
|
|
@@ -580,7 +623,7 @@ export function prendreUnePart({
|
|
|
580
623
|
ticket,
|
|
581
624
|
sorte,
|
|
582
625
|
mesure = false,
|
|
583
|
-
|
|
626
|
+
bornee = true,
|
|
584
627
|
topologie,
|
|
585
628
|
chargeDesCoeurs = lecteurDeLaCharge(env),
|
|
586
629
|
borneMs = borneDe(env),
|
|
@@ -623,7 +666,7 @@ export function prendreUnePart({
|
|
|
623
666
|
}
|
|
624
667
|
part = { coeurs: fils, memoire: Math.floor((budget.memoire * fils) / budget.coeurs) };
|
|
625
668
|
} else {
|
|
626
|
-
part = partDeLaPasse({ racine, env,
|
|
669
|
+
part = partDeLaPasse({ racine, env, sorte });
|
|
627
670
|
}
|
|
628
671
|
} catch (e) {
|
|
629
672
|
throw e instanceof AttenteDeLaMachine ? e : new AttenteDeLaMachine(`✗ ${e.message}`, 1);
|
|
@@ -642,6 +685,8 @@ export function prendreUnePart({
|
|
|
642
685
|
rang: rangDeLaPasse * ECHELLE_DES_RANGS + maintenant(),
|
|
643
686
|
coeurs: part.coeurs,
|
|
644
687
|
memoire: part.memoire,
|
|
688
|
+
// Where the group of the pass is cut; null, a session, whose group has no memory bound.
|
|
689
|
+
limite: bornee ? (part.limite ?? part.memoire) : null,
|
|
645
690
|
dediee: mesure,
|
|
646
691
|
depuis: maintenant(),
|
|
647
692
|
};
|
|
@@ -666,11 +711,16 @@ export function prendreUnePart({
|
|
|
666
711
|
for (;;) {
|
|
667
712
|
// The reservation of the machine is read each turn, before the admission lock, bounded by
|
|
668
713
|
// the delay of a call to the server; a reading that fails stands for « no reservation ».
|
|
714
|
+
// A pass already admitted (a place held: GRILLHOUSE_PLACE_TENUE) or of the update (sort
|
|
715
|
+
// « Montée ») is no new work: the closure does not refuse it, as a drain keeps the pods of
|
|
716
|
+
// the system.
|
|
669
717
|
let reservation = null;
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
718
|
+
if (!env[VARIABLE_TENUE] && sorte !== SORTE_DE_LA_MONTEE) {
|
|
719
|
+
try {
|
|
720
|
+
reservation = lireLaReservation() ?? null;
|
|
721
|
+
} catch {
|
|
722
|
+
reservation = null;
|
|
723
|
+
}
|
|
674
724
|
}
|
|
675
725
|
const fermee = reservation?.auteur === 'superviseur';
|
|
676
726
|
const refus = sousLAdmission(dossier, () => {
|
|
@@ -727,10 +777,12 @@ export function prendreUnePart({
|
|
|
727
777
|
}
|
|
728
778
|
if (dit === null) {
|
|
729
779
|
dire(
|
|
730
|
-
`⏳ ${RANGS[rangDeLaPasse]}, la passe attend sa part (${part.coeurs} cœurs) : ${refus}${fermee ? ' ; sans borne, jusqu’à la réouverture.' : ` ; ${duree(borneMs)} au plus.`}`
|
|
780
|
+
`⏳ ${RANGS[rangDeLaPasse]}, la passe attend sa part (${part.coeurs} cœurs, ${memoireDite(moi)}) : ${refus}${fermee ? ' ; sans borne, jusqu’à la réouverture.' : ` ; ${duree(borneMs)} au plus.`}`
|
|
731
781
|
);
|
|
732
782
|
} else if (t - dit >= rappelMs) {
|
|
733
|
-
dire(
|
|
783
|
+
dire(
|
|
784
|
+
`⏳ la passe attend sa part (${memoireDite(moi)}) depuis ${duree(t - debut)} : ${refus}.`
|
|
785
|
+
);
|
|
734
786
|
}
|
|
735
787
|
if (dit === null || t - dit >= rappelMs) {
|
|
736
788
|
dit = t;
|
|
@@ -792,7 +844,7 @@ export function prendreUnePart({
|
|
|
792
844
|
tracer('prise');
|
|
793
845
|
return {
|
|
794
846
|
id: moi.id,
|
|
795
|
-
part,
|
|
847
|
+
part: bornee ? part : { ...part, limite: null },
|
|
796
848
|
fils: tenus,
|
|
797
849
|
dediee: mesure,
|
|
798
850
|
budgetFils,
|
|
@@ -16,8 +16,6 @@ export const RESERVE_COEURS_PAR_DEFAUT: 4;
|
|
|
16
16
|
export const RESERVE_MEMOIRE_GO_PAR_DEFAUT: 4;
|
|
17
17
|
/** The cores the reservation of an ordinary pass holds when its project declares none. */
|
|
18
18
|
export const COEURS_PAR_DEFAUT: 3;
|
|
19
|
-
/** The cores the reservation of a direct pass holds, fixed. */
|
|
20
|
-
export const COEURS_DU_DIRECT: 2;
|
|
21
19
|
|
|
22
20
|
/**
|
|
23
21
|
* The ceiling of the places under <env>: GRILLHOUSE_PLACES of the environment, else of the file of
|
|
@@ -43,13 +41,12 @@ export function budgetDe(
|
|
|
43
41
|
reserve: PartDeLaPasse
|
|
44
42
|
): PartDeLaPasse;
|
|
45
43
|
|
|
46
|
-
/** The reservation of a pass: the declared cores, else 3, within the budget
|
|
47
|
-
*
|
|
44
|
+
/** The reservation of a pass: the declared cores, else 3, within the budget; its memory the
|
|
45
|
+
* declared one, else the default memory, within the budget. */
|
|
48
46
|
export function partDe(o: {
|
|
49
47
|
declaree: { coeurs?: number; memoire?: number } | null;
|
|
50
48
|
budget: PartDeLaPasse;
|
|
51
49
|
pic: number | undefined;
|
|
52
|
-
direct?: boolean;
|
|
53
50
|
}): PartDeLaPasse;
|
|
54
51
|
|
|
55
52
|
/** The part a project declares in `grillhouse.part` of its package.json, or the fault naming it. */
|
|
@@ -21,10 +21,12 @@
|
|
|
21
21
|
// no core or no memory is refused by its name.
|
|
22
22
|
// - The part of a pass (`partDe`) is its cores and its memory, within the budget and one core at
|
|
23
23
|
// least. Its cores are those its project declares (`grillhouse.part` of its `package.json`),
|
|
24
|
-
// else COEURS_PAR_DEFAUT
|
|
24
|
+
// else COEURS_PAR_DEFAUT. Its memory is the declared
|
|
25
25
|
// one, else the largest peak the project measured plus a quarter, never under a floor (the
|
|
26
26
|
// share of the budget that max(4, a third of its cores) cores hold, which it is without a
|
|
27
|
-
// measure). A part larger than the budget is the budget (one pass at a time).
|
|
27
|
+
// measure). A part larger than the budget is the budget (one pass at a time). That memory stands
|
|
28
|
+
// for a sort of pass the register measured less than 20 times (`partDeLaPasse` of
|
|
29
|
+
// ./places-de-la-machine.mjs).
|
|
28
30
|
import { readFileSync } from 'node:fs';
|
|
29
31
|
import { cpus, totalmem } from 'node:os';
|
|
30
32
|
import path from 'node:path';
|
|
@@ -48,8 +50,6 @@ export const RESERVE_COEURS_PAR_DEFAUT = 4;
|
|
|
48
50
|
export const RESERVE_MEMOIRE_GO_PAR_DEFAUT = 4;
|
|
49
51
|
/** The cores the reservation of an ordinary pass holds when its project declares none. */
|
|
50
52
|
export const COEURS_PAR_DEFAUT = 3;
|
|
51
|
-
/** The cores the reservation of a direct pass holds, fixed. */
|
|
52
|
-
export const COEURS_DU_DIRECT = 2;
|
|
53
53
|
// The cores the reserve of the user leaves the passes at least; the floor of the memory.
|
|
54
54
|
const COEURS_LAISSES_AUX_PASSES = 4;
|
|
55
55
|
|
|
@@ -176,14 +176,14 @@ function memoireParDefautDe(budget, pic) {
|
|
|
176
176
|
|
|
177
177
|
/**
|
|
178
178
|
* The reservation of a pass: the cores its project declares (`partDeclareeDe`), else 3, within the
|
|
179
|
-
* budget and one core at least
|
|
180
|
-
*
|
|
179
|
+
* budget and one core at least. Its memory is the declared one, else the default memory, within
|
|
180
|
+
* the budget.
|
|
181
181
|
* @param {{ declaree: { coeurs?: number, memoire?: number } | null,
|
|
182
|
-
* budget: { coeurs: number, memoire: number }, pic: number | undefined
|
|
182
|
+
* budget: { coeurs: number, memoire: number }, pic: number | undefined }} o
|
|
183
183
|
* @returns {{ coeurs: number, memoire: number }}
|
|
184
184
|
*/
|
|
185
|
-
export function partDe({ declaree, budget, pic
|
|
186
|
-
const voulus =
|
|
185
|
+
export function partDe({ declaree, budget, pic }) {
|
|
186
|
+
const voulus = declaree?.coeurs ?? COEURS_PAR_DEFAUT;
|
|
187
187
|
return {
|
|
188
188
|
coeurs: Math.max(1, Math.min(budget.coeurs, voulus)),
|
|
189
189
|
memoire: Math.min(budget.memoire, declaree?.memoire ?? memoireParDefautDe(budget, pic)),
|
package/scripts/reprise.mjs
CHANGED
|
@@ -4,9 +4,7 @@
|
|
|
4
4
|
// `--depuis` resumes. Mature model: « Re-run failed jobs » of GitHub Actions (the red job and what
|
|
5
5
|
// depends on it replay). The fingerprint of a step, which hashes with `node:crypto`, is in
|
|
6
6
|
// scripts/empreinte-d-etape.mjs, on the side of the activities.
|
|
7
|
-
import { SUITE } from './etapes.mjs';
|
|
8
|
-
|
|
9
|
-
const etatDe = n => SUITE.find(e => e.numero === n).etat;
|
|
7
|
+
import { joue, rolesDe, SUITE } from './etapes.mjs';
|
|
10
8
|
|
|
11
9
|
/**
|
|
12
10
|
* The step that carries the red whose places are <lieux> (`{ paquet, fichier, gardes, nommes,
|
|
@@ -21,8 +19,12 @@ const etatDe = n => SUITE.find(e => e.numero === n).etat;
|
|
|
21
19
|
* build) is the developpeur's, no file named, as a red job of a CI goes back to its author (the
|
|
22
20
|
* the owner's decision); one out of the plan, or a file nobody wrote, is never
|
|
23
21
|
* attributed (`etape` null, its `motif` said): it goes up.
|
|
22
|
+
*
|
|
23
|
+
* In a direct circuit (<circuit>), whose one agent writes the tests and the code, every red
|
|
24
|
+
* attributed is his, at the step of the code.
|
|
24
25
|
*/
|
|
25
|
-
export function attribuerLeRouge({ lieux, portes }) {
|
|
26
|
+
export function attribuerLeRouge({ lieux, portes, circuit = null }) {
|
|
27
|
+
const direct = circuit === 'direct';
|
|
26
28
|
const avecFichier = (lieux ?? []).filter(l => typeof l.fichier === 'string' && l.fichier);
|
|
27
29
|
const nommes = [...new Set(avecFichier.map(l => l.fichier))];
|
|
28
30
|
if (!nommes.length) {
|
|
@@ -37,7 +39,7 @@ export function attribuerLeRouge({ lieux, portes }) {
|
|
|
37
39
|
return {
|
|
38
40
|
etape: null,
|
|
39
41
|
fichiers: [],
|
|
40
|
-
motif: `le rouge nomme ${inconnus.join(', ')}, que ni le testwriter ni le développeur ne portent`,
|
|
42
|
+
motif: `le rouge nomme ${inconnus.join(', ')}, que ${direct ? 'l’agent direct ne porte pas' : 'ni le testwriter ni le développeur ne portent'}`,
|
|
41
43
|
};
|
|
42
44
|
}
|
|
43
45
|
// The test files of the lot the message of a failed test out of the lot names.
|
|
@@ -46,7 +48,7 @@ export function attribuerLeRouge({ lieux, portes }) {
|
|
|
46
48
|
.flatMap(l => l.nommes ?? [])
|
|
47
49
|
.filter(f => tests.has(f));
|
|
48
50
|
// A test file of a reader package extended to its tests (`portes.lecteurs`): the testwriter
|
|
49
|
-
// alone writes it, the developpeur's
|
|
51
|
+
// alone writes it, the developpeur's lot holds no test file.
|
|
50
52
|
const lecteurs = new Set(portes.lecteurs ?? []);
|
|
51
53
|
const refuses = [
|
|
52
54
|
...new Set([
|
|
@@ -59,23 +61,48 @@ export function attribuerLeRouge({ lieux, portes }) {
|
|
|
59
61
|
]),
|
|
60
62
|
];
|
|
61
63
|
const tous = [...new Set([...nommes, ...designes])];
|
|
64
|
+
if (direct) {
|
|
65
|
+
return { etape: 'developpeur', fichiers: tous };
|
|
66
|
+
}
|
|
62
67
|
return refuses.length
|
|
63
68
|
? { etape: 'testwriter', fichiers: refuses.length === tous.length ? refuses : tous }
|
|
64
69
|
: { etape: 'developpeur', fichiers: nommes };
|
|
65
70
|
}
|
|
66
71
|
|
|
67
|
-
// The steps `--depuis` names, each with the
|
|
72
|
+
// The steps `--depuis` names, each with its step of the list, the role it launches when it names
|
|
73
|
+
// one, and the state it resumes at.
|
|
68
74
|
const DEPARTS = {
|
|
69
|
-
testwriter:
|
|
70
|
-
preuve:
|
|
71
|
-
developpeur:
|
|
72
|
-
|
|
73
|
-
|
|
75
|
+
testwriter: { numero: '2', role: 'testwriter', tentative: 1 },
|
|
76
|
+
preuve: { numero: '2.1', tentative: 1 },
|
|
77
|
+
developpeur: { numero: '3', role: 'developpeur', tentative: 1 },
|
|
78
|
+
direct: { numero: '3', role: 'direct', tentative: 1 },
|
|
79
|
+
controles: { numero: '3.1', tentative: 0 },
|
|
80
|
+
'passe-finale': { numero: '4.1', tentative: 0 },
|
|
74
81
|
};
|
|
75
82
|
|
|
76
83
|
/** The steps `--depuis` names. */
|
|
77
84
|
export const ETAPES_DE_REPRISE = Object.keys(DEPARTS);
|
|
78
85
|
|
|
86
|
+
// Whether the circuit <circuit> resumes at the step <nom>: it plays that step, with the role the
|
|
87
|
+
// name says. A short circuit resumes as a long one, whose steps its switch may play.
|
|
88
|
+
const accepte = (nom, circuit) => {
|
|
89
|
+
const parcours = circuit === 'direct' ? circuit : 'long';
|
|
90
|
+
const { numero, role } = DEPARTS[nom];
|
|
91
|
+
const etape = SUITE.find(e => e.numero === numero);
|
|
92
|
+
return joue(numero, parcours) && (!role || rolesDe(etape, parcours).includes(role));
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* The refusal of `--depuis <depuis>` in the circuit <circuit>, naming the resumptions it accepts,
|
|
97
|
+
* or null: the one rule the validator of the workflow of a ticket and the start of a run read.
|
|
98
|
+
*/
|
|
99
|
+
export function refusDeLaReprise({ depuis, circuit = null }) {
|
|
100
|
+
const acceptees = ETAPES_DE_REPRISE.filter(nom => accepte(nom, circuit));
|
|
101
|
+
return acceptees.includes(depuis)
|
|
102
|
+
? null
|
|
103
|
+
: `--depuis attend une étape du ticket : ${acceptees.join(', ')} (reçu « ${depuis} »).`;
|
|
104
|
+
}
|
|
105
|
+
|
|
79
106
|
/**
|
|
80
107
|
* The state `--depuis <nom>` resumes at: that step and the ones after it, no fingerprint kept
|
|
81
108
|
* (`verts` empty), so nothing is read back.
|
|
@@ -86,5 +113,7 @@ export function departDepuis(nom) {
|
|
|
86
113
|
`--depuis attend une étape du ticket : ${ETAPES_DE_REPRISE.join(', ')} (reçu « ${nom} »).`
|
|
87
114
|
);
|
|
88
115
|
}
|
|
89
|
-
|
|
116
|
+
const { numero, tentative } = DEPARTS[nom];
|
|
117
|
+
const { etat, finale = false } = SUITE.find(e => e.numero === numero);
|
|
118
|
+
return { etape: etat, tentative, finale, rapport: null, verts: {} };
|
|
90
119
|
}
|