@roomi-fields/grillhouse 0.50.3 → 0.52.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/plugin.json +1 -1
- package/CHANGELOG.md +68 -0
- package/agents/developpeur.md +1 -1
- package/agents/direct.md +1 -1
- package/agents/explorateur.md +1 -1
- package/agents/questionneur.md +1 -1
- package/agents/relecteur.md +1 -1
- package/agents/testwriter.md +1 -1
- package/cadre/templates/c/package.json +1 -0
- package/cadre/templates/cargo/package.json +1 -0
- package/cadre/templates/python/package.json +1 -0
- package/charte/plan.md +47 -0
- package/charte/preuve.md +39 -0
- package/charte/superviseur.md +61 -0
- package/charte/tests.md +38 -0
- package/charte.md +39 -189
- package/dist/machine/part-par-sorte.d.ts +16 -0
- package/dist/machine/part-par-sorte.js +36 -0
- package/dist/machine/part-par-sorte.js.map +1 -0
- package/dist/temporal/circuit/appel.js +1 -1
- package/dist/temporal/circuit/appel.js.map +1 -1
- package/dist/temporal/circuit/client.d.ts +4 -4
- package/dist/temporal/circuit/client.js +38 -16
- package/dist/temporal/circuit/client.js.map +1 -1
- package/dist/temporal/circuit/contrat.d.ts +11 -7
- package/dist/temporal/circuit/contrat.js +5 -9
- package/dist/temporal/circuit/contrat.js.map +1 -1
- package/dist/temporal/circuit/deroule.js +18 -6
- package/dist/temporal/circuit/deroule.js.map +1 -1
- package/dist/temporal/commande.js +12 -3
- package/dist/temporal/commande.js.map +1 -1
- package/dist/temporal/installation.d.ts +54 -3
- package/dist/temporal/installation.js +187 -17
- package/dist/temporal/installation.js.map +1 -1
- package/dist/temporal/places/client.d.ts +5 -1
- package/dist/temporal/places/client.js +23 -11
- package/dist/temporal/places/client.js.map +1 -1
- package/docs/ARCHITECTURE.md +23 -2700
- package/docs/INTERFACE.md +26 -10
- package/docs/architecture/circuit.md +61 -14
- package/docs/architecture/entree.md +21 -8
- package/docs/architecture/greffon.md +49 -20
- package/docs/architecture/installation.md +46 -17
- package/docs/architecture/machine.md +79 -39
- package/docs/architecture/tests.md +59 -16
- package/docs/lexique.md +163 -0
- package/hooks/hooks.json +0 -10
- package/hooks/register.tsx +92 -4
- package/package.json +2 -1
- package/scripts/activites.mjs +105 -65
- package/scripts/aiguillage.mjs +15 -8
- package/scripts/attente-au-tour.mjs +2 -3
- package/scripts/attente-de-la-machine.mjs +4 -8
- package/scripts/avancement.mjs +12 -8
- package/scripts/bilan.mjs +126 -63
- package/scripts/bilans-gardes.mjs +37 -0
- package/scripts/branche-de-nuit.mjs +2 -2
- package/scripts/ci-de-main.mjs +18 -21
- package/scripts/circuit.mjs +89 -44
- package/scripts/circuits-du-serveur.mjs +5 -5
- package/scripts/composants-affectes.mjs +30 -12
- package/scripts/composition-des-langages.mjs +5 -3
- package/scripts/conformite.mjs +1 -1
- package/scripts/consommation-des-passes.mjs +8 -6
- package/scripts/copies-finies.mjs +3 -14
- package/scripts/depart-du-ticket.d.mts +8 -2
- package/scripts/depart-du-ticket.mjs +26 -8
- package/scripts/direct.mjs +158 -72
- package/scripts/droits.mjs +165 -208
- package/scripts/engendres.mjs +3 -14
- package/scripts/entree-de-seance.mjs +35 -0
- package/scripts/enveloppe/enveloppe.mjs +98 -46
- package/scripts/enveloppe/lancer.sh +90 -66
- package/scripts/enveloppe/paquets-du-plan.mjs +38 -11
- package/scripts/enveloppe/travail-de-la-copie.mjs +192 -3
- package/scripts/etapes.mjs +84 -22
- package/scripts/faits-du-circuit.mjs +8 -2
- package/scripts/grillhouse-maj.mjs +43 -18
- package/scripts/groupe-cles.d.mts +15 -0
- package/scripts/groupe-cles.mjs +77 -2
- package/scripts/init.mjs +9 -2
- package/scripts/integration/rejeu.mjs +8 -1
- package/scripts/jointure.d.ts +24 -4
- package/scripts/langages/c/index.mjs +5 -2
- package/scripts/langages/cargo/commandes.mjs +35 -15
- package/scripts/langages/cargo/composants.mjs +45 -3
- package/scripts/langages/cargo/index.mjs +6 -3
- package/scripts/langages/python/commandes.mjs +50 -7
- package/scripts/langages/python/index.mjs +5 -2
- package/scripts/langages/python/squelette.mjs +2 -1
- package/scripts/langages/typescript/chemins-des-tests.mjs +1 -1
- package/scripts/langages/typescript/index.mjs +16 -14
- package/scripts/langages/typescript/mise-a-jour.mjs +1 -1
- package/scripts/langages/typescript/rapports-aux-lignes.mjs +74 -0
- package/scripts/langages/typescript/turbo-des-paquets.mjs +151 -38
- package/scripts/langages/typescript/verdict.mjs +29 -3
- package/scripts/langages/typescript/verifier.mjs +28 -3
- package/scripts/langages/typescript/vitest-config/changements.mjs +8 -6
- package/scripts/langages/typescript/vitest-config/lances.mjs +15 -32
- package/scripts/langages.mjs +54 -4
- package/scripts/matieres-lues.mjs +1 -1
- package/scripts/mesure/base-de-passe.mjs +32 -90
- package/scripts/migrations/serveurs-de-l-index.mjs +79 -0
- package/scripts/migrations/suivi-du-superviseur-retire.mjs +56 -0
- package/scripts/migrations.mjs +23 -7
- package/scripts/nuit.sh +3 -2
- package/scripts/paquet.mjs +1 -1
- package/scripts/paquets.d.ts +3 -0
- package/scripts/paquets.mjs +88 -1
- package/scripts/passe-de-la-machine.mjs +109 -36
- package/scripts/places-de-la-machine.mjs +81 -29
- package/scripts/plafond-de-la-machine.d.mts +2 -5
- package/scripts/plafond-de-la-machine.mjs +9 -9
- package/scripts/reprise.mjs +42 -13
- package/scripts/resultats.mjs +78 -56
- package/scripts/retirer-les-copies-finies.mjs +1 -1
- package/scripts/seances.mjs +471 -133
- package/scripts/services-du-noyau.mjs +9 -1
- package/scripts/session-start.sh +22 -7
- package/scripts/sortie-de-seance.mjs +70 -0
- package/scripts/sortie.mjs +37 -6
- package/scripts/sous-commandes.mjs +0 -3
- package/scripts/superviseur.mjs +400 -162
- package/scripts/tableau.mjs +188 -65
- package/scripts/transitions.d.mts +25 -2
- package/scripts/transitions.mjs +137 -29
- package/scripts/verrous/ecriture-hors-enveloppe.mjs +31 -9
- package/skills/codebase-design/DESIGN-IT-TWICE.md +1 -1
- package/skills/developpeur/SKILL.md +38 -15
- package/skills/direct/SKILL.md +29 -9
- package/skills/domain-modeling/GLOSSARY-FORMAT.md +9 -9
- package/skills/domain-modeling/SKILL.md +14 -12
- package/skills/explorateur/SKILL.md +32 -8
- package/skills/grill/SKILL.md +3 -2
- package/skills/pitmaster/SKILL.md +80 -50
- package/skills/pitmaster/references/cadre.md +1 -1
- package/skills/pitmaster/references/consigne-agent.md +12 -11
- package/skills/pitmaster/references/tour.md +6 -5
- package/skills/relecteur/SKILL.md +13 -6
- package/skills/systematic-debugging/SKILL.md +281 -0
- package/skills/systematic-debugging/condition-based-waiting-example.ts +158 -0
- package/skills/systematic-debugging/condition-based-waiting.md +115 -0
- package/skills/systematic-debugging/defense-in-depth.md +122 -0
- package/skills/systematic-debugging/find-polluter.sh +72 -0
- package/skills/systematic-debugging/root-cause-tracing.md +169 -0
- package/skills/testwriter/SKILL.md +37 -31
- package/cadre/templates/projet/pitmaster/SUIVI.md +0 -22
- package/scripts/attente-a-l-arret.mjs +0 -114
- package/scripts/verrous/commande.mjs +0 -214
- package/scripts/verrous/verrou.mjs +0 -311
package/scripts/activites.mjs
CHANGED
|
@@ -30,7 +30,7 @@ import { A_REPASSER, MEMOIRE_COUPEE } from './codes-de-sortie.mjs';
|
|
|
30
30
|
import { BASE_DU_LOT, DEPUIS_LE_VERT } from './dernier-vert.mjs';
|
|
31
31
|
import { empreinteDEtape } from './empreinte-d-etape.mjs';
|
|
32
32
|
import { BASE as GARDES_DE_LA_BASE, FICHIER as DETTE } from './dette.mjs';
|
|
33
|
-
import {
|
|
33
|
+
import { optionsDuRole } from './droits.mjs';
|
|
34
34
|
import { cheminsLus } from './composants-affectes.mjs';
|
|
35
35
|
import { couvertPar } from './engendres.mjs';
|
|
36
36
|
import {
|
|
@@ -39,7 +39,8 @@ import {
|
|
|
39
39
|
texteDesDifferences,
|
|
40
40
|
} from './references-changees.mjs';
|
|
41
41
|
import { ecrireLaListe, VARIABLE as VARIABLE_ENVELOPPE } from './enveloppe/paquets-du-plan.mjs';
|
|
42
|
-
import {
|
|
42
|
+
import { inscrireLeLot, rendreLIndex } from './enveloppe/travail-de-la-copie.mjs';
|
|
43
|
+
import { auteurDuCode, etapeDuCircuit, EXPLORATEUR, SUITE } from './etapes.mjs';
|
|
43
44
|
import { gardesDuCadre, nomsDesGardes } from './gardes-du-cadre.mjs';
|
|
44
45
|
import { INTEGRE } from './integration/file.mjs';
|
|
45
46
|
import { lotSurMain, refusLotAbsent } from './integration/integrer.mjs';
|
|
@@ -66,7 +67,7 @@ import {
|
|
|
66
67
|
VERDICTS_DU_TRI,
|
|
67
68
|
VERDICTS_ROUVERTS,
|
|
68
69
|
} from './resultats.mjs';
|
|
69
|
-
import { consigne, idDeSeance, jusquALaFiche } from './seances.mjs';
|
|
70
|
+
import { consigne, consigneDuRelecteurDUnLotDirect, idDeSeance, jusquALaFiche } from './seances.mjs';
|
|
70
71
|
import {
|
|
71
72
|
Arret,
|
|
72
73
|
AUTEUR_DU_CIRCUIT,
|
|
@@ -179,7 +180,8 @@ const bloquants = bloquantsDeLaFiche;
|
|
|
179
180
|
|
|
180
181
|
// The blocking findings <constats>, each under its heading, the criterion or rule it holds, its
|
|
181
182
|
// recipient (or the criterion in question), its body and its piece (an element judged not
|
|
182
|
-
// conforming carries it in its body), then the
|
|
183
|
+
// conforming carries it in its body), then the answer of the author of the code to it, when he
|
|
184
|
+
// gave one: lines.
|
|
183
185
|
const lignesDesConstats = constats =>
|
|
184
186
|
constats.flatMap((c, i) => [
|
|
185
187
|
`### Constat ${i + 1} — ${c.titre}`,
|
|
@@ -189,7 +191,7 @@ const lignesDesConstats = constats =>
|
|
|
189
191
|
...(c.piece ? [`Pièce : ${c.piece}`] : []),
|
|
190
192
|
...(c.reponse
|
|
191
193
|
? [
|
|
192
|
-
`Réponse du développeur : ${c.reponse.etat}${c.reponse.raison ? ` — ${c.reponse.raison}` : ''}`,
|
|
194
|
+
`Réponse ${c.role === 'direct' ? 'de l’agent direct' : 'du développeur'} : ${c.reponse.etat}${c.reponse.raison ? ` — ${c.reponse.raison}` : ''}`,
|
|
193
195
|
`Pièce de la réponse : ${c.reponse.piece}`,
|
|
194
196
|
]
|
|
195
197
|
: []),
|
|
@@ -248,7 +250,11 @@ export function texteDuVerdict(fiche) {
|
|
|
248
250
|
// still open with their recipients.
|
|
249
251
|
export async function relire(
|
|
250
252
|
ctx,
|
|
251
|
-
{
|
|
253
|
+
{
|
|
254
|
+
constats = [],
|
|
255
|
+
consigneDuRelecteur = valeurs =>
|
|
256
|
+
ctx.circuit === 'direct' ? consigneDuRelecteurDUnLotDirect(valeurs) : consigne(valeurs, 1),
|
|
257
|
+
} = {}
|
|
252
258
|
) {
|
|
253
259
|
const { tests, code } = fichiersDuLot(ctx);
|
|
254
260
|
const rapports = rapportsDuCircuit(ctx);
|
|
@@ -603,7 +609,7 @@ export function laPasseFinale(ctx) {
|
|
|
603
609
|
|
|
604
610
|
// The filters of Turborepo the band <restreinte> (`{ avant, apres }`, two lots kept) plays at the
|
|
605
611
|
// final pass: the packages that changed from one to the other and their dependents, each package
|
|
606
|
-
// of <liste> whose tests declare they read a path the band changes (`grillhouse.lit`,
|
|
612
|
+
// of <liste> whose tests declare they read a path the band changes (`grillhouse.lit`, `// @lit`,
|
|
607
613
|
// `cheminsLus`: the `data` of Bazel, which Turborepo's graph does not see) and its dependents, then
|
|
608
614
|
// the root's tasks, the guards.
|
|
609
615
|
export function filtresDeLaBande(ctx, liste, restreinte) {
|
|
@@ -612,7 +618,7 @@ export function filtresDeLaBande(ctx, liste, restreinte) {
|
|
|
612
618
|
.filter(
|
|
613
619
|
p =>
|
|
614
620
|
p.pkg?.name &&
|
|
615
|
-
fichiers.some(f => couvertPar(cheminsLus(path.join(ctx.copie, p.dossier)), f))
|
|
621
|
+
fichiers.some(f => couvertPar(cheminsLus(path.join(ctx.copie, p.dossier), ctx.copie), f))
|
|
616
622
|
)
|
|
617
623
|
.map(p => p.pkg.name)
|
|
618
624
|
.sort();
|
|
@@ -950,9 +956,10 @@ function restaurer(ctx, commit, fichiers) {
|
|
|
950
956
|
|
|
951
957
|
// Whether a proof of the counts <compte> passes: no file of the lot that does not load (one that
|
|
952
958
|
// imports a module the copy does not hold is a red, `casseDeChargement`), no green
|
|
953
|
-
// the sheet names in `portent_le_travail` (`nommes`), and at least one red
|
|
954
|
-
//
|
|
955
|
-
//
|
|
959
|
+
// the sheet names in `portent_le_travail` (`nommes`), and at least one red that proves the work
|
|
960
|
+
// (`rouges`: with test files of the lot played, a red of the lot or of a build; without, the
|
|
961
|
+
// existing reds of the packages played whole too); the greens the sheet does not name and the ones
|
|
962
|
+
// HEAD holds are accepted but prove nothing. Under a plan « comportement tests-adaptés » (<inchange>), nothing has to turn red and every
|
|
956
963
|
// green passes: a proof passes with no file of the lot that does not load, its reds going to the
|
|
957
964
|
// developpeur.
|
|
958
965
|
// The files of the lot that only the night plays (<misDeCote>, `separerLesFichiersDuJour`) are no
|
|
@@ -1199,7 +1206,7 @@ export function integrer(ctx) {
|
|
|
1199
1206
|
// envelope, on Sonnet, in the main tree, under the rights of its role (reading, the build of a
|
|
1200
1207
|
// package, no pass), its instruction from the eighth template (the ticket, its commit on main, the
|
|
1201
1208
|
// one the queue names in the reason it closes the ticket with, `commitIntegre`, its discoveries,
|
|
1202
|
-
// one per line
|
|
1209
|
+
// one per line), its sheet the tri's (`tri` of scripts/resultats.mjs): one line per discovery
|
|
1203
1210
|
// (`conformiteDuTri`), asked again once of the same session. Each verdict is written at the ticket
|
|
1204
1211
|
// of its discovery (`Circuit · tri : <verdict> — <texte> (<piece>)`), its label set there; an
|
|
1205
1212
|
// a-porter or a non-confirmee reopens under `a-valider`, the pane's list « à valider »; the others
|
|
@@ -1241,7 +1248,6 @@ export async function trier(ctx) {
|
|
|
1241
1248
|
sujet: ctx.sujet,
|
|
1242
1249
|
commit: commit || 'inconnu',
|
|
1243
1250
|
decouvertes: decouvertes.map(d => `- ${d.id} — ${d.sujet}`).join('\n'),
|
|
1244
|
-
commandes: commandesPermises(EXPLORATEUR),
|
|
1245
1251
|
},
|
|
1246
1252
|
7
|
|
1247
1253
|
),
|
|
@@ -1330,8 +1336,8 @@ export function commitIntegre(raison) {
|
|
|
1330
1336
|
const TYPES_DE_COMMIT = { bug: 'fix', chore: 'chore', docs: 'docs' };
|
|
1331
1337
|
|
|
1332
1338
|
// The commit message of the lot: `<type>(<paquets>): <sujet> (<ticket>)`, the packages of the
|
|
1333
|
-
// plan by their name; then the message the sheets of the
|
|
1334
|
-
// their order, written once from the final state (`messageDuLot`).
|
|
1339
|
+
// plan by their name; then the message the sheets of the author of the code (the developpeur or
|
|
1340
|
+
// the agent direct) and of the reviewer give, in their order, written once from the final state (`messageDuLot`).
|
|
1335
1341
|
function messageDeCommit(ctx) {
|
|
1336
1342
|
const liste = composantsDe(existsSync(ctx.copie) ? ctx.copie : ctx.racine);
|
|
1337
1343
|
const noms = ctx.paquets.flatMap(c => {
|
|
@@ -1354,7 +1360,7 @@ function messageDeCommit(ctx) {
|
|
|
1354
1360
|
entete: `${type}${portee}: ${ctx.sujet} (${ctx.ticket})`,
|
|
1355
1361
|
description: leTicket(ctx).description,
|
|
1356
1362
|
fiches: lesFiches(ctx)
|
|
1357
|
-
.filter(e =>
|
|
1363
|
+
.filter(e => [auteurDuCode(ctx.circuit), 'relecteur'].includes(e.role))
|
|
1358
1364
|
.map(e => e.fiche),
|
|
1359
1365
|
});
|
|
1360
1366
|
}
|
|
@@ -1470,9 +1476,22 @@ function nommesParLeMessage(message, fichier, dossier, candidats) {
|
|
|
1470
1476
|
);
|
|
1471
1477
|
}
|
|
1472
1478
|
|
|
1473
|
-
// The
|
|
1474
|
-
//
|
|
1475
|
-
//
|
|
1479
|
+
// The files the runner plays for the test files <fichiers> of the copy of <ctx>, as the module of
|
|
1480
|
+
// its language <l> tells it (`estUnTest`): a file it plays itself, or the file that plays it
|
|
1481
|
+
// (`jouePar`, the executable of a module), each once; none for another file.
|
|
1482
|
+
/** @returns {string[]} */
|
|
1483
|
+
const joues = (ctx, l, fichiers) => [
|
|
1484
|
+
...new Set(
|
|
1485
|
+
fichiers.flatMap(f => {
|
|
1486
|
+
const classe = l.estUnTest(f, ctx.copie);
|
|
1487
|
+
return classe?.jouePar ? [classe.jouePar] : classe?.joue ? [f] : [];
|
|
1488
|
+
})
|
|
1489
|
+
),
|
|
1490
|
+
];
|
|
1491
|
+
|
|
1492
|
+
// What the runner plays for the test files of the lot that the testwriter writes, present in the
|
|
1493
|
+
// copy: in the packages of the plan and in the shared test material (`joues`). <langage> reads the
|
|
1494
|
+
// class of a file: the strict join by default, the join of the copy (`langageDeLaCopie`) for the launch of a session, which must
|
|
1476
1495
|
// go on in a copy its tool no longer loads.
|
|
1477
1496
|
// A copy not made yet (the launch of the first session of the testwriter) has no change, and
|
|
1478
1497
|
// the language is read only when a file is to class.
|
|
@@ -1483,19 +1502,17 @@ export function testsDuLot(ctx, langage = langageDe) {
|
|
|
1483
1502
|
if (fichiers.length === 0) {
|
|
1484
1503
|
return [];
|
|
1485
1504
|
}
|
|
1486
|
-
|
|
1487
|
-
return fichiers.filter(f => l.estUnTest(f, ctx.copie)?.joue).sort();
|
|
1505
|
+
return joues(ctx, langage(ctx.copie), fichiers).sort();
|
|
1488
1506
|
}
|
|
1489
1507
|
|
|
1490
|
-
// The files a proof resumed at a red plays:
|
|
1491
|
-
//
|
|
1508
|
+
// The files a proof resumed at a red plays: what the runner of the copy's language plays for the
|
|
1509
|
+
// files the red names <nommes> (`joues`). A red of a guard names what it found, a document among it
|
|
1492
1510
|
// (a line « Consommateurs » of an INTERFACE.md): no test, so nothing for the proof to play.
|
|
1493
1511
|
export function testsDeLaReprise(ctx, nommes, langage = langageDe) {
|
|
1494
1512
|
if (nommes.length === 0) {
|
|
1495
1513
|
return [];
|
|
1496
1514
|
}
|
|
1497
|
-
|
|
1498
|
-
return nommes.filter(f => l.estUnTest(f, ctx.copie)?.joue);
|
|
1515
|
+
return joues(ctx, langage(ctx.copie), nommes);
|
|
1499
1516
|
}
|
|
1500
1517
|
|
|
1501
1518
|
// The package directory of the copy that holds <fichier>, or « . ».
|
|
@@ -1507,7 +1524,8 @@ function paquetDe(liste, fichier) {
|
|
|
1507
1524
|
// One npm command in the copy, under <env> added to the circuit's environment, its results written
|
|
1508
1525
|
// to a directory of its own (RESULTATS, scripts/resultats.mjs: the summaries of Turborepo, the
|
|
1509
1526
|
// JSON reports of Vitest, the SARIF of the guards), its output added to the log for the human:
|
|
1510
|
-
// `{ code, dossier }`. The circuit reads its results
|
|
1527
|
+
// `{ code, dossier }`. The circuit reads its results by the verdict of the language, never its
|
|
1528
|
+
// output; a runner without a report test by test is read there, from the log of its task. Every pass (the proof of
|
|
1511
1529
|
// the red, the checks, the final pass `npm run verifier`) takes its part of the budget of the
|
|
1512
1530
|
// machine (`avecLaPasse` of scripts/passe-de-la-machine.mjs) and plays held to it, in a control
|
|
1513
1531
|
// group of its own, its command launched by the circuit (`lancementSousPart`); it passes the mark
|
|
@@ -1549,11 +1567,20 @@ function npm(ctx, etape, args, env = {}, cwd = ctx.copie) {
|
|
|
1549
1567
|
...(args[0] === 'test' || args[1] === 'verifier' ? mesureDesPasses(ctx) : {}),
|
|
1550
1568
|
})
|
|
1551
1569
|
);
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
}
|
|
1570
|
+
// A command of the checks or of the final pass judges the tree of the lot, its
|
|
1571
|
+
// new files in the index; the index is put back after it.
|
|
1572
|
+
if (etape === 'controles') {
|
|
1573
|
+
inscrireLeLot(ctx.copie);
|
|
1574
|
+
}
|
|
1575
|
+
try {
|
|
1576
|
+
return spawnSync(lancement.cmd, lancement.args, {
|
|
1577
|
+
cwd,
|
|
1578
|
+
stdio: ['ignore', fd, fd],
|
|
1579
|
+
env: lancement.env,
|
|
1580
|
+
});
|
|
1581
|
+
} finally {
|
|
1582
|
+
rendreLIndex(ctx.copie);
|
|
1583
|
+
}
|
|
1557
1584
|
} finally {
|
|
1558
1585
|
oublier();
|
|
1559
1586
|
}
|
|
@@ -1659,7 +1686,7 @@ function mesureDeLaPreuve(ctx, liste, fichiers, derniere = null) {
|
|
|
1659
1686
|
commande: `npm test -- ${(entier ? [dossier] : ['--force', ...groupe]).join(' ')}`,
|
|
1660
1687
|
attente: Boolean(pass.attente),
|
|
1661
1688
|
raison: pass.raison ?? null,
|
|
1662
|
-
resultats: langageDe(ctx.copie).verdict(pass.dossier).rapports,
|
|
1689
|
+
resultats: langageDe(ctx.copie).verdict(pass.dossier, ctx.copie).rapports,
|
|
1663
1690
|
// The builds of the plan's packages that failed: each one a red, not compiling is failing.
|
|
1664
1691
|
constructions: constructionsEchouees(ctx, liste, pass.dossier),
|
|
1665
1692
|
});
|
|
@@ -1714,9 +1741,12 @@ export function preuveARepasser(ctx, runs) {
|
|
|
1714
1741
|
}
|
|
1715
1742
|
|
|
1716
1743
|
// The proof of the red, on every test of the lot: `{ ok, rouges, texte, resume }`, `texte` the
|
|
1717
|
-
// report, written whole to its file beside the copy.
|
|
1718
|
-
//
|
|
1719
|
-
//
|
|
1744
|
+
// report, written whole to its file beside the copy. In a file the proof plays for the lot (not a
|
|
1745
|
+
// package played whole), the tests judged as the lot's are those of the files the lot changes and
|
|
1746
|
+
// those the testwriter's sheets name, whatever their module; the others are main's, as a module of
|
|
1747
|
+
// a single integration binary the lot does not change: their greens are left out and their failures
|
|
1748
|
+
// are existing reds. With test files of the lot played and a plan that expects a red, existing reds
|
|
1749
|
+
// alone do not pass the proof: it takes a red of the lot or a failed build. A
|
|
1720
1750
|
// green test is a defect when the testwriter's sheets name it (`portent_le_travail`), read at
|
|
1721
1751
|
// each proof, and accepted when they do not; a test's full name is read whatever the
|
|
1722
1752
|
// separator between its group and its title, a blank, or « > » as Vitest prints it, or « › » as
|
|
@@ -1724,6 +1754,8 @@ export function preuveARepasser(ctx, runs) {
|
|
|
1724
1754
|
// the copy changed (`mesureDeLaPreuve`).
|
|
1725
1755
|
// A measure with a run at 75 proved nothing: the proof is « à repasser » (`preuveARepasser`).
|
|
1726
1756
|
export function preuve(ctx, { mesure: derniere = null, fichiers: duRouge = null } = {}) {
|
|
1757
|
+
// Before any read of the copy: the index a killed pass left is put back.
|
|
1758
|
+
rendreLIndex(ctx.copie);
|
|
1727
1759
|
// Only the files of the day are proved; the ones only the night plays are put aside, named.
|
|
1728
1760
|
// Resumed at a red (<duRouge>, the files it names), the proof plays the tests among them alone
|
|
1729
1761
|
// (<seuls>) and passes when they load: a test fixed is green, not red. A red that names no test
|
|
@@ -1771,7 +1803,8 @@ export function preuve(ctx, { mesure: derniere = null, fichiers: duRouge = null
|
|
|
1771
1803
|
// A plan « comportement tests-adaptés », or a testwriter session the supervisor asked
|
|
1772
1804
|
// (`--depuis testwriter`, `ctx.testwriterDemande`): every green of the lot is expected.
|
|
1773
1805
|
const inchange = ctx.sorte?.comportement === 'tests-adaptés' || Boolean(ctx.testwriterDemande);
|
|
1774
|
-
// The files the lot changes: a result of the run under another file
|
|
1806
|
+
// The files the lot changes: of a result of the run under another file, only the tests the sheet
|
|
1807
|
+
// names are the lot's.
|
|
1775
1808
|
const duLot = new Set(
|
|
1776
1809
|
changements(ctx)
|
|
1777
1810
|
.filter(c => !c.supprime)
|
|
@@ -1802,24 +1835,15 @@ export function preuve(ctx, { mesure: derniere = null, fichiers: duRouge = null
|
|
|
1802
1835
|
}
|
|
1803
1836
|
}
|
|
1804
1837
|
}
|
|
1805
|
-
// The files
|
|
1806
|
-
//
|
|
1807
|
-
//
|
|
1808
|
-
//
|
|
1809
|
-
//
|
|
1810
|
-
//
|
|
1811
|
-
|
|
1812
|
-
const
|
|
1813
|
-
for (const
|
|
1814
|
-
const f = path.relative(ctx.copie, res.fichier);
|
|
1815
|
-
if (fichiersDuGroupe.includes(f)) {
|
|
1816
|
-
continue;
|
|
1817
|
-
}
|
|
1818
|
-
for (const a of res.tests.filter(x => x.etat === 'failed')) {
|
|
1819
|
-
rouges.push(`rouge existant : ${f} › ${a.nom} — ${premiereLigne(a.message)}`);
|
|
1820
|
-
}
|
|
1821
|
-
}
|
|
1822
|
-
for (const f of fichiersDuGroupe) {
|
|
1838
|
+
// The files read: those of the group, and each file the run reports, as the modules of a
|
|
1839
|
+
// single integration binary (Rust `tests/it/main.rs`): the group names the binary, the results
|
|
1840
|
+
// name the modules. The tests judged as the lot's are those of the files the lot changes and
|
|
1841
|
+
// those the sheet names; the others are main's: their greens say nothing of the lot, and their
|
|
1842
|
+
// reds are existing reds, as those of a package played whole (`entier`), which keeps its own
|
|
1843
|
+
// branch above. A file of the group or of the lot that does not load proves nothing, so the
|
|
1844
|
+
// aggregator is no false casse.
|
|
1845
|
+
const rapportes = entier ? [] : resultats.map(r => path.relative(ctx.copie, r.fichier));
|
|
1846
|
+
for (const f of new Set([...groupe, ...rapportes])) {
|
|
1823
1847
|
const res = resultats.find(t => t.fichier === path.join(ctx.copie, f));
|
|
1824
1848
|
const tests = res?.tests ?? [];
|
|
1825
1849
|
const deHead = vertsDuRegistre(registre, f);
|
|
@@ -1828,13 +1852,16 @@ export function preuve(ctx, { mesure: derniere = null, fichiers: duRouge = null
|
|
|
1828
1852
|
res && tests.length === 0
|
|
1829
1853
|
? langage.moduleAbsent(res.message ?? '', path.join(ctx.copie, f))
|
|
1830
1854
|
: null;
|
|
1831
|
-
const casse =
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1855
|
+
const casse =
|
|
1856
|
+
groupe.includes(f) || duLot.has(f)
|
|
1857
|
+
? casseDeChargement({
|
|
1858
|
+
res,
|
|
1859
|
+
code,
|
|
1860
|
+
constructions,
|
|
1861
|
+
aDesResultats: resultats.length > 0,
|
|
1862
|
+
absent: Boolean(importe) && !existsSync(importe),
|
|
1863
|
+
})
|
|
1864
|
+
: null;
|
|
1838
1865
|
if (casse === 'non-joue') {
|
|
1839
1866
|
casses.push(
|
|
1840
1867
|
`${f} — ne se charge pas : non joué (code ${code}) ; le journal du ticket : ${ctx.journal} (il se cite en pièce, \`${ctx.ticket}.log:<ligne>\`)`
|
|
@@ -1848,7 +1875,11 @@ export function preuve(ctx, { mesure: derniere = null, fichiers: duRouge = null
|
|
|
1848
1875
|
rougesDuLot++;
|
|
1849
1876
|
}
|
|
1850
1877
|
for (const a of tests) {
|
|
1851
|
-
if (
|
|
1878
|
+
if (!duLot.has(f) && !nomme(f, a)) {
|
|
1879
|
+
if (a.etat === 'failed') {
|
|
1880
|
+
rouges.push(`rouge existant : ${f} › ${a.nom} — ${premiereLigne(a.message)}`);
|
|
1881
|
+
}
|
|
1882
|
+
} else if (a.etat === 'failed') {
|
|
1852
1883
|
rouges.push(`${f} › ${a.nom} — ${premiereLigne(a.message)}`);
|
|
1853
1884
|
rougesDuLot++;
|
|
1854
1885
|
} else if (a.etat === 'passed' && deHead.has(a.nom)) {
|
|
@@ -1861,12 +1892,15 @@ export function preuve(ctx, { mesure: derniere = null, fichiers: duRouge = null
|
|
|
1861
1892
|
}
|
|
1862
1893
|
const section = (titre, l) =>
|
|
1863
1894
|
l.length ? [`${titre} (${l.length}) :`, ...l.map(x => `- ${x}`), ''] : [];
|
|
1895
|
+
// With test files of the lot played, an existing red proves nothing of the ticket's work: the
|
|
1896
|
+
// proof needs a red of the lot or a failed build. A package played whole has existing reds alone.
|
|
1897
|
+
const rougesProbants = fichiers.length ? rougesDuLot + reportes.length : rouges.length;
|
|
1864
1898
|
const ok = seuls
|
|
1865
1899
|
? casses.length === 0
|
|
1866
1900
|
: preuveReussie(
|
|
1867
1901
|
{
|
|
1868
1902
|
fichiers: fichiers.length,
|
|
1869
|
-
rouges:
|
|
1903
|
+
rouges: rougesProbants,
|
|
1870
1904
|
casses: casses.length,
|
|
1871
1905
|
nommes: nommes.length,
|
|
1872
1906
|
nonNommes: nonNommes.length,
|
|
@@ -1891,6 +1925,9 @@ export function preuve(ctx, { mesure: derniere = null, fichiers: duRouge = null
|
|
|
1891
1925
|
? ['Aucun fichier de test du lot : le plan dit « tests-adaptés », rien à prouver.', '']
|
|
1892
1926
|
: ['Aucun fichier de test du lot dans le plan : rien ne prouve le rouge.', '']),
|
|
1893
1927
|
...section('Rouges', rouges),
|
|
1928
|
+
...(!ok && rouges.length && !rougesProbants
|
|
1929
|
+
? ['Aucun rouge du lot ni construction rouge : ces rouges seuls ne prouvent rien.', '']
|
|
1930
|
+
: []),
|
|
1894
1931
|
...sections,
|
|
1895
1932
|
...(nommes.length
|
|
1896
1933
|
? [
|
|
@@ -2006,7 +2043,7 @@ function situer(ctx, liste, chemin) {
|
|
|
2006
2043
|
}
|
|
2007
2044
|
|
|
2008
2045
|
// Whether <chemin> is a test file of the module of the language of the copy (not the shared
|
|
2009
|
-
// test material, which the
|
|
2046
|
+
// test material, which the testwriter writes anywhere).
|
|
2010
2047
|
function estUnFichierDeTest(ctx, chemin) {
|
|
2011
2048
|
try {
|
|
2012
2049
|
const classe = langageDe(ctx.copie).estUnTest(chemin, ctx.copie);
|
|
@@ -2063,7 +2100,7 @@ export function rougesDe(ctx, liste, c) {
|
|
|
2063
2100
|
const langage = langageDe(ctx.copie);
|
|
2064
2101
|
// The files of the lot the testwriter writes, read at the first failed test.
|
|
2065
2102
|
let duLot = null;
|
|
2066
|
-
for (const res of langage.verdict(c.dossier).rapports) {
|
|
2103
|
+
for (const res of langage.verdict(c.dossier, ctx.copie).rapports) {
|
|
2067
2104
|
const f = path.relative(ctx.copie, res.fichier);
|
|
2068
2105
|
const lieu = situer(ctx, liste, f);
|
|
2069
2106
|
if (res.tests.length === 0 && res.etat === 'failed') {
|
|
@@ -2204,6 +2241,9 @@ const ligneDeCommande = c =>
|
|
|
2204
2241
|
// at the final pass, each key of the debt a guard wrote inscribed above what it finds, `{ garde,
|
|
2205
2242
|
// fichier, regle, trouve }`.
|
|
2206
2243
|
export function controles(ctx, finale, restreinte = null, reportes = null, fichiers = null) {
|
|
2244
|
+
// Before any read of the copy: the index a killed pass left is put back, or git reads the lot
|
|
2245
|
+
// as staged there (a file moved is a rename, its source no longer a change).
|
|
2246
|
+
rendreLIndex(ctx.copie);
|
|
2207
2247
|
const liste = composantsDe(ctx.copie).filter(p => !p.hors);
|
|
2208
2248
|
// Resumed at a red in the test files <fichiers>: the final pass plays their packages alone (the
|
|
2209
2249
|
// graph of packages of Turborepo, the root's tasks beside), the checks of the plan their tests
|
package/scripts/aiguillage.mjs
CHANGED
|
@@ -28,7 +28,8 @@
|
|
|
28
28
|
// that runs, the ticket's copy for a session of the circuit: those of the copy (DU_CODE_EN_COURS,
|
|
29
29
|
// and the commands of the modules of language) and the tools of the repository
|
|
30
30
|
// (OUTILS_DU_DEPOT). Each subcommand of the core is in one of the three lists, which a test
|
|
31
|
-
// holds
|
|
31
|
+
// holds; a name the package retired that an earlier published version still calls (RETIREES) runs
|
|
32
|
+
// by that version too. The code that runs is the version installed when their paths are the same: it runs in
|
|
32
33
|
// place.
|
|
33
34
|
import { spawnSync } from 'node:child_process';
|
|
34
35
|
import {
|
|
@@ -53,17 +54,15 @@ const PAQUET_QUI_TOURNE = path.resolve(import.meta.dirname, '..');
|
|
|
53
54
|
|
|
54
55
|
/**
|
|
55
56
|
* The subcommands of the orchestration, which the published version runs: the circuit, the
|
|
56
|
-
* supervisor, the night, the board and the status line, the hooks of Claude Code, the
|
|
57
|
-
* the rights of the sessions, the direct (its agent and its reviewer), the envelope and its
|
|
57
|
+
* supervisor, the night, the board and the status line, the hooks of Claude Code, the lock out of
|
|
58
|
+
* the envelope and the rights of the sessions, the direct (its agent and its reviewer), the envelope and its
|
|
58
59
|
* launcher, the integration, the
|
|
59
60
|
* results, the removal of a copy and the balance, even when the supervisor runs one by hand.
|
|
60
61
|
*/
|
|
61
62
|
export const REDIRIGEES = new Set([
|
|
62
|
-
'attente-a-l-arret',
|
|
63
63
|
'attente-au-tour',
|
|
64
64
|
'bilan',
|
|
65
65
|
'circuit',
|
|
66
|
-
'commande',
|
|
67
66
|
'consommation',
|
|
68
67
|
'direct',
|
|
69
68
|
'droits',
|
|
@@ -84,10 +83,17 @@ export const REDIRIGEES = new Set([
|
|
|
84
83
|
'superviseur',
|
|
85
84
|
'tableau',
|
|
86
85
|
'ticket-du-sous-agent',
|
|
87
|
-
'verrou',
|
|
88
86
|
'verrou-hors-enveloppe',
|
|
89
87
|
]);
|
|
90
88
|
|
|
89
|
+
/**
|
|
90
|
+
* The names the package no longer carries that the settings of a session opened by an earlier
|
|
91
|
+
* published version still declare as hooks (its locks, on this copy's command or the main tree's):
|
|
92
|
+
* the published version runs them, until the key names a version whose sessions declare none (a
|
|
93
|
+
* transition path of the charter, as Temporal's `patched`).
|
|
94
|
+
*/
|
|
95
|
+
export const RETIREES = new Set(['commande', 'verrou']);
|
|
96
|
+
|
|
91
97
|
/**
|
|
92
98
|
* The subcommands that play the code of the copy: the tests, the verification, the guards, the
|
|
93
99
|
* temporary folder, the git hooks and the merge driver, the affected components; the commands of
|
|
@@ -171,7 +177,8 @@ export function versionDeLOutil(racine = process.cwd()) {
|
|
|
171
177
|
/**
|
|
172
178
|
* Where the subcommand <nom> runs in the project at <racine>: `{ version, dossier, commande }`, the
|
|
173
179
|
* version of the key and its command under <cache>, for a subcommand of the orchestration that the
|
|
174
|
-
* package <paquet> (the one that runs) is not
|
|
180
|
+
* package <paquet> (the one that runs) is not, or for a retired name (RETIREES); null otherwise
|
|
181
|
+
* (see the header).
|
|
175
182
|
* @param {string} nom
|
|
176
183
|
* @param {{ racine?: string, cache?: string, paquet?: string }} [options]
|
|
177
184
|
* @returns {{ version: string, dossier: string, commande: string } | null}
|
|
@@ -180,7 +187,7 @@ export function aiguillage(
|
|
|
180
187
|
nom,
|
|
181
188
|
{ racine = process.cwd(), cache = cacheDesOutils(), paquet = PAQUET_QUI_TOURNE } = {}
|
|
182
189
|
) {
|
|
183
|
-
if (!REDIRIGEES.has(nom)) {
|
|
190
|
+
if (!REDIRIGEES.has(nom) && !RETIREES.has(nom)) {
|
|
184
191
|
return null;
|
|
185
192
|
}
|
|
186
193
|
const version = versionDeLOutil(racine);
|
|
@@ -21,13 +21,12 @@ import { ligneDeQuestion, questionsEnAttente, ticketsHorsAttente } from './super
|
|
|
21
21
|
/**
|
|
22
22
|
* The root of the repository whose session of supervision works in <dossier>: null out of a git
|
|
23
23
|
* repository, in an agent's copy (a worktree) and in the session of a role that the circuit
|
|
24
|
-
* launches (BEADS_ACTOR set).
|
|
25
|
-
* scripts/attente-a-l-arret.mjs).
|
|
24
|
+
* launches (BEADS_ACTOR set).
|
|
26
25
|
* @param {string} dossier
|
|
27
26
|
* @param {Record<string, string | undefined>} env
|
|
28
27
|
* @returns {string | null}
|
|
29
28
|
*/
|
|
30
|
-
|
|
29
|
+
function racineDeLaSupervision(dossier, env = process.env) {
|
|
31
30
|
if (env.BEADS_ACTOR) {
|
|
32
31
|
return null;
|
|
33
32
|
}
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
// under LIBRE_MIN, 4 GB free (GRILLHOUSE_TEMPORAIRE_LIBRE names another floor, in bytes; the
|
|
7
7
|
// base configuration of the tests sets 0, scripts/langages/typescript/vitest-config/
|
|
8
8
|
// machine.setup.mjs), it waits for room instead of failing for lack of it. It says so, with
|
|
9
|
-
// what holds the directory (its largest entries, by the blocks their files hold,
|
|
10
|
-
//
|
|
11
|
-
//
|
|
9
|
+
// what holds the directory (its largest entries, by the blocks their files hold), when it
|
|
10
|
+
// begins and every 30 s, under a bound (GRILLHOUSE_ATTENTE_MACHINE_MS, ATTENTE_MACHINE_MS,
|
|
11
|
+
// 60 min), then « à repasser » (75).
|
|
12
12
|
// - It then wants room on the disk of the copy it plays in (its root, `racine`), where cargo
|
|
13
13
|
// writes its target directories: under LIBRE_MIN as well (GRILLHOUSE_COPIE_LIBRE names another
|
|
14
14
|
// floor, in bytes; the base configuration of the tests sets 0), it waits the same way, under
|
|
@@ -27,7 +27,6 @@ import { tmpdir } from 'node:os';
|
|
|
27
27
|
import path from 'node:path';
|
|
28
28
|
import { A_REPASSER } from './codes-de-sortie.mjs';
|
|
29
29
|
import { occupantsDesCopies } from './copies-finies.mjs';
|
|
30
|
-
import { ticketDeLaBase } from './mesure/base-de-passe.mjs';
|
|
31
30
|
import { paquets } from './paquets.mjs';
|
|
32
31
|
import { duree } from './regles-des-places.mjs';
|
|
33
32
|
import { attendreUnPeu } from './verrou-de-fichier.mjs';
|
|
@@ -172,10 +171,7 @@ function occupants(dossier) {
|
|
|
172
171
|
.map(nom => ({ nom, octets: taille(path.join(dossier, nom)) }))
|
|
173
172
|
.sort((a, b) => b.octets - a.octets)
|
|
174
173
|
.slice(0, 5)
|
|
175
|
-
.map(o => {
|
|
176
|
-
const ticket = ticketDeLaBase(o.nom);
|
|
177
|
-
return `${o.nom} (${ticket ? `le ticket ${ticket}, ` : ''}${go(o.octets)})`;
|
|
178
|
-
})
|
|
174
|
+
.map(o => `${o.nom} (${go(o.octets)})`)
|
|
179
175
|
.join(', ');
|
|
180
176
|
}
|
|
181
177
|
|
package/scripts/avancement.mjs
CHANGED
|
@@ -268,11 +268,12 @@ export function garderLeTotal(dossier) {
|
|
|
268
268
|
* The parts of the machine under <env>, as the board shows them (scripts/tableau.mjs): `budget`
|
|
269
269
|
* (the cores and the memory the parts share, null when the reserve of the user is faulty, `faute`
|
|
270
270
|
* then naming it), `prises`, each pass that holds a part (its repository `depot`, the root of its
|
|
271
|
-
* main tree, and `projet`, its folder; its working tree `copie`; ticket, kind, `coeurs
|
|
272
|
-
* `memoire` of its part, since when, what it consumes beyond its part `depasse`,
|
|
273
|
-
* `avancement`: its files done and planned and its last sign, null while it
|
|
274
|
-
* directory, or that directory does not read), and `attentes`, each live wait
|
|
275
|
-
* its rank, with what it waits for (`raison`)
|
|
271
|
+
* main tree, and `projet`, its folder; its working tree `copie`; ticket, kind, `coeurs`,
|
|
272
|
+
* `memoire` and `limite` of its part, since when, what it consumes beyond its part `depasse`,
|
|
273
|
+
* and its progress `avancement`: its files done and planned and its last sign, null while it
|
|
274
|
+
* names no progress directory, or that directory does not read), and `attentes`, each live wait
|
|
275
|
+
* in the order of its rank, with the part it asks for and what it waits for (`raison`)
|
|
276
|
+
* (`lireLesParts` of scripts/places-de-la-machine.mjs).
|
|
276
277
|
* @param {Record<string, string | undefined>} [env]
|
|
277
278
|
*/
|
|
278
279
|
export function lireLaMesure(env = process.env) {
|
|
@@ -284,21 +285,24 @@ export function lireLaMesure(env = process.env) {
|
|
|
284
285
|
} catch (e) {
|
|
285
286
|
faute = e.message;
|
|
286
287
|
}
|
|
287
|
-
|
|
288
|
+
// What a pass holds or asks for; `limite`, where its group is cut (null, a session; absent from
|
|
289
|
+
// a part that names none).
|
|
290
|
+
const nom = ({ depot, copie, projet, ticket, sorte, depuis, coeurs, memoire, limite }) => ({
|
|
288
291
|
depot,
|
|
289
292
|
copie: copie ?? null,
|
|
290
293
|
projet,
|
|
291
294
|
ticket: ticket ?? null,
|
|
292
295
|
sorte,
|
|
293
296
|
depuis,
|
|
297
|
+
coeurs,
|
|
298
|
+
memoire,
|
|
299
|
+
limite,
|
|
294
300
|
});
|
|
295
301
|
return {
|
|
296
302
|
budget,
|
|
297
303
|
faute,
|
|
298
304
|
prises: prises.map(p => ({
|
|
299
305
|
...nom(p),
|
|
300
|
-
coeurs: p.coeurs,
|
|
301
|
-
memoire: p.memoire,
|
|
302
306
|
depasse: p.depasse ?? null,
|
|
303
307
|
avancement: typeof p.dossier === 'string' ? lireAvancement(p.dossier) : null,
|
|
304
308
|
})),
|