Skip to content

Implement composite grouping for FCBH pericopes using section and pericope number#217

Merged
Joel-Joseph-George merged 2 commits into
mainfrom
ft/perciope-qa-fix
Jul 9, 2026
Merged

Implement composite grouping for FCBH pericopes using section and pericope number#217
Joel-Joseph-George merged 2 commits into
mainfrom
ft/perciope-qa-fix

Conversation

@Joel-Joseph-George

@Joel-Joseph-George Joel-Joseph-George commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • Bug Fixes
    • Chapter pericope results now keep verses separated when a section is present, preventing unrelated items from being merged.
    • Pericope responses now include section-aware numbering where applicable, improving consistency in chapter queries.
  • Tests
    • Updated existing coverage for pericope responses.
    • Added a new case to verify grouping behavior when section values are returned.

@coderabbitai

coderabbitai Bot commented Jul 8, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: e8e3145d-6e3a-4d14-9471-c665beecb175

📥 Commits

Reviewing files that changed from the base of the PR and between 50c3ebe and e24f65a.

📒 Files selected for processing (3)
  • src/domains/pericopes/pericopes.repository.ts
  • src/domains/pericopes/pericopes.service.ts
  • src/domains/pericopes/pericopes.test.ts

📝 Walkthrough

Walkthrough

The pericope verses query now selects a section field. The chapter pericope grouping logic builds a composite key from section and pericopeNumber when section is present, otherwise falling back to pericopeNumber alone. Tests were updated and a new test added to cover section-based grouping.

Changes

Section-based pericope grouping

Layer / File(s) Summary
Query and grouping logic
src/domains/pericopes/pericopes.repository.ts, src/domains/pericopes/pericopes.service.ts
Repository selects section from pericope_verses; service groups rows using a composite section_pericopeNumber key when section is non-null, otherwise groups by pericopeNumber alone.
Grouping behavior tests
src/domains/pericopes/pericopes.test.ts
Existing fixtures updated to include section: null; new test validates composite key grouping producing pericope numbers like 6_1 and 7_1.

Estimated code review effort: 2 (Simple) | ~10 minutes

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: composite grouping of FCBH pericopes by section and pericope number.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ft/perciope-qa-fix

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Joel-Joseph-George Joel-Joseph-George merged commit 6d929f6 into main Jul 9, 2026
2 checks passed
@github-actions github-actions Bot deleted the ft/perciope-qa-fix branch July 9, 2026 11:02
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.

2 participants