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>
This commit is contained in:
parent
ee8384f1ba
commit
47dce1a1a4
38 changed files with 1188 additions and 279 deletions
|
|
@ -77,12 +77,11 @@ features:
|
|||
every hour; free users get one every six.
|
||||
|
||||
multilang_callout: >-
|
||||
Every AI-generated surface — strategic log, indicator reads,
|
||||
portfolio analysis, chat, daily digest — is available in
|
||||
<strong>English</strong> and <strong>Italian</strong>. Toggle the
|
||||
language pill in the header and the panels refresh in place;
|
||||
ticker symbols, currency codes and numbers stay verbatim across
|
||||
languages.
|
||||
Every AI-generated surface — strategic log, indicator reads, chat,
|
||||
daily digest — is available in <strong>English</strong> and
|
||||
<strong>Italian</strong>. Toggle the language pill in the header
|
||||
and the panels refresh in place; ticker symbols, currency codes
|
||||
and numbers stay verbatim across languages.
|
||||
|
||||
more_views:
|
||||
head: "More views"
|
||||
|
|
@ -96,10 +95,10 @@ more_views:
|
|||
caption_span: "Conversational follow-ups with the day's context loaded."
|
||||
|
||||
portfolio_blurb: >-
|
||||
Paid users can also drop a portfolio CSV from their broker for an
|
||||
AI sense-check on concentration, regime fit, and currency
|
||||
exposure. Holdings stay in your browser by default; opt in to
|
||||
encrypted cloud sync to restore on another device.
|
||||
Drop a portfolio CSV from your broker to see your sector, currency
|
||||
and concentration breakdown — computed entirely in your browser.
|
||||
Holdings stay in your browser; nothing about them is sent to or
|
||||
stored on the server.
|
||||
|
||||
not_strip:
|
||||
head: "What this isn't."
|
||||
|
|
|
|||
|
|
@ -82,10 +82,10 @@ features:
|
|||
|
||||
multilang_callout: >-
|
||||
Ogni superficie generata dall'IA — log strategico, letture degli
|
||||
indicatori, analisi di portafoglio, chat, digest giornaliero — è
|
||||
disponibile in <strong>Inglese</strong> e <strong>Italiano</strong>.
|
||||
Usa il selettore di lingua nell'header e i pannelli si aggiornano
|
||||
in tempo reale; simboli ticker, codici valuta e numeri restano
|
||||
indicatori, chat, digest giornaliero — è disponibile in
|
||||
<strong>Inglese</strong> e <strong>Italiano</strong>. Usa il
|
||||
selettore di lingua nell'header e i pannelli si aggiornano in
|
||||
tempo reale; simboli ticker, codici valuta e numeri restano
|
||||
invariati tra le lingue.
|
||||
|
||||
more_views:
|
||||
|
|
@ -101,12 +101,10 @@ more_views:
|
|||
caption_span: "Domande conversazionali con il contesto della giornata già caricato."
|
||||
|
||||
portfolio_blurb: >-
|
||||
Gli utenti paganti possono anche caricare un CSV di portafoglio
|
||||
dal loro broker per un sense-check IA su concentrazione,
|
||||
coerenza con il regime di mercato ed esposizione valutaria. Le
|
||||
posizioni restano nel browser per impostazione predefinita;
|
||||
l'attivazione opzionale del cloud sync (crittografato)
|
||||
permette di ritrovarle su un altro dispositivo.
|
||||
Carica un CSV di portafoglio dal tuo broker per vedere la
|
||||
ripartizione per settore, valuta e concentrazione — calcolata
|
||||
interamente nel tuo browser. Le posizioni restano nel browser;
|
||||
nulla sui tuoi titoli viene inviato o conservato sul server.
|
||||
|
||||
not_strip:
|
||||
head: "Cosa questo NON è."
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue