Skip to content

build: remove sqlite-rembed and the Rust toolchain dependency#5616

Merged
renecannao merged 11 commits into
v3.0from
v3.0-remove-sqlite-rembed
Apr 12, 2026
Merged

build: remove sqlite-rembed and the Rust toolchain dependency#5616
renecannao merged 11 commits into
v3.0from
v3.0-remove-sqlite-rembed

Conversation

@renecannao

@renecannao renecannao commented Apr 11, 2026

Copy link
Copy Markdown
Contributor

Summary

  • proxy_sqlite3_rembed_init was permanently NULL in lib/proxy_sqlite3_symbols.cpp with a TODO comment admitting the author couldn't get header inclusion working. The sqlite-rembed sqlite extension was compiled, vendored, and linked into libproxysql.a + test binaries, but its sole caller in lib/Admin_Bootstrap.cpp:619 was null-guarded — so the extension was never registered at runtime in any tier, stable or GENAI. This PR removes the dead source code, the vendored sqlite-rembed-0.0.1-alpha.9.tar.gz, the libsqlite_rembed.a build rule, and every libsqlite_rembed.a reference from deps/, src/, lib/, and test Makefiles.
  • sqlite-rembed was the only consumer of rustc/cargo in the tree. With it gone, the Rust toolchain detection block in deps/Makefile and the SQLITE3_* env exports that existed solely for the cargo build also go. PROXYSQLGENAI=1 builds no longer require Rust. CLAUDE.md and the top-level Makefile documentation are updated to drop the "(requires Rust toolchain)" claim.
  • Removes 9 rembed-only docs/scripts (shell demos, SQL examples, integration guide, posts-embeddings setup, MCP vector embeddings plan, python processor) and excises rembed-specific sections from `doc/GENAI.md` and `doc/SQLite3-Server.md`.

`sqlite-vec` (a C extension, no Rust involvement) is preserved unchanged. Full implementation plan committed at `docs/superpowers/plans/2026-04-11-remove-sqlite-rembed-and-rust.md`.

Test plan

  • `grep -rn 'rembed|rustc|cargo|RUSTC|CARGO|SQLITE3_INCLUDE_DIR|SQLITE3_LIB_DIR|SQLITE3_STATIC' deps/Makefile src/Makefile lib/Makefile test/tap/tests/Makefile test/tap/tests/unit/Makefile test/rag/Makefile CLAUDE.md Makefile .gitignore` returns empty
  • `grep -rn 'sqlite_rembed|rembed_init|proxy_sqlite3_rembed|libsqlite_rembed' lib/ include/ src/` returns empty
  • `ls deps/sqlite3/libsqlite_rembed.a` + `ls deps/sqlite3/sqlite-rembed-*` both report no such file
  • `git ls-files | grep -i rembed` returns only the plan document (expected)
  • Full clean build: `make build_src PROXYSQLCLICKHOUSE=1 PROXYSQLGENAI=1` with `rustc` and `cargo` stripped from `PATH` (both `CARGO_HOME` and `RUSTUP_HOME` unset) → succeeds, produces `src/proxysql` at 191MB. Build log is 6895 lines; `grep -c 'cargo|rustc|libsqlite_rembed|sqlite-loadable' /tmp/full-build2.log` returns 0.
  • `./src/proxysql --version` → `ProxySQL version 4.0.7-590-g57c3e3f, codename Truls` (v4.0.x confirms GENAI tier compiled and active)
  • `./src/proxysql --initial --no-start` → admin DB initialization and self-signed TLS cert generation both succeed
  • `nm -D src/proxysql | grep -iE 'rembed|sqlite3_rembed'` returns empty; `strings src/proxysql | grep -iE 'rembed'` returns empty
  • `proxy_sqlite3_vec_init` (sqlite-vec sibling) is preserved and still assigned to `sqlite3_vec_init` under `#ifdef PROXYSQLGENAI`; the extern and null-guarded call in `Admin_Bootstrap.cpp` are untouched
  • CI full TAP suite — this PR is pure dead-code + build-system deletion and doesn't touch runtime behavior on any code path; a green CI run here is the definitive confirmation for reviewers

Commits

