@roomi-fields/grillhouse 0.28.0 → 0.28.2

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.
@@ -90,6 +90,15 @@
90
90
  // passes (`plan`, its fingerprint: its title and its criteria); a plan that passed, its title
91
91
  // and criteria unchanged since, passes with no session, whatever else of its description
92
92
  // changed.
93
+ // - The sheet of the plan names what a component publishes to another (`noms_publies`: the
94
+ // provider, each consumer, its names), which the circuit writes in the description (« ## Noms
95
+ // publiés », after the sort), written again at each plan from the explorateur's last sheet (an
96
+ // empty list erases it, a sheet without the field keeps the section the description holds), as
97
+ // a code owner's approval covers what it reviewed: the guard of the consumers
98
+ // (scripts/langages/typescript/consommateurs-arbitres.mjs) reads that section, and a lot that
99
+ // adds those names to the provider's « Consommateurs » lines passes it with no arbitrage
100
+ // (grillhouse-la3, BPScript 320.14.2.10: a criterion alone named them, the guard refused the
101
+ // lot, and the supervisor wrote the section by hand before a new session).
93
102
  // - The sheet of the plan says the sort of the ticket (`sorte`, read by `sorteDuPlan` of
94
103
  // scripts/resultats.mjs, from the explorateur's last sheet of the plan), which the circuit
95
104
  // writes in the description (« ## Sorte », after the criteria) and at the ticket with the plan:
@@ -323,11 +332,15 @@
323
332
  // final pass, as `--update-snapshots` leaves every failure but the snapshots to its owner; its
324
333
  // finding without a file, or on a file the reference covers, stays the regeneration's (BPScript
325
334
  // 320.10: a word of library written in 030-binder, sent to no developpeur). Checks of the
326
- // plan green but for reds of references call for it too, before the final pass, as make
327
- // remakes a generated file before what reads it: the final pass that is due then plays once, on
328
- // the regenerated tree, and does not regenerate again a reference regenerated on that same tree
329
- // (BPScript 320.3.9: the ceiling of the words, red at the checks, left to the final pass, which
330
- // played the same tests again on the same tree for 6.1 min before regenerating). The circuit
335
+ // plan with a red of a reference, mixed with other reds or not, call for it too, before any red
336
+ // goes to the developpeur, as Bazel builds a genrule before the tests that read it: beside
337
+ // other reds, the checks of the plan play again on the regenerated tree, which judges a test
338
+ // that reads the reference (BPScript 320.6.5: a test that reads the hash the turbo.json declare,
339
+ // red beside their guard, went to a developpeur who had nothing to deliver, then could not write
340
+ // them); alone, the final pass that is due plays once, on the regenerated tree. Neither
341
+ // regenerates again a reference regenerated on that same tree (BPScript 320.3.9: the ceiling of
342
+ // the words, red at the checks, left to the final pass, which played the same tests again on
343
+ // the same tree for 6.1 min before regenerating). The circuit
331
344
  // keeps the copy as a lot, runs the command of each reference concerned on the whole copy (the
332
345
  // debt lowered from the notes of the pass, its guards not played again), out of the envelope,
333
346
  // under the lock of the machine, its output added to the log, then, as make remakes the targets
@@ -348,9 +361,9 @@
348
361
  // the regeneration, a question for the supervisor that carries each deviation (the command and
349
362
  // its code, the file), as the comment at the ticket does; the state keeps the references to regenerate and the reds of the
350
363
  // pass before (`aRegenerer`), for a regeneration resumed. A command of the project that refuses
351
- // (no real failure), its only deviation, after a final pass that carries reds of the plan,
364
+ // (no real failure), its only deviation, after a pass (the checks of the plan or the final pass) that carries reds of the plan,
352
365
  // judges the lot, as a ceiling refuses a lot beyond it: the copy restored, those reds go to the
353
- // developpeur with the end of its output, within his sessions, then the final pass again.
366
+ // developpeur with the end of its output, within his sessions, then that pass again.
354
367
  // - The proof, the checks and the final pass are heavy passes: each holds the lock of the machine
355
368
  // (scripts/verrou-de-machine.mjs), shared by every repository of the machine, and waits, the
356
369
  // wait written to the log, while another measure holds it; the wait bounded, the pass is at 75,
