@roomi-fields/grillhouse 0.32.0 → 0.33.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (131) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/CHANGELOG.md +32 -0
  3. package/bin/grillhouse.mjs +6 -4
  4. package/cadre/templates/projet/.github/workflows/ci.yml +169 -16
  5. package/cadre/templates/projet/.github/workflows/nuit.yml +111 -0
  6. package/cadre/templates/projet/deployment/docs/01-INSTALL.md +4 -4
  7. package/cadre/templates/projet/package.json +2 -2
  8. package/charte.md +8 -5
  9. package/dist/temporal/circuit/client.d.ts +10 -3
  10. package/dist/temporal/circuit/client.js +8 -4
  11. package/dist/temporal/circuit/client.js.map +1 -1
  12. package/dist/temporal/circuit/contrat.d.ts +25 -0
  13. package/dist/temporal/circuit/contrat.js +31 -0
  14. package/dist/temporal/circuit/contrat.js.map +1 -1
  15. package/dist/temporal/circuit/deroule.js +67 -38
  16. package/dist/temporal/circuit/deroule.js.map +1 -1
  17. package/dist/temporal/commande.js +13 -3
  18. package/dist/temporal/commande.js.map +1 -1
  19. package/dist/temporal/deroules.d.ts +1 -0
  20. package/dist/temporal/deroules.js +3 -1
  21. package/dist/temporal/deroules.js.map +1 -1
  22. package/dist/temporal/file/activites.d.ts +1 -0
  23. package/dist/temporal/file/activites.js +5 -2
  24. package/dist/temporal/file/activites.js.map +1 -1
  25. package/dist/temporal/file/contrat.d.ts +50 -33
  26. package/dist/temporal/file/contrat.js +2 -2
  27. package/dist/temporal/file/contrat.js.map +1 -1
  28. package/dist/temporal/file/deroule.d.ts +3 -1
  29. package/dist/temporal/file/deroule.js +128 -26
  30. package/dist/temporal/file/deroule.js.map +1 -1
  31. package/dist/temporal/installation.d.ts +15 -1
  32. package/dist/temporal/installation.js +57 -15
  33. package/dist/temporal/installation.js.map +1 -1
  34. package/dist/temporal/nuits/activites.d.ts +10 -0
  35. package/dist/temporal/nuits/activites.js +114 -0
  36. package/dist/temporal/nuits/activites.js.map +1 -0
  37. package/dist/temporal/nuits/appel.d.ts +23 -0
  38. package/dist/temporal/nuits/appel.js +40 -0
  39. package/dist/temporal/nuits/appel.js.map +1 -0
  40. package/dist/temporal/nuits/choix.d.ts +14 -0
  41. package/dist/temporal/nuits/choix.js +119 -0
  42. package/dist/temporal/nuits/choix.js.map +1 -0
  43. package/dist/temporal/nuits/client.d.ts +28 -0
  44. package/dist/temporal/nuits/client.js +83 -0
  45. package/dist/temporal/nuits/client.js.map +1 -0
  46. package/dist/temporal/nuits/commande.d.ts +2 -0
  47. package/dist/temporal/nuits/commande.js +107 -0
  48. package/dist/temporal/nuits/commande.js.map +1 -0
  49. package/dist/temporal/nuits/contrat.d.ts +98 -0
  50. package/dist/temporal/nuits/contrat.js +30 -0
  51. package/dist/temporal/nuits/contrat.js.map +1 -0
  52. package/dist/temporal/nuits/deroule.d.ts +5 -0
  53. package/dist/temporal/nuits/deroule.js +100 -0
  54. package/dist/temporal/nuits/deroule.js.map +1 -0
  55. package/dist/temporal/travailleur.js +4 -1
  56. package/dist/temporal/travailleur.js.map +1 -1
  57. package/docs/ARCHITECTURE.md +214 -49
  58. package/docs/CADRE.md +31 -1
  59. package/docs/INTERFACE.md +47 -7
  60. package/hooks/register.tsx +11 -3
  61. package/package.json +4 -1
  62. package/scripts/abi-des-dependances.mjs +105 -0
  63. package/scripts/activites.mjs +113 -42
  64. package/scripts/aiguillage.mjs +1 -0
  65. package/scripts/avancement.mjs +8 -18
  66. package/scripts/ci-des-branches.mjs +91 -0
  67. package/scripts/circuit.mjs +79 -4
  68. package/scripts/circuits-du-serveur.mjs +4 -3
  69. package/scripts/composants-affectes.mjs +24 -7
  70. package/scripts/composition-des-langages.mjs +3 -0
  71. package/scripts/crochets.mjs +4 -0
  72. package/scripts/dernier-vert.mjs +31 -10
  73. package/scripts/enveloppe/enveloppe.mjs +3 -1
  74. package/scripts/enveloppe/lancer.sh +1 -1
  75. package/scripts/enveloppe/travail-de-la-copie.mjs +219 -59
  76. package/scripts/etapes.mjs +18 -1
  77. package/scripts/faits-du-circuit.mjs +43 -20
  78. package/scripts/fichier-du-poste.mjs +87 -0
  79. package/scripts/grillhouse-maj.mjs +15 -1
  80. package/scripts/integration/file.mjs +215 -275
  81. package/scripts/integration/integrer.mjs +82 -41
  82. package/scripts/integration/rejeu.mjs +13 -64
  83. package/scripts/jointure.d.ts +26 -2
  84. package/scripts/langages/cargo/commandes.mjs +81 -19
  85. package/scripts/langages/cargo/exemples.mjs +2 -2
  86. package/scripts/langages/cargo/index.mjs +11 -5
  87. package/scripts/langages/cargo/tailles-des-tests.mjs +19 -11
  88. package/scripts/langages/python/commandes.mjs +11 -7
  89. package/scripts/langages/python/exemples.mjs +1 -1
  90. package/scripts/langages/python/index.mjs +9 -2
  91. package/scripts/langages/python/tailles-des-tests.mjs +19 -11
  92. package/scripts/langages/typescript/code-mort.mjs +41 -24
  93. package/scripts/langages/typescript/consommateurs.mjs +28 -17
  94. package/scripts/langages/typescript/exemples.mjs +2 -0
  95. package/scripts/langages/typescript/index.mjs +22 -3
  96. package/scripts/langages/typescript/migrations/0.33.0-binaire-de-jour.mjs +34 -0
  97. package/scripts/langages/typescript/migrations/0.33.0-tests-du-poste.mjs +31 -0
  98. package/scripts/langages/typescript/resumes.mjs +17 -7
  99. package/scripts/langages/typescript/tailles-des-tests.mjs +251 -22
  100. package/scripts/langages/typescript/tests-de-nuit.mjs +101 -9
  101. package/scripts/langages/typescript/tests-du-poste.mjs +172 -0
  102. package/scripts/langages/typescript/tests.mjs +8 -2
  103. package/scripts/langages/typescript/tranches.mjs +273 -0
  104. package/scripts/langages/typescript/verifier.mjs +140 -31
  105. package/scripts/langages/typescript/vitest-config/changements.mjs +23 -11
  106. package/scripts/langages/typescript/vitest-config/cibles.mjs +78 -7
  107. package/scripts/langages/typescript/vitest-config/lances.mjs +4 -4
  108. package/scripts/langages/typescript/vitest-config/machine.setup.mjs +9 -0
  109. package/scripts/langages/typescript/vitest.nuit.config.mjs +3 -2
  110. package/scripts/lint-des-scripts.mjs +23 -6
  111. package/scripts/migrations/0.33.0-cache-distant.mjs +36 -0
  112. package/scripts/migrations/0.33.0-ci-des-branches-de-ticket.mjs +31 -0
  113. package/scripts/migrations/0.33.0-ci-du-cadre.mjs +31 -0
  114. package/scripts/migrations/0.33.0-node-26.mjs +58 -0
  115. package/scripts/migrations.mjs +8 -0
  116. package/scripts/newday.mjs +18 -0
  117. package/scripts/nuit.sh +35 -17
  118. package/scripts/registre.d.mts +90 -0
  119. package/scripts/registre.mjs +28 -3
  120. package/scripts/reprise.mjs +12 -8
  121. package/scripts/services-du-noyau.mjs +5 -1
  122. package/scripts/session-start.sh +40 -32
  123. package/scripts/sous-commandes.mjs +29 -10
  124. package/scripts/superviseur.mjs +72 -27
  125. package/scripts/tableau.mjs +129 -20
  126. package/scripts/taches-du-graphe.mjs +39 -6
  127. package/scripts/transitions.mjs +42 -3
  128. package/scripts/verrou-de-machine.mjs +1 -2
  129. package/scripts/workflows-du-cadre.mjs +75 -0
  130. package/skills/grill/SKILL.md +8 -6
  131. package/skills/pitmaster/SKILL.md +15 -9
