@roomi-fields/grillhouse 0.28.3 → 0.29.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.
Files changed (68) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/bin/grillhouse.mjs +55 -14
  3. package/cadre/templates/projet/CLAUDE.md +1 -1
  4. package/cadre/templates/projet/README.md +11 -11
  5. package/cadre/templates/projet/_gitignore +2 -5
  6. package/charte.md +13 -4
  7. package/docs/ARCHITECTURE.md +260 -29
  8. package/docs/INTERFACE.md +51 -12
  9. package/package.json +1 -1
  10. package/scripts/aiguillage.mjs +324 -0
  11. package/scripts/avancement.mjs +33 -50
  12. package/scripts/circuit.mjs +558 -146
  13. package/scripts/composition-des-langages.mjs +16 -1
  14. package/scripts/conformite.mjs +16 -0
  15. package/scripts/copies-finies.mjs +171 -30
  16. package/scripts/demon.mjs +134 -21
  17. package/scripts/enveloppe/lancer.sh +13 -14
  18. package/scripts/enveloppe/travail-de-la-copie.mjs +94 -11
  19. package/scripts/etapes.mjs +1 -1
  20. package/scripts/fusion-du-changelog.mjs +0 -1
  21. package/scripts/grillhouse-maj.mjs +16 -7
  22. package/scripts/integration/file.mjs +3 -3
  23. package/scripts/integration/integrer.mjs +3 -3
  24. package/scripts/jointure.d.ts +39 -17
  25. package/scripts/langages/cargo/commandes.mjs +152 -25
  26. package/scripts/langages/cargo/composants.mjs +90 -2
  27. package/scripts/langages/cargo/exemples.mjs +68 -1
  28. package/scripts/langages/cargo/index.mjs +17 -8
  29. package/scripts/langages/cargo/migrations/0.28.4-tailles-des-tests.mjs +35 -0
  30. package/scripts/langages/cargo/sccache.mjs +54 -2
  31. package/scripts/langages/cargo/squelette.mjs +72 -3
  32. package/scripts/langages/cargo/tailles-des-tests.mjs +195 -0
  33. package/scripts/langages/cargo/tests-de-head.mjs +159 -0
  34. package/scripts/langages/python/commandes.mjs +44 -7
  35. package/scripts/langages/python/composants.mjs +33 -3
  36. package/scripts/langages/python/exemples.mjs +19 -0
  37. package/scripts/langages/python/index.mjs +4 -0
  38. package/scripts/langages/python/squelette.mjs +119 -17
  39. package/scripts/langages/typescript/exemples.mjs +16 -0
  40. package/scripts/langages/typescript/index.mjs +6 -3
  41. package/scripts/langages/typescript/regle-des-tests.mjs +13 -0
  42. package/scripts/langages/typescript/squelette.mjs +18 -2
  43. package/scripts/langages/typescript/tests-de-nuit.mjs +41 -21
  44. package/scripts/langages/typescript/verifier.mjs +82 -288
  45. package/scripts/langages/typescript/vitest-config/base.mjs +8 -9
  46. package/scripts/langages/typescript/vitest-config/cibles.mjs +92 -53
  47. package/scripts/langages/typescript/vitest-config/duree.reporter.mjs +11 -5
  48. package/scripts/langages/typescript/vitest-config/machine.setup.mjs +4 -2
  49. package/scripts/langages/typescript/vitest-config/mesure.mjs +3 -2
  50. package/scripts/langages/typescript/vitest.nuit.config.mjs +18 -13
  51. package/scripts/lecture-unique.mjs +51 -0
  52. package/scripts/mesure/pression.mjs +9 -7
  53. package/scripts/nuit.sh +19 -12
  54. package/scripts/outil.mjs +72 -0
  55. package/scripts/paquet.mjs +39 -10
  56. package/scripts/resultats.mjs +22 -5
  57. package/scripts/services-du-noyau.mjs +8 -9
  58. package/scripts/session-start.sh +10 -1
  59. package/scripts/sortie.mjs +20 -1
  60. package/scripts/sources.mjs +3 -3
  61. package/scripts/sous-commandes.mjs +1 -0
  62. package/scripts/superviseur.mjs +369 -14
  63. package/scripts/tableau.mjs +219 -58
  64. package/scripts/verrou-de-machine.mjs +303 -58
  65. package/skills/developpeur/SKILL.md +11 -3
  66. package/skills/pitmaster/SKILL.md +58 -23
  67. package/skills/relecteur/SKILL.md +18 -6
  68. package/skills/testwriter/SKILL.md +11 -15
