@roomi-fields/grillhouse 0.33.1 → 0.34.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 +63 -0
- package/cadre/templates/projet/CLAUDE.md +9 -3
- package/charte.md +23 -6
- package/dist/temporal/circuit/activites.d.ts +3 -1
- package/dist/temporal/circuit/activites.js +25 -1
- package/dist/temporal/circuit/activites.js.map +1 -1
- package/dist/temporal/circuit/appel.d.ts +19 -0
- package/dist/temporal/circuit/appel.js +93 -0
- package/dist/temporal/circuit/appel.js.map +1 -0
- package/dist/temporal/circuit/client.d.ts +7 -0
- package/dist/temporal/circuit/client.js +20 -0
- package/dist/temporal/circuit/client.js.map +1 -1
- package/dist/temporal/circuit/commande.js +27 -87
- package/dist/temporal/circuit/commande.js.map +1 -1
- package/dist/temporal/circuit/contrat.d.ts +19 -0
- package/dist/temporal/circuit/contrat.js +2 -0
- package/dist/temporal/circuit/contrat.js.map +1 -1
- package/dist/temporal/circuit/deroule.js +86 -11
- package/dist/temporal/circuit/deroule.js.map +1 -1
- package/dist/temporal/file/activites.d.ts +3 -0
- package/dist/temporal/file/activites.js +9 -0
- package/dist/temporal/file/activites.js.map +1 -1
- package/dist/temporal/file/contrat.d.ts +58 -0
- package/dist/temporal/file/deroule.d.ts +8 -1
- package/dist/temporal/file/deroule.js +100 -2
- package/dist/temporal/file/deroule.js.map +1 -1
- package/dist/temporal/nuits/contrat.d.ts +2 -0
- package/dist/temporal/nuits/deroule.js +3 -0
- package/dist/temporal/nuits/deroule.js.map +1 -1
- package/dist/temporal/places/activites.d.ts +8 -0
- package/dist/temporal/places/activites.js +12 -1
- package/dist/temporal/places/activites.js.map +1 -1
- package/dist/temporal/places/client.d.ts +8 -1
- package/dist/temporal/places/client.js +25 -2
- package/dist/temporal/places/client.js.map +1 -1
- package/dist/temporal/places/contrat.d.ts +35 -3
- package/dist/temporal/places/contrat.js +5 -4
- package/dist/temporal/places/contrat.js.map +1 -1
- package/dist/temporal/places/deroule.js +55 -9
- package/dist/temporal/places/deroule.js.map +1 -1
- package/dist/temporal/tickets/activites.d.ts +3 -0
- package/dist/temporal/tickets/activites.js +73 -4
- package/dist/temporal/tickets/activites.js.map +1 -1
- package/dist/temporal/tickets/contrat.d.ts +31 -0
- package/dist/temporal/tickets/deroule.js +61 -10
- package/dist/temporal/tickets/deroule.js.map +1 -1
- package/docs/ARCHITECTURE.md +213 -57
- package/docs/CADRE.md +6 -1
- package/docs/INTERFACE.md +24 -8
- package/hooks/crochet.mjs +17 -2
- package/hooks/hooks.json +24 -0
- package/package.json +1 -1
- package/scripts/activites.mjs +77 -14
- package/scripts/aiguillage.mjs +2 -0
- package/scripts/attente-a-l-arret.mjs +141 -0
- package/scripts/attente-au-tour.mjs +32 -16
- package/scripts/avancement.mjs +5 -3
- package/scripts/branche-de-nuit.mjs +63 -3
- package/scripts/circuit.mjs +57 -4
- package/scripts/circuits-du-serveur.mjs +34 -1
- package/scripts/commandes-composees.mjs +11 -4
- package/scripts/copies-finies.mjs +43 -29
- package/scripts/crochets.mjs +1 -1
- package/scripts/dette.mjs +55 -4
- package/scripts/disque-des-copies.d.mts +28 -0
- package/scripts/disque-des-copies.mjs +155 -0
- package/scripts/droits.mjs +2 -0
- package/scripts/faits-du-circuit.mjs +24 -0
- package/scripts/file-des-tickets.d.mts +16 -0
- package/scripts/file-des-tickets.mjs +65 -7
- package/scripts/gardes-du-cadre.mjs +4 -2
- package/scripts/integration/file.mjs +302 -5
- package/scripts/jointure.d.ts +33 -1
- package/scripts/langages/cargo/commandes.mjs +71 -10
- package/scripts/langages/cargo/composants.mjs +12 -4
- package/scripts/langages/cargo/executables-de-tests.mjs +118 -0
- package/scripts/langages/cargo/exemples.mjs +17 -3
- package/scripts/langages/cargo/index.mjs +8 -3
- package/scripts/langages/cargo/migrations/0.28.4-tailles-des-tests.mjs +2 -2
- package/scripts/langages/cargo/migrations/0.34.0-executables-de-tests.mjs +35 -0
- package/scripts/langages/cargo/squelette.mjs +8 -3
- package/scripts/langages/cargo/tailles-des-tests.mjs +68 -6
- package/scripts/langages/cargo/tests-de-head.mjs +12 -9
- package/scripts/langages/cargo/verdict.mjs +40 -14
- package/scripts/langages/python/commandes.mjs +11 -2
- package/scripts/langages/python/index.mjs +12 -4
- package/scripts/langages/python/verdict.mjs +8 -1
- package/scripts/langages/typescript/index.mjs +9 -2
- package/scripts/langages/typescript/resume-du-lanceur.mjs +86 -0
- package/scripts/langages/typescript/tests.mjs +1 -1
- package/scripts/langages/typescript/verdict.mjs +4 -60
- package/scripts/langages/typescript/verifier.mjs +1 -1
- package/scripts/langages/typescript/vitest-config/changements.mjs +12 -7
- package/scripts/langages/typescript/vitest-config/lances.mjs +45 -0
- package/scripts/langages/typescript/vitest-config/machine.setup.mjs +1 -0
- package/scripts/messages-non-lus.mjs +166 -0
- package/scripts/mesure-de-la-machine.mjs +7 -4
- package/scripts/migrations-des-gardes.mjs +168 -0
- package/scripts/places-de-la-machine.mjs +44 -40
- package/scripts/places-du-serveur.mjs +82 -14
- package/scripts/plafond-de-la-machine.d.mts +18 -0
- package/scripts/plafond-de-la-machine.mjs +45 -0
- package/scripts/recommencer.d.mts +4 -0
- package/scripts/recommencer.mjs +29 -0
- package/scripts/regles-des-places.d.mts +35 -0
- package/scripts/regles-des-places.mjs +82 -1
- package/scripts/resultats.mjs +38 -4
- package/scripts/retirer-les-copies-finies.mjs +11 -7
- package/scripts/seances.mjs +1 -1
- package/scripts/services-du-noyau.mjs +1 -0
- package/scripts/sous-commandes.mjs +2 -0
- package/scripts/superviseur.mjs +235 -56
- package/scripts/tableau.mjs +385 -247
- package/scripts/taches-du-graphe.mjs +32 -5
- package/scripts/ticket-du-circuit.mjs +25 -0
- package/scripts/transitions.d.mts +27 -1
- package/scripts/transitions.mjs +96 -4
- package/scripts/verrou-de-machine.mjs +41 -17
- package/skills/explorateur/SKILL.md +8 -2
- package/skills/pitmaster/SKILL.md +18 -15
- package/skills/pitmaster/references/tour.md +3 -1
- package/skills/questionneur/SKILL.md +5 -1
- package/skills/testwriter/SKILL.md +32 -6
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
// at a load and a free memory, as `make -l` admits it, and why a taking does not pass now. The
|
|
3
3
|
// workflow of the machine (src/temporal/places/, grillhouse-4nr.7) holds the places of the machine
|
|
4
4
|
// and decides by them; a session or a pass takes its place there by
|
|
5
|
-
// scripts/places-de-la-machine.mjs
|
|
5
|
+
// scripts/places-de-la-machine.mjs; the places of the circuits, which the queue of each project
|
|
6
|
+
// reserves (`reserverDesCircuits`). The workflow bundles this module, which imports nothing. What
|
|
6
7
|
// the machine gives, its load and its memory, is measured by scripts/mesure-de-la-machine.mjs.
|
|
7
8
|
|
|
8
9
|
/** The memory a start wants free, in bytes: 4 GB. */
|
|
@@ -68,3 +69,83 @@ export function refusDeLaPlace(etat, { id, rang, plafond, espacementMs, maintena
|
|
|
68
69
|
}
|
|
69
70
|
return null;
|
|
70
71
|
}
|
|
72
|
+
|
|
73
|
+
/** A place of a circuit not given by its project's queue for this long is gone, in ms: 10 min. */
|
|
74
|
+
export const PERIME_MS = 10 * 60_000;
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* The places of the circuits of the machine once a demand comes, as Buildkite bounds its pipelines
|
|
78
|
+
* in one fleet of agents. The queue of the project <racine> gives its circuits active <vivants>
|
|
79
|
+
* (a circuit paused on a question gives its place back) and the tickets it would start
|
|
80
|
+
* <candidats>, with the reason its disk of copies lacks room (<disque>, null with room): its
|
|
81
|
+
* circuits active hold their place, its candidates wait for one, each its rank of arrival among
|
|
82
|
+
* every project, drawn from <rang>; its other places, but a circuit resumed that waits, and those
|
|
83
|
+
* no demand gave for PERIME_MS, are gone. A circuit resumed after its question asks again by
|
|
84
|
+
* itself (<reprise>: its ticket and its rank of arrival, a new one when null), as a candidate,
|
|
85
|
+
* without the disk, its copy already there. The places are granted in the order of arrival while
|
|
86
|
+
* the circuits that hold one are fewer than <plafond>: the first that waits keeps the next ones
|
|
87
|
+
* waiting, but a candidate short of disk, which waits with its reason and keeps no one. Gives the
|
|
88
|
+
* places, the last rank drawn, and the tickets of the demand that hold a place.
|
|
89
|
+
* @param {Array<{ racine: string, ticket: string, rang: number, accordee: boolean, depuis: number,
|
|
90
|
+
* vu: number, reprise?: boolean, raison?: string | null }>} places
|
|
91
|
+
* @param {{ racine: string, vivants?: string[], candidats?: string[], disque?: string | null,
|
|
92
|
+
* reprise?: { ticket: string, rang: number | null } }} demande
|
|
93
|
+
* @param {{ rang: number, plafond: number, maintenant: number }} o
|
|
94
|
+
*/
|
|
95
|
+
export function reserverDesCircuits(places, demande, o) {
|
|
96
|
+
const { racine, vivants = [], candidats = [], disque = null, reprise } = demande;
|
|
97
|
+
const { plafond, maintenant } = o;
|
|
98
|
+
let { rang } = o;
|
|
99
|
+
const siens = new Set([...vivants, ...candidats]);
|
|
100
|
+
const garde = c =>
|
|
101
|
+
maintenant - c.vu < PERIME_MS &&
|
|
102
|
+
(c.racine !== racine || siens.has(c.ticket) || Boolean(reprise) || (c.reprise && !c.accordee));
|
|
103
|
+
const circuits = places.filter(garde).map(c => ({ ...c }));
|
|
104
|
+
const placer = (ticket, accordee, o2 = {}) => {
|
|
105
|
+
const c = circuits.find(x => x.racine === racine && x.ticket === ticket);
|
|
106
|
+
if (c) {
|
|
107
|
+
c.vu = maintenant;
|
|
108
|
+
c.accordee = c.accordee || accordee;
|
|
109
|
+
if (accordee) {
|
|
110
|
+
c.reprise = false;
|
|
111
|
+
}
|
|
112
|
+
Object.assign(c, o2.maj ?? {});
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
const r = o2.rang ?? (rang += 1);
|
|
116
|
+
rang = Math.max(rang, r);
|
|
117
|
+
circuits.push({
|
|
118
|
+
racine,
|
|
119
|
+
ticket,
|
|
120
|
+
rang: r,
|
|
121
|
+
accordee,
|
|
122
|
+
depuis: maintenant,
|
|
123
|
+
vu: maintenant,
|
|
124
|
+
...(o2.maj ?? {}),
|
|
125
|
+
});
|
|
126
|
+
};
|
|
127
|
+
vivants.forEach(t => placer(t, true));
|
|
128
|
+
candidats.forEach(t => placer(t, false, { maj: { raison: disque } }));
|
|
129
|
+
if (reprise) {
|
|
130
|
+
placer(reprise.ticket, false, {
|
|
131
|
+
rang: reprise.rang ?? undefined,
|
|
132
|
+
maj: { reprise: true, raison: null },
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
let tenues = circuits.filter(c => c.accordee).length;
|
|
136
|
+
for (const c of circuits.filter(x => !x.accordee).sort((a, b) => a.rang - b.rang)) {
|
|
137
|
+
if (tenues >= plafond) {
|
|
138
|
+
break;
|
|
139
|
+
}
|
|
140
|
+
if (c.raison) {
|
|
141
|
+
continue;
|
|
142
|
+
}
|
|
143
|
+
c.accordee = true;
|
|
144
|
+
tenues += 1;
|
|
145
|
+
}
|
|
146
|
+
const demandes = reprise ? [...candidats, reprise.ticket] : candidats;
|
|
147
|
+
const accordes = demandes.filter(t =>
|
|
148
|
+
circuits.some(c => c.racine === racine && c.ticket === t && c.accordee)
|
|
149
|
+
);
|
|
150
|
+
return { circuits, rang, accordes };
|
|
151
|
+
}
|
package/scripts/resultats.mjs
CHANGED
|
@@ -86,7 +86,9 @@
|
|
|
86
86
|
// (explorateur);
|
|
87
87
|
// - `reponses` (`numero` of the question, `reponse` CHANGE or GARDE, `texte`): the explorateur's
|
|
88
88
|
// one answer to the questionneur, which the circuit writes at the ticket; a question without
|
|
89
|
-
// an answer stays open (explorateur);
|
|
89
|
+
// an answer stays open (explorateur); an answer may carry a `correction` of a criterion
|
|
90
|
+
// (`critere`, `texte`, `piece`, `extrait`), which the circuit accepts when the extract stands
|
|
91
|
+
// at the line of the question's piece (`correctionsDuPlan` of scripts/transitions.mjs);
|
|
90
92
|
// - `issue` (QUESTIONS with its `questions`, each with what it aims at, `vise`, and its
|
|
91
93
|
// `piece`; AUCUNE; DÉSACCORD
|
|
92
94
|
// with its `desaccord`): the explorateur answers the questions, the disagreement as one, and
|
|
@@ -143,7 +145,12 @@ const SARIF = 'sarif';
|
|
|
143
145
|
export const A_ELAGUER = 'a-elaguer';
|
|
144
146
|
// The kinds of a guard's finding: to fix (a developpeur's work), to settle (a person's decision),
|
|
145
147
|
// to lower (a note).
|
|
146
|
-
const GENRES = ['a-corriger', 'a-arbitrer', A_ELAGUER];
|
|
148
|
+
const GENRES = ['a-corriger', 'a-arbitrer', A_ELAGUER, 'a-inscrire'];
|
|
149
|
+
// The kind of a note of a guard the lot adds (absent from the guards of main): the findings of a
|
|
150
|
+
// key, which the circuit inscribes as its debt (scripts/dette.mjs, scripts/circuit.mjs).
|
|
151
|
+
export const A_INSCRIRE = 'a-inscrire';
|
|
152
|
+
// Whether a finding is a note of the debt, lowered or inscribed by the circuit: no red.
|
|
153
|
+
export const estNoteDeDette = k => k.genre === A_ELAGUER || k.genre === A_INSCRIRE;
|
|
147
154
|
const texte = description => ({ type: 'string', description });
|
|
148
155
|
const liste = (items, description) => ({ type: 'array', description, items });
|
|
149
156
|
const objet = (properties, required = [], description) => ({
|
|
@@ -290,6 +297,18 @@ const FICHES = {
|
|
|
290
297
|
numero: texte('Le numéro de la question, « 1 ».'),
|
|
291
298
|
reponse: { type: 'string', enum: ['CHANGE', 'GARDE'] },
|
|
292
299
|
texte: texte('CHANGE : ce que le plan devient ; GARDE : pourquoi il reste tel quel.'),
|
|
300
|
+
correction: objet(
|
|
301
|
+
{
|
|
302
|
+
critere: texte('Le numéro du critère que la pièce contredit, « 3 ».'),
|
|
303
|
+
texte: texte('Le texte corrigé du critère, tel qu’il remplace l’ancien.'),
|
|
304
|
+
piece: texte(
|
|
305
|
+
'La pièce fichier:ligne de la question, la même, jamais « $ commande ».'
|
|
306
|
+
),
|
|
307
|
+
extrait: texte('Un extrait littéral de la ligne citée, qui prouve la correction.'),
|
|
308
|
+
},
|
|
309
|
+
['critere', 'texte', 'piece', 'extrait'],
|
|
310
|
+
'Facultative : la question oppose un critère qui affirme ce que contient ou fait la pièce à cette pièce ; le circuit l’accepte si l’extrait figure à la ligne citée, et la question n’est plus ouverte. Jamais pour une décision (architecture, écart à la référence, fonctionnel).'
|
|
311
|
+
),
|
|
293
312
|
},
|
|
294
313
|
['numero', 'reponse', 'texte']
|
|
295
314
|
),
|
|
@@ -756,9 +775,19 @@ function introuvables(f, copie) {
|
|
|
756
775
|
if (!lu?.fichier) {
|
|
757
776
|
continue;
|
|
758
777
|
}
|
|
759
|
-
|
|
778
|
+
let abs = path.resolve(racine, lu.fichier);
|
|
760
779
|
const lieu = `${lu.fichier}:${lu.ligne}${lu.fin ? `-${lu.fin}` : ''}`;
|
|
761
|
-
|
|
780
|
+
// The journal of the ticket, `<copie>.log` next to the copy, named by its absolute path or by
|
|
781
|
+
// `<nom de la copie>.log`; a file of the copy of that name is judged as that file.
|
|
782
|
+
const journal = `${racine}.log`;
|
|
783
|
+
const dansLaCopie = abs.startsWith(`${racine}${path.sep}`) && existsSync(abs);
|
|
784
|
+
if (!dansLaCopie && (lu.fichier === journal || lu.fichier === path.basename(journal))) {
|
|
785
|
+
abs = journal;
|
|
786
|
+
} else if (!abs.startsWith(`${racine}${path.sep}`)) {
|
|
787
|
+
out.push(`${ou} : ${lieu} introuvable dans la copie : pas de tel fichier`);
|
|
788
|
+
continue;
|
|
789
|
+
}
|
|
790
|
+
if (!existsSync(abs) || !statSync(abs).isFile()) {
|
|
762
791
|
out.push(`${ou} : ${lieu} introuvable dans la copie : pas de tel fichier`);
|
|
763
792
|
continue;
|
|
764
793
|
}
|
|
@@ -885,6 +914,11 @@ function manques(role, f) {
|
|
|
885
914
|
if (!/^[1-9]\d*$/.test(r.numero)) {
|
|
886
915
|
out.push(`reponses[${i}].numero : « ${r.numero} » n'est pas le numéro d'une question`);
|
|
887
916
|
}
|
|
917
|
+
if (r.correction && !/^[1-9]\d*$/.test(r.correction.critere)) {
|
|
918
|
+
out.push(
|
|
919
|
+
`reponses[${i}].correction.critere : « ${r.correction.critere} » n'est pas le numéro d'un critère`
|
|
920
|
+
);
|
|
921
|
+
}
|
|
888
922
|
}
|
|
889
923
|
}
|
|
890
924
|
if (role === 'tri') {
|
|
@@ -3,9 +3,11 @@
|
|
|
3
3
|
//
|
|
4
4
|
// node scripts/retirer-les-copies-finies.mjs [<copie finie de jouer>…] from the main tree
|
|
5
5
|
//
|
|
6
|
-
// - The circuits that
|
|
7
|
-
// 5 s at most)
|
|
8
|
-
//
|
|
6
|
+
// - The circuits that hold their copy are what the Temporal server says (./circuits-du-serveur.mjs,
|
|
7
|
+
// one call, 5 s at most): each that has not ended (it runs, or waits an answer or a place), and
|
|
8
|
+
// each ended without its issue, which waits the supervisor's answer; a server that does not
|
|
9
|
+
// answer, a client not built or any other fault of that reading leaves them unread (null), and
|
|
10
|
+
// the removal of ./copies-finies.mjs then keeps each copy beside its `.travail`.
|
|
9
11
|
// - The removal lives in ./copies-finies.mjs, which imports nothing of the built `dist/`: the lock
|
|
10
12
|
// of the machine (./verrou-de-machine.mjs) and the base configuration of the tests import it,
|
|
11
13
|
// and a project of trial holds the frame's scripts without `dist/`.
|
|
@@ -13,13 +15,15 @@ import { circuitsDuServeur } from './circuits-du-serveur.mjs';
|
|
|
13
15
|
import { retirerLesCopiesDuDepot } from './copies-finies.mjs';
|
|
14
16
|
|
|
15
17
|
const racine = process.cwd();
|
|
16
|
-
let
|
|
18
|
+
let tenus = null;
|
|
17
19
|
try {
|
|
18
|
-
|
|
20
|
+
tenus = new Set(
|
|
21
|
+
(await circuitsDuServeur(racine)).filter(c => c.fin === null || c.question).map(c => c.ticket)
|
|
22
|
+
);
|
|
19
23
|
} catch {
|
|
20
|
-
|
|
24
|
+
tenus = null;
|
|
21
25
|
}
|
|
22
|
-
const lignes = retirerLesCopiesDuDepot(racine, process.argv.slice(2),
|
|
26
|
+
const lignes = retirerLesCopiesDuDepot(racine, process.argv.slice(2), tenus);
|
|
23
27
|
if (lignes.length) {
|
|
24
28
|
process.stdout.write(`${lignes.join('\n')}\n`);
|
|
25
29
|
}
|
package/scripts/seances.mjs
CHANGED
|
@@ -886,7 +886,7 @@ export async function jusquALaFiche(ctx, role, texte, options = {}) {
|
|
|
886
886
|
}
|
|
887
887
|
throw new Arret(
|
|
888
888
|
'sans-fiche',
|
|
889
|
-
`Deux fois, la séance du ${nomDuRole(role)} finit sans fiche conforme : ${lu.erreur}. Le journal du ticket : ${ctx.journal}`
|
|
889
|
+
`Deux fois, la séance du ${nomDuRole(role)} finit sans fiche conforme : ${lu.erreur}. Le journal du ticket : ${ctx.journal} (il se cite en pièce, \`${ctx.ticket}.log:<ligne>\`)`
|
|
890
890
|
);
|
|
891
891
|
}
|
|
892
892
|
|
|
@@ -29,6 +29,7 @@ const SCRIPTS = path.dirname(fileURLToPath(import.meta.url));
|
|
|
29
29
|
// Each subcommand and its script, under `scripts/`, or the command of the module of the language
|
|
30
30
|
// that runs it (`{ langage }`, its name in `commandes`).
|
|
31
31
|
export const SOUS_COMMANDES = {
|
|
32
|
+
'attente-a-l-arret': 'attente-a-l-arret.mjs',
|
|
32
33
|
'attente-au-tour': 'attente-au-tour.mjs',
|
|
33
34
|
bilan: 'bilan.mjs',
|
|
34
35
|
circuit: '../dist/temporal/circuit/commande.js',
|
|
@@ -50,6 +51,7 @@ export const SOUS_COMMANDES = {
|
|
|
50
51
|
journal: 'journal.mjs',
|
|
51
52
|
'ligne-etat': 'ligne-etat/ligne-etat.mjs',
|
|
52
53
|
maj: 'grillhouse-maj.mjs',
|
|
54
|
+
'messages-non-lus': 'messages-non-lus.mjs',
|
|
53
55
|
newday: 'newday.mjs',
|
|
54
56
|
nuit: '../dist/temporal/nuits/commande.js',
|
|
55
57
|
outil: 'outil.mjs',
|