Summary
HAIStack has strong unit and integration test coverage (~121 test files, Postgres via testcontainers) but no proof-of-conformance or proof-of-scale evidence. There are no Go benchmarks, no external conformance suites (Inferno, Touchstone, Crucible), no CapabilityStatement-vs-tested-endpoint matrix, and no published workload baselines. Server selection guidance emphasizes benchmarking your own data shape — HAIStack needs a reference workload and harness so adopters can evaluate fitness for their use case, not rely on generic FHIR server benchmarks.
Problem / gap
What we have today
Testing (correctness):
- CI:
gofmt, go vet, golangci-lint, go test -race -count=1 -timeout 30m ./..., go build
- Integration tests: Postgres (testcontainers), SQLite, HTTP, sync, analytics, runtime
pkg/testkit: fixtures, store fakes, sync scenarios, golden OperationOutcome helpers, FHIRPath assertions, AI harness
What is absent:
- Zero
func Benchmark* tests in the repository
- No Touchstone, Inferno, Crucible, or HL7 validator conformance CI jobs
- No CapabilityStatement accuracy testing (
GET /fhir/metadata vs actually supported operations)
- No load/stress/concurrency test suite
- No published compatibility or performance matrix
- No observability baseline (metrics, tracing) for benchmark runs
- No upgrade/migration regression testing under load
Why generic benchmarks are insufficient
The guidance explicitly states: optimization mechanisms differ across HAPI, Blaze, Aidbox, Smile, Azure, AWS, etc. — a generic benchmark number is a poor proxy for a particular workload. HAIStack's architecture (registry-driven search indexer, single WriteSession transactions, terminology projections, offline SQLite edge, Git-inspired sync) has unique performance characteristics that must be measured against representative workloads.
Minimum benchmark workloads (from guidance)
HAIStack should benchmark at least:
| Workload |
HAIStack packages |
Current test coverage |
| Highest-cardinality searches |
pkg/search, pkg/postgres |
Functional only |
| Chained searches |
pkg/search |
Unknown completeness |
_include / _revinclude |
pkg/search, pkg/http |
Functional only |
| Terminology expansion |
pkg/terminology |
Unit tests |
| Validation under real IG stack |
pkg/validate, pkg/registry |
Structural only |
| Transaction bundles |
pkg/core, pkg/http |
Integration tests |
| Conditional operations |
pkg/core, pkg/http |
Some tests |
Patient _history reads |
pkg/core, pkg/store |
Integration tests |
| Bulk Data export |
pkg/http |
501 — not testable |
| Subscription/event loads |
pkg/subscriptions, pkg/jobs |
Unit/integration |
| Mixed concurrent reads/writes |
pkg/runtime, pkg/sync |
Limited |
| View refresh at scale |
pkg/view, pkg/analytics |
Integration only |
| Sync push/pull under load |
pkg/sync |
Scenario tests, no perf |
Non-latency dimensions to compare:
- Operational observability (metrics, logs, trace spans)
- Upgrade behaviour (schema migrations during traffic)
- Reindex job impact on interactive latency
- SQLite edge vs Postgres edge vs cloud mode degradation modes
Proposed scope
Phase 1 — Reference workload and dataset
Phase 2 — Go benchmark harness
Phase 3 — Conformance matrix
Phase 4 — External conformance evaluation
Phase 5 — Observability and upgrade benchmarks
Phase 6 — Comparison documentation (not horse-race)
Acceptance criteria
Out of scope (for this issue)
- Claiming superiority over HAPI/Firely/Blaze (methodology only)
- Production APM integration (Prometheus exporter is separate)
- Load testing SaaS infrastructure (k6 cloud, etc.) — local/CI only initially
Affected packages / files
| Area |
Path |
| New benchmarks |
benchmarks/ |
| Search |
pkg/search/ |
| HTTP |
pkg/http/ |
| Core |
pkg/core/ |
| Terminology |
pkg/terminology/ |
| Sync |
pkg/sync/ |
| Analytics |
pkg/analytics/ |
| Runtime |
pkg/runtime/ |
| CI |
.github/workflows/benchmarks.yml |
| Docs |
docs/benchmarks.md, docs/conformance-matrix.md |
Dependencies
- Blocked partially by: Bulk Data server (cannot benchmark export until implemented)
- Blocked partially by: Profile validation (validation-under-IG benchmark needs conformance artefacts)
- Complements: Authorization scenario tests (concurrent authz under load)
References
- Inferno Framework
- Crucible
- Go benchmarking:
testing.B, benchstat
- HAIStack README — "not a monolithic FHIR server" positioning
Related issues
- Conformance artefacts (IG + validator for validation benchmarks)
- Bulk Data server (export benchmarks)
- Authorization semantics (authz under load)
- Research: vendor-neutral benchmark suite contribution
Summary
HAIStack has strong unit and integration test coverage (~121 test files, Postgres via testcontainers) but no proof-of-conformance or proof-of-scale evidence. There are no Go benchmarks, no external conformance suites (Inferno, Touchstone, Crucible), no CapabilityStatement-vs-tested-endpoint matrix, and no published workload baselines. Server selection guidance emphasizes benchmarking your own data shape — HAIStack needs a reference workload and harness so adopters can evaluate fitness for their use case, not rely on generic FHIR server benchmarks.
Problem / gap
What we have today
Testing (correctness):
gofmt,go vet,golangci-lint,go test -race -count=1 -timeout 30m ./...,go buildpkg/testkit: fixtures, store fakes, sync scenarios, golden OperationOutcome helpers, FHIRPath assertions, AI harnessWhat is absent:
func Benchmark*tests in the repositoryGET /fhir/metadatavs actually supported operations)Why generic benchmarks are insufficient
The guidance explicitly states: optimization mechanisms differ across HAPI, Blaze, Aidbox, Smile, Azure, AWS, etc. — a generic benchmark number is a poor proxy for a particular workload. HAIStack's architecture (registry-driven search indexer, single
WriteSessiontransactions, terminology projections, offline SQLite edge, Git-inspired sync) has unique performance characteristics that must be measured against representative workloads.Minimum benchmark workloads (from guidance)
HAIStack should benchmark at least:
pkg/search,pkg/postgrespkg/search_include/_revincludepkg/search,pkg/httppkg/terminologypkg/validate,pkg/registrypkg/core,pkg/httppkg/core,pkg/http_historyreadspkg/core,pkg/storepkg/httppkg/subscriptions,pkg/jobspkg/runtime,pkg/syncpkg/view,pkg/analyticspkg/syncNon-latency dimensions to compare:
Proposed scope
Phase 1 — Reference workload and dataset
benchmarks/directory with:Phase 2 — Go benchmark harness
func Benchmark*tests (orbenchmarks/main packages) for:_include/_revinclude_historyread (version chain)main(non-blocking initially), store results as artifactsPhase 3 — Conformance matrix
pkg/registrysnapshot_history,_search, bundlesdocs/conformance-matrix.md(generated, not hand-maintained)Phase 4 — External conformance evaluation
pkg/httpdeploymentPhase 5 — Observability and upgrade benchmarks
Phase 6 — Comparison documentation (not horse-race)
Acceptance criteria
mainbranch mergesOut of scope (for this issue)
Affected packages / files
benchmarks/pkg/search/pkg/http/pkg/core/pkg/terminology/pkg/sync/pkg/analytics/pkg/runtime/.github/workflows/benchmarks.ymldocs/benchmarks.md,docs/conformance-matrix.mdDependencies
References
testing.B,benchstatRelated issues