@roomi-fields/grillhouse 0.37.0 → 0.38.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 +28 -0
- package/charte.md +8 -1
- package/dist/temporal/circuit/activites.js +4 -1
- package/dist/temporal/circuit/activites.js.map +1 -1
- package/dist/temporal/places/contrat.d.ts +2 -0
- package/dist/temporal/tickets/activites.js +7 -2
- package/dist/temporal/tickets/activites.js.map +1 -1
- package/docs/ARCHITECTURE.md +7 -2
- package/docs/INTERFACE.md +8 -3
- package/hooks/register.tsx +95 -78
- package/package.json +1 -1
- package/scripts/activites.mjs +54 -13
- package/scripts/circuit.mjs +16 -5
- package/scripts/circuits-cles.d.mts +3 -0
- package/scripts/circuits-cles.mjs +20 -0
- package/scripts/composition-des-langages.mjs +1 -0
- package/scripts/dependances-internes.mjs +9 -2
- package/scripts/donnees-cles.mjs +0 -1
- package/scripts/enveloppe/enveloppe.mjs +1 -1
- package/scripts/file-des-tickets.d.mts +6 -0
- package/scripts/file-des-tickets.mjs +30 -4
- package/scripts/grillhouse-maj.mjs +4 -3
- package/scripts/groupe-cles.mjs +4 -2
- package/scripts/integration/integrer.mjs +31 -16
- package/scripts/jointure.d.ts +9 -0
- package/scripts/langages/cargo/index.mjs +2 -1
- package/scripts/langages/cargo/verdict.mjs +14 -0
- package/scripts/langages/python/index.mjs +2 -0
- package/scripts/langages/typescript/code-mort.mjs +59 -9
- package/scripts/langages/typescript/index.mjs +7 -4
- package/scripts/langages/typescript/vitest-config/base.mjs +3 -0
- package/scripts/langages/typescript/vitest.nuit.config.mjs +1 -0
- package/scripts/ligne-etat/ligne-etat.mjs +20 -4
- package/scripts/nuit.sh +6 -3
- package/scripts/prefixe-des-tickets.mjs +12 -0
- package/scripts/regles-des-places.d.mts +4 -0
- package/scripts/regles-des-places.mjs +11 -2
- package/scripts/services-du-noyau.mjs +1 -0
- package/scripts/suiveur.mjs +362 -0
- package/scripts/tableau.mjs +110 -75
- package/scripts/ticket.sh +4 -2
- package/scripts/transitions.d.mts +2 -0
- package/scripts/transitions.mjs +38 -4
- package/scripts/un-commit-par-ticket.mjs +21 -24
- package/skills/pitmaster/SKILL.md +9 -0
package/scripts/ticket.sh
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
# « 020-loader, 050-emitter ».
|
|
6
6
|
# Un corps @<fichier> se lit dans ce fichier. L'étiquette vaut a-valider par défaut ;
|
|
7
7
|
# decouverte crée le ticket fermé (« découverte consignée »).
|
|
8
|
-
# Le numéro est l'id sans le préfixe entier du projet (
|
|
8
|
+
# Le numéro est l'id sans le préfixe entier du projet (la clé issue-prefix de .beads/config.yaml).
|
|
9
9
|
set -eu
|
|
10
10
|
if [ $# -lt 4 ]; then
|
|
11
11
|
sed -n '2,9p' "$0" >&2
|
|
@@ -17,7 +17,9 @@ case "$corps" in
|
|
|
17
17
|
@*) source_corps=(--body-file "${corps#@}") ;;
|
|
18
18
|
*) source_corps=(-d "$corps") ;;
|
|
19
19
|
esac
|
|
20
|
+
ici="$(cd "$(dirname "$0")" && pwd)"
|
|
21
|
+
prefixe="$(node "$ici/prefixe-des-tickets.mjs" "$PWD")" || exit 1
|
|
20
22
|
n=$(bd create "$sujet" --parent "$mere" --no-inherit-labels -t task -l "$etiquette" "${source_corps[@]}" --silent)
|
|
21
|
-
bd update "$n" --title "${n#"$
|
|
23
|
+
bd update "$n" --title "${n#"$prefixe"-} — $sujet — $composants" >/dev/null
|
|
22
24
|
[ "$etiquette" = decouverte ] && bd close "$n" -r "découverte consignée" >/dev/null
|
|
23
25
|
echo "$n"
|
|
@@ -116,6 +116,8 @@ export const TRI: string;
|
|
|
116
116
|
export const RELANCES_TESTWRITER: number;
|
|
117
117
|
export const SEANCES_DEVELOPPEUR: number;
|
|
118
118
|
export const RELECTURES: number;
|
|
119
|
+
/** The bound of the ACCEPTÉ ↔ final pass cycle before the circuit goes up to the supervisor. */
|
|
120
|
+
export const TOURS_DE_LA_PASSE_FINALE: number;
|
|
119
121
|
|
|
120
122
|
/** What changed for a developpeur relaunched on the integration's refusal of his lot unchanged. */
|
|
121
123
|
export const CHANGE_DU_REFUS: string;
|
package/scripts/transitions.mjs
CHANGED
|
@@ -9,7 +9,8 @@
|
|
|
9
9
|
//
|
|
10
10
|
// - `etat`, the run at its step: `{ etape, tentative, rapport, finale, relanceSurLeRefus }`;
|
|
11
11
|
// - `memoire`, what the circuit keeps between steps (`controlesRouges`, `renvoiAuTestwriter`,
|
|
12
|
-
// `refus`, `rienALivrer`, `regeneration`, `regenereSur`, `aRegenerer`, `verifie`,
|
|
12
|
+
// `refus`, `rienALivrer`, `regeneration`, `regenereSur`, `aRegenerer`, `verifie`,
|
|
13
|
+
// `toursDeLaPasseFinale`, `constats`);
|
|
13
14
|
// - `ticket`, `{ id, paquets, sorte, copie }`;
|
|
14
15
|
// - `reprend`, whether this step is the first of a `--reprendre`;
|
|
15
16
|
// - `faits`, the facts read for this step, by their name.
|
|
@@ -52,6 +53,11 @@ export const [
|
|
|
52
53
|
export const RELANCES_TESTWRITER = boucle('tests').max - 1;
|
|
53
54
|
export const SEANCES_DEVELOPPEUR = boucle('code').max;
|
|
54
55
|
export const RELECTURES = boucle('relecture').max;
|
|
56
|
+
// The tours of the cycle ACCEPTÉ → final pass → review the circuit plays before it stops on a
|
|
57
|
+
// question: a lot whose tree never settles between the final pass and the review (a
|
|
58
|
+
// non-deterministic build artifact of the copy, a build output no task declares) would replay
|
|
59
|
+
// the pass and the reviewer without end, so after this many the circuit goes up to the supervisor.
|
|
60
|
+
export const TOURS_DE_LA_PASSE_FINALE = 2;
|
|
55
61
|
|
|
56
62
|
// What changed for a developpeur relaunched on the integration's refusal of the lot he left as it was.
|
|
57
63
|
export const CHANGE_DU_REFUS =
|
|
@@ -1097,13 +1103,37 @@ function decider({ etat, memoire = {}, ticket, reprend = false }, lire, partiel)
|
|
|
1097
1103
|
// The review that accepts the lot closes every finding, each one it judged lifted
|
|
1098
1104
|
// (`suiviDesConstats`).
|
|
1099
1105
|
maj.constats = [];
|
|
1100
|
-
|
|
1106
|
+
// A green final pass stands behind this lot (`verifie`, set by the pass that routed to this
|
|
1107
|
+
// review, with no session changing the copy since): the reviewer accepted the lot the final
|
|
1108
|
+
// pass verified, so it goes to the integration, as a merge queue merges the commit it tested
|
|
1109
|
+
// (bors, Zuul). The decision reads `verifie` as that fact, never re-hashing the live working
|
|
1110
|
+
// tree, whose non-deterministic build artifact would differ between the pass and the review
|
|
1111
|
+
// and keep the lot out of the integration for ever. A lot the review kept none of (`!v.arbre`,
|
|
1112
|
+
// git could not commit it) goes there too.
|
|
1113
|
+
if (!v.arbre || m('verifie')) {
|
|
1114
|
+
maj.toursDeLaPasseFinale = null;
|
|
1101
1115
|
commenter('relecture', 'ACCEPTÉ ; le lot va à l’intégration.');
|
|
1102
1116
|
etape = INTEGRATION;
|
|
1103
1117
|
return decision();
|
|
1104
1118
|
}
|
|
1105
|
-
//
|
|
1106
|
-
// integration.
|
|
1119
|
+
// No final pass has verified this lot (a resumption, or git could not hash the copy): its
|
|
1120
|
+
// band plays once, then the integration. The cycle is bounded — after
|
|
1121
|
+
// `TOURS_DE_LA_PASSE_FINALE` tours without reaching the integration, the circuit stops on a
|
|
1122
|
+
// question to the supervisor naming the probable cause, instead of replaying the pass and the
|
|
1123
|
+
// reviewer without end.
|
|
1124
|
+
const tours = (m('toursDeLaPasseFinale') ?? 0) + 1;
|
|
1125
|
+
if (tours > TOURS_DE_LA_PASSE_FINALE) {
|
|
1126
|
+
return arreter(
|
|
1127
|
+
'relecture-arret',
|
|
1128
|
+
`Le relecteur rend ACCEPTÉ, mais ${TOURS_DE_LA_PASSE_FINALE} passes finales n’ont pas mené le lot à l’intégration : l’arbre de la copie ne se stabilise pas entre la passe finale et la relecture.\n\nLe verdict :\n\n${v.texte}`,
|
|
1129
|
+
{
|
|
1130
|
+
piece: v.fiche.piece,
|
|
1131
|
+
question:
|
|
1132
|
+
'Un artefact de construction non déterministe dans la copie, ou une sortie de construction qu’aucune tâche ne déclare, empêche l’arbre de la copie de se stabiliser entre la passe finale et la relecture : qu’est-ce qui le déstabilise, et se lève-t-il pour reprendre ?',
|
|
1133
|
+
}
|
|
1134
|
+
);
|
|
1135
|
+
}
|
|
1136
|
+
maj.toursDeLaPasseFinale = tours;
|
|
1107
1137
|
commenter(
|
|
1108
1138
|
'relecture',
|
|
1109
1139
|
'ACCEPTÉ ; la passe finale sur la bande du lot (sa base et ses dépendants), qui n’a pas joué sur ce lot, puis l’intégration.'
|
|
@@ -1149,6 +1179,10 @@ function decider({ etat, memoire = {}, ticket, reprend = false }, lire, partiel)
|
|
|
1149
1179
|
tentative = 1;
|
|
1150
1180
|
rapport = null;
|
|
1151
1181
|
finale = false;
|
|
1182
|
+
// Relaunching a role reworks the lot: its earlier final pass no longer verifies it, and the
|
|
1183
|
+
// tours of the ACCEPTÉ ↔ final pass cycle start over.
|
|
1184
|
+
maj.verifie = null;
|
|
1185
|
+
maj.toursDeLaPasseFinale = null;
|
|
1152
1186
|
commenter(
|
|
1153
1187
|
'relecture',
|
|
1154
1188
|
`RENDU (relecture ${rendus}) ; le circuit relance ${auTestwriter ? 'le testwriter' : 'le développeur'}, ses ${lus.constats.length} constat(s) ouvert(s) dans la consigne de chaque séance, puis la passe finale sur la bande du lot (sa base et ses dépendants), et le relecteur sur la différence.`
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
// The title line of a message is its first line that is neither blank nor a comment (a line
|
|
14
14
|
// starting with `#`); in the history it is the first line of the commit message.
|
|
15
15
|
// - The tickets are the words `<prefix>-<id>` of the title line that Beads knows, the prefix read
|
|
16
|
-
// from
|
|
16
|
+
// from the key `issue-prefix` of `.beads/config.yaml` (`prefixe`; a missing key is refused): as Jira's smart commits and GitHub's « fixes #12 »
|
|
17
17
|
// link a commit to an existing key alone, a word of that shape Beads does not know (a package
|
|
18
18
|
// `grillhouse-essais` in the frame's repository) is text. Beads knows an id when
|
|
19
19
|
// `bd show <id> --json` lists a ticket of that exact id, and does not when it answers a JSON
|
|
@@ -35,6 +35,7 @@
|
|
|
35
35
|
import { execFileSync } from 'node:child_process';
|
|
36
36
|
import { readFileSync } from 'node:fs';
|
|
37
37
|
import { pathToFileURL } from 'node:url';
|
|
38
|
+
import { prefixe } from './prefixe-des-tickets.mjs';
|
|
38
39
|
|
|
39
40
|
const escape = s => s.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
40
41
|
|
|
@@ -83,18 +84,6 @@ export function refusal(message, prefix, commitsOf, isOpen = () => false, isKnow
|
|
|
83
84
|
return null;
|
|
84
85
|
}
|
|
85
86
|
|
|
86
|
-
function prefixe() {
|
|
87
|
-
try {
|
|
88
|
-
return execFileSync('bd', ['config', 'get', 'issue_prefix'], {
|
|
89
|
-
encoding: 'utf8',
|
|
90
|
-
stdio: 'pipe',
|
|
91
|
-
maxBuffer: 256 * 1024 * 1024,
|
|
92
|
-
}).trim();
|
|
93
|
-
} catch {
|
|
94
|
-
return '';
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
|
|
98
87
|
// What Beads answers on the id (`bd show <id> --json`): `{ status }` when it knows the id (a ticket
|
|
99
88
|
// of that exact id in its array; `status` undefined when unreadable), `'unknown'` when it answers
|
|
100
89
|
// a JSON error (no such ticket), `null` when it does not answer (no `bd`, no database, an answer
|
|
@@ -261,16 +250,24 @@ export function controle(message, prefix, commitsOf, answer) {
|
|
|
261
250
|
}
|
|
262
251
|
|
|
263
252
|
if (import.meta.url === pathToFileURL(process.argv[1] ?? '').href) {
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
)
|
|
272
|
-
|
|
273
|
-
|
|
253
|
+
let prefix = null;
|
|
254
|
+
try {
|
|
255
|
+
prefix = prefixe(process.cwd());
|
|
256
|
+
} catch (e) {
|
|
257
|
+
process.stderr.write(`⛔ ${e.message}\n`);
|
|
258
|
+
process.exitCode = 1;
|
|
259
|
+
}
|
|
260
|
+
if (prefix !== null) {
|
|
261
|
+
const log = gitLog(process.cwd());
|
|
262
|
+
const { lignes, code } = controle(
|
|
263
|
+
readFileSync(process.argv[2], 'utf8'),
|
|
264
|
+
prefix,
|
|
265
|
+
id => commitsDelivering(id, prefix, log),
|
|
266
|
+
beads
|
|
267
|
+
);
|
|
268
|
+
for (const l of lignes) {
|
|
269
|
+
process.stderr.write(`${l}\n`);
|
|
270
|
+
}
|
|
271
|
+
process.exitCode = code;
|
|
274
272
|
}
|
|
275
|
-
process.exitCode = code;
|
|
276
273
|
}
|
|
@@ -109,6 +109,15 @@ nomme le responsable, ce qui décide, les documents qu'il valide et les commande
|
|
|
109
109
|
étape joue une fois pour tout le ticket, dans l'enveloppe de tous les paquets du plan ; je dis
|
|
110
110
|
où en est un ticket par son étape, « 3 Code » ; son en-tête dit ses arrêts et leurs codes. Ainsi
|
|
111
111
|
les gestes mécaniques passent à une commande, et je garde la vue d'ensemble.
|
|
112
|
+
- **La file démarre les tickets prêts d'elle-même** : la file d'un projet est un workflow qui
|
|
113
|
+
tourne en continu, réveillé toutes les 60 s et à chaque fin de circuit. Un ticket ouvert,
|
|
114
|
+
étiqueté `circuit`, avec sa section « ## Architecture » et ses dépendances fermées part tout
|
|
115
|
+
seul, par priorité Beads — je n'ai pas à relancer `grillhouse circuit` pour lui. La clé
|
|
116
|
+
`grillhouse.circuits` (défaut 1) borne les circuits actifs d'un projet à la fois ; les autres
|
|
117
|
+
tickets prêts attendent leur tour et démarrent, un par un, quand une place se libère. La monter
|
|
118
|
+
fait tourner plus de circuits en parallèle, ce n'est pas le moyen de voir la file. Un ticket qui
|
|
119
|
+
devrait être prêt mais ne démarre pas attend sa section « ## Architecture » (que j'écris) ou une
|
|
120
|
+
place. Ainsi la file avance seule, et je ne relance rien.
|
|
112
121
|
- **Je ne lance pas de circuit pour un ticket de données** : un ticket qui n'ajoute que des
|
|
113
122
|
données (des fichiers qu'un schéma valide) passe par le chemin de données du projet, sa
|
|
114
123
|
validation et sa CI (charte commune). Ainsi les tests, la preuve du rouge et le développeur ne
|