Skip to content

feat: TLS cert monitoring, visual diff summaries, synthetic testnet bot, slow query logging - #1502

Merged
joelpeace48-cell merged 4 commits into
FinesseStudioLab:mainfrom
DeFiVC:feat/wave10-ci-testing-infra-automation
Oct 21, 2026
Merged

joelpeace48-cell merged 4 commits into
FinesseStudioLab:mainfrom
DeFiVC:feat/wave10-ci-testing-infra-automation

Conversation

@DeFiVC

@DeFiVC DeFiVC commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Closes #1362, Closes #1363, Closes #1364, Closes #1365

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Refactoring (no functional or behavioral changes)
  • Performance improvement
  • Documentation update
  • Build / CI configuration change
  • Dependency update
  • Other:

Summary

Four small, independent improvements to CI monitoring, test reporting, and observability:

  1. feat(security): Automated TLS cert auto-renewal monitoring check in CI #1362 — scripts/check-ssl-expiry.mjs + tls-cert-check.yml: fails CI and opens/updates a maintainer issue when any configured domain's TLS certificate expires within 30 days.
  2. feat(testing): Automated visual diff test report artifacts in GitHub Actions #1363 — scripts/visual-diff-summary.mjs wired into visual-regression.yml: inventories screenshot diff/actual/expected artifacts and publishes a markdown report to the GitHub Actions run summary.
  3. feat(testing): Add synthetic user transaction bot simulating 24/7 campaign activity on Testnet #1364 — scripts/synthetic-transaction-bot.mjs: continuous background bot simulating the register → credit → verify → cleanup journey on Testnet, emitting Prometheus metrics; supports --once / --iterations for CI.
  4. feat(infra): Automated database query execution time logging for slow query detection #1365 — backend/src/db/slowQueryLog.js wired into createDal: instruments better-sqlite3 prepared statements and logs queries ≥ 200ms (configurable via DB_SLOW_QUERY_MS) as structured JSON for CloudWatch, plus optional Sentry events via SENTRY_DSN.

Motivation / Context

Closes #1362 — encrypted transport breaks silently when certificates lapse; maintainers need a 30-day early warning.

Closes #1363 — visual regression diffs were uploaded as artifacts but invisible in the run summary, so regressions were easy to miss.

Closes #1364 — Testnet flow integrity was only exercised on demand; a synthetic bot gives continuous background coverage.

Closes #1365 — slow database queries were invisible in production telemetry.

Changes

Area Files What
security scripts/check-ssl-expiry.mjs, .github/workflows/tls-cert-check.yml TLS expiry probe + scheduled CI check (30-day window)
testing scripts/visual-diff-summary.mjs, .github/workflows/visual-regression.yml Diff artifact inventory published to $GITHUB_STEP_SUMMARY
testing scripts/synthetic-transaction-bot.mjs 24/7 synthetic transaction bot with Prometheus metrics
infra backend/src/db/slowQueryLog.js, backend/src/db/slowQueryLog.test.js, backend/src/dal/index.js Slow-query instrumentation (≥200ms) with CloudWatch/Sentry sinks

Testing

Tradeoffs

Out of scope

  • Actual certificate auto-renewal (e.g. certbot/ACME) — issue feat(security): Automated TLS cert auto-renewal monitoring check in CI #1362 asks for the monitoring/alerting check only.
  • Percy/Chromatic cloud upload — the repo's Playwright local-snapshot flow is summarized instead; external SaaS integration would need secrets/credentials.
  • Postgres (pg.Pool) slow-query instrumentation.
  • Alertmanager rule wiring for the new Prometheus metrics — metrics are emitted in the existing canary format for a follow-up to consume.

Alert maintainers when a domain endpoint's TLS certificate expires within
30 days, so automated renewals can be verified before encrypted transport
breaks. Includes a scheduled GitHub Actions workflow that publishes a
report to the job summary and opens/updates an issue on failure.
…mmaries

Add a visual-diff-summary script that inventories screenshot diff/actual/
expected artifacts and Playwright results, and wire it into the
visual-regression workflow so diffs appear in the run summary alongside
the uploaded artifacts.
Continuous background bot that simulates the register → credit → verify →
cleanup user journey against Testnet so campaign flow integrity is
exercised 24/7. Emits Prometheus counters/gauges per iteration and
supports --once / --iterations for CI and scheduled runs.
Instrument better-sqlite3 prepared statements so queries at or above a
200ms threshold emit structured warn logs (shipped to CloudWatch via the
backend's stdout) and optional Sentry events, without altering query
results or letting telemetry failures break execution.
@drips-wave

drips-wave Bot commented Oct 21, 2026

Copy link
Copy Markdown

@DeFiVC 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

host,
port,
servername: host,
rejectUnauthorized: false,
@joelpeace48-cell
joelpeace48-cell merged commit 3e41681 into FinesseStudioLab:main Oct 21, 2026
8 of 28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants