@roomi-fields/grillhouse 0.41.0 → 0.43.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 +34 -0
- package/cadre/templates/projet/.github/workflows/ci.yml +13 -0
- package/cadre/templates/projet/.github/workflows/nuit.yml +9 -0
- package/cadre/templates/projet/CLAUDE.md +1 -1
- package/cadre/templates/turbo/paquets.json +2 -1
- package/cadre/templates/turbo/sans-paquets.json +2 -1
- package/docs/ARCHITECTURE.md +17 -5
- package/docs/INTERFACE.md +7 -6
- package/hooks/register.tsx +8 -2
- package/package.json +1 -1
- package/scripts/activites.mjs +20 -8
- package/scripts/circuit.mjs +96 -9
- package/scripts/codes-de-sortie.mjs +6 -0
- package/scripts/effets.mjs +9 -3
- package/scripts/faits-du-circuit.mjs +13 -5
- package/scripts/garde-de-la-memoire.mjs +231 -0
- package/scripts/jointure.d.ts +9 -2
- package/scripts/langages/cargo/commandes.mjs +6 -3
- package/scripts/langages/python/commandes.mjs +2 -2
- package/scripts/langages/python/index.mjs +4 -2
- package/scripts/langages/typescript/turbo-des-paquets.mjs +23 -5
- package/scripts/langages/typescript/verifier.mjs +75 -18
- package/scripts/langages/typescript/vitest-config/base.mjs +6 -4
- package/scripts/mesure-de-la-machine.d.mts +6 -0
- package/scripts/mesure-de-la-machine.mjs +29 -9
- package/scripts/nuit.sh +1 -1
- package/scripts/passe-de-la-machine.mjs +2 -1
- package/scripts/places-de-la-machine.mjs +3 -3
- package/scripts/resultats.mjs +10 -5
- package/scripts/seances.mjs +18 -5
- package/scripts/services-du-noyau.mjs +8 -1
- package/scripts/superviseur.mjs +14 -9
- package/scripts/tableau.mjs +57 -14
- package/scripts/ticket-du-circuit.mjs +12 -1
- package/skills/pitmaster/references/consigne-agent.md +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,40 @@ The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [0.43.0] - 2026-11-17
|
|
10
|
+
|
|
11
|
+
- **The day of the board counts the tokens since the day's marker, as it counts the time** (grillhouse-38t): a session still open counted in the day the part of its turns since the marker, but all the tokens of its transcript — a supervisor's session opened days ago read « jour 6 min · 37,0 M » right after `/grillhouse newday` (OSC Bridge). A measure that holds its tokens by minute now counts in the day those of the minutes since the marker (`jetonsDuJour`); a register line without them counts whole in the day it ended, as before. And the time of the supervisor's own session counts neither in the day nor in the cumul, its tokens still do: open for weeks, each of its turns counted from the request to the end of the answer, its waits included — 2 025 h of « travail » for one session of OSC Bridge, where SyntHub's whole cumul read 135 h; the time of the two figures is now the work of the agents and of the circuits. **Action for projects**: none.
|
|
12
|
+
|
|
13
|
+
- **A crate without a test does not turn the pass of its project red** (grillhouse-jhf): the skeleton of a crate (`npx grillhouse paquet`) declares its target of integration tests, `tests/it/main.rs`, with no test in it, as the charter has it; nextest, played on the whole crate, ended in error (« no tests to run »), so two crates born out of the circuit turned red the final pass of every circuit of their project until their own ticket of code entered (OSD, osd-cli and osd-formats, circuit OSD-b91.7). The day of a whole crate now plays nextest with `--no-tests=pass`; a target or a module named that plays no test stays an error. **Action for projects**: none.
|
|
14
|
+
|
|
15
|
+
- **The board writes a duration of an hour or more without spaces, and a billion tokens in G** : « 1h16 », not « 1 h 16 » (`duree` of `scripts/tableau.mjs`), on every line of the board and of the status line; a count of tokens of a billion or more is written « 1,2 G » (`k`), where it read « 1234,5 M », and a count that would round to a thousand of its unit takes the next one. **Action for projects**: none.
|
|
16
|
+
|
|
17
|
+
- **A pass never plays more test processes than the machine has cores, and is cut before the memory runs out** (grillhouse-anz): a heavy pass played half the cores as tasks side by side, each task of tests keeping Vitest's own default, every core — up to 6 × 11 test processes on 12 cores — and read the memory at its start alone. On a project whose test workers weigh 1.5 GB (BPScript, a pass replayed whole after an update), 19 of them took 28 GB, memory and swap ran out and the kernel killed the user's session, every Claude session with it. Besides, the bound of a session of an agent (`GRILLHOUSE_TRAVAILLEURS`, cores ÷ places) never reached the tests: Turborepo's strict mode drops a variable the root's `globalPassThroughEnv` does not name. Three changes: the variable joins `globalPassThroughEnv` (the generator writes it, the guard `turbo-des-paquets` demands it); a pass gives each task of tests the cores shared between the tasks of tests side by side (`travailleursDeLaPasse`: 2 workers on 12 cores and 6 tasks, 12 in all); and the run of Turborepo plays under a watch of the memory (`scripts/garde-de-la-memoire.mjs`, as earlyoom and systemd-oomd), which ends the command and every process it started when the memory available and the free swap fall together under 4 GB, or when the machine waits for its memory half of the time (`/proc/pressure/memory`, `full avg10` at 50 %, which a swap held in memory reaches first) — the pass says why and ends at 75, « à repasser », and a circuit counts that 75 as a replay (`memoire-coupee.txt` in the results of the pass), so that a pass the memory cuts again goes up to the supervisor instead of waiting without end. The share counts the packages that hold tests, not those a pass plays again: on a project of many packages where few replay, each task of tests has fewer workers than the cores left idle would allow, and cargo and pytest take the same bound in a pass (`-j`, `-n`). **Action for projects**: `npx grillhouse maj`, which writes `GRILLHOUSE_TRAVAILLEURS` in the root's `turbo.json`.
|
|
18
|
+
|
|
19
|
+
- **The board says the gesture when the command `bd` is missing** (grillhouse-4t9): a session opened under a Node where Beads is not installed (a global package of npm follows its Node: the move to Node 26 leaves it behind) showed « Tickets illisibles : spawnSync bd ENOENT » on every board, the error of the system and no gesture. The alert now says « la commande bd est absente du PATH de cette séance » with its command (`npm install -g @beads/bd`), as the session start names it under « Manque » ; any other fault of Beads keeps its first line. **Action for projects**: none; after a change of Node, install Beads again under it (`npm install -g @beads/bd`).
|
|
20
|
+
|
|
21
|
+
## [0.42.0] - 2026-11-16
|
|
22
|
+
|
|
23
|
+
- **The guard refuses a style script of the root that launches the packages again** (grillhouse-6dt): the root keeps its own files (grillhouse-44b.9), and the guard `turbo-des-paquets` refused a root `lint` or `format:check` that names a file a package holds, but read paths alone; a script that delegates to the packages (`npm run lint --workspaces --if-present`, `-w <paquet>`, `turbo run lint`) names none and passed, so the root task `//#lint` played the style of every package a second time, the packages out of the frame included — BPScript's update went red on « ⛔ //#lint (code 1) », no guard naming the script. The guard now refuses such a script by its name, with the gesture. **Action for projects**: a project whose root `lint` or `format:check` launches its packages removes it, or reduces it to the files of the root; Turborepo plays the script of each package.
|
|
24
|
+
|
|
25
|
+
- **The CI of the frame fetches the submodules of the project, private ones included** (grillhouse-c42): the workflows of the template (`ci.yml`, `nuit.yml`) checked the repository out without its submodules, though the frame reads them on the poste (`grillhouse.partage`); a project whose guards and tests read one went red on GitHub — BPScript, « le sous-module du moteur n'est pas là (vendor/bp3-engine) » — and could not edit a generated workflow. Each checkout now takes the submodules, recursively (`submodules: recursive`), with the repository's secret `SOUS_MODULES` as its token when it exists, the workflow's own token otherwise. **Action for projects**: `npx grillhouse maj`, which rewrites the frame's workflows; a project with a private submodule creates the secret `SOUS_MODULES` of its repository (a token that reads the submodule's repository), and a workflow of its own that calls the frame's passes it (`secrets: inherit`).
|
|
26
|
+
|
|
27
|
+
- **A red workflow of main already given does not come back after a reading of bd that fails** (grillhouse-d4n.21): the wait of the supervisor gives a ticket reopened for a red workflow of main once, and keeps the reds given that still stand; but a reading of bd that failed (its 5 s delay on a loaded machine) was read as « no red », the memory was written empty, and the next reading gave the same red as new — SyntHub SH-br0.6.3 came back every 5 min, `--rappel` governing only the questions of the circuits. A failed reading now gives null (`fluxRougesDe`), which the wait leaves aside: the reds given stay as they are, and the next reading judges them. **Action for projects**: none.
|
|
28
|
+
|
|
29
|
+
- **The context of `--depuis <role>` tells the other agent whom it was given to** (grillhouse-d4n.16): the text of `--contexte` heads the instruction of each agent of the run as « TA TÂCHE » ; given with `--depuis testwriter` (« écris les tests… »), the developpeur launched after the proof read it as his own, refused it — his role writes no test — and sent the lot back to the testwriter, twice: the stop « sans-livraison » (SyntHub SH-ae6.6.1). The run now keeps the role the context was given to (`destinataire`, in the memory of its acts); that agent still reads « TA TÂCHE », the other one reads « LA TÂCHE DU SUPERVISEUR, donnée au <rôle> … » and that his share is his own role's. **Action for projects**: none.
|
|
30
|
+
|
|
31
|
+
- **A plan the explorateur writes again keeps the packages the supervisor gave it** (grillhouse-d4n.17): `--etendre` wrote the gained package in the title alone; when the plan was written again (a description the responsable changed), the explorateur's packages replaced the title, the supervisor's extension gone, and the developpeur met the same file out of the plan — a second `--etendre .` on SyntHub SH-ae6.6.1. The extension is now kept among the sheets with the plan it extended (`etendus`), and a plan written again takes back each package it leaves out, in its order, said at the ticket (`avecLesEtendus`); `--recommencer`, which removes the sheets, starts the plan over without them. **Action for projects**: none.
|
|
32
|
+
|
|
33
|
+
- **`--etendre` answers a stopped circuit whose copy no longer loads** (grillhouse-mk7): the command read the order of the extended plan in the ticket's copy alone, and failed with the error of its tool when that tree did not load — `cargo metadata` (code 101) on a workspace whose member names a dependency its root does not declare, the very state `--etendre .` came to repair (OSC Bridge OB-20q.1). The order is now read in the copy, else in the main tree, else each gained package goes at the plan's end (`planEtendu`), and the line of the plan at the ticket says which when the copy did not load; the names the title writes are read the same way (`nomsDe`), a package keeping its path when no tree loads. **Action for projects**: none.
|
|
34
|
+
|
|
35
|
+
- **A session of the envelope finds uv, and plays `npm test` on a package of Python** (grillhouse-d4n.19): the home of an agent's envelope shows only what is declared, and the module `python` declared the Pythons uv installs (`~/.local/share/uv/python/`) but not uv itself, which its installer lays in `~/.local/bin/uv`. A testwriter or a developpeur whose plan holds a package of Python could not play its tests (« uv absent du PATH »), delivered without running them, and the checks, played out of the envelope, found the reds — the stop « sans-livraison » (SyntHub SH-br0.6.3). The module now declares `~/.local/bin/uv` among what its tools read, mounted read-only as cargo's home is. **Action for projects**: none.
|
|
36
|
+
|
|
37
|
+
- **A refused sheet names every fault of it in one refusal** (grillhouse-d4n.18): a session is taken up once on a refused sheet, but its faults were judged in layers, each hiding the next — what the sheet lacks, its pieces not found, those out of the ticket, then the session's own validation (the conformity of a review). A reviewer on a lot without a defect was refused for « RENDU sans constat bloquant », then for « conformite : sans ligne pour crates/service/Cargo.toml#service », a fault its first refusal did not name: the stop « sans-fiche » (SyntHub SH-ae6.6.1). A sheet that holds its schema is now judged whole: `lireFiche` names what it lacks, its pieces not found and those out of the ticket together, and gives the sheet read back beside them (`lue`), which `jusquALaFiche` gives to the session's validation, its faults joined to the same refusal. **Action for projects**: none.
|
|
38
|
+
|
|
39
|
+
- **The integration commits the lot the copy holds, even under a stale label `en-file`** (grillhouse-d4n.20): the integration read the label `en-file` alone as « the lot is already committed », and skipped its commit; a circuit whose branch waited in the queue and that went back to its plan, its tests or its code wrote a new lot in a new copy, which the integration then left uncommitted while it announced the tip of the branch — SyntHub SH-ae6.6.1 announced main's own commit, « la branche n'a rien en avance sur main », 13 files of the copy uncommitted. The label now skips the commit only when the copy holds no file of the lot (the integrator removes the copy of a lot it commits); a copy that holds one is committed, the branch set on it. **Action for projects**: none.
|
|
40
|
+
|
|
41
|
+
- **A circuit stopped on the supervisor's word leaves the queue of the tickets** (grillhouse-d4n.14, grillhouse-d4n.15): since the queue counts only the circuits alive (grillhouse-d0t, 0.39.0), a ticket stopped by `--arreter` stayed open and labelled `circuit`, its workflow ended, so the queue started it again at its next turn — SyntHub SH-ae6.6.1 stopped at 11:15 after its review, started again alone at 11:16, committed its lot and sent it to the CI. The act of the stop now takes the label `circuit` off the ticket (`sortirDeLaFile`), as the architecture already said, and the run that opens on the supervisor's answer (`--reprendre`, `--depuis`, `--etendre`) puts it back (`rentrerDansLaFile`); the effect `etiquettes` carries the labels taken off (`retirees`). **Action for projects**: none.
|
|
42
|
+
|
|
9
43
|
## [0.41.0] - 2026-11-16
|
|
10
44
|
|
|
11
45
|
- **The « nuit rouge » alert of the board follows the verdict of the project's last night, not the presence of a `nuit` ticket** (grillhouse-o7g): the alert was built by looping over the open tickets labelled `nuit`, so it stayed after the night turned green (OSC Bridge: 6 h after a green night). The night pass (`scripts/nuit.sh`) now writes, at its end, a durable verdict per project in `<git common dir>/nuit/verdict` (`scripts/verdict-de-la-nuit.mjs`): green on exit 0, red on any other code but 75, and 75 (« à repasser ») writes nothing and leaves the previous verdict. The board reads it without a server: the alert stands while it is red (naming each open `nuit` ticket, or « Nuit rouge » alone when none is open), falls on green, and is not posed when no night is known or the file does not read; on a board of several projects each alert follows its own project's verdict. The `nuit` ticket keeps its cycle: the green does not close or change it. **Action for projects**: none; the alert appears after the next night's verdict.
|
|
@@ -96,6 +96,10 @@ jobs:
|
|
|
96
96
|
uses: actions/checkout@v5
|
|
97
97
|
with:
|
|
98
98
|
fetch-depth: 0
|
|
99
|
+
# The submodules of the project, a private one read by the repository's secret SOUS_MODULES
|
|
100
|
+
# (a token that reads it); without the secret, the workflow's own token.
|
|
101
|
+
submodules: recursive
|
|
102
|
+
token: ${{ secrets.SOUS_MODULES || github.token }}
|
|
99
103
|
|
|
100
104
|
- name: Setup Node.js ${{ matrix.node-version }}
|
|
101
105
|
uses: actions/setup-node@v5
|
|
@@ -139,6 +143,10 @@ jobs:
|
|
|
139
143
|
uses: actions/checkout@v5
|
|
140
144
|
with:
|
|
141
145
|
fetch-depth: 0
|
|
146
|
+
# The submodules of the project, a private one read by the repository's secret SOUS_MODULES
|
|
147
|
+
# (a token that reads it); without the secret, the workflow's own token.
|
|
148
|
+
submodules: recursive
|
|
149
|
+
token: ${{ secrets.SOUS_MODULES || github.token }}
|
|
142
150
|
|
|
143
151
|
- name: Setup Node.js ${{ matrix.node-version }}
|
|
144
152
|
uses: actions/setup-node@v5
|
|
@@ -194,6 +202,11 @@ jobs:
|
|
|
194
202
|
steps:
|
|
195
203
|
- name: Checkout
|
|
196
204
|
uses: actions/checkout@v5
|
|
205
|
+
with:
|
|
206
|
+
# The submodules of the project, a private one read by the repository's secret SOUS_MODULES
|
|
207
|
+
# (a token that reads it); without the secret, the workflow's own token.
|
|
208
|
+
submodules: recursive
|
|
209
|
+
token: ${{ secrets.SOUS_MODULES || github.token }}
|
|
197
210
|
|
|
198
211
|
- name: Setup Node.js ${{ matrix.node-version }}
|
|
199
212
|
uses: actions/setup-node@v5
|
|
@@ -39,6 +39,10 @@ jobs:
|
|
|
39
39
|
uses: actions/checkout@v5
|
|
40
40
|
with:
|
|
41
41
|
fetch-depth: 0
|
|
42
|
+
# The submodules of the project, a private one read by the repository's secret SOUS_MODULES
|
|
43
|
+
# (a token that reads it); without the secret, the workflow's own token.
|
|
44
|
+
submodules: recursive
|
|
45
|
+
token: ${{ secrets.SOUS_MODULES || github.token }}
|
|
42
46
|
|
|
43
47
|
- name: Setup Node.js ${{ matrix.node-version }}
|
|
44
48
|
uses: actions/setup-node@v5
|
|
@@ -93,6 +97,11 @@ jobs:
|
|
|
93
97
|
steps:
|
|
94
98
|
- name: Checkout
|
|
95
99
|
uses: actions/checkout@v5
|
|
100
|
+
with:
|
|
101
|
+
# The submodules of the project, a private one read by the repository's secret SOUS_MODULES
|
|
102
|
+
# (a token that reads it); without the secret, the workflow's own token.
|
|
103
|
+
submodules: recursive
|
|
104
|
+
token: ${{ secrets.SOUS_MODULES || github.token }}
|
|
96
105
|
|
|
97
106
|
- name: Setup Node.js ${{ matrix.node-version }}
|
|
98
107
|
uses: actions/setup-node@v5
|
|
@@ -37,7 +37,7 @@ interface publiée…>. Le cadre et l'architecture montent toujours (charte comm
|
|
|
37
37
|
|
|
38
38
|
## Commandes
|
|
39
39
|
|
|
40
|
-
- `npm test` (Turborepo : construction, puis tests ; une tâche dont rien n'a bougé est relue de son cache, `npm run test:forcer` rejoue) · `npm test -- <chemins>` (un lancement ciblé : chaque chemin écrit depuis la racine, joué dans son paquet, avec les constructions dont ses tests dépendent, relues du cache ; ses tests rejouent dès que bouge ce qu'ils importent ; un lancement qui ne joue aucun test échoue ; un test de nuit nommé est refusé, la nuit seule le joue ; une mesure de temps — un banc, un témoin de temps — se joue quand son propre fichier est nommé, sous la mesure du temps) · `npm run verifier` (après la construction, les gardes du cadre, celles du projet — son script `gardes` —, le typage de chaque paquet — son script `typecheck`, ses sources et ses tests —, la mise en forme et le lint de la racine — ses scripts `format:check` et `lint`, joués quand ils existent — et les tests, côte à côte, sous le verrou de la machine, sans aucune mesure de temps, que joue la nuit seule : ce que jouent l'intégration, la file, la CI et la nuit ; mesuré contre le dernier vert, un paquet rejoué joue les tests que Vitest relie aux fichiers changés depuis, tous quand un changement sort de son graphe ; 0 vert, 1 rouge, un délai dépassé compris ; 75 quand l'attente du verrou de la machine ou de place sous /tmp atteint sa borne) · `npm run verifier -- --tout` (la passe complète, chaque test joué pour de vrai : ce que joue la nuit) · `npm run verifier -- --gardes` (les gardes, la mise en forme et le lint, même verdict : ce que joue le relecteur) · `npm run typecheck` · `npm run lint` · `npm run format:check`.
|
|
40
|
+
- `npm test` (Turborepo : construction, puis tests ; une tâche dont rien n'a bougé est relue de son cache, `npm run test:forcer` rejoue) · `npm test -- <chemins>` (un lancement ciblé : chaque chemin écrit depuis la racine, joué dans son paquet, avec les constructions dont ses tests dépendent, relues du cache ; ses tests rejouent dès que bouge ce qu'ils importent ; un lancement qui ne joue aucun test échoue ; un test de nuit nommé est refusé, la nuit seule le joue ; une mesure de temps — un banc, un témoin de temps — se joue quand son propre fichier est nommé, sous la mesure du temps) · `npm run verifier` (après la construction, les gardes du cadre, celles du projet — son script `gardes` —, le typage de chaque paquet — son script `typecheck`, ses sources et ses tests —, la mise en forme et le lint de la racine — ses scripts `format:check` et `lint`, joués quand ils existent — et les tests, côte à côte, sous le verrou de la machine, sans aucune mesure de temps, que joue la nuit seule : ce que jouent l'intégration, la file, la CI et la nuit ; mesuré contre le dernier vert, un paquet rejoué joue les tests que Vitest relie aux fichiers changés depuis, tous quand un changement sort de son graphe ; 0 vert, 1 rouge, un délai dépassé compris ; 75 quand l'attente du verrou de la machine ou de place sous /tmp atteint sa borne, ou quand la veille de la mémoire coupe la passe avant que le système ne tue) · `npm run verifier -- --tout` (la passe complète, chaque test joué pour de vrai : ce que joue la nuit) · `npm run verifier -- --gardes` (les gardes, la mise en forme et le lint, même verdict : ce que joue le relecteur) · `npm run typecheck` · `npm run lint` · `npm run format:check`.
|
|
41
41
|
- Préfixe des tickets : `<prefixe>-`.
|
|
42
42
|
- La politique de poussée : la clé `grillhouse.poussee` du `package.json` (`commit` : la branche où
|
|
43
43
|
part chaque commit, main par défaut ; `nuit` : la branche où la nuit pousse son commit vert ;
|
package/docs/ARCHITECTURE.md
CHANGED
|
@@ -779,7 +779,7 @@ chaque lot traité, sans tube ni veille à durée (grillhouse-d4n.9 : une attent
|
|
|
779
779
|
derrière `| tail` n'a été lue par personne pendant 40 min). Une question toujours sans réponse
|
|
780
780
|
(le circuit est arrêté sur la même clé) est re-présentée toutes les 5 min
|
|
781
781
|
(`--rappel <minutes>`), comme SQS redonne un message non acquitté après son délai de visibilité,
|
|
782
|
-
jusqu'à ce que le circuit quitte l'arrêt ; un ticket que la file a rouvert pour un flux de main rouge (étiquette `flux-rouge`, ouvert) se rend aussi comme un lot, une fois, avec l'adresse du passage, et plus une fois repris ou refermé ; une clé qui change est une question neuve, rendue
|
|
782
|
+
jusqu'à ce que le circuit quitte l'arrêt ; un ticket que la file a rouvert pour un flux de main rouge (étiquette `flux-rouge`, ouvert) se rend aussi comme un lot, une fois, avec l'adresse du passage, et plus une fois repris ou refermé (une lecture de bd en échec ne dit rien des rouges, et laisse tels quels ceux déjà rendus) ; une clé qui change est une question neuve, rendue
|
|
783
783
|
aussitôt. `.claude/worktrees/questions-remontees.json` garde, par arrêt, `depuis` (sa première
|
|
784
784
|
remontée) et `presentee` (sa dernière présentation), en ms ; un fichier à l'ancien format (liste de
|
|
785
785
|
clés) se lit, ses arrêts prenant l'heure de la lecture. Le tableau les lit : une alerte par
|
|
@@ -963,7 +963,10 @@ nombre de cœurs et si 4 Go au moins sont libres, deux départs étant espacés
|
|
|
963
963
|
espacement), garde le rang d'arrivée du circuit (pris à son lancement) et s'arrête à la borne de
|
|
964
964
|
l'attente du verrou, 75. Chaque séance joue ses tests sur max(1, cœurs ÷ places) travailleurs
|
|
965
965
|
(`GRILLHOUSE_TRAVAILLEURS`, lu par le module de chaque langage : `maxWorkers` de Vitest, `-j` de
|
|
966
|
-
cargo et nextest, `-n` de pytest), sous `nice` et `ionice` ;
|
|
966
|
+
cargo et nextest, `-n` de pytest), sous `nice` et `ionice` ; la variable atteint chaque tâche par le
|
|
967
|
+
`globalPassThroughEnv` de la racine, que le mode strict de Turborepo exige. Une passe lourde partage
|
|
968
|
+
les cœurs entre ses tâches de tests côte à côte : les processus de tests d'une passe ne dépassent
|
|
969
|
+
jamais le nombre de cœurs.
|
|
967
970
|
Une passe lourde prend sa place, puis le verrou exclusif de la machine ; une passe ciblée part
|
|
968
971
|
pendant qu'une passe lourde tient le verrou.
|
|
969
972
|
|
|
@@ -996,7 +999,14 @@ reprend, comme le serveur de tâches de GNU make. L'attente a une borne, 60 min
|
|
|
996
999
|
(`GRILLHOUSE_ATTENTE_MACHINE_MS`), plus longue que la plus longue passe complète mesurée : au-delà,
|
|
997
1000
|
la mesure s'arrête « à repasser » (code 75), comme `flock -w`. Un verrou tenu par un ancêtre de
|
|
998
1001
|
celui qui attend est un blocage : l'attente le dit tout de suite et s'arrête, rouge. La passe
|
|
999
|
-
borne ses tâches côte à côte à la moitié des cœurs
|
|
1002
|
+
borne ses tâches côte à côte à la moitié des cœurs, et les travailleurs de chaque tâche de tests aux
|
|
1003
|
+
cœurs partagés entre elles (`travailleursDeLaPasse`). Elle joue sous la veille de la mémoire
|
|
1004
|
+
(`scripts/garde-de-la-memoire.mjs`, comme earlyoom et systemd-oomd) : quand la mémoire disponible et
|
|
1005
|
+
l'échange libre passent ensemble sous 4 Go, ou que la machine attend sa mémoire la moitié du temps
|
|
1006
|
+
(`/proc/pressure/memory`, `full avg10` à 50 %), la veille arrête la commande et chaque processus
|
|
1007
|
+
qu'elle a lancé ; la passe dit pourquoi et finit « à repasser » (75), avant que le noyau ne tue. Ce
|
|
1008
|
+
75 n'est pas une attente de la machine : le circuit le compte comme un rejeu (`memoire-coupee.txt`
|
|
1009
|
+
dans les résultats de la passe), et une passe coupée de nouveau monte au superviseur. Ainsi une mesure rend le résultat du code, et
|
|
1000
1010
|
non celui d'une autre mesure à côté, et aucune passe ne reste figée sans le dire.
|
|
1001
1011
|
|
|
1002
1012
|
**Le cadre passe avant les projets** : une mesure jouée dans le dépôt du cadre lui-même (le
|
|
@@ -1118,7 +1128,8 @@ aussi les branches `agent/**` que pousse la file), et `nuit.yml`, les tests de n
|
|
|
1118
1128
|
poste, tels que Grillhouse les joue chez lui. Chaque job tourne sur la variable `RUNNER` du dépôt
|
|
1119
1129
|
(`fromJSON(vars.RUNNER || '"ubuntu-latest"')`, une étiquette ou une liste d'étiquettes en JSON,
|
|
1120
1130
|
la convention de SyntHub), qui vit dans les réglages du dépôt sur GitHub et qu'aucun fichier
|
|
1121
|
-
n'écrit.
|
|
1131
|
+
n'écrit. Chaque récupération du dépôt prend ses sous-modules (`submodules: recursive`), un
|
|
1132
|
+
sous-module privé par le secret `SOUS_MODULES` du dépôt, sinon par le jeton du flux. Les tranches couvrent chaque langage, chaque test joué une fois dans leur union :
|
|
1122
1133
|
Vitest par son découpage (`--shard`), cargo par celui de nextest (`--partition hash:i/n`, ses
|
|
1123
1134
|
doctests dans la première tranche), Python, que pytest ne découpe pas, dans la première tranche
|
|
1124
1135
|
seule ; la fusion ne relit que les rapports de Vitest, et un rouge de cargo ou de Python est le
|
|
@@ -1578,7 +1589,8 @@ enregistrer-la-base-de-reference.mjs`, avec la version épinglée d'alors) quand
|
|
|
1578
1589
|
reste comptée par le disque libre réel. Repris, il redemande lui-même sa place
|
|
1579
1590
|
(`reserverDesCircuits`, son rang d'arrivée gardé) et attend, à l'étape `attend-une-place`, avant
|
|
1580
1591
|
de rouvrir. À 1, le suivant part quand le précédent finit ou se met en pause. Un déroulé ne se ferme qu'intégré (son ticket fermé dans Beads) ou arrêté sur le
|
|
1581
|
-
mot du superviseur (`--arreter`, l'étiquette `circuit` retirée
|
|
1592
|
+
mot du superviseur (`--arreter`, l'étiquette `circuit` retirée par l'acte de l'arrêt, `sortirDeLaFile` de
|
|
1593
|
+
`scripts/circuit.mjs`, et remise par le run qui s'ouvre sur sa réponse, `rentrerDansLaFile`) : Beads, le registre durable,
|
|
1582
1594
|
le garde de repartir. Un circuit vivant dont le ticket est fermé hors de son circuit (livré en
|
|
1583
1595
|
direct), avant son intégration, ne compte plus : la file l'arrête (`ARRETER`) à son réveil
|
|
1584
1596
|
suivant et écrit sa ligne « termine » au journal des états (`fermesHorsCircuit` de
|
package/docs/INTERFACE.md
CHANGED
|
@@ -200,8 +200,8 @@ noyau, et chaque réponse décrit sans agir, sauf `verifier` d'un fichier engend
|
|
|
200
200
|
écrits ; `~/.cargo/` (son `env`, que les shells sourcent, sa configuration, ses binaires) et
|
|
201
201
|
`~/.rustup/` lus ; `python` : `.venv/` et `.pytest_cache/`, où ses commandes font écrire uv et pytest pour chaque
|
|
202
202
|
paquet, et `~/.cache/grillhouse/uv/` écrits,
|
|
203
|
-
`__pycache__` propre (le code-octet de Python, sous un seul arbre à la racine),
|
|
204
|
-
`~/.local/share/uv/python/`, lus.
|
|
203
|
+
`__pycache__` propre (le code-octet de Python, sous un seul arbre à la racine), uv lui-même, là où son
|
|
204
|
+
installeur le pose (`~/.local/bin/uv`), et les Python de uv, `~/.local/share/uv/python/`, lus.
|
|
205
205
|
- `droits` : les règles de Claude Code qui refusent à un rôle qui écrit l'outil de test lancé
|
|
206
206
|
directement ; `typescript`, Vitest et Turborepo ; `cargo`, `cargo test` et `cargo nextest` ;
|
|
207
207
|
`python`, pytest, seul, par Python ou par `uv run`.
|
|
@@ -366,10 +366,11 @@ l'interruption), la pression de la machine et son verrou, les places de la machi
|
|
|
366
366
|
l'environnement de ses enfants, son code de sortie, ou celui de l'attente qui s'arrête, 75 à sa
|
|
367
367
|
borne, 1 pour un serveur qui ne répond pas ; `avecLaMachineEtUnePlace` : une passe lourde, la place
|
|
368
368
|
puis le verrou ; aucune place dans la CI ni dans l'enveloppe d'un agent, que couvre la place de sa
|
|
369
|
-
séance), les travailleurs d'une
|
|
370
|
-
(`travailleursDeLaSeance(env)` : le nombre que donne `GRILLHOUSE_TRAVAILLEURS`,
|
|
371
|
-
|
|
372
|
-
|
|
369
|
+
séance), les travailleurs des tests d'une tâche
|
|
370
|
+
(`travailleursDeLaSeance(env)` : le nombre que donne `GRILLHOUSE_TRAVAILLEURS`, que posent une
|
|
371
|
+
séance (max(1, cœurs ÷ places)) et une passe lourde (les cœurs partagés entre ses tâches de tests
|
|
372
|
+
côte à côte), et que le module passe à son outil — `maxWorkers`, `-j`, `-n` — ou `null` sans la
|
|
373
|
+
variable, l'outil gardant son défaut ; une valeur fautive est refusée par son nom), le dernier vert, le
|
|
373
374
|
registre des résultats (`registre-des-resultats.mjs` : `garderLeRegistre(etat, rapports)`, les
|
|
374
375
|
tests verts de chaque fichier d'une passe, que la passe complète écrit quand `GRILLHOUSE_RESULTATS`
|
|
375
376
|
nomme son dossier de résultats ; `lireLeRegistre(racine)`, le registre de la branche quand son
|
package/hooks/register.tsx
CHANGED
|
@@ -71,10 +71,16 @@ const etat = atom({ plugin: 'grillhouse', key: 'etat' } as const, {
|
|
|
71
71
|
} as Etat)
|
|
72
72
|
|
|
73
73
|
export const k = (n: number) =>
|
|
74
|
-
n >=
|
|
74
|
+
n >= 999.95e6
|
|
75
|
+
? `${(n / 1e9).toFixed(1).replace('.', ',')} G`
|
|
76
|
+
: n >= 999.5e3
|
|
77
|
+
? `${(n / 1e6).toFixed(1).replace('.', ',')} M`
|
|
78
|
+
: n >= 1e3
|
|
79
|
+
? `${Math.round(n / 1e3)} k`
|
|
80
|
+
: `${n}`
|
|
75
81
|
export const duree = (ms: number) => {
|
|
76
82
|
const min = Math.round(ms / 60_000)
|
|
77
|
-
return min < 60 ? `${min} min` : `${Math.floor(min / 60)}
|
|
83
|
+
return min < 60 ? `${min} min` : `${Math.floor(min / 60)}h${String(min % 60).padStart(2, '0')}`
|
|
78
84
|
}
|
|
79
85
|
const STATUTS: Record<string, string> = {
|
|
80
86
|
open: 'ouvert',
|
package/package.json
CHANGED
package/scripts/activites.mjs
CHANGED
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
} from 'node:fs';
|
|
27
27
|
import path from 'node:path';
|
|
28
28
|
import { avecLAvancementDuTravail } from './avancement.mjs';
|
|
29
|
-
import { A_REPASSER } from './codes-de-sortie.mjs';
|
|
29
|
+
import { A_REPASSER, MEMOIRE_COUPEE } from './codes-de-sortie.mjs';
|
|
30
30
|
import { ecouteLesBranchesDeTicket } from './ci-des-branches.mjs';
|
|
31
31
|
import { BASE_DU_LOT, DEPUIS_LE_VERT } from './dernier-vert.mjs';
|
|
32
32
|
import { empreinteDEtape } from './empreinte-d-etape.mjs';
|
|
@@ -1024,7 +1024,8 @@ export function integrer(ctx) {
|
|
|
1024
1024
|
// when the ticket is labelled `en-file` (the queue takes it off) or the copy holds no file of the
|
|
1025
1025
|
// lot (a copy that holds one still has a lot to commit — a second commit of a reopened ticket, for
|
|
1026
1026
|
// example).
|
|
1027
|
-
|
|
1027
|
+
const sansLot = !(tests.length || code.length);
|
|
1028
|
+
if (enFile || sansLot) {
|
|
1028
1029
|
// A lot already on main (`lotSurMain`, the one rule the integrator publishes): the ticket
|
|
1029
1030
|
// finishes at integre, and its copy goes with its working directory, as the integrator removes
|
|
1030
1031
|
// the copy after a commit (here the ticket is done, so `.travail` goes too — no `--garder-travail`).
|
|
@@ -1059,7 +1060,7 @@ export function integrer(ctx) {
|
|
|
1059
1060
|
// A lot already committed but not yet on main: its ticket is labelled `en-file`
|
|
1060
1061
|
// (scripts/integration/integrer.mjs) until the queue takes it off, as a job of a CI keyed by its
|
|
1061
1062
|
// commit is not run twice. The integration plays again without a second commit, then the queue.
|
|
1062
|
-
if (enFile) {
|
|
1063
|
+
if (enFile && sansLot) {
|
|
1063
1064
|
return finir(
|
|
1064
1065
|
`la branche ${branche} est déjà en file : le lot est déjà commité, aucun second commit.\n`,
|
|
1065
1066
|
{ code: 0, deja: true, enFile: true }
|
|
@@ -1067,7 +1068,14 @@ export function integrer(ctx) {
|
|
|
1067
1068
|
}
|
|
1068
1069
|
// No lot to apply and no commit on main: refused by its name, as the integrator refuses a direct
|
|
1069
1070
|
// call in the same case (the one rule `lotSurMain` deciding).
|
|
1070
|
-
|
|
1071
|
+
if (sansLot) {
|
|
1072
|
+
return finir(`${refusLotAbsent(ctx.ticket)}\n`, { code: 1, nom: 'lot-absent' });
|
|
1073
|
+
}
|
|
1074
|
+
// Labelled `en-file`, not on main, and the copy holds a lot: the lot was written after the
|
|
1075
|
+
// commit the label names (the circuit went back to its plan, its tests or its code while the
|
|
1076
|
+
// branch waited for its CI), and the integrator removes the copy of a lot it commits. The label
|
|
1077
|
+
// is stale: the lot of the copy is committed below, the branch set on it, as a new push to a
|
|
1078
|
+
// pull request replaces the commit its merge queue holds.
|
|
1071
1079
|
}
|
|
1072
1080
|
const dansCopie = (...a) =>
|
|
1073
1081
|
spawnSync('git', ['-C', ctx.copie, ...a], { encoding: 'utf8', maxBuffer: 256 * 1024 * 1024 });
|
|
@@ -1397,7 +1405,7 @@ function npm(ctx, etape, args, env = {}, cwd = ctx.copie) {
|
|
|
1397
1405
|
const oublier = nommerLAvancement({ env: envMachine, dossier: avancement });
|
|
1398
1406
|
try {
|
|
1399
1407
|
// A targeted pass plays on its share of the cores under nice and ionice; a heavy one
|
|
1400
|
-
//
|
|
1408
|
+
// shares the cores between its own tasks of tests.
|
|
1401
1409
|
const lancement = lancementDeLaPasse({
|
|
1402
1410
|
lourde,
|
|
1403
1411
|
cmd: 'npm',
|
|
@@ -1432,8 +1440,11 @@ function npm(ctx, etape, args, env = {}, cwd = ctx.copie) {
|
|
|
1432
1440
|
}
|
|
1433
1441
|
);
|
|
1434
1442
|
const code = r.status ?? 1;
|
|
1435
|
-
// The 75 of `npm run verifier` is its wait for the lock or for room under /tmp at its bound
|
|
1436
|
-
|
|
1443
|
+
// The 75 of `npm run verifier` is its wait for the lock or for room under /tmp at its bound,
|
|
1444
|
+
// which waits again without counting; cut by the watch of its memory (MEMOIRE_COUPEE in its
|
|
1445
|
+
// results), it is a replay that counts.
|
|
1446
|
+
const coupee = existsSync(path.join(dossier, MEMOIRE_COUPEE));
|
|
1447
|
+
return { code, dossier, attente: finale && code === A_REPASSER && !coupee };
|
|
1437
1448
|
} catch (e) {
|
|
1438
1449
|
if (!(e instanceof AttenteDeLaMachine)) {
|
|
1439
1450
|
throw e;
|
|
@@ -1941,7 +1952,8 @@ export function controles(ctx, finale, restreinte = null, reportes = null, fichi
|
|
|
1941
1952
|
: commandesDuPlan(ctx, liste, fichiers);
|
|
1942
1953
|
const resultats = commandes.map(({ args, env }) => {
|
|
1943
1954
|
let r = npm(ctx, 'controles', args, env);
|
|
1944
|
-
// The 75 of verifier is final (its wait for the lock reached its bound
|
|
1955
|
+
// The 75 of verifier is final (its wait for the lock reached its bound, or the watch of its
|
|
1956
|
+
// memory cut it); a command of the
|
|
1945
1957
|
// checks plays once more, the gesture `rejeu`.
|
|
1946
1958
|
if (r.code === A_REPASSER && !finale) {
|
|
1947
1959
|
geste(ctx, 'rejeu');
|
package/scripts/circuit.mjs
CHANGED
|
@@ -529,7 +529,9 @@
|
|
|
529
529
|
// change since its last green is read back (scripts/transitions.mjs). With the developpeur's
|
|
530
530
|
// or the testwriter's step, it has the lot corrected: the whole ticket from
|
|
531
531
|
// that step, the text of `--contexte` the task at the head of each agent's instruction in the
|
|
532
|
-
// run
|
|
532
|
+
// run (the agent whose step `--depuis` names reads it as his task; the other one reads whom it
|
|
533
|
+
// was given to, and does his own role's share: `constatsDeLaSeance` of scripts/seances.mjs),
|
|
534
|
+
// the reviewer's line CONTEXTE (after a stop
|
|
533
535
|
// « integration », from the developpeur, the refusal as his report, the red to lift, as a merge
|
|
534
536
|
// queue sends the lot back to its author with the log of its check; from the testwriter, the
|
|
535
537
|
// refusal dropped), as a retry
|
|
@@ -553,7 +555,9 @@
|
|
|
553
555
|
// cancels the act under way, its session with it, then the state keeps its step, its stop
|
|
554
556
|
// « arrete », its question lifted, its motive (`--contexte`) as its report, said at the ticket
|
|
555
557
|
// (`Circuit · arret : le superviseur arrête le circuit : <motif>`), and the workflow ends, giving
|
|
556
|
-
// that state back, which an answer reopens from.
|
|
558
|
+
// that state back, which an answer reopens from. The ticket leaves the queue of the tickets, its
|
|
559
|
+
// label `circuit` taken off (`sortirDeLaFile`): the queue does not start it again, and the run
|
|
560
|
+
// that opens on the supervisor's answer puts the label back (`rentrerDansLaFile`).
|
|
557
561
|
// - On a stop other than 0, the circuit applies its gesture when one settles it (`a-repasser`:
|
|
558
562
|
// it ends at 75), the gesture written at the ticket and in the log; every other stop goes up to
|
|
559
563
|
// the supervisor (`monter`): its question (MONTEES of scripts/etapes.mjs, or the agent's own
|
|
@@ -1906,6 +1910,31 @@ function ecrireLePlan(ctx, plan, description = null) {
|
|
|
1906
1910
|
return titre;
|
|
1907
1911
|
}
|
|
1908
1912
|
|
|
1913
|
+
/**
|
|
1914
|
+
* The plan <paquets> the explorateur writes for <ctx>, with each package the supervisor gave the
|
|
1915
|
+
* plan (`--etendre`, kept among the sheets, `etendus`) that it leaves out, in its order
|
|
1916
|
+
* (`planEtendu`), said at the ticket: the supervisor's word on the plan stands until he changes
|
|
1917
|
+
* it, as a reviewer's requested change stays on a pull request its author pushes again, and a plan
|
|
1918
|
+
* written again (a description the responsable changed) does not send the developpeur back to the
|
|
1919
|
+
* stop « hors-plan » the extension had lifted. `--recommencer`, which removes the sheets, starts
|
|
1920
|
+
* the plan over without them.
|
|
1921
|
+
*/
|
|
1922
|
+
export function avecLesEtendus(ctx, paquets) {
|
|
1923
|
+
const donnes = lesFiches(ctx).flatMap(e =>
|
|
1924
|
+
e.role === AUTEUR_DU_CIRCUIT ? (e.plan?.etendus ?? []) : []
|
|
1925
|
+
);
|
|
1926
|
+
const gardes = [...new Set(donnes)].filter(c => !paquets.includes(c));
|
|
1927
|
+
if (!gardes.length) {
|
|
1928
|
+
return paquets;
|
|
1929
|
+
}
|
|
1930
|
+
commenter(
|
|
1931
|
+
ctx,
|
|
1932
|
+
'plan',
|
|
1933
|
+
`le plan garde ${nomsDe(ctx, gardes).join(', ')}, que le superviseur lui a donné (\`--etendre\`).`
|
|
1934
|
+
);
|
|
1935
|
+
return planEtendu(ctx, paquets, gardes).plan;
|
|
1936
|
+
}
|
|
1937
|
+
|
|
1909
1938
|
// What makes the packages of the sheet <fiche> of the explorateur out of conformity, or null: a
|
|
1910
1939
|
// package that names neither a package nor a path of the repository, one package named twice
|
|
1911
1940
|
// (by its name and by its path), or a component of the survey of the plan's description
|
|
@@ -2069,7 +2098,7 @@ const PAS_DU_PLAN = {
|
|
|
2069
2098
|
);
|
|
2070
2099
|
ecrireLePlan(
|
|
2071
2100
|
ctx,
|
|
2072
|
-
plan.paquets.map(ctx.resoudre),
|
|
2101
|
+
avecLesEtendus(ctx, plan.paquets.map(ctx.resoudre)),
|
|
2073
2102
|
decrireLePlan(e.avant, plan.criteres, plan.questions, sorteEcrite(plan), plan.noms_publies)
|
|
2074
2103
|
);
|
|
2075
2104
|
const ouvertes = plan.questions.length ? `\n${lignesOuvertes(plan.questions)}` : 'aucune';
|
|
@@ -2168,7 +2197,7 @@ const PAS_DU_PLAN = {
|
|
|
2168
2197
|
const plans = [{ fiche: premier }, { fiche: plan, reponse: true }];
|
|
2169
2198
|
ecrireLePlan(
|
|
2170
2199
|
ctx,
|
|
2171
|
-
plan.paquets.map(ctx.resoudre),
|
|
2200
|
+
avecLesEtendus(ctx, plan.paquets.map(ctx.resoudre)),
|
|
2172
2201
|
decrireLePlan(
|
|
2173
2202
|
e.avant,
|
|
2174
2203
|
plan.criteres,
|
|
@@ -2241,9 +2270,26 @@ export async function arreter(ctx, e) {
|
|
|
2241
2270
|
});
|
|
2242
2271
|
const pourquoi = ctx.contexte ? ` : ${ctx.contexte}` : '.';
|
|
2243
2272
|
commenter(ctx, 'arret', `le superviseur arrête le circuit${pourquoi}`);
|
|
2273
|
+
sortirDeLaFile(ctx);
|
|
2244
2274
|
return 0;
|
|
2245
2275
|
}
|
|
2246
2276
|
|
|
2277
|
+
// The label `circuit` is the ticket's place in the queue of the tickets of its project
|
|
2278
|
+
// (scripts/file-des-tickets.mjs `enFile`), which starts every open ticket that holds it and whose
|
|
2279
|
+
// circuit does not run. A circuit stopped on the supervisor's word leaves that queue, its label
|
|
2280
|
+
// taken off, as a change whose approval is withdrawn leaves a merge queue (bors `r-`, Zuul's
|
|
2281
|
+
// dequeue): Beads keeps the ticket from starting again until his word reopens it.
|
|
2282
|
+
export const sortirDeLaFile = ctx =>
|
|
2283
|
+
emettre(ctx, { genre: 'etiquettes', ticket: ctx.ticket, etiquettes: [], retirees: ['circuit'] });
|
|
2284
|
+
|
|
2285
|
+
// The run of <ctx> that opens on the supervisor's answer to that stop (the state <e> it resumes
|
|
2286
|
+
// from, its stop « arrete ») is in the circuit again: its label put back.
|
|
2287
|
+
export function rentrerDansLaFile(ctx, e) {
|
|
2288
|
+
if (e?.raison === 'arrete') {
|
|
2289
|
+
emettre(ctx, { genre: 'etiquettes', ticket: ctx.ticket, etiquettes: ['circuit'] });
|
|
2290
|
+
}
|
|
2291
|
+
}
|
|
2292
|
+
|
|
2247
2293
|
// The plan <paquets> of the repository at <base>, each a directory relative to it, extended by
|
|
2248
2294
|
// <gagnes>: each one enters before the first package of the plan that reads it, as the module of
|
|
2249
2295
|
// the language reads its components (`lecteurs` of the join, its `lit` and its `parLesTests`: the
|
|
@@ -2273,6 +2319,39 @@ export function ordonnerLePlan(base, paquets, gagnes) {
|
|
|
2273
2319
|
return plan;
|
|
2274
2320
|
}
|
|
2275
2321
|
|
|
2322
|
+
/**
|
|
2323
|
+
* The plan <paquets> of <ctx> extended by <gagnes>, in the order `ordonnerLePlan` reads: in the
|
|
2324
|
+
* ticket's copy; when the copy does not load (a manifest a session left broken: `cargo metadata`
|
|
2325
|
+
* refuses a workspace whose member names a dependency its root does not declare), in the main
|
|
2326
|
+
* tree; when neither loads, each gained package at the plan's end. The supervisor's answer to a
|
|
2327
|
+
* stopped circuit never fails on the tree it comes to repair, as a command that answers a workflow
|
|
2328
|
+
* does not need its working tree to build. `{ plan, lu }`: where the order was read, `copie`,
|
|
2329
|
+
* `principal`, or `aucun`.
|
|
2330
|
+
*/
|
|
2331
|
+
export function planEtendu(ctx, paquets, gagnes) {
|
|
2332
|
+
const bases = [
|
|
2333
|
+
...(existsSync(ctx.copie) ? [['copie', ctx.copie]] : []),
|
|
2334
|
+
['principal', ctx.racine],
|
|
2335
|
+
];
|
|
2336
|
+
for (const [lu, base] of bases) {
|
|
2337
|
+
try {
|
|
2338
|
+
return { plan: ordonnerLePlan(base, paquets, gagnes), lu };
|
|
2339
|
+
} catch {
|
|
2340
|
+
// This tree does not load: the next one is read.
|
|
2341
|
+
}
|
|
2342
|
+
}
|
|
2343
|
+
return { plan: [...paquets, ...gagnes], lu: 'aucun' };
|
|
2344
|
+
}
|
|
2345
|
+
|
|
2346
|
+
// What the line of the plan at the ticket says of the tree its order was read in, when the copy of
|
|
2347
|
+
// the ticket exists and does not load.
|
|
2348
|
+
const ORDRE_LU = {
|
|
2349
|
+
copie: '',
|
|
2350
|
+
principal: " (l'ordre du plan est lu dans l'arbre principal : la copie ne se charge pas)",
|
|
2351
|
+
aucun:
|
|
2352
|
+
" (le paquet gagné va en fin de plan : ni la copie ni l'arbre principal ne se chargent pour l'ordonner)",
|
|
2353
|
+
};
|
|
2354
|
+
|
|
2276
2355
|
// The plan extended by the supervisor to the packages of `--etendre` (each a path or a package
|
|
2277
2356
|
// name of the repository, else a Usage): each one enters the title in the order of
|
|
2278
2357
|
// `ordonnerLePlan`, written by bd and said at the ticket. With the state <e>, the run then resumes
|
|
@@ -2283,15 +2362,22 @@ export function ordonnerLePlan(base, paquets, gagnes) {
|
|
|
2283
2362
|
// the plan extended. The state the run resumes from.
|
|
2284
2363
|
function etendre(ctx, e) {
|
|
2285
2364
|
const gagnes = [...new Set(ctx.etendre.map(ctx.resoudre))].filter(c => !ctx.paquets.includes(c));
|
|
2286
|
-
const
|
|
2287
|
-
const plan = ordonnerLePlan(base, ctx.paquets, gagnes);
|
|
2365
|
+
const { plan, lu } = planEtendu(ctx, ctx.paquets, gagnes);
|
|
2288
2366
|
const titre = ecrireLePlan(ctx, plan);
|
|
2289
|
-
// The plan the supervisor extends has passed: it is written, questioned no more.
|
|
2290
|
-
|
|
2367
|
+
// The plan the supervisor extends has passed: it is written, questioned no more. The packages
|
|
2368
|
+
// he gives it are kept with it (`etendus`): a plan the explorateur writes again keeps them
|
|
2369
|
+
// (`avecLesEtendus`).
|
|
2370
|
+
inscrire(ctx, {
|
|
2371
|
+
role: AUTEUR_DU_CIRCUIT,
|
|
2372
|
+
plan: {
|
|
2373
|
+
empreinte: empreinteDuPlan(leTicket(ctx)),
|
|
2374
|
+
etendus: [...new Set(ctx.etendre.map(ctx.resoudre))],
|
|
2375
|
+
},
|
|
2376
|
+
});
|
|
2291
2377
|
commenter(
|
|
2292
2378
|
ctx,
|
|
2293
2379
|
'plan',
|
|
2294
|
-
`le superviseur étend le plan à ${ctx.etendre.join(', ')} : ${titre.split(' — ').at(-1)}.`
|
|
2380
|
+
`le superviseur étend le plan à ${ctx.etendre.join(', ')} : ${titre.split(' — ').at(-1)}${ORDRE_LU[lu]}.`
|
|
2295
2381
|
);
|
|
2296
2382
|
if (!e) {
|
|
2297
2383
|
return e;
|
|
@@ -2310,6 +2396,7 @@ function etendre(ctx, e) {
|
|
|
2310
2396
|
|
|
2311
2397
|
// The opening of <ctx> on <e> before its plan: `{ debut }`, or `{ code }`, a stop gone up.
|
|
2312
2398
|
async function avantLePlan(ctx, e) {
|
|
2399
|
+
rentrerDansLaFile(ctx, e);
|
|
2313
2400
|
if (ctx.etendre) {
|
|
2314
2401
|
if (e?.etape === 'integre') {
|
|
2315
2402
|
throw new Usage(`--etendre : le lot de ${ctx.ticket} est intégré.`);
|
|
@@ -7,3 +7,9 @@
|
|
|
7
7
|
// wait of the lock of the machine at its bound (scripts/verrou-de-machine.mjs), a stop of the
|
|
8
8
|
// circuit that a gesture settles (scripts/etapes.mjs, ARRETS).
|
|
9
9
|
export const A_REPASSER = 75;
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* The file a pass cut by the watch of its memory (scripts/garde-de-la-memoire.mjs) leaves in its
|
|
13
|
+
* results directory, its reason inside: its 75 is no wait of the machine, and counts as a replay.
|
|
14
|
+
*/
|
|
15
|
+
export const MEMOIRE_COUPEE = 'memoire-coupee.txt';
|
package/scripts/effets.mjs
CHANGED
|
@@ -27,7 +27,8 @@
|
|
|
27
27
|
// - `resume-du-tri` `{ ticket, debut, ecritures }`: the line of the tri at the ticket, which reads
|
|
28
28
|
// each discovery's writings when it is written (`{ decouverte, verdict, etiquettes, rouvre }`:
|
|
29
29
|
// its comment, its labels, its reopening), its key in the comment;
|
|
30
|
-
// - `etiquettes` `{ ticket, etiquettes }`: labels added to a ticket
|
|
30
|
+
// - `etiquettes` `{ ticket, etiquettes, retirees }`: labels added to a ticket, and those taken off
|
|
31
|
+
// it (`retirees`, none when absent);
|
|
31
32
|
// - `reouverture` `{ ticket }`: a ticket reopened.
|
|
32
33
|
//
|
|
33
34
|
// An effect that does not replay without harm carries the key it is played under (`AVEC_CLE`),
|
|
@@ -286,8 +287,13 @@ const JOUEURS = {
|
|
|
286
287
|
const texte = `${debut} ; ${rouvertes.length ? `rouvertes sous a-valider : ${rouvertes.join(', ')}` : 'aucune rouverte'}${rates.length ? ` ; écritures en échec : ${rates.join(' ; ')}` : ''}.`;
|
|
287
288
|
return commenterUneFois(ctx, { ticket, texte, auteur: AUTEUR_DU_CIRCUIT }, cle);
|
|
288
289
|
},
|
|
289
|
-
etiquettes(ctx, { ticket, etiquettes }) {
|
|
290
|
-
return ctx.bd(
|
|
290
|
+
etiquettes(ctx, { ticket, etiquettes, retirees = [] }) {
|
|
291
|
+
return ctx.bd(
|
|
292
|
+
'update',
|
|
293
|
+
ticket,
|
|
294
|
+
...etiquettes.flatMap(e => ['--add-label', e]),
|
|
295
|
+
...retirees.flatMap(e => ['--remove-label', e])
|
|
296
|
+
);
|
|
291
297
|
},
|
|
292
298
|
reouverture(ctx, { ticket }) {
|
|
293
299
|
const r = ctx.bd('show', ticket, '--json');
|
|
@@ -103,8 +103,9 @@ import { Arret, geste } from './ticket-du-circuit.mjs';
|
|
|
103
103
|
// resumes, the rank of arrival, the sort of the ticket, what the opening reads of the project's
|
|
104
104
|
// package.json (its tools, its data, its generated files), which every pass of a later act plays
|
|
105
105
|
// with, each act in a process of its own, and the supervisor's context of the
|
|
106
|
-
// run (`contexte`), which each session of the run reads at the head of its instruction
|
|
107
|
-
//
|
|
106
|
+
// run (`contexte`), which each session of the run reads at the head of its instruction, with the
|
|
107
|
+
// role it was given to (`destinataire`, the role `--depuis` names); a context the act is given
|
|
108
|
+
// (an answer's, a motive) is kept over it.
|
|
108
109
|
const GARDEE = [
|
|
109
110
|
...MEMOIRE,
|
|
110
111
|
'seanceReprise',
|
|
@@ -114,6 +115,7 @@ const GARDEE = [
|
|
|
114
115
|
'donnees',
|
|
115
116
|
'engendres',
|
|
116
117
|
'contexte',
|
|
118
|
+
'destinataire',
|
|
117
119
|
];
|
|
118
120
|
|
|
119
121
|
// The bases of the passes of the contexts this act opened, which its end removes, its death
|
|
@@ -183,13 +185,19 @@ const optionsDe = reponse => {
|
|
|
183
185
|
return {};
|
|
184
186
|
}
|
|
185
187
|
const contexteDuSuperviseur = reponse.contexte ?? null;
|
|
188
|
+
// The role the supervisor's context is given to: the agent whose step `--depuis` names; every
|
|
189
|
+
// other answer gives it to the step under way, no role named.
|
|
186
190
|
if (reponse.genre === 'reprendre') {
|
|
187
|
-
return { reprendre: true, contexte: contexteDuSuperviseur };
|
|
191
|
+
return { reprendre: true, contexte: contexteDuSuperviseur, destinataire: null };
|
|
188
192
|
}
|
|
189
193
|
if (reponse.genre === 'depuis') {
|
|
190
|
-
return {
|
|
194
|
+
return {
|
|
195
|
+
depuis: reponse.role,
|
|
196
|
+
contexte: contexteDuSuperviseur,
|
|
197
|
+
destinataire: ['testwriter', 'developpeur'].includes(reponse.role) ? reponse.role : null,
|
|
198
|
+
};
|
|
191
199
|
}
|
|
192
|
-
return { etendre: reponse.paquets, contexte: contexteDuSuperviseur };
|
|
200
|
+
return { etendre: reponse.paquets, contexte: contexteDuSuperviseur, destinataire: null };
|
|
193
201
|
};
|
|
194
202
|
|
|
195
203
|
// The act <f> on the context <ctx>: its outcome and the effects it emitted (`effets`), its bases
|