learning_ai_invt_trdg/scripts/smoke-release.sh
Saravana Achu Mac 4cfb446f57 feat(backend): WebSocket namespaces, audit persistence, tab flags, telemetry
- Add /trading and /admin named Socket.IO namespaces; root namespace kept for
  backward compat; admin namespace rejects non-admins at connect time
- Wire auditRepository.ts: persist TradeAuditEvent to Cosmos audit-events
  container (best-effort); expose GET /api/admin/audit for admin queries
- Add tradingTelemetry singleton (Node.js Map-based storage adapter); init
  and fatal-error tracking wired in index.ts main()
- Add TAB_MARKETPLACE_ENABLED / TAB_MEMBERSHIP_ENABLED config flags; expose
  tabs.* shape in GET /api/feature-flags response
- Fix SupabaseService URL validation (regex check before createClient)
- Wire check:api-contract and check:audit-repository into npm run test
- Switch @bytelyst/* deps to file:../vendor/* references

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-29 19:35:00 -04:00

51 lines
1.7 KiB
Bash

#!/bin/sh
set -eu
echo "Running release smoke checks for learning_ai_invt_trdg"
# ---------------------------------------------------------------------------
# Backend — static contract verification (no live infrastructure required)
# ---------------------------------------------------------------------------
echo ""
echo "[smoke] Backend contract checks..."
(
cd backend
npm run check:api-contract
npm run check:audit-repository
npm run check:websocket-contract
npm run check:session-rule-normalization
)
# ---------------------------------------------------------------------------
# Web — typecheck + production build + auth/kill-switch DOM tests
# ---------------------------------------------------------------------------
echo ""
echo "[smoke] Web typecheck and build..."
pnpm --filter @bytelyst/trading-web typecheck
pnpm --filter @bytelyst/trading-web build
echo ""
echo "[smoke] Web DOM smoke tests..."
(
cd web
pnpm vitest run \
src/components/Login.dom.test.tsx \
src/components/ResetPassword.dom.test.tsx \
src/components/ProductAccessibilityGate.dom.test.tsx \
src/components/ChatControl.dom.test.tsx \
src/components/EntryForm.dom.test.tsx \
src/hooks/useWebSocket.dom.test.tsx \
src/hooks/useTabFeatureFlags.dom.test.tsx \
src/components/AuthContext.dom.test.tsx
)
# ---------------------------------------------------------------------------
# Mobile — typecheck (compilation against shared platform contracts)
# ---------------------------------------------------------------------------
echo ""
echo "[smoke] Mobile typecheck..."
pnpm --filter @bytelyst/trading-mobile typecheck
echo ""
echo "[smoke] All release smoke checks passed."