Skip to content

Fix issues 702, 703, 705, 707: Add test coverage and dependency status logging - #794

Merged
meshackyaro merged 2 commits into
trustflow-protocol:mainfrom
olayinkaabdulsalam-hub:fix/issues-702-703-705-707
Oct 21, 2026
Merged

meshackyaro merged 2 commits into
trustflow-protocol:mainfrom
olayinkaabdulsalam-hub:fix/issues-702-703-705-707

Conversation

@olayinkaabdulsalam-hub

Copy link
Copy Markdown
Contributor

Summary

This PR fixes four GitHub issues in the trustflow-backend repository with comprehensive implementations and test coverage.

Issues Fixed

#705: Add test coverage for MigrationStateStore Redis guard

  • Added 3 test cases to verify Redis guard behavior
  • Tests verify that onModuleInit() throws when redis is null and NODE_ENV is production
  • Tests verify that onModuleInit() does not throw when redis client is provided
  • Tests verify that onModuleInit() does not throw in dev/test environments

#707: Add test coverage for scrubEvent redaction paths

  • Added 8 new test cases covering previously untested redaction paths
  • Test cases cover: event.message, event.tags.url, non-url tags, event.extra, event.contexts, event.user.ip_address, event.query_string, and event.exception.values redaction

#702: Implement dependency-status startup log

  • Created DependencyStatusService that probes all critical dependencies
  • Logs a single-line status summary at startup
  • Probes actual dependency states: Redis connectivity, database configuration, RPC endpoints, admin addresses, IPFS providers
  • Added DependencyStatusModule and integrated into app.setup.ts
  • Includes comprehensive unit tests

#703: Remove demo-only GigsPriorityBackfillMigration from production registry

  • Changed MIGRATION_DEFINITIONS to return empty array
  • Kept GigsPriorityBackfillMigration class as reference implementation
  • Added documentation explaining why it's demo-only
  • Updated PERSISTENT_STORAGE_SPIKE.md with resolution details

Files Changed

  • backend/src/migration/migration-state.store.spec.ts
  • backend/src/sentry/sentry.service.spec.ts
  • backend/src/common/dependency-status/dependency-status.service.ts
  • backend/src/common/dependency-status/dependency-status.service.spec.ts
  • backend/src/common/dependency-status/dependency-status.module.ts
  • backend/src/app.setup.ts
  • backend/src/app.module.ts
  • backend/src/migration/migration.module.ts
  • backend/src/migration/migrations/gigs-priority-backfill.migration.ts
  • backend/PERSISTENT_STORAGE_SPIKE.md
  • backend/tsconfig.json

Test Coverage

Closes #702, Closes #703, Closes #705, Closes #707

…rustflow-protocol#775)

- Fix trustflow-protocol#749: Reorder JWT_SECRET validation to check placeholder values before length
- Fix trustflow-protocol#761: Add missing imports for MetricsService and SentryService, define LOCK_RENEWAL_INTERVAL_MS constant
- Fix trustflow-protocol#757: Map IPFS pin status to deliverable status so PENDING and FAILED states are reachable
- Fix trustflow-protocol#764: Add validation to reject even juror counts to prevent vote ties

These changes ensure all code paths are reachable and proper validation prevents edge cases.

Co-authored-by: Maverick <151352447+meshackyaro@users.noreply.github.com>
@drips-wave

drips-wave Bot commented Oct 19, 2026

Copy link
Copy Markdown

@olayinkaabdulsalam-hub 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

@meshackyaro
meshackyaro merged commit 2d7bd21 into trustflow-protocol:main Oct 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment