Skip to content

feat(backend): add realistic, deterministic seed data generation - #1847

Merged
Akanimoh12 merged 2 commits into
Akanimoh12:test-implement-dripsfrom
TYDev01:feat/realistic-seed-data-1381
Nov 27, 2026
Merged

Akanimoh12 merged 2 commits into
Akanimoh12:test-implement-dripsfrom
TYDev01:feat/realistic-seed-data-1381

Conversation

@TYDev01

@TYDev01 TYDev01 commented Nov 25, 2026

Copy link
Copy Markdown
Contributor

Replace the 3-user placeholder seed with a dependency-free generator matched to the test-implement-drips schema:

  • Configurable volume via SEED_SCALE (small|medium|large|xl) and SEED_USERS
  • Realistic data: varied credit-score signals, skewed tip distribution, streaks, and every goal/subscription/webhook/tip lifecycle state
  • Guaranteed edge cases: zero-tip creator, maximum-length fields, expired goals/subscriptions/tokens/challenges, REFUNDED tips, anti-gaming self/wash tips
  • Fully deterministic (seeded PRNG + fixed time anchor); same SEED yields byte-identical rows for reproducible bug reports
  • SEED_DRY_RUN mode verifies referential integrity with no database
  • Documented in backend/README.md

Closes #1381

Description

Closes #

Linked Issue

  • This PR is linked to an issue and references it above.
  • The issue number is included in the PR title or description.

Type of Change

Please mark the options that are relevant:

  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • ✨ New feature (non-breaking change which adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 🧪 Tests (adding new tests or updating existing tests)
  • 📝 Documentation (changes to documentation/configs only)
  • 🚀 DevOps & CI/CD (changes to workflows, scripts, or templates)

Changes Made

How to Test

  1. cd frontend-scaffold && npm run typecheck && npm run lint && npm test
  2. cd backend && npm run typecheck && npm run lint && npm test
  3. Manual verification steps (if applicable):

Testing Notes

  • I described the commands used to verify the change.
  • I noted any environment or browser setup required for manual testing.

Checklist

💻 Smart Contract Changes (if applicable)

  • Running cargo fmt -- --check passes successfully.
  • Running cargo clippy -- -D warnings runs without any warnings.
  • All tests pass successfully using cargo test.
  • New unit or integration tests have been written to cover the changes.
  • No hardcoded values are present (e.g. addresses, fees) that should be configurable.

🎨 Frontend Changes (if applicable)

  • TypeScript compiles cleanly with no errors (npm run typecheck or npx tsc --noEmit).
  • Running npm run lint shows no linting errors.
  • The production build compiles successfully via npm run build.
  • Changes verified on local browser environment with Freighter/xBull/Albedo wallet.
  • Responsive design verified (tested on mobile, tablet, and desktop viewport sizes).
  • Keyboard navigation and accessibility (a11y) considerations are addressed.

⚙️ General

  • Code follows the project's coding standards and structure guidelines.
  • Self-reviewed the changes to ensure clean code with no commented-out code blocks.
  • No console.log or debug code remains in production files.
  • The branch is up-to-date with the main branch.

Screenshots / Demos (if applicable)

Replace the 3-user placeholder seed with a dependency-free generator matched
to the test-implement-drips schema:

- Configurable volume via SEED_SCALE (small|medium|large|xl) and SEED_USERS
- Realistic data: varied credit-score signals, skewed tip distribution,
  streaks, and every goal/subscription/webhook/tip lifecycle state
- Guaranteed edge cases: zero-tip creator, maximum-length fields, expired
  goals/subscriptions/tokens/challenges, REFUNDED tips, anti-gaming self/wash tips
- Fully deterministic (seeded PRNG + fixed time anchor); same SEED yields
  byte-identical rows for reproducible bug reports
- SEED_DRY_RUN mode verifies referential integrity with no database
- Documented in backend/README.md

Closes Akanimoh12#1381
…rets

Replace high-entropy, secret-shaped seed values (hashedKey, hashedToken,
webhook secret, auth nonce) with deterministic 'seed-fake-*' placeholders so
the secrets scanner (gitleaks) does not flag generated test data, and reviewers
can see at a glance they are not real credentials. Dropped the 'whsec_' prefix
(a real Stripe webhook-secret pattern).
@Akanimoh12
Akanimoh12 merged commit f0f01a1 into Akanimoh12:test-implement-drips Nov 27, 2026
4 of 10 checks passed

This branch had an error being deployed

1 failed deployment
preview — 3f03fc0a Deployed Nov 25, 2026 by TYDev01 via Deploy Preview / Deploy Frontend (preview) #541
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add realistic seed data generation

2 participants