📋 Description
There are two parallel attestation repository files: src/repositories/attestationRepository.ts and src/repositories/attestations.repository.ts, while the project standardizes data access on a shared typed base in src/db/repository.ts (BaseRepository) re-exported via src/repositories/index.ts. Two implementations of the same concept drift apart and double the surface for bugs.
This issue consolidates them into a single repository extending BaseRepository, updates all callers, and removes the redundant file.
Why this matters: duplicate repositories are a maintenance trap — a fix applied to one silently misses the other. One typed repository on the shared base is the canonical pattern the rest of the codebase already follows.
🎯 Requirements & Context
Functional requirements
Context & constraints
- This is a behavior-preserving refactor; do not change query semantics.
- If the two files actually have divergent behavior, document the difference in the PR and choose the correct one explicitly.
🛠️ Suggested Execution
1. Fork & branch
git checkout -b refactor/consolidate-attestation-repository
2. Implement changes
- Diff the two files; merge into the
BaseRepository-derived one; rewire imports; delete the other.
- Add TSDoc on the consolidated repository methods.
3. Test & commit
npm run test -- attestation
npm run lint
npm run build
- Edge cases: callers importing the deleted path, divergent method names, pagination/filter parity.
Example commit message
refactor(db): consolidate duplicate attestation repositories onto BaseRepository
Merges attestations.repository.ts into the canonical attestationRepository
and removes the redundant file.
✅ Acceptance Criteria & Guidelines
| Requirement |
Target |
Single repository on BaseRepository, redundant file removed |
Required |
| All callers updated, behavior preserved |
Required |
| Coverage of merged methods |
≥ 95% where testable |
npm run lint + npm run build clean |
Required |
| Timeframe |
96 hours from assignment |
💬 Community & Support
Questions and design discussion — join the GrantFox contributor community on Discord: https://discord.gg/nmnPBkBge
Please comment on this issue to ask to be assigned before you start. 🚀
📋 Description
There are two parallel attestation repository files:
src/repositories/attestationRepository.tsandsrc/repositories/attestations.repository.ts, while the project standardizes data access on a shared typed base insrc/db/repository.ts(BaseRepository) re-exported viasrc/repositories/index.ts. Two implementations of the same concept drift apart and double the surface for bugs.This issue consolidates them into a single repository extending
BaseRepository, updates all callers, and removes the redundant file.🎯 Requirements & Context
Functional requirements
BaseRepository) and migrate any unique methods from the other into it.srctree).src/repositories/index.ts.Context & constraints
🛠️ Suggested Execution
1. Fork & branch
2. Implement changes
BaseRepository-derived one; rewire imports; delete the other.3. Test & commit
npm run test -- attestation npm run lint npm run buildExample commit message
✅ Acceptance Criteria & Guidelines
BaseRepository, redundant file removednpm run lint+npm run buildclean💬 Community & Support
Questions and design discussion — join the GrantFox contributor community on Discord: https://discord.gg/nmnPBkBge
Please comment on this issue to ask to be assigned before you start. 🚀