@roomi-fields/grillhouse 0.34.0 → 0.34.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.
- package/.claude-plugin/plugin.json +1 -1
- package/CHANGELOG.md +20 -2
- package/dist/temporal/acte.d.ts +7 -0
- package/dist/temporal/acte.js +19 -2
- package/dist/temporal/acte.js.map +1 -1
- package/docs/ARCHITECTURE.md +12 -0
- package/package.json +1 -1
- package/scripts/ci-des-branches.mjs +4 -2
- package/scripts/etapes.mjs +6 -4
- package/scripts/integration/file.mjs +7 -6
- package/scripts/jointure.d.ts +10 -3
- package/scripts/langages/cargo/commandes.mjs +10 -2
- package/scripts/langages/python/commandes.mjs +3 -0
- package/scripts/langages/typescript/resume-du-lanceur.mjs +8 -2
- package/scripts/migrations-des-gardes.mjs +15 -4
- package/scripts/tableau.mjs +95 -32
- package/scripts/taches-du-graphe.mjs +22 -8
package/CHANGELOG.md
CHANGED
|
@@ -6,9 +6,27 @@ The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [0.34.1] - 2026-11-12
|
|
10
|
+
|
|
11
|
+
- **Pruning the debt no longer empties the debt of the guard of the migrations of the guards** (grillhouse-7jk): `npm run grillhouse:dette:elaguer`, run in a copy whose frame's scripts were another tree's (its `node_modules` linked to the main tree), emptied the whole section `migrations-des-gardes` of `grillhouse-dette.json`: the guard measures nothing outside the frame's own scripts, and pruning read that nothing as every finding corrected; the guard then turned red at the CI. As a baseline (ESLint, Betterer) only moves on what it measured, the guard no longer judges nor prunes its debt where it does not measure. **Action for projects**: none.
|
|
12
|
+
|
|
13
|
+
- **A restart of the worker for an update no longer stops the circuits in flight** (grillhouse-63z): on 2026-11-12, `npx grillhouse temporal installer` (the update to 0.34.0) restarted the workers, and the acts in flight of two circuits failed « acte … annulé » with no attempt again, each circuit raising a question « inattendu » that a mere `--reprendre` lifted. As Temporal advises for the stop of a worker (its activities cancelled with `WORKER_SHUTDOWN`, failed so that the server tries them again at once), an act cancelled by the stop of its worker now fails as one Temporal tries again on the next worker (`echecDeLAnnulation`, src/temporal/acte.ts), its session resumed as after a dead worker; a cancellation by the supervisor or a timeout still fails for good. **Action for projects**: none.
|
|
14
|
+
|
|
15
|
+
- **A stop « à repasser » whose replays are spent goes up with its question** (grillhouse-xxvc): on 2026-11-12, a circuit whose queue could not read the CI stopped « a-repasser », played it again, then, its replays spent, failed to write its stop (« Cannot read properties of null (reading 'question') »): the stop had no question, being a gesture, so the supervisor received a question « inattendu » instead of the real one. As a CI calls a person once its retries are spent, « a-repasser » now carries its question in the list of the questions (`MONTEES`, scripts/etapes.mjs), asked only once the circuit has played it again as often as it may. **Action for projects**: none.
|
|
16
|
+
|
|
17
|
+
- **The verification of a Rust or Python project names each red task** (grillhouse-d1a): `npm run verifier` of a cargo project exited 1 with no line naming the red task, its log ending on cargo deny's « advisories ok » (reported by OSD, 2026-11-12), so a red under load could only be told by replaying each task by hand. As the pass of the module typescript names each red task from Turborepo's summary, the common runner of the graph's tasks (`lancerLesTaches`) now always asks for the summary and names, on a red run, each task whose code is not 0, « ⛔ <tâche> (code N) » (`garderLesResumes` gives each task's verdict); the `verifier` of cargo names its cargo deny when red, and those of cargo and python end on « ⛔ rouge. ». **Action for projects**: none.
|
|
18
|
+
|
|
19
|
+
- **A workflow pushed on main with a filter on paths no longer passes for the CI of the ticket branches** (grillhouse-snn): osc-bridge's `docs.yml` (a push on `[main]` with `paths`) made the frame read the project as already listening to `agent/**`, so the update of 0.33.0 did not add `agent/**` to its `ci.yml`, and the pre-push hook refused main for want of a CI on a ticket branch. As GitHub asks both filters, the reading of a workflow's push (`pousseeSurLaBranche`, scripts/integration/file.mjs) now lets the branch filter decide first: a branch it leaves out never runs, whatever the paths; a filter on the paths still counts a branch it takes in as one that runs. The update no longer adds `agent/**` to a workflow filtered on paths, which is no CI of the lots. **Action for projects**: a project whose `ci.yml` the update left without `agent/**` adds it to `on.push.branches` (the opening of a session says so).
|
|
20
|
+
|
|
21
|
+
- **The line of a ticket in direct no longer says who claimed it** (grillhouse-7td): « ✎ <number> <subject> · en direct · <assignee> » named the account that claimed the ticket, always the same one, since the owner and his agents are the only ones to work. As the owner asks, the line now ends on « · en direct ». **Action for projects**: none.
|
|
22
|
+
|
|
23
|
+
- **The board shows under AGENTS only the tickets at work, and its head counts the queue of the circuit apart from the direct one** (grillhouse-d7y): a ticket labelled `direct` had its line « ✎ … · en direct » as soon as it was open, so three tickets waiting their turn looked worked at once, and « en attente » in the head counted only the circuit's ready tickets without saying so. As the owner asks, a direct ticket now has its line only once claimed (several at once, each its line), and an open one counts in a new state, « en direct — mené hors du circuit, pas encore pris » (`fileDirecte`). The head of one project reads « ▶ <n> en cours · <n> bloqués · <n> faits », then « ⏭ file : <n> en circuit · <n> en direct »; a project's line among several, and the status line, « ▶ <n> en cours · ⏭ <n> · ✎ <n> · <n> faits ». **Action for projects**: none.
|
|
24
|
+
|
|
25
|
+
- **FAITS AUJOURD'HUI says the way of each ticket done, its duration and its tokens** (grillhouse-592): every line of the day's done tickets began with ✓ and showed its time and tokens only when its agents had some, so a ticket led directly looked like a circuit and stood bare. As the owner's maquette asks, the sign now says the way: ● a full circuit, ○ a short one (through 1.1 Geste mécanique, read from the launch of object `geste` in the circuit's kept results, `voiesDesCircuits`), ✎ a direct ticket (labelled `direct`, or closed with no circuit). Every line carries « <duration> · <tokens> »: a circuit's working time, a direct ticket's time from its claim to its close (« — » without a claim), and the tokens of the agents the register ties to the ticket, the supervisor's staying out. The day's total in the title is unchanged. **Action for projects**: none.
|
|
26
|
+
|
|
9
27
|
## [0.34.0] - 2026-11-12
|
|
10
28
|
|
|
11
|
-
- **The board shows the night under way, the tickets worked in direct, and the memory of the poste** (grillhouse-bf5.9): a night that ran loaded the machine without a line on the board, and a ticket claimed with no circuit stood as a circuit at step 1, « attend une place ». As a dashboard shows every job that holds a machine, AGENTS now shows, under the line of the places, the night under way, « 🌙 nuit · <project> · depuis <duration> », read by the query of the workflow of the nights (`nuitDuServeur`, `scripts/circuits-du-serveur.mjs`; the view `etatDesNuits` gains `depuis`, when the night under way started), a reading that fails showing none; and each ticket claimed with no circuit on the server that holds it, a mother of it or a ticket under it (one that runs or waits for an answer; a circuit the supervisor stopped holds none), and each ticket labelled `direct`, open or claimed, once, out of the steps, « ✎ <number>
|
|
29
|
+
- **The board shows the night under way, the tickets worked in direct, and the memory of the poste** (grillhouse-bf5.9): a night that ran loaded the machine without a line on the board, and a ticket claimed with no circuit stood as a circuit at step 1, « attend une place ». As a dashboard shows every job that holds a machine, AGENTS now shows, under the line of the places, the night under way, « 🌙 nuit · <project> · depuis <duration> », read by the query of the workflow of the nights (`nuitDuServeur`, `scripts/circuits-du-serveur.mjs`; the view `etatDesNuits` gains `depuis`, when the night under way started), a reading that fails showing none; and each ticket claimed with no circuit on the server that holds it, a mother of it or a ticket under it (one that runs or waits for an answer; a circuit the supervisor stopped holds none), and each ticket labelled `direct`, open or claimed, once, out of the steps, « ✎ <number> <subject> · en direct · <assignee> », from its claim to its close (none while the circuits do not read). The line of the places says the available memory of the total, « mémoire 15/30 Go » (`memoireTotaleGo` of `etatDesPlaces`; the trial measure `GRILLHOUSE_MESURE_D_ESSAI` gains `memoireTotale`). Without a marker file, the board's first reading sets the day's marker to midnight and keeps it, so that only `grillhouse newday` moves it; a ticket waiting for a place turns yellow, as the other waits. A ticket led out of the circuit carries the label `direct`: the queue of the tickets never starts it, even labelled `circuit` (a label `bd create --parent` copies from its epic), as the charter's three ways of a ticket say. **Action for projects**: label `direct` a ticket led by hand.
|
|
12
30
|
|
|
13
31
|
- **A queue of the tickets started before the journal of states replays again** (grillhouse-jye.5): the journal of states (grillhouse-4nr.20) added the activity `tracerLaFile` to the workflow of the queue of the tickets without Temporal's patching, so a history recorded before it no longer replayed (« Nondeterminism error: Activity machine does not handle this event: TimerStarted », the night of 2026-11-12), and a project's queue still running from before would fail at its next replay. As Temporal's versioning asks of a changed workflow, each line of the journal of the queue (a circuit started, a circuit ended) is now written under `patched('trace-de-la-file')`: a run recorded before the change replays without them, a new run writes them. **Action for projects**: none.
|
|
14
32
|
|
|
@@ -55,7 +73,7 @@ The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and
|
|
|
55
73
|
|
|
56
74
|
- **The queue judges a commit on every workflow that runs on its branch, not on the first run** (grillhouse-bf5): a merge queue (GitHub's, bors) judges a commit on all its checks, but the queue read only the first run `gh run list --commit` gave, so a red second workflow reopened and told no one (SyntHub, SH-13y.6.8.3). `ciDuCommit` now reads, at each reading, the runs of every expected workflow (`fluxDuCommit` gives each its path and its name, the `name` key or the path, as GitHub names it), joined by `workflowName`: green when all are green, red as soon as one is (its run, address, log and rerun command in the comment), not read naming the workflow with no run or no end. It is under `patched('ci-tous-les-flux')`: the histories recorded before replay on the old loop. Workflows that run only on main after the entry are not read (grillhouse-bf5.7).
|
|
57
75
|
|
|
58
|
-
- **The lock of the machine stands on the line of its circuit, and a pass out of a ticket is named by its copy** (grillhouse-bf5.5.1): AGENTS showed the final pass of a circuit twice, on a line « 🔒 Passe finale · <projet> · <ticket> » cut by the width and on the circuit's own line with its progress, and a verification without a ticket by its repository alone, « ⏳ Vérification · roomis-grillhouse », whichever copy played it. A holder or a wait of a circuit AGENTS shows now stands on that circuit's line, in place of the progress of its pass: « ▶ 5hn
|
|
76
|
+
- **The lock of the machine stands on the line of its circuit, and a pass out of a ticket is named by its copy** (grillhouse-bf5.5.1): AGENTS showed the final pass of a circuit twice, on a line « 🔒 Passe finale · <projet> · <ticket> » cut by the width and on the circuit's own line with its progress, and a verification without a ticket by its repository alone, « ⏳ Vérification · roomis-grillhouse », whichever copy played it. A holder or a wait of a circuit AGENTS shows now stands on that circuit's line, in place of the progress of its pass: « ▶ 5hn Le journal… · 🔒 passe finale 54/311 · 2 min », « · ⏳ contrôles · 1 min », one line per ticket. Any other keeps its line at the head of AGENTS, named by its ticket, else by the folder of its copy: the identity of the lock now keeps the root of the working tree the measure plays in (`copie`, `racineDeLaCopie` of `scripts/verrou-de-machine.mjs`), « ⏳ Vérification · direct-panneau-file · 1 min ». The project is named only for another project than the board's (the lock holds for the whole machine). The width cuts the subject first, then the project, then leaves out « attend », then cuts the copy; never the kind, the figures nor the time. **Action for projects**: none.
|
|
59
77
|
|
|
60
78
|
- **A ticket in the queue stands at no step of AGENTS** (grillhouse-bf5.5): once the queue launched, every ticket labelled `circuit` without a circuit yet showed at « 2 Tests », waiting for the testwriter, as the board deduced the step of a ticket from the roles that had run on it and the reviewer's last verdict, a reading of the time before the circuit under Temporal. A ticket now stands at a step only by its circuit, running or stopped, or by an agent that runs on it; the others stand in CHANTIER alone. Removed with their tests: the deduction (`etape`, `verdict` of `scripts/tableau.mjs`), the reading of the reviewer's comments by the board, and the waits of the blocks (`attend`). The counters of the head and the states' view are unchanged. **Action for projects**: none.
|
|
61
79
|
|
package/dist/temporal/acte.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ApplicationFailure } from '@temporalio/common';
|
|
1
2
|
/**
|
|
2
3
|
* The group of the process <mort> of a dead attempt ended (SIGKILL) before the attempt played
|
|
3
4
|
* again plays, its leader gone or not (`groupeVivant`: a command of the dead act still running in
|
|
@@ -7,6 +8,12 @@ export declare function finirLaTentativeMorte(mort: {
|
|
|
7
8
|
pid: number;
|
|
8
9
|
depart: string | null;
|
|
9
10
|
} | null | undefined): void;
|
|
11
|
+
/**
|
|
12
|
+
* The failure of the act <acte> cancelled for <raison> (the reason of its cancellation signal): one
|
|
13
|
+
* Temporal tries again when its worker stops, the act played anew on the next one; else one it
|
|
14
|
+
* tries no more (the supervisor's `--arreter`, a timeout).
|
|
15
|
+
*/
|
|
16
|
+
export declare function echecDeLAnnulation(acte: string, raison: unknown): ApplicationFailure;
|
|
10
17
|
/**
|
|
11
18
|
* The key of the activity whose information is <info>: its workflow, its run and its activity id,
|
|
12
19
|
* the same for each of its attempts, as Temporal recommends an idempotency key (the run, because
|
package/dist/temporal/acte.js
CHANGED
|
@@ -13,7 +13,10 @@
|
|
|
13
13
|
// the commands it runs (a rebase, a verification), as a session does (scripts/seances.mjs
|
|
14
14
|
// `jouerLeGroupe`). A cancellation (the supervisor's `--arreter`, a timeout of the activity) sends
|
|
15
15
|
// SIGTERM to its group, which ends its session, its group killed, then SIGKILL 10 s later; the
|
|
16
|
-
// activity fails once the whole group is gone, so that no command of the act outlives it.
|
|
16
|
+
// activity fails once the whole group is gone, so that no command of the act outlives it. The stop
|
|
17
|
+
// of its worker (a restart for a new version, `WORKER_SHUTDOWN`) cancels it the same way, and its
|
|
18
|
+
// failure is tried again on the next worker, as Temporal advises (`echecDeLAnnulation`): an
|
|
19
|
+
// update of the frame stays transparent to the circuits in flight. An act
|
|
17
20
|
// that fails is an error of the activity that is not tried again (`ApplicationFailure`, its
|
|
18
21
|
// message and its stack).
|
|
19
22
|
import { spawn } from 'node:child_process';
|
|
@@ -39,6 +42,20 @@ export function finirLaTentativeMorte(mort) {
|
|
|
39
42
|
signalerGroupe(mort.pid, 'SIGKILL');
|
|
40
43
|
}
|
|
41
44
|
}
|
|
45
|
+
/** The reason Temporal gives the cancellation of an activity whose worker stops. */
|
|
46
|
+
const ARRET_DU_TRAVAILLEUR = 'WORKER_SHUTDOWN';
|
|
47
|
+
/**
|
|
48
|
+
* The failure of the act <acte> cancelled for <raison> (the reason of its cancellation signal): one
|
|
49
|
+
* Temporal tries again when its worker stops, the act played anew on the next one; else one it
|
|
50
|
+
* tries no more (the supervisor's `--arreter`, a timeout).
|
|
51
|
+
*/
|
|
52
|
+
export function echecDeLAnnulation(acte, raison) {
|
|
53
|
+
const message = raison?.message ?? raison;
|
|
54
|
+
if (message === ARRET_DU_TRAVAILLEUR) {
|
|
55
|
+
return ApplicationFailure.retryable(`acte ${acte} interrompu par l'arrêt de son travailleur`, 'ArretDuTravailleur');
|
|
56
|
+
}
|
|
57
|
+
return ApplicationFailure.nonRetryable(`acte ${acte} annulé`, 'Annule');
|
|
58
|
+
}
|
|
42
59
|
/**
|
|
43
60
|
* The key of the activity whose information is <info>: its workflow, its run and its activity id,
|
|
44
61
|
* the same for each of its attempts, as Temporal recommends an idempotency key (the run, because
|
|
@@ -113,7 +130,7 @@ export async function jouer(acte, entree, racine) {
|
|
|
113
130
|
while (signalerGroupe(moi.pid, 0)) {
|
|
114
131
|
await new Promise(ok => setTimeout(ok, 200));
|
|
115
132
|
}
|
|
116
|
-
throw
|
|
133
|
+
throw echecDeLAnnulation(acte, contexte.cancellationSignal.reason);
|
|
117
134
|
}
|
|
118
135
|
if (r?.genre === 'resultat') {
|
|
119
136
|
return r.valeur;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acte.js","sourceRoot":"","sources":["../../src/temporal/acte.ts"],"names":[],"mappings":"AAAA,mGAAmG;AACnG,iGAAiG;AACjG,6DAA6D;AAC7D,2FAA2F;AAC3F,kGAAkG;AAClG,+FAA+F;AAC/F,iGAAiG;AACjG,mGAAmG;AACnG,gGAAgG;AAChG,4FAA4F;AAC5F,gGAAgG;AAChG,0GAA0G;AAC1G,0FAA0F;AAC1F,mGAAmG;AACnG,+FAA+F;AAC/F,
|
|
1
|
+
{"version":3,"file":"acte.js","sourceRoot":"","sources":["../../src/temporal/acte.ts"],"names":[],"mappings":"AAAA,mGAAmG;AACnG,iGAAiG;AACjG,6DAA6D;AAC7D,2FAA2F;AAC3F,kGAAkG;AAClG,+FAA+F;AAC/F,iGAAiG;AACjG,mGAAmG;AACnG,gGAAgG;AAChG,4FAA4F;AAC5F,gGAAgG;AAChG,0GAA0G;AAC1G,0FAA0F;AAC1F,mGAAmG;AACnG,+FAA+F;AAC/F,mGAAmG;AACnG,kGAAkG;AAClG,4FAA4F;AAC5F,0EAA0E;AAC1E,4FAA4F;AAC5F,0BAA0B;AAC1B,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;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,CAAC,CAAC,MAAW,CAAC;QACvB,CAAC;QACD,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,MAAM,IAAI,EAAE,CAA+D,CAAC;QAC1F,uFAAuF;QACvF,IAAI,CAAC,CAAC,WAAW,EAAE,CAAC;YAClB,MAAM,kBAAkB,CAAC,SAAS,CAChC,CAAC,CAAC,OAAO,IAAI,QAAQ,IAAI,gBAAgB,EACzC,eAAe,EACf;gBACE,OAAO,EAAE,CAAC,CAAC,OAAO,IAAI,IAAI;gBAC1B,IAAI,EAAE,CAAC,CAAC,IAAI,IAAI,IAAI;aACrB,CACF,CAAC;QACJ,CAAC;QACD,MAAM,kBAAkB,CAAC,YAAY,CACnC,CAAC,CAAC,OAAO,IAAI,QAAQ,IAAI,WAAW,IAAI,iBAAiB,EACzD,WAAW,EACX,EAAE,OAAO,EAAE,CAAC,CAAC,OAAO,IAAI,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,IAAI,IAAI,EAAE,CACrD,CAAC;IACJ,CAAC;YAAS,CAAC;QACT,IAAI,IAAI,EAAE,CAAC;YACT,YAAY,CAAC,IAAI,CAAC,CAAC;QACrB,CAAC;QACD,aAAa,CAAC,MAAM,CAAC,CAAC;QACtB,QAAQ,CAAC,kBAAkB,CAAC,mBAAmB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IACpE,CAAC;AACH,CAAC"}
|
package/docs/ARCHITECTURE.md
CHANGED
|
@@ -1012,6 +1012,18 @@ alerte, en cours dans les agents ; ⚠ les alertes sans sorte à elles (une pass
|
|
|
1012
1012
|
projet illisible, un agent silencieux). Un signe large se cale comme les autres, un signe puis une
|
|
1013
1013
|
espace, et la largeur d'une ligne compte ses colonnes. Ainsi chaque signe garde un seul sens.
|
|
1014
1014
|
|
|
1015
|
+
**FAITS AUJOURD'HUI dit la voie de chaque ticket fini** (maquette du responsable, 2026-11-12,
|
|
1016
|
+
grillhouse-592) : son signe est ● pour un circuit complet, ○ pour un circuit court (passé par 1.1
|
|
1017
|
+
Geste mécanique), ✎ pour un ticket direct (étiqueté `direct`, ou fermé sans aucun circuit). Le
|
|
1018
|
+
circuit court se lit dans les résultats que le circuit garde dans l'arbre principal
|
|
1019
|
+
(`.claude/worktrees/<ticket>.fiches.jsonl`, `voiesDesCircuits`) : le lancement de la séance du geste
|
|
1020
|
+
porte l'objet `geste` ; un circuit dont il reste des résultats, une étape au registre ou une lecture
|
|
1021
|
+
sur le serveur est complet. Chaque ligne porte « <durée> · <jetons> » : pour un circuit, le temps
|
|
1022
|
+
de travail de ses agents et de ses étapes ; pour un ticket direct, de sa prise à sa fermeture,
|
|
1023
|
+
« — » sans prise ; les jetons des agents que le registre rattache au ticket, ceux du superviseur
|
|
1024
|
+
restant hors du ticket. Le total de l'en-tête reste le temps de travail et les jetons des agents.
|
|
1025
|
+
Ainsi la journée se lit par voie, chaque ticket avec ce qu'il a coûté.
|
|
1026
|
+
|
|
1015
1027
|
**Une passe automatique montre son avancement** : chaque passe automatique écrit ses fichiers
|
|
1016
1028
|
de tests faits sur prévus (la file, les étapes de sa CI), dans le dossier de travail de son
|
|
1017
1029
|
ticket pour une passe du circuit, que le panneau affiche avec le temps
|
package/package.json
CHANGED
|
@@ -58,7 +58,8 @@ function principale(racine) {
|
|
|
58
58
|
/**
|
|
59
59
|
* `agent/**` added to the push of the CI of the lots of the project at <racine>: the workflows
|
|
60
60
|
* written, none when the project already listens or has no workflow that runs on a push to main
|
|
61
|
-
* with a list of branches to add it to.
|
|
61
|
+
* with a list of branches to add it to. A workflow filtered on paths (a documentation published
|
|
62
|
+
* when its sources change) is no CI of the lots, and is left.
|
|
62
63
|
*/
|
|
63
64
|
export function ajouterLesBranchesDeTicket(racine) {
|
|
64
65
|
const flux = lesFlux(racine);
|
|
@@ -70,7 +71,8 @@ export function ajouterLesBranchesDeTicket(racine) {
|
|
|
70
71
|
for (const { chemin, texte } of flux.filter(f => surMain.has(f.chemin))) {
|
|
71
72
|
const doc = parseDocument(texte);
|
|
72
73
|
const branches = doc.getIn(['on', 'push', 'branches'], true);
|
|
73
|
-
|
|
74
|
+
const chemins = ['paths', 'paths-ignore'].some(c => doc.hasIn(['on', 'push', c]));
|
|
75
|
+
if (chemins || !branches || typeof branches.add !== 'function') {
|
|
74
76
|
continue;
|
|
75
77
|
}
|
|
76
78
|
branches.add(doc.createNode(BRANCHES_DE_TICKET));
|
package/scripts/etapes.mjs
CHANGED
|
@@ -201,8 +201,7 @@ export const GESTES = [
|
|
|
201
201
|
{
|
|
202
202
|
genre: 'rejeu',
|
|
203
203
|
geste: 'la commande joue une seconde fois',
|
|
204
|
-
regle:
|
|
205
|
-
'une commande des contrôles hors de la passe finale à 75 rejoue une fois avant l’arrêt',
|
|
204
|
+
regle: 'une commande des contrôles hors de la passe finale à 75 rejoue une fois avant l’arrêt',
|
|
206
205
|
cas: 'A12 : un contrôle à 75, rejoué avant de conclure à la charge',
|
|
207
206
|
},
|
|
208
207
|
{
|
|
@@ -258,13 +257,16 @@ const REPONSES =
|
|
|
258
257
|
'Le superviseur répond par une commande du circuit : `--reprendre` (avec `--contexte`) ou `--depuis <testwriter|developpeur>` (avec `--contexte`), `--etendre <paquet>` (le plan gagne ce paquet, puis l’étape en cours reprend), ou `--arreter`.';
|
|
259
258
|
|
|
260
259
|
// The question of each stop no gesture settles, as a CI calls a person only for what no rule
|
|
261
|
-
// settles (the approval of a review): every stop of ARRETS
|
|
260
|
+
// settles (the approval of a review): every stop of ARRETS, « a-repasser » once the circuit has
|
|
261
|
+
// played it again as often as it may (a gesture until then). The
|
|
262
262
|
// circuit ends on the stop, its state carrying the question (`question`: `{ arret, fait, piece,
|
|
263
263
|
// question, qui }`: the fact, its piece, file:line or command and output, the question and who must
|
|
264
264
|
// answer it), for the supervisor, who answers by a command of the circuit and carries to the owner
|
|
265
265
|
// what is his (`qui` responsable: the reviewer's question on a real word of the language).
|
|
266
266
|
export const MONTEES = Object.fromEntries(
|
|
267
267
|
Object.entries({
|
|
268
|
+
'a-repasser':
|
|
269
|
+
'L’étape à repasser (une passe sous charge, une CI non lue, une file qui n’avance pas) a été rejouée autant de fois que le circuit le fait, sans aboutir : sa cause se lève-t-elle, pour reprendre, ou le circuit s’arrête-t-il ?',
|
|
268
270
|
lancement:
|
|
269
271
|
'Le lanceur s’arrête avant la séance, ou la copie n’avance pas sur la pointe de main avant une passe : la machine ou la copie se répare-t-elle, pour reprendre ?',
|
|
270
272
|
bloqué:
|
|
@@ -299,5 +301,5 @@ export const MONTEES = Object.fromEntries(
|
|
|
299
301
|
}).map(([arret, question]) => [arret, { question: `${question} ${REPONSES}`, qui: SUPERVISEUR }])
|
|
300
302
|
);
|
|
301
303
|
|
|
302
|
-
// The question of the stop <arret>, `{ question, qui }`, or null for a
|
|
304
|
+
// The question of the stop <arret>, `{ question, qui }`, or null for a stop of no circuit.
|
|
303
305
|
export const monteeDe = arret => MONTEES[arret] ?? null;
|
|
@@ -153,8 +153,9 @@ function motifDeGitHub(motif) {
|
|
|
153
153
|
// Whether the `on.push` of a workflow <push> runs on a push to <branche>, as GitHub reads its
|
|
154
154
|
// filters: none runs on every branch; `branches` in its order, a `!` pattern taking out what the
|
|
155
155
|
// ones before took in, the last match deciding; `branches-ignore` takes out what it matches;
|
|
156
|
-
// `tags` or `tags-ignore` alone run on no branch.
|
|
157
|
-
//
|
|
156
|
+
// `tags` or `tags-ignore` alone run on no branch. GitHub asks both filters: a branch the branch
|
|
157
|
+
// filter leaves out never runs, whatever the paths; a filter on the paths leaves a branch it takes
|
|
158
|
+
// in counted as one that runs, as does a form the queue does not judge.
|
|
158
159
|
function pousseeSurLaBranche(push, branche) {
|
|
159
160
|
if (push === null || push === undefined) {
|
|
160
161
|
return true;
|
|
@@ -162,9 +163,6 @@ function pousseeSurLaBranche(push, branche) {
|
|
|
162
163
|
if (typeof push !== 'object' || Array.isArray(push)) {
|
|
163
164
|
return true;
|
|
164
165
|
}
|
|
165
|
-
if (push.paths || push['paths-ignore']) {
|
|
166
|
-
return true;
|
|
167
|
-
}
|
|
168
166
|
const { branches, 'branches-ignore': ignorees } = push;
|
|
169
167
|
if (branches && ignorees) {
|
|
170
168
|
return true;
|
|
@@ -417,7 +415,10 @@ export function relireLesLecturesDues(o, { maintenant, ci }) {
|
|
|
417
415
|
nonJuge(f.nom, v.raison);
|
|
418
416
|
} else if (!v.fini) {
|
|
419
417
|
if (ecoule > ci.attenteMs) {
|
|
420
|
-
nonJuge(
|
|
418
|
+
nonJuge(
|
|
419
|
+
f.nom,
|
|
420
|
+
`le passage ${id} n'est pas fini après ${Math.round(ci.attenteMs / 60_000)} min.`
|
|
421
|
+
);
|
|
421
422
|
} else {
|
|
422
423
|
encore.push(f);
|
|
423
424
|
}
|
package/scripts/jointure.d.ts
CHANGED
|
@@ -260,8 +260,13 @@ export interface Composition {
|
|
|
260
260
|
* the others: the names of the summaries of a run present in `racine` before a run. */
|
|
261
261
|
resumesDuLancement?(racine: string): Set<string>;
|
|
262
262
|
/** Optional, typescript's alone: moves the summaries a run in `racine` wrote (absent from
|
|
263
|
-
* `avant`) into the results directory `env` names, or removes them without one
|
|
264
|
-
|
|
263
|
+
* `avant`) into the results directory `env` names, or removes them without one; gives each
|
|
264
|
+
* task of those summaries with its exit code, null for a task that did not run. */
|
|
265
|
+
garderLesResumes?(
|
|
266
|
+
racine: string,
|
|
267
|
+
avant: Set<string>,
|
|
268
|
+
env?: NodeJS.ProcessEnv
|
|
269
|
+
): { tache: string; code: number | null }[];
|
|
265
270
|
/** Optional, typescript's alone: the tasks of the summaries under the results directory
|
|
266
271
|
* `dossier`, in their order, each with its cache status; `code` null for a task that did not run. */
|
|
267
272
|
lireLesResumes?(dossier: string): TacheDuResume[];
|
|
@@ -503,7 +508,8 @@ export const TRACE: string;
|
|
|
503
508
|
export function nomDuPaquet(racine: string, dossier: string): string | null;
|
|
504
509
|
/** Runs the tasks `taches` of the packages `noms` (all when empty) with the task runner `outil`,
|
|
505
510
|
* each task whose dependencies succeed played to its end: the runner's exit code. `tests` is the
|
|
506
|
-
* content of the variable `TESTS_CIBLES` of the run; the variable of `env` never passes on.
|
|
511
|
+
* content of the variable `TESTS_CIBLES` of the run; the variable of `env` never passes on. A
|
|
512
|
+
* red run names, through `dire`, each task whose code is not 0. */
|
|
507
513
|
export function lancerLesTaches(o: {
|
|
508
514
|
outil: string;
|
|
509
515
|
racine: string;
|
|
@@ -511,6 +517,7 @@ export function lancerLesTaches(o: {
|
|
|
511
517
|
noms?: Iterable<string>;
|
|
512
518
|
tests?: { arguments: string[]; rejouer?: string };
|
|
513
519
|
env?: NodeJS.ProcessEnv;
|
|
520
|
+
dire?: (ligne: string) => void;
|
|
514
521
|
}): number;
|
|
515
522
|
/** A task of the summary of the task runner, or one a module wrote: `code` null for a task that did not run. */
|
|
516
523
|
export interface TacheDuResume {
|
|
@@ -722,8 +722,16 @@ function verifier(racine, args, env) {
|
|
|
722
722
|
env,
|
|
723
723
|
})
|
|
724
724
|
: 0;
|
|
725
|
-
p.jouer(p.prevoir(RACINE, racine, 'deny', false, ['deny', 'check']));
|
|
726
|
-
|
|
725
|
+
const deny = p.jouer(p.prevoir(RACINE, racine, 'deny', false, ['deny', 'check']));
|
|
726
|
+
const verdict = code === 0 ? p.code() : 1;
|
|
727
|
+
// A red pass names its task out of the graph, as `lancerLesTaches` names those of the graph.
|
|
728
|
+
if (verdict !== 0) {
|
|
729
|
+
if (deny !== 0) {
|
|
730
|
+
process.stderr.write(`⛔ ${RACINE}#deny (code ${deny})\n`);
|
|
731
|
+
}
|
|
732
|
+
process.stderr.write('⛔ rouge.\n');
|
|
733
|
+
}
|
|
734
|
+
return verdict;
|
|
727
735
|
}
|
|
728
736
|
|
|
729
737
|
// The scripts of guards of the project, in the order they play, as the module typescript's
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
// - `resumesDuLancement` names the summaries present in a project before a run.
|
|
7
7
|
// - `garderLesResumes` moves the summaries a run wrote into `<dossier>/turbo/`, the results
|
|
8
8
|
// directory (`GRILLHOUSE_RESULTATS`, scripts/resultats.mjs) its environment names, or removes
|
|
9
|
-
// them without one.
|
|
9
|
+
// them without one, and gives each of their tasks with its exit code.
|
|
10
10
|
// - `lireLesResumes` gives each task of those summaries, its package and directory, its script,
|
|
11
11
|
// its exit code, its cache status and its log file (from the root), and whether it plays the
|
|
12
12
|
// tests of its package (`test:unit`).
|
|
@@ -41,14 +41,19 @@ export function resumesDuLancement(racine) {
|
|
|
41
41
|
|
|
42
42
|
// Moves the summaries that a run in <racine> wrote (`.turbo/runs/*.json` absent from <avant>, the
|
|
43
43
|
// names there before it) into the results directory <env> names; removes them without it.
|
|
44
|
-
// `.turbo/runs` goes too when the run created it (<avant> empty) and it is left empty.
|
|
44
|
+
// `.turbo/runs` goes too when the run created it (<avant> empty) and it is left empty. Gives each
|
|
45
|
+
// task of those summaries, `{ tache, code }`, `code` null for a task that did not run.
|
|
45
46
|
export function garderLesResumes(racine, avant, env = process.env) {
|
|
46
47
|
const runs = path.join(racine, '.turbo', 'runs');
|
|
47
48
|
const neufs = (existsSync(runs) ? readdirSync(runs) : []).filter(
|
|
48
49
|
f => !avant.has(f) && f.endsWith('.json')
|
|
49
50
|
);
|
|
50
51
|
const dossier = env[RESULTATS];
|
|
52
|
+
const taches = [];
|
|
51
53
|
for (const f of neufs) {
|
|
54
|
+
for (const t of lireJson(path.join(runs, f))?.tasks ?? []) {
|
|
55
|
+
taches.push({ tache: t.taskId, code: t.execution?.exitCode ?? null });
|
|
56
|
+
}
|
|
52
57
|
if (dossier) {
|
|
53
58
|
mkdirSync(path.join(dossier, TURBO), { recursive: true });
|
|
54
59
|
// The results directory may lie on another file system: a copy, then the removal.
|
|
@@ -59,6 +64,7 @@ export function garderLesResumes(racine, avant, env = process.env) {
|
|
|
59
64
|
if (neufs.length && !avant.size && existsSync(runs) && readdirSync(runs).length === 0) {
|
|
60
65
|
rmdirSync(runs);
|
|
61
66
|
}
|
|
67
|
+
return taches;
|
|
62
68
|
}
|
|
63
69
|
|
|
64
70
|
// The tasks of the summaries under the results directory <dossier>, in their order:
|
|
@@ -76,7 +76,9 @@ const constanteGarde = t => /\bconst\s+GARDE\s*=\s*['"]([^'"]+)['"]/.exec(t)?.[1
|
|
|
76
76
|
|
|
77
77
|
// The names of the guard <fichier> (text <t>), or [] when it is not a guard with a debt.
|
|
78
78
|
function nomsDeGarde(fichier, t) {
|
|
79
|
-
if (
|
|
79
|
+
if (
|
|
80
|
+
!imports(t, fichier).some(i => /\btrancher\b/.test(i.noms) && /\/dette(\.mjs)?$/.test(i.chemin))
|
|
81
|
+
) {
|
|
80
82
|
return [];
|
|
81
83
|
}
|
|
82
84
|
const noms = new Set();
|
|
@@ -93,7 +95,9 @@ function nomsDeGarde(fichier, t) {
|
|
|
93
95
|
// installed under node_modules. A project that installs the frame judges none of its scripts.
|
|
94
96
|
function chezLeCadre(racine, scripts) {
|
|
95
97
|
const rel = path.relative(racine, scripts);
|
|
96
|
-
return
|
|
98
|
+
return (
|
|
99
|
+
!rel.startsWith('..') && !path.isAbsolute(rel) && !rel.split(path.sep).includes('node_modules')
|
|
100
|
+
);
|
|
97
101
|
}
|
|
98
102
|
|
|
99
103
|
// The refusals of the repository at <racine>, its frame's scripts at <scripts>.
|
|
@@ -125,7 +129,9 @@ export function verifier(racine, scripts = DOSSIER) {
|
|
|
125
129
|
const noms = nomsDeGarde(g, t);
|
|
126
130
|
for (const nom of noms) {
|
|
127
131
|
const couverte = jouees.some(({ m, t: tm }) => {
|
|
128
|
-
const lien = imports(tm, m).find(
|
|
132
|
+
const lien = imports(tm, m).find(
|
|
133
|
+
i => i.chemin === g || i.chemin === g.replace(/\.mjs$/, '')
|
|
134
|
+
);
|
|
129
135
|
if (!lien) {
|
|
130
136
|
return false;
|
|
131
137
|
}
|
|
@@ -147,8 +153,13 @@ export function verifier(racine, scripts = DOSSIER) {
|
|
|
147
153
|
}
|
|
148
154
|
|
|
149
155
|
// The report of the guard at <racine>: its lines and its exit code, the findings counted against
|
|
150
|
-
// the debt.
|
|
156
|
+
// the debt. A repository whose frame's scripts are not its own (a project, or a copy that runs the
|
|
157
|
+
// scripts of another tree) is not measured: its debt is neither judged nor pruned, since no
|
|
158
|
+
// finding there says what is corrected.
|
|
151
159
|
export function rapport(racine, env = process.env, scripts = DOSSIER) {
|
|
160
|
+
if (!chezLeCadre(racine, scripts)) {
|
|
161
|
+
return { lignes: [], code: 0 };
|
|
162
|
+
}
|
|
152
163
|
const { refus, lignes } = trancher(
|
|
153
164
|
racine,
|
|
154
165
|
GARDE,
|
package/scripts/tableau.mjs
CHANGED
|
@@ -157,6 +157,7 @@ export const roleDuMeta = m =>
|
|
|
157
157
|
export const ETATS = [
|
|
158
158
|
{ cle: 'enCours', nom: 'en cours', sens: 'un agent y travaille' },
|
|
159
159
|
{ cle: 'enAttente', nom: 'en attente', sens: 'ton go, prêt à partir' },
|
|
160
|
+
{ cle: 'fileDirecte', nom: 'en direct', sens: 'mené hors du circuit, pas encore pris' },
|
|
160
161
|
{ cle: 'bloques', nom: 'bloqué', sens: 'ton go, il attend un autre ticket' },
|
|
161
162
|
{ cle: 'sansGo', nom: 'sans go', sens: 'validé, il attend ton go' },
|
|
162
163
|
{ cle: 'aValider', nom: 'à valider', sens: 'une trouvaille attend ton accord' },
|
|
@@ -174,6 +175,7 @@ export const TONS = Object.freeze({
|
|
|
174
175
|
// A ticket's state (ETATS).
|
|
175
176
|
enCours: 'actif',
|
|
176
177
|
enAttente: undefined,
|
|
178
|
+
fileDirecte: undefined,
|
|
177
179
|
bloques: undefined,
|
|
178
180
|
sansGo: 'attention',
|
|
179
181
|
aValider: 'attention',
|
|
@@ -774,7 +776,8 @@ export function lecture(t, prefix) {
|
|
|
774
776
|
* places'; `muet`, the Temporal
|
|
775
777
|
* server did not answer the reading of the circuits, which the first alert says; `faute`, any
|
|
776
778
|
* other fault of that reading, said in the first alert as it is; `echecPrefixe`, the cause of a
|
|
777
|
-
* ticket prefix that did not read, named in an alert
|
|
779
|
+
* ticket prefix that did not read, named in an alert; `voies`, the way of each circuit done
|
|
780
|
+
* (`voiesDesCircuits`), whose sign FAITS AUJOURD'HUI shows.
|
|
778
781
|
* @param {{ tous: any[], prefix?: string, registre: any[], vivants: any[], circuits?: any[],
|
|
779
782
|
* maintenant: number, jour: number,
|
|
780
783
|
* machine?: Machine | null, outil?: { version: string, raison: string } | null,
|
|
@@ -782,7 +785,7 @@ export function lecture(t, prefix) {
|
|
|
782
785
|
* coeurs: number, memoireGo: number, memoireTotaleGo: number, attentes: { ticket: string,
|
|
783
786
|
* depuis: number, disque?: string | null }[] } | null,
|
|
784
787
|
* nuit?: { racine: string, depuis: number | null } | null, muet?: boolean, faute?: string | null,
|
|
785
|
-
* echecPrefixe?: string | null }} lu
|
|
788
|
+
* echecPrefixe?: string | null, voies?: Record<string, 'complet' | 'court'> }} lu
|
|
786
789
|
*/
|
|
787
790
|
export function assembler({
|
|
788
791
|
tous,
|
|
@@ -801,6 +804,7 @@ export function assembler({
|
|
|
801
804
|
echecPrefixe = null,
|
|
802
805
|
remontees = [],
|
|
803
806
|
attenteVivante: attenteQuiVit = true,
|
|
807
|
+
voies = {},
|
|
804
808
|
}) {
|
|
805
809
|
// A circuit's lines are its steps, no agent's passage.
|
|
806
810
|
const etapesFinies = lignesDuRegistre.filter(r => r.role === ROLE_DU_CIRCUIT);
|
|
@@ -876,6 +880,10 @@ export function assembler({
|
|
|
876
880
|
if (avalider.has(t.id)) {
|
|
877
881
|
return 'aValider';
|
|
878
882
|
}
|
|
883
|
+
// A ticket led out of the circuit, not yet claimed: the direct queue.
|
|
884
|
+
if ((t.labels ?? []).includes('direct')) {
|
|
885
|
+
return 'fileDirecte';
|
|
886
|
+
}
|
|
879
887
|
if (!circuit(t)) {
|
|
880
888
|
return 'sansGo';
|
|
881
889
|
}
|
|
@@ -886,6 +894,7 @@ export function assembler({
|
|
|
886
894
|
const compteurs = {
|
|
887
895
|
enCours: 0,
|
|
888
896
|
enAttente: 0,
|
|
897
|
+
fileDirecte: 0,
|
|
889
898
|
bloques: 0,
|
|
890
899
|
fermes: 0,
|
|
891
900
|
sansGo: 0,
|
|
@@ -1084,6 +1093,15 @@ export function assembler({
|
|
|
1084
1093
|
});
|
|
1085
1094
|
}
|
|
1086
1095
|
const debutJour = jour;
|
|
1096
|
+
// The way of a ticket done (grillhouse-592): `direct` when labelled so; else the way its kept
|
|
1097
|
+
// results give (`voies`, `voiesDesCircuits`: `court` through 1.1, else `complet`); else
|
|
1098
|
+
// `complet` when a circuit led a step of it (the register) or is read for it; else `direct`,
|
|
1099
|
+
// closed with no circuit.
|
|
1100
|
+
const parUnCircuit = new Set([...etapesFinies.map(r => r.ticket), ...parCircuit.keys()]);
|
|
1101
|
+
const voieDe = t =>
|
|
1102
|
+
(t.labels ?? []).includes('direct')
|
|
1103
|
+
? 'direct'
|
|
1104
|
+
: (voies[t.id] ?? (parUnCircuit.has(t.id) ? 'complet' : 'direct'));
|
|
1087
1105
|
const faitsDuJour = tous
|
|
1088
1106
|
.filter(
|
|
1089
1107
|
t =>
|
|
@@ -1094,12 +1112,20 @@ export function assembler({
|
|
|
1094
1112
|
Date.parse(t.closed_at) >= debutJour
|
|
1095
1113
|
)
|
|
1096
1114
|
.sort((a, b) => Date.parse(b.closed_at) - Date.parse(a.closed_at))
|
|
1097
|
-
.map(t =>
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1115
|
+
.map(t => {
|
|
1116
|
+
const m = mesure(new Set([t.id]));
|
|
1117
|
+
const voie = voieDe(t);
|
|
1118
|
+
// A circuit's time is its agents' and steps' working time; a direct ticket's runs from its
|
|
1119
|
+
// claim to its close, null without a claim.
|
|
1120
|
+
const pris = Date.parse(t.started_at ?? '');
|
|
1121
|
+
const dure =
|
|
1122
|
+
voie !== 'direct'
|
|
1123
|
+
? m.travail
|
|
1124
|
+
: Number.isFinite(pris)
|
|
1125
|
+
? Date.parse(t.closed_at) - pris
|
|
1126
|
+
: null;
|
|
1127
|
+
return { id: t.id, numero: numero(t.id), sujet: titre(t).sujet, voie, duree: dure, ...m };
|
|
1128
|
+
});
|
|
1103
1129
|
|
|
1104
1130
|
// Alerts, each with its state (`etat`) and the tone of that state (TONS).
|
|
1105
1131
|
const alertes = [];
|
|
@@ -1217,7 +1243,7 @@ export function assembler({
|
|
|
1217
1243
|
// The tickets worked out of a circuit: claimed (`in_progress`), no circuit on the server that
|
|
1218
1244
|
// holds them, a mother of theirs or a ticket under them (a circuit holds its ticket's mothers and
|
|
1219
1245
|
// children): one that runs or waits for an answer (`attendLeSuperviseur`), never one the
|
|
1220
|
-
// supervisor stopped; or labelled `direct
|
|
1246
|
+
// supervisor stopped; or labelled `direct` and claimed (led out of the circuit); and no role
|
|
1221
1247
|
// agent shown at a step. None while the circuits do not read (a
|
|
1222
1248
|
// silent server, a fault), when no ticket can be told out of a circuit.
|
|
1223
1249
|
const aUneEtape = new Set(blocs.flatMap(b => b.enCours.map(x => x.id)));
|
|
@@ -1241,16 +1267,14 @@ export function assembler({
|
|
|
1241
1267
|
t =>
|
|
1242
1268
|
travail(t) &&
|
|
1243
1269
|
!aUneEtape.has(t.id) &&
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
(t.status === 'open' || t.status === 'in_progress')))
|
|
1270
|
+
t.status === 'in_progress' &&
|
|
1271
|
+
(!dansUnCircuit(t) || (t.labels ?? []).includes('direct'))
|
|
1247
1272
|
)
|
|
1248
1273
|
.sort(ordre)
|
|
1249
1274
|
.map(t => ({
|
|
1250
1275
|
id: t.id,
|
|
1251
1276
|
numero: numero(t.id),
|
|
1252
1277
|
sujet: titre(t).sujet,
|
|
1253
|
-
qui: t.assignee || null,
|
|
1254
1278
|
}));
|
|
1255
1279
|
// The circuits, in the tickets' order; a ticket worked in direct has its line alone.
|
|
1256
1280
|
const enDirect = new Set(horsCircuit.map(x => x.id));
|
|
@@ -1330,6 +1354,41 @@ function temoinDe(c, maintenant) {
|
|
|
1330
1354
|
}
|
|
1331
1355
|
|
|
1332
1356
|
// A ticket's time and tokens, « 12 min · 310 k »; nothing when both are zero.
|
|
1357
|
+
// The sign of a ticket done by its way (grillhouse-592): a full circuit, a short one (1.1 Geste
|
|
1358
|
+
// mécanique), a ticket led directly.
|
|
1359
|
+
export const SIGNE_DE_LA_VOIE = Object.freeze({ complet: '●', court: '○', direct: '✎' });
|
|
1360
|
+
|
|
1361
|
+
/**
|
|
1362
|
+
* The way of the circuit each ticket of <tickets> went, read from its kept results in the main tree
|
|
1363
|
+
* <racine> (`.claude/worktrees/<ticket>.fiches.jsonl`, which the circuit writes and keeps once the
|
|
1364
|
+
* ticket is done): `court` when the launch of a session carries the object `geste` (1.1 Geste
|
|
1365
|
+
* mécanique), else `complet`; a ticket without the file has no entry. A line that does not parse
|
|
1366
|
+
* counts nothing.
|
|
1367
|
+
* @param {string} racine
|
|
1368
|
+
* @param {string[]} tickets
|
|
1369
|
+
* @returns {Record<string, 'complet' | 'court'>}
|
|
1370
|
+
*/
|
|
1371
|
+
export function voiesDesCircuits(racine, tickets) {
|
|
1372
|
+
const out = {};
|
|
1373
|
+
for (const id of tickets) {
|
|
1374
|
+
let texte;
|
|
1375
|
+
try {
|
|
1376
|
+
texte = readFileSync(path.join(racine, '.claude', 'worktrees', `${id}.fiches.jsonl`), 'utf8');
|
|
1377
|
+
} catch {
|
|
1378
|
+
continue;
|
|
1379
|
+
}
|
|
1380
|
+
const geste = texte.split('\n').some(l => {
|
|
1381
|
+
try {
|
|
1382
|
+
return JSON.parse(l)?.lancement?.objet === 'geste';
|
|
1383
|
+
} catch {
|
|
1384
|
+
return false;
|
|
1385
|
+
}
|
|
1386
|
+
});
|
|
1387
|
+
out[id] = geste ? 'court' : 'complet';
|
|
1388
|
+
}
|
|
1389
|
+
return out;
|
|
1390
|
+
}
|
|
1391
|
+
|
|
1333
1392
|
const conso = (ms, jetons) =>
|
|
1334
1393
|
Math.round(ms / MINUTE) === 0 && !jetons ? '' : `${duree(ms)} · ${k(jetons)}`;
|
|
1335
1394
|
|
|
@@ -1412,7 +1471,7 @@ export function lignes(t, nom, largeur = LARGEUR, groupes = {}) {
|
|
|
1412
1471
|
const c = p.compteurs;
|
|
1413
1472
|
L(
|
|
1414
1473
|
cadre(
|
|
1415
|
-
`${colonneDe(p.etiquette)}▶ ${c.enCours} en cours · ${c.enAttente}
|
|
1474
|
+
`${colonneDe(p.etiquette)}▶ ${c.enCours} en cours · ⏭ ${c.enAttente} · ✎ ${c.fileDirecte ?? 0} · ${c.fermes} faits`,
|
|
1416
1475
|
'',
|
|
1417
1476
|
largeur
|
|
1418
1477
|
)
|
|
@@ -1431,14 +1490,10 @@ export function lignes(t, nom, largeur = LARGEUR, groupes = {}) {
|
|
|
1431
1490
|
} else {
|
|
1432
1491
|
const g = t.global;
|
|
1433
1492
|
const c = g.compteurs;
|
|
1434
|
-
//
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
'',
|
|
1439
|
-
largeur
|
|
1440
|
-
)
|
|
1441
|
-
);
|
|
1493
|
+
// Three lines of states: the work, the queues (the circuit's, the direct one), then those that
|
|
1494
|
+
// wait for the owner.
|
|
1495
|
+
L(cadre(`▶ ${c.enCours} en cours · ${c.bloques} bloqués · ${c.fermes} faits`, '', largeur));
|
|
1496
|
+
L(cadre(`⏭ file : ${c.enAttente} en circuit · ${c.fileDirecte} en direct`, '', largeur));
|
|
1442
1497
|
L(
|
|
1443
1498
|
cadre(`${c.sansGo} sans go · ${c.aValider} à valider · ${c.reportes} reportés`, '', largeur),
|
|
1444
1499
|
c.sansGo ? TONS.sansGo : c.aValider ? TONS.aValider : TONS.reportes
|
|
@@ -1754,15 +1809,10 @@ export function lignes(t, nom, largeur = LARGEUR, groupes = {}) {
|
|
|
1754
1809
|
plein ? TONS.titre : TONS.vide
|
|
1755
1810
|
);
|
|
1756
1811
|
// The tickets worked out of a circuit, once each, before the steps, from their claim to their
|
|
1757
|
-
// close: « ✎ <numéro> <sujet> · en direct
|
|
1812
|
+
// close: « ✎ <numéro> <sujet> · en direct ».
|
|
1758
1813
|
for (const x of t.horsCircuit ?? []) {
|
|
1759
1814
|
poser({
|
|
1760
|
-
texte: couperAvant(
|
|
1761
|
-
`${teteDe('✎', x)}${x.sujet}`,
|
|
1762
|
-
` · en direct${x.qui ? ` · ${x.qui}` : ''}`,
|
|
1763
|
-
droiteDe('✎', ''),
|
|
1764
|
-
largeur
|
|
1765
|
-
),
|
|
1815
|
+
texte: couperAvant(`${teteDe('✎', x)}${x.sujet}`, ' · en direct', droiteDe('✎', ''), largeur),
|
|
1766
1816
|
ton: TONS.enDirect,
|
|
1767
1817
|
ticket: x.id,
|
|
1768
1818
|
});
|
|
@@ -1943,8 +1993,14 @@ export function lignes(t, nom, largeur = LARGEUR, groupes = {}) {
|
|
|
1943
1993
|
),
|
|
1944
1994
|
TONS.titre
|
|
1945
1995
|
);
|
|
1996
|
+
// Each line: the sign of its way, then « <durée> · <jetons> », « — » for a direct ticket never
|
|
1997
|
+
// claimed.
|
|
1946
1998
|
const fait = x => ({
|
|
1947
|
-
texte: cadre(
|
|
1999
|
+
texte: cadre(
|
|
2000
|
+
`${SIGNE_DE_LA_VOIE[x.voie] ?? SIGNE_DE_LA_VOIE.direct} ${duProjet(x)}${x.numero} ${x.sujet}`,
|
|
2001
|
+
`${x.duree === null || x.duree === undefined ? '—' : duree(x.duree)} · ${k(x.jetons)}`,
|
|
2002
|
+
largeur
|
|
2003
|
+
),
|
|
1948
2004
|
ton: TONS.fermes,
|
|
1949
2005
|
ticket: x.id,
|
|
1950
2006
|
});
|
|
@@ -2099,7 +2155,7 @@ export function ligneEtat(t) {
|
|
|
2099
2155
|
const ch = t.chantiers[0];
|
|
2100
2156
|
const c = t.global.compteurs;
|
|
2101
2157
|
if (!ch) {
|
|
2102
|
-
return `${alerte}Grillhouse : ${c.enCours} en cours · ${c.enAttente}
|
|
2158
|
+
return `${alerte}Grillhouse : ${c.enCours} en cours · ⏭ ${c.enAttente} · ✎ ${c.fileDirecte} · ${c.fermes} faits`;
|
|
2103
2159
|
}
|
|
2104
2160
|
return `${alerte}${ch.numero} ${ch.faits}/${ch.total} · ▶ ${c.enCours} en cours · ${k(t.global.jour.jetons)} aujourd'hui`;
|
|
2105
2161
|
}
|
|
@@ -2246,6 +2302,12 @@ function lire(
|
|
|
2246
2302
|
} catch {
|
|
2247
2303
|
// A read-only place keeps the board working, without its cache.
|
|
2248
2304
|
}
|
|
2305
|
+
const jour = lireLeRepere(commun, maintenant);
|
|
2306
|
+
// The kept results of the circuits of the tickets done since the day's marker, in the main tree.
|
|
2307
|
+
const voies = voiesDesCircuits(
|
|
2308
|
+
commun ? path.dirname(commun) : racine,
|
|
2309
|
+
tous.filter(x => x.closed_at && Date.parse(x.closed_at) >= jour).map(x => x.id)
|
|
2310
|
+
);
|
|
2249
2311
|
const t = assembler({
|
|
2250
2312
|
tous,
|
|
2251
2313
|
prefix,
|
|
@@ -2253,7 +2315,8 @@ function lire(
|
|
|
2253
2315
|
vivants,
|
|
2254
2316
|
circuits,
|
|
2255
2317
|
maintenant,
|
|
2256
|
-
jour
|
|
2318
|
+
jour,
|
|
2319
|
+
voies,
|
|
2257
2320
|
machine,
|
|
2258
2321
|
places,
|
|
2259
2322
|
nuit,
|
|
@@ -39,7 +39,6 @@ import { closeSync, openSync, readFileSync, writeFileSync } from 'node:fs';
|
|
|
39
39
|
import path from 'node:path';
|
|
40
40
|
import { lireLaListe } from './enveloppe/paquets-du-plan.mjs';
|
|
41
41
|
import { paquets } from './paquets.mjs';
|
|
42
|
-
import { RESULTATS } from './resultats.mjs';
|
|
43
42
|
import { langage } from './langages.mjs';
|
|
44
43
|
|
|
45
44
|
/** The name of the script and of the task of the tests of a package, the same for every language. */
|
|
@@ -104,21 +103,31 @@ export function nomDuPaquet(racine, dossier) {
|
|
|
104
103
|
* Runs the tasks <taches> of the packages <noms> (all of them when <noms> is empty) with <outil> in
|
|
105
104
|
* <racine>, each task whose dependencies succeed played to its end: its exit code, the runner's.
|
|
106
105
|
* <tests>, when given, is the content of the variable `TESTS_CIBLES` of the run (`{ arguments,
|
|
107
|
-
* rejouer? }`); the variable of <env> never passes on.
|
|
106
|
+
* rejouer? }`); the variable of <env> never passes on. A red run names, through <dire>, each task
|
|
107
|
+
* whose code is not 0, « ⛔ <tâche> (code N) », as the pass of the module typescript does.
|
|
108
108
|
* @param {{ outil: string, racine: string, taches: string[], noms?: Iterable<string>,
|
|
109
|
-
* tests?: { arguments: string[], rejouer?: string }, env?: NodeJS.ProcessEnv
|
|
109
|
+
* tests?: { arguments: string[], rejouer?: string }, env?: NodeJS.ProcessEnv,
|
|
110
|
+
* dire?: (ligne: string) => void }} o
|
|
110
111
|
* @returns {number}
|
|
111
112
|
*/
|
|
112
|
-
export function lancerLesTaches({
|
|
113
|
+
export function lancerLesTaches({
|
|
114
|
+
outil,
|
|
115
|
+
racine,
|
|
116
|
+
taches,
|
|
117
|
+
noms = [],
|
|
118
|
+
tests,
|
|
119
|
+
env = process.env,
|
|
120
|
+
dire = l => process.stderr.write(`${l}\n`),
|
|
121
|
+
}) {
|
|
113
122
|
const e = { ...env };
|
|
114
123
|
delete e[TESTS_CIBLES];
|
|
115
124
|
if (tests) {
|
|
116
125
|
e[TESTS_CIBLES] = JSON.stringify(tests);
|
|
117
126
|
}
|
|
118
127
|
const filtres = [...new Set(noms)].sort().map(n => `--filter=${n}`);
|
|
119
|
-
//
|
|
120
|
-
//
|
|
121
|
-
const resume =
|
|
128
|
+
// The runner's summary gives each task's verdict; kept in a named results directory, never left
|
|
129
|
+
// in the project.
|
|
130
|
+
const resume = ['--summarize'];
|
|
122
131
|
const lanceur = langage('typescript');
|
|
123
132
|
const avant = lanceur.resumesDuLancement(racine);
|
|
124
133
|
const r = spawnSync(
|
|
@@ -126,7 +135,12 @@ export function lancerLesTaches({ outil, racine, taches, noms = [], tests, env =
|
|
|
126
135
|
['run', ...taches, ...filtres, '--continue=dependencies-successful', ...resume],
|
|
127
136
|
{ cwd: racine, stdio: 'inherit', env: e }
|
|
128
137
|
);
|
|
129
|
-
lanceur.garderLesResumes(racine, avant, e);
|
|
138
|
+
const verdicts = lanceur.garderLesResumes(racine, avant, e);
|
|
139
|
+
if (r.status !== 0) {
|
|
140
|
+
for (const t of verdicts.filter(x => x.code !== 0)) {
|
|
141
|
+
dire(`⛔ ${t.tache} (code ${t.code ?? 'absent'})`);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
130
144
|
return r.status ?? 1;
|
|
131
145
|
}
|
|
132
146
|
|