9 commits on top of `v3.0`, each self-contained so every commit leaves the tree buildable:

  1. `docs(plan)` — plan document
  2. `chore(sqlite)` — remove dead-code `proxy_sqlite3_rembed_init` hook pointer
  3. `build` — drop `libsqlite_rembed.a` from src/lib link order
  4. `build(test)` — drop `libsqlite_rembed.a` from TAP + rag test link order
  5. `build(deps)` — remove sqlite-rembed build rule and Rust toolchain check
  6. `chore` — remove vendored `sqlite-rembed-0.0.1-alpha.9.tar.gz`
  7. `docs` — remove sqlite-rembed guides, examples, and embeddings script
  8. `docs` — excise sqlite-rembed sections from GENAI.md and SQLite3-Server.md
  9. `docs` — drop Rust toolchain claim from CLAUDE.md and top-level Makefile

Pre-existing issues noticed but NOT addressed in this PR

Flagging for separate triage so they don't get lost:

  1. Top-level `Makefile` default-target bug. `lint-generate-cdb` is defined at line 19, before `default: build_src` at line 190. `.DEFAULT: default` at line 188 does NOT set `.DEFAULT_GOAL`, so `make` with no target runs the first rule — `lint-generate-cdb` — which invokes `bear -- make -j$(nproc)`, which recursively runs `make` with no target, which triggers `lint-generate-cdb` again. Infinite recursion. Fix is one line: `.DEFAULT_GOAL := default` near the top. Surfaced when trying to run the plan's verification build; worked around by explicitly targeting `build_src`. Out of scope here.
  2. Pre-existing macro-redefinition warnings for `ADMIN_SQLITE_TABLE_MCP_QUERY_RULES` and `ADMIN_SQLITE_TABLE_RUNTIME_MCP_QUERY_RULES` in `include/ProxySQL_Admin_Tables_Definitions.h` (lines 290/292 vs 375/400) show up in the build log. Pre-existing, unrelated to this PR.

Summary by CodeRabbit

  • Chores

    • Removed the sqlite-rembed integration and its Rust build/toolchain dependencies; cleaned build/link references.
    • Updated build comments and linking to no longer reference the removed components.
    • Updated ignore rules to include Git worktree metadata and stop ignoring the removed vendored artifact pattern.
  • Documentation

    • Deleted multiple sqlite-rembed demos, tests, and integration docs; adjusted related feature docs and guidance.
    • Added a removal plan document outlining the staged changes.

