@roomi-fields/grillhouse 0.32.0 → 0.33.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.
Files changed (116) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/CHANGELOG.md +22 -0
  3. package/bin/grillhouse.mjs +6 -4
  4. package/cadre/templates/projet/.github/workflows/ci.yml +136 -16
  5. package/cadre/templates/projet/.github/workflows/nuit.yml +111 -0
  6. package/cadre/templates/projet/deployment/docs/01-INSTALL.md +4 -4
  7. package/cadre/templates/projet/package.json +2 -2
  8. package/charte.md +8 -5
  9. package/dist/temporal/circuit/contrat.d.ts +15 -0
  10. package/dist/temporal/circuit/deroule.js +37 -14
  11. package/dist/temporal/circuit/deroule.js.map +1 -1
  12. package/dist/temporal/deroules.d.ts +1 -0
  13. package/dist/temporal/deroules.js +3 -1
  14. package/dist/temporal/deroules.js.map +1 -1
  15. package/dist/temporal/file/activites.d.ts +1 -0
  16. package/dist/temporal/file/activites.js +5 -2
  17. package/dist/temporal/file/activites.js.map +1 -1
  18. package/dist/temporal/file/contrat.d.ts +50 -33
  19. package/dist/temporal/file/contrat.js +2 -2
  20. package/dist/temporal/file/contrat.js.map +1 -1
  21. package/dist/temporal/file/deroule.d.ts +3 -1
  22. package/dist/temporal/file/deroule.js +128 -26
  23. package/dist/temporal/file/deroule.js.map +1 -1
  24. package/dist/temporal/nuits/activites.d.ts +10 -0
  25. package/dist/temporal/nuits/activites.js +114 -0
  26. package/dist/temporal/nuits/activites.js.map +1 -0
  27. package/dist/temporal/nuits/appel.d.ts +23 -0
  28. package/dist/temporal/nuits/appel.js +40 -0
  29. package/dist/temporal/nuits/appel.js.map +1 -0
  30. package/dist/temporal/nuits/choix.d.ts +14 -0
  31. package/dist/temporal/nuits/choix.js +119 -0
  32. package/dist/temporal/nuits/choix.js.map +1 -0
  33. package/dist/temporal/nuits/client.d.ts +28 -0
  34. package/dist/temporal/nuits/client.js +83 -0
  35. package/dist/temporal/nuits/client.js.map +1 -0
  36. package/dist/temporal/nuits/commande.d.ts +2 -0
  37. package/dist/temporal/nuits/commande.js +107 -0
  38. package/dist/temporal/nuits/commande.js.map +1 -0
  39. package/dist/temporal/nuits/contrat.d.ts +98 -0
  40. package/dist/temporal/nuits/contrat.js +30 -0
  41. package/dist/temporal/nuits/contrat.js.map +1 -0
  42. package/dist/temporal/nuits/deroule.d.ts +5 -0
  43. package/dist/temporal/nuits/deroule.js +100 -0
  44. package/dist/temporal/nuits/deroule.js.map +1 -0
  45. package/dist/temporal/travailleur.js +4 -1
  46. package/dist/temporal/travailleur.js.map +1 -1
  47. package/docs/ARCHITECTURE.md +186 -45
  48. package/docs/CADRE.md +31 -1
  49. package/docs/INTERFACE.md +45 -6
  50. package/hooks/register.tsx +11 -3
  51. package/package.json +4 -1
  52. package/scripts/abi-des-dependances.mjs +105 -0
  53. package/scripts/activites.mjs +94 -41
  54. package/scripts/aiguillage.mjs +1 -0
  55. package/scripts/avancement.mjs +8 -18
  56. package/scripts/ci-des-branches.mjs +91 -0
  57. package/scripts/circuit.mjs +79 -4
  58. package/scripts/composants-affectes.mjs +24 -7
  59. package/scripts/composition-des-langages.mjs +3 -0
  60. package/scripts/crochets.mjs +4 -0
  61. package/scripts/enveloppe/enveloppe.mjs +3 -1
  62. package/scripts/enveloppe/lancer.sh +1 -1
  63. package/scripts/enveloppe/travail-de-la-copie.mjs +219 -59
  64. package/scripts/etapes.mjs +18 -1
  65. package/scripts/faits-du-circuit.mjs +43 -20
  66. package/scripts/fichier-du-poste.mjs +87 -0
  67. package/scripts/grillhouse-maj.mjs +15 -1
  68. package/scripts/integration/file.mjs +215 -275
  69. package/scripts/integration/integrer.mjs +82 -41
  70. package/scripts/integration/rejeu.mjs +13 -64
  71. package/scripts/jointure.d.ts +26 -2
  72. package/scripts/langages/cargo/commandes.mjs +81 -19
  73. package/scripts/langages/cargo/exemples.mjs +2 -2
  74. package/scripts/langages/cargo/index.mjs +11 -5
  75. package/scripts/langages/cargo/tailles-des-tests.mjs +19 -11
  76. package/scripts/langages/python/commandes.mjs +11 -7
  77. package/scripts/langages/python/exemples.mjs +1 -1
  78. package/scripts/langages/python/index.mjs +9 -2
  79. package/scripts/langages/python/tailles-des-tests.mjs +19 -11
  80. package/scripts/langages/typescript/code-mort.mjs +41 -24
  81. package/scripts/langages/typescript/consommateurs.mjs +28 -17
  82. package/scripts/langages/typescript/exemples.mjs +2 -0
  83. package/scripts/langages/typescript/index.mjs +22 -3
  84. package/scripts/langages/typescript/migrations/0.33.0-binaire-de-jour.mjs +34 -0
  85. package/scripts/langages/typescript/migrations/0.33.0-tests-du-poste.mjs +31 -0
  86. package/scripts/langages/typescript/resumes.mjs +17 -7
  87. package/scripts/langages/typescript/tailles-des-tests.mjs +251 -22
  88. package/scripts/langages/typescript/tests-de-nuit.mjs +101 -9
  89. package/scripts/langages/typescript/tests-du-poste.mjs +172 -0
  90. package/scripts/langages/typescript/tranches.mjs +273 -0
  91. package/scripts/langages/typescript/verifier.mjs +131 -29
  92. package/scripts/langages/typescript/vitest-config/cibles.mjs +78 -7
  93. package/scripts/langages/typescript/vitest-config/lances.mjs +4 -4
  94. package/scripts/langages/typescript/vitest-config/machine.setup.mjs +9 -0
  95. package/scripts/langages/typescript/vitest.nuit.config.mjs +3 -2
  96. package/scripts/lint-des-scripts.mjs +23 -6
  97. package/scripts/migrations/0.33.0-cache-distant.mjs +36 -0
  98. package/scripts/migrations/0.33.0-ci-des-branches-de-ticket.mjs +31 -0
  99. package/scripts/migrations/0.33.0-ci-du-cadre.mjs +31 -0
  100. package/scripts/migrations/0.33.0-node-26.mjs +58 -0
  101. package/scripts/migrations.mjs +8 -0
  102. package/scripts/newday.mjs +18 -0
  103. package/scripts/nuit.sh +35 -17
  104. package/scripts/registre.d.mts +90 -0
  105. package/scripts/registre.mjs +28 -3
  106. package/scripts/reprise.mjs +12 -8
  107. package/scripts/services-du-noyau.mjs +4 -0
  108. package/scripts/session-start.sh +28 -32
  109. package/scripts/sous-commandes.mjs +29 -10
  110. package/scripts/tableau.mjs +124 -17
  111. package/scripts/taches-du-graphe.mjs +39 -6
  112. package/scripts/transitions.mjs +42 -3
  113. package/scripts/verrou-de-machine.mjs +1 -2
  114. package/scripts/workflows-du-cadre.mjs +75 -0
  115. package/skills/grill/SKILL.md +8 -6
  116. package/skills/pitmaster/SKILL.md +5 -4
