From 76c19d533b05beca7bfd1316588552c1197377e2 Mon Sep 17 00:00:00 2001 From: Alberto Balbo Date: Thu, 3 Dec 2026 13:13:23 +0100 Subject: [PATCH] Let the tests run their fake tools from the CI's memory folder Docker mounts a tmpfs noexec by default. The publish script tests of Phase 9 write fake git and docker into the temp folder and run them; on /test-tmp they could not, the real git ran instead and 18 tests failed. Reproduced in the CI's SDK container: 18 of 37 delivery tests fail without exec, all 37 pass with it. ADR 0019 says why. refs #75 Co-Authored-By: Claude Opus 5.5 --- .gitea/workflows/ci.yml | 3 ++- docs/adr/0019-prove-sqlite-in-memoria.md | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index c6cddee..c503d14 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -14,7 +14,8 @@ jobs: container: image: mcr.microsoft.com/dotnet/sdk:10.0 # The databases of the tests live in memory: the disk of the runner stops for seconds under load (ADR 0019). - options: --tmpfs /test-tmp:size=4g + # exec: Docker mounts a tmpfs noexec by default, and the tests run the fake git and docker they write there. + options: --tmpfs /test-tmp:size=4g,exec strategy: fail-fast: false matrix: diff --git a/docs/adr/0019-prove-sqlite-in-memoria.md b/docs/adr/0019-prove-sqlite-in-memoria.md index f6007d9..0b69b2e 100644 --- a/docs/adr/0019-prove-sqlite-in-memoria.md +++ b/docs/adr/0019-prove-sqlite-in-memoria.md @@ -10,7 +10,7 @@ Il 1° dicembre 2026 la CI di `main` (run 557, lavoro `test (sqlite)`) è fallit ## Decisione -1. **Cartella temporanea in memoria.** Il contenitore del lavoro `test` monta un `tmpfs` da 4 GB al massimo in `/test-tmp`, e le prove la usano come cartella temporanea (`TMPDIR`). Il codice di Anubis e le impostazioni di SQLite restano quelli veri. +1. **Cartella temporanea in memoria.** Il contenitore del lavoro `test` monta un `tmpfs` da 4 GB al massimo in `/test-tmp`, e le prove la usano come cartella temporanea (`TMPDIR`). Il codice di Anubis e le impostazioni di SQLite restano quelli veri. Il montaggio ha l'opzione `exec`: Docker monta un `tmpfs` senza permesso di esecuzione, e i test dello script di pubblicazione (Fase 9) scrivono ed eseguono lì i loro `git` e `docker` finti. Senza `exec` parte il `git` vero e 18 test cadono (provato il 3/12/2026 nel contenitore della CI: 18 su 37 senza, 37 su 37 con). 2. **Il test di `/health` aspetta.** Un computer fermo da più di 5 secondi *deve* risultare non disponibile: il test guarda la risposta a cui si arriva entro 30 secondi. Uno scheduler o un database davvero fermi lo fanno fallire ancora, e il messaggio dice quale. ## Alternative scartate