@roomi-fields/grillhouse 0.33.0 → 0.34.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 +73 -0
- package/cadre/templates/projet/.github/workflows/ci.yml +35 -2
- package/cadre/templates/projet/CLAUDE.md +9 -3
- package/charte.md +23 -6
- package/dist/temporal/circuit/activites.d.ts +3 -1
- package/dist/temporal/circuit/activites.js +25 -1
- package/dist/temporal/circuit/activites.js.map +1 -1
- package/dist/temporal/circuit/appel.d.ts +19 -0
- package/dist/temporal/circuit/appel.js +93 -0
- package/dist/temporal/circuit/appel.js.map +1 -0
- package/dist/temporal/circuit/client.d.ts +17 -3
- package/dist/temporal/circuit/client.js +28 -4
- package/dist/temporal/circuit/client.js.map +1 -1
- package/dist/temporal/circuit/commande.js +27 -87
- package/dist/temporal/circuit/commande.js.map +1 -1
- package/dist/temporal/circuit/contrat.d.ts +29 -0
- package/dist/temporal/circuit/contrat.js +33 -0
- package/dist/temporal/circuit/contrat.js.map +1 -1
- package/dist/temporal/circuit/deroule.js +115 -34
- package/dist/temporal/circuit/deroule.js.map +1 -1
- package/dist/temporal/commande.js +13 -3
- package/dist/temporal/commande.js.map +1 -1
- package/dist/temporal/file/activites.d.ts +3 -0
- package/dist/temporal/file/activites.js +9 -0
- package/dist/temporal/file/activites.js.map +1 -1
- package/dist/temporal/file/contrat.d.ts +58 -0
- package/dist/temporal/file/deroule.d.ts +8 -1
- package/dist/temporal/file/deroule.js +100 -2
- package/dist/temporal/file/deroule.js.map +1 -1
- package/dist/temporal/installation.d.ts +15 -1
- package/dist/temporal/installation.js +57 -15
- package/dist/temporal/installation.js.map +1 -1
- package/dist/temporal/nuits/contrat.d.ts +2 -0
- package/dist/temporal/nuits/deroule.js +3 -0
- package/dist/temporal/nuits/deroule.js.map +1 -1
- package/dist/temporal/places/activites.d.ts +8 -0
- package/dist/temporal/places/activites.js +12 -1
- package/dist/temporal/places/activites.js.map +1 -1
- package/dist/temporal/places/client.d.ts +8 -1
- package/dist/temporal/places/client.js +25 -2
- package/dist/temporal/places/client.js.map +1 -1
- package/dist/temporal/places/contrat.d.ts +35 -3
- package/dist/temporal/places/contrat.js +5 -4
- package/dist/temporal/places/contrat.js.map +1 -1
- package/dist/temporal/places/deroule.js +55 -9
- package/dist/temporal/places/deroule.js.map +1 -1
- package/dist/temporal/tickets/activites.d.ts +3 -0
- package/dist/temporal/tickets/activites.js +73 -4
- package/dist/temporal/tickets/activites.js.map +1 -1
- package/dist/temporal/tickets/contrat.d.ts +31 -0
- package/dist/temporal/tickets/deroule.js +61 -10
- package/dist/temporal/tickets/deroule.js.map +1 -1
- package/docs/ARCHITECTURE.md +240 -60
- package/docs/CADRE.md +6 -1
- package/docs/INTERFACE.md +25 -8
- package/hooks/crochet.mjs +17 -2
- package/hooks/hooks.json +24 -0
- package/package.json +1 -1
- package/scripts/activites.mjs +96 -15
- package/scripts/aiguillage.mjs +2 -0
- package/scripts/attente-a-l-arret.mjs +141 -0
- package/scripts/attente-au-tour.mjs +32 -16
- package/scripts/avancement.mjs +5 -3
- package/scripts/branche-de-nuit.mjs +63 -3
- package/scripts/circuit.mjs +57 -4
- package/scripts/circuits-du-serveur.mjs +38 -4
- package/scripts/commandes-composees.mjs +11 -4
- package/scripts/copies-finies.mjs +43 -29
- package/scripts/crochets.mjs +1 -1
- package/scripts/dernier-vert.mjs +31 -10
- package/scripts/dette.mjs +55 -4
- package/scripts/disque-des-copies.d.mts +28 -0
- package/scripts/disque-des-copies.mjs +155 -0
- package/scripts/droits.mjs +2 -0
- package/scripts/faits-du-circuit.mjs +24 -0
- package/scripts/file-des-tickets.d.mts +16 -0
- package/scripts/file-des-tickets.mjs +65 -7
- package/scripts/gardes-du-cadre.mjs +4 -2
- package/scripts/integration/file.mjs +302 -5
- package/scripts/jointure.d.ts +33 -1
- package/scripts/langages/cargo/commandes.mjs +71 -10
- package/scripts/langages/cargo/composants.mjs +12 -4
- package/scripts/langages/cargo/executables-de-tests.mjs +118 -0
- package/scripts/langages/cargo/exemples.mjs +17 -3
- package/scripts/langages/cargo/index.mjs +8 -3
- package/scripts/langages/cargo/migrations/0.28.4-tailles-des-tests.mjs +2 -2
- package/scripts/langages/cargo/migrations/0.34.0-executables-de-tests.mjs +35 -0
- package/scripts/langages/cargo/squelette.mjs +8 -3
- package/scripts/langages/cargo/tailles-des-tests.mjs +68 -6
- package/scripts/langages/cargo/tests-de-head.mjs +12 -9
- package/scripts/langages/cargo/verdict.mjs +40 -14
- package/scripts/langages/python/commandes.mjs +11 -2
- package/scripts/langages/python/index.mjs +12 -4
- package/scripts/langages/python/verdict.mjs +8 -1
- package/scripts/langages/typescript/index.mjs +9 -2
- package/scripts/langages/typescript/resume-du-lanceur.mjs +86 -0
- package/scripts/langages/typescript/tests.mjs +9 -3
- package/scripts/langages/typescript/verdict.mjs +4 -60
- package/scripts/langages/typescript/verifier.mjs +11 -4
- package/scripts/langages/typescript/vitest-config/changements.mjs +32 -15
- package/scripts/langages/typescript/vitest-config/lances.mjs +45 -0
- package/scripts/langages/typescript/vitest-config/machine.setup.mjs +1 -0
- package/scripts/messages-non-lus.mjs +166 -0
- package/scripts/mesure-de-la-machine.mjs +7 -4
- package/scripts/migrations-des-gardes.mjs +168 -0
- package/scripts/places-de-la-machine.mjs +44 -40
- package/scripts/places-du-serveur.mjs +82 -14
- package/scripts/plafond-de-la-machine.d.mts +18 -0
- package/scripts/plafond-de-la-machine.mjs +45 -0
- package/scripts/recommencer.d.mts +4 -0
- package/scripts/recommencer.mjs +29 -0
- package/scripts/regles-des-places.d.mts +35 -0
- package/scripts/regles-des-places.mjs +82 -1
- package/scripts/resultats.mjs +38 -4
- package/scripts/retirer-les-copies-finies.mjs +11 -7
- package/scripts/seances.mjs +1 -1
- package/scripts/services-du-noyau.mjs +2 -1
- package/scripts/session-start.sh +12 -0
- package/scripts/sous-commandes.mjs +2 -0
- package/scripts/superviseur.mjs +283 -59
- package/scripts/tableau.mjs +390 -250
- package/scripts/taches-du-graphe.mjs +32 -5
- package/scripts/ticket-du-circuit.mjs +25 -0
- package/scripts/transitions.d.mts +27 -1
- package/scripts/transitions.mjs +96 -4
- package/scripts/verrou-de-machine.mjs +41 -17
- package/skills/explorateur/SKILL.md +8 -2
- package/skills/pitmaster/SKILL.md +26 -18
- package/skills/pitmaster/references/tour.md +3 -1
- package/skills/questionneur/SKILL.md +5 -1
- package/skills/testwriter/SKILL.md +32 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../../src/temporal/circuit/client.ts"],"names":[],"mappings":"AAAA,kGAAkG;AAClG,gGAAgG;AAChG,mGAAmG;AACnG,8FAA8F;AAC9F,kGAAkG;AAClG,kGAAkG;AAClG,+FAA+F;AAC/F,6FAA6F;AAC7F,gGAAgG;AAChG,wFAAwF;AACxF,sBAAsB;AACtB,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,0CAA0C,CAAC;AACnF,OAAO,EAAE,qBAAqB,EAAE,yBAAyB,EAAe,MAAM,oBAAoB,CAAC;AACnG,OAAO,EACL,kBAAkB,EAClB,uBAAuB,EACvB,oCAAoC,GACrC,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EACL,OAAO,EACP,OAAO,EACP,MAAM,EACN,OAAO,EACP,WAAW,EACX,MAAM,EACN,mBAAmB,EACnB,SAAS,GAQV,MAAM,cAAc,CAAC;AAEtB,oGAAoG;AACpG,MAAM,CAAC,KAAK,UAAU,iBAAiB,CACrC,MAAc,EACd,MAAuB,EACvB,IAAY;IAEZ,MAAM,EAAE,GAAG,WAAW,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;IACrD,MAAM,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,OAAO,EAAE;QACnC,UAAU,EAAE,EAAE;QACd,S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YACP,GAAG,EAAE,CAAC,CAAC,KAAK;YACZ,MAAM,EAAE,IAAI,CAAC,MAAM,IAAI,CAAC;YACxB,OAAO;YACP,GAAG,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,IAAI;SAChD,CAAC,CAAC;IACL,CAAC;IACD,OAAO,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC;AACpE,CAAC"}
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
// grillhouse circuit <ticket> --depuis <testwriter|developpeur> --contexte <texte>
|
|
8
8
|
// grillhouse circuit <ticket> --etendre <paquet>[,<paquet>…] [--contexte <texte>]
|
|
9
9
|
// grillhouse circuit <ticket> --arreter [--contexte <motif>]
|
|
10
|
+
// grillhouse circuit <ticket> --recommencer
|
|
10
11
|
//
|
|
11
12
|
// - The repository is the main tree of the working directory (git's common directory), as the
|
|
12
13
|
// worker of the project runs there; the server, TEMPORAL_ADDRESS or the account's.
|
|
@@ -16,10 +17,15 @@
|
|
|
16
17
|
// A ticket the circuit could not run is refused before, by its name (scripts/depart-du-ticket.mjs:
|
|
17
18
|
// unreadable, without its section « ## Architecture », a title that names no component, or a
|
|
18
19
|
// component the repository does not hold); so is a ticket whose circuit runs (`--arreter` stops
|
|
19
|
-
// it), and one stopped on the supervisor's word (`--reprendre` or `--
|
|
20
|
+
// it), and one stopped on the supervisor's word (`--reprendre`, `--depuis` or `--recommencer`
|
|
21
|
+
// reopens it).
|
|
20
22
|
// - `--reprendre`, `--depuis` and `--etendre` answer the stop of the circuit (the updates of its
|
|
21
23
|
// workflow, or a new workflow on the state a stopped one gave back), `--arreter` stops it (its
|
|
22
24
|
// signal); a package of `--etendre` the repository does not hold is refused before, by its name; `--contexte` gives the supervisor's text to each, and `--depuis` requires it.
|
|
25
|
+
// - `--recommencer` starts a stopped circuit over, as a reset of Temporal: its copy (with any work
|
|
26
|
+
// it carries), its sheets and its journal are removed, then the ticket goes in the queue and its
|
|
27
|
+
// circuit starts from the testwriter in a fresh copy; the ticket, its plan and its comments stay.
|
|
28
|
+
// A circuit that runs is refused; it goes alone (./appel.ts).
|
|
23
29
|
// - Each writes one line on the standard output, exit 0. A malformed call writes the usage, a
|
|
24
30
|
// refusal (`ReponseRefusee`, the ticket refused) its reason, on the error stream, exit 2. A
|
|
25
31
|
// server that does not answer, or Beads that fails, is said on the error stream, exit 1.
|
|
@@ -27,89 +33,14 @@ import { spawnSync } from 'node:child_process';
|
|
|
27
33
|
import path from 'node:path';
|
|
28
34
|
import { WorkflowNotFoundError } from '@temporalio/client';
|
|
29
35
|
import { DepartRefuse, ticketAuLancement } from '../../../scripts/depart-du-ticket.mjs';
|
|
36
|
+
import { retirerLaCopieDuTicket } from '../../../scripts/recommencer.mjs';
|
|
30
37
|
import { sansReponseEn } from '../../../scripts/sans-reponse.mjs';
|
|
31
38
|
import { DELAI_JOIGNABLE_MS, adresseDuServeur, ouvrirLeClient, serveurJoignable, } from '../client.js';
|
|
32
39
|
import { fileDuProjet } from '../installation.js';
|
|
33
40
|
import { demarrerLesTickets } from '../tickets/client.js';
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
|
|
37
|
-
'--depuis <testwriter|preuve|developpeur|controles|passe-finale> --contexte <texte> | ' +
|
|
38
|
-
'--etendre <paquet>[,<paquet>…] [--contexte <texte>] | --arreter [--contexte <motif>]]\n';
|
|
39
|
-
/** A malformed call, by its reason. */
|
|
40
|
-
class Usage extends Error {
|
|
41
|
-
}
|
|
42
|
-
/** The call <argv> read, or a Usage, by the rules of the circuit's options. */
|
|
43
|
-
function lireLAppel(argv) {
|
|
44
|
-
let ticket = null;
|
|
45
|
-
const o = {
|
|
46
|
-
reprendre: false,
|
|
47
|
-
depuis: null,
|
|
48
|
-
etendre: null,
|
|
49
|
-
arreter: false,
|
|
50
|
-
contexte: null,
|
|
51
|
-
};
|
|
52
|
-
for (let i = 0; i < argv.length; i++) {
|
|
53
|
-
const a = argv[i];
|
|
54
|
-
const suivant = argv[i + 1];
|
|
55
|
-
if (a === '--reprendre') {
|
|
56
|
-
o.reprendre = true;
|
|
57
|
-
}
|
|
58
|
-
else if (a === '--arreter') {
|
|
59
|
-
o.arreter = true;
|
|
60
|
-
}
|
|
61
|
-
else if (a === '--etendre') {
|
|
62
|
-
const liste = String(suivant ?? '')
|
|
63
|
-
.split(',')
|
|
64
|
-
.map(c => c.trim())
|
|
65
|
-
.filter(Boolean);
|
|
66
|
-
if (!liste.length || suivant.startsWith('-')) {
|
|
67
|
-
throw new Usage('--etendre attend les paquets que le plan gagne.');
|
|
68
|
-
}
|
|
69
|
-
o.etendre = liste;
|
|
70
|
-
i++;
|
|
71
|
-
}
|
|
72
|
-
else if (a === '--depuis') {
|
|
73
|
-
if (!ETAPES_DE_REPRISE.includes(suivant)) {
|
|
74
|
-
throw new Usage(`--depuis attend une étape du ticket : ${ETAPES_DE_REPRISE.join(', ')}.`);
|
|
75
|
-
}
|
|
76
|
-
o.depuis = suivant;
|
|
77
|
-
i++;
|
|
78
|
-
}
|
|
79
|
-
else if (a === '--contexte') {
|
|
80
|
-
if (suivant === undefined) {
|
|
81
|
-
throw new Usage('--contexte attend son texte.');
|
|
82
|
-
}
|
|
83
|
-
o.contexte = suivant;
|
|
84
|
-
i++;
|
|
85
|
-
}
|
|
86
|
-
else if (a.startsWith('-')) {
|
|
87
|
-
throw new Usage(`option inconnue : ${a}`);
|
|
88
|
-
}
|
|
89
|
-
else if (ticket) {
|
|
90
|
-
throw new Usage(`un seul ticket : ${ticket}, puis ${a}.`);
|
|
91
|
-
}
|
|
92
|
-
else {
|
|
93
|
-
ticket = a;
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
if (!ticket) {
|
|
97
|
-
throw new Usage('le ticket manque.');
|
|
98
|
-
}
|
|
99
|
-
if (o.depuis && o.reprendre) {
|
|
100
|
-
throw new Usage('--depuis et --reprendre ne vont pas ensemble.');
|
|
101
|
-
}
|
|
102
|
-
if (o.depuis && o.contexte === null) {
|
|
103
|
-
throw new Usage('--depuis attend son --contexte : la tâche de chaque agent du lot.');
|
|
104
|
-
}
|
|
105
|
-
if (o.etendre && (o.reprendre || o.depuis || o.arreter)) {
|
|
106
|
-
throw new Usage('--etendre va seule, avec son --contexte : le circuit reprend sur le plan étendu.');
|
|
107
|
-
}
|
|
108
|
-
if (o.arreter && (o.reprendre || o.depuis)) {
|
|
109
|
-
throw new Usage('--arreter va seule, son motif en --contexte.');
|
|
110
|
-
}
|
|
111
|
-
return { ticket, ...o };
|
|
112
|
-
}
|
|
41
|
+
import { USAGE, Usage, lireLAppel, refusDuLancementApresArret } from './appel.js';
|
|
42
|
+
import { arreterLeCircuit, etendreLeCircuit, recommencerLeCircuit, reprendreDepuis, reprendreLeCircuit, ReponseRefusee, } from './client.js';
|
|
43
|
+
import { idDuCircuit } from './contrat.js';
|
|
113
44
|
// The main tree of the repository of the working directory, from git's common directory.
|
|
114
45
|
function arbrePrincipal() {
|
|
115
46
|
const r = spawnSync('git', ['rev-parse', '--path-format=absolute', '--git-common-dir'], {
|
|
@@ -144,8 +75,10 @@ function aLaPorte(f) {
|
|
|
144
75
|
// The supervisor's session that runs the command (Claude Code's `CLAUDE_CODE_SESSION_ID`), which the
|
|
145
76
|
// circuit's stop gone up keeps (`EntreeDuCircuit.superviseur`); null out of a session.
|
|
146
77
|
const seanceDuSuperviseur = () => process.env.CLAUDE_CODE_SESSION_ID || null;
|
|
147
|
-
// The ticket <ticket> of <racine> put in the queue of the tickets of the project: its line.
|
|
148
|
-
|
|
78
|
+
// The ticket <ticket> of <racine> put in the queue of the tickets of the project: its line. With
|
|
79
|
+
// <recommence>, its circuit stopped on the supervisor's word was just started over: that stop no
|
|
80
|
+
// longer refuses the launch.
|
|
81
|
+
async function mettreEnFile(client, racine, ticket, recommence = false) {
|
|
149
82
|
aLaPorte(() => ticketAuLancement(racine, ticket));
|
|
150
83
|
try {
|
|
151
84
|
const d = await client.workflow.getHandle(idDuCircuit(racine, ticket)).describe();
|
|
@@ -153,8 +86,8 @@ async function mettreEnFile(client, racine, ticket) {
|
|
|
153
86
|
throw new ReponseRefusee(`un circuit tourne déjà sur ${ticket} : il mène le ticket à sa fin, \`--arreter\` l'arrête.`);
|
|
154
87
|
}
|
|
155
88
|
const fin = (await client.workflow.getHandle(idDuCircuit(racine, ticket)).result());
|
|
156
|
-
if (fin?.raison === 'arrete') {
|
|
157
|
-
throw new ReponseRefusee(
|
|
89
|
+
if (fin?.raison === 'arrete' && !recommence) {
|
|
90
|
+
throw new ReponseRefusee(refusDuLancementApresArret(ticket));
|
|
158
91
|
}
|
|
159
92
|
}
|
|
160
93
|
catch (x) {
|
|
@@ -208,9 +141,16 @@ async function principal(argv) {
|
|
|
208
141
|
const c = ouvrirLeClient();
|
|
209
142
|
try {
|
|
210
143
|
const repond = appel.reprendre || appel.depuis || appel.etendre || appel.arreter;
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
144
|
+
let ligne;
|
|
145
|
+
if (appel.recommencer) {
|
|
146
|
+
const retiree = await recommencerLeCircuit(c.client, racine, appel.ticket, retirerLaCopieDuTicket);
|
|
147
|
+
ligne = `${retiree} ; ${await mettreEnFile(c.client, racine, appel.ticket, true)}`;
|
|
148
|
+
}
|
|
149
|
+
else {
|
|
150
|
+
ligne = repond
|
|
151
|
+
? await repondre(c.client, racine, appel)
|
|
152
|
+
: await mettreEnFile(c.client, racine, appel.ticket);
|
|
153
|
+
}
|
|
214
154
|
process.stdout.write(`${ligne}\n`);
|
|
215
155
|
return 0;
|
|
216
156
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"commande.js","sourceRoot":"","sources":["../../../src/temporal/circuit/commande.ts"],"names":[],"mappings":";AACA,gGAAgG;AAChG,2CAA2C;AAC3C,EAAE;AACF,8FAA8F;AAC9F,iEAAiE;AACjE,qFAAqF;AACrF,oFAAoF;AACpF,+DAA+D;AAC/D,EAAE;AACF,8FAA8F;AAC9F,qFAAqF;AACrF,kGAAkG;AAClG,+FAA+F;AAC/F,mGAAmG;AACnG,qGAAqG;AACrG,+FAA+F;AAC/F,kGAAkG;AAClG,
|
|
1
|
+
{"version":3,"file":"commande.js","sourceRoot":"","sources":["../../../src/temporal/circuit/commande.ts"],"names":[],"mappings":";AACA,gGAAgG;AAChG,2CAA2C;AAC3C,EAAE;AACF,8FAA8F;AAC9F,iEAAiE;AACjE,qFAAqF;AACrF,oFAAoF;AACpF,+DAA+D;AAC/D,8CAA8C;AAC9C,EAAE;AACF,8FAA8F;AAC9F,qFAAqF;AACrF,kGAAkG;AAClG,+FAA+F;AAC/F,mGAAmG;AACnG,qGAAqG;AACrG,+FAA+F;AAC/F,kGAAkG;AAClG,gGAAgG;AAChG,iBAAiB;AACjB,iGAAiG;AACjG,iGAAiG;AACjG,iLAAiL;AACjL,mGAAmG;AACnG,mGAAmG;AACnG,oGAAoG;AACpG,gEAAgE;AAChE,8FAA8F;AAC9F,8FAA8F;AAC9F,2FAA2F;AAC3F,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAC;AACxF,OAAO,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAC1E,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAClE,OAAO,EACL,kBAAkB,EAClB,gBAAgB,EAChB,cAAc,EACd,gBAAgB,GACjB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAAE,MAAM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CAAC,IAAI,CAAC,KAAK,CAAC;IAC/E,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;AAEhB,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CACnC,IAAI,CAAC,EAAE;IACL,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC;AAC1B,CAAC,EACD,CAAC,CAAU,EAAE,EAAE;IACb,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,0BAA0B,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;IAC/D,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;AACvB,CAAC,CACF,CAAC"}
|
|
@@ -6,6 +6,8 @@ export declare const CIRCUIT = "circuitDuTicket";
|
|
|
6
6
|
export declare const idDuCircuit: (racine: string, ticket: string) => string;
|
|
7
7
|
/** The update that resumes a stopped circuit at its step (`--reprendre`). */
|
|
8
8
|
export declare const REPRENDRE = "reprendre";
|
|
9
|
+
/** The step a circuit resumed after its question publishes while it waits for its place. */
|
|
10
|
+
export declare const EN_ATTENTE_DE_PLACE = "attend-une-place";
|
|
9
11
|
/** The signal that stops the circuit, its session with it (`--arreter`), wherever it stands. */
|
|
10
12
|
export declare const ARRETER = "arreter";
|
|
11
13
|
/** The update that resumes a stopped circuit from the step of an agent (`--depuis`). */
|
|
@@ -68,6 +70,16 @@ export interface ResumeDeLEtat {
|
|
|
68
70
|
boucles: Record<string, number>;
|
|
69
71
|
mene: string | null;
|
|
70
72
|
}
|
|
73
|
+
/**
|
|
74
|
+
* What the board shows of the state <e> a run wrote (the effect `etat`), published in the memo
|
|
75
|
+
* (./client.ts `lireLesCircuits` reads it): its step, its attempt, its stop and the first line of
|
|
76
|
+
* its report, the object of its questioning, its loops, the start of its step led. A run at its
|
|
77
|
+
* plan (<auPlan>, from its opening to its plan passed) stands at the step `plan`, its
|
|
78
|
+
* questioning the plan, whatever state its plan wrote last, <e> null before the first: the board
|
|
79
|
+
* places it at « 1 Plan » (scripts/etapes.mjs `etapeDuCircuit`); a stop (`raison`) stands as
|
|
80
|
+
* written.
|
|
81
|
+
*/
|
|
82
|
+
export declare function resumeDeLEtat(e: unknown, auPlan?: boolean): ResumeDeLEtat;
|
|
71
83
|
/**
|
|
72
84
|
* The whole state the circuit wrote last (the effect `etat` of scripts/circuit.mjs `ecrireEtat`):
|
|
73
85
|
* its step, its stop, its question and what the run keeps between steps. The workflow holds it,
|
|
@@ -202,6 +214,23 @@ interface Lieu {
|
|
|
202
214
|
/** The supervisor's session of the entry (`EntreeDuCircuit.superviseur`), null without one. */
|
|
203
215
|
superviseur: string | null;
|
|
204
216
|
}
|
|
217
|
+
/**
|
|
218
|
+
* The acts of a circuit's pause on a question (grillhouse-4nr.27): the size of its copy kept once
|
|
219
|
+
* (`mesurerLaCopie` of scripts/disque-des-copies.mjs), and, resumed, its place of a circuit asked
|
|
220
|
+
* again by itself (`reserverDesCircuits` of ../places/client.ts, its rank of arrival kept):
|
|
221
|
+
* whether it holds one.
|
|
222
|
+
*/
|
|
223
|
+
export interface ActivitesDeLaPause {
|
|
224
|
+
mesurerLaCopieDuTicket(e: {
|
|
225
|
+
racine: string;
|
|
226
|
+
ticket: string;
|
|
227
|
+
}): Promise<number | null>;
|
|
228
|
+
reprendreUnePlace(e: {
|
|
229
|
+
racine: string;
|
|
230
|
+
ticket: string;
|
|
231
|
+
rang: number | null;
|
|
232
|
+
}): Promise<boolean>;
|
|
233
|
+
}
|
|
205
234
|
export interface Activites {
|
|
206
235
|
/**
|
|
207
236
|
* Opens a run of the circuit, as `npx grillhouse circuit` does: its first launch (<reponse>
|
|
@@ -9,6 +9,8 @@ export const CIRCUIT = 'circuitDuTicket';
|
|
|
9
9
|
export const idDuCircuit = (racine, ticket) => `circuit:${racine}:${ticket}`;
|
|
10
10
|
/** The update that resumes a stopped circuit at its step (`--reprendre`). */
|
|
11
11
|
export const REPRENDRE = 'reprendre';
|
|
12
|
+
/** The step a circuit resumed after its question publishes while it waits for its place. */
|
|
13
|
+
export const EN_ATTENTE_DE_PLACE = 'attend-une-place';
|
|
12
14
|
/** The signal that stops the circuit, its session with it (`--arreter`), wherever it stands. */
|
|
13
15
|
export const ARRETER = 'arreter';
|
|
14
16
|
/** The update that resumes a stopped circuit from the step of an agent (`--depuis`). */
|
|
@@ -27,4 +29,35 @@ export const ETAPES_DE_REPRISE = [
|
|
|
27
29
|
'controles',
|
|
28
30
|
'passe-finale',
|
|
29
31
|
];
|
|
32
|
+
/**
|
|
33
|
+
* What the board shows of the state <e> a run wrote (the effect `etat`), published in the memo
|
|
34
|
+
* (./client.ts `lireLesCircuits` reads it): its step, its attempt, its stop and the first line of
|
|
35
|
+
* its report, the object of its questioning, its loops, the start of its step led. A run at its
|
|
36
|
+
* plan (<auPlan>, from its opening to its plan passed) stands at the step `plan`, its
|
|
37
|
+
* questioning the plan, whatever state its plan wrote last, <e> null before the first: the board
|
|
38
|
+
* places it at « 1 Plan » (scripts/etapes.mjs `etapeDuCircuit`); a stop (`raison`) stands as
|
|
39
|
+
* written.
|
|
40
|
+
*/
|
|
41
|
+
export function resumeDeLEtat(e, auPlan = false) {
|
|
42
|
+
const x = (e ?? {});
|
|
43
|
+
const rapport = typeof x.rapport === 'string' ? x.rapport : '';
|
|
44
|
+
const objet = x.questionnement?.objet;
|
|
45
|
+
const resume = {
|
|
46
|
+
etape: typeof x.etape === 'string' ? x.etape : null,
|
|
47
|
+
tentative: typeof x.tentative === 'number' ? x.tentative : null,
|
|
48
|
+
finale: x.finale === true,
|
|
49
|
+
code: typeof x.code === 'number' ? x.code : null,
|
|
50
|
+
raison: typeof x.raison === 'string' ? x.raison : null,
|
|
51
|
+
rapport: rapport
|
|
52
|
+
.split('\n')
|
|
53
|
+
.map(l => l.trim())
|
|
54
|
+
.find(Boolean) ?? null,
|
|
55
|
+
questionnement: typeof objet === 'string' ? objet : null,
|
|
56
|
+
boucles: x.boucles && typeof x.boucles === 'object' ? x.boucles : {},
|
|
57
|
+
mene: typeof x.mene === 'string' ? x.mene : null,
|
|
58
|
+
};
|
|
59
|
+
return auPlan && resume.raison === null
|
|
60
|
+
? { ...resume, etape: 'plan', tentative: 1, finale: false, questionnement: 'plan' }
|
|
61
|
+
: resume;
|
|
62
|
+
}
|
|
30
63
|
//# sourceMappingURL=contrat.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contrat.js","sourceRoot":"","sources":["../../../src/temporal/circuit/contrat.ts"],"names":[],"mappings":"AAAA,iGAAiG;AACjG,6FAA6F;AAC7F,+FAA+F;AAC/F,4BAA4B;AAC5B,wFAAwF;AAKxF,2BAA2B;AAC3B,MAAM,CAAC,MAAM,OAAO,GAAG,iBAAiB,CAAC;AACzC,mFAAmF;AACnF,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,MAAc,EAAE,MAAc,EAAE,EAAE,CAAC,WAAW,MAAM,IAAI,MAAM,EAAE,CAAC;AAE7F,6EAA6E;AAC7E,MAAM,CAAC,MAAM,SAAS,GAAG,WAAW,CAAC;AACrC,gGAAgG;AAChG,MAAM,CAAC,MAAM,OAAO,GAAG,SAAS,CAAC;AACjC,wFAAwF;AACxF,MAAM,CAAC,MAAM,MAAM,GAAG,QAAQ,CAAC;AAC/B,4FAA4F;AAC5F,MAAM,CAAC,MAAM,OAAO,GAAG,SAAS,CAAC;AACjC,gGAAgG;AAChG,MAAM,CAAC,MAAM,mBAAmB,GAAG,mBAAmB,CAAC;AACvD,6CAA6C;AAC7C,MAAM,CAAC,MAAM,MAAM,GAAG,eAAe,CAAC;AAEtC,qGAAqG;AACrG,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,YAAY;IACZ,QAAQ;IACR,aAAa;IACb,WAAW;IACX,cAAc;CACN,CAAC"}
|
|
1
|
+
{"version":3,"file":"contrat.js","sourceRoot":"","sources":["../../../src/temporal/circuit/contrat.ts"],"names":[],"mappings":"AAAA,iGAAiG;AACjG,6FAA6F;AAC7F,+FAA+F;AAC/F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10
10
|
// fails is the stop « inattendu » at the step it fell, its question awaited; when the act of the
|
|
11
11
|
// stop fails too, the stop stands in the memo alone (scripts/transitions.mjs `arretSansActe`). A « a-repasser » (75)
|
|
12
12
|
// plays again by itself after `repasserMs` (10 min), `repassesMax` times (6) in a row, then its
|
|
13
|
-
// question goes up (decision D4)
|
|
13
|
+
// question goes up (decision D4); one that is a wait for a place, the lock or room plays again at
|
|
14
|
+
// once, without limit, never a question. The effects a step decided before a fact that fails are written
|
|
14
15
|
// before its stop (scripts/transitions.mjs gives them with each fact it asks for). The step and the
|
|
15
16
|
// question are a search attribute and the memo, which the board reads from the server alone; past
|
|
16
17
|
// its length of history, the workflow continues as new at a step's start. At its step 5.2, the
|
|
@@ -20,10 +21,10 @@
|
|
|
20
21
|
// a ticket closed is the queue's end. Deterministic: it imports the workflow API, the search
|
|
21
22
|
// attributes, the contracts, the workflows of the queue and the pure decisions.
|
|
22
23
|
import { ActivityCancellationType, ApplicationFailure, allHandlersFinished, CancellationScope, condition, defineQuery, defineSignal, defineUpdate, isCancellation, makeContinueAsNewFunc, patched, proxyActivities, setHandler, upsertMemo, upsertSearchAttributes, workflowInfo, } from '@temporalio/workflow';
|
|
23
|
-
import { arretSansActe, effetsAJouer, pasDuPlan, transition, } from '../../../scripts/transitions.mjs';
|
|
24
|
+
import { arretSansActe, AU_PLAN, effetsAJouer, etatDeReprise, pasDuPlan, transition, } from '../../../scripts/transitions.mjs';
|
|
24
25
|
import { ATTRIBUT_ETAPE, ATTRIBUT_TICKET } from '../attributs.js';
|
|
25
26
|
import { CI_DE_LA_BRANCHE, entrerDansLaFile, issueDeLaFile, lireEtConclureLaCI, } from '../file/deroule.js';
|
|
26
|
-
import { ARRETER, DEPUIS, ETAPES_DE_REPRISE, ETENDRE, L_ETAT, REFUS_DU_VALIDATEUR, REPRENDRE, } from './contrat.js';
|
|
27
|
+
import { ARRETER, DEPUIS, ETAPES_DE_REPRISE, ETENDRE, L_ETAT, REFUS_DU_VALIDATEUR, REPRENDRE, resumeDeLEtat, EN_ATTENTE_DE_PLACE, } from './contrat.js';
|
|
27
28
|
// Every act: a session lasts 4 h at most; its heartbeat every 5 s, awaited 90 s, so that a dead
|
|
28
29
|
// worker's attempt is played again by the next worker; an act that fails is not tried again.
|
|
29
30
|
const actes = proxyActivities({
|
|
@@ -42,6 +43,11 @@ const OPTIONS_D_UN_EFFET = {
|
|
|
42
43
|
// The activity of the effect of id <activityId>, which the workflow sets.
|
|
43
44
|
const unEffet = (activityId) => proxyActivities({ ...OPTIONS_D_UN_EFFET, activityId }).jouerUnEffet;
|
|
44
45
|
// The acts of the queue the circuit plays itself at its step 5.2.
|
|
46
|
+
// The acts of the pause: a measure, a demand to the machine.
|
|
47
|
+
const actesDeLaPause = proxyActivities({
|
|
48
|
+
startToCloseTimeout: '10 minutes',
|
|
49
|
+
retry: { initialInterval: '5 seconds', maximumAttempts: 4 },
|
|
50
|
+
});
|
|
45
51
|
const actesDeLaFile = proxyActivities({
|
|
46
52
|
startToCloseTimeout: '1 minute',
|
|
47
53
|
retry: { initialInterval: '1 second', maximumAttempts: 4 },
|
|
@@ -56,6 +62,29 @@ const lEtat = defineQuery(L_ETAT);
|
|
|
56
62
|
const REPASSER_MS = 10 * 60_000;
|
|
57
63
|
const REPASSES_MAX = 6;
|
|
58
64
|
const LIMITE_D_HISTOIRE = 10_000;
|
|
65
|
+
// The patch of the state of the plan (Temporal's patching, as `CI_DE_LA_BRANCHE`,
|
|
66
|
+
// grillhouse-bf5.6): a run at its plan publishes the step `plan` from its opening (`auPlan`); a
|
|
67
|
+
// run that recorded its opening before the change replays it without the marker, its plan
|
|
68
|
+
// published as its states said.
|
|
69
|
+
const ETAT_AU_PLAN = 'etat-au-plan';
|
|
70
|
+
// The patch of the stop at the plan (grillhouse-d4n.11): a stop of a run at its plan (AU_PLAN, no
|
|
71
|
+
// step of the table of transitions) is written at the plan's state, and an answer reopens the
|
|
72
|
+
// plan from it (`etatDeReprise` of scripts/transitions.mjs); a run that recorded such a stop or
|
|
73
|
+
// opening before the change replays it at the step `plan`.
|
|
74
|
+
const REPRISE_AU_PLAN = 'reprise-au-plan';
|
|
75
|
+
// The state <e> of a stop or of a reopening as a resumption reads it, under REPRISE_AU_PLAN.
|
|
76
|
+
const aLaReprise = (e) => e.etape === AU_PLAN && patched(REPRISE_AU_PLAN) ? etatDeReprise(e) : e;
|
|
77
|
+
// The patch of the wait for a place (Temporal's patching): a « a-repasser » the checks give on a
|
|
78
|
+
// wait for a place, the lock or room at its bound (`attente`) plays again at once, without limit
|
|
79
|
+
// and without counting, as a job of Buildkite waits for an agent; a run that recorded such a stop
|
|
80
|
+
// before the change replays it as it was.
|
|
81
|
+
const ATTENTE_DE_PLACE = 'attente-de-place';
|
|
82
|
+
// The patch of the pause (grillhouse-4nr.27): a circuit stopped on a question gives its place of
|
|
83
|
+
// a circuit back, its copy measured once; resumed, it asks its place again by itself
|
|
84
|
+
// (`reserverDesCircuits`, its rank of arrival kept), the step EN_ATTENTE_DE_PLACE published,
|
|
85
|
+
// every ATTENTE_DE_PLACE_MS until it holds one, before it reopens.
|
|
86
|
+
const PAUSE_REND_SA_PLACE = 'pause-rend-sa-place';
|
|
87
|
+
const ATTENTE_DE_PLACE_MS = 60_000;
|
|
59
88
|
// The message and the stack of the failure <e> of an activity.
|
|
60
89
|
function inattendu(e) {
|
|
61
90
|
const cause = e.cause;
|
|
@@ -63,28 +92,6 @@ function inattendu(e) {
|
|
|
63
92
|
const message = d.message ?? cause?.message ?? String(e?.message ?? e);
|
|
64
93
|
return { inattendu: { message, pile: d.pile ?? null } };
|
|
65
94
|
}
|
|
66
|
-
// What the board shows of the state <e> a run wrote (the effect `etat`), published in the memo
|
|
67
|
-
// (./client.ts `lireLesCircuits` reads it): its step, its attempt, its stop and the first line of
|
|
68
|
-
// its report, the object of its questioning, its loops, the start of its step led.
|
|
69
|
-
function resumeDeLEtat(e) {
|
|
70
|
-
const x = (e ?? {});
|
|
71
|
-
const rapport = typeof x.rapport === 'string' ? x.rapport : '';
|
|
72
|
-
const objet = x.questionnement?.objet;
|
|
73
|
-
return {
|
|
74
|
-
etape: typeof x.etape === 'string' ? x.etape : null,
|
|
75
|
-
tentative: typeof x.tentative === 'number' ? x.tentative : null,
|
|
76
|
-
finale: x.finale === true,
|
|
77
|
-
code: typeof x.code === 'number' ? x.code : null,
|
|
78
|
-
raison: typeof x.raison === 'string' ? x.raison : null,
|
|
79
|
-
rapport: rapport
|
|
80
|
-
.split('\n')
|
|
81
|
-
.map(l => l.trim())
|
|
82
|
-
.find(Boolean) ?? null,
|
|
83
|
-
questionnement: typeof objet === 'string' ? objet : null,
|
|
84
|
-
boucles: x.boucles && typeof x.boucles === 'object' ? x.boucles : {},
|
|
85
|
-
mene: typeof x.mene === 'string' ? x.mene : null,
|
|
86
|
-
};
|
|
87
|
-
}
|
|
88
95
|
// The name of the stop <a>.
|
|
89
96
|
const nomDe = (a) => a.leve?.nom ?? (a.inattendu ? 'inattendu' : (a.nom ?? null));
|
|
90
97
|
/** The circuit of a ticket, from its plan to its integration or to the supervisor's stop. */
|
|
@@ -110,7 +117,7 @@ export async function circuitDuTicket(entree) {
|
|
|
110
117
|
let ouvrirSur = entree.reprise ?? null;
|
|
111
118
|
let memoire = ouverture?.memoire ?? {};
|
|
112
119
|
let etat = ouverture?.debut ?? {
|
|
113
|
-
etape:
|
|
120
|
+
etape: AU_PLAN,
|
|
114
121
|
tentative: 1,
|
|
115
122
|
rapport: null,
|
|
116
123
|
finale: false,
|
|
@@ -271,6 +278,26 @@ export async function circuitDuTicket(entree) {
|
|
|
271
278
|
memoire,
|
|
272
279
|
superviseur,
|
|
273
280
|
});
|
|
281
|
+
// Resumed after its pause: its place of a circuit asked again, every ATTENTE_DE_PLACE_MS, the
|
|
282
|
+
// step EN_ATTENTE_DE_PLACE published, which the board says « attend une place »; false when
|
|
283
|
+
// ARRETER comes meanwhile.
|
|
284
|
+
const reprendreUnePlace = async () => {
|
|
285
|
+
publier(EN_ATTENTE_DE_PLACE, null);
|
|
286
|
+
const rang = typeof memoire.rang === 'number' ? memoire.rang : null;
|
|
287
|
+
for (;;) {
|
|
288
|
+
if (arretDemande) {
|
|
289
|
+
return false;
|
|
290
|
+
}
|
|
291
|
+
if (await actesDeLaPause.reprendreUnePlace({
|
|
292
|
+
racine: entree.racine,
|
|
293
|
+
ticket: entree.ticket,
|
|
294
|
+
rang,
|
|
295
|
+
})) {
|
|
296
|
+
return true;
|
|
297
|
+
}
|
|
298
|
+
await condition(() => arretDemande !== null, ATTENTE_DE_PLACE_MS);
|
|
299
|
+
}
|
|
300
|
+
};
|
|
274
301
|
// The effects an act gave back, played one by one, each in an activity whose id the workflow
|
|
275
302
|
// sets (its rank in the run, then its sort), the key of its writing (../acte.ts
|
|
276
303
|
// `cleDeLActivite`); consecutive states are one (`effetsAJouer`). The state is no writing out of
|
|
@@ -279,11 +306,15 @@ export async function circuitDuTicket(entree) {
|
|
|
279
306
|
// summary, which the board reads (`resumeDeLEtat`). ARRETER does not cut them: they are written to their end, out of the scope
|
|
280
307
|
// it cancels, and the run stops at its next act.
|
|
281
308
|
let effetsJoues = 0;
|
|
309
|
+
// The run at its plan, from its opening to its plan passed (`ETAT_AU_PLAN`): the summary it
|
|
310
|
+
// publishes is the step `plan` (`resumeDeLEtat`), the state its plan writes (the testwriter's,
|
|
311
|
+
// where a resumption starts) kept whole in `ecrit`.
|
|
312
|
+
let auPlan = false;
|
|
282
313
|
const jouerLesEffets = (effets) => CancellationScope.nonCancellable(async () => {
|
|
283
314
|
for (const effet of effetsAJouer(effets ?? [])) {
|
|
284
315
|
if (effet.genre === 'etat') {
|
|
285
316
|
etatEcrit = effet.etat;
|
|
286
|
-
upsertMemo({ etat: resumeDeLEtat(effet.etat), ecrit: effet.etat });
|
|
317
|
+
upsertMemo({ etat: resumeDeLEtat(effet.etat, auPlan), ecrit: effet.etat });
|
|
287
318
|
continue;
|
|
288
319
|
}
|
|
289
320
|
effetsJoues += 1;
|
|
@@ -315,11 +346,29 @@ export async function circuitDuTicket(entree) {
|
|
|
315
346
|
const lesEtapes = async (marquer) => {
|
|
316
347
|
if (!ouverture) {
|
|
317
348
|
publier('ouverture', null);
|
|
318
|
-
|
|
349
|
+
// The plan published at once: at the opening of a run with no state to resume from, then at
|
|
350
|
+
// each step of the plan, before the activity whose effects come at its end.
|
|
351
|
+
auPlan = false;
|
|
352
|
+
const lePlanSePublie = patched(ETAT_AU_PLAN);
|
|
353
|
+
const publierLePlan = () => {
|
|
354
|
+
if (lePlanSePublie) {
|
|
355
|
+
auPlan = true;
|
|
356
|
+
upsertMemo({ etat: resumeDeLEtat(null, true) });
|
|
357
|
+
}
|
|
358
|
+
};
|
|
359
|
+
if (!etatEcrit) {
|
|
360
|
+
publierLePlan();
|
|
361
|
+
}
|
|
362
|
+
let o = await actes.ouvrirLeCircuit({
|
|
363
|
+
...lieu(),
|
|
364
|
+
reponse: ouvrirSur,
|
|
365
|
+
arrete: arrete && aLaReprise(arrete),
|
|
366
|
+
});
|
|
319
367
|
await jouerLesEffets(o.effets);
|
|
320
368
|
// The plan still to write: each of its steps an activity, the next decided by `pasDuPlan`.
|
|
321
369
|
while ('plan' in o) {
|
|
322
370
|
publier('plan', null);
|
|
371
|
+
publierLePlan();
|
|
323
372
|
const plan = o.plan;
|
|
324
373
|
memoire = plan.memoire;
|
|
325
374
|
o = await actes.jouerUnPasDuPlan({
|
|
@@ -330,6 +379,11 @@ export async function circuitDuTicket(entree) {
|
|
|
330
379
|
});
|
|
331
380
|
await jouerLesEffets(o.effets);
|
|
332
381
|
}
|
|
382
|
+
// The plan passed or stopped: the summary of the state it wrote last, as it stands.
|
|
383
|
+
if (auPlan && etatEcrit) {
|
|
384
|
+
upsertMemo({ etat: resumeDeLEtat(etatEcrit) });
|
|
385
|
+
}
|
|
386
|
+
auPlan = false;
|
|
333
387
|
if ('arret' in o) {
|
|
334
388
|
return { arret: o.arret };
|
|
335
389
|
}
|
|
@@ -433,6 +487,12 @@ export async function circuitDuTicket(entree) {
|
|
|
433
487
|
return { arreter: arret, etat: ecrit, menee };
|
|
434
488
|
}
|
|
435
489
|
if (d.fin) {
|
|
490
|
+
if (patched(PAUSE_REND_SA_PLACE)) {
|
|
491
|
+
await actesDeLaPause.mesurerLaCopieDuTicket({
|
|
492
|
+
racine: entree.racine,
|
|
493
|
+
ticket: entree.ticket,
|
|
494
|
+
});
|
|
495
|
+
}
|
|
436
496
|
const f = await actes.finirLeTicket({ ...lieu(), etat, paquets: ticket.paquets });
|
|
437
497
|
await jouerLesEffets(f.effets);
|
|
438
498
|
return { fin: true };
|
|
@@ -446,9 +506,11 @@ export async function circuitDuTicket(entree) {
|
|
|
446
506
|
// the memo alone (scripts/transitions.mjs `arretSansActe`); `rejoue`, a « a-repasser » played again.
|
|
447
507
|
const ecrire = async (issue) => {
|
|
448
508
|
if ('arret' in issue) {
|
|
449
|
-
return { publie: issue.arret, rejoue: false };
|
|
509
|
+
return { publie: issue.arret, rejoue: false, place: false };
|
|
450
510
|
}
|
|
451
|
-
const
|
|
511
|
+
const aRepasser = nomDe(issue.arreter) === 'a-repasser';
|
|
512
|
+
const place = aRepasser && issue.arreter.attente === true && patched(ATTENTE_DE_PLACE);
|
|
513
|
+
const rejoue = aRepasser && (place || repasses < repassesMax);
|
|
452
514
|
try {
|
|
453
515
|
const publie = await actes.publierLArret({
|
|
454
516
|
...lieu(),
|
|
@@ -459,13 +521,14 @@ export async function circuitDuTicket(entree) {
|
|
|
459
521
|
menee: issue.menee,
|
|
460
522
|
});
|
|
461
523
|
await jouerLesEffets(publie.effets);
|
|
462
|
-
return { publie, rejoue };
|
|
524
|
+
return { publie, rejoue, place };
|
|
463
525
|
}
|
|
464
526
|
catch (e) {
|
|
465
527
|
const { message } = inattendu(e).inattendu;
|
|
466
528
|
return {
|
|
467
529
|
publie: arretSansActe(issue.etat, message, `le déroulé ${workflowInfo().workflowId}`),
|
|
468
530
|
rejoue: false,
|
|
531
|
+
place: false,
|
|
469
532
|
};
|
|
470
533
|
}
|
|
471
534
|
};
|
|
@@ -500,7 +563,7 @@ export async function circuitDuTicket(entree) {
|
|
|
500
563
|
}
|
|
501
564
|
// The stop, until the supervisor's answer resumes the run: the supervisor's word ends the
|
|
502
565
|
// circuit; any other stop is written, then played again (75) or its question awaited.
|
|
503
|
-
let suite = issue;
|
|
566
|
+
let suite = 'arreter' in issue ? { ...issue, etat: aLaReprise(issue.etat) } : issue;
|
|
504
567
|
for (;;) {
|
|
505
568
|
// Set by the signal's handler, which the compiler does not follow.
|
|
506
569
|
const demande = arretDemande;
|
|
@@ -521,7 +584,10 @@ export async function circuitDuTicket(entree) {
|
|
|
521
584
|
suite = { arreter: inattendu(e), etat: a, menee: null };
|
|
522
585
|
}
|
|
523
586
|
}
|
|
524
|
-
const { publie, rejoue } = await ecrire(suite);
|
|
587
|
+
const { publie, rejoue, place } = await ecrire(suite);
|
|
588
|
+
// A stop whose question waits is a pause: the circuit gives its place of a circuit back
|
|
589
|
+
// (the queue no longer counts it), its copy measured once.
|
|
590
|
+
const enPause = !place && !rejoue && !arretDemande && patched(PAUSE_REND_SA_PLACE);
|
|
525
591
|
suite = { arret: publie };
|
|
526
592
|
// ARRETER while the stop was written.
|
|
527
593
|
if (arretDemande) {
|
|
@@ -531,7 +597,11 @@ export async function circuitDuTicket(entree) {
|
|
|
531
597
|
reponse = null;
|
|
532
598
|
attente = true;
|
|
533
599
|
publier(rejoue ? 'a-repasser' : 'question', question);
|
|
534
|
-
if (
|
|
600
|
+
if (place) {
|
|
601
|
+
// A wait for a place plays again at once: the wait itself paces it.
|
|
602
|
+
repondre({ genre: 'reprendre', contexte: null });
|
|
603
|
+
}
|
|
604
|
+
else if (rejoue) {
|
|
535
605
|
// A « a-repasser » plays again after its sleep, unless the supervisor answers before.
|
|
536
606
|
if (!(await condition(() => reponse !== null, repasserMs))) {
|
|
537
607
|
repondre({ genre: 'reprendre', contexte: null });
|
|
@@ -539,6 +609,12 @@ export async function circuitDuTicket(entree) {
|
|
|
539
609
|
repasses += 1;
|
|
540
610
|
}
|
|
541
611
|
else {
|
|
612
|
+
if (enPause) {
|
|
613
|
+
await actesDeLaPause.mesurerLaCopieDuTicket({
|
|
614
|
+
racine: entree.racine,
|
|
615
|
+
ticket: entree.ticket,
|
|
616
|
+
});
|
|
617
|
+
}
|
|
542
618
|
await condition(() => reponse !== null);
|
|
543
619
|
repasses = 0;
|
|
544
620
|
}
|
|
@@ -552,6 +628,11 @@ export async function circuitDuTicket(entree) {
|
|
|
552
628
|
if (arretDemande) {
|
|
553
629
|
continue;
|
|
554
630
|
}
|
|
631
|
+
// Resumed after its pause, it asks its place again before it reopens; ARRETER meanwhile
|
|
632
|
+
// stops it.
|
|
633
|
+
if (enPause && !(await reprendreUnePlace())) {
|
|
634
|
+
continue;
|
|
635
|
+
}
|
|
555
636
|
arrete = { ...publie.etat, question: publie.question };
|
|
556
637
|
ouvrirSur = r;
|
|
557
638
|
reprend = r?.genre === 'reprendre' || r?.genre === 'etendre';
|