E2: misure del filtro Copie, migrazione 0004 e prove di web e Docker

Il filtro «Copie» con 200.000 elementi stava al limite dei 250 ms
(«Copiati» 249 ms): la migrazione 0004 aggiunge solo l'indice
ix_media_sha256_entry e la finestra scende a 160 ms. Totali e giorni
contano «Copiati» partendo dalle copie e gli altri valori con un solo
passaggio sui file dietro gli elenchi degli SHA-256 copiati (1,5 s ->
0,7 s); hanno un limite loro di 3 s, scritto in decisioni.md con le
misure.

«Copia di nuovo» sceglie un file dell'account che è sul disco: prima
prendeva il primo con quello SHA-256 e, nella demo, a certe ore non
scriveva nulla.

Nuove prove: API delle copie, coerenza della demo, interfaccia nel
browser, opzioni del server, avvio del contenitore con /esporta,
contenuto dell'immagine e modelli, migrazione 4 e scala.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Alby96andClaude Opus 5.5 committed 2026-11-27 15:29:59 +01:00
1 parent 736d241a38
commit 724db13e1b
14 files changed
+1403 -38

No files matched your search

@@ -154,6 +154,45 @@ public sealed partial class ImageContentsTests
handovers);
}
/// <summary>
/// Copie esterne (spec §4.10, §11): /esporta is never made by the image. A VOLUME or a mkdir would give an anonymous
/// volume or a folder of the image disk that looks like a mounted folder; Compose and Unraid offer it commented out
/// or empty, with FEBE_ESPORTA.
/// </summary>
[TestMethod]
public void TheImageNeverMakesTheExportFolderAndTheTemplatesOfferItOff()
{
var code = Code(Dockerfile());
var volume = code.Split('\n').Single(line => line.StartsWith("VOLUME ", StringComparison.Ordinal));
Assert.DoesNotContain("esporta", volume);
foreach (var line in code.Split('\n').Where(line => line.Contains("mkdir", StringComparison.Ordinal)))
{
Assert.DoesNotContain("esporta", line);
}
Assert.DoesNotContain("FEBE_ESPORTA", code, "export is off unless the container declares it");
StringAssert.Contains(Dockerfile(), "Niente /esporta qui", "the reason stays next to VOLUME");
var lines = File.ReadAllText(Repository.PathOf("docker", "compose.yml")).Replace("\r\n", "\n", StringComparison.Ordinal).Split('\n');
var mount = lines.Single(line => line.Contains(":/esporta", StringComparison.Ordinal) && line.Contains("FEBE_CARTELLA_ESPORTA", StringComparison.Ordinal));
StringAssert.StartsWith(mount.TrimStart(), "# - ", "the mount of /esporta is commented out in compose.yml");
var variable = lines.Single(line => line.TrimStart().TrimStart('#').TrimStart().StartsWith("FEBE_ESPORTA:", StringComparison.Ordinal));
StringAssert.StartsWith(variable.TrimStart(), "# ", "FEBE_ESPORTA is commented out in compose.yml");
var active = lines.Where(line => !line.TrimStart().StartsWith('#') && line.Contains("esporta", StringComparison.OrdinalIgnoreCase)).ToList();
Assert.IsEmpty(active, string.Join('\n', active));
var template = System.Xml.Linq.XDocument.Load(Repository.PathOf("docker", "unraid", "febe.xml")).Root!;
var folder = template.Elements("Config").Single(c => (string?)c.Attribute("Target") == "/esporta");
Assert.AreEqual("Path", (string?)folder.Attribute("Type"));
Assert.AreEqual("false", (string?)folder.Attribute("Required"));
Assert.AreEqual(string.Empty, (string?)folder.Attribute("Default"));
Assert.AreEqual(string.Empty, folder.Value.Trim(), "no folder of the server by default");
var flag = template.Elements("Config").Single(c => (string?)c.Attribute("Target") == "FEBE_ESPORTA");
Assert.AreEqual("Variable", (string?)flag.Attribute("Type"));
Assert.AreEqual(string.Empty, (string?)flag.Attribute("Default"));
Assert.AreEqual(string.Empty, flag.Value.Trim());
}
[TestMethod]
public void TheToolsTheStartUsesComeWithTheBaseImageAndTheBuildChecksThem()
{