@@ -1,72 +1,73 @@
1
1
  // The gestures of the queue, which brings the branches `agent/<ticket>` the integration committed
2
- // onto main, one at a time: the workflow of the queue of a project (`file:<racine>`,
3
- // src/temporal/file/deroule.ts) plays them, each in an act of its own (scripts/faits-du-circuit.mjs),
4
- // for the entries the circuits of the tickets send it at their step 5.2, in their order of arrival.
2
+ // onto main, one at a time, each judged by the CI of its branch before main moves, as bors and
3
+ // Zuul gate a merge on the CI of the tree that enters: the workflow of the queue of a project
4
+ // (`file:<racine>`, src/temporal/file/deroule.ts) plays them, each in an act of its own
5
+ // (scripts/faits-du-circuit.mjs), for the entries the circuits of the tickets send it at their
6
+ // step 5.2, in their order of arrival. Nothing is verified on the machine: the CI judges.
5
7
  //
6
- // For each branch, against the main of the moment (`avancerMain`):
7
- // - main is an ancestor of the branch (main has not moved since its base): main moves forward onto
8
- // the branch (`merge --ff-only`), nothing replayed;
8
+ // For each branch (`preparerLaBranche`), against the main of the moment:
9
+ // - main is an ancestor of the branch (main has not moved since its base): the branch is the
10
+ // candidate as it is;
9
11
  // - main has moved: the branch is replaced on main in the queue's own copy
10
- // (`.claude/worktrees/file`, made ready by scripts/integration/rejeu.mjs), its dependencies made
11
- // to agree with the lock file and the manifests of the branch once replaced (an install that
12
- // fails makes the branch leave the queue, « Les dépendances de la copie ne s'installent pas. »,
13
- // its tests not played), and the same command as the integration's replays it there:
14
- // `npm run verifier` (Turborepo: the build, then the guards and every test of the day beside
15
- // each other, each task replayed from the cache of the main tree when its inputs are
16
- // unchanged), every command of the project run in the copy leaving its index up to date
17
- // (rejeu.mjs); main moves forward onto the replaced branch when `npm run verifier` is green.
18
- // A generated file the project declares (`grillhouse.engendres`, scripts/engendres.mjs, read
19
- // from the main tree, a faulty key keeping the branch in the queue, named) is never merged, as
20
- // npm writes package-lock.json again after a merge: a conflict on such files only takes main's
21
- // version, and once the branch is replaced and installed, the command of each one whose files,
22
- // or the files it reads, the branch touches writes it again, with the tools of the project,
23
- // and what it writes enters the branch's commit; a command that fails makes the branch leave
24
- // the queue, the command and its output named (OSC Bridge, 2026-10-31: four conflicts in one
25
- // day on the generated files of synthhub and open-synth-descriptors);
12
+ // (`.claude/worktrees/file`, made ready by scripts/integration/rejeu.mjs, its dependencies made
13
+ // to agree with the lock file and the manifests: an install that fails makes the branch leave
14
+ // the queue, « Les dépendances de la copie ne s'installent pas. »), and `agent/<ticket>` takes
15
+ // the replaced commit, the candidate. A generated file the project declares
16
+ // (`grillhouse.engendres`, scripts/engendres.mjs, read from the main tree, a faulty key keeping
17
+ // the branch in the queue, named) is never merged, as npm writes package-lock.json again after
18
+ // a merge: a conflict on such files only takes main's version, and once the branch is replaced
19
+ // and installed, the command of each one whose files, or the files it reads, the branch touches
20
+ // writes it again, with the tools of the project, and what it writes enters the branch's
21
+ // commit; a command that fails makes the branch leave the queue, the command and its output
22
+ // named (OSC Bridge, 2026-10-31: four conflicts in one day on the generated files of synthhub
23
+ // and open-synth-descriptors);
24
+ // - the candidate is pushed to origin on `agent/<ticket>` (forced: the queue owns that branch,
25
+ // and a replay rewrites it), a push refused keeping the branch in the queue, its reason named;
26
26
  // - a branch with nothing ahead of main does not enter: it leaves the queue, its ticket loses
27
27
  // `en-file` and takes a comment, and stays as it is;
