fix(devcontainer): use the pgvector Postgres image so document import works #4263
All Vouch review confidence checks passed
Residual risk 0.16 = Change Risk (0.40) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.40 · 296 lines diff across 3 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.341
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #4263"
general
weight: 0.35
jjmata
Summary
The devcontainer's
dbservice runspostgres:16, which ships novectorextension. That single mismatch makes document and PDF statement import impossible to test in the devcontainer — the upload option is never rendered.This contradicts the project's own guidance.
docs/hosting/ai.mdtells Pgvector users:The devcontainer was the one place still on the plain image.
What it breaks
The failure is silent and presents as a missing feature rather than an error:
1.
VectorStore::Pgvector.available?checks for thevectorextension inpg_available_extensions, finds none, and returnsfalse.2.
VectorStore.adapteris thereforenil, sodocument_upload_supported_extensionsreturns[](app/controllers/imports_controller.rb).3.
imports/newrenders its "import from file" row onlyif @document_upload_extensions.any?.So the row never appears, and the Financial tools tab of Imports → New offers no way to upload a PDF or CSV. A contributor following the AI docs to test document search or bank-statement extraction finds no upload control and no error to explain it.
Change
Adopts the documented tag verbatim, rather than a nearby one, so the two stay consistent:
Verification
Run against the devcontainer:
SELECT name, default_version FROM pg_available_extensions WHERE name='vector'→vector | 0.8.7VectorStore.adapterresolves toVectorStore::Pgvector, with.pdfamongsupported_extensionspg16-trixieis a drop-in replacement: same environment variables, same volume mount, samePOSTGRES_defaults, so no other change is required. Once the extension is present the app provisionsvector_store_chunksitself on first use.<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
Summary by CodeRabbit
Bug Fixes
* Fixed an issue in the development environment that could hide the document and PDF upload option. The database setup now supports the required vector functionality, allowing the upload option to appear as expected.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->