@@ -5,5 +5,5 @@
5
5
  "author": {
6
6
  "name": "Romain Peyrichou"
7
7
  },
8
- "version": "0.32.0"
8
+ "version": "0.33.0"
9
9
  }
package/CHANGELOG.md CHANGED
@@ -6,6 +6,28 @@ The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.33.0] - 2026-11-11
10
+
11
+ - **The remote cache of Turborepo is shared between the CI and the poste** (grillhouse-44b.12.6): the CI of main after the fast-forward replayed a tree the CI of the ticket's branch had just judged, 12 to 14 min per lot. The CI of Grillhouse and the template's now take the server of a remote cache of Turborepo from the repository's variables `TURBO_API` and `TURBO_TEAM`, its token and the key of its signature from the secrets `TURBO_TOKEN` and `TURBO_REMOTE_CACHE_SIGNATURE_KEY`, in the environment of the workflow; a push to main or to a branch `agent/**` writes the cache (`TURBO_CACHE=local:rw,remote:rw`), every other run reads it alone (`local:rw,remote:r`), and without `TURBO_API` the cache stays the runner's (`local:rw`); no step is added. The root's `turbo.json` of Grillhouse signs the artifacts (`remoteCache.signature`); Grillhouse's server is a self-hosted `ducktors/turborepo-remote-cache`. On the poste, each command of the module of the language (`tests`, `verifier`, hence the night and the circuit's passes) reads the same four variables from `~/.config/grillhouse/turbo-cache.env` (`$XDG_CONFIG_HOME/grillhouse/` when it is set), the cache read alone; without the file nothing changes, and an environment that already names one of its variables (a CI on a runner of the poste) keeps its own. The module answers the new member of the join `environnementDuPoste`, by the core's `avecLeFichierDuPoste` (`scripts/fichier-du-poste.mjs`). The session of an agent gets neither the file nor the variables: its runs keep to the local cache of the main tree that every copy shares. **Action for projects**: none — `npx grillhouse maj` rewrites the marked workflows of the frame, which keep the local cache without the variables, and the migration 0.33.0 says once, to a project whose `turbo.json` does not sign, how to plug a server (the variables and secrets of the repository, `"remoteCache": { "signature": true }`, the file of the poste).
12
+ - **The frame, its CI and the poste run on Node 26, the active LTS** (grillhouse-3uv.99): Node 22 is in maintenance alone until 30 April 2027. The CI of each lot now plays Node 26, the night on GitHub and the release play Node 24 and 26 (the oldest supported LTS and the active one), the build job and the publication run on Node 26; `engines.node` is `>=24.0.0` at the root, in the package `@roomi-fields/grillhouse` and in the template of a project, whose `packageManager` names npm 11.20.0, the npm of Node 26. Every native module of the frame (Temporal's core bridge, swc, rollup, oxc) is a Node-API module and loads under Node 26 unchanged; npm 11.20 skips a dependency's install script unless `allowScripts` allows it, and the frame denies the three it holds (`@swc/core`, `protobufjs`, `esbuild`), whose binaries come from their optional packages. A complete installation (`npm ci`) now notes the binary interface of its Node in `node_modules/.grillhouse-abi` (`scripts/abi-des-dependances.mjs`), by the project's `prepare` and by the night after its own: the night installs again when the mark is not its Node's, an absent mark included, as it does when `package-lock.json` moves, and the session start names under « Manque » dependencies installed under another Node, with `npm ci`. **Action for projects**: install Node 26 (`nvm install 26`, then `nvm alias default 26`) and run `npx grillhouse maj` (migration 0.33.0: `engines.node` `>=22.0.0` becomes `>=24.0.0` and `packageManager` `npm@10.9.8` becomes `npm@11.20.0` when the project still holds the template's former values), then `npm ci` once under Node 26 in the project, which rebuilds its native modules and notes the Node; afterwards the night reinstalls by itself and the session start says when an installation lags behind the Node. Under npm 11.20, `npm install-scripts ls` lists the dependencies whose install script was skipped: approve (`npm install-scripts approve <paquet>`) those the project needs. Once per machine, the supervisor reinstalls the units of Temporal under Node 26 (`npx grillhouse temporal installer`, which takes the path of the Node that runs it).
13
+
14
+ - **The frame carries the CI of a project** (grillhouse-44b.12.7): the template of a project holds `.github/workflows/ci.yml`, the CI of a lot as Grillhouse plays its own (the job `gardes`, `npm run verifier -- --sans-tests`; 3 tranches, `--tranche i/n`, a push measured against the commit before it, `--base ${{ github.event.before }}`; their merge, `grillhouse fusion-des-tranches`; no job of build or `npm pack`, since the guard tasks of `gardes` wait for the build of every package; it also runs on the branches `agent/**` the queue pushes), and `.github/workflows/nuit.yml`, the night tests out of the poste (`grillhouse tests-de-nuit --hors-du-poste --tranche i/n`, then their merge), each night on Node 22 and 24. Every job runs on the repository's variable `RUNNER`, `${{ fromJSON(vars.RUNNER || '"ubuntu-latest"') }}` (a label or a list of labels in JSON, SyntHub's convention), GitHub's `ubuntu-latest` without it; uv is installed on GitHub's runner for a project with a `pyproject.toml`. No step of a remote cache of Turborepo. A tranche now covers every language, each test played once in the union of the tranches: the task of tests of a crate passes nextest its own split (`--partition hash:i/n`, `--no-tests=warn` for an empty part) and plays its doctests and named benches in the first tranche alone; a package of Python, which pytest does not split, plays its tests in the first tranche alone; the tranche reaches each module by the variable of the tests, read by `cheminsDeLaTache` of the core, which now returns it. `grillhouse fusion-des-tranches` reads Vitest's reports alone: a red of cargo or Python is the red of its tranche's job. Each of these workflows bears on its first line the mark « Généré par `npx grillhouse maj` », as a generated file: `npx grillhouse maj` rewrites each marked workflow that differs from the template and writes the one a project lacks once it holds one of them; a workflow without the mark is the project's and is never touched, and a project with no workflow of the frame receives none. Grillhouse's own workflows now read `RUNNER` the same way, so a list of labels works there too. **Action for projects**: none to keep a CI of the project's own — `npx grillhouse maj` (migration 0.33.0) writes nothing and says once how to adopt the frame's: copy `node_modules/@roomi-fields/grillhouse/cadre/templates/projet/.github/workflows/ci.yml` into `.github/workflows/` (it replaces a `ci.yml` of the project, whose own steps move to another workflow), then `npx grillhouse maj`, which writes `nuit.yml` and keeps both at the frame's version from then on. The variable `RUNNER` (Settings > Secrets and variables > Actions > Variables) is optional: without it the jobs run on `ubuntu-latest`; with it, on the runner it names (`"self-hosted"`, `["self-hosted","linux"]`). The update never writes it.
15
+ - **The session start names a line of the table of tasks that still launches the night as the table writes it** (grillhouse-jye): the lines were joined by « ; », then every semicolon spaced, one of the line itself included (`export PATH=…:$PATH; cd …` named `$PATH ; cd …`); they are now joined alone, each line kept as it is. The guard `tests-du-poste` also sees the envelope by its module and by its night tests played by their name (`'enveloppe.lanceur'`), and the binaries of the module cargo by the template of a project of Rust (`templates/cargo`), whose package's creation installs cargo-nextest, cargo-deny and sccache when the machine lacks them.
16
+ - **The frame's night plays on GitHub, without any measure of time, and a night test that depends on the poste bears the tag `@poste`** (grillhouse-44b.12.4): a new scheduled workflow, `.github/workflows/nuit.yml` (declared in `grillhouse.flux`), plays each night, on Node 22 and 24, the night tests but those tagged `@poste`, in 3 tranches then a merge, as `ci.yml` plays the verification: each job runs `grillhouse tests-de-nuit --hors-du-poste --tranche i/n`, the night tests alone (`GRILLHOUSE_TESTS_DE_NUIT=hors-poste`), the i-th of n parts by Vitest's split, its reports under `.vitest-reports/`, no bench and no time witness, since a shared machine does not measure a time; the job `fusion` runs `grillhouse fusion-des-tranches`, which refuses a night test no tranche plays or two play, then merges the reports. A tranche not of the form `i/n`, a tranche without `--hors-du-poste` (the night of the poste plays whole) and an unknown argument are refused before any work, code 2; it runs on the repository's variable `RUNNER` (GitHub's `ubuntu-latest` without it), and installs uv and the command claude on GitHub's runner alone. A green run there never keeps a last green: the night of the poste (`scripts/nuit.sh`) still plays every night test, the tagged ones included, then the measures, and alone keeps it. A night test that depends on the poste says so by a line `// @poste: <raison>` of the comment at its head, as Bazel's tags and pytest's markers live with the test, never in a list beside it; the new guard `tests-du-poste` of the module typescript refuses a night test that shows a mark of the poste without the tag, read in its code and in the test material it imports by a relative path: the envelope (`canWrap`, `bwrap`, the frame's launcher or envelope), the real bd (`hasBd`), a Temporal server (`server start-dev`), sccache, systemd, the keyring, the user's session (`/run/user/`), or the command claude started for more than `plugin` or `--version`; what the reading does not see takes the tag by hand, and a tag without a mark passes. 70 of the frame's 110 night tests carry the tag. `ci.yml` does not change. **Action for projects**: none — `npx grillhouse maj` (migration 0.33.0) inscribes in the project's debt each night test that depends on the poste without the tag, if any; a new one is then refused, and the debt comes down as the project tags each one (`// @poste: <raison>` at its head). A project receives the night on GitHub with the frame's CI (grillhouse-44b.12.7).
17
+ - **A red task of a package of the plan goes back to the developpeur** (grillhouse-4nr.14.1, grillhouse-jye): since a red resumes at the step that carries it (grillhouse-4nr.14), a red that names no file was never attributed, and a red task of a package of the plan (lint, format check, typing, build), reported with its package and its log alone, stopped the circuit at the supervisor where it used to go to the developpeur. As a red job of a CI goes back to its author, such a red now relaunches the developpeur, no file named; a red without a file out of the plan, or a file nobody wrote, still goes up. **Action for projects**: none.
18
+ - **The final pass plays again the packages whose tests read a path the lot changes** (grillhouse-jye): since the final pass plays the band of the lot (grillhouse-44b.13, `--filter=...[<base>...<lot>]`), a package out of the plan whose tests read a directory of the root (`grillhouse.lit`, as the `data` of Bazel) was no longer played when the lot changed that directory, Turborepo's graph not seeing the read: its red waited for the integration (the witness of BPScript 320.2.2.1.5 again). The band now adds, for each package whose `grillhouse.lit` (or the `lit` of its traces) covers a file the band changes, `--filter=...<package>`, the package and its dependents. **Action for projects**: none.
19
+ - **The integration is judged by the CI of the ticket's branch, and nothing is verified on the machine** (grillhouse-44b.12.5): the integration played `npm run verifier` in its copy before committing, and the queue played it again in its own copy when main had moved, one to two whole verifications of 2 to 6 min of the whole machine per lot, before the CI of main judged the same tree a third time. As bors and Zuul gate a merge on the CI of the tree that enters, the queue now pushes `agent/<ticket>` to origin (forced: the queue owns that branch), reads its run on that branch whatever runs it (`gh run list --commit <sha> --branch agent/<ticket>`), and moves main by fast-forward onto the tree the CI judged green; main moved meanwhile, the branch is replaced on main in the queue's copy (its generated files regenerated), pushed again and judged again, five judgements at most. No green, no entry: a red CI reopens the ticket without `en-file`, its comment giving the address of the run and the end of its failed log, main unmoved and the branch kept; after a green rerun (`gh run rerun <id> --failed`), `--reprendre` sends the branch again and the queue judges the last attempt; a CI not read (no `gh`, no run within 2 min, a run not ended within 30 min) or a branch on which no workflow runs keeps the branch in the queue, the circuit at « a-repasser », the reason named (« aucune CI ne juge agent/<ticket> : la CI du projet doit écouter agent/** »). The entry closes the ticket, pushes main, deletes the branch here and on origin, and removes the working directory of the circuit; the CI of main is no longer read after the push. The change of the code of the queue's workflow and of the step 5.2 follows Temporal's patching (`patched('ci-de-la-branche')`): a queue or a circuit that recorded its entries before replays them on the code of before, and each new entry takes the new path, so a running `file:<racine>` goes on without a gesture; the recorded histories replay unchanged. The opening of a session names under « Manque » a project none of whose workflows runs on a push to `agent/**` (`scripts/ci-des-branches.mjs`), and the migration 0.33.0 adds `agent/**` to the branches of the push of each workflow that runs on a push to the branch main is pushed to; the template's CI listens to `agent/**`. Removed with their tests and texts: `npm run verifier` of the integration (its code 75 and its replay) and of the queue's replay (`tester`, `commandesDeVerification` of `scripts/integration/rejeu.mjs`), the command `preparer` of the modules cargo and python (`cargo fetch --locked`, `uv sync --locked --group test`), which only that verification played, the reading again of the CI of a commit on main at a resumption and the place of a lot on origin (`surOrigin`, `raisonOrigin`) for new entries, the kept progress of a lot entered (`garder` of `avecLAvancementDuTravail`). The step 5.2 keeps its title. **Action for projects**: `npx grillhouse maj` adds `agent/**` to the push of the project's CI of the lots, or says the gesture when it finds none (`branches: [main, 'agent/**']` in the `on.push` of the workflow that plays `npm run verifier`); until then the lots wait in the queue. `gh` must be signed in where the worker runs, with the right to push to origin. A project whose CI called `npx grillhouse preparer` calls `cargo fetch --locked` or `uv sync --locked --group test` instead.
20
+ - **A Rust ticket's copy no longer keeps its test executables** (grillhouse-pkl.8): each copy's `target/` held a whole compilation (4.6 GiB in a copy of SyntHub, 34 GB for 11 copies), of which the crate's test executables weighed 3.4 GiB (`cargo clean -p service --dry-run`). As Swatinem/rust-cache keeps the dependencies and drops the workspace's own artifacts, the test task of a crate now builds with `--message-format=json-render-diagnostics` and, once its tests and benches played, removes the test executables cargo reports (`executable` of an artifact of a test profile); cargo builds a missing one again at the next pass. The dependencies, the libraries and the binaries of `cargo build` (a `grillhouse.donnees` output) stay; each copy keeps its own `target/`, so two copies never share or wait on an output. A shared `CARGO_TARGET_DIR` and `build.build-dir` were rejected: two copies give the same names to their artifacts, and a build-dir per copy only moves the volume. **Action for projects**: none.
21
+ - **A test of the day that starts the grillhouse command is refused out of the end-to-end zone** (grillhouse-9e3.1): a test of the day validates the code by importing it, yet some fifty tests of the frame proved a behaviour by starting `grillhouse` (its binary, or a script of its `bin/` or `scripts/`, the code of a subcommand) as a subprocess. The guard of the sizes (`tailles-des-tests`) gains the rule `binaire-de-jour`: a test of the day whose process call names the command (`'grillhouse'`, `npx grillhouse <x>`, `node_modules/.bin/grillhouse`, `bin/grillhouse.mjs`, a file of the frame's `bin/` or `scripts/`), in a literal or through a constant that names it, in the test or its test material, is a finding, unless it lies under a directory `e2e/` (as Playwright's and Angular's `e2e/`) or in the package `grillhouse-essais` (end-to-end by design, as a project `<app>-e2e` of Nx). A path built at run time, a launcher passed through a helper and the code of a `node -e` escape the reading. The 47 cases of the frame are inscribed in its debt, which only comes down. The guard's summary line counts the tests that start the command. **Action for projects**: none — `npx grillhouse maj` (migration 0.33.0) inscribes in the project's debt each test of the day that starts the grillhouse command, if any; a new one is then refused, and moves under `e2e/` or imports what it proves.
22
+ - **The CI plays the verification in tranches** (grillhouse-44b.12.1): as Vitest shards a run (`--shard`, a blob report per shard, then `--merge-reports`), `verifier` now accepts `--tranche i/n` (or `--tranche=i/n`): it plays the tasks of tests alone, with the builds they depend on, each package of Vitest playing the i-th of n parts of its test files; the tranche rides in `GRILLHOUSE_TESTS`, so two tranches never replay one another from Turborepo's cache, plays for real, combines with `--tout` and `--base`, and writes under `.vitest-reports/` its blob report and the files of its part. `--sans-tests` plays every other task (guards, typing, format check, lint): the n tranches and `--sans-tests` together are the complete pass, each task once. Neither keeps a last green. A tranche not of the form `i/n` (1 ≤ i ≤ n: `0/3`, `4/3`, `a/b`, `1/0`), or given with `--gardes` or `--sans-tests`, is refused before any work, code 1, the form named. The new command `grillhouse fusion-des-tranches` reads the parts of the n tranches, refuses a file of the pass that no tranche plays or that two play, each named, and merges the blobs into one report. The frame's `ci.yml` now runs four jobs: `gardes` (`--sans-tests`), `tranches` (3 tranches, each per version of Node of the matrix), `fusion` (the merge, per version), and `build`, which waits for the three; every job runs on `vars.RUNNER` (GitHub's `ubuntu-latest` without it), and the installations of uv and of the command claude play on GitHub's runner alone. The typescript module ignores `.vitest-reports` beside `.turbo`. **Action for projects**: none — `grillhouse maj` adds `.vitest-reports/` to the `.gitignore`; a project receives the CI in tranches with the frame's CI (grillhouse-44b.12.7).
23
+ - **The nights of the machine run under one Temporal schedule, one project after the other, only those that moved** (grillhouse-4nr.13): five lines of the table of tasks launched five nights at fixed hours chosen so that they would not overlap; a night that overran stepped on the next, a missed night was lost, a project that had not moved played its full pass anyway, and a new project needed a line by hand. One schedule of the machine (`grillhouse-nuits`, overlap SKIP, a missed firing taken within 24 h, once) now fires every day at its own hour (1 h by default, the earliest of the former lines; the hour belongs to the schedule, apart from `grillhouse.plageDeNuit`, which the bilan alone reads) and asks the one workflow of the nights (`nuitsDeLaMachine`, `src/temporal/nuits/`) for the projects of the register of the machine: a project whose root is gone or whose night is not wired is left out with its reason; a project whose top is the commit of its last green night (`<git common dir>/nuit/dernier-vert`, which the green night alone writes) is skipped, its reason, top and reference written to the journal of its night and to the register; every other plays, a project integrated green in the day included. The nights play one after the other, a red one never stopping the next. `npx grillhouse nuit <projet>` asks for the night of a project by hand, through the same workflow, without reading its marker; `npx grillhouse nuit --planifier [--heure <0-23>]` creates or updates the schedule, keeping its hour when `--heure` is absent; `npx grillhouse nuit` alone still plays the pass (`scripts/nuit.sh`, unchanged). The session start no longer proposes a line of the table of tasks; it names a line that still launches a night, with its removal. **Action for projects**: once per machine, after the upgrade of the frame that runs the machine's worker, re-apply the units (`npx grillhouse temporal installer`, so the worker of the machine serves the nights), create the schedule at 1 h (`npx grillhouse nuit --planifier`; `npx grillhouse nuit --planifier --heure <0-23>` for another hour), then remove from the table of tasks (`crontab -e`) every line that runs `grillhouse nuit` or a `nuit.sh`, as the session start names them; nothing to change in a project.
24
+ - **The day's facts separate the real tickets from the discoveries** (grillhouse-3uv.96): FAITS AUJOURD'HUI lists only the day's closed tickets that are not discoveries, and its title counts only them; a new head line, `🔍 N new · N →check · N rejetés · N validés`, counts the day's discoveries by case (new: closed without a verdict of the triage; →check: reopened, awaiting the owner; rejetés: closed traitee/doublon/sans-suite, or a-porter/non-confirmee reclosed without the circuit, since the day's marker; validés: passed to the circuit since the marker). The day's marker is now persistent, read from a file in the project's git common dir, out of the worktree, so the board no longer resets at midnight; `/grillhouse newday` (`grillhouse newday`) sets it to now, which purges FAITS AUJOURD'HUI and the « rejetés » and « validés » cases while « new » and « →check » stay. On a board of several projects, each reads its own marker and the cases sum project by project. **Action for projects**: none — a project's board gains the discoveries line and the persistent marker on its own.
25
+ - **A laying of Temporal's program that fails no longer stops the night** (grillhouse-4nr.22): since 0.31.0 the night laid the pinned program down before its commands and stopped, « rien n'est joué », when the laying failed; each night of trial, whose copy holds no build, failed there, and the frame's night was red from 2026-11-09 on some 160 night tests. The night now logs the failed laying and plays on, TEMPORAL unset: a test that starts a server resolves the program from the shared cache (`~/.cache/grillhouse/temporal/<version>/temporal`), or fails on itself naming the command that lays it down. **Action for projects**: none.
26
+ - **The night builds the frame's package only when it is a package of the repository** (grillhouse-jye): the night built `@roomi-fields/grillhouse` as soon as its copy held a `packages/grillhouse/package.json` of that name; a night of trial, whose project copies the frame's `package.json` there without declaring it in its `workspaces`, got « No workspaces found » from npm and stopped, « rien n'est joué » (23 night tests on 2026-11-11, hidden until then behind the laying of Temporal). The night now builds it only when the `workspaces` of the copy's root select it, as `scripts/paquets.mjs` maps the packages of a repository. **Action for projects**: none.
27
+ - **Resuming the integration of a lot already on main ends the ticket** (grillhouse-bf5.2): a circuit stopped after its lot entered main, then resumed, no longer loops on an absent lot; it retires its copy and ends at `integre`, or stops by its name (`lot-absent`, `copie-gardee`, code 17) when the lot is not on main or the copy cannot go. **Action for projects**: none.
28
+ - **A conflict of a copy's advance goes to the role that writes its files, not to the supervisor** (grillhouse-bf5.3): SyntHub (SH-b52.2, SH-br0.3, 0.29.0) twice stopped at the supervisor, who cannot write the testwriter's files, when the advance of a copy on main met a shared test file an integrated ticket had changed. The advance now applies the kept lot file by file (`git apply --3way` per file): a file in conflict keeps its marks, a file git refuses without marks (a deletion of a file main changed) stays alone in `grillhouse-travail.patch`, the others apply. The circuit then relaunches, by the gesture `conflit-de-l-avance`, the testwriter for a test or the shared test material (`estUnTest`), the developpeur for code, the testwriter first; the session of the role relaunched comes back to the pass, not to the step after its role (no proof after the testwriter), and the pass looks at the copy again, relaunching the other role while one of its files keeps its marks (looked for in the files of the conflict even when the index no longer says them in conflict), so no build plays on a marked file; the launcher accepts the relaunch of a role on a copy in conflict or with a kept lot when it writes one of their files (`preparer --role`), and a conflict a second session of the role does not lift goes up as the stop « lancement », each file named. **Action for projects**: none.
29
+ - **`grillhouse newday` runs by the published version**, like the board it resets. **Action for projects**: none.
30
+
9
31
  ## [0.32.0] - 2026-11-10
10
32
 
11
33
  ### Fixed
@@ -16,10 +16,12 @@
16
16
  // `verifier` and the guards and generators of the module of the project's language
17
17
  // (`grillhouse frontieres`) run its commands, with their arguments first. A project whose language the frame refuses (scripts/langages.mjs) has the refusal on
18
18
  // the error stream, and the exit code is 2.
19
- // - `verifier` runs with the tools of the project (`grillhouse.outils` of the package.json of its
20
- // main tree, `environnementDe` of scripts/sous-commandes.mjs), each variable set to its path,
21
- // whatever the caller's environment; a faulty key is refused by its name on the error stream,
22
- // nothing run, and the exit code is 2.
19
+ // - A command of the module of the language (`tests`, `verifier`…) runs under the module's
20
+ // environment of the poste (the remote cache read alone, when the poste holds its file;
21
+ // `environnementDe` of scripts/sous-commandes.mjs); `verifier` also runs with the tools of the
22
+ // project (`grillhouse.outils` of the package.json of its main tree), each variable set to its
23
+ // path, whatever the caller's environment; a faulty key is refused by its name on the error
24
+ // stream, nothing run, and the exit code is 2.
23
25
  // - In a project whose package.json names its published version (`grillhouse.outil`, the frame's
24
26
  // repository), a subcommand of the orchestration (circuit, superviseur, nuit, tableau, the status
25
27
  // line, the hooks of Claude Code and the write lock) runs by that version, installed under
@@ -1,22 +1,70 @@
1
+ # Généré par `npx grillhouse maj` depuis le gabarit du cadre ; ne pas éditer : la mise à jour le réécrit. Un workflow sans cette ligne est au projet, et la mise à jour n'y touche pas.
2
+ #
3
+ # The CI of a lot: the verification of the frame (`npm run verifier`) in tranches, as Grillhouse
4
+ # plays its own (its .github/workflows/ci.yml).
1
5
  name: CI
2
6
 
3
7
  on:
8
+ # `agent/**`: the branch of a ticket the queue of the frame pushes; its run judges the lot before
9
+ # main moves onto it.
4
10
  push:
5
- branches: [main, develop]
11
+ branches: [main, develop, 'agent/**']
6
12
  pull_request:
7
13
  branches: [main, develop]
14
+ # Once a night, on the default branch: Node 24 and 26.
15
+ schedule:
16
+ - cron: '0 2 * * *'
17
+ # A release of the project may play the CI on the tagged commit before it publishes, on the
18
+ # versions of Node its call names.
19
+ workflow_call:
20
+ inputs:
21
+ node-versions:
22
+ description: 'The versions of Node to play, a JSON array'
23
+ type: string
24
+ default: '["26.x"]'
25
+
26
+ # The pass of the verification in n + 2 jobs per version of Node, as Vitest shards a run
27
+ # (https://vitest.dev/guide/improving-performance#sharding): `gardes` plays every task but the
28
+ # tests (`npm run verifier -- --sans-tests`), each job of `tranches` the tests of its tranche
29
+ # (`npm run verifier -- --tranche i/n`), and `fusion` merges the reports of the n tranches, which it
30
+ # refuses when a file of the pass is missing or played twice. TRANCHES is n, and the matrix of
31
+ # `tranches` lists 1 to n: both change together. The build of the project is proven by `gardes`:
32
+ # its guard tasks wait for the build of every package, so no job builds a second time.
33
+ env:
34
+ TRANCHES: 3
35
+
36
+ # The remote cache of Turborepo (grillhouse-44b.12.6), the server the repository's variables
37
+ # TURBO_API and TURBO_TEAM name, its token and the key of its signature in the secrets
38
+ # TURBO_TOKEN and TURBO_REMOTE_CACHE_SIGNATURE_KEY (Settings > Secrets and variables > Actions),
39
+ # never in this file. A push to main or to a branch agent/** writes it (the run that judges the
40
+ # tree the queue moves main onto); every other run reads it alone. Without TURBO_API the cache is
41
+ # the runner's local cache, as before. No step of the workflow touches the cache.
42
+ TURBO_API: ${{ vars.TURBO_API }}
43
+ TURBO_TEAM: ${{ vars.TURBO_TEAM }}
44
+ TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
45
+ TURBO_REMOTE_CACHE_SIGNATURE_KEY: ${{ secrets.TURBO_REMOTE_CACHE_SIGNATURE_KEY }}
46
+ TURBO_CACHE: ${{ !vars.TURBO_API && 'local:rw' || (github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/agent/')) && 'local:rw,remote:rw' || 'local:rw,remote:r') }}
47
+
48
+ # The machine of every job: the repository's variable RUNNER (Settings > Secrets and variables >
49
+ # Actions > Variables), a label in JSON (`"ubuntu-latest"`) or a list of labels
50
+ # (`["self-hosted","linux"]`); GitHub's ubuntu-latest without it. The variable lives in the
51
+ # repository's settings, never in this file.
8
52
 
9
53
  jobs:
10
- test:
11
- runs-on: ubuntu-latest
54
+ gardes:
55
+ runs-on: ${{ fromJSON(vars.RUNNER || '"ubuntu-latest"') }}
12
56
 
57
+ # The versions come from the input of the call; push and pull request play Node 26 alone,
58
+ # the nightly schedule plays Node 24 and 26.
13
59
  strategy:
14
60
  matrix:
15
- node-version: [22.x, 24.x]
61
+ node-version: ${{ fromJSON(inputs.node-versions || (github.event_name == 'schedule' && '["24.x","26.x"]' || '["26.x"]')) }}
16
62
 
17
63
  steps:
18
64
  - name: Checkout
19
65
  uses: actions/checkout@v5
66
+ with:
67
+ fetch-depth: 0
20
68
 
21
69
  - name: Setup Node.js ${{ matrix.node-version }}
22
70
  uses: actions/setup-node@v5
@@ -24,32 +72,104 @@ jobs:
24
72
  node-version: ${{ matrix.node-version }}
25
73
  cache: 'npm'
26
74
 
75
+ # uv, which the frame's module python plays, for a project with packages of Python; a runner
76
+ # of the repository brings its own.
77
+ - name: Install uv
78
+ if: runner.environment == 'github-hosted' && hashFiles('**/pyproject.toml') != ''
79
+ uses: astral-sh/setup-uv@v6
80
+
27
81
  - name: Install dependencies
28
82
  run: npm ci
29
83
 
30
- # Formatting, lint, typing, build, guards and tests: the one command of the poste.
31
- - name: Verification
32
- run: npm run verifier
84
+ # Build, guards, typing, formatting and lint: every task of the pass but the tests; the guard
85
+ # tasks wait for the build of every package, which proves the project builds.
86
+ - name: Verification without the tests
87
+ run: npm run verifier -- --sans-tests
88
+
89
+ tranches:
90
+ runs-on: ${{ fromJSON(vars.RUNNER || '"ubuntu-latest"') }}
33
91
 
34
- build:
35
- runs-on: ubuntu-latest
36
- needs: test
92
+ strategy:
93
+ fail-fast: false
94
+ matrix:
95
+ node-version: ${{ fromJSON(inputs.node-versions || (github.event_name == 'schedule' && '["24.x","26.x"]' || '["26.x"]')) }}
96
+ tranche: [1, 2, 3]
37
97
 
38
98
  steps:
99
+ # The whole history: the base of a push (github.event.before) must be in the clone.
39
100
  - name: Checkout
40
101
  uses: actions/checkout@v5
102
+ with:
103
+ fetch-depth: 0
41
104
 
42
- - name: Setup Node.js
105
+ - name: Setup Node.js ${{ matrix.node-version }}
43
106
  uses: actions/setup-node@v5
44
107
  with:
45
- node-version: '22'
108
+ node-version: ${{ matrix.node-version }}
46
109
  cache: 'npm'
47
110
 
111
+ - name: Install uv
112
+ if: runner.environment == 'github-hosted' && hashFiles('**/pyproject.toml') != ''
113
+ uses: astral-sh/setup-uv@v6
114
+
48
115
  - name: Install dependencies
49
116
  run: npm ci
50
117
 
51
- - name: Build
52
- run: npm run build --if-present
118
+ # The tests of the tranche, with the builds they depend on. A push is measured against the
119
+ # commit before it; a pull request, a call and the nightly schedule play the complete pass,
120
+ # with no base.
121
+ - name: Tranche ${{ matrix.tranche }} (a push, against its parent)
122
+ if: github.event_name == 'push' && github.event.before != ''
123
+ run: npm run verifier -- ${{ format('--tranche {0}/{1} --base {2}', matrix.tranche, env.TRANCHES, github.event.before) }}
124
+
125
+ - name: Tranche ${{ matrix.tranche }}
126
+ if: github.event_name != 'push' || github.event.before == ''
127
+ run: npm run verifier -- ${{ format('--tranche {0}/{1}', matrix.tranche, env.TRANCHES) }}
128
+
129
+ # The reports of the tranche (Vitest's blob and the files of its part), red or green, which
130
+ # the job fusion merges.
131
+ - name: Reports of the tranche
132
+ if: ${{ !cancelled() }}
133
+ uses: actions/upload-artifact@v4
134
+ with:
135
+ name: tranche-${{ matrix.node-version }}-${{ matrix.tranche }}
136
+ path: .vitest-reports/
137
+ include-hidden-files: true
138
+ # A pass with no test file (a push whose changes no test relates to) writes none.
139
+ if-no-files-found: warn
140
+ retention-days: 7
141
+
142
+ fusion:
143
+ needs: tranches
144
+ if: ${{ !cancelled() }}
145
+ runs-on: ${{ fromJSON(vars.RUNNER || '"ubuntu-latest"') }}
146
+
147
+ strategy:
148
+ matrix:
149
+ node-version: ${{ fromJSON(inputs.node-versions || (github.event_name == 'schedule' && '["24.x","26.x"]' || '["26.x"]')) }}
150
+
151
+ steps:
152
+ - name: Checkout
153
+ uses: actions/checkout@v5
154
+
155
+ - name: Setup Node.js ${{ matrix.node-version }}
156
+ uses: actions/setup-node@v5
157
+ with:
158
+ node-version: ${{ matrix.node-version }}
159
+ cache: 'npm'
160
+
161
+ - name: Install dependencies
162
+ run: npm ci
163
+
164
+ - name: Reports of the tranches
165
+ uses: actions/download-artifact@v4
166
+ with:
167
+ pattern: tranche-${{ matrix.node-version }}-*
168
+ path: .vitest-reports
169
+ merge-multiple: true
53
170
 
54
- - name: Check package
55
- run: npm pack --dry-run
171
+ # Each file of Vitest's pass played by one tranche exactly, then one report of the n tranches.
172
+ # The tests of Rust (nextest's `--partition hash:i/n`) and of Python (the first tranche alone)
173
+ # have no report to merge: the job of their tranche is red on their red.
174
+ - name: Merge of the tranches
175
+ run: npx --no-install grillhouse fusion-des-tranches
@@ -0,0 +1,111 @@
1
+ # Généré par `npx grillhouse maj` depuis le gabarit du cadre ; ne pas éditer : la mise à jour le réécrit. Un workflow sans cette ligne est au projet, et la mise à jour n'y touche pas.
2
+ #
3
+ # The night of a shared machine: once a night, on the default branch, the project's night tests but
4
+ # those that bear the tag @poste (a night test that depends on the poste: its envelope, its tools,
5
+ # its session; the frame's guard `tests-du-poste` asks for the tag), on Node 22 and 24. No measure
6
+ # of time plays here: a shared machine does not measure a time (the frame's charter, « Une mesure
7
+ # de temps joue la nuit »). A green run here is never the last green: the night of the poste alone
8
+ # keeps it, after it plays every night test, the tagged ones included, then the measures of time.
9
+ name: Nuit
10
+
11
+ on:
12
+ schedule:
13
+ - cron: '0 3 * * *'
14
+ workflow_dispatch:
15
+
16
+ # The night in n + 1 jobs per version of Node, as the CI plays the verification (ci.yml): each job
17
+ # of `tranches` plays its tranche of the night tests out of the poste (`grillhouse tests-de-nuit
18
+ # --hors-du-poste --tranche i/n`), and `fusion` merges the reports of the n tranches, which it
19
+ # refuses when a night test is missing or played twice. TRANCHES is n, and the matrix of `tranches`
20
+ # lists 1 to n: both change together.
21
+ env:
22
+ TRANCHES: 3
23
+
24
+ # The machine of every job: the repository's variable RUNNER, as in ci.yml; GitHub's ubuntu-latest
25
+ # without it.
26
+
27
+ jobs:
28
+ tranches:
29
+ runs-on: ${{ fromJSON(vars.RUNNER || '"ubuntu-latest"') }}
30
+
31
+ strategy:
32
+ fail-fast: false
33
+ matrix:
34
+ node-version: ['22.x', '24.x']
35
+ tranche: [1, 2, 3]
36
+
37
+ steps:
38
+ - name: Checkout
39
+ uses: actions/checkout@v5
40
+ with:
41
+ fetch-depth: 0
42
+
43
+ - name: Setup Node.js ${{ matrix.node-version }}
44
+ uses: actions/setup-node@v5
45
+ with:
46
+ node-version: ${{ matrix.node-version }}
47
+ cache: 'npm'
48
+
49
+ # uv, which the frame's module python plays, for a project with packages of Python; a runner
50
+ # of the repository brings its own.
51
+ - name: Install uv
52
+ if: runner.environment == 'github-hosted' && hashFiles('**/pyproject.toml') != ''
53
+ uses: astral-sh/setup-uv@v6
54
+
55
+ - name: Install dependencies
56
+ run: npm ci
57
+
58
+ # The builds the night tests start, as the night of the poste has them from its complete pass.
59
+ - name: Build
60
+ run: npx --no-install turbo run build
61
+
62
+ # The night tests of the tranche, but those tagged @poste, without any measure of time.
63
+ - name: Night tests out of the poste, tranche ${{ matrix.tranche }}
64
+ run: npx --no-install grillhouse tests-de-nuit --hors-du-poste ${{ format('--tranche {0}/{1}', matrix.tranche, env.TRANCHES) }}
65
+
66
+ # The reports of the tranche (Vitest's blob and the files of its part), red or green, which
67
+ # the job fusion merges.
68
+ - name: Reports of the tranche
69
+ if: ${{ !cancelled() }}
70
+ uses: actions/upload-artifact@v4
71
+ with:
72
+ name: nuit-${{ matrix.node-version }}-${{ matrix.tranche }}
73
+ path: .vitest-reports/
74
+ include-hidden-files: true
75
+ if-no-files-found: warn
76
+ retention-days: 7
77
+
78
+ fusion:
79
+ needs: tranches
80
+ if: ${{ !cancelled() }}
81
+ runs-on: ${{ fromJSON(vars.RUNNER || '"ubuntu-latest"') }}
82
+
83
+ strategy:
84
+ fail-fast: false
85
+ matrix:
86
+ node-version: ['22.x', '24.x']
87
+
88
+ steps:
89
+ - name: Checkout
90
+ uses: actions/checkout@v5
91
+
92
+ - name: Setup Node.js ${{ matrix.node-version }}
93
+ uses: actions/setup-node@v5
94
+ with:
95
+ node-version: ${{ matrix.node-version }}
96
+ cache: 'npm'
97
+
98
+ - name: Install dependencies
99
+ run: npm ci
100
+
101
+ - name: Reports of the tranches
102
+ uses: actions/download-artifact@v4
103
+ with:
104
+ pattern: nuit-${{ matrix.node-version }}-*
105
+ path: .vitest-reports
106
+ merge-multiple: true
107
+
108
+ # Each night test out of the poste played by one tranche exactly, then one report of the n
109
+ # tranches.
110
+ - name: Merge of the tranches
111
+ run: npx --no-install grillhouse fusion-des-tranches
@@ -2,14 +2,14 @@
2
2
 
3
3
  ## Prerequisites
4
4
 
5
- - **Node.js**: Version 18.0.0 or higher
5
+ - **Node.js**: Version 24.0.0 or higher (26, the active LTS, recommended)
6
6
  - **npm**: Comes with Node.js (or use yarn/pnpm)
7
7
  - **Git**: For cloning the repository (if installing from source)
8
8
 
9
9
  ### Verify Prerequisites
10
10
 
11
11
  ```bash
12
- node --version # Should be >= 18.0.0
12
+ node --version # Should be >= 24.0.0
13
13
  npm --version # Should be >= 8.0.0
14
14
  ```
15
15
 
@@ -135,8 +135,8 @@ npm install
135
135
 
136
136
  ```bash
137
137
  # Using nvm to switch Node versions
138
- nvm install 20
139
- nvm use 20
138
+ nvm install 26
139
+ nvm use 26
140
140
  ```
141
141
 
142
142
  ## Next Steps
@@ -64,7 +64,7 @@
64
64
  "docs"
65
65
  ],
