Skip to content

Add support for br region#861

Open
danilopopeye wants to merge 2 commits into
laxamentumtech:mainfrom
danilopopeye:feature/audible.com.br
Open

Add support for br region#861
danilopopeye wants to merge 2 commits into
laxamentumtech:mainfrom
danilopopeye:feature/audible.com.br

Conversation

@danilopopeye
Copy link
Copy Markdown

@danilopopeye danilopopeye commented Apr 25, 2026

Hi, I just enabled the br region.
Please let me know if I need to update anything more. 😃

Summary by CodeRabbit

Release Notes

  • New Features
    • Added Brazil region support with Portuguese localization for chapter nomenclature and regional domain configuration.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 25, 2026

Warning

Rate limit exceeded

@danilopopeye has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 59 minutes and 23 seconds before requesting another review.

To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 5f90df4f-b69b-4479-ba64-3f4dc28fc010

📥 Commits

Reviewing files that changed from the base of the PR and between 90f98ea and 3a91dfa.

📒 Files selected for processing (4)
  • src/static/regions.ts
  • tests/datasets/audible/books/api.ts
  • tests/live/audible/books/api.live.test.ts
  • tests/typing/types.test.ts
📝 Walkthrough

Walkthrough

Adds Brazil region support with Portuguese localization, updates an Audible book test fixture with new product images and publisher summary, and adjusts region type validation tests to recognize the new region as valid.

Changes

Cohort / File(s) Summary
Brazil Region Support
src/static/regions.ts
Added new br (Brazil) region configuration with com.br top-level domain and Portuguese localization for chapterName as Capítulo.
Test Updates
tests/typing/types.test.ts, tests/datasets/audible/books/api.ts
Updated type validation test to recognize br region as valid; refreshed Audible book fixture data with new product image URLs and publisher summary content.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes


Important

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

❌ Failed checks (2 errors)

Check name Status Explanation Resolution
Title check ❌ Error The title does not follow the required conventional commits format (type(scope): description) and lacks a type prefix and scope. Reformat the title using conventional commits format, for example: 'feat(regions): add support for br region' or 'feat: add support for br region'.
Follow Agents.Md Standards ❌ Error PR violates AGENTS.md standards: commit messages lack required Conventional Commits type prefix, and live test hardcoded region list was not updated to include 'br'. Update commits to follow Conventional Commits format (e.g., 'feat(regions):' and 'test(datasets):') and add 'br' to regionsToTest array in tests/live/audible/books/api.live.test.ts:304.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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

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
Review rate limit: 0/1 reviews remaining, refill in 59 minutes and 23 seconds.

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

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/static/regions.ts`:
- Around line 25-30: The live test's hardcoded regions array (const
regionsToTest) in the audible books live test should include the new Brazil
region; update the regionsToTest array to add 'br' (e.g., ['us','uk','au','br'])
so the live tests cover the br entry defined in the regions mapping (regions /
the br entry with tld 'com.br' and chapterName 'Capítulo').
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: c12555e4-a3bc-4f4c-93af-e6316df8d57b

📥 Commits

Reviewing files that changed from the base of the PR and between 8bf73bd and 90f98ea.

📒 Files selected for processing (3)
  • src/static/regions.ts
  • tests/datasets/audible/books/api.ts
  • tests/typing/types.test.ts
📜 Review details
🧰 Additional context used
📓 Path-based instructions (8)
**/*.{ts,tsx}

📄 CodeRabbit inference engine (Custom checks)

Ensure TypeScript compilation passes without errors

Files:

  • tests/typing/types.test.ts
  • src/static/regions.ts
  • tests/datasets/audible/books/api.ts
**/*.{js,ts,jsx,tsx}

📄 CodeRabbit inference engine (Custom checks)

Ensure code passes linting checks

Files:

  • tests/typing/types.test.ts
  • src/static/regions.ts
  • tests/datasets/audible/books/api.ts
tests/**/*.+(spec|test).+(ts|tsx|js)

📄 CodeRabbit inference engine (AGENTS.md)

tests/**/*.+(spec|test).+(ts|tsx|js): All code changes must include appropriate unit tests located in the tests/ directory following the naming pattern **/*.+(spec|test).+(ts|tsx|js), excluding tests/live/
Unit tests must achieve code coverage thresholds: Statements 85%, Branches 80%, Functions 85%, Lines 85%

Files:

  • tests/typing/types.test.ts
tests/**/*.+(spec|test).+(ts|tsx)

📄 CodeRabbit inference engine (AGENTS.md)

Use jest-mock-extended for type-safe mocks with mock<ServiceType>() syntax

Files:

  • tests/typing/types.test.ts
**/*.+(js|ts|tsx)

📄 CodeRabbit inference engine (AGENTS.md)

**/*.+(js|ts|tsx): Enforce import sorting order using simple-import-sort ESLint rule: React packages, internal packages, side effects, parent imports, relative imports, style imports
Enforce export sorting using simple-import-sort/exports ESLint rule

Files:

  • tests/typing/types.test.ts
  • src/static/regions.ts
  • tests/datasets/audible/books/api.ts
**/*.+(ts|tsx|js)

📄 CodeRabbit inference engine (AGENTS.md)

Use module aliases for imports: #config maps to dist/config, #helpers to dist/helpers, #interfaces to dist/interfaces, #static to dist/static, #tests to tests

Files:

  • tests/typing/types.test.ts
  • src/static/regions.ts
  • tests/datasets/audible/books/api.ts
**/*

⚙️ CodeRabbit configuration file

**/*: Please review focusing on:

  • Code quality and consistency with existing patterns
  • Adherence to TypeScript best practices
  • Test coverage for any new code
  • Security implications of changes
  • Performance considerations
  • Documentation updates where needed

This project follows the AGENTS.md repository standards. Please ensure:

  • Conventional commit format is followed
  • Unit tests are included with proper coverage
  • No breaking changes are introduced without proper discussion

Files:

  • tests/typing/types.test.ts
  • src/static/regions.ts
  • tests/datasets/audible/books/api.ts
src/**/*.+(ts|tsx)

📄 CodeRabbit inference engine (AGENTS.md)

Enable TypeScript strict mode with compiler options: strict, lib es2021/es2022.error, target ES2021, module commonjs, esModuleInterop true, forceConsistentCasingInFileNames true

Files:

  • src/static/regions.ts
🧠 Learnings (1)
📚 Learning: 2026-02-16T18:11:20.542Z
Learnt from: CR
Repo: laxamentumtech/audnexus PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-02-16T18:11:20.542Z
Learning: Applies to src/helpers/audible/**/*.+(ts|tsx) : When live tests detect Audible changes, update the affected helper in `src/helpers/audible/`, update corresponding tests in `tests/audible/`, and use commit message format `fix(audible): <description>`

Applied to files:

  • tests/datasets/audible/books/api.ts
🔇 Additional comments (2)
tests/datasets/audible/books/api.ts (1)

268-275: Fixture refresh looks fine.

The product_images URL refresh and publisher_summary rewrite simply re-sync the B08G9PRS1K fixture with what Audible currently returns, keeping the live expect(minimalResponse).toEqual(minimalB08G9PRS1K) assertion in tests/audible/books/api.test.ts green. No structural/schema changes.

Note this commit is unrelated to the br region work — consider splitting it into its own PR (or at minimum its own commit, which it already is) so the region change can be reverted independently if needed. Not blocking.

tests/typing/types.test.ts (1)

36-36: LGTM.

Expectation flip is consistent with 'br' being added as a key in src/static/regions.ts, which feeds regionTLDs in src/config/types.ts (Object.keys(regions)).

Comment thread src/static/regions.ts
@danilopopeye danilopopeye force-pushed the feature/audible.com.br branch from 90f98ea to 78a798a Compare April 25, 2026 17:21
@danilopopeye
Copy link
Copy Markdown
Author

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 25, 2026

Only users with a collaborator, contributor, member, or owner role can interact with CodeRabbit.

@danilopopeye danilopopeye force-pushed the feature/audible.com.br branch from 78a798a to 1b9f68e Compare April 29, 2026 23:56
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.

1 participant