@roomi-fields/grillhouse 0.44.0 → 0.45.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/plugin.json +1 -1
- package/CHANGELOG.md +32 -0
- package/cadre/templates/projet/.claude/settings.json +5 -0
- package/cadre/templates/projet/CLAUDE.md +15 -2
- package/cadre/templates/projet/docs/agents/issue-tracker.md +1 -1
- package/charte.md +3 -2
- package/dist/temporal/circuit/client.d.ts +7 -0
- package/dist/temporal/circuit/client.js +12 -2
- package/dist/temporal/circuit/client.js.map +1 -1
- package/dist/temporal/commande.js +8 -1
- package/dist/temporal/commande.js.map +1 -1
- package/dist/temporal/installation.d.ts +26 -1
- package/dist/temporal/installation.js +113 -14
- package/dist/temporal/installation.js.map +1 -1
- package/dist/temporal/tickets/activites.js +3 -1
- package/dist/temporal/tickets/activites.js.map +1 -1
- package/docs/ARCHITECTURE.md +207 -68
- package/docs/INTERFACE.md +24 -16
- package/package.json +1 -1
- package/scripts/activites.mjs +66 -46
- package/scripts/aiguillage.mjs +1 -0
- package/scripts/attente-de-la-machine.mjs +312 -0
- package/scripts/avancement.mjs +38 -31
- package/scripts/bilan.mjs +30 -5
- package/scripts/circuit.mjs +10 -7
- package/scripts/codes-de-sortie.mjs +1 -1
- package/scripts/coeurs-dedies.mjs +427 -0
- package/scripts/composants-affectes.mjs +3 -1
- package/scripts/consommation-des-passes.mjs +382 -0
- package/scripts/consommation.mjs +45 -0
- package/scripts/copies-finies.mjs +2 -2
- package/scripts/depart-du-ticket.mjs +3 -1
- package/scripts/disque-des-copies.mjs +1 -1
- package/scripts/echantillonneur-de-la-passe.mjs +103 -0
- package/scripts/enveloppe/enveloppe.mjs +1 -11
- package/scripts/enveloppe/travail-de-la-copie.mjs +3 -2
- package/scripts/grillhouse-maj.mjs +8 -4
- package/scripts/integration/file.mjs +10 -4
- package/scripts/jointure.d.ts +20 -9
- package/scripts/langages/cargo/commandes.mjs +8 -8
- package/scripts/langages/python/commandes.mjs +7 -6
- package/scripts/langages/typescript/tests-de-nuit.mjs +17 -4
- package/scripts/langages/typescript/tests.mjs +15 -6
- package/scripts/langages/typescript/verifier.mjs +23 -17
- package/scripts/langages/typescript/vitest-config/base.mjs +3 -3
- package/scripts/langages/typescript/vitest-config/machine.setup.mjs +7 -7
- package/scripts/mesure/base-de-passe.mjs +1 -1
- package/scripts/migrations/0.44.0-seuil-des-codes-de-tickets.mjs +47 -0
- package/scripts/migrations.mjs +2 -0
- package/scripts/passe-de-la-machine.mjs +456 -31
- package/scripts/places-de-la-machine.mjs +508 -61
- package/scripts/plafond-de-la-machine.d.mts +47 -2
- package/scripts/plafond-de-la-machine.mjs +197 -5
- package/scripts/preparation.mjs +1 -0
- package/scripts/regles-des-places.d.mts +40 -0
- package/scripts/regles-des-places.mjs +91 -0
- package/scripts/retirer-les-copies-finies.mjs +1 -1
- package/scripts/seances.mjs +4 -3
- package/scripts/services-du-noyau.mjs +3 -3
- package/scripts/sous-commandes.mjs +6 -7
- package/scripts/tableau.mjs +121 -112
- package/scripts/verrou-de-machine.mjs +0 -829
package/scripts/jointure.d.ts
CHANGED
|
@@ -385,8 +385,9 @@ export function ouvrirAvancement(o: {
|
|
|
385
385
|
export function inscrireLePlan(dossier: string, o: { racine: string; taches: unknown[] }): void;
|
|
386
386
|
/** Keeps the total of a pass that ended, for the next one's measure. */
|
|
387
387
|
export function garderLeTotal(dossier: string): void;
|
|
388
|
-
/** Names the progress directory of the
|
|
389
|
-
*
|
|
388
|
+
/** Names the progress directory of the pass that holds the part its `env` marks, in the file of its
|
|
389
|
+
* part (scripts/places-de-la-machine.mjs), where the board reads it; the function that takes it
|
|
390
|
+
* out. */
|
|
390
391
|
export function nommerLAvancement(o: { env?: NodeJS.ProcessEnv; dossier: string }): () => void;
|
|
391
392
|
/** Opens the base of a pass of the kind `genre` (scripts/mesure/base-de-passe.mjs). */
|
|
392
393
|
export function ouvrirBase(genre: string, o?: { dans?: string }): unknown;
|
|
@@ -466,14 +467,24 @@ export function mesure(racine: string, o?: { tout?: boolean; dans?: string }): u
|
|
|
466
467
|
* and a pass set), or null without the variable (the tool's own default); refuses a value that is
|
|
467
468
|
* not a positive integer, by name. */
|
|
468
469
|
export function travailleursDeLaSeance(env?: NodeJS.ProcessEnv): number | null;
|
|
469
|
-
/** The wait for the
|
|
470
|
+
/** The wait of a pass for the room or the part of the machine, ended without it
|
|
471
|
+
* (scripts/attente-de-la-machine.mjs). */
|
|
470
472
|
export class AttenteDeLaMachine extends Error {}
|
|
471
|
-
/**
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
473
|
+
/**
|
|
474
|
+
* Plays a pass on its part of the machine, held to it by the system, keeping its consumption when
|
|
475
|
+
* heavy (scripts/passe-de-la-machine.mjs).
|
|
476
|
+
*/
|
|
477
|
+
export function avecLaPasse(...args: unknown[]): unknown;
|
|
478
|
+
/** Plays a pass on its part of the machine: its exit code, or the code of the wait that stops. */
|
|
479
|
+
export function surUnePart(
|
|
480
|
+
passe: (env: NodeJS.ProcessEnv, part: { coeurs: number; memoire: number } | null) => number,
|
|
481
|
+
o?: {
|
|
482
|
+
env?: NodeJS.ProcessEnv;
|
|
483
|
+
racine?: string;
|
|
484
|
+
entiere?: boolean;
|
|
485
|
+
mesure?: boolean;
|
|
486
|
+
dire?: (l: string) => void;
|
|
487
|
+
}
|
|
477
488
|
): number;
|
|
478
489
|
/** Waits for room in the temporary directory, as a heavy pass does before it plays. */
|
|
479
490
|
export function attendreDeLaPlace(o?: Record<string, unknown>): void;
|
|
@@ -74,10 +74,9 @@
|
|
|
74
74
|
// green: the one pass of the verification keeps it (scripts/dernier-vert.mjs,
|
|
75
75
|
// scripts/langages/typescript/verifier.mjs). Beside the module of package.json, whose pass plays
|
|
76
76
|
// every task of the graph, the composed command sets `GRAPHE_JOUE` and `verifier` plays `cargo
|
|
77
|
-
// deny check` alone (scripts/commandes-composees.mjs). It plays on
|
|
78
|
-
//
|
|
79
|
-
//
|
|
80
|
-
// running cargo.
|
|
77
|
+
// deny check` alone (scripts/commandes-composees.mjs). It plays on its part of the machine
|
|
78
|
+
// (`avecLaPasse` of ./jointure, as the module typescript's verifier): a pass whose part does not
|
|
79
|
+
// fit makes it wait, and the bound of the wait reached, it stops at 75 without running cargo.
|
|
81
80
|
// - `verifier --gardes` plays the guards alone, the same verdict as the module typescript's: the
|
|
82
81
|
// project's root scripts `grillhouse:gardes` (the frame's guards) then `gardes` (its own), each
|
|
83
82
|
// one the package.json holds a task of the root, by npm, without its tests nor cargo deny, and
|
|
@@ -138,8 +137,8 @@ import { fileURLToPath, pathToFileURL } from 'node:url';
|
|
|
138
137
|
import { RESULTATS } from '../../resultats.mjs';
|
|
139
138
|
import {
|
|
140
139
|
AttenteDeLaMachine,
|
|
141
|
-
|
|
142
|
-
|
|
140
|
+
surUnePart,
|
|
141
|
+
avecLaPasse,
|
|
143
142
|
cheminsDeLaTache,
|
|
144
143
|
construireDepuisLesArguments,
|
|
145
144
|
ecrirePression,
|
|
@@ -876,7 +875,8 @@ export function lancer(nom, args, { racine = process.cwd(), env = process.env }
|
|
|
876
875
|
const dire = l => process.stdout.write(`${l}\n`);
|
|
877
876
|
try {
|
|
878
877
|
return sousLaBase('verification', env, envBase =>
|
|
879
|
-
|
|
878
|
+
avecLaPasse(envMachine => verifier(racine, args, envMachine), {
|
|
879
|
+
lourde: true,
|
|
880
880
|
env: envBase,
|
|
881
881
|
racine,
|
|
882
882
|
dire,
|
|
@@ -892,7 +892,7 @@ export function lancer(nom, args, { racine = process.cwd(), env = process.env }
|
|
|
892
892
|
}
|
|
893
893
|
const tous = crates(racine);
|
|
894
894
|
if (nom === 'tester') {
|
|
895
|
-
return
|
|
895
|
+
return surUnePart(e => tester(racine, tous, args, e), { env, racine });
|
|
896
896
|
}
|
|
897
897
|
if (nom === 'tests-du-paquet') {
|
|
898
898
|
return sousLaBase('tests', env, (envBase, pp) =>
|
|
@@ -46,8 +46,8 @@
|
|
|
46
46
|
// `GRILLHOUSE_TESTS`). It keeps no green: the one pass of the verification keeps it
|
|
47
47
|
// (scripts/dernier-vert.mjs, scripts/langages/typescript/verifier.mjs). Beside the module of
|
|
48
48
|
// package.json, whose pass plays every task of the graph, the composed command sets
|
|
49
|
-
// `GRAPHE_JOUE` and `verifier` plays nothing again. It plays on
|
|
50
|
-
// the machine
|
|
49
|
+
// `GRAPHE_JOUE` and `verifier` plays nothing again. It plays on its part of
|
|
50
|
+
// the machine (`avecLaPasse` of ./jointure), as the module cargo's. `verifier --gardes` plays
|
|
51
51
|
// the guards alone: the project's root scripts `grillhouse:gardes` then `gardes` the package.json
|
|
52
52
|
// holds.
|
|
53
53
|
// - `typer`: `uv run --locked python -m compileall`, the folders whose name begins with a dot (the
|
|
@@ -87,8 +87,8 @@ import { fileURLToPath, pathToFileURL } from 'node:url';
|
|
|
87
87
|
import { RESULTATS } from '../../resultats.mjs';
|
|
88
88
|
import {
|
|
89
89
|
AttenteDeLaMachine,
|
|
90
|
-
|
|
91
|
-
|
|
90
|
+
surUnePart,
|
|
91
|
+
avecLaPasse,
|
|
92
92
|
cacheDeCompilation,
|
|
93
93
|
cheminsDeLaTache,
|
|
94
94
|
construireDepuisLesArguments,
|
|
@@ -492,7 +492,7 @@ function sousLaBase(genre, env, jouer) {
|
|
|
492
492
|
*/
|
|
493
493
|
export function lancer(nom, args, { racine = process.cwd(), env = process.env } = {}) {
|
|
494
494
|
if (nom === 'tester') {
|
|
495
|
-
return
|
|
495
|
+
return surUnePart(e => tester(racine, args, e), { env, racine });
|
|
496
496
|
}
|
|
497
497
|
if (nom === 'tests-du-paquet') {
|
|
498
498
|
return sousLaBase('tests', env, e => testsDuPaquet(racine, args, e));
|
|
@@ -516,7 +516,8 @@ export function lancer(nom, args, { racine = process.cwd(), env = process.env }
|
|
|
516
516
|
const dire = l => process.stdout.write(`${l}\n`);
|
|
517
517
|
try {
|
|
518
518
|
return sousLaBase('verification', env, envBase =>
|
|
519
|
-
|
|
519
|
+
avecLaPasse(envMachine => verifier(racine, args, envMachine), {
|
|
520
|
+
lourde: true,
|
|
520
521
|
env: envBase,
|
|
521
522
|
racine,
|
|
522
523
|
dire,
|
|
@@ -36,15 +36,16 @@
|
|
|
36
36
|
// - The exit code: 0 when every run is green; 75, « à repasser », when every red run is at 75
|
|
37
37
|
// (every failure depended on a duration, one under load, ./vitest-config/duree.reporter.mjs);
|
|
38
38
|
// else the code of the first red run.
|
|
39
|
-
// - They play
|
|
40
|
-
//
|
|
39
|
+
// - They play on the whole budget of the machine as their part (`avecLaPasse` of
|
|
40
|
+
// scripts/passe-de-la-machine.mjs, `entiere`), alone, once the temporary directory and the disk of
|
|
41
|
+
// the copy have room, as every pass: a wait that reaches its bound ends at 75.
|
|
41
42
|
import { spawnSync } from 'node:child_process';
|
|
42
43
|
import { readdirSync, rmSync } from 'node:fs';
|
|
43
44
|
import path from 'node:path';
|
|
44
45
|
import { fileURLToPath, pathToFileURL } from 'node:url';
|
|
45
46
|
import {
|
|
46
47
|
A_REPASSER,
|
|
47
|
-
|
|
48
|
+
avecLaPasse,
|
|
48
49
|
LA_FORME,
|
|
49
50
|
lireLaTranche,
|
|
50
51
|
} from '../../services-du-noyau.mjs';
|
|
@@ -135,8 +136,15 @@ export function testsDeNuit(racine, options = {}) {
|
|
|
135
136
|
if (runs.length === 0) {
|
|
136
137
|
return 0;
|
|
137
138
|
}
|
|
139
|
+
// The night tests and the measures of time ask for the whole budget as their part: they play
|
|
140
|
+
// alone, once the room of the temporary directory and of the copy is there.
|
|
138
141
|
try {
|
|
139
|
-
|
|
142
|
+
return avecLaPasse(() => jouerLesRuns(racine, runs, options), {
|
|
143
|
+
lourde: false,
|
|
144
|
+
entiere: true,
|
|
145
|
+
racine,
|
|
146
|
+
sorte: 'Tests de nuit',
|
|
147
|
+
});
|
|
140
148
|
} catch (e) {
|
|
141
149
|
if (e?.name !== 'AttenteDeLaMachine') {
|
|
142
150
|
throw e;
|
|
@@ -144,6 +152,11 @@ export function testsDeNuit(racine, options = {}) {
|
|
|
144
152
|
process.stdout.write(`${e.message}\n`);
|
|
145
153
|
return e.code;
|
|
146
154
|
}
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
// The runs <runs> of Vitest of the night, in the copy at <racine>: the code of the first red one,
|
|
158
|
+
// 75 when every red is « à repasser ».
|
|
159
|
+
function jouerLesRuns(racine, runs, options) {
|
|
147
160
|
const { tranche } = options;
|
|
148
161
|
const rapports = path.join(racine, RAPPORTS);
|
|
149
162
|
if (tranche) {
|
|
@@ -93,11 +93,12 @@ import {
|
|
|
93
93
|
paquetsDeLEnveloppe,
|
|
94
94
|
retirerALInterruption,
|
|
95
95
|
SCRIPT_DES_TESTS,
|
|
96
|
-
|
|
96
|
+
surUnePart,
|
|
97
97
|
TESTS_CIBLES,
|
|
98
98
|
testsCibles,
|
|
99
99
|
tracesDuPlan,
|
|
100
100
|
} from '../../services-du-noyau.mjs';
|
|
101
|
+
import { estHorsDuJour } from './vitest-config/cibles.mjs';
|
|
101
102
|
import { paquets } from '../../paquets.mjs';
|
|
102
103
|
import { RESULTATS } from '../../resultats.mjs';
|
|
103
104
|
import { garderLesResumes } from './resume-du-lanceur.mjs';
|
|
@@ -265,12 +266,20 @@ const lancer = () => {
|
|
|
265
266
|
};
|
|
266
267
|
|
|
267
268
|
try {
|
|
268
|
-
// The run takes
|
|
269
|
-
// of Turborepo carries to its tasks
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
269
|
+
// The run takes its part of the machine (scripts/passe-de-la-machine.mjs `surUnePart`), whose
|
|
270
|
+
// mark every run of Turborepo carries to its tasks; a measure of time named plays on dedicated
|
|
271
|
+
// cores (`mesure`), the rest of the machine going on.
|
|
272
|
+
const mesureDeTemps = chemins.some(c => {
|
|
273
|
+
const abs = path.resolve(racine, c);
|
|
274
|
+
return existsSync(abs) && statSync(abs).isFile() && estHorsDuJour(abs);
|
|
273
275
|
});
|
|
276
|
+
process.exitCode = surUnePart(
|
|
277
|
+
env => {
|
|
278
|
+
Object.assign(process.env, env);
|
|
279
|
+
return lancer();
|
|
280
|
+
},
|
|
281
|
+
{ racine, mesure: mesureDeTemps }
|
|
282
|
+
);
|
|
274
283
|
} finally {
|
|
275
284
|
lacher();
|
|
276
285
|
depuis?.retirer();
|
|
@@ -29,12 +29,13 @@
|
|
|
29
29
|
// - `--tout`, and `--force` (the night, scripts/nuit.sh), play the complete pass: no measure
|
|
30
30
|
// against the last green, and each task of tests played for real (the variable of the tests
|
|
31
31
|
// carries the moment of the pass, `rejouer`, which no cached run holds).
|
|
32
|
-
// - The pass
|
|
33
|
-
// shared by every repository of the machine: a pass
|
|
34
|
-
//
|
|
35
|
-
//
|
|
36
|
-
//
|
|
37
|
-
//
|
|
32
|
+
// - The pass takes its part of the budget of the machine (scripts/places-de-la-machine.mjs,
|
|
33
|
+
// `avecLaPasse`), shared by every repository of the machine: a pass whose part does not fit in
|
|
34
|
+
// what the parts held leave, or that the load and the memory refuse, waits, and says so, with
|
|
35
|
+
// what it waits for, when it begins and every 30 s. The wait bounded (60 min), the pass ends at
|
|
36
|
+
// 75, « à repasser »; a key `grillhouse.part` or a reserve that is faulty ends it at once, red
|
|
37
|
+
// (1); either way without playing. A pass in the frame's own repository passes before a
|
|
38
|
+
// project's. It plays held to its part by the system, in a control group of its own.
|
|
38
39
|
// - Turborepo plays the build, then the guards (the frame's, `grillhouse:gardes`, and the
|
|
39
40
|
// project's own, its root script `gardes`), the typing of each package (`typecheck`, its
|
|
40
41
|
// sources and its tests, cached per package: scripts/langages/typescript/turbo-des-paquets.mjs) and the tests
|
|
@@ -42,7 +43,7 @@
|
|
|
42
43
|
// `turbo run grillhouse:gardes gardes typecheck test:unit --continue=dependencies-successful
|
|
43
44
|
// --concurrency=<n> --summarize`, each argument given after it. A red does not stop the pass:
|
|
44
45
|
// every task whose prerequisites passed plays, and each red is named. <n>, the tasks side by
|
|
45
|
-
// side, is half the cores of the
|
|
46
|
+
// side, is half the cores of the pass's part, one at least (`concurrence`): each task of tests is
|
|
46
47
|
// itself parallel (Vitest's workers), as make's `-j` and Bazel's `--local_cpu_resources` bound a
|
|
47
48
|
// build by the machine; a `--concurrency` among the arguments replaces it. The workers of each
|
|
48
49
|
// task of tests are the cores shared between the tasks of tests side by side
|
|
@@ -75,8 +76,8 @@
|
|
|
75
76
|
// - A task at 0 is green. A task at any other code, 75 included, and a summary that does not read
|
|
76
77
|
// while Turborepo failed: red, code 1, each task named.
|
|
77
78
|
// - The progress of the pass (scripts/avancement.mjs): the directory its caller names in
|
|
78
|
-
// GRILLHOUSE_AVANCEMENT (the circuit's), else one of its own, which it names
|
|
79
|
-
//
|
|
79
|
+
// GRILLHOUSE_AVANCEMENT (the circuit's), else one of its own, which it names in the file of the
|
|
80
|
+
// part it holds while it plays (`nommerLAvancement`), as the board shows its holder, and
|
|
80
81
|
// removes at its end, its total kept. Before its run of Turborepo, the plan of
|
|
81
82
|
// the run (`turbo run … --dry=json`) names its tasks of tests and counts done the files of those
|
|
82
83
|
// Turborepo replays from its cache.
|
|
@@ -115,7 +116,7 @@ import {
|
|
|
115
116
|
A_REPASSER,
|
|
116
117
|
AttenteDeLaMachine,
|
|
117
118
|
AVANCEMENT,
|
|
118
|
-
|
|
119
|
+
avecLaPasse,
|
|
119
120
|
BASE_DU_LOT,
|
|
120
121
|
CHANGEMENTS,
|
|
121
122
|
consignerLesRegressions,
|
|
@@ -137,6 +138,7 @@ import {
|
|
|
137
138
|
SCRIPT_DES_TESTS,
|
|
138
139
|
TESTS_CIBLES,
|
|
139
140
|
testsCibles,
|
|
141
|
+
travailleursDeLaSeance,
|
|
140
142
|
VARIABLE_TRAVAILLEURS,
|
|
141
143
|
} from '../../services-du-noyau.mjs';
|
|
142
144
|
import { paquets, TYPAGE } from '../../paquets.mjs';
|
|
@@ -183,8 +185,10 @@ export const travailleursDeLaPasse = ({ coeurs, coteACote, paquets: n }) =>
|
|
|
183
185
|
Math.max(1, Math.floor(coeurs / Math.max(1, Math.min(coteACote, n))));
|
|
184
186
|
|
|
185
187
|
// The full pass in <racine>, its arguments <args> (`--gardes` among them: the guards alone), under
|
|
186
|
-
// <env> and
|
|
187
|
-
// room in the temporary directory, reaches its bound, or when the watch of the memory cuts the run.
|
|
188
|
+
// <env> and its part of the machine; its verdict, 0 or 1, or 75 when the wait for the part, or for
|
|
189
|
+
// room in the temporary directory, reaches its bound, or when the watch of the memory cuts the run.
|
|
190
|
+
// `dire` writes a line; `coeurs`, the cores the pass shares between its tasks when no part is
|
|
191
|
+
// held (the part's cores otherwise, or those its parent's part gives: GRILLHOUSE_TRAVAILLEURS).
|
|
188
192
|
export function verifier({
|
|
189
193
|
racine = process.cwd(),
|
|
190
194
|
args: demandes = [],
|
|
@@ -203,10 +207,12 @@ export function verifier({
|
|
|
203
207
|
const base = ouvrirBase('verification', { dans: env.TMPDIR || tmpdir() });
|
|
204
208
|
const lacher = retirerALInterruption(base.fermer);
|
|
205
209
|
try {
|
|
206
|
-
return
|
|
207
|
-
envMachine => {
|
|
210
|
+
return avecLaPasse(
|
|
211
|
+
(envMachine, { part }) => {
|
|
212
|
+
// The cores the pass shares between its tasks: its part's, else its parent's part's.
|
|
213
|
+
const sesCoeurs = part?.coeurs ?? travailleursDeLaSeance(envMachine) ?? coeurs;
|
|
208
214
|
// The progress of the pass: the directory its caller names (the circuit's), else its own,
|
|
209
|
-
// named
|
|
215
|
+
// named in the file of its part while it plays.
|
|
210
216
|
const propre = !envMachine[AVANCEMENT];
|
|
211
217
|
const dossier =
|
|
212
218
|
envMachine[AVANCEMENT] || ouvrirAvancement({ racine, genre: 'verification' });
|
|
@@ -217,7 +223,7 @@ export function verifier({
|
|
|
217
223
|
demandes,
|
|
218
224
|
env: { ...envMachine, [AVANCEMENT]: dossier, ...base.env },
|
|
219
225
|
dire,
|
|
220
|
-
coeurs,
|
|
226
|
+
coeurs: sesCoeurs,
|
|
221
227
|
});
|
|
222
228
|
} finally {
|
|
223
229
|
effacer();
|
|
@@ -227,7 +233,7 @@ export function verifier({
|
|
|
227
233
|
}
|
|
228
234
|
}
|
|
229
235
|
},
|
|
230
|
-
{ env, racine, dire }
|
|
236
|
+
{ lourde: true, env, racine, dire }
|
|
231
237
|
);
|
|
232
238
|
} catch (e) {
|
|
233
239
|
if (!(e instanceof AttenteDeLaMachine)) {
|
|
@@ -43,9 +43,9 @@
|
|
|
43
43
|
// `@roomi-fields/grillhouse/vitest-config/mesure`). `mergeConfig` adds the reporters and the setup files of
|
|
44
44
|
// a configuration that extends this one to these; a reporter named on the command line
|
|
45
45
|
// (`--reporter`) replaces them, and Vitest's code then stands.
|
|
46
|
-
// - The machine of a test file is its own: a setup file gives it a
|
|
47
|
-
// its own, so that a `npm run verifier` a test plays in a repository of trial
|
|
48
|
-
//
|
|
46
|
+
// - The machine of a test file is its own: a setup file gives it a directory of the state of the
|
|
47
|
+
// parts of its own, so that a `npm run verifier` a test plays in a repository of trial takes its
|
|
48
|
+
// part among its own parts alone (./machine.setup.mjs, scripts/places-de-la-machine.mjs).
|
|
49
49
|
// - While a run names its results directory (`GRILLHOUSE_RESULTATS`, ./resultats.mjs), the JSON
|
|
50
50
|
// reporter writes Vitest's report there too, which the circuit reads (scripts/resultats.mjs); a
|
|
51
51
|
// setup file gives each test file's processes a results directory of their own, so that a run a
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// A setup file of the base configuration: the machine of a test file is its own. The file gets a
|
|
2
|
-
//
|
|
3
|
-
// directory named after its process and a token, scripts/
|
|
4
|
-
// process it starts inherits: a `npm run verifier` or a circuit that a test plays in
|
|
5
|
-
// of trial
|
|
6
|
-
// user's
|
|
2
|
+
// directory of the state of the parts of its own (GRILLHOUSE_PARTS_DE_LA_MACHINE, a directory of
|
|
3
|
+
// the temporary directory named after its process and a token, scripts/places-de-la-machine.mjs),
|
|
4
|
+
// which every process it starts inherits: a `npm run verifier` or a circuit that a test plays in
|
|
5
|
+
// a repository of trial takes its part there, among its own parts alone, and no test writes in the
|
|
6
|
+
// user's state. A directory already named in the environment stays. Its passes want no room in
|
|
7
7
|
// the temporary directory (GRILLHOUSE_TEMPORAIRE_LIBRE, 0) nor on the disk of their copy
|
|
8
8
|
// (GRILLHOUSE_COPIE_LIBRE, 0): the room of the machine is the pass's that plays the file, which
|
|
9
9
|
// waited for it.
|
|
@@ -14,9 +14,9 @@ import { randomUUID } from 'node:crypto';
|
|
|
14
14
|
import { tmpdir } from 'node:os';
|
|
15
15
|
import path from 'node:path';
|
|
16
16
|
|
|
17
|
-
process.env.
|
|
17
|
+
process.env.GRILLHOUSE_PARTS_DE_LA_MACHINE ||= path.join(
|
|
18
18
|
tmpdir(),
|
|
19
|
-
`grillhouse-
|
|
19
|
+
`grillhouse-parts-${process.pid}-${randomUUID()}`
|
|
20
20
|
);
|
|
21
21
|
// The machine a test reads is a fixed one (GRILLHOUSE_MESURE_D_ESSAI, scripts/places-de-la-machine.mjs
|
|
22
22
|
// `etatDesPlaces`): no test reads the real load or memory of the user's machine.
|
|
@@ -412,7 +412,7 @@ export function dansLeTemporaire(chemin, env = process.env) {
|
|
|
412
412
|
|
|
413
413
|
/**
|
|
414
414
|
* The cache of compilation of <outil> under <env>: `${XDG_CACHE_HOME:-$HOME/.cache}/grillhouse/
|
|
415
|
-
* <outil>`,
|
|
415
|
+
* <outil>`, never in the temporary directory.
|
|
416
416
|
* @param {string} outil `sccache`, `uv`, `cargo`…
|
|
417
417
|
* @param {Record<string, string | undefined>} [env]
|
|
418
418
|
*/
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
// From 0.44.0 the frame sets the threshold of Beads that keeps the codes of the tickets at three
|
|
2
|
+
// characters (`max_collision_prob`, 0.99) in every project (grillhouse-3uv.104).
|
|
3
|
+
//
|
|
4
|
+
// - A project whose Beads has no value gets 0.99, and the update says so once.
|
|
5
|
+
// - A project whose Beads has another value keeps it; the update names it, with the command that
|
|
6
|
+
// aligns it. The line is information, not a to-do, and never fails the update.
|
|
7
|
+
// - A project that already has 0.99 is not touched: a second pass changes nothing and returns no line.
|
|
8
|
+
// - A project whose Beads cannot be reached (no `bd`, no store) is not written; the update says so.
|
|
9
|
+
import { spawnSync } from 'node:child_process';
|
|
10
|
+
|
|
11
|
+
export const version = '0.44.0';
|
|
12
|
+
export const nom = 'seuil des codes de tickets';
|
|
13
|
+
|
|
14
|
+
const CLE = 'max_collision_prob';
|
|
15
|
+
const SEUIL = '0.99';
|
|
16
|
+
|
|
17
|
+
const bd = (projet, args) =>
|
|
18
|
+
spawnSync('bd', args, { cwd: projet, encoding: 'utf8', maxBuffer: 256 * 1024 * 1024 });
|
|
19
|
+
|
|
20
|
+
/** Sets `max_collision_prob` to 0.99 in the Beads of a project that has no value. */
|
|
21
|
+
export function migrer(projet) {
|
|
22
|
+
const lu = bd(projet, ['config', 'get', CLE]);
|
|
23
|
+
if (lu.error || lu.status !== 0) {
|
|
24
|
+
return [
|
|
25
|
+
`Beads : ${CLE} non posé (Beads n'est pas joignable : pas de bd ou pas de store) ; ` +
|
|
26
|
+
`le cadre pose ${SEUIL} : bd config set ${CLE} ${SEUIL}`,
|
|
27
|
+
];
|
|
28
|
+
}
|
|
29
|
+
const valeur = (lu.stdout ?? '').trim();
|
|
30
|
+
if (valeur === SEUIL) {
|
|
31
|
+
return [];
|
|
32
|
+
}
|
|
33
|
+
if (valeur !== '' && !valeur.includes('(not set)')) {
|
|
34
|
+
return [
|
|
35
|
+
`Beads : ${CLE} vaut ${valeur}, gardé (le cadre pose ${SEUIL} ; ` +
|
|
36
|
+
`pour l'aligner : bd config set ${CLE} ${SEUIL})`,
|
|
37
|
+
];
|
|
38
|
+
}
|
|
39
|
+
const pose = bd(projet, ['config', 'set', CLE, SEUIL]);
|
|
40
|
+
if (pose.error || pose.status !== 0) {
|
|
41
|
+
return [
|
|
42
|
+
`Beads : ${CLE} non posé (bd config set a échoué) ; ` +
|
|
43
|
+
`le cadre pose ${SEUIL} : bd config set ${CLE} ${SEUIL}`,
|
|
44
|
+
];
|
|
45
|
+
}
|
|
46
|
+
return [`Beads : ${CLE} posé à ${SEUIL} (les codes de tickets restent à trois caractères)`];
|
|
47
|
+
}
|
package/scripts/migrations.mjs
CHANGED
|
@@ -41,6 +41,7 @@ import * as ciDuCadre from './migrations/0.33.0-ci-du-cadre.mjs';
|
|
|
41
41
|
import * as cacheDistant from './migrations/0.33.0-cache-distant.mjs';
|
|
42
42
|
import * as greffonMattpocockRetire from './migrations/0.35.0-greffon-mattpocock-retire.mjs';
|
|
43
43
|
import * as node26Seul from './migrations/0.44.0-node-26-seul.mjs';
|
|
44
|
+
import * as seuilDesCodesDeTickets from './migrations/0.44.0-seuil-des-codes-de-tickets.mjs';
|
|
44
45
|
|
|
45
46
|
/** The migrations of the core. */
|
|
46
47
|
export const MIGRATIONS = [
|
|
@@ -61,6 +62,7 @@ export const MIGRATIONS = [
|
|
|
61
62
|
cacheDistant,
|
|
62
63
|
greffonMattpocockRetire,
|
|
63
64
|
node26Seul,
|
|
65
|
+
seuilDesCodesDeTickets,
|
|
64
66
|
];
|
|
65
67
|
|
|
66
68
|
/**
|