28
- // - a branch that does not replace (the files in conflict) or whose `npm run verifier` is red once
29
- // replaced leaves the queue: its ticket loses `en-file`, reopens with a comment that
30
- // names the files or ends with the output of the tests, and the branch stays where it is, for
28
+ // - a branch that does not replace (the files in conflict) leaves the queue: its ticket loses
29
+ // `en-file`, reopens with a comment that names the files, and the branch stays where it is, for
31
30
  // the resumption of its circuit;
32
- // - a branch whose replay cannot be done (the copy does not get ready, main does not take the
33
- // branch, the main tree holds a file of the lot), or whose `npm run verifier` is « à repasser »
34
- // once replaced (75: the wait for the lock of the machine reached its bound,
35
- // scripts/verrou-de-machine.mjs; neither green nor red), stays in the queue, the reason written to its
36
- // ticket, which is neither reopened nor closed, and the queue goes on; the circuit of the ticket
37
- // stops at « a-repasser », and its resumption sends the branch again. Any other code than 0 and
38
- // 75 is red.
39
- // At its entry on main, the branch's ticket closes « intégré : <commit> », loses `en-file`, and the
40
- // branch is deleted; a branch git does not delete (its copy still in place) is written to the
41
- // ticket, which closes all the same. The working directory of its circuit
42
- // (`.claude/worktrees/<ticket>.travail`, scripts/circuit.mjs), which lives as long as the ticket
43
- // and holds the progress the board reads, the CI's included, is removed when the queue is done
44
- // with the ticket closed: its CI concluded, or its push not made (`retirerLeTravail`). Then main is pushed to origin, on the branch
45
- // `grillhouse.poussee.commit` of main's package.json (`main` without the key); a refused push is
46
- // written to the ticket and does not stop the queue.
47
- // Once pushed, the queue reads the CI of the commit pushed, as a merge queue waits for its checks.
48
- // As GitHub's required checks name what a merge waits for, a check that does not exist is not
49
- // waited for: the queue first reads, in the commit pushed, the workflows that run on a push to the
50
- // branch it pushes to (`fluxDeLaBranche`, the files `.github/workflows/*.yml` and `*.yaml`, their
51
- // `on` and its filters as GitHub reads them); with none, the ticket is told in one line that
52
- // there is no CI for that branch, and nothing is waited for. A workflow the queue cannot judge (a
53
- // file it cannot read, a filter on the paths) counts as one that runs. With one, each reading
54
- // (`lireUneFoisLaCI`) looks for its run (`gh run list --commit <sha> --json
55
- // databaseId,status,conclusion`), then reads it (`gh run view <id> --json status,conclusion,jobs`),
56
- // as `gh run watch` does; the workflow of the CI of the commit spaces the readings and bounds the
57
- // search and the wait (`ciDuCommit`). Green on the conclusion `success`, red on any other. Under
58
- // the circuit's progress directory (scripts/avancement.mjs), each reading writes there the steps
59
- // of the run done over planned, which the board shows. A red CI reopens the ticket (`bd reopen`),
60
- // its comment giving the address of the run (`gh run view <id> --json url`) and the end of `gh run
61
- // view <id> --log-failed` (`conclureLaCI`). Without `gh`, without a run found, with `gh` refusing
62
- // or past the wait, the ticket is told that the CI was not read, and why, and stays closed. The
63
- // run is read at its current attempt (`gh run view <id>` without `--attempt`), as a merge queue
64
- // judges the last attempt of a commit's checks: after a red CI, `--reprendre` reads again the CI
65
- // of the ticket's commit on main (`situerLeLot`), once the supervisor had the failed jobs run
66
- // again (`gh run rerun <id> --failed`); green, the ticket closes « intégré : <commit> », the run
67
- // named at it; red or not read, it stays open, the reading at the ticket. A flaky test has no path
68
- // of its own: the red comment gives the charter's rule, a test known red goes into quarantine in
69
- // the test itself, with the ticket that fixes it.
31
+ // - a branch whose replay cannot be done (the copy does not get ready, the branch does not take
32
+ // its replaced commit) stays in the queue, the reason written to its ticket, which is neither
33
+ // reopened nor closed, and the queue goes on; the circuit of the ticket stops at
34
+ // « a-repasser », and its resumption sends the branch again.
35
+ // Then the queue reads the CI of the candidate on its branch, the run of `agent/<ticket>` whatever
36
+ // runs it (GitHub's runners or the project's own: the queue reads the run, not the machine). As
37
+ // bors refuses a merge without its required status, the queue first reads, in the candidate, the
38
+ // workflows that run on a push to its branch (`fluxDeLaBranche`, the files `.github/workflows/*.yml`
39
+ // and `*.yaml`, their `on` and its filters as GitHub reads them); with none, no run is looked for,
40
+ // and the branch stays in the queue, the ticket told that the CI of the project must listen to
41
+ // `agent/**`. A workflow the queue cannot judge (a file it cannot read, a filter on the paths)
42
+ // counts as one that runs. With one, each reading (`lireUneFoisLaCI`) looks for its run
43
+ // (`gh run list --commit <sha> --branch <branche> --json databaseId,status,conclusion`), then
44
+ // reads it (`gh run view <id> --json status,conclusion,jobs`), as `gh run watch` does; the
45
+ // workflow of the CI of the commit spaces the readings and bounds the search and the wait
46
+ // (`ciDuCommit`). Green on the conclusion `success`, red on any other. Under the circuit's progress
47
+ // directory (scripts/avancement.mjs), each reading writes there the steps of the run done over
48
+ // planned, which the board shows. The run is read at its current attempt (`gh run view <id>`
49
+ // without `--attempt`), as a merge queue judges the last attempt of a commit's checks.
50
+ // The CI concluded (`conclureLaCI`):
51
+ // - green: main moves forward onto the candidate (`avancerMain`, `merge
52
+ // --ff-only`), the tree the CI judged; main moved meanwhile (the candidate no longer on top of
53
+ // it), the workflow replaces the branch again and its CI is played again;
54
+ // - red: the ticket loses `en-file` and reopens, its comment giving the address of the run (`gh
55
+ // run view <id> --json url`) and the end of `gh run view <id> --log-failed`; main does not
56
+ // move, and the branch stays, here and on origin. After the supervisor had the failed jobs run
57
+ // again (`gh run rerun <id> --failed`), `--reprendre` sends the branch again, whose CI is read
58
+ // at its last attempt. A flaky test has no path of its own: the red comment gives the charter's
59
+ // rule, a test known red goes into quarantine in the test itself, with the ticket that fixes it;
60
+ // - no CI for the branch, or not read (without `gh`, without a run found, with `gh` refusing or
61
+ // past the wait): no green, no entry; the branch stays in the queue, the ticket told why,
62
+ // neither reopened nor closed.
63
+ // At its entry on main (`fermerLEntree`), the branch's ticket closes « intégré : <commit> », loses
64
+ // `en-file`, and the branch is deleted; a branch git does not delete (its copy still in place) is
65
+ // written to the ticket, which closes all the same. Then main is pushed to origin, on the branch
66
+ // `grillhouse.poussee.commit` of main's package.json (`main` without the key), and the branch is
67
+ // deleted on origin; a refused push is written to the ticket and does not stop the queue. The
68
+ // working directory of its circuit (`.claude/worktrees/<ticket>.travail`, scripts/circuit.mjs),
69
+ // which lives as long as the ticket and holds the progress the board reads, the CI's included, is
70
+ // removed then (`retirerLeTravail`).
70
71
  // Every comment and change of the queue at a ticket is written under the author `file`, which bd
