@roomi-fields/grillhouse 0.24.13 → 0.24.15
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/cadre/templates/projet/.eslintrc.cjs +3 -1
- package/cadre/templates/projet/CLAUDE.md +1 -1
- package/cadre/templates/projet/_npmignore +1 -1
- package/cadre/templates/projet/package.json +3 -3
- package/cadre/templates/projet/tsconfig.build.json +14 -0
- package/cadre/templates/projet/tsconfig.json +6 -8
- package/cadre/templates/turbo/paquets.json +4 -0
- package/cadre/templates/turbo/sans-paquets.json +4 -0
- package/charte.md +4 -4
- package/docs/ARCHITECTURE.md +80 -3
- package/package.json +10 -2
- package/scripts/circuit.mjs +167 -53
- package/scripts/enveloppe/lancer.sh +28 -8
- package/scripts/etapes.mjs +1 -1
- package/scripts/grillhouse-maj.mjs +55 -5
- package/scripts/integration/integrer.mjs +89 -6
- package/scripts/turbo-des-paquets.mjs +80 -14
- package/scripts/verifier.mjs +6 -3
- package/scripts/vitest-config/changements.mjs +3 -1
- package/skills/developpeur/SKILL.md +7 -4
- package/skills/grill/SKILL.md +4 -3
- package/skills/pitmaster/SKILL.md +4 -1
- package/skills/pitmaster/references/consigne-agent.md +1 -1
- package/skills/testwriter/SKILL.md +10 -1
- package/cadre/templates/projet/tsconfig.eslint.json +0 -9
|
@@ -55,16 +55,26 @@
|
|
|
55
55
|
// `node scripts/integration/gardes.mjs`); what remains is the project's own guards, which move to
|
|
56
56
|
// `gardes` when the project has none (the report says so), else stay where nothing plays them
|
|
57
57
|
// (the report names both); nothing remaining, the script goes.
|
|
58
|
+
// - The typing: each package of TypeScript (a `tsconfig.json`) that has no `typecheck` script
|
|
59
|
+
// receives the template's, `tsc -p tsconfig.json --noEmit` (its tsconfig.json types its sources
|
|
60
|
+
// and its tests, nothing emitted, as the template's does; its tsconfig.build.json builds), as a
|
|
61
|
+
// package of the examples of create-turbo types itself (`check-types`): each package of the frame
|
|
62
|
+
// in a project with `workspaces` (a package out of the frame is not touched, the root's
|
|
63
|
+
// `typecheck` stays the project's), the root in a project without. `npm run verifier` plays it,
|
|
64
|
+
// the task `typecheck` of Turborepo, which the generator keeps in the root's turbo.json
|
|
65
|
+
// (scripts/turbo-des-paquets.mjs). The report names the packages that received it. Witness:
|
|
66
|
+
// BPScript 320.21.4, whose type errors in test/ showed only at night.
|
|
58
67
|
// - `turbo.json` is the project's own file, as every repository run by Turborepo writes its own. A
|
|
59
68
|
// project with a `package.json` and no `turbo.json` receives the frame's template of its form:
|
|
60
69
|
// `templates/turbo/paquets.json` when its `package.json` declares
|
|
61
70
|
// `workspaces` (the tasks of each package, and the root's guards, `//#grillhouse:gardes` and
|
|
62
|
-
// `//#gardes
|
|
63
|
-
// package is set by its own
|
|
64
|
-
// `templates/turbo/sans-paquets.json` (`build`, then the
|
|
71
|
+
// `//#gardes`, and `typecheck`, after the build of each package and of its dependencies; the
|
|
72
|
+
// tests live in the packages, the root has no `test:vitest`; the `build` of each package is set by its own
|
|
73
|
+
// generated `turbo.json`, below), else `templates/turbo/sans-paquets.json` (`build`, then the
|
|
74
|
+
// guards, the tests and `typecheck` beside each other).
|
|
65
75
|
// A `turbo.json` present is never written again by the update; only the generator of the
|
|
66
76
|
// packages' turbo.json (below) writes in it the `dependsOn` of the guard tasks, and adds one it
|
|
67
|
-
// lacks.
|
|
77
|
+
// lacks, and the typing task.
|
|
68
78
|
// - The tools the frame's checks run as commands (dependency-cruiser, knip, Turborepo) are added
|
|
69
79
|
// to the project's `devDependencies` at the version the template's `devDependencies` give; a
|
|
70
80
|
// tool the project already declares in `dependencies`, `devDependencies` or
|
|
@@ -89,7 +99,7 @@
|
|
|
89
99
|
// the range the template's package.json declares for `vitest`. Where the root resolves no Vitest or
|
|
90
100
|
// another version, the project's scripts stay (the frame's included) and the report names the
|
|
91
101
|
// version found and the range required. A `test` that runs anything else stays. The scripts of
|
|
92
|
-
// the packages of a monorepo are not written.
|
|
102
|
+
// the packages of a monorepo are not written, but their `typecheck` (above).
|
|
93
103
|
// - The frame's base configuration of Vitest is the package's (`@roomi-fields/grillhouse/vitest-config`,
|
|
94
104
|
// scripts/vitest-config/), which each Vitest configuration imports by its name
|
|
95
105
|
// (`import base from '@roomi-fields/grillhouse/vitest-config'`), as the examples of Turborepo
|
|
@@ -156,6 +166,7 @@ import { migrer, restesAuProjet } from './migrations.mjs';
|
|
|
156
166
|
import { CODE, TESTS } from './frontieres.mjs';
|
|
157
167
|
import { paquets } from './paquets.mjs';
|
|
158
168
|
import { sources } from './sources.mjs';
|
|
169
|
+
import { TYPAGE } from './turbo-des-paquets.mjs';
|
|
159
170
|
|
|
160
171
|
const SCRIPTS = {
|
|
161
172
|
tableau: 'grillhouse tableau --texte',
|
|
@@ -328,6 +339,38 @@ function poserConfigVitest(projet, p) {
|
|
|
328
339
|
return declarants.length > 0 ? { nom: PAQUET_DU_CADRE, paquets: declarants } : null;
|
|
329
340
|
}
|
|
330
341
|
|
|
342
|
+
// Gives the typing script of the template, <script> (`tsc -p tsconfig.json --noEmit`: its
|
|
343
|
+
// tsconfig.json types its sources and its tests, nothing emitted), to each package of TypeScript
|
|
344
|
+
// (a `tsconfig.json`) of the project at <projet> (root package.json <p>) that has no `typecheck`:
|
|
345
|
+
// each package of the frame in a project of packages, written in its package.json (a package out
|
|
346
|
+
// of the frame is not touched, and the root's `typecheck` stays the project's); the root itself in
|
|
347
|
+
// a project without packages, set in <p>, which the caller writes. `npm run verifier` plays it, a
|
|
348
|
+
// task of Turborepo (scripts/turbo-des-paquets.mjs). Returns { script, paquets } (paquets: each
|
|
349
|
+
// package's directory, `.` for the root), or null when nothing changes.
|
|
350
|
+
function poserTypage(projet, p, script) {
|
|
351
|
+
if (typeof script !== 'string') return null;
|
|
352
|
+
const types = dossier => existsSync(path.join(projet, dossier, 'tsconfig.json'));
|
|
353
|
+
const sans = pkg => typeof pkg.scripts?.[TYPAGE] !== 'string';
|
|
354
|
+
const declarants = [];
|
|
355
|
+
if (p.workspaces === undefined) {
|
|
356
|
+
if (types('.') && sans(p)) {
|
|
357
|
+
p.scripts = { ...(p.scripts ?? {}), [TYPAGE]: script };
|
|
358
|
+
declarants.push('.');
|
|
359
|
+
}
|
|
360
|
+
} else {
|
|
361
|
+
for (const { dossier, pkg, hors } of paquets(projet)) {
|
|
362
|
+
if (hors || !types(dossier) || !sans(pkg)) continue;
|
|
363
|
+
pkg.scripts = { ...(pkg.scripts ?? {}), [TYPAGE]: script };
|
|
364
|
+
writeFileSync(
|
|
365
|
+
path.join(projet, dossier, 'package.json'),
|
|
366
|
+
`${JSON.stringify(pkg, null, 2)}\n`
|
|
367
|
+
);
|
|
368
|
+
declarants.push(dossier);
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
return declarants.length > 0 ? { script, paquets: declarants } : null;
|
|
372
|
+
}
|
|
373
|
+
|
|
331
374
|
// Writes the frame's status line in the settings of the project at <projet>, when they exist and
|
|
332
375
|
// hold none or the frame's (see the header); their other keys keep their order. Returns whether
|
|
333
376
|
// they changed.
|
|
@@ -386,6 +429,7 @@ export function mettreAJour(projet, source, { inscrite = VERSION } = {}) {
|
|
|
386
429
|
turbo: null,
|
|
387
430
|
configVitest: null,
|
|
388
431
|
dependanceDuCadre: null,
|
|
432
|
+
typage: null,
|
|
389
433
|
gardes: null,
|
|
390
434
|
ligneEtat: false,
|
|
391
435
|
greffon: false,
|
|
@@ -486,6 +530,7 @@ export function mettreAJour(projet, source, { inscrite = VERSION } = {}) {
|
|
|
486
530
|
}
|
|
487
531
|
bilan.dependanceDuCadre = declarerDependanceDuCadre(projet, p);
|
|
488
532
|
bilan.configVitest = poserConfigVitest(projet, p);
|
|
533
|
+
bilan.typage = poserTypage(projet, p, pkgSource.scripts?.[TYPAGE]);
|
|
489
534
|
writeFileSync(pkg, `${JSON.stringify(p, null, 2)}\n`);
|
|
490
535
|
}
|
|
491
536
|
bilan.turbo = poserTurbo(projet, source);
|
|
@@ -550,6 +595,11 @@ export function rapport(b) {
|
|
|
550
595
|
`Dépendance d'exécution : ${nom} déclaré dans les dependencies de ${declarants.join(', ')}, dont le code hors des tests importe une entrée du paquet. \`npm install\` relie le paquet.`
|
|
551
596
|
);
|
|
552
597
|
}
|
|
598
|
+
if (b.typage) {
|
|
599
|
+
lignes.push(
|
|
600
|
+
`Typage : \`${b.typage.script}\` écrit dans ${b.typage.paquets.join(', ')} (le script typecheck, ses sources et ses tests, que son tsconfig.json inclut) ; \`npm run verifier\` le joue à côté des gardes et des tests.`
|
|
601
|
+
);
|
|
602
|
+
}
|
|
553
603
|
if (b.turbo) {
|
|
554
604
|
lignes.push(
|
|
555
605
|
`turbo.json écrit depuis le gabarit du cadre ${b.turbo} ; il est au projet, la mise à jour n'y touche plus.`
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
// common directory.
|
|
8
8
|
//
|
|
9
9
|
// npx grillhouse integrer --ticket <id>
|
|
10
|
-
// [--tests <patch>] [--code <patch>] --message <file>
|
|
10
|
+
// [--tests <patch>] [--code <patch>] --message <file> [--references <file>]
|
|
11
11
|
//
|
|
12
12
|
// One delivery is one ticket: the ticket gives its branch `agent/<ticket>` and its copy
|
|
13
13
|
// (`.claude/worktrees/<ticket>`, the one the lot was written in, when it exists); a second
|
|
@@ -26,11 +26,13 @@
|
|
|
26
26
|
// 4. a clean integration copy (`.claude/worktrees/integration`) on HEAD, made ready by the
|
|
27
27
|
// replay (scripts/integration/rejeu.mjs: submodules by scripts/sous-modules.sh, dependencies
|
|
28
28
|
// in agreement with the lock file and the manifests, mounts);
|
|
29
|
-
// 5. the lots, applied in three ways in the copy, tests first
|
|
29
|
+
// 5. the lots, applied in three ways in the copy, tests first, without the files a reference
|
|
30
|
+
// writes in full; the files of the lot in the
|
|
30
31
|
// ticket's copy are compared with the copy's own base plus the lot, not with the integration
|
|
31
32
|
// copy. Once the lots are in the copy, the replay makes the dependencies agree with the lock
|
|
32
33
|
// file and the manifests the lot leaves (`npm ci`, as the continuous integration runs it); an
|
|
33
34
|
// install that fails refuses the lot, « Les dépendances de la copie ne s'installent pas. »;
|
|
35
|
+
// then the references regenerate (below);
|
|
34
36
|
// 6. the tests: `npm run verifier` in the copy, one command (Turborepo: the build, then the
|
|
35
37
|
// guards, the frame's and the project's own (its root script `gardes`), and every test of the
|
|
36
38
|
// day beside each other, each task replayed from the cache of the
|
|
@@ -52,6 +54,19 @@
|
|
|
52
54
|
// `en-file` and the branch takes its place at the end of the queue
|
|
53
55
|
// (scripts/integration/file-attente.mjs). main does not move here.
|
|
54
56
|
//
|
|
57
|
+
// The references are the circuit's (`--references`, a JSON file the circuit writes from its one
|
|
58
|
+
// list, `lesReferences` of scripts/circuit.mjs): each `{ nom, commande, fichiers, entiers, cadre }`,
|
|
59
|
+
// `entiers` the files of `fichiers` its command writes in full (paths, directories or glob
|
|
60
|
+
// patterns, as `couvertPar` reads them). As a genrule of Bazel writes its output again on the
|
|
61
|
+
// merged tree, and npm install writes package-lock.json again after a merge, a file of the lot a
|
|
62
|
+
// reference writes in full is not applied: the reference that writes it plays in the copy, on main
|
|
63
|
+
// of the moment, after the install and before the tests, through the mounts, and what it writes
|
|
64
|
+
// enters the commit (BPScript 320.30: refused twice for the one conflict on the index of the
|
|
65
|
+
// interfaces, which another ticket had regenerated on main in the meantime). A command of the
|
|
66
|
+
// project at another code than 0, one of the frame on a real failure (126, 127, a signal), or a
|
|
67
|
+
// file it changes that its `fichiers` do not cover, refuses the lot. A conflict on any other file
|
|
68
|
+
// refuses it, as the three-way application says.
|
|
69
|
+
//
|
|
55
70
|
// What steps 2, 3 and 5 read of a lot is its files: each file added, modified or deleted, a
|
|
56
71
|
// rename counting its source and its destination (named as the file is, not as git quotes it in
|
|
57
72
|
// the patch), a copy its destination only. Step 2 judges them against the testwriter's files, step 3
|
|
@@ -101,6 +116,16 @@ function nomDeGit(ecrit) {
|
|
|
101
116
|
return Buffer.from(octets).toString('utf8');
|
|
102
117
|
}
|
|
103
118
|
|
|
119
|
+
// Whether one of <motifs> covers the file <fichier>, both from the root of the copy, as the
|
|
120
|
+
// inputs of Turborepo read them: a path names that file, a directory every file under it, a glob
|
|
121
|
+
// pattern (`*`, `**`) the files it matches (`path.matchesGlob` of Node).
|
|
122
|
+
export function couvertPar(motifs, fichier) {
|
|
123
|
+
return motifs.some(m => {
|
|
124
|
+
const dossier = m.replace(/\/+$/, '');
|
|
125
|
+
return fichier === dossier || fichier.startsWith(`${dossier}/`) || path.matchesGlob(fichier, m);
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
|
|
104
129
|
// The refusal for the verdicts of one ticket, or null. `ticket` and `comments` are Beads' JSON.
|
|
105
130
|
export function refusVerdicts(ticket, comments) {
|
|
106
131
|
const id = ticket.id;
|
|
@@ -145,7 +170,7 @@ export function refusLots(tests, code, racine) {
|
|
|
145
170
|
|
|
146
171
|
// The options, or { faute } for a usage error.
|
|
147
172
|
function lire(argv) {
|
|
148
|
-
const o = { ticket: null, tests: null, code: null, message: null };
|
|
173
|
+
const o = { ticket: null, tests: null, code: null, message: null, references: null };
|
|
149
174
|
for (let i = 0; i < argv.length; i++) {
|
|
150
175
|
const v = argv[i + 1];
|
|
151
176
|
switch (argv[i]) {
|
|
@@ -169,6 +194,10 @@ function lire(argv) {
|
|
|
169
194
|
o.message = v;
|
|
170
195
|
i++;
|
|
171
196
|
break;
|
|
197
|
+
case '--references':
|
|
198
|
+
o.references = v;
|
|
199
|
+
i++;
|
|
200
|
+
break;
|
|
172
201
|
default:
|
|
173
202
|
return { faute: null };
|
|
174
203
|
}
|
|
@@ -209,11 +238,47 @@ function differents(copieTicket, lots, fichiers, tmp) {
|
|
|
209
238
|
return r.stdout.split('\0').filter(Boolean);
|
|
210
239
|
}
|
|
211
240
|
|
|
241
|
+
// The regeneration of the references <refs> in the integration copy <copie>, each command run by
|
|
242
|
+
// the shell at its root through the mounts (`monter`), its output written; then every file they
|
|
243
|
+
// changed staged. Null, or the refusal: a command of the project at another code than 0, one of
|
|
244
|
+
// the frame on a real failure (126, 127, a signal, 128 + its number), a file changed that their
|
|
245
|
+
// `fichiers` do not cover.
|
|
246
|
+
function regenerer(copie, refs, monter, dansCopie) {
|
|
247
|
+
for (const r of refs) {
|
|
248
|
+
const x = spawnSync('bash', monter('sh', '-c', r.commande), {
|
|
249
|
+
cwd: copie,
|
|
250
|
+
encoding: 'utf8',
|
|
251
|
+
maxBuffer: 256 * 1024 * 1024,
|
|
252
|
+
});
|
|
253
|
+
process.stdout.write(`${x.stdout ?? ''}${x.stderr ?? ''}`);
|
|
254
|
+
const code = x.status ?? 1;
|
|
255
|
+
const panne =
|
|
256
|
+
x.signal !== null || x.error !== undefined || code === 126 || code === 127 || code > 128;
|
|
257
|
+
if (panne || (!r.cadre && code !== 0)) {
|
|
258
|
+
return `La référence « ${r.nom} » (\`${r.commande}\`) rend le code ${code} dans la copie d'intégration.`;
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
const etat = dansCopie('status', '--porcelain=v1', '-z', '-uall', '--no-renames');
|
|
262
|
+
if (etat.status !== 0) return "L'état de la copie d'intégration ne se lit pas.";
|
|
263
|
+
const ecrits = etat.stdout
|
|
264
|
+
.split('\0')
|
|
265
|
+
.filter(l => l && (l[1] !== ' ' || l.startsWith('??')))
|
|
266
|
+
.map(l => l.slice(3));
|
|
267
|
+
const horsDeclaration = ecrits.filter(f => !refs.some(r => couvertPar(r.fichiers, f)));
|
|
268
|
+
if (horsDeclaration.length) {
|
|
269
|
+
return `La régénération des références change des fichiers qu'aucune n'écrit :\n${horsDeclaration.map(f => ` ${f}`).join('\n')}`;
|
|
270
|
+
}
|
|
271
|
+
if (ecrits.length && dansCopie('add', '-A', '--', ...ecrits).status !== 0) {
|
|
272
|
+
return "Les fichiers des références ne s'ajoutent pas au commit.";
|
|
273
|
+
}
|
|
274
|
+
return null;
|
|
275
|
+
}
|
|
276
|
+
|
|
212
277
|
function main(argv) {
|
|
213
278
|
const o = lire(argv);
|
|
214
279
|
if ('faute' in o) {
|
|
215
280
|
process.stderr.write(
|
|
216
|
-
'usage: integrer.mjs --ticket <id> [--tests <patch>] [--code <patch>] --message <file
|
|
281
|
+
'usage: integrer.mjs --ticket <id> [--tests <patch>] [--code <patch>] --message <file> [--references <file>]\n' +
|
|
217
282
|
(o.faute ? `⛔ ${o.faute}\n` : '')
|
|
218
283
|
);
|
|
219
284
|
return 2;
|
|
@@ -276,6 +341,17 @@ function main(argv) {
|
|
|
276
341
|
if (r2) return refuser(r2);
|
|
277
342
|
const fichiers = [...new Set([...tests, ...code])];
|
|
278
343
|
dire(`✓ lots : ${fichiers.length} fichiers`);
|
|
344
|
+
let references = [];
|
|
345
|
+
if (o.references) {
|
|
346
|
+
try {
|
|
347
|
+
references = JSON.parse(readFileSync(absolu(o.references), 'utf8'));
|
|
348
|
+
} catch (e) {
|
|
349
|
+
return refuser(`Les références ${o.references} ne se lisent pas : ${e.message}`);
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
// The files of the lot a reference writes in full, and the references that write them.
|
|
353
|
+
const entiers = fichiers.filter(f => references.some(r => couvertPar(r.entiers, f)));
|
|
354
|
+
const aRegenerer = references.filter(r => entiers.some(f => couvertPar(r.entiers, f)));
|
|
279
355
|
|
|
280
356
|
// 3. The main tree: the lots' files are free there, so the queue can bring them. The ticket's
|
|
281
357
|
// copy holds the lot and nothing else.
|
|
@@ -312,9 +388,11 @@ function main(argv) {
|
|
|
312
388
|
if (ouverte.refus) return refuser(ouverte.refus);
|
|
313
389
|
const { dansCopie, monter, installer, tester } = ouverte;
|
|
314
390
|
|
|
315
|
-
// 5. The lots, applied in the copy, then
|
|
391
|
+
// 5. The lots, applied in the copy without the files a reference writes in full, then
|
|
392
|
+
// installed, then the references regenerated.
|
|
393
|
+
const sansEntiers = entiers.map(f => `--exclude=${f}`);
|
|
316
394
|
for (const p of lots) {
|
|
317
|
-
const r = dansCopie('apply', '--3way', '--index', p);
|
|
395
|
+
const r = dansCopie('apply', '--3way', '--index', ...sansEntiers, p);
|
|
318
396
|
if (r.status !== 0) return refuser(`Le lot ${p} ne s'applique pas :\n${r.stdout}${r.stderr}`);
|
|
319
397
|
}
|
|
320
398
|
const divergents = avecCopie ? differents(copieTicket, lots, fichiers, tmp) : [];
|
|
@@ -326,6 +404,11 @@ function main(argv) {
|
|
|
326
404
|
dire('✓ lots appliqués');
|
|
327
405
|
const installation = installer();
|
|
328
406
|
if (installation) return refuser(installation);
|
|
407
|
+
if (aRegenerer.length) {
|
|
408
|
+
const refus = regenerer(copie, aRegenerer, monter, dansCopie);
|
|
409
|
+
if (refus) return refuser(refus);
|
|
410
|
+
dire(`✓ références régénérées sur main à jour : ${aRegenerer.map(r => r.nom).join(', ')}`);
|
|
411
|
+
}
|
|
329
412
|
|
|
330
413
|
// 6. The tests: the build, the guards and every test of the day, green required.
|
|
331
414
|
dire('— npm run verifier (construction, gardes, tests)');
|
|
@@ -2,13 +2,15 @@
|
|
|
2
2
|
// The `turbo.json` of each package of a repository of packages, generated from its package.json
|
|
3
3
|
// (its dependencies, its build, the paths its tests read and the traces it writes), its
|
|
4
4
|
// configurations of TypeScript, the root's turbo.json and the list of the packages out of the
|
|
5
|
-
// frame; and, in the root's turbo.json, the `dependsOn` of the guard tasks, the
|
|
6
|
-
// the variable of the results directory and the exclusion of a submodule's
|
|
5
|
+
// frame; and, in the root's turbo.json, the `dependsOn` of the guard tasks, the typing task, the
|
|
6
|
+
// `env` of the tests, the variable of the results directory and the exclusion of a submodule's
|
|
7
|
+
// `.git`.
|
|
7
8
|
//
|
|
8
9
|
// npx grillhouse turbo-des-paquets refuses a turbo.json absent or stale, and a
|
|
9
10
|
// declaration of a path read or trace refused (below)
|
|
10
|
-
// npx grillhouse turbo-des-paquets --ecrire writes the
|
|
11
|
-
//
|
|
11
|
+
// npx grillhouse turbo-des-paquets --ecrire writes the guards' dependsOn, the typing task and
|
|
12
|
+
// the tests' env in the root's turbo.json, then the
|
|
13
|
+
// turbo.json of each package, in one pass
|
|
12
14
|
//
|
|
13
15
|
// Turborepo's `^build` waits for the build of every internal package a package declares, its
|
|
14
16
|
// devDependencies included; a package whose tests import a neighbour that depends on it (the
|
|
@@ -119,6 +121,16 @@
|
|
|
119
121
|
// `dependsOn` differs. A repository without a root turbo.json (or turbo.jsonc) has nothing written
|
|
120
122
|
// or refused at its root.
|
|
121
123
|
//
|
|
124
|
+
// The typing of each package (`typecheck`, its script, as `check-types` in the examples of
|
|
125
|
+
// create-turbo), which `npm run verifier` plays beside the guards and the tests: a task of the
|
|
126
|
+
// root's turbo.json (or turbo.jsonc), cached per package, that waits, as `test:vitest`, for the
|
|
127
|
+
// build of its own package (`build`: the tests of BPScript's 990-corpus import its built entry,
|
|
128
|
+
// `990-corpus/test-fixtures`) and, in a repository of packages, for the build of each package its
|
|
129
|
+
// package declares (`^build`), whose types it reads; a package without a `typecheck` script plays
|
|
130
|
+
// none. The generator adds the task the root lacks (`{ dependsOn: ["build", "^build"], outputs:
|
|
131
|
+
// [] }`, `["build"]` without packages), and each of those builds a `dependsOn` of the project's
|
|
132
|
+
// lacks, the rest of the task kept; the check refuses either. Witness: BPScript 320.21.4, whose type errors in test/ showed only at night.
|
|
133
|
+
//
|
|
122
134
|
// The tests of a targeted run: the paths reach Vitest in the variable `GRILLHOUSE_TESTS`
|
|
123
135
|
// (scripts/vitest-config/cibles.mjs, scripts/tests.mjs), which the `env` of the root's
|
|
124
136
|
// `test:vitest` names: it enters the hash of the tests alone, and reaches their process alone
|
|
@@ -171,6 +183,12 @@ export const GARDES = ['grillhouse:gardes', 'gardes'];
|
|
|
171
183
|
const MISE_EN_FORME = { formattingOptions: { insertSpaces: true, tabSize: 2, eol: '\n' } };
|
|
172
184
|
// The test task of a package, and the prefix of a trace task.
|
|
173
185
|
const TESTS = 'test:vitest';
|
|
186
|
+
// The typing task of each package.
|
|
187
|
+
export const TYPAGE = 'typecheck';
|
|
188
|
+
// The builds the typing of a package waits for in <racine>: its own, whose built entry its tests
|
|
189
|
+
// may import (990-corpus/test-fixtures), and, in a repository of packages, those of its
|
|
190
|
+
// dependencies, as `test:vitest`.
|
|
191
|
+
const attenteDuTypage = racine => (paquets(racine).length ? ['build', '^build'] : ['build']);
|
|
174
192
|
// The temporary directory of a process, which names the base of its pass.
|
|
175
193
|
const TEMPORAIRE = 'TMPDIR';
|
|
176
194
|
// The variables the root's `globalPassThroughEnv` names, and why, as the check says it.
|
|
@@ -514,11 +532,18 @@ export function attendus(racine) {
|
|
|
514
532
|
taches.build = {
|
|
515
533
|
dependsOn: internes(pkg, EXECUTION, construits).map(n => `${n}#build`),
|
|
516
534
|
};
|
|
535
|
+
const propres = entreesBuild(racine, dossier, pkg, sm);
|
|
536
|
+
// The files the build reads by name stay its inputs, a reader's declaration never changing
|
|
537
|
+
// them (Bazel: a file is `srcs` of one target and `data` of another): the ones its inputs
|
|
538
|
+
// name, else its package.json and tsconfig*.json.
|
|
539
|
+
const lusParBuild = propres
|
|
540
|
+
? f => propres.includes(f)
|
|
541
|
+
: f => f === 'package.json' || /^tsconfig[^/]*\.json$/.test(f);
|
|
517
542
|
const dedans = donnees
|
|
518
543
|
.filter(d => d !== dossier && sous(d, dossier))
|
|
519
544
|
.map(d => path.posix.relative(dossier, d))
|
|
545
|
+
.filter(d => !lusParBuild(d))
|
|
520
546
|
.sort();
|
|
521
|
-
const propres = entreesBuild(racine, dossier, pkg, sm);
|
|
522
547
|
const sansDonnees = dedans.map(d => `!${d}/**`);
|
|
523
548
|
if (propres) taches.build.inputs = [...racineBuild, ...propres, ...sansDonnees];
|
|
524
549
|
else if (dedans.length) taches.build.inputs = [base('build'), ...sansDonnees];
|
|
@@ -602,6 +627,27 @@ function gardesEcartees(racine) {
|
|
|
602
627
|
return { f, texte, ecarts };
|
|
603
628
|
}
|
|
604
629
|
|
|
630
|
+
// The typing task of the root's turbo.json at <racine> when it lacks it, or when its `dependsOn`
|
|
631
|
+
// lacks one of the builds it waits for (`attenteDuTypage`): { f, chemin, valeur, manques }, the
|
|
632
|
+
// path of the edit and the value it sets (the task, `{ dependsOn, outputs: [] }`; or its
|
|
633
|
+
// `dependsOn`, each build it lacks added to the project's), and the builds it lacks, null for the
|
|
634
|
+
// task absent; null when it holds them, without a root configuration, and when it is no JSON.
|
|
635
|
+
function typageEcarte(racine) {
|
|
636
|
+
const r = confRacine(racine);
|
|
637
|
+
if (!r) return null;
|
|
638
|
+
const attendu = attenteDuTypage(racine);
|
|
639
|
+
const tache = r.conf.tasks?.[TYPAGE];
|
|
640
|
+
if (!tache || typeof tache !== 'object') {
|
|
641
|
+
const valeur = { dependsOn: attendu, outputs: [] };
|
|
642
|
+
return { f: r.f, chemin: ['tasks', TYPAGE], valeur, manques: null };
|
|
643
|
+
}
|
|
644
|
+
const actuel = Array.isArray(tache.dependsOn) ? tache.dependsOn : [];
|
|
645
|
+
const manques = attendu.filter(d => !actuel.includes(d));
|
|
646
|
+
if (!manques.length) return null;
|
|
647
|
+
const chemin = ['tasks', TYPAGE, 'dependsOn'];
|
|
648
|
+
return { f: r.f, chemin, valeur: [...actuel, ...manques], manques };
|
|
649
|
+
}
|
|
650
|
+
|
|
605
651
|
// The `env` the `test:vitest` of the root's turbo.json at <racine> must hold, TESTS_CIBLES added
|
|
606
652
|
// to the project's, when it lacks it: { f, attendu }; null when it holds it, without a root
|
|
607
653
|
// configuration or a `test:vitest` in it, and when it is no JSON.
|
|
@@ -658,17 +704,12 @@ function gitsAbsents(racine) {
|
|
|
658
704
|
return listes.length ? { f: r.f, listes } : null;
|
|
659
705
|
}
|
|
660
706
|
|
|
661
|
-
// Writes the turbo.json of
|
|
662
|
-
//
|
|
707
|
+
// Writes in the root's turbo.json of <racine> the guards' dependsOn, the typing task, the tests' env
|
|
708
|
+
// and the exclusion of a submodule's `.git` beside each input reaching it, then the turbo.json of
|
|
709
|
+
// each package, which derive from the root's tasks: one pass reaches the fixed point. Returns the
|
|
663
710
|
// paths written.
|
|
664
711
|
export function ecrire(racine) {
|
|
665
712
|
const ecrits = [];
|
|
666
|
-
for (const [f, t] of attendus(racine)) {
|
|
667
|
-
const abs = path.join(racine, f);
|
|
668
|
-
if (existsSync(abs) && readFileSync(abs, 'utf8') === t) continue;
|
|
669
|
-
writeFileSync(abs, t);
|
|
670
|
-
ecrits.push(f);
|
|
671
|
-
}
|
|
672
713
|
const racineEcartee = gardesEcartees(racine);
|
|
673
714
|
if (racineEcartee?.ecarts.length) {
|
|
674
715
|
let texte = racineEcartee.texte;
|
|
@@ -681,6 +722,16 @@ export function ecrire(racine) {
|
|
|
681
722
|
writeFileSync(path.join(racine, racineEcartee.f), texte);
|
|
682
723
|
ecrits.push(racineEcartee.f);
|
|
683
724
|
}
|
|
725
|
+
const typage = typageEcarte(racine);
|
|
726
|
+
if (typage) {
|
|
727
|
+
const abs = path.join(racine, typage.f);
|
|
728
|
+
const texte = readFileSync(abs, 'utf8');
|
|
729
|
+
writeFileSync(
|
|
730
|
+
abs,
|
|
731
|
+
applyEdits(texte, modify(texte, typage.chemin, typage.valeur, MISE_EN_FORME))
|
|
732
|
+
);
|
|
733
|
+
if (!ecrits.includes(typage.f)) ecrits.push(typage.f);
|
|
734
|
+
}
|
|
684
735
|
const tests = testsSansVariable(racine);
|
|
685
736
|
if (tests) {
|
|
686
737
|
const abs = path.join(racine, tests.f);
|
|
@@ -707,6 +758,12 @@ export function ecrire(racine) {
|
|
|
707
758
|
writeFileSync(abs, texte);
|
|
708
759
|
if (!ecrits.includes(gits.f)) ecrits.push(gits.f);
|
|
709
760
|
}
|
|
761
|
+
for (const [f, t] of attendus(racine)) {
|
|
762
|
+
const abs = path.join(racine, f);
|
|
763
|
+
if (existsSync(abs) && readFileSync(abs, 'utf8') === t) continue;
|
|
764
|
+
writeFileSync(abs, t);
|
|
765
|
+
ecrits.push(f);
|
|
766
|
+
}
|
|
710
767
|
return ecrits;
|
|
711
768
|
}
|
|
712
769
|
|
|
@@ -837,7 +894,8 @@ function racineRefusee(racine) {
|
|
|
837
894
|
}
|
|
838
895
|
|
|
839
896
|
// The refusals of <racine>: one line per package turbo.json absent or other than generated, per
|
|
840
|
-
// guard task of the root absent or whose dependsOn differs, for a
|
|
897
|
+
// guard task of the root absent or whose dependsOn differs, for a typing task of the root absent
|
|
898
|
+
// or that does not wait for the build of its package and of its dependencies, for a root `test:vitest` whose `env`
|
|
841
899
|
// lacks TESTS_CIBLES, per variable of PASSAGES the root's `globalPassThroughEnv` lacks, per configuration
|
|
842
900
|
// of a package written by hand in the root's turbo.json, and per declaration of data or trace
|
|
843
901
|
// refused.
|
|
@@ -853,6 +911,14 @@ export function verifier(racine) {
|
|
|
853
911
|
`⛔ ${gits.f} : ${ou} \`${e}\` couvre le sous-module \`${m}\` sans exclure son \`.git\`, un fichier qui nomme la copie où il est posé : chaque copie neuve change l'empreinte, et le cache ne sert jamais ; \`${COMMANDE}\` ajoute \`${ligne}\` à côté.`
|
|
854
912
|
);
|
|
855
913
|
}
|
|
914
|
+
const typage = typageEcarte(racine);
|
|
915
|
+
if (typage) {
|
|
916
|
+
refus.push(
|
|
917
|
+
typage.manques
|
|
918
|
+
? `⛔ ${typage.f} : la tâche \`${TYPAGE}\` doit attendre ${typage.manques.map(d => `\`${d}\``).join(' et ')}, la construction du paquet et celle de ses dépendances, dont son typage lit les types ; \`${COMMANDE}\` l'ajoute.`
|
|
919
|
+
: `⛔ ${typage.f} : la tâche \`${TYPAGE}\` manque, le typage de chaque paquet que \`npm run verifier\` joue ; \`${COMMANDE}\` l'ajoute.`
|
|
920
|
+
);
|
|
921
|
+
}
|
|
856
922
|
const tests = testsSansVariable(racine);
|
|
857
923
|
if (tests) {
|
|
858
924
|
refus.push(
|
package/scripts/verifier.mjs
CHANGED
|
@@ -26,8 +26,10 @@
|
|
|
26
26
|
// either way without playing, the holder named. A pass in the frame's own repository is of the
|
|
27
27
|
// second rank: it waits while a project's measure waits too.
|
|
28
28
|
// - Turborepo plays the build, then the guards (the frame's, `grillhouse:gardes`, and the
|
|
29
|
-
// project's own, its root script `gardes`)
|
|
30
|
-
//
|
|
29
|
+
// project's own, its root script `gardes`), the typing of each package (`typecheck`, its
|
|
30
|
+
// sources and its tests, cached per package: scripts/turbo-des-paquets.mjs) and the tests
|
|
31
|
+
// (`test:vitest`) beside each other:
|
|
32
|
+
// `turbo run grillhouse:gardes gardes typecheck test:vitest --continue=dependencies-successful
|
|
31
33
|
// --concurrency=<n> --summarize`, each argument given after it. A red does not stop the pass:
|
|
32
34
|
// every task whose prerequisites passed plays, and each red is named. <n>, the tasks side by
|
|
33
35
|
// side, is half the cores of the machine, one at least (`concurrence`): each task of tests is
|
|
@@ -95,6 +97,7 @@ import { pathToFileURL } from 'node:url';
|
|
|
95
97
|
import { ecrireLaMesure, garderLeTotal, ouvrirAvancement, planifier } from './avancement.mjs';
|
|
96
98
|
import { paquetsDeLEnveloppe } from './enveloppe/paquets-du-plan.mjs';
|
|
97
99
|
import { paquets } from './paquets.mjs';
|
|
100
|
+
import { TYPAGE } from './turbo-des-paquets.mjs';
|
|
98
101
|
import { AttenteDeLaMachine, avecLaMachine } from './verrou-de-machine.mjs';
|
|
99
102
|
import {
|
|
100
103
|
A_REPASSER,
|
|
@@ -110,7 +113,7 @@ import { garderLeVert, mesure } from './dernier-vert.mjs';
|
|
|
110
113
|
import { ouvrirBase } from './vitest-config/base-de-passe.mjs';
|
|
111
114
|
|
|
112
115
|
const GARDES = ['grillhouse:gardes', 'gardes'];
|
|
113
|
-
const TACHES = [...GARDES, 'test:vitest'];
|
|
116
|
+
const TACHES = [...GARDES, TYPAGE, 'test:vitest'];
|
|
114
117
|
const TEMOINS = ' (témoins de temps)';
|
|
115
118
|
const CONCURRENCE = /^--concurrency(?:=|$)/;
|
|
116
119
|
// The variable that names the file of the red tasks, which the night reads.
|
|
@@ -25,7 +25,9 @@
|
|
|
25
25
|
// `vite.config.*`, `vitest.workspace.*`, `tsconfig*.json`; its `setupFiles` and its
|
|
26
26
|
// `globalSetup`, which Vitest runs beside the graph;
|
|
27
27
|
// 5. a path its tests declare they read (`grillhouse.lit` of its package.json, from the top):
|
|
28
|
-
// a script they run, a file they read, as Bazel's `data
|
|
28
|
+
// a script they run, a file they read, as Bazel's `data`, named file by file where the
|
|
29
|
+
// frame rewrites their neighbours (the hooks and configuration of `.beads`, never its
|
|
30
|
+
// journals, `interactions.jsonl`, which each command of bd writes);
|
|
29
31
|
// 6. a file, changed or removed, that the build of a package it depends on reads (its
|
|
30
32
|
// `dependencies`, `devDependencies`, `optionalDependencies` and `peerDependencies` that
|
|
31
33
|
// resolve to a directory of the repository, out of node_modules, transitively): its tests read
|
|
@@ -131,7 +131,9 @@ son adresse) : le circuit la consigne fermée sous ton ticket, et tu continues.
|
|
|
131
131
|
relecteur ouvert pour toi, ou directement sur un plan qui ne porte aucun test (aucun paquet avec
|
|
132
132
|
un script `test:vitest`), sans testwriter ni preuve : une séance qui ne change aucun fichier du
|
|
133
133
|
plan n'a rien à livrer, et ses contrôles rouges arrêtent le circuit (`sans-livraison`) ; ta
|
|
134
|
-
passation dit pourquoi.
|
|
134
|
+
passation dit pourquoi. Lancé après un refus de l'intégration, ton rapport porte ce refus : c'est
|
|
135
|
+
le rouge à lever, que les contrôles de ta copie, verts, ne voient pas ; une séance qui ne change
|
|
136
|
+
rien au lot refusé est relancée une fois avec lui, puis le circuit s'arrête (`sans-livraison`). Tes propres lancements pendant le travail restent les tiens. Ainsi ton
|
|
135
137
|
lot arrive au relecteur vert.
|
|
136
138
|
- **Les références, le circuit les régénère** : les fichiers que ta consigne liste sous « LES
|
|
137
139
|
RÉFÉRENCES QUE LE CIRCUIT RÉGÉNÈRE » se réécrivent à l'étape 4.2, sur la copie entière : l'index
|
|
@@ -145,9 +147,10 @@ son adresse) : le circuit la consigne fermée sous ton ticket, et tu continues.
|
|
|
145
147
|
circuit, et ton code à toi.
|
|
146
148
|
- **Un rouge qui reste dans les tests va au testwriter** : quand le rouge qui reste est dans les
|
|
147
149
|
tests du lot (un test existant que ton changement de type casse), ta fiche porte `renvoi`, le
|
|
148
|
-
rôle testwriter. Le circuit relance le testwriter, ta `raison` et ta passation pour rapport,
|
|
149
|
-
la
|
|
150
|
-
|
|
150
|
+
rôle testwriter. Le circuit relance le testwriter, ta `raison` et ta passation pour rapport, avec
|
|
151
|
+
la sortie rouge des derniers contrôles quand des contrôles ont tourné depuis sa séance, puis la
|
|
152
|
+
preuve et ta séance, sans te relancer sur ce rouge ; le même renvoi deux fois de suite, sur la
|
|
153
|
+
même sortie rouge des contrôles et sans contrôles verts entre eux, l'arrête (`sans-livraison`). Ainsi le rouge va à l'agent qui écrit
|
|
151
154
|
les tests.
|
|
152
155
|
- **Ta séance finit sur ta fiche**, que ton schéma décrit et que le circuit lit seule :
|
|
153
156
|
- `statut` FAIT : ton code est écrit, et les contrôles le jugent ;
|
package/skills/grill/SKILL.md
CHANGED
|
@@ -146,7 +146,8 @@ remplace jamais le grill. Les branches de l'arbre :
|
|
|
146
146
|
données ou code d'un voisin (ses scripts de capture, un fichier de ses sources), comme le `data`
|
|
147
147
|
de Bazel prend tout fichier ; son test les prend en entrée, et la construction du paquet qui
|
|
148
148
|
porte un chemin de données seules le laisse hors des siennes, tandis qu'un chemin qui contient
|
|
149
|
-
du code
|
|
149
|
+
du code, ou un fichier que cette construction lit (son `package.json`, ses `tsconfig*.json`),
|
|
150
|
+
reste dans la construction de son paquet. Une
|
|
150
151
|
trace qu'un étage produit (des grammaires encodées du corpus), comme une genrule de Bazel, vit
|
|
151
152
|
dans le paquet producteur, dans un dossier que git ignore, et se déclare avec ce qu'elle lit
|
|
152
153
|
(`"traces": { "trace:<nom>": { "lit": [...], "ecrit": "<dossier>" } }`, sa commande le script du
|
|
@@ -186,8 +187,8 @@ remplace jamais le grill. Les branches de l'arbre :
|
|
|
186
187
|
(`crontab -e` : `0 3 * * * export PATH=<dossier de Node>:$PATH; cd <racine> && node_modules/.bin/grillhouse nuit`,
|
|
187
188
|
la ligne que propose l'ouverture de séance, avec le dossier du Node qui l'exécute, que la table
|
|
188
189
|
des tâches ne trouve pas seule) : elle rejoue pour de vrai la passe complète, puis les tests de nuit et les bancs de budget, que le jour ne joue pas. Chaque
|
|
189
|
-
intégration joue `npm run verifier` en entier (les gardes
|
|
190
|
-
son cache ce qui n'a pas bougé.
|
|
190
|
+
intégration joue `npm run verifier` en entier (les gardes, le typage de chaque paquet et les
|
|
191
|
+
tests), Turborepo relisant de son cache ce qui n'a pas bougé.
|
|
191
192
|
Restent des choix selon la taille du projet, que le responsable tranche :
|
|
192
193
|
- **le contrôle de l'interface contre le code** (`packages/grillhouse/scripts/interfaces-contre-code.mjs`) : une
|
|
193
194
|
seule passe avant les tests (petit projet), ou un banc par composant qui appelle
|
|
@@ -134,7 +134,10 @@ nomme le responsable, ce qui décide, les documents qu'il valide et les commande
|
|
|
134
134
|
--contexte`, l'étape d'où le ticket entier repart ; `--etendre <paquet>` quand le plan doit
|
|
135
135
|
gagner un paquet (un `hors-plan`, un rouge hors du plan), que le circuit met au titre avant son
|
|
136
136
|
premier lecteur, puis reprend l'étape en cours (celle du testwriter quand le développeur lui a
|
|
137
|
-
renvoyé le rouge) ;
|
|
137
|
+
renvoyé le rouge) ; après un refus de l'intégration (17), `--reprendre` la rejoue sur
|
|
138
|
+
le même lot (la charge, main), et `--depuis developpeur` repart du développeur, le refus comme
|
|
139
|
+
son rapport, quand le lot est en cause ; `--arreter`, son motif en
|
|
140
|
+
`--contexte`, quand le ticket
|
|
138
141
|
doit changer avant tout travail. Une décision du responsable qui change le plan entre dans la
|
|
139
142
|
description du ticket (`bd update <ticket> -d`), que tous les agents lisent, avant que je
|
|
140
143
|
reprenne. 22 (`questionnement`) : des questions du plan restent ouvertes après la réponse de
|
|
@@ -67,7 +67,7 @@ LES RÉFÉRENCES QUE LE CIRCUIT RÉGÉNÈRE à l'étape 4.2, sur la copie entiè
|
|
|
67
67
|
|
|
68
68
|
Ta séance finit sur ta fiche, que ton schéma décrit et que le circuit lit seule ; ta passation au ticket (`bd comments add`) reste, pour l'humain et la séance suivante de ton rôle : ce qui est fait, ce qui ne l'est pas et pourquoi.
|
|
69
69
|
|
|
70
|
-
Testwriter : chaque test vert avant le code entre dans `verts_attendus` (son fichier depuis la racine, son nom complet tel que le rapport de la preuve l'écrit, sa raison) ; pour un fichier de tests que HEAD tient, adapté, dont tous les verts ont une même raison, le fichier et la raison seuls, qui n'excusent aucun rouge et ne valent rien sur un fichier neuf ; quand le ticket change un type ou un nom d'un paquet du plan, tu migres aussi, dans la même séance, la matière de test partagée et les tests du plan qui le lisent. Développeur : quand le rouge qui reste est dans les tests du lot, ta fiche porte `renvoi` (testwriter), et le circuit relance le testwriter, puis la preuve et ta séance ; un critère que tu ne tiens pas parce qu'il demande un paquet hors du plan va dans `hors_plan` (son numéro, ce paquet, sa pièce), même quand ta fiche dit FAIT, et le circuit monte au superviseur à 3 Code ; sur FAIT, ta fiche répond à chaque constat du relecteur ouvert pour toi, par son titre, dans `reponses` (`levé` avec sa `piece`, ou `contesté` avec sa `raison` et sa `piece`), que le relecteur lit sous son constat, et le circuit refuse une fiche à laquelle il en manque une ; un écart que le commit doit nommer va dans `ecarts`, sous son sujet. Ainsi chaque rouge va à l'agent qui le lève.
|
|
70
|
+
Testwriter : chaque test vert avant le code entre dans `verts_attendus` (son fichier depuis la racine, son nom complet tel que le rapport de la preuve l'écrit, sa raison) ; pour un fichier de tests que HEAD tient, adapté, dont tous les verts ont une même raison, le fichier et la raison seuls, qui n'excusent aucun rouge et ne valent rien sur un fichier neuf ; quand le ticket change un type ou un nom d'un paquet du plan, tu migres aussi, dans la même séance, la matière de test partagée et les tests du plan qui le lisent ; tu inscris, dans le même lot, chaque nom de la matière de test partagée que tes tests se mettent à importer, sur la ligne de leur paquet dans la section « Consommateurs » de l'interface du fournisseur. Développeur : quand le rouge qui reste est dans les tests du lot, ta fiche porte `renvoi` (testwriter), et le circuit relance le testwriter, puis la preuve et ta séance, sa consigne portant ta fiche, ta passation et la sortie rouge des derniers contrôles ; un critère que tu ne tiens pas parce qu'il demande un paquet hors du plan va dans `hors_plan` (son numéro, ce paquet, sa pièce), même quand ta fiche dit FAIT, et le circuit monte au superviseur à 3 Code ; sur FAIT, ta fiche répond à chaque constat du relecteur ouvert pour toi, par son titre, dans `reponses` (`levé` avec sa `piece`, ou `contesté` avec sa `raison` et sa `piece`), que le relecteur lit sous son constat, et le circuit refuse une fiche à laquelle il en manque une ; un écart que le commit doit nommer va dans `ecarts`, sous son sujet. Ainsi chaque rouge va à l'agent qui le lève.
|
|
71
71
|
|
|
72
72
|
Le `statut` de ta fiche : FAIT quand ta part est faite ; BLOQUÉ, avec sa `raison`, quand ce qui reste est hors de ta portée (dans les tests, dans la matière de test partagée, dans un fichier hors du plan, ou une décision hors de ton rôle) ; BESOIN, avec sa `question`, quand une réponse te manque pour avancer. Sur BESOIN, ou BLOQUÉ sans `renvoi`, le circuit s'arrête sans te relancer, et ta question monte au superviseur ; une découverte hors des critères va dans `decouvertes`, que le circuit consigne. Ainsi aucune séance ne tourne sur ce que son agent a dit hors de sa portée.
|
|
73
73
|
|
|
@@ -116,12 +116,21 @@ composant rend. Exemple : en 320.2.6 de BPScript, des bancs sur des objets faits
|
|
|
116
116
|
restaient verts alors que la chaîne restait fausse. Ainsi le test mord sur le produit tel qu'il
|
|
117
117
|
tourne.
|
|
118
118
|
|
|
119
|
+
**Ce que tes tests importent se déclare** : tu inscris, dans le même lot, chaque nom de la matière
|
|
120
|
+
de test partagée que tes tests se mettent à importer, sur la ligne de leur paquet dans la section
|
|
121
|
+
« Consommateurs » de l'interface du fournisseur (la ligne `- <paquet> : <noms>`). Cette interface
|
|
122
|
+
appartient au paquet de la matière, donc à toi seul ; la garde des consommateurs refuse le lot qui
|
|
123
|
+
l'omet. Ainsi une dépendance se déclare dans le changement qui l'ajoute, comme le `package.json`
|
|
124
|
+
de npm (BP 320.37 : deux noms neufs importés par les tests de 060-encoder, la ligne non écrite, le
|
|
125
|
+
lot refusé).
|
|
126
|
+
|
|
119
127
|
**Ce que tes tests lisent se déclare** : un test qui lit un fichier hors des imports (des
|
|
120
128
|
scènes, des paires de la matière, la trace d'un autre étage, les scripts ou un source d'un voisin
|
|
121
129
|
qu'il lit ou lance) fait déclarer son chemin, dossier ou fichier, dans le `package.json` de son
|
|
122
130
|
paquet, depuis la racine : `"grillhouse": { "lit": ["<chemin>"] }`. Le test n'est rejoué que si
|
|
123
131
|
son code, ce qu'il importe ou un chemin déclaré change ; un chemin de données seules qu'un autre
|
|
124
|
-
paquet déclare sort de la construction de son paquet, un chemin qui contient du code
|
|
132
|
+
paquet déclare sort de la construction de son paquet, un chemin qui contient du code ou un
|
|
133
|
+
fichier que cette construction lit (son `package.json`, ses `tsconfig*.json`) y reste, et
|
|
125
134
|
un lecteur qui l'omet garde un vert périmé. Le `package.json` d'un paquet de la matière est à toi, comme tout
|
|
126
135
|
ce paquet ; celui d'un autre paquet revient au développeur, et tu nommes ses chemins dans ta
|
|
127
136
|
passation. Ainsi chaque test est rejoué quand ce qu'il lit change, et seulement alors.
|