Skip to content

fix(backend): search and AI usage queries broken on Postgres - #160

Merged
CMaintz merged 7 commits into
mainfrom
fix/postgres-query-bugs
Oct 1, 2026
Merged

CMaintz merged 7 commits into
mainfrom
fix/postgres-query-bugs

Conversation

@CMaintz

@CMaintz CMaintz commented Sep 30, 2026 •

Copy link
Copy Markdown
Owner

Stacked on #157. The tests that caught these are in #158.

  • Keyword search failed on any non-empty query because the text config wasn't cast to regconfig.
  • The AI usage repo crashed at startup: Hibernate returns long for SUM/COUNT but the records used int.
  • Postgres can't type :since IS NULL, so I pass the epoch for "all time" instead.

…aCoCo floor

- pgvector/pgvector:pg16 integration tests for full-text search, nearest
  neighbour search, AI usage aggregates and the Flyway migration chain
- ArchUnit rules for the hexagonal layering
- JaCoCo report on every test run with a 31% line-coverage floor
websearch_to_tsquery received the text config as varchar, which has no
matching overload, so every non-empty keyword search failed. The usage
aggregates constructed int records from Hibernate's long SUM/COUNT (a
startup-time query validation failure) and used an untypeable
':since IS NULL' guard.
@CMaintz CMaintz changed the title fix(backend): keyword search and AI usage queries fail on Postgres fix(backend): search and AI usage queries broken on Postgres Sep 30, 2026
Base automatically changed from fix/jackson-cve to main September 30, 2026 14:59
CMaintz and others added 2 commits September 30, 2026 16:59
@CMaintz CMaintz added the ruleset-change Deliberate ruleset/threshold/baseline loosening (ruleset-guard gate) label Sep 30, 2026
@CMaintz

CMaintz commented Sep 30, 2026

Copy link
Copy Markdown
Owner Author

Labelled ruleset-change on purpose: the build.gradle.kts / libs.versions.toml bits are the JaCoCo floor and Testcontainers deps from #158, i.e. tightening, not loosening.

@CMaintz
CMaintz merged commit 96bdd61 into main Oct 1, 2026
28 checks passed
@CMaintz
CMaintz deleted the fix/postgres-query-bugs branch October 1, 2026 09:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ruleset-change Deliberate ruleset/threshold/baseline loosening (ruleset-guard gate)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant