An independent review of the phase found nine defects. The ones that could lose money or orders: - Exits at the close of equity_meanrev are now planned orders written in the same transaction that claims the decision, so a restart can neither lose them nor send them twice. A sell with a deadline starts aggressive. - Resume also finds a planned order not yet linked to its execution (restart between sending and linking) and closes it before re-planning. - An account is "ready" only after adopting the guard's stops, checking the key, reconciling, resuming and aligning stops. Until then nothing is decided on it or sent to it, and the loop retries its startup each minute. The guard's note is deleted only when every stop it placed is in the ledger. - Each account's turn is cut after 45 s (60 s for a retried startup), so a slow broker no longer silences the heartbeat until the guard kills a healthy engine; the beat is also withheld when the scheduler has been silent for 30 minutes. Smaller ones: a stock decision made after the open is marked late; the Telegram loops survive unexpected errors; a long absence is shown on the Panoramica until "Ho visto" (SPEC 5.6); plain-http heartbeats are only accepted to home-network addresses; the soak report gives a daily close 30 minutes to be decided before expecting it. ADR 0012 point 12 records these choices; #51 and the two screen criteria are ticked in the roadmap. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
3d174931e9
commit
2185a0b36b
16 files changed
+397
-90
No files matched your search
@@ -130,6 +130,19 @@ public sealed class OverviewScreenTests
|
||||
StringAssert.Contains(diary, "Come sta il sistema");
|
||||
StringAssert.Contains(diary, "non configurato");
|
||||
StringAssert.Contains(diary, "Il computer che lo ospita");
|
||||
|
||||
// SPEC 5.6: an absence longer than a day stays at the top of the Panoramica until "Ho visto".
|
||||
var now = server.Host.Clock.UtcNow;
|
||||
var id = Guid.NewGuid();
|
||||
await server.Host.Services!.Db.WriteAsync(s => s.ExecuteAsync("INSERT INTO absences (id, started_at, ended_at, acknowledged_at, created_at) VALUES (@id, @s, @e, NULL, @e)",
|
||||
CancellationToken.None, ("id", id), ("s", now.AddDays(-3).AddHours(-2)), ("e", now)));
|
||||
StringAssert.Contains(await server.TextAsync("/"), "Sono stato spento per 3 giorni e 2 ore, fino a oggi alle");
|
||||
using (var seen = await server.PostFormAsync("/", $"/azioni/assenza/{id}/vista"))
|
||||
{
|
||||
Assert.AreEqual("/", ServerHarness.Location(seen));
|
||||
}
|
||||
|
||||
Assert.DoesNotContain("Sono stato spento", await server.TextAsync("/"));
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
|
||||
Reference in new issue
Block a user