Correzioni della revisione della catena 0.3.0, ognuna con la sua prova

- Collegamento: corretta la SyntaxError di connection.js (una «let saved» dichiarata due
  volte nello stesso blocco fermava tutta la pagina). Nuova prova ScriptSyntaxTests con un
  controllo scritto in casa che legge ogni modulo di wwwroot: parentesi, dichiarazioni
  doppie nello stesso blocco, importazioni che il modulo di arrivo non esporta.
- HEIF: il riconoscimento dei formati prende ogni marchio che HeifDecoder accetta (mif2,
  MiHE, marchi solo compatibili), così rilevazione, decodifica, misure, miniatura e
  impronta concordano.
- Docker, lasciare la pagina del browser: un nuovo contratto del browser cancella l'uscita
  annotata (_leftAt) anche prima che la vista si riapra, e la copia della sessione aspetta
  un altro comando del collegamento al più LetGoWait invece che senza limite.
- JPEG e PNG: senza EOI o IEND la decodifica fallisce («File danneggiato o incompleto»),
  la sola lettura delle misure resta tollerante.
- Visualizzatore: IsDamaged legge prima l'intestazione e il file intero solo quando può
  servire, in modo asincrono e con una piccola memoria per file, così una scheda con
  molti file non blocca il server.
- Importazione (§9.3): le immagini danneggiate si importano come le altre ma si segnano
  nella revisione, nel resoconto e nel CSV.
- Pulizia: le prove con il limite di 5 minuti non corrono più in parallelo fra loro.
- Pila dei caratteri come l'appendice B, senza Liberation; testo di Informazioni sulle
  immagini fatte in casa; guida (Problemi comuni, Sicurezza) allineata all'uscita in
  Docker dalla pagina del browser.
- docs/decisioni.md: le righe del 25 novembre 2026 con i motivi, compresa l'unione 537517b
  tenuta così com'è.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Alby96andClaude Opus 5.5 committed 2026-11-25 14:21:36 +01:00
1 parent 3d234f8791
commit 2068dd28f3
35 files changed
+1366 -75

No files matched your search

+21 -3
View File
@@ -794,10 +794,14 @@ public sealed class BrowserConnectionService : IConnectionService, IAsyncDisposa
return;
}
// Besides this lease: the remote view, the browser window in front, «Scollega» in progress.
// Besides this lease: the remote view, the browser window in front, «Scollega» in progress. A view open
// again also cancels an earlier leave (a late «pageLeft» of a reloaded page, the old view that
// «Riprova» closed): only a view closing after this counts as leaving, so that a view ended later by
// the server (the browser stopped) waits for DrivingGrace, as a browser that is down is not leaving.
if (_browser.UserDriving.Leases > 1)
{
_lastDrivingSign = _clock.Now;
_leftAt = null;
}
lastSign = _lastDrivingSign;
@@ -867,10 +871,24 @@ public sealed class BrowserConnectionService : IConnectionService, IAsyncDisposa
}
}
// Cancelled when «Ho finito», «Annulla» or «Scollega» end the lease meanwhile: then they decide.
// Cancelled when «Ho finito», «Annulla» or «Scollega» end the lease meanwhile: then they decide. Leaving the page
// in Docker waits at most LetGoWait for another command of the connection, as closing the window does (§6.0), so
// that the engine is not held still: then the lease ends without the copy.
using var limit = CancellationTokenSource.CreateLinkedTokenSource(ct);
if (what == PageLeftText)
{
limit.CancelAfter(LetGoWait);
}
try
{
await _commands.WaitAsync(ct).ConfigureAwait(false);
await _commands.WaitAsync(limit.Token).ConfigureAwait(false);
}
catch (OperationCanceledException) when (!ct.IsCancellationRequested && limit.IsCancellationRequested)
{
ForgetLetGoCopy();
_log.Info("collegamento", $"{what}: sessione non copiata, un altro comando del collegamento era ancora in corso.");
return true;
}
catch (ObjectDisposedException)
{