Skip to content

Add build configuration and module status reporting at server startup - #266

Merged
makr-code merged 7 commits into
developfrom
copilot/update-themis-server-modules
Jan 7, 2026
Merged

makr-code merged 7 commits into
developfrom
copilot/update-themis-server-modules

Conversation

Copilot AI commented Jan 7, 2026 •

Copy link
Copy Markdown
Contributor

ThemisDB has 40+ optional modules controlled by THEMIS_* compiler flags. At startup, the server now displays which edition is running, which modules are compiled into the binary, and their compilation status.

Changes

Build Information System

  • include/themis/build_info.h - API for querying compile-time configuration
  • src/utils/build_info.cpp - Collects edition info, compiler details, and module status via preprocessor directives

Startup Display

  • src/main_server.cpp - Logs formatted table on startup showing:
    • Edition (Community/Enterprise/Hyperscaler) with GPU/sharding limits
    • Compiler version and build type
    • All 45 modules with compiled/disabled status and descriptions

API Endpoints

  • src/server/http_server.cpp - New GET /version endpoint returning JSON with complete build configuration
  • GET /api/capabilities - Enhanced with edition and build information

Example Output

===============================================================================
                      THEMIS DATABASE BUILD CONFIGURATION                       
===============================================================================

EDITION INFORMATION:
  Edition:            Community (COMMUNITY)
  GPU VRAM Limit:     24 GB
  Max Shard Nodes:    1

COMPILED MODULES:
  Total Modules:      45
  Compiled In:        12
  Not Compiled:       33

  Enabled Modules:
    ✓ Storage Engine              - RocksDB-based storage with MVCC
    ✓ gRPC Protocol               - Inter-shard communication
    ✓ mimalloc Allocator          - High-performance allocator (+20-40%)
    
  Disabled Modules:
    ✗ CUDA Backend                - NVIDIA CUDA acceleration
    ✗ LLM Integration             - llama.cpp integration

API response at GET /version:

{
  "version": "1.3.5",
  "edition": {
    "type": "Community",
    "gpu_max_vram_gb": 24,
    "sharding_max_nodes": 1
  },
  "modules": {
    "compiled_in": [{"name": "Storage Engine", "description": "..."}],
    "not_compiled": [{"name": "CUDA Backend", "description": "..."}],
    "compiled_count": 12,
    "disabled_count": 33
  }
}

Module Categories Tracked

  • Core (Storage, Indexes) - always compiled
  • GPU acceleration (CUDA, HIP, OpenCL, Vulkan, DirectX, Metal, OneAPI)
  • LLM & Voice (llama.cpp, Whisper, Piper TTS)
  • Protocols (HTTP/2, HTTP/3, gRPC, WebSocket)
  • Performance (mimalloc, Huge Pages, RCU Index)
  • Advanced storage (LIRS, WiscKey, RaBitQ, DiskANN)
  • Security (HSM PKCS#11)
  • Observability (OpenTelemetry)
Original prompt

Wir haben sehr viele Module die über Compiler Schalter an und abgeschaltet werden können THEMIS_* wir müssen jetzt beim start des Themis Servers sehr genau wieder spiegeln, welche Edition mit welcher Konfiguration compiled (welche module binär in themis_server.exe) vorliegt und welche Module davon über die config, wie enanbled sind. Teile davon sind z.B. in themis_http_server.cpp bereits hinterlegt.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 5 commits January 7, 2026 09:55
- Created build_info.h and build_info.cpp for compile-time configuration
- Collect edition information (Community/Enterprise/Hyperscaler)
- Track all THEMIS_* compilation flags and module status
- Display comprehensive build configuration at server startup
- Added /version API endpoint for programmatic access
- Shows enabled/disabled modules and their descriptions

Co-authored-by: makr-code <[email protected]>
- Replace invalid CHECK_FLAG macro with explicit ifdef checks
- Properly handle compile-time detection of THEMIS_* flags
- Each flag now has separate ifdef/else blocks for accurate reporting

Co-authored-by: makr-code <[email protected]>
- Enhanced /api/capabilities endpoint with edition and build information
- Created comprehensive documentation for build info feature
- Documented API endpoints, usage examples, and benefits
- Added startup display format and JSON response examples

Co-authored-by: makr-code <[email protected]>
- Fix compilation error by declaring handleVersion method in header
- Ensures proper API contract for the new /version endpoint

Co-authored-by: makr-code <[email protected]>
- Comprehensive summary of build info feature implementation
- Documents problem statement, solution, and all changes
- Lists all created and modified files with statistics
- Includes technical approach and benefits
- Notes testing status and future enhancements

Co-authored-by: makr-code <[email protected]>
Copilot AI changed the title [WIP] Update Themis server to reflect module configurations Add build configuration and module status reporting at server startup Jan 7, 2026
Copilot AI requested a review from makr-code January 7, 2026 10:03
@makr-code
makr-code marked this pull request as ready for review January 7, 2026 10:22
@makr-code
makr-code merged commit b40fbf1 into develop Jan 7, 2026
@makr-code makr-code added this to the v1.0.2 milestone Mar 11, 2026
Copilot AI added a commit that referenced this pull request May 11, 2026
…HMAC/embedding stubs

- GGUFMetadata (stub #259): add HmacFn type alias + setHmacFn() static API;
  sign()/verify() delegate to injected fn when set, fall back to XOR stub;
  fail-closed on fn exception; source comments updated from #173 → #259

- FlareRetrieval (stub #260): add EmbeddingQueryFn type alias + setEmbeddingQueryFn()
  static API + buildQueryEmbedding() method; string buildQuery() path retained
  as documented fallback; fail-closed on fn exception

- TensorRAGPipeline (stub #261): add EmbeddingQueryFn + setEmbeddingQueryFn()
  static API; step() populates RAGDecision::flare_query_embedding when fn set
  and FLARE triggers; fail-closed on fn exception

- STUB_INVENTORY.md: 21 new entries (#259–#277, with #263 as a/b/c subtypes);
  header updated to 272 entries / 238 resolved / 34 active; source ID conflicts
  for AR-01 (#172→#265), AR-02 (#177→#266), mmap-bridge (#176→#270),
  fingerprint-graph (#174→#276) noted and source comments updated

- All three bridges follow the gpu_tensor.cpp pattern: static function-local
  mutex + static function-local std::function storage; thread-safe getter/setter

Co-authored-by: Copilot <[email protected]>

Co-authored-by: makr-code <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants