Skip to content

Additional Database Paths in Config#26

Merged
DanielCardonaRojas merged 2 commits intomainfrom
additional_dbs
Apr 22, 2026
Merged

Additional Database Paths in Config#26
DanielCardonaRojas merged 2 commits intomainfrom
additional_dbs

Conversation

@DanielCardonaRojas
Copy link
Copy Markdown
Owner

Summary

  • Add [databases] section to local config (.codemark/config.toml) for configuring additional database paths
  • Supports ~ expansion and relative paths (resolved from repo root)
  • Additional databases are read-only and included in cross-repo queries (search, list, resolve, show, status, preview, export)
  • CLI --db flag overrides config (only CLI paths are used when explicitly provided)

Configuration Example

[databases]
# Additional database paths for cross-repo queries
# The primary database (current repo) is always included
additional = [
    "../shared-lib/.codemark/codemark.db",
    "~/projects/another-repo/.codemark/codemark.db",
]

Key Design Decisions

  1. Local config only: The additional_databases setting is only supported in .codemark/config.toml, not in global config. Each repo defines its own related databases.

  2. Primary DB remains auto-detected: The current repo's database is always included (from git root or current directory)

  3. Additional DBs are read-only: The additional databases are only used for read operations. Write operations (add, remove, annotate) only affect the primary DB.

  4. Path expansion: Supports ~ expansion and relative paths (resolved relative to the repo root containing .codemark/config.toml)

Files Changed

  • src/config.rs: Add DatabasesConfig struct with path resolution
  • src/cli/handlers.rs: Modify open_all_dbs() to include configured additional databases
  • docs/config.default.toml: Add [databases] section documentation
  • tests/cli_integration.rs: Add 6 integration tests for multi-db behavior

Test Coverage

  • All 163 library tests pass
  • All 63 integration tests pass (including 6 new multi-database tests)

🤖 Generated with Claude Code

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 22, 2026

Warning

Rate limit exceeded

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

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 11 minutes and 25 seconds.

⌛ 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: defaults

Review profile: CHILL

Plan: Pro

Run ID: 5fb04d8e-ebd6-4b0c-9d43-e00918341ff9

📥 Commits

Reviewing files that changed from the base of the PR and between 2a4cfaa and 4159fd7.

📒 Files selected for processing (4)
  • docs/config.default.toml
  • src/cli/handlers.rs
  • src/config.rs
  • tests/cli_integration.rs
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch additional_dbs

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 and usage tips.

@DanielCardonaRojas DanielCardonaRojas merged commit 6f5df3f into main Apr 22, 2026
4 checks passed
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