@@ -1969,18 +1982,19 @@ function referencesDesRouges(ctx, lieux, aElaguer = false) {
1969
1982
  // another one has just written runs after it, once for each reference whose writing calls for it;
1970
1983
  // then the copy kept again on that lot. `{ texte, regenerees, fichiers, restreinte }`: the report,
1971
1984
  // the names of the references changed, the files changed, and the range of the final pass that
1972
- // follows (null when nothing changed: no pass plays again, and the reds stand); with
1973
- // <avantLaPasse>, the regeneration the checks of the plan call for, the final pass that is due
1974
- // follows, whole or since the last review. A file a reference writes follows from the lot, as
1985
+ // follows (null when nothing changed: no pass plays again, and the reds stand); <suite>, the
1986
+ // regeneration the checks of the plan call for: `controles`, beside other reds, the checks of the
1987
+ // plan follow, on the regenerated tree; `passe`, without, the final pass that is due follows,
1988
+ // whole or since the last review; null after a final pass. A file a reference writes follows from the lot, as
1975
1989
  // the output of a genrule, without a word of the plan, and the reviewer reads its difference; a
1976
1990
  // file changed that none of the references run declares, or a command that fails (a reference of
1977
1991
  // the project at another code than 0, one of the frame on a real failure alone) restores the copy
1978
1992
  // as it was and stops at « references », each deviation in its question. With <refusAuLot>, the
1979
- // final pass that called for it carries reds of the plan: a command of the project that refuses
1993
+ // pass that called for it (the checks of the plan or the final pass) carries reds of the plan: a command of the project that refuses
1980
1994
  // (another code than 0, no real failure), its only deviation, judges the lot, as a ceiling that
1981
1995
  // never rises refuses a lot beyond it; the copy restored, `{ refus }` gives the report of each
1982
1996
  // refusal with the end of its output, for the developpeur (BPScript 320.10).
1983
- function regenerer(ctx, noms, notes = [], avantLaPasse = false, refusAuLot = false) {
1997
+ function regenerer(ctx, noms, notes = [], suite = null, refusAuLot = false) {
1984
1998
  // The notes of the debt, in a file of the run, which the command that lowers it reads.
1985
1999
  const fichierDesNotes = path.join(ctx.base.dossier, 'dette-a-abaisser.json');
1986
2000
  const toutes = lesReferences(ctx).map(r =>
@@ -2063,7 +2077,13 @@ function regenerer(ctx, noms, notes = [], avantLaPasse = false, refusAuLot = fal
2063
2077
  }
2064
2078
  if (!fichiers.length) {
2065
2079
  return {
2066
- texte: `La régénération (${refs.map(r => `${r.nom}, \`${r.commande}\``).join(' ; ')}) ne change aucun fichier : ${avantLaPasse ? 'la passe finale juge le lot tel quel' : 'aucune passe ne rejoue, et les rouges de la passe finale restent, chacun à son propriétaire'}.`,
2080
+ texte: `La régénération (${refs.map(r => `${r.nom}, \`${r.commande}\``).join(' ; ')}) ne change aucun fichier : ${
2081
+ suite === 'passe'
2082
+ ? 'la passe finale juge le lot tel quel'
2083
+ : suite === 'controles'
2084
+ ? 'les contrôles ne rejouent pas, et leurs rouges restent, chacun à son propriétaire'
2085
+ : 'aucune passe ne rejoue, et les rouges de la passe finale restent, chacun à son propriétaire'
2086
+ }.`,
2067
2087
  regenerees: [],
2068
2088
  fichiers,
2069
2089
  restreinte: null,
@@ -2071,7 +2091,13 @@ function regenerer(ctx, noms, notes = [], avantLaPasse = false, refusAuLot = fal
2071
2091
  }
2072
2092
  return {
2073
2093
  texte: [
2074
- `Les références régénérées sur la copie entière : ${regenerees.map(r => r.nom).join(', ')} ; le lot porte leurs fichiers, puis la passe finale${avantLaPasse ? '' : " restreinte à ce qu'elles changent"}.`,
2094
+ `Les références régénérées sur la copie entière : ${regenerees.map(r => r.nom).join(', ')} ; le lot porte leurs fichiers, puis ${
2095
+ suite === 'controles'
2096
+ ? "les contrôles du plan, sur l'arbre régénéré"
2097
+ : suite === 'passe'
2098
+ ? 'la passe finale'
2099
+ : "la passe finale restreinte à ce qu'elles changent"
2100
+ }.`,
2075
2101
  '',
2076
2102
  ...regenerees.map(r => `- ${r.nom} (\`${r.commande}\`) : ${siens(r).join(', ')}`),
2077
2103
  '',
@@ -2301,25 +2327,26 @@ export function arretDuTestwriterSaute(ctx, texte) {
2301
2327
  );
2302
2328
  }
2303
2329
 
2304
- // The sheet of the plan that says the sort among the explorateur's sheets of the plan <plans>, in
2305
- // their order (`{ fiche, reponse }` entries): the last one, or, when it is his answer to the
2306
- // questionneur (`reponse`) and says none, the plan it answers, so that the sort survives the
2307
- // answer; null without a sheet of the plan.
2308
- export function ficheDeLaSorte(plans) {
2330
+ // The sheet of the plan that says its field <champ> (`sorte`, `noms_publies`) among the
2331
+ // explorateur's sheets of the plan <plans>, in their order (`{ fiche, reponse }` entries): the last
2332
+ // one, or, when it is his answer to the questionneur (`reponse`) and says none, the plan it
2333
+ // answers, so that the field survives the answer; null without a sheet of the plan.
2334
+ export function ficheDuPlan(plans, champ) {
2309
2335
  const derniere = plans.at(-1);
2310
2336
  if (!derniere) return null;
2311
- if (derniere.reponse && !('sorte' in derniere.fiche) && plans.length > 1) {
2337
+ if (derniere.reponse && !(champ in derniere.fiche) && plans.length > 1) {
2312
2338
  return plans.at(-2).fiche;
2313
2339
  }
2314
2340
  return derniere.fiche;
2315
2341
  }
2316
2342
 
2317
2343
  // The sort of the ticket its plan says (`sorteDuPlan` of scripts/resultats.mjs): the sheet of the
2318
- // plan that says it (`ficheDeLaSorte`), comportement without one (grillhouse-sos).
2344
+ // plan that says it (`ficheDuPlan`), comportement without one (grillhouse-sos).
2319
2345
  const sorteDuTicket = ctx =>
2320
2346
  sorteDuPlan(
2321
- ficheDeLaSorte(
2322
- lesFiches(ctx).filter(e => e.role === EXPLORATEUR && Array.isArray(e.fiche?.criteres))
2347
+ ficheDuPlan(
2348
+ lesFiches(ctx).filter(e => e.role === EXPLORATEUR && Array.isArray(e.fiche?.criteres)),
2349
+ 'sorte'
2323
2350
  )
2324
2351
  );
2325
2352
 
@@ -3196,10 +3223,10 @@ const ligneDeCommande = c =>
3196
3223
  // verifier`, what the integration plays (4.1), restricted by <restreinte> (`{ avant, apres }`, two
3197
3224
  // lots kept) to the packages that changed from one to the other and their dependents, with the
3198
3225
  // root's tasks, the guards (`--filter=...[<avant>...<apres>] --filter=//`). After a regeneration,
3199
- // <reportes> (`{ rouges, rejouee }`) carries the reds of the final pass before it: each one in a
3200
- // package the pass restricted to the regeneration does not play again stands, as a CI keeps the
3201
- // verdict of a job it does not run again; when the regeneration changes nothing (`rejouee`
3202
- // false), no command plays, and they all stand. `{ rouge, aRepasser, arbitrer, auDeveloppeur,
3226
+ // <reportes> (`{ rouges, rejouee }`) carries the reds of the pass before it, the final pass or the
3227
+ // checks of the plan: each one in a package the pass after the regeneration does not play again
3228
+ // stands, as a CI keeps the verdict of a job it does not run again; when the regeneration changes
3229
+ // nothing (`rejouee` false), no command plays, and they all stand. `{ rouge, aRepasser, arbitrer, auDeveloppeur,
3203
3230
  // texte, complet, resume, horsTitre, lieux, tous, notes, avertissements }`: `texte` the report for
3204
3231
  // the developpeur, his reds first; `complet` every red, for a stop, and the warnings;
3205
3232
  // `avertissements` the section of the warnings and notes of the guards, which are no reds, for the
@@ -3208,7 +3235,7 @@ const ligneDeCommande = c =>
3208
3235
  // when every red of the plan is a finding to settle; `lieux` the place of each red, `{ fichier,
3209
3236
  // gardes, dansLePlan }`, its file (null for a red without one), the names its finding carries
3210
3237
  // (none for a test or a task), and whether a path of the plan holds it; `references`, out of the final pass, the references whose reds the checks saw,
3211
- // which their regeneration lifts before the final pass; `tous` every red as it was read; `notes`,
3238
+ // which their regeneration lifts before the checks judge the lot again, or before the final pass; `tous` every red as it was read; `notes`,
3212
3239
  // at the final pass, each key of the debt a guard wrote inscribed above what it finds, `{ garde,
3213
3240
  // fichier, regle, trouve }`.
3214
3241
  function controles(ctx, finale, restreinte = null, reportes = null) {
@@ -3248,7 +3275,7 @@ function controles(ctx, finale, restreinte = null, reportes = null) {
3248
3275
  ),
3249
3276
  ];
3250
3277
  // Out of the final pass, the reds of the plan are the developpeur's; a red of a reference goes to
3251
- // its regeneration (4.2), before the final pass; the others (the root, a red no file situates, a
3278
+ // its regeneration (4.2), before any red goes to him; the others (the root, a red no file situates, a
3252
3279
  // package out of the plan) wait for the final pass.
3253
3280
  const lieu = r => ({
3254
3281
  fichier: r.fichier ?? null,
@@ -3271,18 +3298,14 @@ function controles(ctx, finale, restreinte = null, reportes = null) {
3271
3298
  ? `rouge : ${rouges.length} rouge(s) — ${
3272
3299
  commandes.length
3273
3300
  ? enEchec.map(nommer).join(' ; ')
3274
- : "ceux de la passe finale d'avant, que la régénération ne change pas"
3301
+ : `ceux ${finale ? "de la passe finale d'avant" : "des contrôles d'avant"}, que la régénération ne change pas`
3275
3302
  }`
3276
3303
  : aRepasser.length
3277
3304
  ? `à repasser : ${aRepasser.map(nommer).join(' ; ')}`
3278
- : `verts : ${commandes.length ? resultats.map(ligneDeCommande).join(' ; ') : "la passe finale d'avant"}${
3305
+ : `verts : ${commandes.length ? resultats.map(ligneDeCommande).join(' ; ') : finale ? "la passe finale d'avant" : "les contrôles d'avant"}${
3279
3306
  laisses.length
3280
3307
  ? ` ; laissés à la passe finale, ${laisses.length} rouge(s) hors du plan`
3281
3308
  : ''
3282
- }${
3283
- references.length
3284
- ? ` ; des rouges sont ceux de références, à leur régénération avant la passe finale (${references.map(r => r.nom).join(', ')})`
3285
- : ''
3286
3309
  }`;
3287
3310
  // Where the checks played: the final pass out of the envelope, on the whole copy or restricted
3288
3311
  // to what changed since the last review; the checks of the plan, its tests and packages, its
@@ -3716,8 +3739,9 @@ async function derouler(ctx, debut) {
3716
3739
  const passeFinale = finale;
3717
3740
  // The final pass: after a regeneration of the references, restricted to what it changed,
3718
3741
  // the reds of the pass before it carried (none plays when it changed nothing); else whole,
3719
- // or restricted to what changed since the last review.
3720
- const regeneration = passeFinale ? (ctx.regeneration ?? null) : null;
3742
+ // or restricted to what changed since the last review. The checks of the plan after a
3743
+ // regeneration that changed nothing: none plays, the reds of the checks before standing.
3744
+ const regeneration = ctx.regeneration ?? null;
3721
3745
  ctx.regeneration = null;
3722
3746
  const passe = !passeFinale
3723
3747
  ? { arbre: null, restreinte: null }
@@ -3762,7 +3786,53 @@ async function derouler(ctx, debut) {
3762
3786
  r => !dejaRegenerees.includes(r.nom)
3763
3787
  )
3764
3788
  : [];
3765
- if (aRegenerer.length) {
3789
+ // The checks of the plan with a red of a reference, mixed with others or not: its
3790
+ // regeneration before any red goes to the developpeur, as Bazel builds a genrule before the
3791
+ // tests that read it, but for a reference regenerated on this same tree; mixed with other
3792
+ // reds, the checks of the plan play again on the regenerated tree, which judges a test
3793
+ // that reads the reference; alone, the final pass that is due (BPScript 320.6.5: a test
3794
+ // that reads the turbo.json, red beside their guard, sent to the developpeur, who could not
3795
+ // write them).
3796
+ const regenereesAuxControles =
3797
+ !passeFinale && k.references.length && ctx.regenereSur?.arbre === arbreDeLaCopie(ctx)
3798
+ ? ctx.regenereSur.noms
3799
+ : [];
3800
+ const avantLesControles = passeFinale
3801
+ ? []
3802
+ : k.references.filter(r => !regenereesAuxControles.includes(r.nom));
3803
+ if (avantLesControles.length) {
3804
+ const noms = avantLesControles.map(r => r.nom);
3805
+ const meles = k.rouge || k.aRepasser;
3806
+ geste(ctx, 'regeneration');
3807
+ const phrase = `${k.resume} ; des rouges sont ceux de références (${noms.join(', ')}) : à leur régénération, puis ${meles ? 'les contrôles du plan' : 'la passe finale'}.`;
3808
+ ecrireRapport(
3809
+ ctx,
3810
+ 'controles',
3811
+ phrase,
3812
+ resultat(meles ? 'rouge' : 'vert'),
3813
+ meles ? `${k.texte}${k.avertissements}` : `${phrase}${k.avertissements}`
3814
+ );
3815
+ // Mixed, the developpeur who had nothing to deliver, for the checks of the plan that
3816
+ // follow; green, the final pass, its sessions counted apart, which a developpeur with
3817
+ // nothing to deliver before green checks does not concern.
3818
+ if (meles) {
3819
+ ctx.rienALivrer = rien;
3820
+ } else {
3821
+ ctx.renvoiAuTestwriter = null;
3822
+ tentative = 0;
3823
+ }
3824
+ // The report of the reds of the plan, which go to the developpeur when a command of the
3825
+ // project refuses the lot, as at the final pass (BPScript 320.10).
3826
+ ctx.aRegenerer = {
3827
+ noms,
3828
+ notes: [],
3829
+ suite: meles ? 'controles' : 'passe',
3830
+ rouges: meles ? k.tous : [],
3831
+ auDeveloppeur: meles && k.auDeveloppeur && !k.arbitrer ? k.texte : null,
3832
+ };
3833
+ etape = REFERENCES;
3834
+ finale = true;
3835
+ } else if (aRegenerer.length) {
3766
3836
  const noms = aRegenerer.map(r => r.nom);
3767
3837
  geste(ctx, 'regeneration');
3768
3838
  ecrireRapport(
@@ -3821,27 +3891,6 @@ async function derouler(ctx, debut) {
3821
3891
  arreter('controles', null);
3822
3892
  } else if (k.aRepasser) {
3823
3893
  arreter('a-repasser', null);
3824
- } else if (!passeFinale && k.references.length) {
3825
- // The checks green but for reds of references: their regeneration, then the final pass,
3826
- // which plays once, on the regenerated tree, as make remakes a generated file before
3827
- // what reads it.
3828
- geste(ctx, 'regeneration');
3829
- ecrireRapport(
3830
- ctx,
3831
- 'controles',
3832
- `${k.resume}.`,
3833
- resultat('vert'),
3834
- `${k.resume}.${k.avertissements}`
3835
- );
3836
- ctx.renvoiAuTestwriter = null;
3837
- ctx.aRegenerer = {
3838
- noms: k.references.map(r => r.nom),
3839
- notes: [],
3840
- avantLaPasse: true,
3841
- };
3842
- etape = REFERENCES;
3843
- tentative = 0;
3844
- finale = true;
3845
3894
  } else {
3846
3895
  ecrireRapport(
3847
3896
  ctx,
@@ -3873,7 +3922,8 @@ async function derouler(ctx, debut) {
3873
3922
  }
3874
3923
  } else if (etape === REFERENCES) {
3875
3924
  // The references to regenerate and the reds of the pass before, kept in the state from
3876
- // the final pass that called for them, so that a regeneration resumed knows them.
3925
+ // the pass that called for them (the checks of the plan, `suite`, or the final pass), so
3926
+ // that a regeneration resumed knows them.
3877
3927
  const a = ctx.aRegenerer;
3878
3928
  if (!a) {
3879
3929
  throw new Arret(
@@ -3882,10 +3932,11 @@ async function derouler(ctx, debut) {
3882
3932
  );
3883
3933
  }
3884
3934
  // A command of the project that refuses beside reds of the plan, within the developpeur's
3885
- // sessions: the copy restored, those reds go to him with its output, the final pass after.
3935
+ // sessions: the copy restored, those reds go to him with its output, then the pass that
3936
+ // called for the regeneration, the checks of the plan or the final pass.
3886
3937
  const suivante = tentative + 1;
3887
3938
  const auLot = Boolean(a.auDeveloppeur) && suivante <= SEANCES_DEVELOPPEUR;
3888
- const g = regenerer(ctx, a.noms, a.notes, Boolean(a.avantLaPasse), auLot);
3939
+ const g = regenerer(ctx, a.noms, a.notes, a.suite ?? null, auLot);
3889
3940
  if (g.refus) {
3890
3941
  const texte = [
3891
3942
  `La régénération des références refuse le lot ; la copie est rendue telle qu'avant elle, et les rouges du plan vont au développeur (séance ${suivante}).`,
@@ -3895,29 +3946,37 @@ async function derouler(ctx, debut) {
3895
3946
  ecrireRapport(ctx, 'references', texte, { regenerees: [], fichiers: [] });
3896
3947
  rapport = `${texte}\n\n${a.auDeveloppeur}`;
3897
3948
  ctx.aRegenerer = null;
3949
+ ctx.rienALivrer = null;
3898
3950
  etape = CODE;
3899
3951
  tentative = suivante;
3900
- finale = true;
3952
+ finale = a.suite !== 'controles';
3901
3953
  continue;
3902
3954
  }
3903
3955
  ecrireRapport(ctx, 'references', g.texte, {
3904
3956
  regenerees: g.regenerees,
3905
3957
  fichiers: g.fichiers,
3906
3958
  });
3907
- // After the checks, the final pass that is due, on the regenerated tree, which does not
3908
- // regenerate again the references just regenerated on it; after a final pass, the pass
3909
- // restricted to what the regeneration changed, with the reds of the pass before.
3910
- ctx.regenereSur = a.avantLaPasse ? { arbre: arbreDeLaCopie(ctx), noms: a.noms } : null;
3911
- ctx.regeneration = a.avantLaPasse
3912
- ? null
3913
- : {
3914
- restreinte: g.restreinte,
3915
- entiere: a.entiere,
3916
- reportes: { rouges: a.rouges, rejouee: g.fichiers.length > 0 },
3917
- };
3959
+ // After the checks, the pass that judges the regenerated tree, which does not regenerate
3960
+ // again the references just regenerated on it: beside other reds, the checks of the plan
3961
+ // again (none plays when the regeneration changed nothing, the reds of the checks before
3962
+ // standing); without, the final pass that is due. After a final pass, the pass restricted
3963
+ // to what the regeneration changed, with the reds of the pass before.
3964
+ ctx.regenereSur = a.suite ? { arbre: arbreDeLaCopie(ctx), noms: a.noms } : null;
3965
+ ctx.regeneration =
3966
+ a.suite === 'passe'
3967
+ ? null
3968
+ : a.suite === 'controles'
3969
+ ? g.fichiers.length
3970
+ ? null
3971
+ : { reportes: { rouges: a.rouges, rejouee: false } }
3972
+ : {
3973
+ restreinte: g.restreinte,
3974
+ entiere: a.entiere,
3975
+ reportes: { rouges: a.rouges, rejouee: g.fichiers.length > 0 },
3976
+ };
3918
3977
  ctx.aRegenerer = null;
3919
3978
  etape = CONTROLES;
3920
- finale = true;
3979
+ finale = a.suite !== 'controles';
3921
3980
  } else if (etape === RELECTURE) {
3922
3981
  const v = await relire(ctx);
3923
3982
  // A question for the owner: nothing is committed nor relaunched before his answer.
@@ -4254,6 +4313,19 @@ const planPasse = (ctx, empreinte) =>
4254
4313
  const QUESTIONS_OUVERTES = '## Questions ouvertes';
4255
4314
  // The heading of the section of the sort of the ticket in a plan's description (grillhouse-sos).
4256
4315
  const SORTE = '## Sorte';
4316
+ // The heading of the section of the names the plan publishes in its description, the one that
4317
+ // scripts/langages/typescript/consommateurs-arbitres.mjs reads (grillhouse-la3).
4318
+ const NOMS_PUBLIES = '## Noms publiés';
4319
+
4320
+ // The names <noms> a plan publishes (`noms_publies`), one line each, as the guard of the consumers
4321
+ // reads them: the provider, the consumer and each name between backquotes.
4322
+ const lignesDesNoms = noms =>
4323
+ noms
4324
+ .map(
4325
+ n =>
4326
+ `- \`${n.fournisseur}\` publie à \`${n.consommateur}\` : ${n.noms.map(x => `\`${x}\``).join(', ')}`
4327
+ )
4328
+ .join('\n');
4257
4329
 
4258
4330
  // The sort <sorte> (`sorteDuPlan`) in words: its kind, then its reason.
4259
4331
  const texteDeLaSorte = sorte =>
@@ -4286,14 +4358,19 @@ function numerotee(ligne) {
4286
4358
  // The ticket's description <description> as it was before the plan, with the criteria the plan adds
4287
4359
  // <criteres> in its section of criteria (a section « ## Critères » at its end without one), the sort
4288
4360
  // of the ticket <sorte> in its section after it, its reason and the command of a mechanical ticket
4289
- // (absent when the sheet says none), and its open questions <questions> in their section after
4290
- // them, absent without one; the rest of it as it was. The criteria already written stay as they
4291
- // are, the decision of the owner: each criterion the plan adds follows them, numbered after them.
4292
- // Written again from the description before the plan, the description holds the criteria and the
4293
- // sort of the explorateur's last sheet alone.
4294
- export function decrireLePlan(description, criteres, questions, sorte = null) {
4361
+ // (absent when the sheet says none), the names the plan publishes <noms> in their section after it
4362
+ // (an empty list erases the section; a sheet without them, <noms> undefined, keeps the section the
4363
+ // description holds, a supervisor's by hand included), and its open questions <questions> in their
4364
+ // section after them, absent without one; the rest of it as it was. The criteria already written
4365
+ // stay as they are, the decision of the owner: each criterion the plan adds follows them, numbered
4366
+ // after them. Written again from the description before the plan, the description holds the
4367
+ // criteria, the sort and the names of the explorateur's last sheet alone.
4368
+ export function decrireLePlan(description, criteres, questions, sorte = null, noms = undefined) {
4295
4369
  const gardees = sectionsDe(description).filter(
4296
- s => s.tete !== QUESTIONS_OUVERTES && s.tete !== SORTE
4370
+ s =>
4371
+ s.tete !== QUESTIONS_OUVERTES &&
4372
+ s.tete !== SORTE &&
4373
+ (noms === undefined || s.tete !== NOMS_PUBLIES)
4297
4374
  );
4298
4375
  let i = gardees.findIndex(deCriteres);
4299
4376
  if (i < 0) {
@@ -4324,6 +4401,7 @@ export function decrireLePlan(description, criteres, questions, sorte = null) {
4324
4401
  },
4325
4402
  ]
4326
4403
  : []),
4404
+ ...(noms?.length ? [{ tete: NOMS_PUBLIES, lignes: ['', lignesDesNoms(noms), ''] }] : []),
4327
4405
  ...(questions.length
4328
4406
  ? [{ tete: QUESTIONS_OUVERTES, lignes: ['', lignesOuvertes(questions), ''] }]
4329
4407
  : []),
@@ -4464,7 +4542,13 @@ async function lePlan(ctx) {
4464
4542
  ecrireLePlan(
4465
4543
  ctx,
4466
4544
  plan.paquets.map(ctx.resoudre),
4467
- decrireLePlan(t.description, plan.criteres, plan.questions, sorteEcrite(plan))
4545
+ decrireLePlan(
4546
+ t.description,
4547
+ plan.criteres,
4548
+ plan.questions,
4549
+ sorteEcrite(plan),
4550
+ plan.noms_publies
4551
+ )
4468
4552
  );
4469
4553
  const ouvertesDuPlan = plan.questions.length ? `\n${lignesOuvertes(plan.questions)}` : 'aucune';
4470
4554
  dire(
@@ -4522,7 +4606,7 @@ async function lePlan(ctx) {
4522
4606
  {
4523
4607
  ...explorateur,
4524
4608
  premiere: 'reprend',
4525
- // The answer, apart from the plan it answers (`ficheDeLaSorte`).
4609
+ // The answer, apart from the plan it answers (`ficheDuPlan`).
4526
4610
  avec: { reponse: true },
4527
4611
  // A line of `reponses` by question put, asked again once; after it, a question without
4528
4612
  // its line stays open.
@@ -4545,6 +4629,7 @@ async function lePlan(ctx) {
4545
4629
  .map(question => ({ question, piece: 'question du questionneur, sans réponse' })),
4546
4630
  ];
4547
4631
  if (posees.length) {
4632
+ const plans = [{ fiche: premier }, { fiche: plan, reponse: true }];
4548
4633
  ecrireLePlan(
4549
4634
  ctx,
4550
4635
  plan.paquets.map(ctx.resoudre),
@@ -4552,7 +4637,8 @@ async function lePlan(ctx) {
4552
4637
  t.description,
4553
4638
  plan.criteres,
4554
4639
  ouvertes,
4555
- sorteEcrite(ficheDeLaSorte([{ fiche: premier }, { fiche: plan, reponse: true }]))
4640
+ sorteEcrite(ficheDuPlan(plans, 'sorte')),
4641
+ ficheDuPlan(plans, 'noms_publies').noms_publies
4556
4642
  )
4557
4643
  );
4558
4644
  }
@@ -43,7 +43,7 @@
43
43
  # the work in progress of the copy in the copy, never in git's stash, which every copy of the
44
44
  # repository shares: it is set aside as a lot, the copy fast-forwards, and the lot is applied
45
45
  # three ways, as the lot of a branch sent back is (scripts/enveloppe/travail-de-la-copie.mjs).
46
- # A refusal, such as commits of the agent on its branch or conflicts left unresolved, goes to
46
+ # A refusal, such as a branch that has left main or conflicts left unresolved, goes to
47
47
  # the log and stops the launch, CODE_COPIE; so does a reapplication that conflicts: the log
48
48
  # names the copy and each file in conflict, the conflicts stay marked in the copy's files and
49
49
  # unmerged in its index, and no agent starts on a half-merged copy. Its
@@ -23,11 +23,13 @@
23
23
  // - A copy whose lot still waits in its git directory (git refused it whole, as a deletion of
24
24
  // a file main changed) is not touched: the output names the file and how to take it back;
25
25
  // exit 1. So no relaunch loses it.
26
- // - A copy still in conflict (unmerged entries in its index) or whose branch carries commits
27
- // main has not (no fast-forward) is not touched; the output says why; exit 1. A fast-forward
28
- // that fails after the work is set aside (an untracked file in the way) gives the work back
29
- // on HEAD; exit 1.
30
- // - A copy at <cible> already, or without local work, simply fast-forwards; exit 0.
26
+ // - A copy still in conflict (unmerged entries in its index) or whose branch has left main
27
+ // (commits on both sides, no fast-forward) is not touched; the output says why; exit 1. A
28
+ // fast-forward that fails after the work is set aside (an untracked file in the way) gives
29
+ // the work back on HEAD; exit 1.
30
+ // - A copy at <cible> already, or ahead of it (<cible> an ancestor of its HEAD, as a branch
31
+ // whose commits main has not entered yet), is not touched, as `git merge --ff-only` answers
32
+ // « Already up to date »; a copy without local work simply fast-forwards; exit 0.
31
33
  // - Both: a generated file the project declares (`grillhouse.engendres`, scripts/engendres.mjs,
32
34
  // read from the main tree) is not merged, as npm writes package-lock.json again after a merge:
33
35
  // when the lot touches one of its files, or one it reads (the copy's untracked files counting),
@@ -178,7 +180,12 @@ export function avancer(copie, cible) {
178
180
  if (vise.status !== 0) {
179
181
  return { ok: false, message: `⛔ ${cible} ne nomme aucun commit : ${texte(vise)}` };
180
182
  }
181
- if (tete === String(vise.stdout).trim()) {
183
+ // At <cible>, or ahead of it (<cible> an ancestor of HEAD): nothing to move, as git's
184
+ // `merge --ff-only` answers « Already up to date ».
185
+ if (
186
+ tete === String(vise.stdout).trim() ||
187
+ git(copie, ['merge-base', '--is-ancestor', cible, 'HEAD']).status === 0
188
+ ) {
182
189
  return { ok: true, message: '' };
183
190
  }
184
191
  if (git(copie, ['merge-base', '--is-ancestor', 'HEAD', cible]).status !== 0) {
@@ -208,10 +208,10 @@ export const GESTES = [
208
208
  {
209
209
  genre: 'regeneration',
210
210
  geste:
211
- 'à la régénération des références (4.2), puis la passe finale : celle qui est due, après les contrôles ; restreinte à ce qu’elle change, après une passe finale',
211
+ 'à la régénération des références (4.2), puis la passe qui juge l’arbre régénéré : après les contrôles, les contrôles du plan encore quand d’autres rouges s’y mêlent, sinon la passe finale qui est due ; après une passe finale, la passe finale restreinte à ce qu’elle change',
212
212
  regle:
213
- 'un rouge de la passe finale est celui d’une référence, même mêlé à d’autres, ou les contrôles du plan sont verts hors des rouges de références : une que le projet déclare (`grillhouse.references`), ou un fichier que le cadre engendre (l’index des interfaces, les fichiers que le module du langage engendre) ; ou la passe abaisse la dette des gardes (`dette.mjs --abaisser`, depuis ses notes)',
214
- cas: 'BP 320.9 : 292 min autour des références, dont 163 min d’attente pour régénérer à la main l’index des interfaces, le plafond et l’empreinte, des rouges de références mêlés à d’autres ; BP 320.3.9 : le plafond rouge aux contrôles, laissé à une passe finale qui rejoue les mêmes tests sur le même arbre (6,1 min)',
213
+ 'un rouge des contrôles du plan ou de la passe finale est celui d’une référence, même mêlé à d’autres : une que le projet déclare (`grillhouse.references`), ou un fichier que le cadre engendre (l’index des interfaces, les fichiers que le module du langage engendre) ; ou la passe abaisse la dette des gardes (`dette.mjs --abaisser`, depuis ses notes)',
214
+ cas: 'BP 320.9 : 292 min autour des références, dont 163 min d’attente pour régénérer à la main l’index des interfaces, le plafond et l’empreinte, des rouges de références mêlés à d’autres ; BP 320.3.9 : le plafond rouge aux contrôles, laissé à une passe finale qui rejoue les mêmes tests sur le même arbre (6,1 min) ; BP 320.6.5 : un test qui lit les références des paquets, rouge à côté de leur garde, envoyé au développeur, qui n’a rien à livrer puis ne peut pas les écrire',
215
215
  },
216
216
  {
217
217
  genre: 'rien-a-livrer',
@@ -35,7 +35,7 @@
35
35
  // writes its configuration). For the check of the uses, test files (under a folder `test/`,
36
36
  // `tests/` or `__tests__/`, or named `*.test.*`, `*.spec.*`) count only for their imports of a
37
37
  // package of the material; `dist/`, `docs/` and `node_modules/` are never read, nor are Vite's
38
- // temporary files, and a file gone between the walk and its read is passed over (`parcourir`).
38
+ // temporary files, and a file gone between the walk and its read is passed over (`parcourir`, ./parcours.mjs).
39
39
  // The identity of a component is its name: two directories of the same name, one under `packages/`
40
40
  // and one under `src/`, are refused, both paths named (the way npm workspaces, Nx and Cargo refuse
41
41
  // two projects of one name). Names differing by case are two names.
@@ -43,12 +43,13 @@
43
43
  // A project's guard imports `matieres` by the package's entry
44
44
  // `@roomi-fields/grillhouse/consommateurs`, its types in ./consommateurs.d.ts (docs/ARCHITECTURE.md,
45
45
  // the package's named entries).
46
- import { existsSync, readdirSync, readFileSync, statSync } from 'node:fs';
46
+ import { existsSync, readFileSync } from 'node:fs';
47
47
  import path from 'node:path';
48
48
  import { pathToFileURL } from 'node:url';
49
49
  import { trancher } from '../../dette.mjs';
50
50
  import { horsCadre } from '../../paquets.mjs';
51
51
  import { composants, dossiers, matieres } from './composants.mjs';
52
+ import { lireSiPresent, parcourir } from './parcours.mjs';
52
53
 
53
54
  // The components and the packages of the shared material, read by ./composants.mjs; the entry
54
55
  // publishes `matieres` from here.
@@ -161,45 +162,6 @@ export function imports(source) {
161
162
  return out;
162
163
  }
163
164
 
164
- // The temporary file Vite writes beside a configuration it bundles, then removes
165
- // (`vitest.config.ts.timestamp-<n>-<hash>.mjs`).
166
- const TEMPORAIRE_DE_VITE = /\.timestamp-[^/\\]*\.mjs$/;
167
-
168
- // <f> read by <lire>, or <absent> when it no longer exists (ENOENT).
169
- function siPresent(lire, f, absent) {
170
- try {
171
- return lire(f);
172
- } catch (e) {
173
- if (e?.code === 'ENOENT') return absent;
174
- throw e;
175
- }
176
- }
177
-
178
- // The files under <chemin> (a directory, or a file), each its absolute path: an entry below it
179
- // whose path <sauter> keeps out is neither entered nor listed, and Vite's temporary files are
180
- // never listed. The guards of the frame walk the repository while other processes write in it
181
- // (`npm run verifier` plays them beside the tests): a file or a directory gone before the walk
182
- // reaches it is passed over. The walk of every guard of the frame.
183
- export function parcourir(chemin, sauter = () => false) {
184
- const out = [];
185
- const walk = (p, dossier) => {
186
- if (!dossier) {
187
- if (!TEMPORAIRE_DE_VITE.test(p)) out.push(p);
188
- return;
189
- }
190
- for (const e of siPresent(d => readdirSync(d, { withFileTypes: true }), p, [])) {
191
- const q = path.join(p, e.name);
192
- if (!sauter(q)) walk(q, e.isDirectory());
193
- }
194
- };
195
- const racine = siPresent(statSync, chemin, null);
196
- if (racine) walk(chemin, racine.isDirectory());
197
- return out;
198
- }
199
-
200
- // The text of the file <f> a walk listed, or null when it is gone since.
201
- export const lireSiPresent = f => siPresent(x => readFileSync(x, 'utf8'), f, null);
202
-
203
165
  // The source files under <dir>: [{ f, test }], `test` for a file under a test folder or of a test
204
166
  // name.
205
167
  function fichiers(dir) {
@@ -57,7 +57,8 @@ import { existsSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from 'no
57
57
  import { tmpdir } from 'node:os';
58
58
  import path from 'node:path';
59
59
  import { pathToFileURL } from 'node:url';
60
- import { composants, lireSiPresent, parcourir } from './consommateurs.mjs';
60
+ import { composants } from './consommateurs.mjs';
61
+ import { lireSiPresent, parcourir } from './parcours.mjs';
61
62
  import { paquetsDeLEnveloppe } from '../../services-du-noyau.mjs';
62
63
  import { trancher } from '../../dette.mjs';
63
64
 
@@ -19,14 +19,8 @@
19
19
  // what its tests read (`parLesTests`): the components its tests import.
20
20
  import { existsSync, readFileSync } from 'node:fs';
21
21
  import path from 'node:path';
22
- import {
23
- declares,
24
- imports,
25
- lireSiPresent,
26
- NOM_DE_TEST,
27
- parcourir,
28
- utilise,
29
- } from './consommateurs.mjs';
22
+ import { declares, imports, NOM_DE_TEST, utilise } from './consommateurs.mjs';
23
+ import { lireSiPresent, parcourir } from './parcours.mjs';
30
24
  import { lire } from './index-interfaces.mjs';
31
25
  import { elementsEcrits, parLesTypes } from './references-par-les-types.mjs';
32
26