Fase 7: regole di 10.5 e stato per strumento (#59) #104

Merged
Alby96 merged 1 commits from fase-7 into main 2026-11-17 14:36:44 +01:00
Owner

Regole di SPEC 10.5 sui nuovi acquisti, stato per strumento e recupero dopo un'assenza (refs #59). Scelte nell'ADR 0014, punti 9–12.

  • Evento grave confermato: niente nuovi acquisti per 72 ore, lo stop non si allarga, avviso Telegram.
  • Notizia negativa confermata: niente nuovi acquisti per 24 ore.
  • Voce non confermata: solo una riga nel diario e un nuovo controllo dopo 2 ore.
  • Trimestrale in arrivo: equity_meanrev non entra (ora anche dal vivo). Dato macro: acquisti spostati alla fine della finestra.
  • Vince la riga più restrittiva; ogni riga si spegne in Impostazioni.
  • Un acquisto fermato si sposta alla fine della restrizione, se l'ordine è ancora valido; first_due_at tiene l'ora originale per il controllo del prezzo di 5.6.
  • Ogni restrizione compare nel diario una volta, con il suo motivo.
  • Dopo un'assenza valgono solo le restrizioni ancora in corso (test in AbsenceTests).

Prove: tasks check verde (380 test su SQLite), suite su PostgreSQL verde (379 superati, 3 ignorati). Nuovi test in NewsRulesTests e AbsenceTests.

🤖 Generated with Claude Code

Regole di SPEC 10.5 sui nuovi acquisti, stato per strumento e recupero dopo un'assenza (refs #59). Scelte nell'ADR 0014, punti 9–12. - Evento grave confermato: niente nuovi acquisti per 72 ore, lo stop non si allarga, avviso Telegram. - Notizia negativa confermata: niente nuovi acquisti per 24 ore. - Voce non confermata: solo una riga nel diario e un nuovo controllo dopo 2 ore. - Trimestrale in arrivo: `equity_meanrev` non entra (ora anche dal vivo). Dato macro: acquisti spostati alla fine della finestra. - Vince la riga più restrittiva; ogni riga si spegne in Impostazioni. - Un acquisto fermato si sposta alla fine della restrizione, se l'ordine è ancora valido; `first_due_at` tiene l'ora originale per il controllo del prezzo di 5.6. - Ogni restrizione compare nel diario una volta, con il suo motivo. - Dopo un'assenza valgono solo le restrizioni ancora in corso (test in `AbsenceTests`). Prove: `tasks check` verde (380 test su SQLite), suite su PostgreSQL verde (379 superati, 3 ignorati). Nuovi test in `NewsRulesTests` e `AbsenceTests`. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Alby96 added 1 commit 2026-11-16 17:41:55 +01:00
Apply the SPEC 10.5 news and calendar rules to new entries (refs #59)
ci / test (postgres) (push) Successful in 8m20s
ci / test (sqlite) (push) Successful in 4m25s
ci / test (postgres) (pull_request) Successful in 8m13s
ci / test (sqlite) (pull_request) Successful in 4m38s
ci / image (push) Successful in 2m5s
ci / image (pull_request) Successful in 2m6s
b087dd215b
Confirmed serious events hold new purchases of an instrument for 72 hours
and keep its stop where it is; confirmed negative news holds them for 24
hours; an unconfirmed rumour only gets a diary note and a check two hours
later. Coming earnings keep mean reversion out and macro figures hold
entries around their release, now in the live engine too. The strictest
row wins, every row can be switched off in the settings, and windows count
from the fact, so after an absence only effects still in force apply.

A held purchase moves to the end of its restriction while the order is
still valid and keeps its first due time, so the price drift check of
SPEC 5.6 still compares with the decision. Each restriction is written to
the diary once, with its motive. The per-instrument state keeps the tone
over one and three days, the story count against its norm and the active
restriction.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Alby96 merged commit f4f10a46dd into main 2026-11-17 14:36:44 +01:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: BalboSoft/Anubis#104