66
66
  "engines": {
67
- "node": ">=22.0.0"
67
+ "node": ">=24.0.0"
68
68
  },
69
69
  "dependencies": {
70
70
  "dotenv": "^16.4.0",
@@ -89,5 +89,5 @@
89
89
  "typescript": "^5.3.3",
90
90
  "vitest": "^2.0.0"
91
91
  },
92
- "packageManager": "npm@10.9.8"
92
+ "packageManager": "npm@11.20.0"
93
93
  }
package/charte.md CHANGED
@@ -101,8 +101,10 @@ assemble quelques modules sur la machine, avec des processus locaux ; un test gr
101
101
  projet d'essai et y lance le produit ou le cadre entier : il est un test de nuit (`*.nuit.test.*`,
102
102
  `*_nuit_test.py`, `tests/*_nuit.rs` en Rust), jamais joué au fil du travail. Chaque test prend la plus petite taille qui prouve son critère, dans
103
103
  Grillhouse comme dans chaque projet. La garde des tailles (`grillhouse tailles-des-tests`) refuse
104
- un grand test de jour, et la dette inscrite des grands tests existants ne fait que baisser. Ainsi
105
- le jour reste court, et la preuve longue tourne la nuit.
104
+ un grand test de jour, et la dette inscrite des grands tests existants ne fait que baisser. Un
105
+ test de jour valide le code en l'important : lancer la commande grillhouse (son binaire, un
106
+ script du cadre) est réservé aux tests de bout-en-bout, sous un dossier `e2e/`, et la même garde
107
+ refuse les autres. Ainsi le jour reste court, et la preuve longue tourne la nuit.
106
108
 
