Say in the diary where the server runs, as Settings does
ci / test (postgres) (push) Successful in 5m31s
ci / test (sqlite) (push) Successful in 4m24s
ci / test (postgres) (pull_request) Successful in 5m12s
ci / test (sqlite) (pull_request) Successful in 4m43s
ci / image (push) Successful in 2m16s
ci / image (pull_request) Successful in 1m4s

Outside a container the diary said "in Docker": it now says
"fuori dal container (sviluppo)", from the same options as Settings
(ADR 0022). Found by the second independent review.

refs #114

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Alby96andClaude Opus 5.5 committed 2026-12-03 17:45:27 +01:00
1 parent e9ac6dccc9
commit c27e8194d3
3 files changed
+7 -2

No files matched your search

+3
View File
@@ -86,6 +86,9 @@ internal sealed partial class AnubisHost(
/// <summary>Where this server answers from, in plain Italian: the container, the demo or a development run (ADR 0022).</summary> /// <summary>Where this server answers from, in plain Italian: the container, the demo or a development run (ADR 0022).</summary>
public string Where => options.Where; public string Where => options.Where;
/// <summary>True inside the container; outside it the server runs only for development and tests (ADR 0022).</summary>
public bool InContainer => options.InContainer;
public HostStatus Status => _status; public HostStatus Status => _status;
public IClock Clock => clock; public IClock Clock => clock;
+1 -1
View File
@@ -192,7 +192,7 @@ internal sealed record SystemView(
.Select(u => new PlannedJob(JobTime(u.DueUtc, now, zone), u.Description)).ToList(); .Select(u => new PlannedJob(JobTime(u.DueUtc, now, zone), u.Description)).ToList();
var since = host.Status.Since; var since = host.Status.Since;
var platform = host.IsDemo ? "in modalità dimostrativa" : "in Docker"; var platform = host.IsDemo ? "in modalità dimostrativa" : host.InContainer ? "in Docker" : "fuori dal container (sviluppo)";
var localSince = TimeZoneInfo.ConvertTime(since, zone); var localSince = TimeZoneInfo.ConvertTime(since, zone);
var days = (int)Math.Floor((now - since).TotalDays); var days = (int)Math.Floor((now - since).TotalDays);
var running = days >= 1 var running = days >= 1
+3 -1
View File
@@ -181,7 +181,9 @@ public sealed class DiagnosticsTests
Assert.Contains("# Anubis · dati per l'analisi", text); Assert.Contains("# Anubis · dati per l'analisi", text);
Assert.Contains("- Dove gira: fuori dal container, per sviluppo e prove", text); Assert.Contains("- Dove gira: fuori dal container, per sviluppo e prove", text);
Assert.Contains("| " + AnubisInfo.Version + " |", text, "The start sample of the running process is in the report."); Assert.Contains("| " + AnubisInfo.Version + " |", text, "The start sample of the running process is in the report.");
Assert.Contains("Scarica i dati per l'analisi", await server.TextAsync("/diario")); var diary = await server.TextAsync("/diario");
Assert.Contains("Scarica i dati per l'analisi", diary);
Assert.Contains(" fuori dal container (sviluppo), acceso ", diary, "The diary says where it runs, as Settings does.");
} }
private static ProcessSample Sample(DateTimeOffset at, DateTimeOffset process, double megabytes, int i) => new() private static ProcessSample Sample(DateTimeOffset at, DateTimeOffset process, double megabytes, int i) => new()