fix(server): exit if no active schema version found

Summary

Webserver previously defaulted to schema version 0 when no active version existed in ClickHouse. This caused queries against unprefixed table names on fresh clusters where the indexer hadn't run yet.

Now the webserver exits with a clear error if no active schema version is found, letting k8s restart loop until the indexer initializes the schema.

Test plan

  • Added integration test: read_active_version_returns_none_on_empty_table — verifies empty version table returns None
  • Added integration test: read_active_version_returns_some_after_write — verifies version is returned after write

Merge request reports

Loading