@@ -39,15 +39,17 @@
39
39
  # the copy, a conflict with main marked in its file; a branch with nothing ahead simply starts
40
40
  # again from main. A ticket whose branch is still in the integration queue is not launched:
41
41
  # the refusal goes to the log, which names the queue, CODE_COPIE, before any copy is made.
42
- # Moving forward keeps
42
+ # The copy, new or existing, then goes through the one preparation of a copy, which the circuit
43
+ # also plays before each pass that judges the lot (scripts/enveloppe/travail-de-la-copie.mjs
44
+ # `preparer`, its output in the log). Moving forward keeps
43
45
  # the work in progress of the copy in the copy, never in git's stash, which every copy of the
44
46
  # repository shares: it is set aside as a lot, the copy fast-forwards, and the lot is applied
45
- # three ways, as the lot of a branch sent back is (scripts/enveloppe/travail-de-la-copie.mjs).
47
+ # three ways, as the lot of a branch sent back is.
46
48
  # A refusal, such as a branch that has left main or conflicts left unresolved, goes to
47
49
  # the log and stops the launch, CODE_COPIE; so does a reapplication that conflicts: the log
48
50
  # names the copy and each file in conflict, the conflicts stay marked in the copy's files and
49
51
  # unmerged in its index, and no agent starts on a half-merged copy. Its
50
- # submodules go through the common preparation (scripts/sous-modules.sh): before moving forward,
52
+ # submodules go through that preparation (scripts/sous-modules.sh): before moving forward,
51
53
  # a submodule carrying local work stops the launch, CODE_COPIE, its log naming it, the work in
52
54
  # place; then every submodule is set at the commit of HEAD, before any installation, except one the
53
55
  # project shares (`grillhouse.partage`), which the copy reads from the main repository. Its
@@ -199,6 +201,8 @@ export TMPDIR="$temporaire" TMP="$temporaire" TEMP="$temporaire"
199
201
  echec=$(mktemp)