71
72
  // reads in BEADS_ACTOR, as the circuit writes its own lines under `circuit`.
72
73
  import { spawnSync } from 'node:child_process';
@@ -77,14 +78,12 @@ import { couvertPar, engendresDe, regenerer, touchesPar } from '../engendres.mjs
77
78
  import { avecLesDonnees, donneesDe } from '../donnees-cles.mjs';
78
79
  import { avecLesOutils, outilsDe } from '../outils-cles.mjs';
79
80
  import { lireCommit } from '../poussee-cles.mjs';
80
- import { commitsDelivering, gitLog } from '../un-commit-par-ticket.mjs';
81
81
  import { ouvrirCopie } from './rejeu.mjs';
82
- import { A_REPASSER } from '../codes-de-sortie.mjs';
82
+ import { lotSurMain } from './integrer.mjs';
83
83
  import { ecrireTache } from '../mesure/avancement.mjs';
84
84
  import { ACTEUR, emettre } from '../effets.mjs';
85
85
  import { enUneLigne } from '../ticket-du-circuit.mjs';
86
86
 
87
- const ESSAIS_PAR_BRANCHE = 5;
88
87
  // The queue's author.
89
88
  export const AUTEUR_DE_LA_FILE = 'file';
90
89
 
@@ -282,9 +281,9 @@ export function outilsDeLaFile(racine, dire, avancement = null) {
282
281
  * the run <passage> found by a reading before (null while it is looked for): `{ etat: 'sans-ci' }`
283
282
  * (no workflow runs on a push to the branch), `{ etat: 'cherche' }` (no run yet), `{ etat:
284
283
  * 'en-cours', passage }`, `{ etat: 'finie', passage, conclusion }`, or `{ etat: 'non-lue', raison
285
- * }` (gh absent, refusing, or its output unreadable). The run is read at its current attempt
286
- * (`gh run view <id>` without `--attempt`). A run found is read at once. It writes nothing to the
287
- * ticket: `conclureLaCI` does.
284
+ * }` (gh absent, refusing, or its output unreadable). The run is the one of <sha> on <branche>,
285
+ * read at its current attempt (`gh run view <id>` without `--attempt`). A run found is read at
286
+ * once. It writes nothing to the ticket: `conclureLaCI` does.
288
287
  */
289
288
  export function lireUneFoisLaCI(o, { sha, branche, passage = null }) {
290
289
  const { gh } = o;
@@ -293,7 +292,16 @@ export function lireUneFoisLaCI(o, { sha, branche, passage = null }) {
293
292
  if (fluxDuCommit(o.racine, sha, branche).length === 0) {
294
293
  return { etat: SANS_CI };
295
294
  }
296
- const r = gh(['run', 'list', '--commit', sha, '--json', 'databaseId,status,conclusion']);
295
+ const r = gh([
296
+ 'run',
297
+ 'list',
298
+ '--commit',
299
+ sha,
300
+ '--branch',
301
+ branche,
302
+ '--json',
303
+ 'databaseId,status,conclusion',
304
+ ]);
297
305
  if (r.error) {
298
306
  return { etat: NON_LUE, raison: `gh ne se lance pas (${r.error.code ?? r.error.message}).` };
299
307
  }
@@ -350,170 +358,70 @@ export function retirerLeTravail(o, ticket) {
350
358
  }
351
359
 
352
360
  /**
353
- * The CI of the commit <sha> of the ticket <ticket> concluded with the tools <o>, its verdict
354
- * <verdict> (VERTE, `rouge`, SANS_CI or NON_LUE), its run <passage> and the reason <raison> of a CI
355
- * not read, after the queue's entry, or read again (<relue>, on `--reprendre`): what is said to the
356
- * ticket and what becomes of it. No CI, the ticket is told so in one line; not read, it is told
357
- * why; red, its comment gives the address of the run and the end of its failed log, and the
358
- * queue's entry reopens it (read again, it stays open). Green or no CI read again, the ticket
359
- * closes « intégré : <commit> », its run named. `{ etat, raison }`: `ferme` or `rouvert`, as the
360
- * circuit reads the issue of the queue (src/temporal/file/deroule.ts); `ferme`, the working
361
- * directory of its circuit is removed (`retirerLeTravail`).
361
+ * The CI of the candidate <sha> of the ticket <ticket> on its branch <branche> concluded with the
362
+ * tools <o>, its verdict <verdict> (VERTE, `rouge`, SANS_CI or NON_LUE), its run <passage> and the
363
+ * reason <raison> of a CI not read: what is said to the ticket and what becomes of the entry.
364
+ * `{ avancer: true }`: green, main moves onto the candidate; `{ issue }`, the issue for the circuit
365
+ * (src/temporal/file/deroule.ts): red, `rouvert`, its comment giving the address of the run and
366
+ * the end of its failed log, the ticket reopened without `en-file`; no CI for the branch, or not
367
+ * read, `en-file`, the ticket told why: no green, no entry.
362
368
  */
363
- export function conclureLaCI(
364
- o,
365
- { ticket, sha, branche, verdict, passage = null, raison = null, relue = false }
366
- ) {
369
+ export function conclureLaCI(o, { ticket, sha, branche, verdict, passage = null, raison = null }) {
367
370
  const court = sha.slice(0, 7);
368
371
  const commenter = texte => commenterAu(o, ticket, texte);
372
+ if (verdict === VERTE) {
373
+ o.dire(`✓ CI de ${court} sur ${branche} verte (passage ${passage})`);
374
+ return { avancer: true };
375
+ }
369
376
  if (verdict === SANS_CI) {
370
- const texte = `Aucune CI pour origin/${branche} : aucun flux de ${DOSSIER_DES_FLUX} de ${court} ne se lance sur la branche ${branche}, la file n'en attend pas.`;
377
+ const texte = `## Aucune CI ne juge ${branche}\n\nAucun flux de ${DOSSIER_DES_FLUX} de ${court} ne se lance sur un push vers ${branche} : la CI du projet doit écouter agent/** (\`npx grillhouse maj\` l'ajoute à son flux). ${o.principale} n'avance pas sans son vert ; la branche reste en file, et la reprise du circuit la renvoie.`;
371
378
  commenter(texte);
