Intelligence, Advanced Charting & Trading Platform
risk/chartnova-alert-runtime-atomic-2026-10-22
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 | -- Disposable GitHub Actions DB ONLY. This regression verifies that the |
| 2 | -- migration's documented default-deny PostgreSQL ACL boundary is real. |
| 3 | -- The test role and all test actions are rolled back before completion. |
| 4 | BEGIN; |
| 5 | |
| 6 | DO $$ |
| 7 | BEGIN |
| 8 | IF current_database() <> 'velyqor_test' THEN |
| 9 | RAISE EXCEPTION 'REFUSE_NON_EPHEMERAL_DATABASE'; |
| 10 | END IF; |
| 11 | END $$; |
| 12 | |
| 13 | CREATE ROLE chartnova_untrusted_probe NOLOGIN; |
| 14 | SET LOCAL ROLE chartnova_untrusted_probe; |
| 15 | |
| 16 | DO $$ |
| 17 | DECLARE |
| 18 | function_signature TEXT; |
| 19 | table_name TEXT; |
| 20 | row_count INTEGER; |
| 21 | BEGIN |
| 22 | FOREACH table_name IN ARRAY ARRAY[ |
| 23 | 'notification_outbox', |
| 24 | 'alert_rule_runtime', |
| 25 | 'alert_notification_consents' |
| 26 | ] LOOP |
| 27 | IF has_table_privilege(current_user, |
| 28 | 'public.' || table_name, 'SELECT') |
| 29 | OR has_table_privilege(current_user, |
| 30 | 'public.' || table_name, 'INSERT') |
| 31 | OR has_table_privilege(current_user, |
| 32 | 'public.' || table_name, 'UPDATE') THEN |
| 33 | RAISE EXCEPTION 'Untrusted role has table privileges: %', table_name; |
| 34 | END IF; |
| 35 | BEGIN |
| 36 | EXECUTE format('SELECT count(*) FROM public.%I',table_name) |
| 37 | INTO row_count; |
| 38 | RAISE EXCEPTION 'Untrusted role read protected table: %',table_name; |
| 39 | EXCEPTION WHEN insufficient_privilege THEN |
| 40 | NULL; |
| 41 | END; |
| 42 | END LOOP; |
| 43 | |
| 44 | FOREACH function_signature IN ARRAY ARRAY[ |
| 45 | 'public.notification_outbox_enqueue(uuid,text,text,uuid,integer)', |
| 46 | 'public.notification_outbox_claim(timestamptz,integer)', |
| 47 | 'public.notification_outbox_finish(uuid,uuid,text,text,timestamptz,integer)', |
| 48 | 'public.notification_outbox_acknowledge(uuid,uuid,timestamptz)', |
| 49 | 'public.alert_rule_commit(uuid,text,bigint,jsonb,text,text,uuid,timestamptz)', |
| 50 | 'public.alert_notification_claim_consented(timestamptz,integer)', |
| 51 | 'public.alert_notification_begin_egress(uuid,uuid,uuid,text,timestamptz)', |
| 52 | 'public.alert_notification_egress_allowed(uuid,uuid,uuid,text,timestamptz)' |
| 53 | ] LOOP |
| 54 | IF has_function_privilege(current_user, |
| 55 | function_signature,'EXECUTE') THEN |
| 56 | RAISE EXCEPTION 'Untrusted role can execute privileged function: %', |
| 57 | function_signature; |
| 58 | END IF; |
| 59 | END LOOP; |
| 60 | |
| 61 | -- Test the authorization check itself, not just an explicit catalog flag. |
| 62 | BEGIN |
| 63 | PERFORM public.alert_notification_claim_consented(now(),30); |
| 64 | RAISE EXCEPTION 'Untrusted role executed protected claim function'; |
| 65 | EXCEPTION WHEN insufficient_privilege THEN |
| 66 | NULL; |
| 67 | END; |
| 68 | RAISE NOTICE 'ALERT_RUNTIME_ROLE_ISOLATION_VERIFIED'; |
| 69 | END $$; |
| 70 | |
| 71 | ROLLBACK; |