proxy_sqlite3_rembed_init was declared unconditionally as NULL
with a TODO comment ("Fix sqlite-rembed header inclusion and assign
the function pointer properly") and never reassigned anywhere in
the tree. The sole caller in Admin_Bootstrap::__bootstrap was
null-guarded, so the sqlite-rembed auto-extension was never
registered at runtime in any build tier, stable or GENAI.

This commit removes the pointer, its extern declaration, and the
null-guarded call. No runtime behavior changes; subsequent commits
remove the build-system wiring and the Rust toolchain dependency
that existed solely to produce libsqlite_rembed.a.
libsqlite_rembed.a is no longer linked into any ProxySQL binary or
test as of the preceding commits, so the build rule, the Rust
toolchain detection block, the SQLITE3_* environment exports, the
sqlite-rembed phony target, and the rembed clean lines can go. The
sqlite-vec extension stays (it is C, not Rust).

After this commit, PROXYSQLGENAI=1 builds no longer require rustc
or cargo on PATH.
- GENAI.md: Remove two rembed-related links from Related Documentation section
- SQLite3-Server.md: Delete Embedding Generation section (was lines 72-103)
- SQLite3-Server.md: Remove rembed-dependent use cases (embedding generation, AI pipelines)
The AI/MCP tier (PROXYSQLGENAI=1) no longer requires rustc/cargo after
the sqlite-rembed removal. Follow-up to the preceding cleanup commits
to keep the user-facing tier documentation honest.
@coderabbitai

coderabbitai Bot commented Apr 11, 2026

Copy link
Copy Markdown

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 1ad5fe9c-b9f7-4014-8bfc-9f4e45cdb6c9

📥 Commits

Reviewing files that changed from the base of the PR and between 6cfcb2b and e0a96d3.

📒 Files selected for processing (2)
  • lib/AI_Features_Manager.cpp
  • test/tap/tests/Makefile

📝 Walkthrough

Walkthrough

This change removes the Rust-based sqlite-rembed extension and its build/registration artifacts (build rules, link inputs, symbol declarations), deletes related documentation and demos, and updates build/test Makefiles and metadata while preserving sqlite-vec registration and functionality.

Changes

Cohort / File(s) Summary
Repo metadata & minor docs
/.gitignore, /CLAUDE.md, /Makefile
Add .worktrees/; remove sqlite-rembed ignore entry; remove Rust toolchain note from AI/MCP docs/comments.
Deps build rules
deps/Makefile
Remove Rust toolchain detection, exported SQLITE3_* vars, sqlite-rembed build/clean rules, and drop libsqlite_rembed.a target.
Core build/link config
src/Makefile, lib/Makefile
Remove SQLITE_REMBED_LIB and stop linking libsqlite_rembed.a under PROXYSQLGENAI; keep vec artifacts.
Test targets
test/rag/Makefile, test/tap/tests/Makefile, test/tap/tests/unit/Makefile
Remove link-time dependency on libsqlite_rembed.a, link vec.o/sqlite3 as before for GenAI variants.
Runtime symbol registration
lib/Admin_Bootstrap.cpp, lib/proxy_sqlite3_symbols.cpp
Drop proxy_sqlite3_rembed_init declaration and its conditional auto-extension registration; retain proxy_sqlite3_vec_init.
AI features manager comment
lib/AI_Features_Manager.cpp
Update comment to mention only vec0 when describing auto-loaded SQLite extensions.
Documentation — partial edits
doc/GENAI.md, doc/SQLite3-Server.md
Remove rembed-specific sections/links and examples (rembed(), provider list, embedding examples).
Documentation — full deletions
doc/MCP/Vector_Embeddings_Implementation_Plan.md, doc/SQLITE-REMBED-TEST-README.md, doc/posts-embeddings-setup.md, doc/sqlite-rembed-integration.md
Deleted comprehensive rembed design, integration, and setup documents.
Demos & tests — deletions
doc/sqlite-rembed-demo.sh, doc/sqlite-rembed-examples.sh, doc/sqlite-rembed-examples.sql, doc/sqlite-rembed-test.sh, scripts/process_posts_embeddings.py
Removed demo scripts, SQL examples, integration test scripts, and the posts-embeddings batch processing script.
Implementation plan added
docs/superpowers/plans/2026-04-11-remove-sqlite-rembed-and-rust.md
Add staged removal plan enumerating commit boundaries, affected files, and verification steps.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

Suggested labels

Compiling, Packages

Suggested reviewers

  • rahim-kanji

Poem

🐰 Hopping through code with a tidy little thump,
I whisked away rembed and its Rusty clump.
Vec stays awake, demos fade from the den,
Cleaner build burrows mean fewer big-patch men.
🥕✨

🚥 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 pull request title accurately summarizes the main change: removing the sqlite-rembed extension and its Rust toolchain dependency.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch v3.0-remove-sqlite-rembed

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
docs/superpowers/plans/2026-04-11-remove-sqlite-rembed-and-rust.md (1)

86-91: Consider adding language specifiers to fenced code blocks.

Several code blocks showing command output lack language specifiers. While not functionally impacting the plan, adding text or console as the language improves readability in some renderers.

📝 Example fix for line 87
-```
+```text
 lib/proxy_sqlite3_symbols.cpp:61:int (*proxy_sqlite3_rembed_init)(sqlite3*, char**, const sqlite3_api_routines*) = NULL;

Also applies to: 102-106, 651-655

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/superpowers/plans/2026-04-11-remove-sqlite-rembed-and-rust.md` around
lines 86 - 91, Add language specifiers (e.g., ```text or ```console) to the
fenced code blocks that show command output so they render consistently; update
the three example blocks that contain lines referencing
lib/proxy_sqlite3_symbols.cpp and lib/Admin_Bootstrap.cpp — specifically the
lines containing the symbols proxy_sqlite3_rembed_init and
proxy_sqlite3_auto_extension — and apply the same change to the other reported
blocks around lines 102-106 and 651-655 to mark them as plain text/console
output.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@docs/superpowers/plans/2026-04-11-remove-sqlite-rembed-and-rust.md`:
- Around line 86-91: Add language specifiers (e.g., ```text or ```console) to
the fenced code blocks that show command output so they render consistently;
update the three example blocks that contain lines referencing
lib/proxy_sqlite3_symbols.cpp and lib/Admin_Bootstrap.cpp — specifically the
lines containing the symbols proxy_sqlite3_rembed_init and
proxy_sqlite3_auto_extension — and apply the same change to the other reported
blocks around lines 102-106 and 651-655 to mark them as plain text/console
output.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: def501fd-8ac3-47fb-94df-d28aea726a9e

📥 Commits

Reviewing files that changed from the base of the PR and between fd01e0f and 6cfcb2b.

⛔ Files ignored due to path filters (1)
  • deps/sqlite3/sqlite-rembed-0.0.1-alpha.9.tar.gz is excluded by !**/*.gz
📒 Files selected for processing (23)
  • .gitignore
  • CLAUDE.md
  • Makefile
  • deps/Makefile
  • doc/GENAI.md
  • doc/MCP/Vector_Embeddings_Implementation_Plan.md
  • doc/SQLITE-REMBED-TEST-README.md
  • doc/SQLite3-Server.md
  • doc/posts-embeddings-setup.md
  • doc/sqlite-rembed-demo.sh
  • doc/sqlite-rembed-examples.sh
  • doc/sqlite-rembed-examples.sql
  • doc/sqlite-rembed-integration.md
  • doc/sqlite-rembed-test.sh
  • docs/superpowers/plans/2026-04-11-remove-sqlite-rembed-and-rust.md
  • lib/Admin_Bootstrap.cpp
  • lib/Makefile
  • lib/proxy_sqlite3_symbols.cpp
  • scripts/process_posts_embeddings.py
  • src/Makefile
  • test/rag/Makefile
  • test/tap/tests/Makefile
  • test/tap/tests/unit/Makefile
💤 Files with no reviewable changes (13)
  • Makefile
  • lib/Makefile
  • doc/GENAI.md
  • doc/sqlite-rembed-integration.md
  • lib/Admin_Bootstrap.cpp
  • doc/posts-embeddings-setup.md
  • doc/MCP/Vector_Embeddings_Implementation_Plan.md
  • doc/SQLITE-REMBED-TEST-README.md
  • doc/sqlite-rembed-examples.sh
  • doc/sqlite-rembed-demo.sh
  • doc/sqlite-rembed-test.sh
  • doc/sqlite-rembed-examples.sql
  • scripts/process_posts_embeddings.py
📜 Review details
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{h,hpp,cpp}

📄 CodeRabbit inference engine (CLAUDE.md)

Use PascalCase for class names with protocol prefixes (MySQL_, PgSQL_, ProxySQL_)

Use snake_case for member variables

Use UPPER_SNAKE_CASE for constants and macros

C++17 is required; use C++17 features in codebase

Use conditional compilation via #ifdef PROXYSQLGENAI, #ifdef PROXYSQL31, and related feature flags

Use RAII for resource management in C++ code

Use jemalloc for memory allocation

Use pthread mutexes for synchronization and std::atomic<> for counters

Files:

  • lib/proxy_sqlite3_symbols.cpp
lib/**/*.cpp

📄 CodeRabbit inference engine (CLAUDE.md)

Follow one class per file structure in lib/ directory

Files:

  • lib/proxy_sqlite3_symbols.cpp
🧠 Learnings (11)
📓 Common learnings
Learnt from: CR
URL: 
File: CLAUDE.md:undefined-undefined
Timestamp: 2026-04-11T18:22:12.191Z
Learning: Consider implications of changes to hot paths and performance-critical code
Learnt from: CR
URL: 
File: CLAUDE.md:undefined-undefined
Timestamp: 2026-04-11T18:22:12.191Z
Learning: Follow the three-stage GNU Make build pipeline: deps → lib → src
Learnt from: CR
URL: 
File: CLAUDE.md:undefined-undefined
Timestamp: 2026-04-11T18:22:12.191Z
Learning: Feature tiers are controlled via flags: PROXYSQL31 for v3.1.x features, PROXYSQLGENAI for v4.0.x features (which implies PROXYSQL31)
📚 Learning: 2026-04-11T05:43:20.598Z
Learnt from: CR
Repo: sysown/proxysql PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-04-11T05:43:20.598Z
Learning: Applies to lib/**/*.{cpp,h,hpp} : Use conditional compilation via `#ifdef PROXYSQLGENAI`, `#ifdef PROXYSQL31`, and similar feature flags for feature tiers

Applied to files:

  • CLAUDE.md
  • .gitignore
  • test/tap/tests/unit/Makefile
  • lib/proxy_sqlite3_symbols.cpp
  • src/Makefile
  • test/tap/tests/Makefile
  • deps/Makefile
  • docs/superpowers/plans/2026-04-11-remove-sqlite-rembed-and-rust.md
📚 Learning: 2026-04-11T05:43:20.598Z
Learnt from: CR
Repo: sysown/proxysql PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-04-11T05:43:20.598Z
Learning: See `doc/agents/project-conventions.md` for ProxySQL-specific rules including directories, build, test harness, and git workflow

Applied to files:

  • CLAUDE.md
  • deps/Makefile
📚 Learning: 2026-04-01T21:27:03.216Z
Learnt from: wazir-ahmed
Repo: sysown/proxysql PR: 5557
File: test/tap/tests/unit/gtid_set_unit-t.cpp:14-17
Timestamp: 2026-04-01T21:27:03.216Z
Learning: In ProxySQL's unit test directory (test/tap/tests/unit/), test_globals.h and test_init.h are only required for tests that depend on the ProxySQL runtime globals/initialization (i.e., tests that exercise components linked against libproxysql.a). Pure data-structure or utility tests (e.g., ezoption_parser_unit-t.cpp, gtid_set_unit-t.cpp, gtid_trxid_interval_unit-t.cpp) only need tap.h and the relevant project header — omitting test_globals.h and test_init.h is correct and intentional in these cases.

Applied to files:

  • CLAUDE.md
  • test/tap/tests/unit/Makefile
  • test/tap/tests/Makefile
  • deps/Makefile
📚 Learning: 2026-04-11T13:17:55.508Z
Learnt from: renecannao
Repo: sysown/proxysql PR: 5607
File: doc/GH-Actions/README.md:13-18
Timestamp: 2026-04-11T13:17:55.508Z
Learning: When using GitHub-flavored Markdown headings, be aware that an em-dash surrounded by spaces (written as ` — `) affects the generated anchor/slug: GitHub replaces spaces with hyphens and removes non-alphanumeric punctuation, which can produce double hyphens (e.g., `## Foo — bar` → anchor `#foo--bar`, not `#foo-bar`). If you reference these anchors (e.g., internal links), ensure the expected slug matches this behavior.

Applied to files:

  • CLAUDE.md
  • doc/SQLite3-Server.md
  • docs/superpowers/plans/2026-04-11-remove-sqlite-rembed-and-rust.md
📚 Learning: 2026-04-11T13:17:55.509Z
Learnt from: renecannao
Repo: sysown/proxysql PR: 5607
File: doc/GH-Actions/README.md:13-18
Timestamp: 2026-04-11T13:17:55.509Z
Learning: When reviewing GitHub-flavored Markdown links/anchors, remember that heading-to-anchor slug generation treats spaces as hyphens and removes punctuation. If a heading contains an em-dash surrounded by spaces (e.g. ` — `), the slugs can legitimately include a double hyphen where the two surrounding space-runs become `-` on either side of the removed em-dash (e.g. `...vocabulary--read...`). Do not flag double-hyphens in anchor links for em-dash-containing headings as errors; they reflect GitHub’s correct slug behavior.

Applied to files:

  • CLAUDE.md
  • doc/SQLite3-Server.md
  • docs/superpowers/plans/2026-04-11-remove-sqlite-rembed-and-rust.md
📚 Learning: 2026-03-26T16:38:58.553Z
Learnt from: yuji-hatakeyama
Repo: sysown/proxysql PR: 5548
File: lib/mysql_connection.cpp:1837-1843
Timestamp: 2026-03-26T16:38:58.553Z
Learning: In `lib/mysql_connection.cpp`, when reviewing `SHOW WARNINGS` handling, treat the digest source as an intentional design choice: both `update_warning_count_from_connection()` and the `add_eof()` call under `ASYNC_USE_RESULT_CONT` detect warnings using `myds->sess->CurrentQuery.QueryParserArgs.digest_text` (comment-stripped digest text). This is expected to fail/behave differently when `mysql-query_digests_keep_comment=1` (digest_text includes comments) or when `mysql-query_digests=0` (digest_text unavailable). Do not require a change unless the regression test coverage is expanded (noting `reg_test_5306-show_warnings_with_comment-t` explicitly excludes these configurations as an accepted limitation).

Applied to files:

  • .gitignore
📚 Learning: 2026-04-11T05:43:20.598Z
Learnt from: CR
Repo: sysown/proxysql PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-04-11T05:43:20.598Z
Learning: Applies to test/tap/tests/unit/**/*.cpp : Unit tests in `test/tap/tests/unit/` must link against `libproxysql.a` and use `test_globals.h` and `test_init.h`

Applied to files:

  • test/tap/tests/unit/Makefile
  • test/tap/tests/Makefile
📚 Learning: 2026-04-11T05:43:20.598Z
Learnt from: CR
Repo: sysown/proxysql PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-04-11T05:43:20.598Z
Learning: Applies to test/tap/**/*.cpp : Use TAP (Test Anything Protocol) for tests with Docker-based backend infrastructure

Applied to files:

  • test/tap/tests/Makefile
📚 Learning: 2026-04-11T05:43:20.598Z
Learnt from: CR
Repo: sysown/proxysql PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-04-11T05:43:20.598Z
Learning: Applies to test/tap/tests/**/*(test_*.cpp|*-t.cpp) : Test files follow the naming pattern `test_*.cpp` or `*-t.cpp`

Applied to files:

  • test/tap/tests/Makefile
📚 Learning: 2026-04-11T13:16:05.854Z
Learnt from: renecannao
Repo: sysown/proxysql PR: 5607
File: doc/GH-Actions/README.md:13-18
Timestamp: 2026-04-11T13:16:05.854Z
Learning: When validating GitHub-rendered Markdown in this repository (e.g., links that use heading anchors), account for GitHub slug behavior for headings containing an em-dash (—) surrounded by spaces: GitHub strips the em-dash and converts each surrounding space into a hyphen independently, which can produce a double hyphen (--) in the generated anchor. Therefore, do NOT flag as broken links any anchors whose expected slug contains a double hyphen specifically attributable to an em-dash surrounded by spaces in the source heading. (Example: `...vocabulary — read...` -> `...vocabulary--read...`.)

Applied to files:

  • doc/SQLite3-Server.md
🪛 LanguageTool
doc/SQLite3-Server.md

[grammar] ~90-~90: Ensure spelling is correct
Context: ... Test SQLite features with MySQL clients 4. Prototyping: Quick data storage and retrieval 5. ...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

docs/superpowers/plans/2026-04-11-remove-sqlite-rembed-and-rust.md

[style] ~992-~992: Consider replacing this word to strengthen your wording.
Context: .... Plan #2 is a much larger undertaking and will be written as its own plan documen...

(AND_THAT)

🪛 markdownlint-cli2 (0.22.0)
docs/superpowers/plans/2026-04-11-remove-sqlite-rembed-and-rust.md

[warning] 87-87: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


[warning] 103-103: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


[warning] 378-378: Spaces inside code span elements

(MD038, no-space-in-code)


[warning] 652-652: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


[warning] 714-714: Spaces inside code span elements

(MD038, no-space-in-code)


[warning] 795-795: Heading levels should only increment by one level at a time
Expected: h3; Actual: h4

(MD001, heading-increment)


[warning] 804-804: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🔇 Additional comments (17)
test/rag/Makefile (1)

4-4: test_rag_schema link update looks correct.

Dropping libsqlite_rembed.a here is consistent with the PR scope and keeps the test target aligned with the remaining SQLite linkage.

CLAUDE.md (1)

43-43: Feature-tier documentation update is aligned with the code changes.

Removing the Rust-toolchain note from the AI/MCP tier is consistent with the build-system cleanup in this PR.

.gitignore (1)

4-6: Good ignore rule addition for local worktree metadata.

Adding .worktrees/ is a safe cleanup improvement and does not conflict with this PR’s dependency removals.

test/tap/tests/unit/Makefile (1)

115-117: PROXYSQLGENAI unit-test link inputs are updated correctly.

Keeping vec.o and removing rembed from STATIC_LIBS matches the intended GenAI path after this removal PR.

src/Makefile (1)

177-179: src linkage change is correct for GenAI builds.

This keeps sqlite-vec support while removing the obsolete rembed artifact from LIBPROXYSQLAR.

doc/SQLite3-Server.md (1)

90-92: Use-case list renumbering is clean and consistent.

The edited sequence reads correctly after removing embedding-generation/rembed-specific items.

test/tap/tests/Makefile (3)

82-84: STATIC_LIBS update under PROXYSQLGENAI is correct.

This properly retains sqlite-vec linkage while removing rembed from the test link path.


183-183: anomaly_detection-t GenAI link command remains coherent after cleanup.

The command now reflects the vec-only model and stays aligned with the rest of this PR.


211-211: GenAI test targets were consistently migrated to vec-only linkage.

The updated target commands remove rembed references in all touched spots and keep link inputs consistent.

Also applies to: 230-230, 240-240, 250-250

lib/proxy_sqlite3_symbols.cpp (1)

53-59: proxy_sqlite3_vec_init gating remains correctly structured.

The updated section keeps GenAI-specific sqlite-vec initialization explicit and avoids reintroducing removed rembed hooks.

deps/Makefile (2)

52-54: LGTM!

The sqlite-rembed target is correctly removed from the PROXYSQLGENAI=1 targets list while preserving sqlite-vec. This aligns with the PR objective to remove the Rust-based extension while keeping the C-based vector extension.


280-284: LGTM!

The sqlite3 target dependency graph is correctly updated to remove sqlite3/libsqlite_rembed.a while preserving sqlite3/sqlite3/vec.o for the GENAI build. The conditional structure maintains the three-stage build pipeline integrity. Based on learnings: "Follow the three-stage GNU Make build pipeline: deps → lib → src".

docs/superpowers/plans/2026-04-11-remove-sqlite-rembed-and-rust.md (5)

1-29: LGTM!

The plan header clearly establishes the goal (remove sqlite-rembed and Rust dependency), explains the architecture rationale (dead-code deletion based on permanently-NULL proxy_sqlite3_rembed_init), and documents the staged approach ensuring buildability at each commit. The prerequisites and out-of-scope sections properly bound the work.


31-70: LGTM!

The file structure tables comprehensively document what files to modify, delete, and leave untouched. The responsibilities column clearly specifies the exact changes needed for each file, and the "Files NOT touched" section correctly identifies sqlite-vec and related files that should be preserved.


72-135: LGTM!

Task 1 correctly establishes the baseline by verifying the dead-code claim through grep patterns that confirm proxy_sqlite3_rembed_init = NULL and the null-guarded call site. The verification steps are concrete with expected outputs, making it easy to confirm pass/fail conditions.


458-624: LGTM!

Task 5 is the pivotal task where the Rust dependency is removed. The step-by-step removal of the toolchain check, SQLITE3_* exports, build rule, and phony target is well-ordered. The verification in Step 8 correctly checks for absence of cargo/rustc output during build, which definitively proves the Rust dependency is gone.


855-947: LGTM!

Task 9 provides thorough end-to-end verification. The PATH filtering technique (Step 3) to explicitly hide rustc/cargo from the build environment is an excellent way to definitively prove the Rust dependency is removed. The smoke tests for the binary (version check, minimal startup) confirm no runtime regressions.

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

Copy link
Copy Markdown

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 removes the sqlite-rembed extension and the associated Rust toolchain dependency from ProxySQL. The changes include deleting the vendored Rust crate, removing build rules and environment variables from the Makefiles, and cleaning up source-level hooks and documentation. One improvement opportunity was identified in the test Makefile to simplify a redundant conditional block created by these removals.

Comment thread test/tap/tests/Makefile Outdated
Comment on lines 182 to 186
ifeq ($(PROXYSQLGENAI),1)
$(CXX) -DEXCLUDE_TRACKING_VARIABLES $< ../tap/SQLite3_Server.cpp -I$(CLICKHOUSE_CPP_IDIR) $(IDIRS) $(LDIRS) -L$(CLICKHOUSE_CPP_LDIR) -L$(LZ4_LDIR) $(OPT) $(OBJ) $(MYLIBSJEMALLOC) $(MYLIBS) $(STATIC_LIBS) $(CLICKHOUSE_CPP_LDIR)/libclickhouse-cpp-lib.a $(CLICKHOUSE_CPP_PATH)/contrib/zstd/zstd/libzstdstatic.a $(LZ4_LDIR)/liblz4.a $(SQLITE3_LDIR)/../libsqlite_rembed.a -lscram -lusual -Wl,--allow-multiple-definition -o $@
$(CXX) -DEXCLUDE_TRACKING_VARIABLES $< ../tap/SQLite3_Server.cpp -I$(CLICKHOUSE_CPP_IDIR) $(IDIRS) $(LDIRS) -L$(CLICKHOUSE_CPP_LDIR) -L$(LZ4_LDIR) $(OPT) $(OBJ) $(MYLIBSJEMALLOC) $(MYLIBS) $(STATIC_LIBS) $(CLICKHOUSE_CPP_LDIR)/libclickhouse-cpp-lib.a $(CLICKHOUSE_CPP_PATH)/contrib/zstd/zstd/libzstdstatic.a $(LZ4_LDIR)/liblz4.a -lscram -lusual -Wl,--allow-multiple-definition -o $@
else
$(CXX) -DEXCLUDE_TRACKING_VARIABLES $< ../tap/SQLite3_Server.cpp -I$(CLICKHOUSE_CPP_IDIR) $(IDIRS) $(LDIRS) -L$(CLICKHOUSE_CPP_LDIR) -L$(LZ4_LDIR) $(OPT) $(OBJ) $(MYLIBSJEMALLOC) $(MYLIBS) $(STATIC_LIBS) $(CLICKHOUSE_CPP_LDIR)/libclickhouse-cpp-lib.a $(CLICKHOUSE_CPP_PATH)/contrib/zstd/zstd/libzstdstatic.a $(LZ4_LDIR)/liblz4.a -lscram -lusual -Wl,--allow-multiple-definition -o $@
endif

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The ifeq ($(PROXYSQLGENAI),1) block for the anomaly_detection-t target is now redundant. Since libsqlite_rembed.a has been removed and the conditional inclusion of vec.o is already handled within the STATIC_LIBS variable (at lines 82-84), the compilation commands in both branches are identical. You can simplify this by removing the conditional block and keeping a single command.

anomaly_detection-t: anomaly_detection-t.cpp $(TAP_LDIR)/libtap.so
	$(CXX) -DEXCLUDE_TRACKING_VARIABLES $< ../tap/SQLite3_Server.cpp -I$(CLICKHOUSE_CPP_IDIR) $(IDIRS) $(LDIRS) -L$(CLICKHOUSE_CPP_LDIR) -L$(LZ4_LDIR) $(OPT) $(OBJ) $(MYLIBSJEMALLOC) $(MYLIBS) $(STATIC_LIBS) $(CLICKHOUSE_CPP_LDIR)/libclickhouse-cpp-lib.a $(CLICKHOUSE_CPP_PATH)/contrib/zstd/zstd/libzstdstatic.a $(LZ4_LDIR)/liblz4.a -lscram -lusual -Wl,--allow-multiple-definition -o $@

- Remove stale comment reference to rembed in AI_Features_Manager.cpp
- Remove redundant ifeq/else/endif in anomaly_detection-t target
  (both branches identical after libsqlite_rembed.a removal)
@renecannao
renecannao merged commit c678ae4 into v3.0 Apr 12, 2026
5 of 6 checks passed
@sonarqubecloud

Copy link
Copy Markdown

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