@roomi-fields/grillhouse 0.48.0 → 0.49.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/direct.md +9 -0
- package/cadre/templates/projet/.github/workflows/ci.yml +6 -0
- package/cadre/templates/projet/.github/workflows/nuit.yml +9 -2
- package/cadre/templates/projet/CLAUDE.md +9 -5
- package/cadre/templates/projet/docs/agents/issue-tracker.md +1 -1
- package/cadre/templates/turbo/paquets.json +3 -1
- package/cadre/templates/turbo/sans-paquets.json +3 -1
- package/charte.md +40 -14
- package/dist/temporal/circuit/appel.d.ts +4 -1
- package/dist/temporal/circuit/appel.js +15 -1
- package/dist/temporal/circuit/appel.js.map +1 -1
- package/dist/temporal/circuit/client.d.ts +7 -1
- package/dist/temporal/circuit/client.js +54 -1
- package/dist/temporal/circuit/client.js.map +1 -1
- package/dist/temporal/circuit/commande.js +30 -57
- package/dist/temporal/circuit/commande.js.map +1 -1
- package/dist/temporal/circuit/contrat.d.ts +2 -1
- package/dist/temporal/circuit/contrat.js +2 -1
- package/dist/temporal/circuit/contrat.js.map +1 -1
- package/dist/temporal/circuit/deroule.js +9 -2
- package/dist/temporal/circuit/deroule.js.map +1 -1
- package/dist/temporal/file/contrat.d.ts +16 -2
- package/dist/temporal/file/contrat.js +27 -3
- package/dist/temporal/file/contrat.js.map +1 -1
- package/dist/temporal/file/deroule.js +4 -4
- package/dist/temporal/file/deroule.js.map +1 -1
- package/dist/temporal/nuits/activites.d.ts +1 -15
- package/dist/temporal/nuits/activites.js +3 -62
- package/dist/temporal/nuits/activites.js.map +1 -1
- package/dist/temporal/nuits/contrat.d.ts +3 -21
- package/dist/temporal/nuits/deroule.js +38 -74
- package/dist/temporal/nuits/deroule.js.map +1 -1
- package/dist/temporal/places/client.d.ts +3 -16
- package/dist/temporal/places/client.js +3 -26
- package/dist/temporal/places/client.js.map +1 -1
- package/dist/temporal/places/contrat.d.ts +15 -51
- package/dist/temporal/places/contrat.js +3 -13
- package/dist/temporal/places/contrat.js.map +1 -1
- package/dist/temporal/places/deroule.js +11 -61
- package/dist/temporal/places/deroule.js.map +1 -1
- package/dist/temporal/tickets/activites.js +4 -2
- package/dist/temporal/tickets/activites.js.map +1 -1
- package/dist/temporal/tickets/contrat.d.ts +2 -1
- package/docs/ARCHITECTURE.md +310 -115
- package/docs/CADRE.md +16 -13
- package/docs/INTERFACE.md +90 -25
- package/hooks/hooks.json +9 -0
- package/hooks/register.tsx +59 -5
- package/package.json +1 -1
- package/scripts/activites.mjs +271 -42
- package/scripts/aiguillage.mjs +4 -1
- package/scripts/bilan.mjs +125 -2
- package/scripts/circuit.mjs +233 -159
- package/scripts/circuits-cles.d.mts +3 -3
- package/scripts/circuits-cles.mjs +6 -5
- package/scripts/coeurs-dedies.mjs +4 -4
- package/scripts/commandes-composees.mjs +12 -5
- package/scripts/dette.d.ts +2 -1
- package/scripts/dette.mjs +49 -6
- package/scripts/direct.mjs +343 -0
- package/scripts/droits.mjs +19 -0
- package/scripts/effets.mjs +4 -4
- package/scripts/engendres.mjs +2 -1
- package/scripts/enveloppe/enveloppe.mjs +67 -13
- package/scripts/enveloppe/lancer.sh +14 -3
- package/scripts/enveloppe/paquets-du-plan.mjs +9 -0
- package/scripts/enveloppe/travail-de-la-copie.mjs +119 -21
- package/scripts/etapes.mjs +3 -3
- package/scripts/faits-du-circuit.mjs +12 -11
- package/scripts/fermeture-de-la-machine.d.mts +4 -4
- package/scripts/fermeture-de-la-machine.mjs +10 -20
- package/scripts/fichiers-nommes.mjs +27 -1
- package/scripts/file-des-tickets.d.mts +18 -1
- package/scripts/file-des-tickets.mjs +63 -15
- package/scripts/grillhouse-maj.mjs +13 -25
- package/scripts/groupe-cles.d.mts +6 -0
- package/scripts/groupe-cles.mjs +29 -1
- package/scripts/integration/file.mjs +148 -37
- package/scripts/jointure.d.ts +17 -3
- package/scripts/journal-des-etats.d.mts +16 -0
- package/scripts/journal-des-etats.mjs +44 -2
- package/scripts/journal.mjs +3 -0
- package/scripts/langages/c/commandes.mjs +5 -5
- package/scripts/langages/c/composants.mjs +13 -5
- package/scripts/langages/cargo/commandes.mjs +5 -6
- package/scripts/langages/python/commandes.mjs +5 -5
- package/scripts/langages/python/composants.mjs +10 -2
- package/scripts/langages/typescript/composants.mjs +10 -3
- package/scripts/langages/typescript/construire.mjs +2 -0
- package/scripts/langages/typescript/exemples.mjs +33 -1
- package/scripts/langages/typescript/index.mjs +19 -0
- package/scripts/langages/typescript/migrations/0.49.0-tests-equipes.mjs +32 -0
- package/scripts/langages/typescript/tests-de-nuit.mjs +152 -32
- package/scripts/langages/typescript/tests-du-poste.mjs +65 -23
- package/scripts/langages/typescript/titres-de-tests.mjs +11 -7
- package/scripts/langages/typescript/turbo-des-paquets.mjs +21 -4
- package/scripts/langages/typescript/verifier.mjs +3 -5
- package/scripts/langages/typescript/verrou-des-dependances.mjs +161 -0
- package/scripts/langages/typescript/vitest-config/cibles.mjs +57 -6
- package/scripts/langages/typescript/vitest-config/machine.setup.mjs +11 -5
- package/scripts/langages/typescript/vitest.nuit.config.mjs +53 -5
- package/scripts/machine.mjs +1 -1
- package/scripts/mesure/base-de-passe.mjs +2 -1
- package/scripts/migrations/0.49.0-reservation-de-trois-coeurs.mjs +30 -0
- package/scripts/migrations.mjs +2 -0
- package/scripts/nuit.sh +97 -2
- package/scripts/paquet.mjs +16 -5
- package/scripts/paquets.d.ts +4 -0
- package/scripts/paquets.mjs +57 -0
- package/scripts/passe-de-la-machine.mjs +4 -7
- package/scripts/places-de-la-machine.mjs +55 -42
- package/scripts/places-du-serveur.mjs +2 -2
- package/scripts/plafond-de-la-machine.d.mts +7 -13
- package/scripts/plafond-de-la-machine.mjs +19 -35
- package/scripts/prefixe-des-tickets.mjs +1 -1
- package/scripts/references-changees.mjs +159 -0
- package/scripts/regles-des-places.d.mts +8 -31
- package/scripts/regles-des-places.mjs +14 -64
- package/scripts/repli-de-la-nuit.mjs +112 -0
- package/scripts/reponses-du-circuit.d.mts +2 -2
- package/scripts/reponses-du-circuit.mjs +21 -12
- package/scripts/reprise.mjs +27 -8
- package/scripts/resultats.mjs +21 -9
- package/scripts/seances.mjs +258 -40
- package/scripts/services-du-noyau.mjs +3 -0
- package/scripts/sous-commandes.mjs +24 -7
- package/scripts/superviseur.mjs +185 -39
- package/scripts/tableau.mjs +220 -89
- package/scripts/taches-du-graphe.mjs +84 -4
- package/scripts/ticket.mjs +345 -0
- package/scripts/transitions.d.mts +44 -0
- package/scripts/transitions.mjs +173 -13
- package/scripts/un-commit-par-ticket.mjs +4 -3
- package/scripts/verdict-de-la-nuit.mjs +47 -20
- package/scripts/verrou-de-fichier.mjs +2 -2
- package/scripts/verrous/ecriture-hors-enveloppe.mjs +86 -0
- package/scripts/verrous/verrou.mjs +17 -1
- package/skills/developpeur/SKILL.md +1 -1
- package/skills/direct/SKILL.md +57 -0
- package/skills/explorateur/SKILL.md +10 -6
- package/skills/pitmaster/SKILL.md +34 -14
- package/skills/pitmaster/references/consigne-agent.md +7 -1
- package/skills/relecteur/SKILL.md +8 -0
- package/skills/testwriter/SKILL.md +10 -0
- package/scripts/ticket.sh +0 -25
|
@@ -72,7 +72,8 @@
|
|
|
72
72
|
// at its real path, never at a link, by that same mechanism.
|
|
73
73
|
// - A worktree of the repository under an emptied directory (the home, `/tmp`) comes back
|
|
74
74
|
// read-only, `.git` included; the copy's packages of the plan and the tickets base are then
|
|
75
|
-
// written as above.
|
|
75
|
+
// written as above. The copy of another ticket is an optional mount (`--ro-bind-try`): its
|
|
76
|
+
// circuit removes it at any moment, and the session leaves without it.
|
|
76
77
|
// - An envelope on the main tree is refused, so is a plan that names no package, and so is a path
|
|
77
78
|
// of the plan that does not exist; when it is the name of a package of the copy, the refusal
|
|
78
79
|
// gives its path.
|
|
@@ -124,7 +125,9 @@ import {
|
|
|
124
125
|
ecrireLaListe,
|
|
125
126
|
lireLaListe,
|
|
126
127
|
paquetsDuLangage,
|
|
128
|
+
testsEtendusDeLEnveloppe,
|
|
127
129
|
VARIABLE,
|
|
130
|
+
VARIABLE_TESTS_ETENDUS,
|
|
128
131
|
} from './paquets-du-plan.mjs';
|
|
129
132
|
|
|
130
133
|
export { paquetsDuLangage };
|
|
@@ -132,6 +135,7 @@ import { cacheDesOutils, installer, versionDeLOutil } from '../aiguillage.mjs';
|
|
|
132
135
|
import { ouvrirBase } from '../mesure/base-de-passe.mjs';
|
|
133
136
|
import {
|
|
134
137
|
partDeLaPasse,
|
|
138
|
+
prendreUnePart,
|
|
135
139
|
sousNiceEtIonice,
|
|
136
140
|
travailleursDe,
|
|
137
141
|
VARIABLE_TENUE,
|
|
@@ -141,8 +145,9 @@ import { donneesDe } from '../donnees-cles.mjs';
|
|
|
141
145
|
import { matieresDeclareesDe } from '../matieres-cles.mjs';
|
|
142
146
|
import { outilsDe } from '../outils-cles.mjs';
|
|
143
147
|
|
|
144
|
-
// The
|
|
145
|
-
|
|
148
|
+
// The roles that write the package of the shared test material and the lock files of the versions:
|
|
149
|
+
// the testwriter, and the agent of a direct, who writes tests and code together.
|
|
150
|
+
const ROLES_MATIERE = ['testwriter', 'direct'];
|
|
146
151
|
// The directories <sorties> of <dir>, each relative to it.
|
|
147
152
|
// One that a symbolic link carries out of <dir> (a `node_modules` linked to another tree's) is
|
|
148
153
|
// left out: it is not the copy's, and bwrap could not mount over it. `lien(path)` gives the text
|
|
@@ -186,7 +191,7 @@ const paquetsHorsDuPlan = (paquets, paquetsDeLaCopie, matieres) => {
|
|
|
186
191
|
// link carries out of the copy is left out. bwrap then has a directory to mount an empty one over.
|
|
187
192
|
export function preparerLesSorties({ copie, paquets, paquetsDeLaCopie, matieres, role, sorties }) {
|
|
188
193
|
const dossiers = paquetsHorsDuPlan(paquets, paquetsDeLaCopie, matieres);
|
|
189
|
-
if (role
|
|
194
|
+
if (!ROLES_MATIERE.includes(role)) {
|
|
190
195
|
// A declared folder of test material is no package: no run of tests writes outputs in it.
|
|
191
196
|
dossiers.push(...matieres.filter(m => paquetsDeLaCopie.some(p => p.dossier === m)));
|
|
192
197
|
}
|
|
@@ -264,9 +269,16 @@ const VARIABLES_DE_CHEMIN = [
|
|
|
264
269
|
'NVM_DIR',
|
|
265
270
|
'XDG_RUNTIME_DIR',
|
|
266
271
|
];
|
|
267
|
-
//
|
|
268
|
-
//
|
|
272
|
+
// The witness that the envelope started its command: an empty file the command writes as its first
|
|
273
|
+
// gesture inside the envelope, in the session's working directory (`TMPDIR` there). The launcher
|
|
274
|
+
// (lancer.sh) removes it before the envelope and ranges it with the session's result after: a
|
|
275
|
+
// launch bwrap refuses, on a mount or anything else, leaves none.
|
|
276
|
+
export const TEMOIN_DE_DEMARRAGE = '.demarree';
|
|
277
|
+
// Run inside the envelope before the command: leaves the witness of its start, unsets each named
|
|
278
|
+
// variable whose path does not exist there, then runs the command.
|
|
279
|
+
// `sh -c EPREUVE sh <variables…> -- <commande…>`.
|
|
269
280
|
const EPREUVE =
|
|
281
|
+
`[ -z "\${TMPDIR-}" ] || touch "$TMPDIR/${TEMOIN_DE_DEMARRAGE}" || :; ` +
|
|
270
282
|
'while [ "$1" != -- ]; do eval "p=\\${$1-}"; ' +
|
|
271
283
|
'if [ -n "$p" ] && [ ! -e "$p" ]; then unset "$1"; fi; shift; done; shift; exec "$@"';
|
|
272
284
|
|
|
@@ -300,7 +312,7 @@ export function dossierDeTravail(copie, env = process.env) {
|
|
|
300
312
|
// Nothing else of <env> enters.
|
|
301
313
|
export function environnementDeLaSeance(
|
|
302
314
|
env,
|
|
303
|
-
{ cacheNpm, paquets, travail, outils = {}, donnees = {}, travailleurs }
|
|
315
|
+
{ cacheNpm, paquets, travail, outils = {}, donnees = {}, travailleurs, testsEtendus = [] }
|
|
304
316
|
) {
|
|
305
317
|
const declare = nom =>
|
|
306
318
|
ENVIRONNEMENT_DECLARE.includes(nom) ||
|
|
@@ -317,6 +329,7 @@ export function environnementDeLaSeance(
|
|
|
317
329
|
TMP: travail,
|
|
318
330
|
TEMP: travail,
|
|
319
331
|
[VARIABLE]: ecrireLaListe(paquets),
|
|
332
|
+
...(testsEtendus.length ? { [VARIABLE_TESTS_ETENDUS]: ecrireLaListe(testsEtendus) } : {}),
|
|
320
333
|
...(travailleurs === undefined ? {} : { GRILLHOUSE_TRAVAILLEURS: String(travailleurs) }),
|
|
321
334
|
};
|
|
322
335
|
}
|
|
@@ -348,6 +361,7 @@ export function lancementDeLaSeance({
|
|
|
348
361
|
donnees,
|
|
349
362
|
part,
|
|
350
363
|
sonde,
|
|
364
|
+
testsEtendus,
|
|
351
365
|
}) {
|
|
352
366
|
const seance = {
|
|
353
367
|
cmd: 'bwrap',
|
|
@@ -369,6 +383,7 @@ export function lancementDeLaSeance({
|
|
|
369
383
|
travail,
|
|
370
384
|
outils,
|
|
371
385
|
donnees,
|
|
386
|
+
testsEtendus,
|
|
372
387
|
travailleurs: travailleursDe({ env }),
|
|
373
388
|
}),
|
|
374
389
|
};
|
|
@@ -596,6 +611,7 @@ export function jugerComposant({ depot, composant, paquets = [] }, fs) {
|
|
|
596
611
|
* paquets?: string[],
|
|
597
612
|
* role?: string,
|
|
598
613
|
* matieres?: string[],
|
|
614
|
+
* testsEtendus?: string[],
|
|
599
615
|
* verrous?: string[],
|
|
600
616
|
* montages?: { chemin: string, source?: string, ecriture?: boolean, vide?: boolean, scelle?: boolean, lien?: string }[],
|
|
601
617
|
* magasins?: string[],
|
|
@@ -613,6 +629,7 @@ export function plan(
|
|
|
613
629
|
paquets = [],
|
|
614
630
|
role,
|
|
615
631
|
matieres = [],
|
|
632
|
+
testsEtendus = [],
|
|
616
633
|
verrous = [],
|
|
617
634
|
montages = [],
|
|
618
635
|
magasins = [],
|
|
@@ -692,8 +709,17 @@ export function plan(
|
|
|
692
709
|
args.push('--symlink', lien, chemin);
|
|
693
710
|
}
|
|
694
711
|
// A worktree that an emptied directory covers comes back read-only, before the copy is written.
|
|
712
|
+
// The main tree and the copy of the session are mounted as they are found; the copy of another
|
|
713
|
+
// ticket, which its circuit removes at any moment, is an optional mount: bwrap skips it when its
|
|
714
|
+
// source is gone by then, as a container skips an optional mount.
|
|
695
715
|
for (const t of trees) {
|
|
696
|
-
if (videes.some(v => inside(t, v))
|
|
716
|
+
if (!videes.some(v => inside(t, v))) {
|
|
717
|
+
continue;
|
|
718
|
+
}
|
|
719
|
+
const tenu = [trees[0], copie].some(a => path.resolve(a) === path.resolve(t));
|
|
720
|
+
if (!tenu) {
|
|
721
|
+
args.push('--ro-bind-try', t, t);
|
|
722
|
+
} else if (fs.existe(t)) {
|
|
697
723
|
args.push('--ro-bind', t, t);
|
|
698
724
|
}
|
|
699
725
|
}
|
|
@@ -748,19 +774,27 @@ export function plan(
|
|
|
748
774
|
const d = path.join(copie, e);
|
|
749
775
|
args.push('--bind', d, d);
|
|
750
776
|
}
|
|
777
|
+
// The reader packages the plan extended to their tests: the testwriter writes them (his lock
|
|
778
|
+
// lets only their test files through), every other role reads them.
|
|
779
|
+
for (const e of testsEtendus.filter(t => !ecrits.includes(t))) {
|
|
780
|
+
const d = path.join(copie, e);
|
|
781
|
+
if (fs.existe(d)) {
|
|
782
|
+
args.push(role === 'testwriter' ? '--bind' : '--ro-bind', d, d);
|
|
783
|
+
}
|
|
784
|
+
}
|
|
751
785
|
// The lock files of the versions, which a run of the testwriter's tests brings in line with
|
|
752
786
|
// the dependencies of his tests, are written by him alone.
|
|
753
787
|
for (const v of verrous.map(v => path.join(copie, v))) {
|
|
754
|
-
if (role
|
|
788
|
+
if (ROLES_MATIERE.includes(role) && fs.existe(v)) {
|
|
755
789
|
args.push('--bind', v, v);
|
|
756
790
|
}
|
|
757
791
|
}
|
|
758
792
|
}
|
|
759
793
|
for (const m of matieres.map(m => path.join(copie, m))) {
|
|
760
|
-
args.push(role
|
|
794
|
+
args.push(ROLES_MATIERE.includes(role) ? '--bind' : '--ro-bind', m, m);
|
|
761
795
|
// What a run of its tests writes goes, for a role that does not write it, to an empty
|
|
762
796
|
// directory proper to the session, as Bazel writes a test's logs out of its source.
|
|
763
|
-
if (role
|
|
797
|
+
if (ROLES_MATIERE.includes(role)) {
|
|
764
798
|
continue;
|
|
765
799
|
}
|
|
766
800
|
for (const s of sortiesDe(m, sorties.propres, fs.lien)) {
|
|
@@ -821,6 +855,8 @@ function envelopper(argv) {
|
|
|
821
855
|
}
|
|
822
856
|
const copie = path.resolve(copieArg);
|
|
823
857
|
const paquets = lireLaListe(liste);
|
|
858
|
+
// The reader packages extended to their tests, for the testwriter alone.
|
|
859
|
+
const testsEtendus = role === 'testwriter' ? testsEtendusDeLEnveloppe(process.env) : [];
|
|
824
860
|
// A launch from a package of a repository of workspaces sets npm's `workspace`, which
|
|
825
861
|
// `npm config` refuses: the cache is the user's, whatever the workspace.
|
|
826
862
|
const cacheNpm = execFileSync('npm', ['config', 'get', 'cache', '--workspaces=false'], {
|
|
@@ -918,6 +954,7 @@ function envelopper(argv) {
|
|
|
918
954
|
paquets,
|
|
919
955
|
role,
|
|
920
956
|
matieres,
|
|
957
|
+
testsEtendus,
|
|
921
958
|
verrous: langage.manifestes.verrous,
|
|
922
959
|
montages,
|
|
923
960
|
magasins,
|
|
@@ -932,9 +969,20 @@ function envelopper(argv) {
|
|
|
932
969
|
process.stderr.write(`⛔ ENVELOPPE REFUSÉE — ${refus}\n`);
|
|
933
970
|
code = CODE_REFUS;
|
|
934
971
|
} else {
|
|
972
|
+
// The session reserves its cores for its phase alone (3, a direct's 2) against the budget of
|
|
973
|
+
// the machine, and gives them back at its end; under a part already held, its cap is that part.
|
|
935
974
|
let part;
|
|
975
|
+
let prise = null;
|
|
936
976
|
try {
|
|
937
|
-
|
|
977
|
+
const direct = role === 'direct';
|
|
978
|
+
prise = prendreUnePart({
|
|
979
|
+
racine: copie,
|
|
980
|
+
ticket: path.basename(copie),
|
|
981
|
+
sorte: `séance ${role ?? ''}`.trim(),
|
|
982
|
+
direct,
|
|
983
|
+
dire: l => process.stderr.write(`${l}\n`),
|
|
984
|
+
});
|
|
985
|
+
part = prise.part ?? partDeLaPasse({ racine: copie, direct });
|
|
938
986
|
} catch (e) {
|
|
939
987
|
process.stderr.write(`⛔ ENVELOPPE REFUSÉE — ${e.message}\n`);
|
|
940
988
|
temporaire.fermer();
|
|
@@ -950,11 +998,17 @@ function envelopper(argv) {
|
|
|
950
998
|
outils,
|
|
951
999
|
donnees,
|
|
952
1000
|
part,
|
|
1001
|
+
testsEtendus,
|
|
953
1002
|
});
|
|
954
1003
|
if (lancement.sansBorne !== null) {
|
|
955
1004
|
process.stderr.write(`⚠ la séance part sans borne de processeur : ${lancement.sansBorne}\n`);
|
|
956
1005
|
}
|
|
957
|
-
|
|
1006
|
+
let r;
|
|
1007
|
+
try {
|
|
1008
|
+
r = spawnSync(lancement.cmd, lancement.args, { stdio: 'inherit', env: lancement.env });
|
|
1009
|
+
} finally {
|
|
1010
|
+
prise.rendre();
|
|
1011
|
+
}
|
|
958
1012
|
if (r.error) {
|
|
959
1013
|
process.stderr.write(`⛔ ENVELOPPE IMPOSSIBLE — ${r.error.message}\n`);
|
|
960
1014
|
}
|
|
@@ -108,6 +108,9 @@
|
|
|
108
108
|
# launcher writes the session's exit code to `fin` in the folder of the session, which a launch
|
|
109
109
|
# removes first: a launch that stops before its session leaves none, so the circuit
|
|
110
110
|
# (scripts/circuit.mjs) tells a code of the session from CODE_USAGE, CODE_REFUS and CODE_COPIE.
|
|
111
|
+
# The command the envelope runs leaves a witness of its start in the working directory, which the
|
|
112
|
+
# launcher ranges beside it (`demarree`, removed first): an envelope that ends without it refused
|
|
113
|
+
# the launch before the session, whatever its code (scripts/seances.mjs `seanceLancee`).
|
|
111
114
|
# A session its lock stopped on a write out of the plan (scripts/verrous/verrou.mjs) left the
|
|
112
115
|
# reason in its working directory (`hors-plan`, removed before the session): the launcher moves
|
|
113
116
|
# it to `hors-plan` in the folder of the session, which a launch removes first and the circuit reads,
|
|
@@ -183,8 +186,9 @@ fin="$rang/fin"
|
|
|
183
186
|
resultat="$rang/resultat.json"
|
|
184
187
|
hors_plan="$rang/hors-plan"
|
|
185
188
|
hors_plan_fait="$rang/hors-plan.json"
|
|
189
|
+
demarree="$rang/demarree"
|
|
186
190
|
mkdir -p "$(dirname "$copie")" "$rang"
|
|
187
|
-
rm -f "$fin" "$resultat" "$hors_plan" "$hors_plan_fait"
|
|
191
|
+
rm -f "$fin" "$resultat" "$hors_plan" "$hors_plan_fait" "$demarree"
|
|
188
192
|
printf '=== %s · %s · %s ===\n' "$(date -Iseconds)" "$role" "$composant" >> "$journal"
|
|
189
193
|
# The temporary directory of the ticket (`ouvrirBaseDuTicket`, scripts/mesure/base-de-passe.mjs):
|
|
190
194
|
# TMPDIR, TMP and TEMP of the rest of the launch and of the session, whose scratchpads and working
|
|
@@ -244,8 +248,10 @@ publie=$(cd "$copie" && node "$ici/../../bin/grillhouse.mjs" index-interfaces --
|
|
|
244
248
|
# The session's working directory, the one the envelope gives as TMPDIR, follows them.
|
|
245
249
|
travail=$(node --input-type=module -e "import { dossierDeTravail } from '$ici/enveloppe.mjs'; process.stdout.write(dossierDeTravail(process.argv[1]));" "$copie" 2>> "$journal") \
|
|
246
250
|
|| { rm -f "$echec"; echo "⛔ Le dossier de travail de la séance n'a pas pu se lire : voir $journal." >&2; exit "$CODE_COPIE"; }
|
|
247
|
-
# The mark a lock leaves there when it stops the session out of the plan
|
|
248
|
-
|
|
251
|
+
# The mark a lock leaves there when it stops the session out of the plan, and the witness the
|
|
252
|
+
# envelope's command leaves there at its start (`TEMOIN_DE_DEMARRAGE` of enveloppe.mjs): none before
|
|
253
|
+
# the session.
|
|
254
|
+
rm -f "$travail/hors-plan" "$travail/.demarree"
|
|
249
255
|
dossier=$'\n\n'"## Ton dossier de travail"$'\n\n'"Tout fichier temporaire s'écrit dans \`$travail\`, que \`\$TMPDIR\` nomme aussi."
|
|
250
256
|
construction=
|
|
251
257
|
if [ -s "$echec" ]; then
|
|
@@ -288,6 +294,11 @@ else
|
|
|
288
294
|
lancer_claude >> "$journal" 2>&1 || code=$?
|
|
289
295
|
fi
|
|
290
296
|
rm -f "$prompt"
|
|
297
|
+
# The witness that the envelope started its command goes to the circuit: a launch the envelope
|
|
298
|
+
# refuses before the session (a mount bwrap cannot make) leaves none.
|
|
299
|
+
if [ -f "$travail/.demarree" ]; then
|
|
300
|
+
mv "$travail/.demarree" "$demarree"
|
|
301
|
+
fi
|
|
291
302
|
# A session its lock stopped out of the plan (scripts/verrous/verrou.mjs): its reason goes to the
|
|
292
303
|
# circuit, and to the log.
|
|
293
304
|
if [ -f "$travail/hors-plan" ]; then
|
|
@@ -28,6 +28,15 @@ export const lireLaListe = texte =>
|
|
|
28
28
|
.split(path.delimiter)
|
|
29
29
|
.filter(Boolean);
|
|
30
30
|
|
|
31
|
+
// The variable that lists, in the same form, the reader packages the circuit extended the plan to
|
|
32
|
+
// for their tests alone: given to the session of the testwriter only, which writes their test
|
|
33
|
+
// files and no other file of those packages.
|
|
34
|
+
export const VARIABLE_TESTS_ETENDUS = 'GRILLHOUSE_TESTS_ETENDUS';
|
|
35
|
+
|
|
36
|
+
// The directories of the reader packages extended to their tests named in <env>.
|
|
37
|
+
export const testsEtendusDeLEnveloppe = (env = process.env) =>
|
|
38
|
+
env[VARIABLE_TESTS_ETENDUS] ? lireLaListe(env[VARIABLE_TESTS_ETENDUS]) : [];
|
|
39
|
+
|
|
31
40
|
// The packages of the plan of the envelope named in <env>, or null outside an envelope.
|
|
32
41
|
export const paquetsDeLEnveloppe = (env = process.env) =>
|
|
33
42
|
env[VARIABLE] ? lireLaListe(env[VARIABLE]) : null;
|
|
@@ -49,6 +49,10 @@
|
|
|
49
49
|
// even when the index no longer says them in conflict); a conflict the session of the role
|
|
50
50
|
// does not lift goes up to the supervisor, the stop « lancement », each file named. A file
|
|
51
51
|
// without marker left in the copy counts as resolved (put in the index by the circuit).
|
|
52
|
+
// At the launch of a session, the circuit plays the rule too (scripts/seances.mjs `seance`):
|
|
53
|
+
// the launch refused goes to the other role first while files of its own carry marks
|
|
54
|
+
// (`marquesRestantes`), and the sheet FAIT of a session is refused while a file of its role
|
|
55
|
+
// carries them, one the session put in the index with its marks included.
|
|
52
56
|
// - A copy still in conflict (unmerged entries in its index) or whose branch has left main
|
|
53
57
|
// (commits on both sides, no fast-forward) is not touched; the output says why; exit 1. A
|
|
54
58
|
// fast-forward that fails after the work is set aside (an untracked file in the way) gives
|
|
@@ -61,11 +65,25 @@
|
|
|
61
65
|
// when the lot touches one of its files, or one it reads (the copy's untracked files counting),
|
|
62
66
|
// the application leaves its files out (main's version stays), then its command writes them
|
|
63
67
|
// again in the copy, the lot applied, with the tools of the project (`grillhouse.outils`), out
|
|
64
|
-
// of the envelope.
|
|
65
|
-
//
|
|
68
|
+
// of the envelope. The output of a command that passes is a message, never the data of the
|
|
69
|
+
// preparation: it goes where the faults go (stderr, the log of the preparation for the circuit),
|
|
70
|
+
// so the standard output of `preparer` holds the list of its pose alone (BPScript, 2026-11-22:
|
|
71
|
+
// the output of « npm install --package-lock-only » read as the list of the shared submodules,
|
|
72
|
+
// the mount refused on « usage: sous-modules.sh … »). A command that fails stops, exit 1, the
|
|
73
|
+
// command, its code and its output named, the rest of the lot in the copy; a faulty key
|
|
74
|
+
// refuses, named, before the copy is
|
|
66
75
|
// touched (OSC Bridge, 2026-10-31: four conflicts in one day on the generated files of synthhub
|
|
67
76
|
// and open-synth-descriptors, each copy moved by hand). A lot in conflict on another file is not
|
|
68
|
-
// regenerated: its conflicts come first.
|
|
77
|
+
// regenerated: its conflicts come first. A reference the frame generates itself and writes in
|
|
78
|
+
// full (`fichiersEngendres` of the module of the language, its `entiers`: the index of the
|
|
79
|
+
// interfaces, the turbo.json of the packages) follows the same rule, with no key of the project:
|
|
80
|
+
// main's version, then the frame's generator, whose code is not read, a real failure aside
|
|
81
|
+
// (BPScript, 2026-11-22: « UU docs/agents/index-des-interfaces.md » at the advance of two
|
|
82
|
+
// copies). The reports of API (INTERFACE.api.md and the generated part of an INTERFACE.md) and
|
|
83
|
+
// the debt of the guards, which the frame does not give as written in full (no `entiers`), are
|
|
84
|
+
// still merged. A copy whose references the module of the language does not read (no language
|
|
85
|
+
// declared) is advanced all the same, its references merged as files written by hand, and the
|
|
86
|
+
// fault is said: on stderr, in the log of the preparation for the circuit.
|
|
69
87
|
import { spawnSync } from 'node:child_process';
|
|
70
88
|
import { existsSync, readFileSync, rmSync, statSync, writeFileSync, writeSync } from 'node:fs';
|
|
71
89
|
import path from 'node:path';
|
|
@@ -74,6 +92,7 @@ import { couvertPar, encoreDeclares, engendresDe, regenerer, touchesPar } from '
|
|
|
74
92
|
import { avecLesDonnees, donneesDe } from '../donnees-cles.mjs';
|
|
75
93
|
import { matieresDeclareesDe } from '../matieres-cles.mjs';
|
|
76
94
|
import { avecLesOutils, empreintesDe, outilsDe } from '../outils-cles.mjs';
|
|
95
|
+
import { langageDe } from '../langages.mjs';
|
|
77
96
|
|
|
78
97
|
const LOT = 'grillhouse-travail.patch';
|
|
79
98
|
|
|
@@ -89,6 +108,10 @@ const lignes = r =>
|
|
|
89
108
|
// The files of <copie> unmerged in its index.
|
|
90
109
|
const enConflit = copie => lignes(git(copie, ['diff', '--name-only', '--diff-filter=U']));
|
|
91
110
|
|
|
111
|
+
// The files of <copie> its index holds apart from HEAD, a deletion aside: those a session put
|
|
112
|
+
// there, the circuit leaving the index as HEAD has it.
|
|
113
|
+
const aLIndex = copie => lignes(git(copie, ['diff', '--cached', '--name-only', '--diff-filter=d']));
|
|
114
|
+
|
|
92
115
|
// The files the lot <lot> touches in <copie>: each added, modified or deleted, a rename its source
|
|
93
116
|
// and its destination.
|
|
94
117
|
const fichiersDuLot = (copie, lot) =>
|
|
@@ -97,17 +120,53 @@ const fichiersDuLot = (copie, lot) =>
|
|
|
97
120
|
.map(l => (l.includes('\t') ? l.split('\t')[2] : l))
|
|
98
121
|
.filter(Boolean);
|
|
99
122
|
|
|
123
|
+
/**
|
|
124
|
+
* The references the frame generates itself in <copie> and writes in full (`fichiersEngendres` of
|
|
125
|
+
* the module of its language, those with `entiers`: the index of the interfaces, the turbo.json of
|
|
126
|
+
* the packages), as the circuit regenerates them at 4.2; none for a copy the module does not read,
|
|
127
|
+
* whose fault goes to <dire>.
|
|
128
|
+
* @param {string} copie
|
|
129
|
+
* @param {(texte: string) => void} dire
|
|
130
|
+
* @returns {{ nom: string, commande: string, fichiers: string[], lit: string[], entiers: string[] }[]}
|
|
131
|
+
*/
|
|
132
|
+
function referencesEntieresDuCadre(copie, dire) {
|
|
133
|
+
try {
|
|
134
|
+
return langageDe(copie)
|
|
135
|
+
.fichiersEngendres(copie)
|
|
136
|
+
.filter(r => r.entiers.length)
|
|
137
|
+
.map(({ verifier: _verifier, ...reference }) => reference);
|
|
138
|
+
} catch (e) {
|
|
139
|
+
dire(
|
|
140
|
+
`⚠ Les références du cadre ne se lisent pas dans la copie ${copie} : celles qu'il écrit en entier (l'index des interfaces, les turbo.json des paquets) sont fusionnées comme des fichiers écrits à la main.\n${/** @type {Error} */ (e).message}\n`
|
|
141
|
+
);
|
|
142
|
+
return [];
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
// Where a fault that does not refuse the advance is said, by default.
|
|
147
|
+
const surStderr = texte => void process.stderr.write(texte);
|
|
148
|
+
|
|
100
149
|
/**
|
|
101
150
|
* The keys of the project that holds <copie>, read before any work: `{ engendres, env }`, its
|
|
102
|
-
* generated files
|
|
151
|
+
* generated files, then the references the frame writes in full (<duCadre>, each marked `cadre`,
|
|
152
|
+
* but one whose first file a generated file of the project writes), and the environment of their
|
|
153
|
+
* commands with its tools, or `{ refus }`. A fault that refuses nothing goes to <dire>.
|
|
103
154
|
* @param {string} copie
|
|
155
|
+
* @param {(copie: string, dire: (texte: string) => void) => { nom: string, commande: string, fichiers: string[], lit: string[], entiers: string[] }[]} [duCadre]
|
|
156
|
+
* @param {(texte: string) => void} [dire]
|
|
104
157
|
* @returns {{ engendres: any[], env: NodeJS.ProcessEnv, refus?: undefined } | { refus: string }}
|
|
105
158
|
*/
|
|
106
|
-
function lesCles(copie) {
|
|
159
|
+
function lesCles(copie, duCadre = referencesEntieresDuCadre, dire = surStderr) {
|
|
107
160
|
try {
|
|
108
161
|
matieresDeclareesDe(copie);
|
|
162
|
+
const duProjet = engendresDe(copie);
|
|
109
163
|
return {
|
|
110
|
-
engendres:
|
|
164
|
+
engendres: [
|
|
165
|
+
...duProjet,
|
|
166
|
+
...duCadre(copie, dire)
|
|
167
|
+
.filter(c => !duProjet.some(e => couvertPar(e.entiers, c.fichiers[0])))
|
|
168
|
+
.map(c => ({ ...c, cadre: true })),
|
|
169
|
+
],
|
|
111
170
|
env: avecLesDonnees(
|
|
112
171
|
donneesDe(copie),
|
|
113
172
|
avecLesOutils(outilsDe(copie), process.env, empreintesDe(copie))
|
|
@@ -128,14 +187,15 @@ function lesCles(copie) {
|
|
|
128
187
|
* then written again by their command once the lot applies without conflict; `refus`, a command
|
|
129
188
|
* that fails. A generated file the lot removes from the key (`encoreDeclares`) follows the lot
|
|
130
189
|
* instead: its deletion is done, any other change applied as a file of the lot, its command not
|
|
131
|
-
* played.
|
|
190
|
+
* played. The output of a command that passes goes to <dire>.
|
|
132
191
|
* @param {string} copie
|
|
133
192
|
* @param {Buffer} lot
|
|
134
193
|
* @param {{ engendres: any[], env: NodeJS.ProcessEnv } | null} [cles]
|
|
135
194
|
* @param {string[]} [autres]
|
|
195
|
+
* @param {(texte: string) => void} [dire]
|
|
136
196
|
* @returns {{ conflits: string[], enAttente: string[], restant: Buffer, refus?: string | null }}
|
|
137
197
|
*/
|
|
138
|
-
function appliquer(copie, lot, cles = null, autres = []) {
|
|
198
|
+
function appliquer(copie, lot, cles = null, autres = [], dire = surStderr) {
|
|
139
199
|
const fichiers = cles ? [...fichiersDuLot(copie, lot), ...autres] : [];
|
|
140
200
|
const touches = cles ? touchesPar(cles.engendres, fichiers) : [];
|
|
141
201
|
const exclus = fichiers.filter(f => touches.some(e => couvertPar(e.entiers, f)));
|
|
@@ -168,7 +228,13 @@ function appliquer(copie, lot, cles = null, autres = []) {
|
|
|
168
228
|
// The generated files the lot removes from the key follow the lot: main's version is not kept.
|
|
169
229
|
// A package.json left in conflict is read at the two versions of its conflict in the index.
|
|
170
230
|
const etage = n => String(git(copie, ['show', `:${n}:package.json`]).stdout);
|
|
171
|
-
|
|
231
|
+
// A reference of the frame is always declared: no key of the project names it.
|
|
232
|
+
const declares = encoreDeclares(
|
|
233
|
+
touches.filter(e => !e.cadre),
|
|
234
|
+
copie,
|
|
235
|
+
() => ({ base: etage(1), lot: etage(3) })
|
|
236
|
+
);
|
|
237
|
+
const vivants = touches.filter(e => e.cadre || declares.includes(e));
|
|
172
238
|
for (const { morceau, noms } of laisses) {
|
|
173
239
|
if (noms.every(f => vivants.some(e => couvertPar(e.entiers, f)))) {
|
|
174
240
|
continue;
|
|
@@ -187,7 +253,7 @@ function appliquer(copie, lot, cles = null, autres = []) {
|
|
|
187
253
|
return { conflits, enAttente, restant };
|
|
188
254
|
}
|
|
189
255
|
const refus = regenerer({
|
|
190
|
-
refs: vivants.map(e => ({ ...e, cadre:
|
|
256
|
+
refs: vivants.map(e => ({ ...e, cadre: Boolean(e.cadre) })),
|
|
191
257
|
lancer: commande =>
|
|
192
258
|
spawnSync('bash', ['-c', commande], {
|
|
193
259
|
cwd: copie,
|
|
@@ -196,6 +262,8 @@ function appliquer(copie, lot, cles = null, autres = []) {
|
|
|
196
262
|
maxBuffer: 1024 * 1024 * 1024,
|
|
197
263
|
}),
|
|
198
264
|
dansCopie: (...args) => spawnSync('git', ['-C', copie, ...args], { encoding: 'utf8' }),
|
|
265
|
+
// A command that says nothing leaves no message.
|
|
266
|
+
ecrire: sortie => void (sortie && dire(sortie)),
|
|
199
267
|
});
|
|
200
268
|
return { conflits, enAttente, restant, refus };
|
|
201
269
|
}
|
|
@@ -219,6 +287,26 @@ function porteDesMarques(copie, f) {
|
|
|
219
287
|
return existsSync(chemin) && /^(<{7}|>{7}) /m.test(readFileSync(chemin, 'latin1'));
|
|
220
288
|
}
|
|
221
289
|
|
|
290
|
+
/**
|
|
291
|
+
* The files of <copie> that still carry the marks of a conflict: those unmerged in its index, those
|
|
292
|
+
* its index holds apart from HEAD (a file a session put in the index with its marks, after a
|
|
293
|
+
* conflict the launcher's advance posed, is no longer unmerged), as pre-commit's
|
|
294
|
+
* check-merge-conflict reads the staged files, and those of <suspects> (the files an earlier
|
|
295
|
+
* advance left in conflict, which the index may no longer say so). Nothing is written: a session's
|
|
296
|
+
* sheet and a refused launch are judged on it.
|
|
297
|
+
* @param {string} copie
|
|
298
|
+
* @param {string[]} [suspects]
|
|
299
|
+
* @returns {string[]}
|
|
300
|
+
*/
|
|
301
|
+
export function marquesRestantes(copie, suspects = []) {
|
|
302
|
+
if (!existsSync(copie)) {
|
|
303
|
+
return [];
|
|
304
|
+
}
|
|
305
|
+
return [...new Set([...enConflit(copie), ...aLIndex(copie), ...suspects])].filter(f =>
|
|
306
|
+
porteDesMarques(copie, f)
|
|
307
|
+
);
|
|
308
|
+
}
|
|
309
|
+
|
|
222
310
|
// The files of <copie> that carry no conflict marker any more, among those unmerged: the work of a
|
|
223
311
|
// session that resolved them. Each goes to the index as resolved; the index is then left as HEAD has
|
|
224
312
|
// it once no conflict remains.
|
|
@@ -267,20 +355,22 @@ export function ecritPar(role, estUnTest) {
|
|
|
267
355
|
}
|
|
268
356
|
|
|
269
357
|
/**
|
|
270
|
-
* The lot from <base> to <pointe> as local work of <copie>; returns `{ ok, message }`.
|
|
358
|
+
* The lot from <base> to <pointe> as local work of <copie>; returns `{ ok, message }`. <dire>
|
|
359
|
+
* receives a fault that does not refuse the lot, and the output of the command of a generated file
|
|
360
|
+
* played again (stderr by default).
|
|
271
361
|
* @param {string} copie
|
|
272
|
-
* @param {{ base: string, pointe: string }} o
|
|
362
|
+
* @param {{ base: string, pointe: string, duCadre?: (copie: string) => any[], dire?: (texte: string) => void }} o
|
|
273
363
|
*/
|
|
274
|
-
export function reporter(copie, { base, pointe }) {
|
|
364
|
+
export function reporter(copie, { base, pointe, duCadre, dire = surStderr }) {
|
|
275
365
|
const d = git(copie, ['diff', '--binary', base, pointe]);
|
|
276
366
|
if (d.status !== 0) {
|
|
277
367
|
return { ok: false, message: `⛔ Le lot de ${base} à ${pointe} ne se lit pas : ${texte(d)}` };
|
|
278
368
|
}
|
|
279
|
-
const cles = lesCles(copie);
|
|
369
|
+
const cles = lesCles(copie, duCadre, dire);
|
|
280
370
|
if (cles.refus !== undefined) {
|
|
281
371
|
return { ok: false, message: cles.refus };
|
|
282
372
|
}
|
|
283
|
-
const a = appliquer(copie, d.stdout, cles);
|
|
373
|
+
const a = appliquer(copie, d.stdout, cles, [], dire);
|
|
284
374
|
if (a.enAttente.length) {
|
|
285
375
|
return {
|
|
286
376
|
ok: false,
|
|
@@ -307,11 +397,13 @@ const conflit = (copie, conflits, entete) =>
|
|
|
307
397
|
* lot waiting is accepted (`ok`) when that role writes one of their files. <suspects>, the files
|
|
308
398
|
* an earlier advance left in conflict: one that still carries its marks counts as in conflict,
|
|
309
399
|
* even when the index no longer says so (a session wrote it, or put it in the index, unresolved).
|
|
400
|
+
* <dire> receives a fault that does not refuse the advance, and the output of the command of a
|
|
401
|
+
* generated file played again (stderr by default).
|
|
310
402
|
* @param {string} copie
|
|
311
403
|
* @param {string} cible
|
|
312
|
-
* @param {{ ecrit?: (fichier: string) => boolean, suspects?: string[] }} [o]
|
|
404
|
+
* @param {{ ecrit?: (fichier: string) => boolean, suspects?: string[], duCadre?: (copie: string) => any[], dire?: (texte: string) => void }} [o]
|
|
313
405
|
*/
|
|
314
|
-
export function avancer(copie, cible, { ecrit, suspects = [] } = {}) {
|
|
406
|
+
export function avancer(copie, cible, { ecrit, suspects = [], duCadre, dire = surStderr } = {}) {
|
|
315
407
|
releverLesResolus(copie);
|
|
316
408
|
const restants = [
|
|
317
409
|
...new Set([...enConflit(copie), ...suspects.filter(f => porteDesMarques(copie, f))]),
|
|
@@ -358,7 +450,7 @@ export function avancer(copie, cible, { ecrit, suspects = [] } = {}) {
|
|
|
358
450
|
enAttente: siens(attendus),
|
|
359
451
|
};
|
|
360
452
|
}
|
|
361
|
-
const cles = lesCles(copie);
|
|
453
|
+
const cles = lesCles(copie, duCadre, dire);
|
|
362
454
|
if (cles.refus !== undefined) {
|
|
363
455
|
return { ok: false, message: cles.refus };
|
|
364
456
|
}
|
|
@@ -413,7 +505,7 @@ export function avancer(copie, cible, { ecrit, suspects = [] } = {}) {
|
|
|
413
505
|
};
|
|
414
506
|
}
|
|
415
507
|
const libres = lignes(git(copie, ['ls-files', '--others', '--exclude-standard']));
|
|
416
|
-
const { conflits, enAttente, restant, refus } = appliquer(copie, d.stdout, cles, libres);
|
|
508
|
+
const { conflits, enAttente, restant, refus } = appliquer(copie, d.stdout, cles, libres, dire);
|
|
417
509
|
if (enAttente.length) {
|
|
418
510
|
writeFileSync(garde, restant);
|
|
419
511
|
} else {
|
|
@@ -460,7 +552,9 @@ const SOUS_MODULES = path.join(import.meta.dirname, '..', 'sous-modules.sh');
|
|
|
460
552
|
* Prepares <copie> for a pass or a session (see the header, `preparer`): with <cible>, the guard of
|
|
461
553
|
* its submodules and its advance to <cible>; then the pose of its submodules, the check of their
|
|
462
554
|
* read-only mount, and the installation when the lock file is newer than it. The output of each
|
|
463
|
-
* command
|
|
555
|
+
* command, the command of a generated file the advance plays again included, and a fault of the
|
|
556
|
+
* advance that does not refuse it, go to the file descriptor <sortie>; returns
|
|
557
|
+
* `{ ok, message, partages }`.
|
|
464
558
|
* @param {string} copie
|
|
465
559
|
* @param {string | null} cible
|
|
466
560
|
* @param {{ env?: NodeJS.ProcessEnv, sortie?: number, ecrit?: (fichier: string) => boolean,
|
|
@@ -490,7 +584,11 @@ export function preparer(copie, cible, { env = process.env, sortie = 2, ecrit, s
|
|
|
490
584
|
if (g.status !== 0) {
|
|
491
585
|
return echec(g, 'La garde des sous-modules');
|
|
492
586
|
}
|
|
493
|
-
const a = avancer(copie, cible, {
|
|
587
|
+
const a = avancer(copie, cible, {
|
|
588
|
+
ecrit,
|
|
589
|
+
suspects,
|
|
590
|
+
dire: texte => void writeSync(sortie, texte),
|
|
591
|
+
});
|
|
494
592
|
if (!a.ok) {
|
|
495
593
|
return { ...a, partages: '' };
|
|
496
594
|
}
|
package/scripts/etapes.mjs
CHANGED
|
@@ -227,7 +227,7 @@ export const GESTES = [
|
|
|
227
227
|
genre: 'rien-a-livrer',
|
|
228
228
|
geste: 'aux contrôles, qui jugent le lot',
|
|
229
229
|
regle:
|
|
230
|
-
'un développeur qui ne change aucun fichier du plan n’a rien à livrer quand les contrôles sont verts ; rouges, l’arrêt monte (sans-livraison), sauf le rouge d’une référence que le lot fait baisser, la dette des gardes, qui se régénère au lieu d’arrêter ; sur le lot que l’intégration refuse, pour un développeur que --depuis developpeur lance, le geste ne joue pas : il est relancé une fois avec le refus',
|
|
230
|
+
'un développeur qui ne change aucun fichier du plan n’a rien à livrer quand les contrôles sont verts ; rouges, l’arrêt monte (sans-livraison), sauf le rouge d’une référence que le lot fait baisser, la dette des gardes, qui se régénère au lieu d’arrêter, et le rouge qui nomme un fichier de test du lot, qui va au testwriter ; sur le lot que l’intégration refuse, pour un développeur que --depuis developpeur lance, le geste ne joue pas : il est relancé une fois avec le refus',
|
|
231
231
|
cas: 'BP 320.9 : 995-tools n’a rien à livrer, 4 montées et 49 min (B5)',
|
|
232
232
|
},
|
|
233
233
|
{
|
|
@@ -259,7 +259,7 @@ export const RESPONSABLE = 'responsable';
|
|
|
259
259
|
// The commands by which the supervisor answers a question (scripts/circuit.mjs): resume, extend
|
|
260
260
|
// the plan, stop.
|
|
261
261
|
export const REPONSES =
|
|
262
|
-
'Le superviseur répond par une commande du circuit : `--reprendre` (avec `--contexte`) ou `--depuis <testwriter|developpeur>` (avec `--contexte`), `--mecanique [<commande>]` (avec `--contexte` : à l’arrêt du testwriter qui ne trouve aucun comportement à tester, le ticket bascule en circuit court sur le même plan, vers 1.1 avec sa commande, vers le développeur sans elle), `--etendre <paquet>` (le plan gagne ce paquet, puis l’étape en cours reprend), `--reporter <heure>` (la question se tait jusqu’à l’heure, le circuit en attente), ou `--arreter`.';
|
|
262
|
+
'Le superviseur répond par une commande du circuit : `--reprendre` (avec `--contexte`) ou `--depuis <testwriter|developpeur>` (avec `--contexte`), `--mecanique [<commande>]` (avec `--contexte` : à l’arrêt du testwriter qui ne trouve aucun comportement à tester, ou de la preuve du rouge qui refuse le lot de tests, le ticket bascule en circuit court sur le même plan, vers 1.1 avec sa commande, vers le développeur sans elle), `--etendre <paquet>` (le plan gagne ce paquet, puis l’étape en cours reprend), `--reporter <heure>` (la question se tait jusqu’à l’heure, le circuit en attente), ou `--arreter`.';
|
|
263
263
|
|
|
264
264
|
// The question of each stop no gesture settles, as a CI calls a person only for what no rule
|
|
265
265
|
// settles (the approval of a review): every stop of ARRETS, « a-repasser » once the circuit has
|
|
@@ -279,7 +279,7 @@ export const MONTEES = Object.fromEntries(
|
|
|
279
279
|
'sans-fiche':
|
|
280
280
|
'La séance finit deux fois sans fiche conforme : reprendre l’étape, ou arrêter le circuit ?',
|
|
281
281
|
preuve:
|
|
282
|
-
'La troisième preuve du rouge refuse le lot de tests : quel contexte donner au testwriter, ou le plan doit-il changer ?',
|
|
282
|
+
'La troisième preuve du rouge refuse le lot de tests : quel contexte donner au testwriter, le lot n’a-t-il aucun comportement à prouver (`--mecanique`), ou le plan doit-il changer ?',
|
|
283
283
|
controles:
|
|
284
284
|
'Un rouge reste, que le circuit ne rend pas au développeur (hors du plan, sans fichier, à arbitrer, le lot d’un geste mécanique), ou que trois séances n’ont pas levé : avec quel contexte le lever, ou le plan doit-il s’étendre ?',
|
|
285
285
|
'sans-livraison':
|
|
@@ -95,6 +95,7 @@ import {
|
|
|
95
95
|
ouvrirLeDefautDeMain,
|
|
96
96
|
} from './ci-de-main.mjs';
|
|
97
97
|
|
|
98
|
+
import { rougesDUnePasse } from './activites.mjs';
|
|
98
99
|
import { ecrireLEffet } from './effets.mjs';
|
|
99
100
|
import { Arret, commenter, geste } from './ticket-du-circuit.mjs';
|
|
100
101
|
import { arretDeLaLimiteDUsage, MEMOIRE } from './transitions.mjs';
|
|
@@ -154,9 +155,14 @@ function leContexte(ticket, memoire = {}, options = {}) {
|
|
|
154
155
|
|
|
155
156
|
// The tools of the queue on the main tree <racine> (the act plays there), its lines on the error
|
|
156
157
|
// output, the progress directory <avancement> of a reading of the CI, the effects it emits
|
|
157
|
-
// gathered (`rendus`), which the act gives back.
|
|
158
|
+
// gathered (`rendus`), which the act gives back. Its final pass reads its reds as the checks of the
|
|
159
|
+
// circuit do (`rougesDUnePasse`), the port every tool of the queue is built with.
|
|
160
|
+
const outilsDeLActe = (racine, avancement = null) =>
|
|
161
|
+
outilsDeLaFile(racine, l => process.stderr.write(`${l}\n`), avancement, {
|
|
162
|
+
rouges: rougesDUnePasse,
|
|
163
|
+
});
|
|
158
164
|
const laFile = (racine, avancement = null) => {
|
|
159
|
-
const o =
|
|
165
|
+
const o = outilsDeLActe(racine, avancement);
|
|
160
166
|
o.rendus = [];
|
|
161
167
|
return o;
|
|
162
168
|
};
|
|
@@ -180,7 +186,7 @@ const arretDeLEtat = (ctx, code, etat) => ({
|
|
|
180
186
|
});
|
|
181
187
|
|
|
182
188
|
// The options of a run on the supervisor's answer <reponse>.
|
|
183
|
-
const optionsDe = reponse => {
|
|
189
|
+
export const optionsDe = reponse => {
|
|
184
190
|
if (!reponse) {
|
|
185
191
|
return {};
|
|
186
192
|
}
|
|
@@ -499,14 +505,9 @@ Object.assign(ACTES, {
|
|
|
499
505
|
// One effect an act of the queue gave back, under the key of its activity, with the outcome of
|
|
500
506
|
// the queue when it is not written (`ecrireLEffet`).
|
|
501
507
|
async 'effet-de-la-file'({ racine, effet, cle, derniere }) {
|
|
502
|
-
ecrireLEffet(
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
cle,
|
|
506
|
-
{
|
|
507
|
-
reessayer: derniere === false,
|
|
508
|
-
}
|
|
509
|
-
);
|
|
508
|
+
ecrireLEffet(outilsDeLActe(racine), effet, cle, {
|
|
509
|
+
reessayer: derniere === false,
|
|
510
|
+
});
|
|
510
511
|
return null;
|
|
511
512
|
},
|
|
512
513
|
});
|