Fix two startup races found by CI on Linux (refs #9 #14)
ci / test (postgres) (push) Successful in 2m31s
ci / test (sqlite) (push) Successful in 2m8s
ci / image (push) Successful in 59s
ci / test (postgres) (pull_request) Successful in 2m23s
ci / test (sqlite) (pull_request) Successful in 2m4s
ci / image (pull_request) Successful in 9s

An error-page choice released the startup loop before resetting the
services, so the loop could start the application and then lose its
services while reporting ready. The reset now happens while the loop is
still held, and moves the status back to Starting.

A SQLite file could vanish between the existence check and the open;
with create allowed, the open would put an empty database in its place.
Once the file has been seen, connections open read-write only and fail
on a missing file.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Alby96andClaude Opus 5.5 committed 2026-11-10 12:51:33 +01:00
1 parent f9d71559e8
commit 101dcbb152
4 files changed
+25 -3

No files matched your search

+4
View File
@@ -77,6 +77,10 @@ La Fase 1 costruisce le fondamenta: piattaforma, database su due motori, accesso
- L'identità si controlla prima di migrare. Un database che appartiene a un'altra installazione non viene toccato. Uno vuoto resta vuoto, quindi accoglie anche un salvataggio con uno schema più vecchio.
- Dopo un ripristino, un'importazione o "usa questo database", il bot riparte con "Ferma tutto" acceso (SPEC 15.1), qualunque cosa dicesse l'archivio.
- Un archivio rovinato dà un messaggio sulla pagina, non un errore del server.
- La scelta azzera lo stato dell'applicazione prima di lasciare ripartire il ciclo d'avvio. Prima lo faceva dopo, e il ciclo poteva ripartire nel frattempo: l'applicazione risultava pronta ma senza servizi. Il difetto è emerso nella CI su Linux.
- **File SQLite che sparisce durante l'apertura.**
- Controllare che il file esista non basta: può sparire tra il controllo e l'apertura, e un'apertura che può creare il file metterebbe al suo posto un database vuoto.
- Dopo la prima apertura riuscita, il file si apre solo se c'è già.
- **Pagine che leggono prima di disegnare.**
- Con il rendering statico Blazor disegna una prima volta mentre `OnInitializedAsync` aspetta ancora.
- Con SQLite le letture finiscono subito e il difetto non si vede. Con PostgreSQL la pagina si rompe.