107
109
  **Un test porte le nom du comportement qu'il prouve**, jamais le numéro de son ticket, qui va au
108
110
  message du commit (Software Engineering at Google, chap. 12 : un test par comportement). Ainsi un
@@ -236,9 +238,10 @@ dossier.
236
238
  lourde qui trouve moins de 4 Go libres, sous le dossier temporaire ou sur le disque de sa copie,
237
239
  attend la place et dit ce qui l'occupe, le ticket nommé. Ainsi le poste ne sature jamais ses
238
240
  disques.
239
- - **Main reste vert** : l'intégration exige un `npm run verifier` vert. Un test connu rouge se met
240
- en quarantaine dans le test lui-même (`it.skip` ou `it.fails`), avec le ticket qui le corrige.
241
- Ainsi chaque rouge a son ticket.
241
+ - **Main reste vert** : la file n'avance main que sur l'arbre que la CI de la branche du ticket
242
+ (`agent/<ticket>`) a jugé vert, comme bors et Zuul. Un test connu rouge se met en quarantaine
243
+ dans le test lui-même (`it.skip` ou `it.fails`), avec le ticket qui le corrige. Ainsi chaque
244
+ rouge a son ticket.
242
245
  - **L'index d'abord** : toute recherche commence par `rtfm_search` (mode `hybrid`) pour le quoi, et
