3 Commits

Author SHA1 Message Date
bb241bf050 feat(canary): auto-rebase pe layout change (2↔1 ferestre)
Când canary drift coincide cu schimbare strip-count pe același frame
(ex: TS comută 2→1 chart-uri și mută menu-ul peste care e ancorat ROI),
sistemul rescrie automat baseline_phash în TOML, commit layout change
și trimite o singură alertă combinată — fără pauză, fără /rebase manual.

Drift fără strip-count change rămâne pauză ca azi (drift real).
Gate pe două semnale independente previne fals-pozitive.

Canary.check() despărțit în măsurare pură + commit_pause/rebase
explicit; tick-loop-ul orchestrează decizia.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-05-05 18:30:57 +03:00
9cf49caf8a feat(canary): single-shot on_pause_callback + wire Telegram drift alert
Canary auto-pause was silent: when drift > threshold the module flipped
to paused without any user-facing notification, leaving the user to
wonder why detection went dark. Add an optional on_pause_callback
invoked exactly once per not_paused→paused transition. Wrap the call
in try/except so a notifier failure can never break the detection
cycle.

main.py wires the callback to emit canary_drift_paused audit event
plus a warn Alert guiding the user toward /resume or recalibration.

Tests: test_canary_pause_callback_fires_once (idempotent),
test_canary_resume_allows_new_pause_notification (re-arms after
resume), test_canary_pause_callback_exception_does_not_crash_check
(safety).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-18 11:53:22 +03:00
Claude Agent
bf70ca3ac7 feat: complete Faza 1 implementation (105 tests green)
All 12 modules built per reviewed plan:
- detector, state_machine (5-state phased FSM), canary, levels Phase B
- notifier fanout (Discord + Telegram, bounded queue, retry, dead-letter)
- audit (JSONL daily rotation), journal, report (weekly R-multiple PnL)
- calibrate + labeler (Tk, lazy-imported), dryrun with acceptance gate
- unified CLI: atm calibrate|label|dryrun|run|journal|report

README + Phase 2 prop-firm TOS audit checklist included.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-15 22:17:41 +00:00