372
- o.dire(`✓ ${texte}`);
373
- } else if (verdict === NON_LUE) {
374
- commenter(`## CI non lue\n\nLa CI de ${court} n'a pas été lue : ${raison}`);
375
- o.dire(`⚠ CI de ${court} non lue : ${raison}`);
376
- } else if (verdict === VERTE) {
377
- o.dire(`✓ CI de ${court} verte (passage ${passage})`);
378
- } else {
379
- const { gh } = o;
380
- const url =
381
- gh(['run', 'view', passage, '--json', 'url', '--jq', '.url']).stdout?.trim() || passage;
382
- const journal = `${gh(['run', 'view', passage, '--log-failed']).stdout ?? ''}`
383
- .trim()
384
- .split('\n')
385
- .slice(-60)
386
- .join('\n');
387
- commenter(
388
- `## CI rouge\n\nLa CI de ${court} sur ${o.principale} est rouge : ${url}\n\nLa fin de gh run view ${passage} --log-failed :\n\n${journal}\n\nLe ticket est rouvert : sa correction entre sous son numéro. Un rejeu vert de la même CI (\`gh run rerun ${passage} --failed\`), puis \`--reprendre\` du circuit, le ferme ; un test connu instable se met en quarantaine dans le test, avec le ticket qui le corrige.`
389
- );
390
- o.dire(`✗ CI de ${court} rouge (passage ${passage}) : ${ticket} rouvert`);
391
- if (!relue) {
392
- o.bd('reopen', ticket);
393
- }
394
- return { etat: 'rouvert', raison: `La CI de ${court} est rouge : ${url}` };
395
- }
396
- if (!relue) {
397
- retirerLeTravail(o, ticket);
379
+ o.dire(`⚠ aucune CI ne juge ${branche} : la CI du projet doit écouter agent/**`);
398
380
  return {
399
- etat: 'ferme',
400
- raison:
401
- verdict === NON_LUE ? `${INTEGRE}${court} ; CI non lue : ${raison}` : `${INTEGRE}${court}`,
381
+ issue: {
382
+ etat: 'en-file',
383
+ raison: `aucune CI ne juge ${branche} : la CI du projet doit écouter agent/**`,
384
+ },
402
385
  };
403
386
  }
404
387
  if (verdict === NON_LUE) {
405
- return { etat: 'rouvert', raison: `CI non relue : ${raison}` };
406
- }
407
- o.bd('close', ticket, '--reason', `${INTEGRE}${court}`);
408
- if (passage) {
409
- commenter(
410
- `## CI relue\n\nLa CI de ${court} sur ${o.principale} est verte au dernier essai du passage ${passage} : le ticket se ferme.`
411
- );
388
+ const texte = `## CI non lue\n\nLa CI de ${court} sur ${branche} n'a pas été lue : ${raison}\n\n${o.principale} n'avance pas sans son vert ; la branche reste en file, et la reprise du circuit la renvoie.`;
389
+ commenter(texte);
390
+ o.dire(`⚠ CI de ${court} non lue : ${raison}`);
391
+ return { issue: { etat: 'en-file', raison: texte } };
412
392
  }
413
- o.dire(`✓ ${ticket} fermé : ${court} est sur ${o.principale}`);
414
- retirerLeTravail(o, ticket);
415
- return { etat: 'ferme', raison: `${INTEGRE}${court}` };
393
+ const { gh } = o;
394
+ const url =
395
+ gh(['run', 'view', passage, '--json', 'url', '--jq', '.url']).stdout?.trim() || passage;
396
+ const journal = `${gh(['run', 'view', passage, '--log-failed']).stdout ?? ''}`
397
+ .trim()
398
+ .split('\n')
399
+ .slice(-60)
400
+ .join('\n');
401
+ commenter(
402
+ `## CI rouge\n\nLa CI de ${court} sur ${branche} est rouge : ${url}\n\nLa fin de gh run view ${passage} --log-failed :\n\n${journal}\n\n${o.principale} n'avance pas et le ticket est rouvert : sa correction entre sous son numéro. Un rejeu vert de la même CI (\`gh run rerun ${passage} --failed\`), puis \`--reprendre\` du circuit, renvoie la branche, que la file juge au dernier essai ; un test connu instable se met en quarantaine dans le test, avec le ticket qui le corrige.`
403
+ );
404
+ o.bd('update', ticket, '--status', 'open', '--remove-label', 'en-file');
405
+ o.dire(`✗ CI de ${court} sur ${branche} rouge (passage ${passage}) : ${ticket} rouvert`);
406
+ return {
407
+ issue: { etat: 'rouvert', raison: `La CI de ${court} sur ${branche} est rouge : ${url}` },
408
+ };
416
409
  }
417
410
 
418
411
  /**
419
- * Where the lot of the ticket <ticket> stands, with the tools <o>: `{ statut, raison, aEntrer,
420
- * commit, branche, surOrigin, raisonOrigin, faute }`, its status in Beads and its reason of
421
- * closure, whether its branch `agent/<ticket>` holds a lot ahead of main (which enters by the
422
- * queue), the commit of main that delivers it (`lotSurMain`, null without one), the branch it was
423
- * pushed to (`grillhouse.poussee.commit`), whether that commit is on that branch of origin
424
- * (`surOrigin`: « oui », « non » for a closure that failed before its push, or « inconnu » when
425
- * origin does not answer, `raisonOrigin` its reason), and the fault of that key (null when it
426
- * reads).
412
+ * Where the lot of the ticket <ticket> stands, with the tools <o>: `{ statut, raison }`, its status
413
+ * in Beads and its reason of closure.
427
414
  */
