Skip to content

feat: batch validation, scheduled E2E, contract fuzz, and wallet integration tests#236

Merged
Abd-Standard merged 2 commits into
Core-Foundry:mainfrom
miss-yusrah:feat/testing
Jun 26, 2026
Merged

feat: batch validation, scheduled E2E, contract fuzz, and wallet integration tests#236
Abd-Standard merged 2 commits into
Core-Foundry:mainfrom
miss-yusrah:feat/testing

Conversation

@miss-yusrah

Copy link
Copy Markdown
Contributor

closes #82
closes #98
closes #200
closes #201

PR description

Summary

This PR adds backend batch validation, end-to-end scheduled notification tests, Soroban contract fuzz tests, and wallet integration tests — with CI updates for fuzz coverage and wallet test reports.


Task 1 — [Backend] Notification Batch Validation Service

What changed

  • Enhanced BatchValidator with structured errors (code, field, index, message)
  • Validates batch structure, required fields, channel enum, empty values, and duplicate recipients (case-insensitive)
  • Added BatchValidationService as the service layer with validate() and rejectIfInvalid()
  • Wired POST /api/notifications/validate-batch into the events server
  • Integrated validation into NotificationScheduler before batch processing — invalid batches are rejected with actionable errors; valid batches continue
  • Added unit tests in batch-validator.test.ts and API tests in events-server.test.ts

Acceptance criteria

Criteria | Status -- | -- Invalid batches rejected | ✅ HTTP 400 + structured errors; scheduler rejects bad batches Validation errors actionable | ✅ Field-level codes (MISSING_FIELD, DUPLICATE_RECIPIENT, etc.) Valid batches continue processing | ✅ 200 response; scheduler proceeds when validation passes

Test plan

  •  cd listener && npm test
  •  cd dashboard && npm test && npm run test:wallet
  •  cd contract && cargo test --workspace && cargo test fuzz_
  •  bash scripts/run-fuzz-coverage.sh
  •  POST /api/notifications/validate-batch with valid and invalid payloads
  •  Confirm CI artifacts: fuzz-coverage-report, wallet-integration-report

Notes

  • Pre-existing listener test failures (e.g. notification-scheduler-refactored stats timing) were not modified.
  • Scheduled E2E tests use mocked DiscordNotificationService to avoid Stellar XDR JSON round-trip issues in SQLite payloads.

@drips-wave

drips-wave Bot commented Jun 24, 2026

Copy link
Copy Markdown

@miss-yusrah 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

@Abd-Standard Abd-Standard merged commit fc39af5 into Core-Foundry:main Jun 26, 2026
0 of 3 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

2 participants