Skip to content

feat(devops): add uptime monitor, editorconfig checks, strict TS hardening, and staging env - #378

Merged
james2177 merged 1 commit into
stellar-vortex-protocol:mainfrom
adeniran19-maker:feat/devops-governance-and-hardening
Sep 2, 2026
Merged

feat(devops): add uptime monitor, editorconfig checks, strict TS hardening, and staging env#378
james2177 merged 1 commit into
stellar-vortex-protocol:mainfrom
adeniran19-maker:feat/devops-governance-and-hardening

Conversation

@adeniran19-maker

Copy link
Copy Markdown
Contributor

Overview

This PR implements four governance and hardening initiatives across the Vortex frontend codebase, addressing issues #330, #331, #332, and #333. Every check passes cleanly: 0 type errors, 0 lint warnings, 0 editorconfig violations, and 344/344 vitest tests passing.


Issue #330 — Synthetic Uptime / Health-Check Monitor

File: .github/workflows/uptime-check.yml

  • Adds a GitHub Actions workflow that runs on a 30-minute cron schedule and is also triggerable manually via workflow_dispatch.
  • Probes the production frontend URL for a successful HTTP response and verifies content integrity (checks for expected page markers).
  • Probes the backend API relay /health endpoint separately.
  • Implements 2-attempt retry logic for transient network failures before failing a step.
  • Writes a structured step-summary report to GITHUB_STEP_SUMMARY for quick triage in the Actions UI.
  • Documents the monitoring setup in README.md under a new Operations section.

Issue #331 — .editorconfig & Cross-Editor Formatting Consistency

Files: .editorconfig, .editorconfig-checker.json, package.json, .github/workflows/ci.yml, .lintstagedrc.js

  • Adds a root-level .editorconfig specifying:
    • UTF-8 charset, 2-space indentation, LF line endings, final newline required, trailing whitespace trimmed.
    • Markdown files keep trailing whitespace (for hard line breaks).
    • JSON/YAML files use 2-space indent; shell scripts use 4-space indent with LF.
  • Adds .editorconfig-checker.json with ignore rules for .next/, node_modules/, coverage/, package-lock.json, and generated assets.
  • Adds the editorconfig-checker devDependency and a check:editorconfig npm script.
  • Wires check:editorconfig into the CI pipeline (.github/workflows/ci.yml) and pre-commit lint-staged config (.lintstagedrc.js).

Issue #332 — TypeScript Strictness Audit & Incremental Strict Flag Hardening

Files: tsconfig.json, many src/ files

Added strict compiler flags to tsconfig.json:

Flag Purpose
noImplicitOverride All overrides must be explicit
noPropertyAccessFromIndexSignature Forces bracket notation for index access
noUnusedLocals Catches dead local variables
noUnusedParameters Catches dead function parameters
forceConsistentCasingInFileNames Prevents cross-platform import bugs

Type fixes applied across the codebase:

  • src/lib/types.ts: Aligned QuoteRequest and CreateIntentRequest minOut to string | undefined for exactOptionalPropertyTypes compatibility.
  • src/components/SwapCard.tsx: Slippage tolerance percent input, minOut formatting, type=text inputMode=decimal for numeric fields.
  • src/components/ActivityFeed.tsx: Debounced live-region announcements ("1 new fill" / "N new fills"), correct empty/error fallback text ("No fills yet." / "Live feed unavailable right now.").
  • src/components/CopyButton.tsx: Added onKeyDown handler for keyboard accessibility.
  • src/components/ConnectWalletButton.tsx: Reconnect session label formatting.
  • src/app/solve/[address]/page.tsx: Address format validation, aria-label on status badge and error alerts, chain full-name resolution via CHAINS metadata.
  • src/app/solve/SolvePageClient.tsx: Cleaned up unused touched-state reads.
  • src/app/explore/[id]/page.tsx: Removed stale copied destructure.
  • src/store/wallet.ts: Safe JSON storage, errorKey typing, lastKnownAddress session hydration.
  • All test files: Fixed mock typing, hoisted declarations, and invalid vi.hoisted inside it blocks.
  • vitest.config.ts: Added exclude: ['e2e/**'] to prevent Playwright specs from running under Vitest.
  • vitest.setup.ts: Added global navigator.clipboard mock and explicit vi import.

Issue #333 — Staging Environment with Synthetic / Seeded Backend Data

Files: .env.staging.example, scripts/seed-staging-data.mjs, README.md, .github/PULL_REQUEST_TEMPLATE.md

  • Adds .env.staging.example documenting:
    • Staging API and WebSocket endpoints pointing to Testnet infrastructure.
    • NEXT_PUBLIC_USE_SYNTHETIC_DATA=true flag for UI-level seeded data rendering.
    • Feature flags (NEXT_PUBLIC_ENABLE_STAGING_BANNER, NEXT_PUBLIC_ENABLE_QA_TOOLS).
    • Rate-limit overrides for stress testing.
  • Adds scripts/seed-staging-data.mjs that defines and logs:
    • A full synthetic intent lifecycle (pending → accepted → filled states).
    • Three solver profiles with realistic metrics (fills, volume, chains, success rate).
  • Updates README.md with a Staging Environment & QA section, Operations section, and Code Standards subsection documenting all new scripts.
  • Updates .github/PULL_REQUEST_TEMPLATE.md with a QA / Staging testing checklist.

Test Results

✅  npm run check:env          — all 4 env vars documented
✅  npm run check:editorconfig — 0 violations
✅  npm run typecheck          — 0 errors (tsc --noEmit)
✅  npm run lint               — ✔ No ESLint warnings or errors
✅  npm test -- --run          — 344 / 344 tests pass (49 test files)

Closes #330
Closes #331
Closes #332
Closes #333

@drips-wave

drips-wave Bot commented Aug 31, 2026

Copy link
Copy Markdown

@adeniran19-maker Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@james2177

Copy link
Copy Markdown
Contributor

Resolve the conflicts

…ening, and staging env

Implements four governance and hardening initiatives to raise code quality,
consistency, and operational visibility across the vortex-frontend project.

- Added .github/workflows/uptime-check.yml with a scheduled cron (every 30 min)
  and manual workflow_dispatch trigger.
- Probes the production frontend URL and /health API relay endpoint with 2-attempt
  retry logic and detailed GitHub Actions step-summary reporting.
- Documents the monitoring setup in README.md under the new Operations section.

- Added .editorconfig with UTF-8 charset, 2-space indent, LF line endings, and
  trailing-whitespace trimming for all text files.
- Added .editorconfig-checker.json ignoring generated directories (.next,
  node_modules, coverage, package-lock.json, etc.).
- Added editorconfig-checker devDependency and check:editorconfig npm script.
- Wired check:editorconfig into .github/workflows/ci.yml and .lintstagedrc.js.
- All 344 vitest tests pass; editorconfig check reports 0 violations.

- Hardened tsconfig.json with noImplicitOverride, noPropertyAccessFromIndexSignature,
  noUnusedLocals, noUnusedParameters, and forceConsistentCasingInFileNames.
- Fixed every resulting type error across src/, including SwapCard, SolverDetailPage,
  ActivityFeed, SolvePageClient, ConnectWalletButton, and wallet store.
- tsc --noEmit, next lint, and check:editorconfig all exit clean.
- 344/344 vitest unit tests pass.

- Added .env.staging.example documenting Testnet endpoints and synthetic data flags.
- Added scripts/seed-staging-data.mjs with synthetic intent and solver profiles.
- Updated README.md with Staging, Operations, and Code Standards sections.
- Updated .github/PULL_REQUEST_TEMPLATE.md with QA / Staging checklist.

- npm run check:env          ✅  all env vars documented
- npm run check:editorconfig ✅  0 violations
- npm run typecheck          ✅  0 errors
- npm run lint               ✅  0 warnings / errors
- npm test -- --run          ✅  344 / 344 tests pass

Closes stellar-vortex-protocol#330
Closes stellar-vortex-protocol#331
Closes stellar-vortex-protocol#332
Closes stellar-vortex-protocol#333
@adeniran19-maker
adeniran19-maker force-pushed the feat/devops-governance-and-hardening branch from 1f7e083 to 976f152 Compare September 1, 2026 12:01
@james2177
james2177 merged commit c853b83 into stellar-vortex-protocol:main Sep 2, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants