V54__native_balance_selection.sql:12 and DashboardFacts.java:229,307 select artifacts with f.facts::jsonb->>'calculationVersion' over carl_artifact.facts, which is declared text. Selection logic depends on JSON paths over an untyped column with no jsonb type and no expression index. The foundation contract says to avoid opaque JSON for core searchable entities. carl_plan_version.snapshot (V9:15) and carl_home_history.snapshot (V58:20) are similar history blobs, acceptable as audit snapshots.
Suggested resolution
Either promote facts to jsonb with an expression index on the keys used for selection, or lift calculationVersion (and any other selector) into typed columns.
Priority rationale
P2: contract deviation on a hot query path.
Filed from the 2026-10-01 real-versus-fake audit of Carl (branch feature/cicd-liquibase-gitops, HEAD 5414d7a, main 1b334d1). Four read-only reviews covered domain and services, QQQ metadata and data model, tests/CI/evidence, and docs/integrations. A local offline build of a Carl copy against the installed foundation 0.5.0-SNAPSHOT is in progress; its result will be added as a comment. Existing issues #3, #4 and #5 (real Monarch accounts, Authentik with real data, CI/CD with Liquibase and ArgoCD) are referenced rather than duplicated.
## Summary
`V54__native_balance_selection.sql:12` and `DashboardFacts.java:229,307` select artifacts with `f.facts::jsonb->>'calculationVersion'` over `carl_artifact.facts`, which is declared `text`. Selection logic depends on JSON paths over an untyped column with no jsonb type and no expression index. The foundation contract says to avoid opaque JSON for core searchable entities. `carl_plan_version.snapshot` (`V9:15`) and `carl_home_history.snapshot` (`V58:20`) are similar history blobs, acceptable as audit snapshots.
## Suggested resolution
Either promote `facts` to `jsonb` with an expression index on the keys used for selection, or lift `calculationVersion` (and any other selector) into typed columns.
## Priority rationale
P2: contract deviation on a hot query path.
---
Filed from the 2026-10-01 real-versus-fake audit of Carl (branch `feature/cicd-liquibase-gitops`, HEAD `5414d7a`, main `1b334d1`). Four read-only reviews covered domain and services, QQQ metadata and data model, tests/CI/evidence, and docs/integrations. A local offline build of a Carl copy against the installed foundation 0.5.0-SNAPSHOT is in progress; its result will be added as a comment. Existing issues #3, #4 and #5 (real Monarch accounts, Authentik with real data, CI/CD with Liquibase and ArgoCD) are referenced rather than duplicated.
This repo is archived. You cannot comment on issues.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
V54__native_balance_selection.sql:12andDashboardFacts.java:229,307select artifacts withf.facts::jsonb->>'calculationVersion'overcarl_artifact.facts, which is declaredtext. Selection logic depends on JSON paths over an untyped column with no jsonb type and no expression index. The foundation contract says to avoid opaque JSON for core searchable entities.carl_plan_version.snapshot(V9:15) andcarl_home_history.snapshot(V58:20) are similar history blobs, acceptable as audit snapshots.Suggested resolution
Either promote
factstojsonbwith an expression index on the keys used for selection, or liftcalculationVersion(and any other selector) into typed columns.Priority rationale
P2: contract deviation on a hot query path.
Filed from the 2026-10-01 real-versus-fake audit of Carl (branch
feature/cicd-liquibase-gitops, HEAD5414d7a, main1b334d1). Four read-only reviews covered domain and services, QQQ metadata and data model, tests/CI/evidence, and docs/integrations. A local offline build of a Carl copy against the installed foundation 0.5.0-SNAPSHOT is in progress; its result will be added as a comment. Existing issues #3, #4 and #5 (real Monarch accounts, Authentik with real data, CI/CD with Liquibase and ArgoCD) are referenced rather than duplicated.