428
415
  export function situerLeLot(o, ticket) {
429
416
  const show = o.bd('show', ticket, '--json');
430
417
  const t = show.status === 0 ? (JSON.parse(show.stdout)[0] ?? {}) : {};
431
- const git = (...a) => spawnSync('git', ['-C', o.racine, ...a], { encoding: 'utf8' });
432
- const paquet = git('show', `refs/heads/${o.principale}:package.json`);
433
- const { commit: branche, faute } = lireCommit(
434
- paquet.status === 0 ? JSON.parse(paquet.stdout) : null
435
- );
436
- const enAvance = git(
437
- 'rev-list',
438
- '--count',
439
- `refs/heads/${o.principale}..refs/heads/agent/${ticket}`
440
- );
441
- const commit = lotSurMain(o, ticket);
442
- const origine =
443
- commit && !faute ? surOrigin(o, commit, branche) : { surOrigin: 'non', raison: null };
444
- return {
445
- statut: t.status ?? null,
446
- raison: t.close_reason ?? null,
447
- aEntrer: enAvance.status === 0 && Number(enAvance.stdout.trim()) > 0,
448
- commit,
449
- branche: faute ? null : branche,
450
- surOrigin: origine.surOrigin,
451
- raisonOrigin: origine.raison,
452
- faute: faute ?? null,
453
- };
418
+ return { statut: t.status ?? null, raison: t.close_reason ?? null };
454
419
  }
455
420
 
