@roomi-fields/grillhouse 0.49.0 → 0.50.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 +38 -0
- package/bin/grillhouse.mjs +2 -0
- package/cadre/templates/projet/.github/workflows/ci.yml +5 -0
- package/cadre/templates/projet/.github/workflows/nuit.yml +6 -4
- package/cadre/templates/projet/CLAUDE.md +13 -96
- package/cadre/templates/projet/docs/agents/issue-tracker.md +5 -5
- package/charte.md +88 -96
- package/dist/temporal/acte.d.ts +9 -0
- package/dist/temporal/acte.js +45 -21
- package/dist/temporal/acte.js.map +1 -1
- package/dist/temporal/circuit/activites.js +2 -1
- package/dist/temporal/circuit/activites.js.map +1 -1
- package/dist/temporal/circuit/appel.js +2 -2
- package/dist/temporal/circuit/appel.js.map +1 -1
- package/dist/temporal/circuit/client.d.ts +2 -4
- package/dist/temporal/circuit/client.js +5 -8
- package/dist/temporal/circuit/client.js.map +1 -1
- package/dist/temporal/circuit/commande.js +5 -4
- package/dist/temporal/circuit/commande.js.map +1 -1
- package/dist/temporal/circuit/contrat.d.ts +3 -3
- package/dist/temporal/circuit/contrat.js +2 -2
- package/dist/temporal/circuit/contrat.js.map +1 -1
- package/dist/temporal/circuit/deroule.js +4 -4
- package/dist/temporal/circuit/deroule.js.map +1 -1
- package/dist/temporal/commande.js +1 -1
- package/dist/temporal/commande.js.map +1 -1
- package/dist/temporal/deroules.js +3 -4
- package/dist/temporal/deroules.js.map +1 -1
- package/dist/temporal/etat.js +1 -1
- package/dist/temporal/etat.js.map +1 -1
- package/dist/temporal/file/activites.js +2 -1
- package/dist/temporal/file/activites.js.map +1 -1
- package/dist/temporal/file/client.js.map +1 -1
- package/dist/temporal/file/contrat.js +3 -2
- package/dist/temporal/file/contrat.js.map +1 -1
- package/dist/temporal/file/deroule.js +2 -1
- package/dist/temporal/file/deroule.js.map +1 -1
- package/dist/temporal/installation.js +2 -0
- package/dist/temporal/installation.js.map +1 -1
- package/dist/temporal/nuits/activites.js +4 -3
- package/dist/temporal/nuits/activites.js.map +1 -1
- package/dist/temporal/nuits/appel.js +2 -1
- package/dist/temporal/nuits/appel.js.map +1 -1
- package/dist/temporal/nuits/choix.js +2 -1
- package/dist/temporal/nuits/choix.js.map +1 -1
- package/dist/temporal/nuits/client.js +2 -1
- package/dist/temporal/nuits/client.js.map +1 -1
- package/dist/temporal/nuits/commande.js +2 -1
- package/dist/temporal/nuits/commande.js.map +1 -1
- package/dist/temporal/nuits/contrat.js +2 -1
- package/dist/temporal/nuits/contrat.js.map +1 -1
- package/dist/temporal/nuits/deroule.js +2 -1
- package/dist/temporal/nuits/deroule.js.map +1 -1
- package/dist/temporal/places/activites.js +2 -1
- package/dist/temporal/places/activites.js.map +1 -1
- package/dist/temporal/places/client.js +1 -0
- package/dist/temporal/places/client.js.map +1 -1
- package/dist/temporal/places/deroule.js +4 -5
- package/dist/temporal/places/deroule.js.map +1 -1
- package/dist/temporal/tickets/activites.js +1 -1
- package/dist/temporal/tickets/activites.js.map +1 -1
- package/dist/temporal/tickets/deroule.js +4 -4
- package/dist/temporal/tickets/deroule.js.map +1 -1
- package/docs/ARCHITECTURE.md +35 -13
- package/docs/CADRE.md +10 -68
- package/docs/INTERFACE.md +59 -179
- package/docs/architecture/circuit.md +440 -0
- package/docs/architecture/entree.md +281 -0
- package/docs/architecture/greffon.md +284 -0
- package/docs/architecture/installation.md +306 -0
- package/docs/architecture/machine.md +383 -0
- package/docs/architecture/tests.md +337 -0
- package/package.json +1 -1
- package/scripts/abi-des-dependances.mjs +2 -1
- package/scripts/activites.mjs +8 -8
- package/scripts/aiguillage.mjs +4 -4
- package/scripts/arbitrages.mjs +1 -1
- package/scripts/arbres-juges.mjs +2 -1
- package/scripts/attente-de-la-machine.mjs +10 -16
- package/scripts/avancement.mjs +2 -0
- package/scripts/base-des-workflows.mjs +2 -1
- package/scripts/binaires.mjs +2 -1
- package/scripts/branche-de-nuit.mjs +2 -1
- package/scripts/cadre.mjs +12 -3
- package/scripts/ci-de-main.mjs +2 -1
- package/scripts/circuit.mjs +101 -618
- package/scripts/circuits-cles.mjs +4 -6
- package/scripts/circuits-du-serveur.mjs +1 -1
- package/scripts/codes-de-sortie.mjs +1 -1
- package/scripts/coeurs-dedies.mjs +2 -4
- package/scripts/commande-du-langage.mjs +2 -0
- package/scripts/commandes-composees.mjs +3 -3
- package/scripts/commandes-du-path.mjs +1 -1
- package/scripts/composants-affectes.mjs +3 -1
- package/scripts/composition-des-langages.mjs +2 -0
- package/scripts/conformite.d.ts +2 -1
- package/scripts/conformite.mjs +2 -0
- package/scripts/consommation-des-passes.mjs +5 -4
- package/scripts/consommation.mjs +1 -0
- package/scripts/copies-finies.mjs +9 -10
- package/scripts/crochets.mjs +2 -1
- package/scripts/depart-du-ticket.mjs +2 -2
- package/scripts/dependances-internes.mjs +4 -2
- package/scripts/dernier-vert.mjs +3 -3
- package/scripts/dette.d.ts +2 -1
- package/scripts/dette.mjs +2 -0
- package/scripts/direct.mjs +2 -1
- package/scripts/disque-des-copies.mjs +1 -1
- package/scripts/donnees-cles.mjs +2 -0
- package/scripts/droits.mjs +12 -10
- package/scripts/echantillonneur-de-la-passe.mjs +1 -1
- package/scripts/effets.mjs +3 -3
- package/scripts/engendres.mjs +1 -1
- package/scripts/enveloppe/codes.mjs +1 -0
- package/scripts/enveloppe/enveloppe.mjs +113 -89
- package/scripts/enveloppe/lancer.sh +5 -3
- package/scripts/enveloppe/paquets-du-plan.mjs +4 -6
- package/scripts/enveloppe/travail-de-la-copie.mjs +11 -16
- package/scripts/etapes.mjs +10 -9
- package/scripts/etat-du-depot.mjs +2 -1
- package/scripts/faits-du-circuit.mjs +19 -19
- package/scripts/fermeture-de-la-machine.mjs +2 -2
- package/scripts/fichier-du-poste.mjs +3 -4
- package/scripts/fichiers-nommes.mjs +2 -1
- package/scripts/file-des-tickets.mjs +3 -1
- package/scripts/flux-de-la-nuit.mjs +39 -0
- package/scripts/flux-des-paquets.mjs +2 -1
- package/scripts/fusion-du-changelog.mjs +2 -1
- package/scripts/garde-de-la-memoire.mjs +1 -1
- package/scripts/gardes-du-cadre.mjs +2 -0
- package/scripts/greffons.mjs +2 -2
- package/scripts/grillhouse-maj.mjs +55 -150
- package/scripts/groupe-cles.mjs +2 -1
- package/scripts/index-interfaces.mjs +2 -0
- package/scripts/init.mjs +2 -1
- package/scripts/integration/file.mjs +3 -3
- package/scripts/integration/integrer.mjs +5 -6
- package/scripts/integration/rejeu.mjs +4 -2
- package/scripts/integration/verdict.mjs +2 -1
- package/scripts/jointure.d.ts +5 -1
- package/scripts/journal-des-etats.mjs +2 -2
- package/scripts/langages/cargo/binaires.mjs +3 -2
- package/scripts/langages/cargo/clippy.mjs +2 -0
- package/scripts/langages/cargo/commandes.mjs +72 -17
- package/scripts/langages/cargo/composants.mjs +4 -3
- package/scripts/langages/cargo/elements-du-lot.mjs +2 -0
- package/scripts/langages/cargo/etiquettes.mjs +87 -0
- package/scripts/langages/cargo/executables-de-tests.mjs +3 -1
- package/scripts/langages/cargo/exemples.mjs +6 -4
- package/scripts/langages/cargo/frontieres.mjs +2 -0
- package/scripts/langages/cargo/index-interfaces.mjs +2 -0
- package/scripts/langages/cargo/index.mjs +8 -9
- package/scripts/langages/cargo/migrations/0.28.4-tailles-des-tests.mjs +8 -8
- package/scripts/langages/cargo/migrations/0.34.0-executables-de-tests.mjs +7 -8
- package/scripts/langages/cargo/mise-a-jour.mjs +6 -3
- package/scripts/langages/cargo/sccache.mjs +10 -6
- package/scripts/langages/cargo/squelette.mjs +2 -0
- package/scripts/langages/cargo/tailles-des-tests.mjs +2 -0
- package/scripts/langages/cargo/verdict.mjs +8 -6
- package/scripts/langages/typescript/chemins-des-tests.mjs +2 -1
- package/scripts/langages/typescript/code-mort.mjs +2 -1
- package/scripts/langages/typescript/composants.mjs +7 -5
- package/scripts/langages/typescript/consommateurs-arbitres.mjs +17 -4
- package/scripts/langages/typescript/consommateurs.d.ts +2 -1
- package/scripts/langages/typescript/consommateurs.mjs +5 -7
- package/scripts/langages/typescript/construire.mjs +2 -1
- package/scripts/langages/typescript/elements-du-lot.mjs +2 -1
- package/scripts/langages/typescript/exemples.mjs +2 -1
- package/scripts/langages/typescript/frontieres.mjs +3 -2
- package/scripts/langages/typescript/index-interfaces.mjs +3 -2
- package/scripts/langages/typescript/index.mjs +3 -2
- package/scripts/langages/typescript/interfaces-contre-code.mjs +2 -1
- package/scripts/langages/typescript/lecteurs.mjs +2 -1
- package/scripts/langages/typescript/migrations/0.23.0-config-vitest.mjs +5 -6
- package/scripts/langages/typescript/migrations/0.24.4-noms-declares-inutilises.mjs +4 -8
- package/scripts/langages/typescript/migrations/0.24.6-lignes-mal-formees.mjs +5 -9
- package/scripts/langages/typescript/migrations/0.24.7-matiere-dans-les-tests.mjs +6 -10
- package/scripts/langages/typescript/migrations/0.25.0-chemins-des-tests.mjs +5 -6
- package/scripts/langages/typescript/migrations/0.25.0-tailles-des-tests.mjs +6 -8
- package/scripts/langages/typescript/migrations/0.30.0-prefixe-des-tickets.mjs +5 -4
- package/scripts/langages/typescript/migrations/0.30.0-tailles-des-outils-lourds.mjs +7 -7
- package/scripts/langages/typescript/migrations/0.30.0-titres-nommant-un-ticket.mjs +5 -6
- package/scripts/langages/typescript/migrations/0.33.0-binaire-de-jour.mjs +6 -6
- package/scripts/langages/typescript/migrations/0.33.0-tests-du-poste.mjs +5 -5
- package/scripts/langages/typescript/migrations/0.34.1-cache-des-outils.mjs +4 -4
- package/scripts/langages/typescript/migrations/0.49.0-tests-equipes.mjs +7 -7
- package/scripts/langages/typescript/mise-a-jour.mjs +5 -5
- package/scripts/langages/typescript/module-absent.mjs +2 -1
- package/scripts/langages/typescript/parcours.mjs +2 -1
- package/scripts/langages/typescript/references-par-les-types.mjs +2 -1
- package/scripts/langages/typescript/regle-des-tests.mjs +2 -1
- package/scripts/langages/typescript/resume-du-lanceur.mjs +1 -1
- package/scripts/langages/typescript/resumes.mjs +2 -1
- package/scripts/langages/typescript/squelette.mjs +2 -1
- package/scripts/langages/typescript/tailles-des-tests.mjs +5 -4
- package/scripts/langages/typescript/tests-de-nuit.mjs +12 -5
- package/scripts/langages/typescript/tests-du-poste.mjs +60 -21
- package/scripts/langages/typescript/tests.mjs +44 -66
- package/scripts/langages/typescript/titres-de-tests.mjs +2 -2
- package/scripts/langages/typescript/tranches.mjs +2 -1
- package/scripts/langages/typescript/turbo-des-paquets.mjs +87 -148
- package/scripts/langages/typescript/verdict.mjs +2 -1
- package/scripts/langages/typescript/verifier.mjs +64 -99
- package/scripts/langages/typescript/verrou-des-dependances.mjs +2 -1
- package/scripts/langages/typescript/vitest-config/avancement.reporter.mjs +1 -0
- package/scripts/langages/typescript/vitest-config/base.mjs +5 -5
- package/scripts/langages/typescript/vitest-config/bornes.mjs +1 -0
- package/scripts/langages/typescript/vitest-config/changements.mjs +6 -10
- package/scripts/langages/typescript/vitest-config/cibles.mjs +3 -3
- package/scripts/langages/typescript/vitest-config/delais.mjs +1 -0
- package/scripts/langages/typescript/vitest-config/delais.setup.mjs +1 -0
- package/scripts/langages/typescript/vitest-config/duree.classement.mjs +1 -1
- package/scripts/langages/typescript/vitest-config/duree.reporter.mjs +4 -3
- package/scripts/langages/typescript/vitest-config/lances.mjs +3 -2
- package/scripts/langages/typescript/vitest-config/machine.setup.mjs +1 -0
- package/scripts/langages/typescript/vitest-config/mesure.mjs +1 -1
- package/scripts/langages/typescript/vitest-config/mesure.setup.mjs +1 -0
- package/scripts/langages/typescript/vitest-config/registre.setup.mjs +1 -0
- package/scripts/langages/typescript/vitest-config/resultats.mjs +2 -1
- package/scripts/langages/typescript/vitest-config/resultats.setup.mjs +1 -0
- package/scripts/langages/typescript/vitest.nuit.config.mjs +3 -2
- package/scripts/langages-des-paquets.mjs +3 -1
- package/scripts/langages.mjs +5 -3
- package/scripts/lecture-unique.mjs +2 -1
- package/scripts/lint-des-scripts.mjs +1 -0
- package/scripts/machine.mjs +4 -4
- package/scripts/matiere-de-test.d.ts +2 -1
- package/scripts/matieres-lues.mjs +2 -0
- package/scripts/mesure/avancement.mjs +1 -1
- package/scripts/mesure/base-de-passe.mjs +10 -13
- package/scripts/mesure/pression.mjs +3 -4
- package/scripts/mesure-de-la-machine.mjs +2 -1
- package/scripts/migrations/0.23.0-charte-importee.mjs +7 -13
- package/scripts/migrations/0.23.0-crochets-de-seance.mjs +6 -8
- package/scripts/migrations/0.23.0-marche-du-projet.mjs +8 -12
- package/scripts/migrations/0.23.2-copies-du-cadre.mjs +9 -32
- package/scripts/migrations/0.24.0-circuit-simplifie.mjs +11 -39
- package/scripts/migrations/0.24.12-tri-des-decouvertes.mjs +6 -9
- package/scripts/migrations/0.24.2-api-extractor-du-paquet.mjs +8 -19
- package/scripts/migrations/0.25.0-script-des-tests.mjs +7 -13
- package/scripts/migrations/0.27.0-langages-dans-l-architecture.mjs +9 -23
- package/scripts/migrations/0.30.0-ci-appelle-la-verification.mjs +7 -9
- package/scripts/migrations/0.31.0-paquets-dans-le-graphe.mjs +7 -18
- package/scripts/migrations/0.33.0-cache-distant.mjs +6 -9
- package/scripts/migrations/0.33.0-ci-du-cadre.mjs +5 -8
- package/scripts/migrations/0.33.0-node-26.mjs +5 -8
- package/scripts/migrations/0.35.0-greffon-mattpocock-retire.mjs +5 -10
- package/scripts/migrations/0.44.0-node-26-seul.mjs +6 -9
- package/scripts/migrations/0.44.0-seuil-des-codes-de-tickets.mjs +6 -7
- package/scripts/migrations/0.47.0-ci-de-main.mjs +6 -7
- package/scripts/migrations/0.48.0-ci-declenchee-par-la-file.mjs +6 -6
- package/scripts/migrations/0.48.0-poussee-retiree.mjs +3 -5
- package/scripts/migrations/0.49.0-reservation-de-trois-coeurs.mjs +3 -4
- package/scripts/migrations/0.50.0-reglages-hors-de-la-charte.mjs +81 -0
- package/scripts/migrations-des-gardes.mjs +2 -0
- package/scripts/migrations.mjs +4 -0
- package/scripts/nuit.sh +48 -15
- package/scripts/outil.mjs +2 -1
- package/scripts/outils-cles.mjs +6 -6
- package/scripts/paquet-npm.mjs +3 -2
- package/scripts/paquet.mjs +3 -4
- package/scripts/paquets.d.ts +1 -1
- package/scripts/paquets.mjs +2 -0
- package/scripts/passe-de-la-machine.mjs +9 -12
- package/scripts/places-de-la-machine.mjs +36 -53
- package/scripts/places-du-serveur.mjs +5 -4
- package/scripts/plafond-de-la-machine.mjs +19 -19
- package/scripts/poussee-retiree.mjs +2 -1
- package/scripts/prefixe-des-tickets.mjs +1 -0
- package/scripts/preparation.mjs +2 -1
- package/scripts/recommencer.mjs +2 -2
- package/scripts/references-changees.mjs +1 -1
- package/scripts/registre-des-resultats.mjs +3 -1
- package/scripts/regles-des-places.mjs +4 -6
- package/scripts/repli-de-la-nuit.mjs +107 -35
- package/scripts/reponses-du-circuit.mjs +4 -3
- package/scripts/reprise.mjs +3 -2
- package/scripts/resultats.mjs +71 -93
- package/scripts/retirer-copie.sh +2 -1
- package/scripts/retirer-les-copies-finies.mjs +2 -1
- package/scripts/seances.mjs +3 -2
- package/scripts/services-du-noyau.mjs +3 -0
- package/scripts/session-start.sh +0 -6
- package/scripts/sortie.mjs +2 -1
- package/scripts/sources.mjs +2 -0
- package/scripts/sous-commandes.mjs +2 -1
- package/scripts/sous-modules.sh +24 -43
- package/scripts/style-a-l-ecriture.mjs +2 -0
- package/scripts/tableau-des-composants.mjs +5 -7
- package/scripts/tableau.mjs +6 -5
- package/scripts/taches-du-graphe.mjs +3 -0
- package/scripts/ticket-du-circuit.mjs +1 -1
- package/scripts/ticket.mjs +3 -0
- package/scripts/transitions.mjs +30 -19
- package/scripts/un-commit-par-ticket.mjs +2 -1
- package/scripts/verdict-de-la-nuit.mjs +2 -1
- package/scripts/verrou-de-fichier.mjs +1 -0
- package/scripts/verrous/commande.mjs +2 -1
- package/scripts/verrous/ecriture-hors-enveloppe.mjs +1 -0
- package/scripts/verrous/ticket-du-sous-agent.mjs +1 -0
- package/scripts/verrous/verrou.mjs +3 -3
- package/scripts/workflows-du-cadre.mjs +2 -1
- package/skills/architecte/SKILL.md +203 -0
- package/skills/architecte/references/exemple-d-architecture.md +159 -0
- package/skills/developpeur/SKILL.md +6 -10
- package/skills/explorateur/SKILL.md +1 -1
- package/skills/grill/SKILL.md +4 -5
- package/skills/grill/references/paquets.md +5 -8
- package/skills/pitmaster/SKILL.md +179 -268
- package/skills/pitmaster/references/cadre.md +7 -6
- package/skills/pitmaster/references/consigne-agent.md +36 -32
- package/skills/pitmaster/references/tour.md +2 -2
- package/skills/redacteur/references/documents-d-un-composant.md +10 -8
- package/skills/testwriter/SKILL.md +8 -11
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
// The fallback of the night
|
|
1
|
+
// The fallback of the night (packages/grillhouse/docs/architecture/entree.md §3.1 « Repli de la
|
|
2
|
+
// nuit », §5.3 « Les deux parts »): the night of PC3 (scripts/nuit.sh) reads, by `gh`, the jobs
|
|
2
3
|
// of the day's Nuit flow, and decides tranche by tranche what PC3 plays in place of PC2, as a queue
|
|
3
4
|
// of agents falls back on another capacity (Buildkite) when no agent takes the job in time.
|
|
4
5
|
//
|
|
@@ -8,8 +9,13 @@
|
|
|
8
9
|
// started) counts as not played and plays whole again.
|
|
9
10
|
// - A tranche that runs, or waits for less than 60 minutes, stays at PC2.
|
|
10
11
|
// - The statement says which tranches played where: `pc2` the finished ones, `pc3` the replayed.
|
|
12
|
+
// - The measures of time: when the project's flow declares a job that plays them (`mesures`, see
|
|
13
|
+
// scripts/flux-de-la-nuit.mjs), the statement says its state (`mesures`: `verte`, `rouge`, `en-cours`,
|
|
14
|
+
// or `a-rejouer` when the job was interrupted or never came and the flow is over: PC3 plays them).
|
|
15
|
+
// - The flow read is the one of the commit the night plays: a run of another commit counts for none,
|
|
16
|
+
// and with no run of that commit every tranche, and the measures, play on PC3.
|
|
11
17
|
//
|
|
12
|
-
// node repli-de-la-nuit.mjs <dépôt owner/nom> <nombre de tranches> [<identifiant du flux>] the
|
|
18
|
+
// node repli-de-la-nuit.mjs <dépôt owner/nom> <nombre de tranches> [<identifiant du flux>] [<commit>] the
|
|
13
19
|
// decision as JSON, the run cancelled (`gh run cancel`) when a tranche waited too long; a run that
|
|
14
20
|
// waits for its group of concurrence, with no job yet, counts every tranche as not started
|
|
15
21
|
import { spawnSync } from 'node:child_process';
|
|
@@ -19,20 +25,29 @@ import path from 'node:path';
|
|
|
19
25
|
/** The minutes a tranche may wait for its job to start before PC3 plays it. */
|
|
20
26
|
export const ATTENTE_MAX_MINUTES = 60;
|
|
21
27
|
|
|
28
|
+
const MESURES = /^mesures\b/;
|
|
22
29
|
const TRANCHE = /^tranches\b.*?(\d+)\)\s*$/;
|
|
23
30
|
// The conclusions of a job that started or was cancelled without finishing its tranche.
|
|
24
31
|
const INTERROMPUES = new Set(['cancelled', 'skipped', 'startup_failure']);
|
|
25
32
|
|
|
26
33
|
/**
|
|
27
34
|
* The decision on the tranches of a Nuit flow.
|
|
28
|
-
* @param {{ jobs: { name: string, status: string, conclusion: string | null, startedAt: string | null }[], heureDuFlux: string, maintenant: string }} o
|
|
35
|
+
* @param {{ jobs: { name: string, status: string, conclusion: string | null, startedAt: string | null }[], heureDuFlux: string, maintenant: string, fluxTermine?: boolean }} o
|
|
29
36
|
* `jobs` the jobs of the run as `gh run view --json jobs` gives them, `heureDuFlux` the hour the
|
|
30
|
-
* flow was created, `maintenant` the present hour, both ISO.
|
|
31
|
-
* @returns {{ aRejouer: number[], aAnnuler: number[], enAttente: number[], pc2: number[], pc3: number[] }}
|
|
37
|
+
* flow was created, `maintenant` the present hour, both ISO, `fluxTermine` whether the run is over.
|
|
38
|
+
* @returns {{ aRejouer: number[], aAnnuler: number[], enAttente: number[], pc2: number[], pc3: number[], mesures: 'verte' | 'rouge' | 'en-cours' | 'a-rejouer' }}
|
|
32
39
|
*/
|
|
33
|
-
export function choisirLeRepli({ jobs, heureDuFlux, maintenant }) {
|
|
40
|
+
export function choisirLeRepli({ jobs, heureDuFlux, maintenant, fluxTermine = false }) {
|
|
34
41
|
const attente = Date.parse(maintenant) - Date.parse(heureDuFlux);
|
|
35
|
-
const d = {
|
|
42
|
+
const d = {
|
|
43
|
+
aRejouer: [],
|
|
44
|
+
aAnnuler: [],
|
|
45
|
+
enAttente: [],
|
|
46
|
+
enCours: [],
|
|
47
|
+
rouges: [],
|
|
48
|
+
pc2: [],
|
|
49
|
+
pc3: [],
|
|
50
|
+
};
|
|
36
51
|
const tranches = jobs
|
|
37
52
|
.map(j => ({ j, n: Number(TRANCHE.exec(j.name)?.[1]) }))
|
|
38
53
|
.filter(({ n }) => Number.isInteger(n) && n > 0)
|
|
@@ -58,9 +73,29 @@ export function choisirLeRepli({ jobs, heureDuFlux, maintenant }) {
|
|
|
58
73
|
}
|
|
59
74
|
}
|
|
60
75
|
d.pc3 = [...d.aRejouer];
|
|
76
|
+
d.mesures = etatDesMesures(
|
|
77
|
+
jobs.find(j => MESURES.test(j.name)),
|
|
78
|
+
d.aAnnuler.length > 0 || fluxTermine
|
|
79
|
+
);
|
|
61
80
|
return d;
|
|
62
81
|
}
|
|
63
82
|
|
|
83
|
+
// The state of the measures job <j> of the flow: its verdict once finished, `en-cours` while it
|
|
84
|
+
// waits or runs, `a-rejouer` when it was interrupted, or never came and <termine> (the flow is over
|
|
85
|
+
// or cancelled).
|
|
86
|
+
function etatDesMesures(j, termine) {
|
|
87
|
+
if (!j) {
|
|
88
|
+
return termine ? 'a-rejouer' : 'en-cours';
|
|
89
|
+
}
|
|
90
|
+
if (j.status !== 'completed') {
|
|
91
|
+
return termine ? 'a-rejouer' : 'en-cours';
|
|
92
|
+
}
|
|
93
|
+
if (INTERROMPUES.has(j.conclusion ?? '')) {
|
|
94
|
+
return 'a-rejouer';
|
|
95
|
+
}
|
|
96
|
+
return j.conclusion === 'success' ? 'verte' : 'rouge';
|
|
97
|
+
}
|
|
98
|
+
|
|
64
99
|
function gh(args) {
|
|
65
100
|
const r = spawnSync('gh', args, { encoding: 'utf8' });
|
|
66
101
|
if (r.status !== 0) {
|
|
@@ -69,41 +104,78 @@ function gh(args) {
|
|
|
69
104
|
return r.stdout;
|
|
70
105
|
}
|
|
71
106
|
|
|
107
|
+
/**
|
|
108
|
+
* The id of the latest Nuit run of <commit> (any latest run when <commit> is empty), undefined when
|
|
109
|
+
* the flow has none for it.
|
|
110
|
+
*/
|
|
111
|
+
function fluxDuCommit(depot, commit) {
|
|
112
|
+
const runs = JSON.parse(
|
|
113
|
+
gh([
|
|
114
|
+
'run',
|
|
115
|
+
'list',
|
|
116
|
+
'-R',
|
|
117
|
+
depot,
|
|
118
|
+
'--workflow',
|
|
119
|
+
'nuit.yml',
|
|
120
|
+
'--limit',
|
|
121
|
+
'20',
|
|
122
|
+
'--json',
|
|
123
|
+
'databaseId,headSha',
|
|
124
|
+
])
|
|
125
|
+
);
|
|
126
|
+
return runs.find(r => !commit || r.headSha === commit)?.databaseId;
|
|
127
|
+
}
|
|
128
|
+
|
|
72
129
|
if (process.argv[1] && fileURLToPath(import.meta.url) === path.resolve(process.argv[1])) {
|
|
73
|
-
const [depot, tranches, identifiant] = process.argv.slice(2);
|
|
74
|
-
const
|
|
130
|
+
const [depot, tranches, identifiant, commit] = process.argv.slice(2);
|
|
131
|
+
const n = Number(tranches) || 0;
|
|
132
|
+
// No run of the commit the night plays: the flow played none of it, PC3 plays every tranche.
|
|
133
|
+
const rien = () => {
|
|
134
|
+
const toutes = Array.from({ length: n }, (_, i) => i + 1);
|
|
135
|
+
return {
|
|
136
|
+
aRejouer: toutes,
|
|
137
|
+
aAnnuler: [],
|
|
138
|
+
enAttente: [],
|
|
139
|
+
enCours: [],
|
|
140
|
+
rouges: [],
|
|
141
|
+
pc2: [],
|
|
142
|
+
pc3: toutes,
|
|
143
|
+
mesures: 'a-rejouer',
|
|
144
|
+
};
|
|
145
|
+
};
|
|
75
146
|
try {
|
|
76
|
-
const id =
|
|
77
|
-
identifiant ||
|
|
78
|
-
JSON.parse(
|
|
79
|
-
gh(['run', 'list', '-R', depot, '--workflow', 'nuit.yml', '--limit', '1', '--json', 'databaseId'])
|
|
80
|
-
)[0]?.databaseId;
|
|
147
|
+
const id = identifiant || fluxDuCommit(depot, commit);
|
|
81
148
|
if (!id) {
|
|
82
|
-
process.stdout.write(`${JSON.stringify(
|
|
149
|
+
process.stdout.write(`${JSON.stringify({ ...rien(), flux: null })}\n`);
|
|
83
150
|
} else {
|
|
84
151
|
const run = JSON.parse(
|
|
85
|
-
gh(['run', 'view', String(id), '-R', depot, '--json', 'jobs,createdAt,status'])
|
|
152
|
+
gh(['run', 'view', String(id), '-R', depot, '--json', 'jobs,createdAt,status,headSha'])
|
|
86
153
|
);
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
run
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
154
|
+
if (commit && run.headSha !== commit) {
|
|
155
|
+
process.stdout.write(`${JSON.stringify({ ...rien(), flux: null })}\n`);
|
|
156
|
+
} else {
|
|
157
|
+
// A run that waits for the group of concurrence has no job yet: each of its tranches is
|
|
158
|
+
// a job not started.
|
|
159
|
+
const jobs =
|
|
160
|
+
run.jobs.length === 0 && run.status !== 'completed'
|
|
161
|
+
? Array.from({ length: Number(tranches) || 0 }, (_, i) => ({
|
|
162
|
+
name: `tranches (26.x, ${i + 1})`,
|
|
163
|
+
status: 'queued',
|
|
164
|
+
conclusion: null,
|
|
165
|
+
startedAt: null,
|
|
166
|
+
}))
|
|
167
|
+
: run.jobs;
|
|
168
|
+
const d = choisirLeRepli({
|
|
169
|
+
jobs,
|
|
170
|
+
heureDuFlux: run.createdAt,
|
|
171
|
+
maintenant: new Date().toISOString(),
|
|
172
|
+
fluxTermine: run.status === 'completed',
|
|
173
|
+
});
|
|
174
|
+
if (d.aAnnuler.length > 0) {
|
|
175
|
+
gh(['run', 'cancel', String(id), '-R', depot]);
|
|
176
|
+
}
|
|
177
|
+
process.stdout.write(`${JSON.stringify({ ...d, flux: id })}\n`);
|
|
105
178
|
}
|
|
106
|
-
process.stdout.write(`${JSON.stringify({ ...d, flux: id })}\n`);
|
|
107
179
|
}
|
|
108
180
|
} catch (e) {
|
|
109
181
|
process.stderr.write(`⛔ repli de la nuit : ${e.message}\n`);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
// The answers a circuit accepts from the supervisor
|
|
1
|
+
// The answers a circuit accepts from the supervisor (circuit.md §5.4, « Un arrêt et sa réponse »),
|
|
2
|
+
// by the status of its workflow, with no input
|
|
2
3
|
// nor output: the one rule the client (src/temporal/circuit/client.ts: its refusals and the
|
|
3
4
|
// circuits it reads), the opening, the wait, the board and the line of a stop name; and the
|
|
4
5
|
// answer `--mecanique`, which turns the sort of a ticket stopped on the testwriter or on the proof
|
|
@@ -44,8 +45,8 @@ export function lesReponses(ticket, statut, ecrit) {
|
|
|
44
45
|
* The hour of a deferral (`--reporter <heure>`): a lone hour (`H:MM` or `HH:MM`, 0-23 and 00-59)
|
|
45
46
|
* aims at its next occurrence in the machine's local time, today when strictly after <maintenant>
|
|
46
47
|
* (to the second), else tomorrow, and is handed to `bd update --defer` as `AAAA-MM-JJTHH:MM:00`,
|
|
47
|
-
* the form bd reads as that wall time (bd
|
|
48
|
-
* the day taken for the hour); any other form goes to bd as written. `quand` is the phrase of the texts (« reportée <quand> »).
|
|
48
|
+
* the form bd reads as that wall time (bd reads a space-separated `AAAA-MM-JJ HH:MM` with the
|
|
49
|
+
* month and the day taken for the hour); any other form goes to bd as written. `quand` is the phrase of the texts (« reportée <quand> »).
|
|
49
50
|
* @param {string} heure
|
|
50
51
|
* @param {Date} maintenant
|
|
51
52
|
* @returns {{ defer: string, quand: string }}
|
package/scripts/reprise.mjs
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
// The resumption of the circuit at the step that carries a red
|
|
1
|
+
// The resumption of the circuit at the step that carries a red (circuit.md §5.4 and §5.5, « renvoi
|
|
2
|
+
// à l'auteur du code »), with no input nor output (as
|
|
2
3
|
// scripts/transitions.mjs): the attribution of a red to the step that carries it and the step where
|
|
3
4
|
// `--depuis` resumes. Mature model: « Re-run failed jobs » of GitHub Actions (the red job and what
|
|
4
5
|
// depends on it replay). The fingerprint of a step, which hashes with `node:crypto`, is in
|
|
@@ -18,7 +19,7 @@ const etatDe = n => SUITE.find(e => e.numero === n).etat;
|
|
|
18
19
|
* test file of the lot (no guard) and a file of code are the developpeur's. A red
|
|
19
20
|
* that names no file but lies in a package of the plan (a red task: lint, format check, typing,
|
|
20
21
|
* build) is the developpeur's, no file named, as a red job of a CI goes back to its author (the
|
|
21
|
-
* owner's decision
|
|
22
|
+
* the owner's decision); one out of the plan, or a file nobody wrote, is never
|
|
22
23
|
* attributed (`etape` null, its `motif` said): it goes up.
|
|
23
24
|
*/
|
|
24
25
|
export function attribuerLeRouge({ lieux, portes }) {
|
package/scripts/resultats.mjs
CHANGED
|
@@ -1,122 +1,102 @@
|
|
|
1
|
-
// The formats of the results the circuit decides on, in one module
|
|
2
|
-
//
|
|
3
|
-
//
|
|
1
|
+
// The formats of the results the circuit decides on, in one module that the circuit, the guards
|
|
2
|
+
// and the tests read; as Bazel's Build Event Protocol and the JUnit reports carry the outcome of a
|
|
3
|
+
// build, no reader reads an output meant for the human (circuit.md §4.4, the sheet of a role).
|
|
4
4
|
//
|
|
5
5
|
// npx grillhouse resultats --schema <rôle> prints the JSON schema of a role's sheet
|
|
6
6
|
//
|
|
7
7
|
// - The sheet of the end of a session (« la fiche ») of the explorateur, the questionneur, the
|
|
8
|
-
// testwriter, the developpeur and the reviewer: the schema of each role (FICHES), which the
|
|
9
|
-
// (`claude -p --output-format json --json-schema <schéma>`) and fills as its
|
|
10
|
-
//
|
|
11
|
-
//
|
|
8
|
+
// testwriter, the developpeur and the reviewer: the schema of each role (FICHES), which the
|
|
9
|
+
// session receives (`claude -p --output-format json --json-schema <schéma>`) and fills as its
|
|
10
|
+
// last act, in the field `structured_output` of its result. A field exists only when a reader
|
|
11
|
+
// reads it:
|
|
12
12
|
// - `statut` (FAIT, BLOQUÉ, BESOIN), with `raison` for BLOQUÉ and `question` for BESOIN, each
|
|
13
|
-
// with its `piece`: the circuit goes on, or stops at « hors-portee » or « besoin
|
|
14
|
-
//
|
|
15
|
-
//
|
|
16
|
-
// - `portent_le_travail` (`fichier` from the root, `test` its full name, or none for every test
|
|
17
|
-
// the file): the tests of the lot that
|
|
18
|
-
// requires red (testwriter);
|
|
13
|
+
// with its `piece`: the circuit goes on, or stops at « hors-portee » or « besoin »
|
|
14
|
+
// (testwriter, developpeur, and the explorateur's gesture of a mechanical ticket, its own
|
|
15
|
+
// schema, `geste`);
|
|
16
|
+
// - `portent_le_travail` (`fichier` from the root, `test` its full name, or none for every test
|
|
17
|
+
// of the file): the tests of the lot that the proof of the red requires red (testwriter);
|
|
19
18
|
// - `renvoi` (`role` testwriter): the circuit relaunches the testwriter, then the proof and the
|
|
20
19
|
// developpeur (developpeur);
|
|
21
20
|
// - `hors_plan` (`critere` its number, `paquet` the package out of the plan that would hold it,
|
|
22
21
|
// `piece`): each criterion the session does not hold for want of a package out of the plan; a
|
|
23
|
-
// FAIT that carries one stops at « hors-portee
|
|
24
|
-
// change that does not pass it (BP 320.17: « critère 10 hors plan, non fait », in a handover
|
|
25
|
-
// the circuit does not read, fell at the review) (developpeur);
|
|
22
|
+
// FAIT that carries one stops at « hors-portee » (developpeur);
|
|
26
23
|
// - `reponses` (`titre` of the finding, `etat` levé or contesté, `raison` for a contesté,
|
|
27
|
-
// `piece`):
|
|
28
|
-
//
|
|
29
|
-
//
|
|
30
|
-
//
|
|
31
|
-
//
|
|
32
|
-
//
|
|
33
|
-
// scripts/circuit.mjs), and gives the next review each answer
|
|
34
|
-
// under its finding (BP 320.21: the cause of his choice in a handover the circuit does not
|
|
35
|
-
// read, three RENDU, then the stop) (developpeur);
|
|
24
|
+
// `piece`): a FAIT answers each finding of the reviewer open for its role, by its title (the
|
|
25
|
+
// number « Constat N — » is recognised, `cleDuConstat`); the circuit refuses a sheet without
|
|
26
|
+
// the answer to one (`reponsesAuxConstats`), save in a run where the supervisor gives the task
|
|
27
|
+
// (`--contexte`: the findings open at the run's launch are then its context, the ones a RENDU
|
|
28
|
+
// states within it still its task, `constatsDeLaSeance` of scripts/circuit.mjs), and gives the
|
|
29
|
+
// next review each answer under its finding (developpeur);
|
|
36
30
|
// - `ecarts` (`sujet`, `texte`): the body of the commit message, written by the circuit, each
|
|
37
31
|
// subject once, its value from the last sheet that carries it (developpeur, reviewer);
|
|
38
32
|
// - `decouvertes` (`sujet`, `corps`): each one a ticket filed closed under the ticket, labelled
|
|
39
33
|
// `decouverte`, created by the circuit (every role);
|
|
40
34
|
// - `verdict` (ACCEPTÉ, RENDU), `constats` (`titre`, `corps`, `piece`, `genre` bloquant or
|
|
41
|
-
// remarque; a
|
|
42
|
-
//
|
|
43
|
-
//
|
|
44
|
-
//
|
|
45
|
-
// review marks it lifted, and writes the verdict at the ticket for the human, the remarks with
|
|
46
|
-
// it; a RENDU carries a blocking finding, an ACCEPTÉ none (reviewer);
|
|
35
|
+
// remarque; a blocking one with `regle`, the criterion of the plan or the rule of the frame
|
|
36
|
+
// it holds, and `role` its recipient, or `critere_en_cause`): the circuit plays the blocking
|
|
37
|
+
// findings alone, each open until a review marks it lifted, and writes the verdict at the
|
|
38
|
+
// ticket, the remarks with it; a RENDU carries a blocking finding, an ACCEPTÉ none (reviewer);
|
|
47
39
|
// - `conformite` (`element`, `conforme` oui or non, `document` CADRE, INTERFACE or
|
|
48
|
-
// ARCHITECTURE, `reference`, `piece`; a « non » with `role` its recipient):
|
|
49
|
-
//
|
|
50
|
-
//
|
|
51
|
-
//
|
|
52
|
-
//
|
|
53
|
-
//
|
|
54
|
-
// (`conformiteDuLot`) (reviewer);
|
|
40
|
+
// ARCHITECTURE, `reference`, `piece`; a « non » with `role` its recipient): one line per
|
|
41
|
+
// element of the lot (scripts/langages/typescript/elements-du-lot.mjs), a new export's the
|
|
42
|
+
// entry of the INTERFACE that names it; a line without its reference is refused; a « non » is
|
|
43
|
+
// a blocking finding (`bloquantsDeLaFiche`), and the circuit refuses a sheet without a line
|
|
44
|
+
// for each element, or with a line on an element out of the list, a file the lot changes
|
|
45
|
+
// named alone or as `<fichier>#<nom>` (`conformiteDuLot`) (reviewer);
|
|
55
46
|
// - `suivi` (`titre`, `etat` levé or non levé, `preuve`): each finding still open judged on the
|
|
56
|
-
// lot,
|
|
57
|
-
//
|
|
58
|
-
// a sheet without a line for one, or an ACCEPTÉ that holds one not lifted
|
|
47
|
+
// lot, by its title (`cleDuConstat`), which the circuit writes at the ticket with the verdict;
|
|
48
|
+
// it refuses a sheet without a line for one, or an ACCEPTÉ that holds one not lifted
|
|
59
49
|
// (`suiviDesConstats`) (reviewer);
|
|
60
|
-
// - `question`, with its `piece` (reviewer): what goes up to the owner
|
|
61
|
-
//
|
|
62
|
-
//
|
|
63
|
-
//
|
|
64
|
-
//
|
|
65
|
-
//
|
|
66
|
-
//
|
|
67
|
-
//
|
|
68
|
-
// language, the architecture, a gap to the reference, or no answer (BP 328: a question the
|
|
69
|
-
// ticket settled stopped the plan) (explorateur);
|
|
50
|
+
// - `question`, with its `piece` (reviewer): what goes up to the owner; the circuit stops at
|
|
51
|
+
// « besoin » before it commits or relaunches anyone;
|
|
52
|
+
// - `criteres`, `paquets`, `questions` (each with its `motif` and its `piece`): the plan, which
|
|
53
|
+
// the circuit writes at the ticket: the criteria it adds after those the ticket holds, the
|
|
54
|
+
// packages in the title as it names its components (a package name or a path), the list the
|
|
55
|
+
// envelope of every later session writes; the open questions, a change or a removal of a
|
|
56
|
+
// criterion written among them, go up to the supervisor, each naming why: the language, the
|
|
57
|
+
// architecture, a gap to the reference, or no answer (explorateur);
|
|
70
58
|
// - `sorte` (`genre` mécanique or comportement, its `raison`, the `commande` a mechanical ticket
|
|
71
|
-
// plays, and, for a comportement, `comportement` changé, tests-adaptés or inchangé):
|
|
72
|
-
//
|
|
73
|
-
//
|
|
74
|
-
//
|
|
75
|
-
//
|
|
76
|
-
//
|
|
77
|
-
// absent, out of its kinds, or without its reason or its command is comportement, the whole
|
|
78
|
-
// circuit (`sorteDuPlan`, grillhouse-sos) (explorateur);
|
|
59
|
+
// plays, and, for a comportement, `comportement` changé, tests-adaptés or inchangé): a
|
|
60
|
+
// mechanical ticket skips the testwriter, the proof and the developpeur; under
|
|
61
|
+
// « tests-adaptés » the testwriter writes and every green of the proof is expected, then the
|
|
62
|
+
// developpeur writes; under « inchangé » the developpeur alone writes; a sort absent, out of
|
|
63
|
+
// its kinds, or without its reason or its command is comportement, the whole circuit
|
|
64
|
+
// (`sorteDuPlan`) (explorateur; circuit.md §5.1);
|
|
79
65
|
// - `ecartes` (`composant`, `raison`): the components of the survey, and those the title of
|
|
80
|
-
// the ticket names, that the plan does not touch
|
|
81
|
-
//
|
|
82
|
-
// component set apart without its reason makes the sheet out of conformity (explorateur);
|
|
83
|
-
// - `noms_publies` (`fournisseur`, `consommateur`, `noms`): the names a component publishes to
|
|
84
|
-
// another, which the lot adds to the provider's « Consommateurs » lines; as a code owner's
|
|
85
|
-
// approval covers what it reviewed, the circuit writes them in the description (« ## Noms
|
|
86
|
-
// publiés »), which scripts/langages/typescript/consommateurs-arbitres.mjs reads (BP
|
|
87
|
-
// 320.14.2.10: a criterion alone named them, the guard refused the lot) (grillhouse-la3)
|
|
66
|
+
// the ticket names, that the plan does not touch; each other component the circuit plays is in
|
|
67
|
+
// the packages; a component set apart without its reason makes the sheet out of conformity
|
|
88
68
|
// (explorateur);
|
|
69
|
+
// - `noms_publies` (`fournisseur`, `consommateur`, `noms`): the names a component publishes to
|
|
70
|
+
// another, which the lot adds to the provider's « Consommateurs » lines; the circuit writes
|
|
71
|
+
// them in the description (« ## Noms publiés »), which
|
|
72
|
+
// scripts/langages/typescript/consommateurs-arbitres.mjs reads (explorateur);
|
|
89
73
|
// - `reponses` (`numero` of the question, `reponse` CHANGE or GARDE, `texte`): the explorateur's
|
|
90
|
-
// one answer to the questionneur
|
|
91
|
-
//
|
|
92
|
-
//
|
|
93
|
-
//
|
|
74
|
+
// one answer to the questionneur; a question without an answer stays open (explorateur); an
|
|
75
|
+
// answer may carry a `correction` of a criterion (`critere`, `texte`, `piece`, `extrait`),
|
|
76
|
+
// which the circuit accepts when the extract stands at the line of the question's piece
|
|
77
|
+
// (`correctionsDuPlan` of scripts/transitions.mjs);
|
|
94
78
|
// - `issue` (QUESTIONS with its `questions`, each with what it aims at, `vise`, and its
|
|
95
|
-
// `piece`; AUCUNE; DÉSACCORD
|
|
96
|
-
// with its `desaccord`): the explorateur answers the questions, the disagreement as one, and
|
|
97
|
-
// the circuit writes them at the ticket (questionneur);
|
|
79
|
+
// `piece`; AUCUNE; DÉSACCORD with its `desaccord`) (questionneur);
|
|
98
80
|
// - `verdicts` (`decouverte`, `verdict` among VERDICTS_DU_TRI, `texte`, `piece`): the tri of the
|
|
99
81
|
// discoveries, the explorateur's sheet after the queue (its own schema, `tri`), one line per
|
|
100
82
|
// discovery of the ticket, which the circuit writes at the ticket of each and reopens under
|
|
101
83
|
// `a-valider` for an a-porter or a non-confirmee; the piece of a traitee or an a-porter, a
|
|
102
84
|
// command played again on main and its output or file:line, is required, and the circuit
|
|
103
85
|
// refuses a sheet without a line for each discovery, with a line on another, or two on one
|
|
104
|
-
// (`conformiteDuTri`)
|
|
86
|
+
// (`conformiteDuTri`).
|
|
105
87
|
// `lireFiche` reads a session's output: the sheet and the session's id, or the error that
|
|
106
88
|
// names what lacks or does not conform (no `structured_output`, a field out of the schema, a
|
|
107
89
|
// status without its reason, a blocking finding without its criterion or rule, a line of
|
|
108
90
|
// conformity without its rule or a « non » without its recipient, a plan without packages, a
|
|
109
91
|
// fact without its piece, a piece in no form, given the copy, a file piece not in it, and, given
|
|
110
92
|
// the ticket's description, a piece of the ticket whose criterion or section it lacks).
|
|
111
|
-
// - The piece of a fact (« la pièce »), one format,
|
|
112
|
-
//
|
|
113
|
-
//
|
|
114
|
-
//
|
|
115
|
-
//
|
|
116
|
-
//
|
|
117
|
-
//
|
|
118
|
-
// `ticket, § <section>`, then « : » and what it shows, as a review of a specification cites its
|
|
119
|
-
// section (BP 320.17: the questionneur's pieces on the plan it questions, refused). `lirePiece`
|
|
93
|
+
// - The piece of a fact (« la pièce »), one format: a finding, a question or a stop carries it, so
|
|
94
|
+
// the agent who takes the fact up re-reads it before he builds on it. Either
|
|
95
|
+
// `<fichier>:<ligne>` or `<fichier>:<ligne>-<fin>`, the file from the root of the copy, the line
|
|
96
|
+
// from 1, then, after a space, what it shows (« packages/a/src/x.ts:3 divise par sa valeur. »);
|
|
97
|
+
// or `$ <commande>` on its first line and its output on the lines after (after a « \n » written
|
|
98
|
+
// in two characters, in a piece written on one line); or, for what the ticket says,
|
|
99
|
+
// `ticket, critère <N>` or `ticket, § <section>`, then « : » and what it shows. `lirePiece`
|
|
120
100
|
// reads it; the circuit gives `lireFiche` the copy, where each file piece's file stands and
|
|
121
101
|
// holds its line, and the ticket's description, which carries each criterion or section cited.
|
|
122
102
|
// - The findings of a guard, in SARIF 2.1.0 (OASIS), beside its output for the human: one run per
|
|
@@ -204,7 +184,7 @@ const DOCUMENTS = ['CADRE', 'INTERFACE', 'ARCHITECTURE'];
|
|
|
204
184
|
// gap to the mature reference), or no answer the explorateur holds.
|
|
205
185
|
const MOTIFS = ['langage', 'architecture', 'écart à la référence', 'sans réponse'];
|
|
206
186
|
|
|
207
|
-
// The verdicts of the tri of the discoveries
|
|
187
|
+
// The verdicts of the tri of the discoveries, as the triage of a report of
|
|
208
188
|
// Chromium or Mozilla: the lot or a ticket already holds it, it repeats another, it stays out of
|
|
209
189
|
// the actual use, it is a defect of the actual use, or no proof could be played again. The
|
|
210
190
|
// verdicts that reopen their discovery under `a-valider`, for the owner.
|
|
@@ -213,7 +193,7 @@ export const VERDICTS_ROUVERTS = ['a-porter', 'non-confirmee'];
|
|
|
213
193
|
// The verdicts whose piece is a command played again on main and its output, or file:line.
|
|
214
194
|
const VERDICTS_PROUVES = ['traitee', 'a-porter'];
|
|
215
195
|
|
|
216
|
-
// The sorts of a ticket the explorateur judges at the plan
|
|
196
|
+
// The sorts of a ticket the explorateur judges at the plan: a gesture without new
|
|
217
197
|
// behaviour, which its command makes, or a change of behaviour, which the circuit of code makes.
|
|
218
198
|
export const SORTES = ['mécanique', 'comportement'];
|
|
219
199
|
// The values of the field `comportement` of a plan of sort comportement: changé (the testwriter
|
|
@@ -528,7 +508,7 @@ export const schemaDeFiche = role => FICHES[role] ?? null;
|
|
|
528
508
|
// 'mécanique', raison, commande }` for a mechanical ticket with its reason and its command; else
|
|
529
509
|
// `{ genre: 'comportement', raison, comportement }`, `comportement` one of COMPORTEMENTS, changé
|
|
530
510
|
// when absent, unknown or without its reason. A sort absent, out of its kinds or without what it needs is comportement, the
|
|
531
|
-
// whole circuit, as a doubt goes to the circuit
|
|
511
|
+
// whole circuit, as a doubt goes to the circuit.
|
|
532
512
|
export function sorteDuPlan(fiche) {
|
|
533
513
|
const s = fiche?.sorte;
|
|
534
514
|
const plein = v => typeof v === 'string' && v.trim() !== '';
|
|
@@ -647,8 +627,7 @@ export const bloquantsDeLaFiche = fiche => [
|
|
|
647
627
|
// without its line, a line on an element out of the list, a new export whose rule does not name
|
|
648
628
|
// its entry in the INTERFACE of its package. A line on a changed file, a source or not, names it
|
|
649
629
|
// alone or one of its parts, `<fichier>#<nom>`, as a review on GitHub or Gerrit accepts a comment
|
|
650
|
-
// on any line of any changed file
|
|
651
|
-
// the commit changes, refused); a changed file asks no line, but a reference file the lot changes
|
|
630
|
+
// on any line of any changed file; a changed file asks no line, but a reference file the lot changes
|
|
652
631
|
// (<references>, their paths, `differencesDesReferences`) asks one, its `element` its path. The
|
|
653
632
|
// fault, or null.
|
|
654
633
|
export function conformiteDuLot(fiche, { elements, fichiers, references = [] }) {
|
|
@@ -765,11 +744,10 @@ export function conformiteDuTri(fiche, decouvertes) {
|
|
|
765
744
|
// fin }` for « <fichier>:<ligne>-<fin> » (as SARIF's region has a start line and an optional end
|
|
766
745
|
// line), then what it shows after a space, the place in backquotes or followed by punctuation
|
|
767
746
|
// read the same; `{ commande, sortie }` for « $ <commande> » and its output on the lines after,
|
|
768
|
-
// a « \n » written in two characters read as the line break of a piece written on one line
|
|
769
|
-
//
|
|
747
|
+
// a « \n » written in two characters read as the line break of a piece written on one line;
|
|
748
|
+
// `{ critere }` for « ticket, critère <N> » and `{ section }`
|
|
770
749
|
// for « ticket, § <section> » (in « » or up to « : »), what the ticket says, as a review of a
|
|
771
|
-
// specification cites its section (« RFC 9110 § 15.5
|
|
772
|
-
// questionneur refused for a piece on the plan they question); null for a text in no form.
|
|
750
|
+
// specification cites its section (« RFC 9110 § 15.5 »); null for a text in no form.
|
|
773
751
|
export function lirePiece(texte) {
|
|
774
752
|
const t = String(texte ?? '').trim();
|
|
775
753
|
const ticket = /^ticket\s*,\s*/i.exec(t);
|
package/scripts/retirer-copie.sh
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
-
# The removal of a working copy
|
|
2
|
+
# The removal of a working copy (packages/grillhouse/docs/architecture/entree.md §5.3, « Après les
|
|
3
|
+
# étapes »; §5.1 for the queue's copy), called by the three places that end one: the agent copy (by
|
|
3
4
|
# scripts/integration/integrer.mjs once its lot is committed, and by the supervisor for a ticket
|
|
4
5
|
# closed without integration), the integration copy (by the same script) and the night copy
|
|
5
6
|
# (scripts/nuit.sh), the last two when their existing copy does not get ready; and by the night
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// The command of the removal of the finished copies (./copies-finies.mjs), which the night runs
|
|
2
|
-
// once its steps are played (scripts/nuit.sh
|
|
2
|
+
// once its steps are played (scripts/nuit.sh; packages/grillhouse/docs/architecture/entree.md
|
|
3
|
+
// §5.3, « Après les étapes »):
|
|
3
4
|
//
|
|
4
5
|
// node scripts/retirer-les-copies-finies.mjs [<copie finie de jouer>…] from the main tree
|
|
5
6
|
//
|
package/scripts/seances.mjs
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
// The sessions of the agents
|
|
1
|
+
// The sessions of the agents (circuit.md §3.1, « Actes du circuit »; the sheet they end on, §4.4):
|
|
2
|
+
// each session is a
|
|
2
3
|
// process group the activity launches (`jouerLeGroupe`), which sends a sign of life
|
|
3
4
|
// `{ pid, depart, seanceId }` at its launch and at each step of its watch, stops on a motionless
|
|
4
5
|
// transcript (`IMMOBILE_MS` of scripts/circuit.mjs, `ctx.immobileMs`), and, cancelled, kills its
|
|
@@ -8,7 +9,7 @@
|
|
|
8
9
|
// each session comes from its caller, which gives a new one to each session it launches. `lancer` launches one session, `jusquALaFiche` until its
|
|
9
10
|
// sheet, `seance` the testwriter's or the developpeur's on the whole ticket, with the instruction of
|
|
10
11
|
// the templates (`consigne`) and the findings of the reviewer open for its role
|
|
11
|
-
// (`constatsDeLaSeance`). The circuit (scripts/circuit.mjs) calls them
|
|
12
|
+
// (`constatsDeLaSeance`). The circuit (scripts/circuit.mjs) calls them.
|
|
12
13
|
import { spawn, spawnSync } from 'node:child_process';
|
|
13
14
|
import { createHash, randomUUID } from 'node:crypto';
|
|
14
15
|
import {
|
|
@@ -7,6 +7,8 @@
|
|
|
7
7
|
// repository).
|
|
8
8
|
// - The core imports ./langages.mjs, never this entry: the command (bin/grillhouse.mjs) loads it
|
|
9
9
|
// at each call, and a script of the core it loads before running one would not run again.
|
|
10
|
+
//
|
|
11
|
+
// What the core asks of a module, and the boundary: docs/architecture/tests.md §3.3 and §3.5.
|
|
10
12
|
import { fileURLToPath } from 'node:url';
|
|
11
13
|
|
|
12
14
|
export * from './langages.mjs';
|
|
@@ -45,6 +47,7 @@ export {
|
|
|
45
47
|
} from './taches-du-graphe.mjs';
|
|
46
48
|
export { luUneFois } from './lecture-unique.mjs';
|
|
47
49
|
export { avecLeFichierDuPoste } from './fichier-du-poste.mjs';
|
|
50
|
+
export { fluxDuProjetJoueLesMesures } from './flux-de-la-nuit.mjs';
|
|
48
51
|
export { BASE_DU_LOT, CHANGEMENTS, DEPUIS_LE_VERT, garderLeVert, mesure } from './dernier-vert.mjs';
|
|
49
52
|
export {
|
|
50
53
|
consignerLesRegressions,
|
package/scripts/session-start.sh
CHANGED
|
@@ -59,12 +59,6 @@ entree=
|
|
|
59
59
|
role="$(printf '%s' "$entree" | node -e 'let s="";process.stdin.on("data",d=>s+=d).on("end",()=>{try{const a=JSON.parse(s).agent_type;if(typeof a==="string"&&/^[A-Za-z0-9_:-]+$/.test(a))process.stdout.write(a)}catch{}})' 2>/dev/null)"
|
|
60
60
|
role="${role#grillhouse:}"
|
|
61
61
|
[ -n "$role" ] && [ -n "${CLAUDE_PLUGIN_ROOT:-}" ] && [ -f "$CLAUDE_PLUGIN_ROOT/agents/$role.md" ] && exit 0
|
|
62
|
-
if [ -f "$root/.claude/template" ]; then
|
|
63
|
-
echo "## Gabarit Roomi's Grillhouse"
|
|
64
|
-
echo "Ce dossier est le gabarit du framework, pas un projet : il ne s'initialise pas. Un projet neuf se crée par \`npx @roomi-fields/grillhouse init <chemin> [préfixe]\` ; sa première séance propose le grill d'initialisation."
|
|
65
|
-
exit 0
|
|
66
|
-
fi
|
|
67
|
-
|
|
68
62
|
# One supervisor per project: the lock of the repository, or the section that says who holds it.
|
|
69
63
|
superviseur="$(node "$ici/superviseur.mjs" "$root" 2>/dev/null)"
|
|
70
64
|
[ -z "$superviseur" ] || echo "$superviseur"
|
package/scripts/sortie.mjs
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
//
|
|
2
|
+
// The release command (packages/grillhouse/docs/architecture/entree.md §3.1 « Commande de sortie »,
|
|
3
|
+
// §5.4): a release of Grillhouse, its package npm, which carries the frame's plugin: Grillhouse's own
|
|
3
4
|
// script, which no project runs (`grillhouse init` installs the template of a project alone).
|
|
4
5
|
//
|
|
5
6
|
// npx grillhouse sortie <x.y.z> the release's files: the package's package.json, packages/grillhouse/CHANGELOG.md
|
package/scripts/sources.mjs
CHANGED
|
@@ -9,6 +9,8 @@
|
|
|
9
9
|
// leaves out what a `.gitignore` names. A project that declares no language
|
|
10
10
|
// (the column « Langage » of its docs/ARCHITECTURE.md) leaves out what every language of the
|
|
11
11
|
// frame writes.
|
|
12
|
+
//
|
|
13
|
+
// What each language writes in the project: docs/architecture/tests.md §3.3.
|
|
12
14
|
import { readdirSync } from 'node:fs';
|
|
13
15
|
import path from 'node:path';
|
|
14
16
|
import { LANGAGES, langage, langageDe, langagesDeclares } from './langages.mjs';
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
// The table of the frame's subcommands, which `grillhouse <sous-commande>` (bin/grillhouse.mjs)
|
|
2
2
|
// runs and the migrations read (a former copy of a script becomes its subcommand): one module the
|
|
3
3
|
// command and the scripts import, so that no script imports the command, which is being evaluated
|
|
4
|
-
// when it runs one.
|
|
4
|
+
// when it runs one. The aiguillage of each subcommand is installation.md §5.5 and §3.1
|
|
5
|
+
// (packages/grillhouse/docs/architecture/).
|
|
5
6
|
//
|
|
6
7
|
// - A subcommand of the core is named after its script, without directory nor extension
|
|
7
8
|
// (`circuit`, `tableau`); `maj` runs `grillhouse-maj.mjs`, whose name already says the frame's;
|