Phase 11: decisions from the numbers only, outside rules measured in the shadow
ci / test (postgres) (push) Successful in 5m56s
ci / test (sqlite) (push) Successful in 5m5s
ci / test (postgres) (pull_request) Successful in 5m36s
ci / test (sqlite) (pull_request) Successful in 4m52s
ci / image (push) Successful in 2m6s
ci / image (pull_request) Successful in 52s

News, the economic calendar and earnings dates no longer change any decision by
default (ADR 0023). A new switch, decisions.external_rules, chooses between
"misurate" (default) and "attive" (the Phase 7 behaviour); ADR 0027 records
every choice.

- Engine: with "misurate" nothing is held, postponed or kept, no diary or note
  is written and equity_meanrev gets no earnings dates. The gate is still asked,
  per rule and with all rows on, to write one shadow case per rule, strategy,
  instrument and day. The switch is read once per decision; the one-step check
  and the release of a planned order read it as it was when the decision ran.
- Shadow: five rules measured with the existing improvement machinery, 99%
  interval, "too early" under six months, the ADR 0023 criterion; the earnings
  exit is measured by relabelling with the report date. Shown in the Laboratorio
  and in the quarterly review beside the historical restriction balance.
- Model: the seven outside clues stay out of training; a champion that uses one
  is set aside at once, without an alarm, and Sunday trains one without them.
- Settings: the switch changes only from the settings form, with the
  protections of the five rows; the API refuses it; each change writes one diary
  line. The first start of this version records "attive" until then on an
  installation that had already decided.
- Screens, demo and manual follow "misurate".

Two independent review rounds; their confirmed findings are fixed and tested.
SQLite, PostgreSQL and the image with the guard drill are green.

refs #116, refs #117

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Alby96andClaude Opus 5.5 committed 2026-12-03 22:59:16 +01:00
1 parent ed22d1c8b5
commit 501c9be70e
47 files changed
+1743 -169

No files matched your search

+6 -6
View File
@@ -33,7 +33,7 @@ public sealed class OverviewScreenTests
"BTC/EUR", "1.299,84", "66.180", "(−7,3%)", "Vedi le altre 6",
"In simulazione, giorno 58 di 60", "In simulazione, 21 operazioni su 30", "1 posizione aperta, 21 operazioni chiuse (10 in guadagno)",
"Nessuna strategia usa soldi veri.",
"Rinviato di una settimana l'aggiornamento della rete Solana", "Negativa: per 24 ore non aumento SOL",
"Rinviato di una settimana l'aggiornamento della rete Solana", "Negativa: la regola l'avrebbe fermata, solo registrato",
"Il modello osserva e impara, ma non decide ancora.", "domenica 11 ottobre, 03:00",
"connesso, 84 ms", "PostgreSQL, 1,8 GB", "ultimo messaggio alle 08:00",
})
@@ -61,8 +61,8 @@ public sealed class OverviewScreenTests
var all = await server.TextAsync("/diario");
StringAssert.Contains(all, "Oggi, venerdì 9 ottobre");
StringAssert.Contains(all, "Ieri, giovedì 8 ottobre");
StringAssert.Contains(all, "Ho cambiato una regola per 24 ore:");
StringAssert.Contains(all, "Motivo: l'aggiornamento della rete Solana è stato rinviato di una settimana.");
StringAssert.Contains(all, "Comprate 2 AAPL a 259,80 $.");
Assert.IsFalse(all.Contains("Ho cambiato una regola", StringComparison.Ordinal), "With the rules only measured the news write no line (ADR 0027).");
StringAssert.Contains(all, "href=\"/operazioni?cerca=MSFT\"");
StringAssert.Contains(all, "Perché l'ho comprata e venduta");
Assert.IsFalse(all.Contains("(con il collegamento", StringComparison.Ordinal), "The demo's note on the link is not shown.");
@@ -79,10 +79,10 @@ public sealed class OverviewScreenTests
StringAssert.Contains(await server.TextAsync("/diario?tipo=rischio"), "Nessuna voce di questo tipo finora.");
// The search ignores case and accents, and keeps the kind chosen.
var search = await server.TextAsync("/diario?cerca=MARTEDI");
StringAssert.Contains(search, "Ho messo una restrizione fino a martedì:");
var search = await server.TextAsync("/diario?cerca=NON%20E%20ANCORA");
StringAssert.Contains(search, "non è ancora tornata sopra la media");
Assert.IsFalse(search.Contains("Alzato lo stop", StringComparison.Ordinal));
StringAssert.Contains(search, "Una voce con «MARTEDI»");
StringAssert.Contains(search, "Una voce con «NON E ANCORA»");
var none = await server.TextAsync("/diario?tipo=ordini&cerca=solana");
StringAssert.Contains(none, "Nessuna voce con «solana»");
}