456
- // Whether the commit <commit> is on the branch <branche> of origin, with the tools <o>: « oui »,
457
- // « non », or « inconnu » when origin does not answer (`git ls-remote`, without a prompt, as the
458
- // push) or its tip is not known here (`merge-base --is-ancestor` neither 0 nor 1), its reason
459
- // named: a place that does not read is never « not pushed ».
460
- function surOrigin(o, commit, branche) {
461
- const ls = spawnSync(
462
- 'git',
463
- ['-C', o.racine, 'ls-remote', '--heads', 'origin', `refs/heads/${branche}`],
464
- {
465
- encoding: 'utf8',
466
- env: { ...process.env, GIT_TERMINAL_PROMPT: '0' },
467
- }
468
- );
469
- if (ls.status !== 0) {
470
- const raison =
471
- `${ls.stderr ?? ''}`.trim().split('\n')[0] || ls.error?.message || `code ${ls.status}`;
472
- return { surOrigin: 'inconnu', raison: `git ls-remote origin ${branche} : ${raison}` };
473
- }
474
- const pointe = ls.stdout.split(/\s/)[0] ?? '';
475
- if (!pointe) {
476
- return { surOrigin: 'non', raison: null };
477
- }
478
- // `--is-ancestor` answers 0 (an ancestor) or 1 (not one); any other code (the tip of origin
479
- // unknown here, 128) does not say: « inconnu », its reason named.
480
- const git = (...a) => spawnSync('git', ['-C', o.racine, ...a], { encoding: 'utf8' });
481
- const ancetre = git('merge-base', '--is-ancestor', commit, pointe);
482
- if (ancetre.status === 0) {
483
- return { surOrigin: 'oui', raison: null };
484
- }
485
- if (ancetre.status === 1) {
486
- return { surOrigin: 'non', raison: null };
487
- }
488
- const raison =
489
- `${ancetre.stderr ?? ''}`.trim().split('\n')[0] ||
490
- ancetre.error?.message ||
491
- `code ${ancetre.status}`;
492
- return {
493
- surOrigin: 'inconnu',
494
- raison: `git merge-base --is-ancestor ${commit.slice(0, 7)} origin/${branche} : ${raison}`,
495
- };
496
- }
497
-
498
- // The commit of main that delivers the ticket <ticket> (its title line names it,
499
- // `commitsDelivering` of ../un-commit-par-ticket.mjs, the prefix read from bd), the last one, in
500
- // full; null without one.
501
- function lotSurMain(o, ticket) {
502
- const git = (...a) => spawnSync('git', ['-C', o.racine, ...a], { encoding: 'utf8' });
503
- const prefixe = o.bd('config', 'get', 'issue_prefix').stdout?.trim() ?? '';
504
- return (
505
- commitsDelivering(ticket, prefixe, gitLog(o.racine))
506
- .map(c => git('rev-parse', '--verify', '-q', `${c}^{commit}`).stdout.trim())
507
- .find(
508
- c => c && git('merge-base', '--is-ancestor', c, `refs/heads/${o.principale}`).status === 0
509
- ) ?? null
510
- );
511
- }
512
-
513
- // The branch of <entree> replaced on the main <tete> in the queue's own copy, replayed, with the
514
- // tools <o>: { nouveau } (the commit to move main onto), or { sortie: [titre, détail] } (it leaves
515
- // the queue), or { garde } (it stays, the reason).
516
- function rejouer(o, tip, tete, ticketRejoue = null) {
421
+ // The branch at <tip> replaced on the main <tete> in the queue's own copy, with the tools <o>:
422
+ // { nouveau } (the replaced commit), or { sortie: [titre, détail] } (it leaves the queue), or
423
+ // { garde } (it stays, the reason).
424
+ function remplacer(o, tip, tete) {
517
425
  const { racine, dire } = o;
518
426
  const copie = path.join(racine, '.claude', 'worktrees', 'file');
519
427
  if (existsSync(copie)) {
@@ -532,7 +440,7 @@ function rejouer(o, tip, tete, ticketRejoue = null) {
532
440
  if (ouverte.refus) {
533
441
  return { garde: ouverte.refus };
534
442
  }
535
- const { dansCopie, monter, installer, tester } = ouverte;
443
+ const { dansCopie, monter, installer } = ouverte;
536
444
  if (dansCopie('checkout', '-q', '--detach', tip).status !== 0) {
537
445
  return { garde: `la copie ne prend pas ${tip.slice(0, 7)}` };
538
446
  }
@@ -598,33 +506,24 @@ function rejouer(o, tip, tete, ticketRejoue = null) {
598
506
  }
599
507
  dire(`✓ fichiers engendrés régénérés sur main : ${touches.map(e => e.nom).join(', ')}`);
600
508
  }
601
- dire('— npm run verifier (construction, gardes, tests)');
602
- const t = tester({ sorte: 'File', ticket: ticketRejoue });
603
- if (t.status === A_REPASSER) {
604
- return {
605
- garde: `son \`npm run verifier\` est à repasser (code ${A_REPASSER}) une fois replacée : l'attente de la machine a atteint sa borne. Ni vert ni rouge ; la prochaine file la rejoue.`,
606
- };
607
- }
608
- if (t.status !== 0) {
609
- const fin = `${t.stdout}${t.stderr}`.trim().split('\n').slice(-40).join('\n');
610
- return { sortie: ['ses tests sont rouges une fois la branche replacée.', fin] };
611
- }
612
509
  return { nouveau: dansCopie('rev-parse', 'HEAD').stdout.trim() };
613
510
  }
614
511
 
615
512
  /**
616
- * Main moved onto the branch of <entree> (`{ ticket, branche }`) with the tools <o>, against the
617
- * main of the moment, without a word to the ticket: `{ entre: { commit } }`, main at <commit>;
618
- * `{ sortie: [titre, détail] }` (it leaves the queue: gone, not replaced, red once replaced);
619
- * `{ garde }` (it stays in the queue, the reason); `{ ecartee: true }` (nothing ahead of main). A
620
- * lot already on main (the branch points at the commit of main that delivers its ticket, or each
621
- * of its commits has its equivalent on main, or the branch is gone), as an attempt played again
622
- * after its worker died finds it, is entered: main does not move again.
513
+ * The branch of <entree> (`{ ticket, branche }`) made the candidate the CI judges, with the tools
514
+ * <o>, against the main of the moment, without a word to the ticket: `{ candidat: { commit } }`,
515
+ * the branch on top of main (replaced when main moved) and pushed to origin; `{ entre: { commit }
516
+ * }`, a lot already on main (the branch points at the commit of main that delivers its ticket, or
517
+ * each of its commits has its equivalent on main, or the branch is gone), as an attempt played
518
+ * again after its worker died finds it: main does not move again; `{ sortie: [titre, détail] }`
519
+ * (it leaves the queue: gone, not replaced); `{ garde }` (it stays in the queue, the reason);
520
+ * `{ ecartee: true }` (nothing ahead of main).
623
521
  */
624
- export function avancerMain(o, entree) {
522
+ export function preparerLaBranche(o, entree) {
625
523
  const git = (...args) => spawnSync('git', ['-C', o.racine, ...args], { encoding: 'utf8' });
626
524
  const refPrincipale = `refs/heads/${o.principale}`;
627
- const tip = git('rev-parse', '--verify', '-q', `refs/heads/${entree.branche}`).stdout.trim();
525
+ const refBranche = `refs/heads/${entree.branche}`;
526
+ const tip = git('rev-parse', '--verify', '-q', refBranche).stdout.trim();
628
527
  const livre = lotSurMain(o, entree.ticket);
629
528
  // A lot on main whose branch is gone (a closure that failed after its deletion) is entered.
630
529
  if (!tip) {
@@ -645,46 +544,79 @@ export function avancerMain(o, entree) {
645
544
  if (enAvance === 0) {
646
545
  return { ecartee: true };
647
546
  }
648
- for (let essai = 0; essai < ESSAIS_PAR_BRANCHE; essai++) {
649
- const tete = git('rev-parse', refPrincipale).stdout.trim();
650
- let nouveau = tip;
651
- if (git('merge-base', '--is-ancestor', tete, tip).status !== 0) {
652
- const r = rejouer(o, tip, tete, entree.ticket);
653
- if (!r.nouveau) {
654
- return r;
655
- }
656
- nouveau = r.nouveau;
547
+ const tete = git('rev-parse', refPrincipale).stdout.trim();
548
+ let candidat = tip;
549
+ if (git('merge-base', '--is-ancestor', tete, tip).status !== 0) {
550
+ const r = remplacer(o, tip, tete);
551
+ if (!r.nouveau) {
552
+ return r;
657
553
  }
658
- if (nouveau !== tete) {
659
- const avance = git('merge', '-q', '--ff-only', nouveau);
660
- if (avance.status !== 0) {
661
- if (git('rev-parse', refPrincipale).stdout.trim() !== tete) {
662
- continue;
663
- }
664
- return {
665
- garde:
666
- `${o.principale} n'avance pas sur ${nouveau.slice(0, 7)} :\n${avance.stdout}${avance.stderr}`.trim(),
667
- };
668
- }
554
+ const pose = git('update-ref', refBranche, r.nouveau, tip);
555
+ if (pose.status !== 0) {
556
+ return {
557
+ garde: `${entree.branche} ne prend pas ${r.nouveau.slice(0, 7)} :\n${pose.stderr}`.trim(),
558
+ };
669
559
  }
670
- return { entre: { commit: nouveau } };
560
+ candidat = r.nouveau;
561
+ }
562
+ const pousse = spawnSync(
563
+ 'git',
564
+ ['-C', o.racine, 'push', '-q', '--force', 'origin', `${candidat}:${refBranche}`],
565
+ { encoding: 'utf8', env: { ...process.env, GIT_TERMINAL_PROMPT: '0' } }
566
+ );
567
+ if (pousse.status !== 0) {
568
+ return {
569
+ garde: `la poussée de ${candidat.slice(0, 7)} vers origin/${entree.branche} est refusée :\n${pousse.stderr.trim()}`,
570
+ };
671
571
  }
672
- return { garde: `${o.principale} bouge sans cesse : cinq essais n'ont pas suffi.` };
572
+ o.dire(`✓ ${entree.branche} poussée en ${candidat.slice(0, 7)} : sa CI la juge`);
573
+ return { candidat: { commit: candidat } };
574
+ }
575
+
576
+ /**
577
+ * Main moved forward onto the candidate <commit> of <entree> (`{ ticket, branche, commit }`) once
578
+ * its CI judged it, with the tools <o>, by fast-forward: the tree that enters is the tree the CI
579
+ * judged. `{ entre: { commit } }`, main at <commit> (or <commit> already on main, an attempt
580
+ * played again); `{ bouge: true }`, main moved meanwhile and the candidate is no longer on top of
581
+ * it, which the workflow replaces and judges again; `{ garde }`, main does not move, the reason.
582
+ */
583
+ export function avancerMain(o, entree) {
584
+ const git = (...args) => spawnSync('git', ['-C', o.racine, ...args], { encoding: 'utf8' });
585
+ const refPrincipale = `refs/heads/${o.principale}`;
586
+ // The candidate already on main: an attempt played again after main moved onto it.
587
+ if (git('merge-base', '--is-ancestor', entree.commit, refPrincipale).status === 0) {
588
+ return { entre: { commit: entree.commit } };
589
+ }
590
+ const tete = git('rev-parse', refPrincipale).stdout.trim();
591
+ if (git('merge-base', '--is-ancestor', tete, entree.commit).status !== 0) {
592
+ return { bouge: true };
593
+ }
594
+ const avance = git('merge', '-q', '--ff-only', entree.commit);
595
+ if (avance.status !== 0) {
596
+ if (git('rev-parse', refPrincipale).stdout.trim() !== tete) {
597
+ return { bouge: true };
598
+ }
599
+ return {
600
+ garde:
601
+ `${o.principale} n'avance pas sur ${entree.commit.slice(0, 7)} :\n${avance.stdout}${avance.stderr}`.trim(),
602
+ };
603
+ }
604
+ return { entre: { commit: entree.commit } };
673
605
  }
674
606
 
675
607
  /**
676
608
  * The ticket of <entree> (`{ ticket, branche, commit }`) entered on main at <commit>, with the
677
609
  * tools <o>: it closes « intégré : <commit> » and loses `en-file` (a ticket already closed is left
678
- * as it is), <apresLaFermeture> runs (the queue on its file removes its entry there), the branch is
679
- * deleted, then main is pushed to origin on the branch `grillhouse.poussee.commit` of main's
680
- * package.json; a push not made ends the queue's work on the ticket, and removes the working
681
- * directory of its circuit (`retirerLeTravail`), which the conclusion of its CI removes otherwise. Each of its gestures replays without
682
- * harm (a ticket closed is left closed, a branch gone stays gone, a commit pushed is pushed again
683
- * as it is), and never reopens the ticket; its comments are effects (`commenterAu`), which the
684
- * workflow of the queue writes once each. `{ poussee, raison }`: the branch pushed to, or null and
685
- * why, in one line (`enUneLigne`), its comment at the ticket whole.
610
+ * as it is), the branch is deleted, then main is pushed to origin on the branch
611
+ * `grillhouse.poussee.commit` of main's package.json and the branch deleted on origin; the queue
612
+ * is then done with the ticket, and removes the working directory of its circuit
613
+ * (`retirerLeTravail`). Each of its gestures replays without harm (a ticket closed is left closed,
614
+ * a branch gone stays gone, a commit pushed is pushed again as it is), and never reopens the
615
+ * ticket; its comments are effects (`commenterAu`), which the workflow of the queue writes once
616
+ * each. `{ poussee, raison }`: the branch pushed to, or null and why, in one line (`enUneLigne`),
617
+ * its comment at the ticket whole.
686
618
  */
687
- export function fermerLEntree(o, entree, apresLaFermeture = () => {}) {
619
+ export function fermerLEntree(o, entree) {
688
620
  const { racine } = o;
689
621
  const git = (...args) => spawnSync('git', ['-C', racine, ...args], { encoding: 'utf8' });
690
622
  const court = entree.commit.slice(0, 7);
@@ -695,7 +627,6 @@ export function fermerLEntree(o, entree, apresLaFermeture = () => {}) {
695
627
  o.bd('update', entree.ticket, '--remove-label', 'en-file');
696
628
  o.bd('close', entree.ticket, '--reason', `${INTEGRE}${court}`);
697
629
  }
698
- apresLaFermeture();
699
630
  o.dire(`✓ ${entree.branche} entre sur ${o.principale} : ${court}`);
700
631
  if (git('rev-parse', '--verify', '-q', `refs/heads/${entree.branche}`).status === 0) {
701
632
  const efface = git('branch', '-D', entree.branche);
@@ -706,35 +637,44 @@ export function fermerLEntree(o, entree, apresLaFermeture = () => {}) {
706
637
  o.dire(`⚠ ${entree.branche} n'est pas effacée`);
707
638
  }
708
639
  }
640
+ retirerLeTravail(o, entree.ticket);
709
641
  const paquet = git('show', `refs/heads/${o.principale}:package.json`);
710
642
  const { commit, faute } = lireCommit(paquet.status === 0 ? JSON.parse(paquet.stdout) : null);
711
643
  if (faute) {
712
644
  const raison = `Poussée non faite : grillhouse.poussee.commit vaut ${faute}, pas un nom de branche.`;
713
645
  commenter(raison);
714
- retirerLeTravail(o, entree.ticket);
715
646
  return { poussee: null, raison: enUneLigne(raison) };
716
647
  }
648
+ const sansInvite = { encoding: 'utf8', env: { ...process.env, GIT_TERMINAL_PROMPT: '0' } };
717
649
  const pousse = spawnSync(
718
650
  'git',
719
651
  ['-C', racine, 'push', 'origin', `${entree.commit}:refs/heads/${commit}`],
720
- { encoding: 'utf8', env: { ...process.env, GIT_TERMINAL_PROMPT: '0' } }
652
+ sansInvite
721
653
  );
722
654
  if (pousse.status !== 0) {
723
655
  const raison = `La poussée de ${court} vers origin/${commit} (grillhouse.poussee.commit) est refusée :\n${pousse.stderr.trim()}`;
724
656
  commenter(raison);
725
657
  o.dire(`⚠ poussée de ${court} refusée`);
726
- retirerLeTravail(o, entree.ticket);
727
658
  return { poussee: null, raison: enUneLigne(raison) };
728
659
  }
729
660
  o.dire(`✓ poussée : ${court} est sur origin/${commit}`);
661
+ // The branch the CI judged leaves origin with its entry; one already gone is no fault.
662
+ const distante = spawnSync(
663
+ 'git',
664
+ ['-C', racine, 'push', '-q', 'origin', '--delete', `refs/heads/${entree.branche}`],
665
+ sansInvite
666
+ );
667
+ if (distante.status !== 0) {
668
+ o.dire(`⚠ origin/${entree.branche} n'est pas effacée : ${distante.stderr.trim()}`);
669
+ }
730
670
  return { poussee: commit, raison: null };
731
671
  }
732
672
 
733
673
  /**
734
- * What the outcome <r> of `avancerMain` for <entree> says to its ticket, with the tools <o>: a
735
- * branch out of the queue reopens it, its files or its red named; a branch set aside loses
736
- * `en-file`, the ticket left open; a branch kept, the reason. `{ etat, raison }`: `rouvert` or
737
- * `en-file`, as the circuit reads the queue.
674
+ * What the outcome <r> of `preparerLaBranche` or `avancerMain` for <entree> says to its ticket,
675
+ * with the tools <o>: a branch out of the queue reopens it, its files named; a branch set aside
676
+ * loses `en-file`, the ticket left open; a branch kept, the reason. `{ etat, raison }`: `rouvert`
677
+ * or `en-file`, as the circuit reads the queue.
738
678
  */
739
679
  export function direLIssue(o, entree, r) {
740
680
  const commenter = texte => commenterAu(o, entree.ticket, texte);