@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
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
// lintian holds a package's synopsis (`synopsis-too-long`) and clippy a doc's first paragraph
|
|
4
4
|
// (`too_long_first_doc_paragraph`). The index of the interfaces (`docs/agents/index-des-interfaces.md`)
|
|
5
5
|
// and the section « Ce que les composants d'avant publient » of a role agent's instruction carry
|
|
6
|
-
// that sentence for every element (scripts/langages/typescript/index-interfaces.mjs).
|
|
6
|
+
// that sentence for every element (scripts/langages/typescript/index-interfaces.mjs). The guard
|
|
7
|
+
// `resumes` (packages/grillhouse/docs/architecture/tests.md §3.4).
|
|
7
8
|
//
|
|
8
9
|
// npx grillhouse resumes run from the repository root (a guard of grillhouse:gardes)
|
|
9
10
|
//
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// The skeleton of a new package of the module typescript, the demand `squelette` of the join
|
|
2
2
|
// (scripts/jointure.d.ts), which `grillhouse paquet` writes (scripts/paquet.mjs), as `nx g
|
|
3
|
-
// @nx/js:lib` and `turbo gen workspace` write one: no behaviour, no test.
|
|
3
|
+
// @nx/js:lib` and `turbo gen workspace` write one: no behaviour, no test. The birth of a
|
|
4
|
+
// package: packages/grillhouse/docs/architecture/tests.md §3.3.
|
|
4
5
|
//
|
|
5
6
|
// - A package of TypeScript lives under `packages/<nom>`, where the module finds its components
|
|
6
7
|
// (./composants.mjs); another path is refused, named.
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
// The size of each test, on the model of the test pyramid of Google (Software Engineering at
|
|
3
3
|
// Google, ch. 11 and 14: small ~80 %, medium ~15 %, large ~5 %) and of Bazel's `size` (small,
|
|
4
|
-
// medium, large): a large test of the day is refused, as it belongs to the night.
|
|
4
|
+
// medium, large): a large test of the day is refused, as it belongs to the night. The guard
|
|
5
|
+
// `tailles-des-tests` (packages/grillhouse/docs/architecture/tests.md §3.4).
|
|
5
6
|
//
|
|
6
7
|
// npx grillhouse tailles-des-tests run from the repository root (a guard of grillhouse:gardes)
|
|
7
8
|
//
|
|
@@ -21,11 +22,11 @@
|
|
|
21
22
|
// or it mounts a temporary directory (`mkdtemp`, `tmpdir`) and, in a process call carrying
|
|
22
23
|
// `cwd:` (or `-C`, `--prefix`), starts one of the heavy tools of OUTILS_LOURDS (turbo,
|
|
23
24
|
// vitest, knip, depcruise, api-extractor), named by a literal argument or a literal path to
|
|
24
|
-
// its binary, with no `git init` (
|
|
25
|
-
//
|
|
25
|
+
// its binary, with no `git init` (Bazel's test-encyclopedia: a test that runs the
|
|
26
|
+
// product in a trial project is large);
|
|
26
27
|
// or it starts a Temporal development server (the literal arguments `'server', 'start-dev'`
|
|
27
28
|
// in a process call of its text or of its test material): a test that mounts a real server
|
|
28
|
-
// is large
|
|
29
|
+
// is large. A tool named by a variable, or run by
|
|
29
30
|
// an npm script (`npm run verifier`), escapes the reading and the test stays medium; so
|
|
30
31
|
// does a call without `cwd` (on the repository);
|
|
31
32
|
// - medium (`moyen`): it starts a process (it imports `child_process`, `execa` or `zx`), or it
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
// The night tests of a project, the command `tests-de-nuit` of the module typescript
|
|
3
3
|
// (scripts/jointure.d.ts), which the night (scripts/nuit.sh) runs in its copy after the full pass,
|
|
4
|
-
// through its mounts.
|
|
4
|
+
// through its mounts. Mechanism: packages/grillhouse/docs/architecture/tests.md, §3.3 (the module
|
|
5
|
+
// of a language) and the document of the entry on main, §5.3 (the night).
|
|
5
6
|
//
|
|
6
7
|
// node tests-de-nuit.mjs from the root of the copy: the night of the poste
|
|
7
8
|
// node tests-de-nuit.mjs --hors-du-poste the night of an equipped runner: all but @poste
|
|
8
9
|
// node tests-de-nuit.mjs --hors-du-poste --sans-equipement all but @poste and @equipee
|
|
9
|
-
// node tests-de-nuit.mjs --du-poste the tests tagged @poste
|
|
10
|
+
// node tests-de-nuit.mjs --du-poste the tests tagged @poste, then the measures of time unless
|
|
11
|
+
// the project's Nuit flow plays them
|
|
10
12
|
// node tests-de-nuit.mjs --mesures the benches and the time witnesses alone
|
|
11
13
|
// node tests-de-nuit.mjs --hors-du-poste --tranche i/n its tranche i of n
|
|
12
14
|
//
|
|
@@ -19,8 +21,8 @@
|
|
|
19
21
|
// the copy: `npx --no-install vitest run --root <copie> --config <configuration>`, once for the
|
|
20
22
|
// night tests (GRILLHOUSE_TESTS_DE_NUIT=nuit), then once for the measures alone, one file at a
|
|
21
23
|
// time (GRILLHOUSE_TESTS_DE_NUIT=mesures), as Bazel plays a test tagged `exclusive` after the
|
|
22
|
-
// others, nothing beside it, and as the module cargo plays its benches after its night tests
|
|
23
|
-
//
|
|
24
|
+
// others, nothing beside it, and as the module cargo plays its benches after its night tests.
|
|
25
|
+
// Each run plays when the copy holds its files.
|
|
24
26
|
// - Each run plays one Vitest per unit: the root under the frame's configuration alone, and each
|
|
25
27
|
// directory below it that holds a Vitest configuration (`vitest.config.*`, else `vite.config.*`)
|
|
26
28
|
// with `--root` at that directory, under that configuration merged with the frame's, what the
|
|
@@ -54,6 +56,7 @@ import { fileURLToPath, pathToFileURL } from 'node:url';
|
|
|
54
56
|
import {
|
|
55
57
|
A_REPASSER,
|
|
56
58
|
avecLaPasse,
|
|
59
|
+
fluxDuProjetJoueLesMesures,
|
|
57
60
|
LA_FORME,
|
|
58
61
|
lireLaTranche,
|
|
59
62
|
} from '../../services-du-noyau.mjs';
|
|
@@ -148,7 +151,11 @@ export function runsDeLaNuit(
|
|
|
148
151
|
: [];
|
|
149
152
|
}
|
|
150
153
|
if (duPoste) {
|
|
151
|
-
|
|
154
|
+
// The night of the poste leaves the flow of the project the measures it declares it plays.
|
|
155
|
+
const mesures =
|
|
156
|
+
(enTient(racine, estUnBanc) || fichiersTemoins(racine).length > 0) &&
|
|
157
|
+
!fluxDuProjetJoueLesMesures(racine);
|
|
158
|
+
return [testsDuPoste(racine).length > 0 && 'du-poste', mesures && 'mesures'].filter(Boolean);
|
|
152
159
|
}
|
|
153
160
|
if (mesuresSeules) {
|
|
154
161
|
return enTient(racine, estUnBanc) || fichiersTemoins(racine).length > 0 ? ['mesures'] : [];
|
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
// runner) does not have bears the tag `@poste` in the comment at its head (`porteLEtiquetteDuPoste`
|
|
4
4
|
// of ./vitest-config/cibles.mjs), as Bazel's tags (`manual`, `exclusive`) and pytest's markers live
|
|
5
5
|
// with the test; the night of a shared machine leaves it out (`tests-de-nuit --hors-du-poste`), the
|
|
6
|
-
// night of the poste plays it. The tag lives in the test, never in a list beside it.
|
|
6
|
+
// night of the poste plays it. The tag lives in the test, never in a list beside it. Mechanism:
|
|
7
|
+
// packages/grillhouse/docs/architecture/tests.md, §3.4 (the guards).
|
|
7
8
|
//
|
|
8
9
|
// npx grillhouse tests-du-poste run from the repository root (a guard of grillhouse:gardes)
|
|
9
10
|
//
|
|
@@ -21,6 +22,13 @@
|
|
|
21
22
|
// keyring, the session of the user (`/run/user/`), or the command claude started for more than
|
|
22
23
|
// `plugin` or `--version` (a session, a model). A mark the reading does not see (a path built at
|
|
23
24
|
// run time, a dependency of the product's code) escapes it: such a test takes the tag by hand.
|
|
25
|
+
// - A night test that plays other night tests by their name carries what they ask, as a tag of
|
|
26
|
+
// Bazel reaches the target that runs the tagged one: a string of its code, or of its material's,
|
|
27
|
+
// that ends with the name of a night test (`tests/enveloppe.nuit.spec.ts`) names each night
|
|
28
|
+
// test of the repository whose path is that string or ends with it from a directory. A test
|
|
29
|
+
// named that bears the tag `@poste`, or shows a mark of the poste, is a mark of the poste of
|
|
30
|
+
// the one that names it; one tagged `@equipee`, or showing a mark of equipment, a mark of
|
|
31
|
+
// equipment. A name built at run time is not read.
|
|
24
32
|
// - A night test that depends on the poste without the tag is a finding,
|
|
25
33
|
// `{ fichier, regle: 'poste-sans-etiquette', message }`, naming its marks; a tag without a mark
|
|
26
34
|
// passes. A finding inscribed in the project's debt (`grillhouse-dette.json`, ../../dette.mjs)
|
|
@@ -91,17 +99,21 @@ export const DEPENDANCES = [
|
|
|
91
99
|
},
|
|
92
100
|
];
|
|
93
101
|
|
|
102
|
+
// A string of the code that ends with the name of a night test, to the end of its string.
|
|
103
|
+
const TEST_NOMME = /['"`]((?:[\w.@-]+\/)*[\w.@-]+\.nuit\.(?:test|spec)\.[cm]?[jt]sx?)['"`]/g;
|
|
104
|
+
|
|
94
105
|
/**
|
|
95
106
|
* The marks of the poste the test file <fichier> (absolute) shows, with the test material it
|
|
96
107
|
* imports by a relative path, read by <lire> (a path → its text, null when it does not read), in
|
|
97
108
|
* the repository at <racine>: the names of DEPENDANCES, each once, in their order.
|
|
98
109
|
*/
|
|
99
110
|
export function dependancesDu(fichier, lire = lireLeDisque, racine = path.parse(fichier).root) {
|
|
100
|
-
return
|
|
111
|
+
return DEPENDANCES.filter(d => d.voit(codeDu(fichier, lire, racine))).map(d => d.nom);
|
|
101
112
|
}
|
|
102
113
|
|
|
103
|
-
// The
|
|
104
|
-
|
|
114
|
+
// The code of the test file <fichier> and of the test material it imports by a relative path,
|
|
115
|
+
// from file to file, their comments and imports left out.
|
|
116
|
+
function codeDu(fichier, lire, racine) {
|
|
105
117
|
const vus = new Set();
|
|
106
118
|
const codes = [];
|
|
107
119
|
const suivre = f => {
|
|
@@ -124,28 +136,56 @@ function marquesDu(fichier, lire, racine) {
|
|
|
124
136
|
}
|
|
125
137
|
};
|
|
126
138
|
suivre(fichier);
|
|
127
|
-
|
|
128
|
-
|
|
139
|
+
return codes.join('\n');
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
// The night tests of <fichiers> (each from the root) the code <tout> of <fichier> names: those
|
|
143
|
+
// whose path is a string of the code, or ends with it from a directory; itself left out.
|
|
144
|
+
function nommesPar(fichier, tout, fichiers) {
|
|
145
|
+
const noms = new Set([...tout.matchAll(TEST_NOMME)].map(m => m[1].replace(/^(?:\.\/)+/, '')));
|
|
146
|
+
return fichiers.filter(f => f !== fichier && [...noms].some(n => f === n || f.endsWith(`/${n}`)));
|
|
129
147
|
}
|
|
130
148
|
|
|
131
149
|
/**
|
|
132
150
|
* Each night test of the repository at <racine>: `[{ fichier, etiquete, equipee, marques }]`,
|
|
133
151
|
* `fichier` from its root, `etiquete` whether it bears the tag `@poste`, `equipee` whether it bears
|
|
134
|
-
* the tag `@equipee`, `marques` the marks it shows, `{ nom, classe }` each
|
|
152
|
+
* the tag `@equipee`, `marques` the marks it shows, `{ nom, classe }` each: those of
|
|
153
|
+
* DEPENDANCES, then one per class for each night test it names that asks for that class.
|
|
154
|
+
* @param {string} racine the root of the repository
|
|
155
|
+
* @returns {{ fichier: string, etiquete: boolean, equipee: boolean, marques: { nom: string, classe: string }[] }[]}
|
|
135
156
|
*/
|
|
136
157
|
export function testsDeNuitDuDepot(racine) {
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
.
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
}
|
|
158
|
+
const fichiers = testsDuDepot(racine).filter(estUnTestDeNuit);
|
|
159
|
+
const lus = fichiers.map(fichier => {
|
|
160
|
+
const abs = path.join(racine, fichier);
|
|
161
|
+
const texte = lireLeDisque(abs) ?? '';
|
|
162
|
+
const tout = codeDu(abs, lireLeDisque, racine);
|
|
163
|
+
return {
|
|
164
|
+
fichier,
|
|
165
|
+
etiquete: porteLEtiquetteDuPoste(texte),
|
|
166
|
+
equipee: porteLEtiquetteEquipee(texte),
|
|
167
|
+
marques: DEPENDANCES.filter(d => d.voit(tout)).map(({ nom, classe }) => ({ nom, classe })),
|
|
168
|
+
nommes: nommesPar(fichier, tout, fichiers),
|
|
169
|
+
};
|
|
170
|
+
});
|
|
171
|
+
const parFichier = new Map(lus.map(t => [t.fichier, t]));
|
|
172
|
+
// Whether the night test <t> asks for the class <classe>: its tag, or a mark it shows itself.
|
|
173
|
+
const demande = (t, classe) =>
|
|
174
|
+
(classe === 'poste' ? t.etiquete : t.equipee) || t.marques.some(m => m.classe === classe);
|
|
175
|
+
return lus.map(({ nommes, ...t }) => ({
|
|
176
|
+
...t,
|
|
177
|
+
marques: [
|
|
178
|
+
...t.marques,
|
|
179
|
+
...['poste', 'equipee'].flatMap(classe =>
|
|
180
|
+
nommes
|
|
181
|
+
.filter(n => demande(parFichier.get(n), classe))
|
|
182
|
+
.map(n => ({
|
|
183
|
+
nom: `${n}, ${classe === 'poste' ? 'test du poste' : 'test équipé'} joué par son nom`,
|
|
184
|
+
classe,
|
|
185
|
+
}))
|
|
186
|
+
),
|
|
187
|
+
],
|
|
188
|
+
}));
|
|
149
189
|
}
|
|
150
190
|
|
|
151
191
|
/**
|
|
@@ -155,8 +195,7 @@ export function testsDeNuitDuDepot(racine) {
|
|
|
155
195
|
* `@equipee` (REGLE_EQUIPEE).
|
|
156
196
|
*/
|
|
157
197
|
export function verifier(racine, tous = testsDeNuitDuDepot(racine)) {
|
|
158
|
-
const noms = (marques, classe) =>
|
|
159
|
-
marques.filter(m => m.classe === classe).map(m => m.nom);
|
|
198
|
+
const noms = (marques, classe) => marques.filter(m => m.classe === classe).map(m => m.nom);
|
|
160
199
|
return tous.flatMap(({ fichier, etiquete, equipee, marques }) => {
|
|
161
200
|
/** @type {{ fichier: string, regle: string, message: string }[]} */
|
|
162
201
|
const constats = [];
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
// The day's tests, as Turborepo's tasks (`npm test`, `npm run test:forcer`): the build, then the
|
|
3
3
|
// `test:unit` of each package, an unchanged task replayed from Turborepo's cache.
|
|
4
|
+
// Mechanism: packages/grillhouse/docs/architecture/tests.md, §3.1 (command of the tests), §5.4.
|
|
4
5
|
//
|
|
5
6
|
// npx grillhouse tests [--force] [<path>…] [--<option>=<value>…]
|
|
6
7
|
//
|
|
@@ -9,79 +10,56 @@
|
|
|
9
10
|
// - A path is written from the root of the repository: a test file or a directory. In a repository
|
|
10
11
|
// of packages, each path plays in the package that holds it: Turborepo runs the `test:unit` of
|
|
11
12
|
// those packages only (`--filter=<name>`), and their Vitest receives each path made absolute,
|
|
12
|
-
// which it matches against its own test files
|
|
13
|
-
//
|
|
14
|
-
//
|
|
15
|
-
// root
|
|
16
|
-
//
|
|
17
|
-
//
|
|
18
|
-
//
|
|
19
|
-
// as they are.
|
|
20
|
-
// - The paths and the options reach Vitest in the variable `GRILLHOUSE_TESTS`
|
|
21
|
-
// (scripts/langages/typescript/vitest-config/cibles.mjs), which the `env` of the task `test:unit` names, never
|
|
22
|
-
// after `--`: Turborepo passes the arguments after `--` to the tasks the command names only, and
|
|
23
|
-
// counts them in the hash of every task of the run (its documentation, « Caching »: « including
|
|
24
|
-
// dependencies of `build` that did not receive `--arg=value` »), where a variable of a task's
|
|
25
|
-
// `env` enters that task's hash alone. So a run with paths is one Turborepo run of the tests with
|
|
13
|
+
// which it matches against its own test files. A path out of every package, in a package out of
|
|
14
|
+
// the frame (`docs/agents/hors-cadre.txt`), or in a package without a `test:unit` script is
|
|
15
|
+
// refused, named, and nothing plays. In a repository without packages, the paths go to the
|
|
16
|
+
// root's Vitest as they are.
|
|
17
|
+
// - The paths and the options reach Vitest in `GRILLHOUSE_TESTS` (vitest-config/cibles.mjs), which
|
|
18
|
+
// the `env` of the task `test:unit` names, never after `--` (Turborepo counts those arguments
|
|
19
|
+
// in the hash of every task of the run). A run with paths is one Turborepo run of the tests with
|
|
26
20
|
// what they depend on (`turbo run test:unit --filter=<name>`); a package named whole (the exact
|
|
27
21
|
// folder of a package) carries no path: it plays under the hash of the complete pass, and a run
|
|
28
|
-
// that mixes it with files of another package is two runs, the code the first that is not 0
|
|
29
|
-
//
|
|
30
|
-
//
|
|
31
|
-
//
|
|
32
|
-
//
|
|
33
|
-
// Turborepo plays with the variable unset.
|
|
34
|
-
// - Each run of Turborepo plays every task whose dependencies succeed
|
|
35
|
-
// (`--continue=dependencies-successful`), as Bazel's `--keep_going` and `npm run verifier` do:
|
|
36
|
-
// each build that fails is named on Turborepo's line « Failed: », a test that waits for a failed
|
|
37
|
-
// build does not play, and the exit code stays red. A build that fails first does not hide another
|
|
38
|
-
// one, which the run would otherwise cancel unreported.
|
|
22
|
+
// that mixes it with files of another package is two runs, the code the first that is not 0.
|
|
23
|
+
// Every other run of Turborepo plays with the variable unset.
|
|
24
|
+
// - Each run plays every task whose dependencies succeed (`--continue=dependencies-successful`):
|
|
25
|
+
// each build that fails is named on Turborepo's line « Failed: », a test that waits for it does
|
|
26
|
+
// not play, and the exit code stays red.
|
|
39
27
|
// - `--force` with paths plays the tests named for real, their builds replayed from the cache:
|
|
40
|
-
//
|
|
41
|
-
// the run instead (`rejouer`), a value no cached run of the tests has. A test suspected unstable
|
|
42
|
-
// is played again, and a build, which the same inputs give again, is not.
|
|
28
|
+
// the variable carries the moment of the run (`rejouer`) instead of Turborepo's `--force`.
|
|
43
29
|
// - In the envelope of an agent (`GRILLHOUSE_ENVELOPPE`, scripts/enveloppe/paquets-du-plan.mjs),
|
|
44
|
-
// the packages out of its plan and their traces arrive built
|
|
45
|
-
//
|
|
46
|
-
// packages their tests wait for, which live in the package the agent writes
|
|
30
|
+
// the packages out of its plan and their traces arrive built and read-only: the build is the
|
|
31
|
+
// named packages' alone, with the traces of those packages their tests wait for
|
|
47
32
|
// (`turbo run build <name>#trace:<t>… --only --filter=<name>`, their task ids read in
|
|
48
|
-
//
|
|
49
|
-
//
|
|
50
|
-
//
|
|
51
|
-
//
|
|
52
|
-
//
|
|
53
|
-
//
|
|
54
|
-
//
|
|
55
|
-
//
|
|
56
|
-
// (`sortiesDeTest`, scripts/enveloppe/enveloppe.mjs), never into its source. A package out of
|
|
57
|
-
// the plan has no such directories: Turborepo and Vite cannot write its logs and its cache, and
|
|
58
|
-
// a run of its tests fails on « Read-only file system »; its tests play out of the envelope. The
|
|
59
|
-
// verdict that counts is the reviewer's and the integration's, out of the envelope.
|
|
33
|
+
// `turbo run test:unit --filter=<name> --dry=json`), never their dependencies nor a neighbour's
|
|
34
|
+
// trace; then the tests alone (`turbo run test:unit --only --filter=<name>`), the paths in the
|
|
35
|
+
// variable. A named package that the envelope shows read-only (`inscriptible`: one out of the
|
|
36
|
+
// plan; the shared test material, for every role but the testwriter) is not built, nor are its
|
|
37
|
+
// traces. The shared test material plays its tests as it is, the logs of its tasks going to the
|
|
38
|
+
// envelope's directories proper to the session (`sortiesDeTest`, scripts/enveloppe/enveloppe.mjs).
|
|
39
|
+
// A package out of the plan has none: its tests fail on « Read-only file system » and play out
|
|
40
|
+
// of the envelope.
|
|
60
41
|
// - An argument that begins with « - » is an option of Vitest, written `--<name>=<value>`, carried
|
|
61
42
|
// in the variable beside the paths.
|
|
62
|
-
// - A
|
|
63
|
-
// file, under the measure of time of the day's configuration (
|
|
64
|
-
// a
|
|
65
|
-
//
|
|
66
|
-
//
|
|
67
|
-
// -
|
|
68
|
-
//
|
|
69
|
-
// does (scripts/dernier-vert.mjs): in a
|
|
70
|
-
//
|
|
71
|
-
//
|
|
72
|
-
// plays.
|
|
73
|
-
//
|
|
74
|
-
//
|
|
75
|
-
//
|
|
76
|
-
//
|
|
77
|
-
//
|
|
78
|
-
//
|
|
79
|
-
//
|
|
80
|
-
//
|
|
81
|
-
//
|
|
82
|
-
// of the bases a killed run left: it names it in TMPDIR, TMP and TEMP to every run of
|
|
83
|
-
// Turborepo, whose root's `globalPassThroughEnv` passes TMPDIR on to every task, and removes it
|
|
84
|
-
// at its end, green, red or interrupted (SIGINT, SIGTERM, SIGHUP).
|
|
43
|
+
// - A time budget bench or a time witness, which the day leaves out, plays when a path names its
|
|
44
|
+
// own file, under the measure of time of the day's configuration (vitest-config/cibles.mjs);
|
|
45
|
+
// a night test named is refused, naming it, and nothing plays (./tests-de-nuit.mjs); a
|
|
46
|
+
// directory or a package named leaves them all out.
|
|
47
|
+
// - A run that plays no test fails: the base configuration of Vitest keeps `passWithNoTests:
|
|
48
|
+
// false` (vitest-config/base.mjs).
|
|
49
|
+
// - Under the circuit's mark (`GRILLHOUSE_DEPUIS_LE_VERT`, scripts/circuit.mjs), a run measures
|
|
50
|
+
// itself against the last green as `npm run verifier` does (scripts/dernier-vert.mjs): in a
|
|
51
|
+
// package or a directory named, the tests Vitest relates to the files changed since it, every
|
|
52
|
+
// test when a change lies out of Vitest's graph; a file named itself plays, changed or not;
|
|
53
|
+
// `--force` plays them all. Without the mark, every test named plays. With the base of the lot
|
|
54
|
+
// besides (`GRILLHOUSE_BASE_DU_LOT`), it measures against that base, targeted.
|
|
55
|
+
// - While the environment names a results directory (`GRILLHOUSE_RESULTATS`), each run of
|
|
56
|
+
// Turborepo writes its summary (`--summarize`), moved there, and Vitest its JSON report there.
|
|
57
|
+
// - While it names the progress directory of a pass (`GRILLHOUSE_AVANCEMENT`,
|
|
58
|
+
// scripts/avancement.mjs), each run plans its tasks first, and Vitest writes there the files
|
|
59
|
+
// done and planned of each.
|
|
60
|
+
// - The base of the run (scripts/mesure/base-de-passe.mjs), swept first of the bases a killed run
|
|
61
|
+
// left: named in TMPDIR, TMP and TEMP to every run of Turborepo (`globalPassThroughEnv`), and
|
|
62
|
+
// removed at the end, green, red or interrupted (SIGINT, SIGTERM, SIGHUP).
|
|
85
63
|
// The exit code is Turborepo's; 2 for a path refused.
|
|
86
64
|
import { spawnSync } from 'node:child_process';
|
|
87
65
|
import { accessSync, constants, existsSync, readdirSync, statSync } from 'node:fs';
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
// The title of a test, on the model of Software Engineering at Google (ch. 12: « write a test for
|
|
3
3
|
// each behavior »): a test bears the name of the behavior it proves, never a ticket's or a
|
|
4
4
|
// « critère N »; a test whose title does not say its behavior ends deleted. The ticket goes to the
|
|
5
|
-
// commit message.
|
|
5
|
+
// commit message. The guard `titres-de-tests` (packages/grillhouse/docs/architecture/tests.md §3.4).
|
|
6
6
|
//
|
|
7
7
|
// npx grillhouse titres-de-tests run from the repository root (a guard of grillhouse:gardes)
|
|
8
8
|
//
|
|
9
9
|
// - The count is a union: a title counts once if it names a ticket of the project (its prefix, read
|
|
10
10
|
// from the key `issue-prefix` of `.beads/config.yaml`, committed, never by `bd`, which a CI does
|
|
11
11
|
// not have; the guard names the file or the key when it is missing), followed by an
|
|
12
|
-
// identifier
|
|
12
|
+
// identifier) or a « critère N » (or « critères N »), or both.
|
|
13
13
|
// - The guard reads the Vitest tests of the project (the files `*.test.*` and `*.spec.*` of every
|
|
14
14
|
// component, the night tests included, as ./tailles-des-tests.mjs lists them): the calls
|
|
15
15
|
// `describe`, `it` and `test` and their variants (`skip`, `only`, `each`, `todo`...). It sees the
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// The tranches of a pass (`npm run verifier -- --tranche i/n`, ./verifier.mjs), as Vitest shards
|
|
2
2
|
// a run (`--shard=i/n`, `--reporter=blob`, then `--merge-reports`: https://vitest.dev/guide/improving-performance#sharding),
|
|
3
|
-
// and the command `fusion-des-tranches` of the module typescript, which merges them.
|
|
3
|
+
// and the command `fusion-des-tranches` of the module typescript, which merges them. Mechanism:
|
|
4
|
+
// packages/grillhouse/docs/architecture/tests.md, §3.1 (merge of the tranches), §5.1.
|
|
4
5
|
//
|
|
5
6
|
// npx grillhouse fusion-des-tranches from the root of the project, once every tranche played
|
|
6
7
|
//
|