Intelligence, Advanced Charting & Trading Platform

1 name: ChartNova atomic outbox concurrency test
2 on:
3 pull_request:
4 paths:
5 - 'db/migrations/0004_notification_outbox.sql'
6 - 'db/tests/notification_outbox_invariants.sql'
7 - 'scripts/check-outbox-concurrency.mjs'
8 - 'docs/operations/chartnova-atomic-outbox-2026-10-22.md'
9 - 'PROJECT_STATE.md'
10 - '.github/workflows/chartnova-outbox-concurrency.yml'
11 workflow_dispatch:
12 permissions:
13 contents: read
14 jobs:
15 two-real-postgres-sessions:
16 runs-on: ubuntu-latest
17 timeout-minutes: 8
18 services:
19 postgres:
20 image: postgres:18
21 env:
22 POSTGRES_USER: postgres
23 POSTGRES_PASSWORD: postgres
24 POSTGRES_DB: velyqor_test
25 ports: ['5432:5432']
26 options: >-
27 --health-cmd "pg_isready -U postgres -d velyqor_test"
28 --health-interval 5s
29 --health-timeout 5s
30 --health-retries 10
31 env:
32 PGHOST: 127.0.0.1
33 PGPORT: '5432'
34 PGUSER: postgres
35 PGPASSWORD: postgres
36 PGDATABASE: velyqor_test
37 VELYQOR_TEST_DATABASE: velyqor_test
38 steps:
39 - uses: actions/checkout@v4
40 - uses: actions/setup-node@v4
41 with:
42 node-version: '22'
43 - name: Apply migrations to disposable local CI database ONLY
44 run: |
45 for file in db/migrations/*.sql; do
46 psql -X -v ON_ERROR_STOP=1 -f "$file" >/dev/null
47 done
48 - name: Test concurrent enqueue and locked-row claim without touching Neon
49 run: node scripts/check-outbox-concurrency.mjs