Skip to content

Add milestoneRepository pagination, soft-delete, and verifier-filter tests in src/tests/milestoneRepository.queries.test.ts #866

Description

@1nonlypiece

📌 Description

The src/repositories/milestoneRepository.ts data-access layer underpins
milestone listing, verifier assignment, and soft-delete. A prior wave seeded a
milestoneRepository.test.ts title, but coverage of keyset pagination ordering,
soft-delete exclusion, and verifier-assignment filtering as a combined matrix is
still missing.

This issue adds a query-behaviour test matrix for the milestone repository.

🎯 Requirements and Context

  • Assert keyset pagination is stable across inserts (no skipped/duplicated rows).
  • Assert soft-deleted milestones are excluded by default and includable
    explicitly.
  • Assert verifier-assignment filters return only the assigned verifier's
    milestones.
  • Assert org-scoping on every query path.

🛠️ Suggested Execution

1. Fork the repo and create a branch

git checkout -b test/milestone-repository-queries

2. Implement changes

  • Add src/tests/milestoneRepository.queries.test.ts using the DB test harness.
  • Cross-reference docs/milestones.md.

3. Test and commit

  • Run: npm test -- src/tests/milestoneRepository.queries.test.ts
  • Cover edge cases: pagination stability under concurrent insert, soft-delete
    include/exclude, verifier filter, empty result, org isolation.

Example commit message

test: milestone repository pagination, soft-delete, and verifier filters

✅ Guidelines

  • Minimum 95% test coverage on the repository.
  • Timeframe: 96 hours.

🏷️ Labels

type-testing · area-backend · MAYBE REWARDED · GRANTFOX OSS · OFFICIAL CAMPAIGN

💬 Community & Support

  • Join the contributor Discord to coordinate, ask questions, and get unblocked fast: https://discord.gg/xvNAvMJf
  • Please introduce yourself in the channel before you start so we can avoid duplicate work, pair you with a reviewer, and get your PR merged quickly.
  • Maintainers actively triage this channel and aim for fast, clear, respectful reviews — reach out any time you're blocked.

Metadata

Metadata

Labels

GRANTFOX OSSGrantFox open-source campaignMAYBE REWARDEDEligible for GrantFox rewardOFFICIAL CAMPAIGNOfficial GrantFox campaign issueStellar WaveIssues in the Stellar wave programarea-backendBackend / API worktype-testingTests and test coverage

Type

No fields configured for Task.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions