Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
2ddb90f
Apply one event lifecycle policy to every action (R08 part 1)
SURYANSH-RAI Oct 18, 2026
7d45469
Track where background matching stands (R08 part 2)
SURYANSH-RAI Oct 18, 2026
a6a1b63
Show participants and organizers where matching stands (R08 part 3)
SURYANSH-RAI Oct 18, 2026
5c796f8
Make login code limits hold under concurrent requests (R09 part 1)
SURYANSH-RAI Oct 18, 2026
3154b06
Guard sign-in endpoints against enumeration and cross-site use (R09 p…
SURYANSH-RAI Oct 18, 2026
e209868
Sweep expired login and cache rows hourly in the worker (R09 part 3)
SURYANSH-RAI Oct 18, 2026
da6d761
Stamp release versions and run CI on every PR (R10 part 1)
SURYANSH-RAI Oct 18, 2026
0ebcd07
Gate deploys on full CI, pin every task, verify and roll back (R10 pa…
SURYANSH-RAI Oct 18, 2026
d5acf5f
Ignore the local .claude folder
SURYANSH-RAI Oct 18, 2026
4d1ba91
bug fixx-organizer-cannot-sign-in-to-new-event
SURYANSH-RAI Oct 18, 2026
d9c227f
bug fixx-rate-limiter-query-always-fails
SURYANSH-RAI Oct 18, 2026
7480e93
bug fixx-no-way-to-sign-out
SURYANSH-RAI Oct 18, 2026
e8d92d3
bug fixx-r03-missing-from-main-line
SURYANSH-RAI Oct 17, 2026
7a6856a
Fail fast on undeliverable login e-mail; gate Google sign-in (R02 par…
SURYANSH-RAI Oct 17, 2026
6c1ba2d
Add keycloak:sync and production e-mail deploy guard (R02 part 2)
SURYANSH-RAI Oct 17, 2026
8c75c8f
Verify database TLS and add least-privilege logins (R11 part 1)
SURYANSH-RAI Oct 18, 2026
b4d1327
Require HTTPS, restrict Keycloak admin, separate DB logins (R11 part 2)
SURYANSH-RAI Oct 18, 2026
aa5e020
Track invitations, claims and revoked access per event (R12 part 1)
SURYANSH-RAI Oct 18, 2026
f6f1a4e
Show invitation status and manage access on the roster (R12 part 2)
SURYANSH-RAI Oct 18, 2026
ea36352
End sessions of disabled accounts and Keycloak users (R13 part 1)
SURYANSH-RAI Oct 18, 2026
3f71d1a
bug fixx-roster-sideways-scroll-on-phone
SURYANSH-RAI Oct 18, 2026
9ac5cde
Link Google to e-mail accounts and end Keycloak sessions on sign-out …
SURYANSH-RAI Oct 18, 2026
9632c5f
Enforce organizer roles and make roster imports atomic and non-destru…
SURYANSH-RAI Oct 18, 2026
0405de5
bug fixx-org-admin-cannot-save-event-settings
SURYANSH-RAI Oct 18, 2026
8e00648
Let organizers configure the participant profile form (R15)
SURYANSH-RAI Oct 18, 2026
34b6cc1
Make search query-aware with intent and domain filters (R16)
SURYANSH-RAI Oct 18, 2026
1113314
Score mutual interest in both directions with a versioned config (R17)
SURYANSH-RAI Oct 18, 2026
67f6c8a
Cache match explanations per viewer and candidate pair (R18)
SURYANSH-RAI Oct 18, 2026
bec5ce7
Add connection abuse controls and profile visibility (R19 part 1)
SURYANSH-RAI Oct 18, 2026
b81b1e5
Record sensitive actions and enforce data retention (R19 part 2)
SURYANSH-RAI Oct 18, 2026
3a8a501
Coalesce search retrieval across replicas with complete cache keys (R20)
SURYANSH-RAI Oct 19, 2026
aaf5f9a
Make background matching durable and revision-aware (R21 part 1)
SURYANSH-RAI Oct 19, 2026
1b041c3
Refresh affected participants and add failed-job tooling (R21 part 2)
SURYANSH-RAI Oct 19, 2026
74149e2
Put embedding and rerank calls behind a model gateway (R22 part 1)
SURYANSH-RAI Oct 19, 2026
b9fc8ee
Test the model gateway and add a usage report (R22 part 2)
SURYANSH-RAI Oct 19, 2026
0bb9a41
Version stored embeddings by model and never mix spaces (R22 part 3)
SURYANSH-RAI Oct 19, 2026
74c31db
Deliver intro notifications through a durable outbox (R23 part 1)
SURYANSH-RAI Oct 19, 2026
0a9deda
Add "where are you?" location requests with voluntary replies (R23 pa…
SURYANSH-RAI Oct 19, 2026
15c2277
Fail CI when integration suites would skip (R24 part 1)
SURYANSH-RAI Oct 19, 2026
ed05d92
bug fixx-rerank-order-on-cache-hit
SURYANSH-RAI Oct 19, 2026
48c08ca
Test the background matching journey end to end (R24 part 2)
SURYANSH-RAI Oct 19, 2026
00d0e4e
bug fixx-crossing-intro-requests
SURYANSH-RAI Oct 19, 2026
dca6e70
Test races on intros, replies, locations and imports (R24 part 3)
SURYANSH-RAI Oct 19, 2026
c0f80eb
Test event isolation in one suite (R24 part 4)
SURYANSH-RAI Oct 19, 2026
727fd17
Document required test services in the README (R24 part 5)
SURYANSH-RAI Oct 19, 2026
e9f8db6
Add the browser acceptance suite and run it in CI (R24 part 6)
SURYANSH-RAI Oct 19, 2026
d9453db
Rotate the session secret without signing anyone out (R25 part 1)
SURYANSH-RAI Oct 19, 2026
6385efa
Alarm on the matching and notification pipeline (R25 part 2)
SURYANSH-RAI Oct 19, 2026
5f89529
bug fixx-match-save-deadlock
SURYANSH-RAI Oct 19, 2026
fed3772
bug fixx-retrieval-intent-starvation
SURYANSH-RAI Oct 19, 2026
d510446
Measure capacity and latency against agreed budgets (R25 part 3)
SURYANSH-RAI Oct 19, 2026
96377bb
Rehearse restores and keep rollbacks safe (R25 part 4)
SURYANSH-RAI Oct 19, 2026
46da091
bug fixx-deploy-role-worker-repo
SURYANSH-RAI Oct 19, 2026
9f2cfb2
Add a staging target and promotion of tested images (R25 part 5)
SURYANSH-RAI Oct 19, 2026
4e5e5c4
Write the operations runbook (R25 part 6)
SURYANSH-RAI Oct 19, 2026
460b61a
bug fixx-tsconfig-baseurl-deprecation
SURYANSH-RAI Oct 19, 2026
5f075a2
Merge pull request #28 from LucknowAI/feature/operations-readiness
SURYANSH-RAI Nov 13, 2026
0c518c0
Merge pull request #27 from LucknowAI/feature/browser-acceptance-suite
SURYANSH-RAI Nov 13, 2026
e91605d
Merge pull request #26 from LucknowAI/feature/ci-acceptance-coverage
SURYANSH-RAI Nov 13, 2026
75b4948
Merge pull request #25 from LucknowAI/feature/notifications-location-…
SURYANSH-RAI Nov 13, 2026
4fdb5b5
Merge pull request #24 from LucknowAI/feature/model-gateway
SURYANSH-RAI Nov 13, 2026
422583b
Merge pull request #23 from LucknowAI/feature/durable-matching-jobs
SURYANSH-RAI Nov 13, 2026
191813a
Merge pull request #22 from LucknowAI/feature/shared-search-retrieval
SURYANSH-RAI Nov 13, 2026
961e83a
Merge pull request #21 from LucknowAI/feature/privacy-abuse-controls
SURYANSH-RAI Nov 13, 2026
f99a91d
Merge pull request #20 from LucknowAI/feature/pair-explanation-cache
SURYANSH-RAI Nov 13, 2026
8c4b6a0
Merge pull request #19 from LucknowAI/feature/mutual-interest-scoring
SURYANSH-RAI Nov 13, 2026
96b038c
Merge pull request #18 from LucknowAI/feature/query-aware-search
SURYANSH-RAI Nov 13, 2026
6214731
Merge pull request #17 from LucknowAI/feature/profile-form-config
SURYANSH-RAI Nov 13, 2026
f7ae4f5
Merge pull request #16 from LucknowAI/feature/organizer-roles-import
SURYANSH-RAI Nov 13, 2026
909ed94
Merge pull request #15 from LucknowAI/feature/identity-sessions
SURYANSH-RAI Nov 13, 2026
971099f
Merge pull request #14 from LucknowAI/feature/invitation-lifecycle
SURYANSH-RAI Nov 13, 2026
00980c4
Merge pull request #13 from LucknowAI/feature/production-hardening
SURYANSH-RAI Nov 13, 2026
20927b1
Merge pull request #12 from LucknowAI/bug-fixxes
SURYANSH-RAI Nov 13, 2026
1fabc59
Merge pull request #11 from LucknowAI/feature/release-gates
SURYANSH-RAI Nov 13, 2026
356392b
Merge pull request #10 from LucknowAI/feature/auth-abuse-controls
SURYANSH-RAI Nov 13, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 30 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ DEFAULT_EVENT_SLUG=demo
# Encrypts the session cookie. REQUIRED, min 32 chars.
# openssl rand -base64 48
SESSION_SECRET=
# While rotating: the old secret(s), comma-separated, still accepted for
# reading cookies for one session lifetime so nobody is signed out.
# SESSION_SECRET_PREVIOUS=
# Hashes login codes. Defaults to SESSION_SECRET; set it separately in
# production so rotating the session secret leaves codes in flight working.
# OTP_PEPPER=

# ── Postgres ──────────────────────────────────────────────────
POSTGRES_USER=matchmaker
Expand All @@ -22,7 +28,18 @@ POSTGRES_PORT=5432
# Used by scripts run on the HOST (migrate/seed/import).
# Inside docker-compose the host is `postgres`, not `localhost`.
DATABASE_URL=postgres://matchmaker:matchmaker@localhost:5432/matchmaker
# disable (local, no TLS) | require (encrypted, unverified) | verify (encrypted,
# certificate checked against DATABASE_CA_CERT or DATABASE_CA_CERT_FILE).
# Production refuses anything but verify for a remote database.
DATABASE_SSL=disable
# DATABASE_CA_CERT_FILE=/etc/ssl/certs/rds-global-bundle.pem

# Deployed only: the migration task creates these least-privilege logins
# (packages/db/src/ensure-roles.ts); web and worker then use the runtime one.
# DATABASE_RUNTIME_USER=app_runtime
# DATABASE_RUNTIME_PASSWORD=
# KEYCLOAK_DB_USER=keycloak
# KEYCLOAK_DB_PASSWORD=

# ── Keycloak ──────────────────────────────────────────────────
KEYCLOAK_PORT=8080
Expand All @@ -43,11 +60,15 @@ KEYCLOAK_GOOGLE_IDP_ALIAS=google
# From Google Cloud Console > APIs & Services > Credentials.
# Authorised redirect URI must be:
# http://localhost:8080/realms/match-maker/broker/google/endpoint
# Leave blank to develop with the e-mail-code path only.
# Leave blank to develop with the e-mail-code path only; the login page shows
# "Sign in with Google" only when GOOGLE_CLIENT_ID is set. After changing these
# (or KEYCLOAK_CLIENT_SECRET) on an existing realm, run: npm run keycloak:sync
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=

# ── Resend (login e-mails) ────────────────────────────────────
# The web app refuses to start without a key unless EMAIL_DEV_FALLBACK=true.
# EMAIL_FROM must use a domain verified in Resend.
RESEND_API_KEY=
EMAIL_FROM=Mr. Bridge <onboarding@resend.dev>

Expand All @@ -61,6 +82,14 @@ OTP_TTL_SECONDS=600
OTP_MAX_PER_WINDOW=5
OTP_RATE_WINDOW_SECONDS=900

# Seconds the worker waits before refreshing other people's matches after a
# profile change, so bursts of changes coalesce (default 120).
# MATCH_REFRESH_DELAY_SECONDS=120

# Proxies in front of the web app that append to X-Forwarded-For (1 behind
# the AWS ALB). 0 trusts no header, so per-IP login limits are skipped locally.
TRUSTED_PROXY_HOPS=0

# ── Gemini (matchmaking) ──────────────────────────────────────
GEMINI_API_KEY=
GEMINI_LLM_MODEL=gemini-3.8-flash
Expand Down
148 changes: 128 additions & 20 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,23 @@ name: CI

on:
push:
branches: [main]
branches: [main, dev]
# Every pull request, whatever branch it targets.
pull_request:
branches: [main]
# deploy.yml runs these same checks before it builds anything, so there is
# one definition of what a release must pass.
workflow_call:
inputs:
build_images:
description: "Also build the images (the deploy builds and pushes its own)"
type: boolean
default: true

# A new push supersedes an in-flight run on the same branch.
# A new push supersedes an in-flight run on the same branch. The workflow name
# keeps a deploy's call to this file out of the standalone CI run's group,
# which a push to main starts at the same time.
concurrency:
group: ci-${{ github.ref }}
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
Expand All @@ -20,6 +30,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
# The migration gate compares with the base commit.
fetch-depth: 0

- uses: actions/setup-node@v4
with:
Expand All @@ -37,29 +50,31 @@ jobs:
- name: Unit tests
run: npx vitest run tests/unit

# Migrations run before the new code starts, and a rollback runs the
# previous image on the migrated schema: released migrations never
# change and new ones only expand.
- name: Migrations are safe to roll back from
run: npx tsx tools/check-migrations.ts "${{ github.event.pull_request.base.sha || github.event.before }}"

integration:
name: Integration tests
runs-on: ubuntu-latest

services:
postgres:
image: pgvector/pgvector:pg16
env:
POSTGRES_USER: matchmaker
POSTGRES_PASSWORD: matchmaker
POSTGRES_DB: matchmaker
ports:
- 5432:5432
options: >-
--health-cmd "pg_isready -U matchmaker"
--health-interval 5s
--health-timeout 5s
--health-retries 20

# The same Postgres (with the Keycloak database) and Keycloak (with the
# realm import and theme) that docker compose runs locally.
env:
DATABASE_URL: postgres://matchmaker:matchmaker@localhost:5432/matchmaker
DATABASE_SSL: disable
SESSION_SECRET: ci-session-secret-long-enough-for-validation-x
KEYCLOAK_ISSUER: http://localhost:8080/realms/match-maker
KEYCLOAK_PUBLIC_URL: http://localhost:8080
KEYCLOAK_ADMIN: admin
KEYCLOAK_ADMIN_PASSWORD: admin
KEYCLOAK_CLIENT_ID: match-maker-web
KEYCLOAK_CLIENT_SECRET: ci-client-secret
APP_BASE_URL: http://localhost:3000
# Suites skip themselves without these services; here that is a failure.
REQUIRE_SERVICES: db,keycloak

steps:
- uses: actions/checkout@v4
Expand All @@ -71,18 +86,111 @@ jobs:

- run: npm ci

- name: Start Postgres and Keycloak
run: docker compose up -d --wait postgres keycloak

# The suite calls migrate() itself, so this only proves the runner works
# standalone — the way the deploy pipeline invokes it.
- name: Apply migrations
run: npm run db:migrate

- name: Configure Keycloak
run: |
npm run keycloak:wait
npm run keycloak:sync

- name: Integration tests
run: npx vitest run tests/integration
run: npx vitest run tests/integration --reporter=default --reporter=json --outputFile=vitest-report.json

# A suite that skipped itself would otherwise count as a pass.
- name: Every integration test ran
run: npx tsx tools/check-test-report.ts vitest-report.json

- name: Service logs
if: failure()
run: docker compose logs --no-color postgres keycloak | tail -n 300

browser:
name: Browser acceptance
runs-on: ubuntu-latest
needs: [quality]

# The built app and the worker against the compose Postgres and Keycloak.
# Login codes are logged instead of e-mailed and read from the app's log.
env:
DATABASE_URL: postgres://matchmaker:matchmaker@localhost:5432/matchmaker
DATABASE_SSL: disable
SESSION_SECRET: ci-session-secret-long-enough-for-validation-x
KEYCLOAK_ISSUER: http://localhost:8080/realms/match-maker
KEYCLOAK_PUBLIC_URL: http://localhost:8080
KEYCLOAK_ADMIN: admin
KEYCLOAK_ADMIN_PASSWORD: admin
KEYCLOAK_CLIENT_ID: match-maker-web
KEYCLOAK_CLIENT_SECRET: ci-client-secret
APP_BASE_URL: http://localhost:3000
EMAIL_DEV_FALLBACK: "true"
MATCH_REFRESH_DELAY_SECONDS: "3"
E2E_BASE_URL: http://localhost:3000
E2E_WEB_LOG: ${{ github.workspace }}/e2e-web.log

steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: npm

- run: npm ci

- name: Start Postgres and Keycloak
run: docker compose up -d --wait postgres keycloak

- name: Migrate, seed and configure Keycloak
run: |
npm run db:migrate
npm run db:seed
npm run keycloak:wait
npm run keycloak:sync

- name: Build
run: npm run build

- name: Install Chromium
run: npx playwright install --with-deps chromium

- name: Start app and worker
run: |
(cd apps/web && nohup npx next start -p 3000 > "$E2E_WEB_LOG" 2>&1 &)
nohup npm run worker > e2e-worker.log 2>&1 &
for i in $(seq 1 60); do
curl -fsS http://localhost:3000/api/health/ready && exit 0
sleep 2
done
cat "$E2E_WEB_LOG"
exit 1

- name: Browser tests
run: npm run test:e2e

- name: Keep report and logs
if: failure()
uses: actions/upload-artifact@v4
with:
name: browser-acceptance
path: |
playwright-report/
test-results/
e2e-web.log
e2e-worker.log
retention-days: 7

build:
name: Build images
runs-on: ubuntu-latest
needs: [quality]
# Push and pull_request runs have no inputs, so this is true for them.
if: ${{ inputs.build_images != false }}
steps:
- uses: actions/checkout@v4

Expand Down
Loading
Loading