200
202
  (
201
203
  # Each step returns on failure: `set -e` does not act inside a subshell tested by `||`.
204
+ # An existing copy moves forward to main by the preparation (`cible`); a new one is made on it.
205
+ cible=
202
206
  if [ ! -d "$copie" ]; then
203
207
  tete=$(git -C "$racine" rev-parse HEAD) || exit 1
204
208
  branche="agent/$ticket"
@@ -220,21 +224,16 @@ echec=$(mktemp)
220
224
  node "$ici/travail-de-la-copie.mjs" reporter "$copie" "$base" "$pointe" || exit 1
221
225
  fi
222
226
  else
223
- bash "$ici/../sous-modules.sh" garde "$copie" || exit 1
224
- # The work in progress moves with the copy, in the copy: a conflict stops the launch, marked
225
- # in the files, the log naming each one (travail-de-la-copie.mjs).
226
- node "$ici/travail-de-la-copie.mjs" avancer "$copie" "$(git -C "$racine" rev-parse HEAD)" || exit 1
227
+ cible=$(git -C "$racine" rev-parse HEAD) || exit 1
227
228
  fi
229
+ # The one preparation of a copy, which the circuit also plays before each pass that judges the
230
+ # lot (travail-de-la-copie.mjs `preparer`): for an existing copy, the guard of its submodules and
231
+ # its advance to main, its work kept in the copy, a conflict stopping the launch, marked in the
232
+ # files, the log naming each one; then the pose of the submodules, their mount, the installation.
228
233
  # The list the pose fixes is the one every mount gets, whatever the installation rewrites.
229
- partages=$(bash "$ici/../sous-modules.sh" pose "$copie") || exit 1
234
+ partages=$(node "$ici/travail-de-la-copie.mjs" preparer "$copie" ${cible:+"$cible"}) || exit 1
230
235
  monter() { bash "$ici/../sous-modules.sh" monter "$copie" --partages "$partages" "$@"; }
231
- monter true || exit 1
232
236
  if [ -f "$copie/package.json" ]; then
233
- # --no-save leaves the lock file as committed, so a clean copy stays clean.
234
- installe="$copie/node_modules/.package-lock.json"
235
- if [ ! -d "$copie/node_modules" ] || [ "$copie/package-lock.json" -nt "$installe" ]; then
236
- monter npm --prefix "$copie" install --no-save --no-audit --no-fund --silent || exit 1
237
- fi
238
237
  # The build of the copy for the session's plan, by the module of its language (`construire`),
239
238
  # when it describes one: a build that fails writes its first line and its output in $echec,
240
239
  # and the session opens with them; any other failure stops the launch.
@@ -1,17 +1,29 @@
1
1
  #!/usr/bin/env node
2
- // The local work of an agent's copy carried onto main, for the launcher (./lancer.sh), in the copy
3
- // alone: git's stash (refs/stash) is common to every copy of a repository, so the work never goes
4
- // there; the copy keeps it, as a merge or a rebase in conflict does (its conflicts marked in the
5
- // files, the unmerged entries in its own index).
2
+ // The local work of an agent's copy carried onto main, and the preparation of that copy, for the
3
+ // launcher (./lancer.sh) and for the circuit before each pass that judges the lot
4
+ // (scripts/circuit.mjs, `avantLaPasse`), in the copy alone: git's stash (refs/stash) is common to
5
+ // every copy of a repository, so the work never goes there; the copy keeps it, as a merge or a
6
+ // rebase in conflict does (its conflicts marked in the files, the unmerged entries in its own
7
+ // index).
6
8
  //
7
9
  // node scripts/enveloppe/travail-de-la-copie.mjs reporter <copie> <base> <pointe>
8
- // node scripts/enveloppe/travail-de-la-copie.mjs avancer <copie> <cible>
10
+ // node scripts/enveloppe/travail-de-la-copie.mjs preparer <copie> [<cible>]
9
11
  //
12
+ // - `preparer`: the one preparation of a copy, which the launcher plays before each session and
13
+ // the circuit before each pass that judges the lot. With <cible> (an existing copy), the guard
14
+ // of its submodules (scripts/sous-modules.sh `garde`), then `avancer`; then, for every copy,
15
+ // the pose of its submodules (`pose`, the shared ones linked, the others set at the commit of
16
+ // HEAD), the check that their read-only mount plays (`monter … true`), and, when the copy has a
17
+ // package.json, the installation (`npm install --no-save`, under that mount) when node_modules
18
+ // is missing or the lock file is newer than the installation (`node_modules/.package-lock.json`).
19
+ // It prints on stdout the list its pose fixes, its messages on stderr; exit 1 on the first step
20
+ // that fails, named, its output after (BPScript: the lock file changed 27 times in two weeks,
21
+ // and the submodule vendor/bp3-engine, both stale in a copy moved forward without them).
10
22
  // - `reporter`: the lot from <base> to <pointe> (`git diff --binary`), a branch the queue sent
11
23
  // back, becomes local work of the copy: applied three ways (`git apply --3way`), a conflict
12
24
  // marked in its file, the rest of the lot there; the index is then left as HEAD has it, so that
13
25
  // all of it is local work. Exit 0, the conflicts included: the agent's session resolves them.
14
- // - `avancer`: the copy moves forward to <cible> (the main tree's HEAD) by a fast-forward, its
26
+ // - The advance (`avancer`, a step of `preparer`): the copy moves forward to <cible> (the main tree's HEAD) by a fast-forward, its
15
27
  // local work kept by the same application: the work as a lot (`git diff --binary HEAD`, the
16
28
  // submodules left out, which the launcher sets afterwards; untracked files stay in place), the
17
29
  // copy brought back to HEAD, moved forward, the lot applied three ways. The lot waits in the
@@ -41,7 +53,7 @@
41
53
  // and open-synth-descriptors, each copy moved by hand). A lot in conflict on another file is not
42
54
  // regenerated: its conflicts come first.
43
55
  import { spawnSync } from 'node:child_process';
44
- import { existsSync, rmSync, writeFileSync } from 'node:fs';
56
+ import { existsSync, rmSync, statSync, writeFileSync, writeSync } from 'node:fs';
45
57
  import path from 'node:path';
46
58
  import { pathToFileURL } from 'node:url';
47
59
  import { couvertPar, engendresDe, regenerer, touchesPar } from '../engendres.mjs';
@@ -250,19 +262,90 @@ export function avancer(copie, cible) {
250
262
  return r.status === 0 ? { ok: true, message: '' } : { ok: false, message: texte(r) };
251
263
  }
252
264
 
265
+ const SOUS_MODULES = path.join(import.meta.dirname, '..', 'sous-modules.sh');
266
+
267
+ /**
268
+ * Prepares <copie> for a pass or a session (see the header, `preparer`): with <cible>, the guard of
269
+ * its submodules and its advance to <cible>; then the pose of its submodules, the check of their
270
+ * read-only mount, and the installation when the lock file is newer than it. The output of each
271
+ * command goes to the file descriptor <sortie>; returns `{ ok, message, partages }`.
272
+ * @param {string} copie
273
+ * @param {string | null} cible
274
+ * @param {{ env?: NodeJS.ProcessEnv, sortie?: number }} [o]
275
+ */
276
+ export function preparer(copie, cible, { env = process.env, sortie = 2 } = {}) {
277
+ // A command of the submodules whose error output is read: kept on <sortie> as well when it
278
+ // succeeds, as the launcher's log kept it.
279
+ const bash = (args, stdio) => {
280
+ const r = spawnSync('bash', [SOUS_MODULES, ...args], {
281
+ env,
282
+ stdio,
283
+ maxBuffer: 64 * 1024 * 1024,
284
+ });
285
+ if (r.status === 0 && r.stderr?.length) writeSync(sortie, r.stderr);
286
+ return r;
287
+ };
288
+ const echec = (r, quoi) => ({
289
+ ok: false,
290
+ message: `⛔ ${quoi} de la copie ${copie} échoue (code ${r.status ?? r.signal}).${r.stderr?.length ? `\n${String(r.stderr).trim()}` : ''}`,
291
+ partages: '',
292
+ });
293
+ if (cible !== null) {
294
+ const g = bash(['garde', copie], ['ignore', sortie, 'pipe']);
295
+ if (g.status !== 0) return echec(g, 'La garde des sous-modules');
296
+ const a = avancer(copie, cible);
297
+ if (!a.ok) return { ...a, partages: '' };
298
+ }
299
+ const p = bash(['pose', copie], ['ignore', 'pipe', 'pipe']);
300
+ if (p.status !== 0) return echec(p, 'La pose des sous-modules');
301
+ // As `$(…)` reads it: the final newlines dropped.
302
+ const partages = String(p.stdout).replace(/\n+$/, '');
303
+ const monter = (...commande) =>
304
+ bash(['monter', copie, '--partages', partages, ...commande], ['ignore', sortie, 'pipe']);
305
+ const m = monter('true');
306
+ if (m.status !== 0) return echec(m, 'Le montage des sous-modules partagés');
307
+ if (existsSync(path.join(copie, 'package.json'))) {
308
+ // As `[ lock -nt installed ]`: the lock newer than the installation, or no installation.
309
+ const verrou = path.join(copie, 'package-lock.json');
310
+ const installe = path.join(copie, 'node_modules', '.package-lock.json');
311
+ const plusRecent =
312
+ existsSync(verrou) &&
313
+ (!existsSync(installe) || statSync(verrou).mtimeMs > statSync(installe).mtimeMs);
314
+ if (!existsSync(path.join(copie, 'node_modules')) || plusRecent) {
315
+ // --no-save leaves the lock file as committed, so a clean copy stays clean.
316
+ const i = monter(
317
+ 'npm',
318
+ '--prefix',
319
+ copie,
320
+ 'install',
321
+ '--no-save',
322
+ '--no-audit',
323
+ '--no-fund',
324
+ '--silent'
325
+ );
326
+ if (i.status !== 0) return echec(i, "L'installation");
327
+ }
328
+ }
329
+ return { ok: true, message: '', partages };
330
+ }
331
+
253
332
  if (process.argv[1] && import.meta.url === pathToFileURL(process.argv[1]).href) {
254
333
  const [geste, copie, ...reste] = process.argv.slice(2);
255
334
  const r =
256
335
  geste === 'reporter' && reste.length === 2
257
336
  ? reporter(copie, { base: reste[0], pointe: reste[1] })
258
- : geste === 'avancer' && reste.length === 1
259
- ? avancer(copie, reste[0])
337
+ : geste === 'preparer' && reste.length <= 1
338
+ ? preparer(copie, reste[0] ?? null)
260
339
  : {
261
340
  ok: false,
262
341
  message:
263
- 'usage: travail-de-la-copie.mjs reporter <copie> <base> <pointe> | avancer <copie> <cible>',
342
+ 'usage: travail-de-la-copie.mjs reporter <copie> <base> <pointe> | preparer <copie> [<cible>]',
264
343
  };
265
- if (r.message) {
344
+ // `preparer` prints the list its pose fixes on stdout, its messages on stderr.
345
+ if (geste === 'preparer') {
346
+ if (r.message) process.stderr.write(`${r.message}\n`);
347
+ process.stdout.write(r.partages ?? '');
348
+ } else if (r.message) {
266
349
  process.stdout.write(`${r.message}\n`);
267
350
  }
268
351
  process.exitCode = r.ok ? 0 : 1;
@@ -252,7 +252,7 @@ const REPONSES =
252
252
  export const MONTEES = Object.fromEntries(
253
253
  Object.entries({
254
254
  lancement:
255
- 'Le lanceur s’arrête avant la séance : la machine se répare-t-elle, pour reprendre ?',
255
+ 'Le lanceur s’arrête avant la séance, ou la copie n’avance pas sur la pointe de main avant une passe : la machine ou la copie se répare-t-elle, pour reprendre ?',
256
256
  bloqué:
257
257
  'La séance n’a plus bougé, et le circuit l’a arrêtée : reprendre l’étape, ou arrêter le circuit ?',
258
258
  'sans-fiche':
@@ -1,4 +1,3 @@
1
- #!/usr/bin/env node
2
1
  // The frame's merge driver of the CHANGELOG, on the model of gnulib's git-merge-changelog: two
3
2
  // lots that each add an entry under the same heading both keep their entry, wherever git merges
4
3
  // three ways (the integration's `git apply --3way --index`, the relaunch's `git apply --3way`, the
@@ -85,9 +85,11 @@
85
85
  // previous version added stays, and `devDependencies` are written sorted by name. The report
86
86
  // names each tool added and `npm install`, which installs them. A project without
87
87
  // `packageManager` receives the template's.
88
- // - What the tools of the declared language write in a project (`ignorer` of its module:
89
- // typescript's `.turbo`, cargo's `target`): a `.gitignore` that does not ignore one receives its
90
- // line, `<nom>/`.
88
+ // - What the frame writes in a project (IGNORES_DU_CADRE: the copies of the tickets,
89
+ // `.claude/worktrees`) and what the tools of the declared language write there (`ignorer` of its
90
+ // module: typescript's `.turbo`, cargo's `target`): a `.gitignore` that does not ignore one
91
+ // receives its line, `<nom>/`. The template's `.gitignore` lists none of them: the update is
92
+ // their one source, for a project `init` creates as for an existing one.
91
93
  // - The binaries of the declared language (`binaires` of its module: cargo's nextest and
92
94
  // cargo-deny), after the files: the command line runs the commands of its module
93
95
  // (`miseAJour.installation`), which list what is installed and install each one missing or at
@@ -181,14 +183,21 @@ const lireJson = (f, defaut) => {
181
183
  }
182
184
  };
183
185
 
184
- // Adds to the `.gitignore` of the project at <projet> each directory its language's tools write
185
- // (`ignorer` of its module: `<nom>/`), when no line ignores it (`<nom>`, `<nom>/`, `/<nom>`,
186
- // `/<nom>/`); its own lines stay.
186
+ /**
187
+ * The directories the frame itself writes in a project, which its `.gitignore` ignores: the
188
+ * copies of the tickets. The template's `.gitignore` lists none of them, nor what the tools of its
189
+ * language write: the update lays both, in a new project as in an existing one.
190
+ */
191
+ export const IGNORES_DU_CADRE = ['.claude/worktrees'];
192
+
193
+ // Adds to the `.gitignore` of the project at <projet> each directory the frame writes
194
+ // (IGNORES_DU_CADRE) and each its language's tools write (`ignorer` of its module), as `<nom>/`,
195
+ // when no line ignores it (`<nom>`, `<nom>/`, `/<nom>`, `/<nom>/`); its own lines stay.
187
196
  function ignorer(projet) {
188
197
  const f = path.join(projet, '.gitignore');
189
198
  let texte = existsSync(f) ? readFileSync(f, 'utf8') : '';
190
199
  const avant = texte;
191
- for (const nom of langageDe(projet).ignorer) {
200
+ for (const nom of [...IGNORES_DU_CADRE, ...langageDe(projet).ignorer]) {
192
201
  const lignes = texte.split('\n').map(l => l.trim());
193
202
  if ([nom, `${nom}/`, `/${nom}`, `/${nom}/`].some(l => lignes.includes(l))) {
194
203
  continue;
@@ -39,8 +39,8 @@
39
39
  // the relaunch of its ticket (scripts/enveloppe/lancer.sh);
40
40
  // - a branch whose replay cannot be done (the copy does not get ready, main does not take the
41
41
  // branch, the main tree holds a file of the lot), or whose `npm run verifier` is « à repasser »
42
- // once replaced (75: a failure of duration under load, which found no rest in its bound,
43
- // scripts/langages/typescript/verifier.mjs; neither green nor red), stays in the queue, the reason written to its
42
+ // once replaced (75: the wait for the lock of the machine reached its bound,
43
+ // scripts/verrou-de-machine.mjs; neither green nor red), stays in the queue, the reason written to its
44
44
  // ticket, which is neither reopened nor closed, and the queue goes on; the next queue takes it
45
45
  // again. Any other code than 0 and 75 is red.
46
46
  // At its entry on main, the branch's ticket closes « intégré : <commit> », loses `en-file`, the
@@ -541,7 +541,7 @@ function main(argv) {
541
541
  const t = tester();
542
542
  if (t.status === A_REPASSER) {
543
543
  return {
544
- garde: `son \`npm run verifier\` est à repasser (code ${A_REPASSER}) une fois replacée : un échec de durée sous charge, sans repos dans la borne. Ni vert ni rouge ; la prochaine file la rejoue.`,
544
+ garde: `son \`npm run verifier\` est à repasser (code ${A_REPASSER}) une fois replacée : l'attente de la machine a atteint sa borne. Ni vert ni rouge ; la prochaine file la rejoue.`,
545
545
  };
546
546
  }
547
547
  if (t.status !== 0) {
@@ -44,8 +44,8 @@
44
44
  // main tree when its inputs are unchanged). Green is required: main stays green, and nothing is compared with a base. A test
45
45
  // known red is put in quarantine in the test itself (`it.skip` or `it.fails`, with its
46
46
  // ticket), as a mature continuous integration does; the integration admits none. A
47
- // `npm run verifier` « à repasser » (75: a failure of duration under load, which found no rest
48
- // in its bound, scripts/langages/typescript/verifier.mjs) is neither green nor red: the run stops there, exit 75,
47
+ // `npm run verifier` « à repasser » (75: the wait for the lock of the machine reached its
48
+ // bound, scripts/verrou-de-machine.mjs) is neither green nor red: the run stops there, exit 75,
49
49
  // nothing committed and nothing refused, the lot where it was, for the same command again;
50
50
  // any other code than 0 refuses;
51
51
  // 7. the commit in the copy, its hooks included, under GRILLHOUSE_INTEGRATION=1: a pre-commit
@@ -406,7 +406,7 @@ function main(argv) {
406
406
  const verdict = tester().status;
407
407
  if (verdict === A_REPASSER) {
408
408
  dire(
409
- `⏱ À repasser (code ${A_REPASSER}) : un échec de durée sous charge, sans repos dans la borne. Le lot n'est ni commis ni refusé ; relance la même commande.`
409
+ `⏱ À repasser (code ${A_REPASSER}) : l'attente de la machine a atteint sa borne. Le lot n'est ni commis ni refusé ; relance la même commande.`
410
410
  );
411
411
  return A_REPASSER;
412
412
  }
@@ -240,6 +240,27 @@ export interface Composition {
240
240
  ): { tester: Commande; verifier: Commande; typer: Commande } & Record<string, Commande>;
241
241
  verdict(dossier: string): { rapports: RapportDeTest[]; taches: TacheJouee[] };
242
242
  estUnTest(chemin: string, racine: string): ClasseDeTest;
243
+ /** The sibling of HEAD's version of the test file `chemin` (from `racine`), from the root: a
244
+ * file beside it, a test the module's tool plays in the same run as it, its tests named in the
245
+ * run's report as the file's, of its class (day, night, bench), which the proof of the red
246
+ * writes, plays and removes; null for a file the tool cannot play twice in a run (cargo: a
247
+ * target `tests/<dossier>/main.rs`, a unit test of `src/`: `testsDeHead`) or does not play. */
248
+ soeurDAvant(chemin: string, racine: string): string | null;
249
+ /** The names of the tests of HEAD's version of the test file `chemin` (from `racine`), as the
250
+ * verdict names them, read without playing them, for a file that has no sibling because the
251
+ * tool cannot play two versions of it in one run (cargo: a unit test of `src/`, a target
252
+ * `tests/<dossier>/main.rs`, its out-of-line modules read too); the proof of the red holds each
253
+ * for a green HEAD already holds. `lire` gives HEAD's text of a file from the root, null for
254
+ * none. With `sansSoeur`, the names of a file whose sibling the proof does not play, because
255
+ * it breaks the build of its package while the lot alone builds (cargo: a target
256
+ * `tests/<nom>.rs` whose HEAD's version no longer compiles against the lot's `tests/common`,
257
+ * grillhouse-3e2.2). Null for any other file, or one HEAD does not hold. */
258
+ testsDeHead(
259
+ chemin: string,
260
+ racine: string,
261
+ lire: (fichier: string) => string | null,
262
+ options?: { sansSoeur?: boolean }
263
+ ): string[] | null;
243
264
  manifestes: Manifestes;
244
265
  fichiersEngendres(racine: string): FichierEngendre[];
245
266
  gardes(racine: string): string[][];
@@ -262,17 +283,22 @@ export interface Langage extends Composition {
262
283
  * and its text (its manifest, the configuration of its tests and of its typing, a file of code,
263
284
  * its folder of tests), which the core writes where absent; `espace`, the manifest of the
264
285
  * workspace with the package's entry, from the root and its new text, null when it holds it
265
- * already; `verrouiller`, the command, run in `dossier` (from the root), that brings the lock of
266
- * the versions in line with the new package. `modele`: the package.json of the module's template
267
- * (`miseAJour.gabarit`), the versions of its tools. Throws, named, for a path where the module
268
- * holds no package. */
286
+ * already; `verrouiller`, the commands, each run in its `dossier` (from the root) in their order,
287
+ * that bring the lock of the versions in line with the new package, as `uv add -r` takes the
288
+ * dependencies a file declares. `modele`: the package.json of the module's template
289
+ * (`miseAJour.gabarit`), the versions of its tools; `existants`: the files the folder already
290
+ * holds, from it, its docs/, its hidden entries and the directories the sources of the project
291
+ * leave out (`hors` of scripts/sources.mjs: node_modules, dist, each `ignorer`) left out, which the
292
+ * skeleton takes as they are (as `cargo init` takes the code in place). Throws, named, for a
293
+ * path where the module holds no package, and for a folder whose files it cannot take, what is
294
+ * missing named. */
269
295
  squelette(
270
296
  racine: string,
271
- o: { chemin: string; modele: Record<string, unknown> }
297
+ o: { chemin: string; modele: Record<string, unknown>; existants: string[] }
272
298
  ): {
273
299
  fichiers: Record<string, string>;
274
300
  espace: { fichier: string; texte: string } | null;
275
- verrouiller: { commande: string; args: string[]; dossier: string };
301
+ verrouiller: { commande: string; args: string[]; dossier: string }[];
276
302
  };
277
303
  }
278
304
 
@@ -314,13 +340,9 @@ export function ouvrirAvancement(o: {
314
340
  export function inscrireLePlan(dossier: string, o: { racine: string; taches: unknown[] }): void;
315
341
  /** Keeps the total of a pass that ended, for the next one's measure. */
316
342
  export function garderLeTotal(dossier: string, racine: string): void;
317
- /** Writes the measure of a pass. */
318
- export function ecrireLaMesure(o: {
319
- env?: NodeJS.ProcessEnv;
320
- depot: string;
321
- commande: string;
322
- dossier: string;
323
- }): void;
343
+ /** Names the progress directory of the measure that holds the lock of the machine under `env`,
344
+ * beside the lock (scripts/verrou-de-machine.mjs); the function that takes it out. */
345
+ export function nommerLAvancement(o: { env?: NodeJS.ProcessEnv; dossier: string }): () => void;
324
346
  /** Opens the base of a pass of the kind `genre` (scripts/mesure/base-de-passe.mjs). */
325
347
  export function ouvrirBase(genre: string, o?: { dans?: string }): unknown;
326
348
  /** Whether `chemin` lies in a temporary directory under `env` (scripts/mesure/base-de-passe.mjs). */
@@ -345,14 +367,10 @@ export function retirerALInterruption(retirer: () => void): () => void;
345
367
  export const SEUIL_PRESSION: number;
346
368
  /** The exit code of a pass « à repasser ». */
347
369
  export const A_REPASSER: number;
348
- /** The longest wait for the rest of the machine, in milliseconds. */
349
- export const BORNE_ATTENTE_MS: number;
350
370
  /** The pressure of the processor, in percent, or null when it cannot be read. */
351
371
  export function lirePression(fichier?: string): number | null;
352
372
  /** The pressure `p` as a line says it. */
353
373
  export function ecrirePression(p: number | null): string;
354
- /** Waits for the rest of the machine, within its bound. */
355
- export function attendreLeRepos(o?: Record<string, unknown>): unknown;
356
374
  /** The variable naming the files changed since the last green (scripts/dernier-vert.mjs). */
357
375
  export const CHANGEMENTS: string;
358
376
  /** The variable naming the commit of the last green a run measures itself from. */
@@ -371,6 +389,10 @@ export function attendreDeLaPlace(o?: Record<string, unknown>): void;
371
389
  /** The source files of the project at `racine` under `dossier`, as paths from `racine`, what the
372
390
  * tools of its language write left out (scripts/sources.mjs). */
373
391
  export function sources(racine: string, dossier?: string): string[];
392
+ /** What `lire` returns, read once under `cle` while the core holds a scope of readings done once
393
+ * (a sweep that asks many questions of a tree that does not move), at each call otherwise
394
+ * (scripts/lecture-unique.mjs). */
395
+ export function luUneFois<T>(cle: string, lire: () => T): T;
374
396
  /** True when the text of a ticket's comment is an arbitrage (scripts/arbitrages.mjs). */
375
397
  export function estArbitrage(text: string | null | undefined): boolean;
376
398
  /** True when the arbitrage `a` of `comments` is settled. */