243
246
  par `codegraph explore` (ou l'outil `codegraph_explore`) pour l'appel ; le shell lit un fichier
244
247
  déjà nommé. Ainsi une affirmation sur le code repose sur ce que le code contient.
@@ -26,6 +26,15 @@ export interface EtatDeLEtape {
26
26
  finale: boolean;
27
27
  relanceSurLeRefus?: boolean;
28
28
  }
29
+ /**
30
+ * The conflict an advance of the copy left (gesture `conflit-de-l-avance`): the role relaunched
31
+ * (`testwriter` or `developpeur`), the files it writes and its report, the marks being in the copy.
32
+ */
33
+ interface ConflitDeLAvance {
34
+ role: 'testwriter' | 'developpeur';
35
+ fichiers: string[];
36
+ rapport: string;
37
+ }
29
38
  /** What the circuit keeps between steps (`MEMOIRE` of scripts/circuit.mjs, and its session to resume). */
30
39
  export type Memoire = Record<string, unknown>;
31
40
  /** The ticket as the decisions read it. */
@@ -246,8 +255,14 @@ export interface Activites {
246
255
  } & Rendus & ({
247
256
  memoire: Memoire;
248
257
  arret?: undefined;
258
+ conflit?: undefined;
259
+ } | {
260
+ memoire: Memoire;
261
+ arret?: undefined;
262
+ conflit: ConflitDeLAvance;
249
263
  } | {
250
264
  arret: ArretDecide;
265
+ conflit?: undefined;
251
266
  })>;
252
267
  /** The fact <fait> a decision asks for (a session, a pass, a reading), and the memory it leaves. */
253
268
  lireUnFait(e: Lieu & {
@@ -19,10 +19,10 @@
19
19
  // ticket a red CI reopened has its CI read again (the child workflow of the CI of its commit);
20
20
  // a ticket closed is the queue's end. Deterministic: it imports the workflow API, the search
21
21
  // attributes, the contracts, the workflows of the queue and the pure decisions.
22
- import { ActivityCancellationType, ApplicationFailure, allHandlersFinished, CancellationScope, condition, defineQuery, defineSignal, defineUpdate, isCancellation, makeContinueAsNewFunc, proxyActivities, setHandler, upsertMemo, upsertSearchAttributes, workflowInfo, } from '@temporalio/workflow';
22
+ import { ActivityCancellationType, ApplicationFailure, allHandlersFinished, CancellationScope, condition, defineQuery, defineSignal, defineUpdate, isCancellation, makeContinueAsNewFunc, patched, proxyActivities, setHandler, upsertMemo, upsertSearchAttributes, workflowInfo, } from '@temporalio/workflow';
23
23
  import { arretSansActe, effetsAJouer, pasDuPlan, transition, } from '../../../scripts/transitions.mjs';
24
24
  import { ATTRIBUT_ETAPE, ATTRIBUT_TICKET } from '../attributs.js';
25
- import { entrerDansLaFile, issueDeLaFile, lireEtConclureLaCI } from '../file/deroule.js';
25
+ import { CI_DE_LA_BRANCHE, entrerDansLaFile, issueDeLaFile, lireEtConclureLaCI, } from '../file/deroule.js';
26
26
  import { ARRETER, DEPUIS, ETAPES_DE_REPRISE, ETENDRE, L_ETAT, REFUS_DU_VALIDATEUR, REPRENDRE, } from './contrat.js';
27
27
  // Every act: a session lasts 4 h at most; its heartbeat every 5 s, awaited 90 s, so that a dead
28
28
  // worker's attempt is played again by the next worker; an act that fails is not tried again.
@@ -198,30 +198,41 @@ export async function circuitDuTicket(entree) {
198
198
  issue = i;
199
199
  });
200
200
  let relectures = 0;
201
- // The fact `file` of the step 5.2: where the lot stands, then the queue, or its CI read again.
202
- const laFile = async () => {
201
+ // The fact `file` of the step 5.2 as the circuit read it before the CI of the branch
202
+ // (`CI_DE_LA_BRANCHE`, Temporal's patching, ../file/deroule.ts): a lot on main and on origin had
203
+ // the CI of its commit read again; kept for the replay of the runs that recorded it, the place of
204
+ // the lot read from the answer the history holds.
205
+ const laFileDAvant = (lot) => {
203
206
  const { racine, ticket } = entree;
204
- const lot = await actesDeLaFile.situerLeLot({ racine, ticket });
205
- if (lot.statut === 'closed') {
206
- return { etat: 'ferme', raison: lot.raison ?? 'ticket fermé' };
207
- }
208
- // A lot on main whose place on origin is unknown (origin does not answer) does not go back to
209
- // the queue: the reason goes up, the stop « inattendu ».
210
207
  if (!lot.aEntrer && lot.commit && lot.branche && lot.surOrigin === 'inconnu') {
211
208
  throw new Error(`la place du lot ${lot.commit.slice(0, 7)} sur origin ne se lit pas (${lot.raisonOrigin ?? 'sans raison'}) : il ne retourne pas en file.`);
212
209
  }
213
- // A lot on main and on origin: its CI read again. A lot on the local main alone (its closure
214
- // failed before its push) goes through the queue again, which closes and pushes it.
215
210
  if (!lot.aEntrer && lot.commit && (lot.surOrigin === 'oui' || !lot.branche)) {
216
211
  if (!lot.branche) {
217
- return {
212
+ return Promise.resolve({
218
213
  etat: 'rouvert',
219
214
  raison: 'grillhouse.poussee.commit ne nomme pas une branche : la CI ne se relit pas.',
220
- };
215
+ });
221
216
  }
222
217
  relectures += 1;
223
218
  return lireEtConclureLaCI({ racine, ticket, sha: lot.commit, branche: lot.branche, ci: entree.ci, relue: true }, `${workflowInfo().workflowId}:ci:${workflowInfo().runId}:${relectures}`);
224
219
  }
220
+ return null;
221
+ };
222
+ // The fact `file` of the step 5.2: a ticket closed is done, any other lot goes to the queue,
223
+ // which enters a lot already on main without moving main again.
224
+ const laFile = async () => {
225
+ const { racine, ticket } = entree;
226
+ const lot = await actesDeLaFile.situerLeLot({ racine, ticket });
227
+ if (lot.statut === 'closed') {
228
+ return { etat: 'ferme', raison: lot.raison ?? 'ticket fermé' };
229
+ }
230
+ if (!patched(CI_DE_LA_BRANCHE)) {
231
+ const avant = laFileDAvant(lot);
232
+ if (avant) {
233
+ return avant;
234
+ }
235
+ }
225
236
  issue = null;
226
237
  await entrerDansLaFile({ racine, ci: entree.ci }, { ticket, branche: `agent/${ticket}`, deroule: workflowInfo().workflowId });
227
238
  await condition(() => issue !== null);
@@ -358,6 +369,18 @@ export async function circuitDuTicket(entree) {
358
369
  return { arreter: pointe.arret, etat: ecrit, menee };
359
370
  }
360
371
  memoire = { ...memoire, ...pointe.memoire };
372
+ if (pointe.conflit) {
373
+ // The advance left files in conflict: the role that writes them is relaunched, the marks
374
+ // in the copy; its decision then comes back to the pass (`retourDuConflit`).
375
+ await finir([], menee);
376
+ etat = {
377
+ etape: pointe.conflit.role,
378
+ tentative: 1,
379
+ rapport: pointe.conflit.rapport,
380
+ finale: false,
381
+ };
382
+ continue;
383
+ }
361
384
  const faits = {};
362
385
  let d;
363
386
  for (;;) {