Intelligence, Advanced Charting & Trading Platform
feature/chartnova-multimarket-chart-ws-foundation
diagnostics/chartnova-blank-screen-2026-10-15
diagnostics/chartnova-stage2-v27-preview-2026-10-15
docs/chartnova-stage1-reconcile-manifest-2026-10-15
feature/chartnova-ios-widget
feature/chartnova-light-catalog-lazy-series-2026-10-15
feature/chartnova-market-terminal
feature/chartnova-multimarket-chart-ws-foundation
feature/chartnova-neon-direct-history
feature/chartnova-neon-history
feature/paper-trading-risk-controls-2026-10-14
fix/alpha-vantage-live-payload
fix/chartnova-progressive-loading-2026-10-15
fix/live-proof-runner-cwd-2026-10-14
foundation/phase-0
foundation/postgres-core
main
ops/chartnova-emergency-rollback-2026-10-15
phase-1/candle-builder
phase-1/data-proof-artifact
phase-1/data-proof-metrics
phase-1/data-proof-report
phase-1/external-gates-state
phase-1/gold-api-fallback
phase-1/ingestion-pipeline
phase-1/live-proof-runner
phase-1/market-calendar
phase-1/market-domain
phase-1/neon-live-proof
phase-1/persistence-contract
phase-1/postgres-ci
phase-1/provider-adapters
phase-1/provider-recovery
phase-1/quality-propagation
phase-1/spike-detection
phase-1/xau-provider-adapter
risk/chartnova-alert-runtime-atomic-2026-10-22
risk/chartnova-atomic-outbox-2026-10-22
risk/chartnova-seven-track-safety-2026-10-21
safety/p0-triage-2026-10-13
| 1 | -- ChartNova: reconstruct the *least-privilege* ECB history reader only. |
| 2 | -- Intentionally does NOT recreate privileged legacy role chartnova_history_reader. |
| 3 | -- NOT an auto-run migration. Execute only after an authorized review in the target Neon database. |
| 4 | -- Secret/password is never stored in GitHub. NOLOGIN is deliberate until secure activation. |
| 5 | DO $chartnova$ |
| 6 | BEGIN |
| 7 | IF NOT EXISTS (SELECT 1 FROM pg_roles WHERE rolname = 'chartnova_history_ro') THEN |
| 8 | CREATE ROLE chartnova_history_ro |
| 9 | NOLOGIN NOSUPERUSER NOCREATEDB NOCREATEROLE |
| 10 | NOREPLICATION NOBYPASSRLS NOINHERIT; |
| 11 | END IF; |
| 12 | IF EXISTS ( |
| 13 | SELECT 1 FROM pg_roles |
| 14 | WHERE rolname='chartnova_history_ro' |
| 15 | AND (rolsuper OR rolcreatedb OR rolcreaterole OR rolreplication OR rolbypassrls OR rolinherit) |
| 16 | ) THEN |
| 17 | RAISE EXCEPTION 'chartnova_history_ro has excessive privileges; halt and review'; |
| 18 | END IF; |
| 19 | IF EXISTS ( |
| 20 | SELECT 1 FROM pg_auth_members m JOIN pg_roles r ON r.oid=m.member |
| 21 | WHERE r.rolname='chartnova_history_ro' |
| 22 | ) THEN |
| 23 | RAISE EXCEPTION 'chartnova_history_ro inherits a role; halt and review'; |
| 24 | END IF; |
| 25 | END |
| 26 | $chartnova$; |
| 27 | GRANT USAGE ON SCHEMA public TO chartnova_history_ro; |
| 28 | GRANT SELECT ON TABLE public.chartnova_history_public TO chartnova_history_ro; |
| 29 | -- Do not grant privileges on market_ticks, candles, providers, instruments, or other tables. |
| 30 | -- Enabling LOGIN and provisioning Cloudflare secret require a separate, secure authorization. |