@davoodmehraban89 / VELYQOR / commits / df2253b
Fork 0

Intelligence, Advanced Charting & Trading Platform

ci(db): validate two independent PostgreSQL sessions cannot double-claim an alert

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