read.markets/app
Giorgio Gilestro 47dce1a1a4 compliance: flag-gate AI portfolio + cloud sync + Stripe; de-risk prompts; harden reviewer
Implements docs/read-markets-compliance-changes.md as flag-gated changes
(no deletions) so paused features stay in the tree for future re-enable.
All four flags default False so a fresh deploy is compliance-safe.

- New env flags: PORTFOLIO_AI_ENABLED, PORTFOLIO_SYNC_ENABLED,
  TICKER_UNIVERSE_AGGREGATE_ENABLED, SUBSCRIPTIONS_ENABLED.
- Gates: /api/analyze, /api/portfolio/sync*, /api/stripe/*, /pricing,
  ticker_universe writes, portfolio_analysis.analyse(). is_paid_active()
  returns True for any auth'd user when subscriptions are paused.
- Prompts (PROMPT_VERSION 10): universal _COMPLIANCE_RIDER prepended to
  every system prompt; watch list removed; price-target / close-above-below
  / trigger / forward-state-as-description rules added; SPECULATIVE
  pivoted to regime-only scenarios; daily + weekly digests tightened.
- Reviewer: deterministic regex/lexicon pre-check fail-closed under the
  Haiku call; portfolio rider gated by PORTFOLIO_AI_ENABLED; base prompt
  sharpened for forward-state and MAR forward-opinion patterns;
  ReviewerVerdict audit table; generate_with_review retry helper.
- Migration 0026: purge portfolio_sync + ticker_universe; create
  reviewer_verdicts.
- Copy: MAR cite fixed to Art 3(1)(35) + Art 20 + Del Reg 2016/958;
  portfolio reframed as browser-only viewer in disclaimer / privacy /
  terms / about / pricing / landing (en + it). TODO(legal) marker for
  lawyer sign-off on disclaimer.
- Tests: 13 lexicon + 6 reviewer compliance regressions; conftest enables
  all flags so existing 402 tests still cover their code paths.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-29 19:57:12 +02:00
..
jobs compliance: flag-gate AI portfolio + cloud sync + Stripe; de-risk prompts; harden reviewer 2026-05-29 19:57:12 +02:00
locales compliance: flag-gate AI portfolio + cloud sync + Stripe; de-risk prompts; harden reviewer 2026-05-29 19:57:12 +02:00
routers compliance: flag-gate AI portfolio + cloud sync + Stripe; de-risk prompts; harden reviewer 2026-05-29 19:57:12 +02:00
services compliance: flag-gate AI portfolio + cloud sync + Stripe; de-risk prompts; harden reviewer 2026-05-29 19:57:12 +02:00
static compliance: flag-gate AI portfolio + cloud sync + Stripe; de-risk prompts; harden reviewer 2026-05-29 19:57:12 +02:00
templates compliance: flag-gate AI portfolio + cloud sync + Stripe; de-risk prompts; harden reviewer 2026-05-29 19:57:12 +02:00
__init__.py initial commit — cassandra v0.1 2026-05-15 21:56:10 +01:00
auth.py public: landing + pricing + legal pages, apex-ready, lawyer-reviewed 2026-05-24 00:08:02 +02:00
branding.py css: split cassandra.css into per-section files 2026-05-28 12:31:29 +02:00
cli.py docs: drop Phase D.x markers now that the referral loop is closed 2026-05-26 23:09:39 +02:00
config.py compliance: flag-gate AI portfolio + cloud sync + Stripe; de-risk prompts; harden reviewer 2026-05-29 19:57:12 +02:00
db.py sync: encrypted cloud backup for portfolios + settings UX rework 2026-05-23 16:15:54 +02:00
logging.py initial commit — cassandra v0.1 2026-05-15 21:56:10 +01:00
main.py i18n: bilingual landing page (EN / IT) with auto-detect routing 2026-05-29 17:10:45 +02:00
models.py compliance: flag-gate AI portfolio + cloud sync + Stripe; de-risk prompts; harden reviewer 2026-05-29 19:57:12 +02:00
redis_client.py phase G: data minimisation + passwordless auth + DeepSeek-first LLM 2026-05-18 14:16:57 +01:00
scheduler_main.py scheduler: register email_digest_job at 06:30 UTC 2026-05-25 23:20:06 +02:00
schemas.py news: auto-tag headlines + market-aware cadence + filter UI 2026-05-21 23:25:03 +01:00
templates_env.py compliance: flag-gate AI portfolio + cloud sync + Stripe; de-risk prompts; harden reviewer 2026-05-29 19:57:12 +02:00