Skip to content

fix: add sqlite3 to setup.sh required dependencies#4935

Merged
alex-solovyev merged 2 commits intomarcusquinn:mainfrom
superdav42:bugfix/setup-install-sqlite3
Mar 15, 2026
Merged

fix: add sqlite3 to setup.sh required dependencies#4935
alex-solovyev merged 2 commits intomarcusquinn:mainfrom
superdav42:bugfix/setup-install-sqlite3

Conversation

@superdav42
Copy link
Contributor

@superdav42 superdav42 commented Mar 15, 2026

Summary

  • Add sqlite3 to check_requirements() in setup-modules/core.sh so it is installed during setup.sh
  • sqlite3 is used by 700+ callsites (memory system, worktree registry, supervisor, observability) but was never installed, causing silent failures on Linux systems without it pre-installed
  • Handles cross-distro package name mapping: sqlite3 for Debian/Ubuntu/brew, sqlite for Fedora/Arch/Alpine

Changes

  • setup-modules/core.sh: Added sqlite3 check to check_requirements() with distro-aware package name resolution

Summary by CodeRabbit

  • Chores
    • Enhanced setup dependency validation to detect sqlite3 presence and automatically resolve the appropriate package name across different package managers, integrating this into the non-interactive install flow to ensure smoother cross-distro handling and fewer manual interventions during setup.

sqlite3 is used by 700+ callsites across the framework (memory system,
worktree registry, supervisor, observability) but was never installed
during setup. On Linux systems without sqlite3 pre-installed, these
features fail silently.

Adds sqlite3 to check_requirements() with correct package name mapping:
sqlite3 for Debian/Ubuntu/brew, sqlite for Fedora/Arch/Alpine.
@github-actions github-actions bot added the bug Auto-created from TODO.md tag label Mar 15, 2026
@gemini-code-assist
Copy link

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request addresses a critical dependency issue by integrating sqlite3 into the initial setup script. Previously, the absence of sqlite3 could lead to silent failures in various system components. The changes ensure that sqlite3 is properly detected and installed across diverse operating environments, significantly improving system stability and reliability.

Highlights

  • Dependency Management: Added sqlite3 to the check_requirements() function in setup-modules/core.sh to ensure it is installed during the setup.sh process.
  • Silent Failure Resolution: Resolved silent failures on Linux systems where sqlite3 was not pre-installed, despite being used by numerous callsites within the system.
  • Cross-Distro Compatibility: Implemented logic to handle varying package names for sqlite3 across different Linux distributions and package managers (e.g., sqlite3 for Debian/Ubuntu/brew, sqlite for Fedora/Arch/Alpine).
Changelog
  • setup-modules/core.sh
    • Added a new dependency check for sqlite3 within the check_requirements() function.
    • Implemented conditional logic to determine the correct package name for sqlite3 based on the detected package manager.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 15, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 5b744137-a39b-4a7f-89e6-ac5b272945cc

📥 Commits

Reviewing files that changed from the base of the PR and between b8c6f53 and 13f05ab.

📒 Files selected for processing (1)
  • setup-modules/core.sh
🚧 Files skipped from review as they are similar to previous changes (1)
  • setup-modules/core.sh

Walkthrough

Adds a runtime dependency check for sqlite3 inside check_requirements, recording sqlite3 as missing if absent and resolving the distro-specific package name (uses sqlite3 for apt/brew, sqlite for other package managers).

Changes

Cohort / File(s) Summary
SQLite3 Dependency Check
setup-modules/core.sh
Added runtime validation for sqlite3; when missing, it appends sqlite3 to the dependency list and maps the install package name based on detected package manager (sqlite3 for apt/brew, sqlite otherwise).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

A tiny check now stands in line,
Detects sqlite3 at runtime.
Names resolve across each distro,
Scripts hum on—automation pro. ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding sqlite3 to required dependencies in setup.sh, which directly aligns with the changeset's core purpose.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
📝 Coding Plan
  • Generate coding plan for human review comments

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.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request correctly adds sqlite3 as a required dependency, handling different package names across various distributions. The change is solid. I've added one suggestion to improve efficiency by avoiding a redundant function call in the script.

Comment on lines +447 to +448
local pkg_mgr
pkg_mgr=$(detect_package_manager)

Choose a reason for hiding this comment

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

medium

This call to detect_package_manager is redundant, as the same function is called again on line 459 if any dependencies are missing. To improve efficiency, you could call detect_package_manager once at the beginning of the check_requirements function and store the result in a variable for reuse.

References
  1. Avoid redundant pre-checks or function calls that perform checks, especially when a helper function handles the logic internally. This prevents logic duplication and improves efficiency.

@alex-solovyev
Copy link
Collaborator

External contributor PR — labelled needs-maintainer-review. CI is green, review bots have posted. Gemini Code Assist has one suggestion (redundant detect_package_manager call). Awaiting maintainer approval or decline before merge.

Copy link
Contributor

@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 `@setup-modules/core.sh`:
- Around line 444-453: The package mapping in the sqlite detection block wrongly
maps brew to "sqlite3"; update the case in the block that uses
detect_package_manager (the pkg_mgr variable and the case "$pkg_mgr" branch) so
that apt maps to "sqlite3" while brew maps to "sqlite" (e.g., use separate
cases: "apt") missing_packages+=("sqlite3") ;; and "brew")
missing_packages+=("sqlite") ;;), leaving the fallback (*) as "sqlite" for
Fedora/Arch/Alpine.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 7cb93215-a7d6-40d5-a513-ccbd3a5122ca

📥 Commits

Reviewing files that changed from the base of the PR and between ff7fb1f and b8c6f53.

📒 Files selected for processing (1)
  • setup-modules/core.sh

Homebrew's formula is 'sqlite' (sqlite3 is an alias). While the alias
works, using the canonical name is more robust. Separate apt case from
the wildcard fallback which now correctly handles brew, dnf, pacman,
and apk.

Addresses CodeRabbit review feedback on PR marcusquinn#4935.
@alex-solovyev
Copy link
Collaborator

Pushed fix commit (13f05ab) addressing CodeRabbit's review feedback:

  • Brew package name: Changed apt | brew to just apt so brew falls through to the *\) sqlite case. Homebrew's canonical formula is sqlite (sqlite3 is an alias that works but isn't the canonical name).
  • Gemini's redundant detect_package_manager call: Not addressed — the redundancy is minor (only runs when sqlite3 is missing, which is a one-time setup path). The second call at line 459 serves a different purpose (install command selection). Optimizing this would require restructuring the function beyond the scope of this PR.

CI should re-run on the new commit. Once green, this is ready for maintainer merge.

@alex-solovyev alex-solovyev merged commit f54fa38 into marcusquinn:main Mar 15, 2026
19 checks passed
@marcusquinn marcusquinn added the review-feedback-scanned Merged PR already scanned for quality feedback label Mar 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Auto-created from TODO.md tag review-feedback-scanned Merged PR already scanned for quality feedback

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants