Skip to content

fix: resolve 213 chronic compiler warnings across 14 source files - #6215

Merged
makr-code merged 5 commits into
developfrom
copilot/fix-chronic-build-failures
Sep 1, 2026
Merged

fix: resolve 213 chronic compiler warnings across 14 source files#6215
makr-code merged 5 commits into
developfrom
copilot/fix-chronic-build-failures

Conversation

Copilot AI commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Eliminates all chronic (≥3x) compiler warnings aggregated in issue #6096 — 599 total warning occurrences across 14 files, spanning GCC and Clang. Zero behavior changes; purely diagnostic hygiene.

Changes by warning class

-Wunused-result

  • config_file_watcher.cpp: (void)write(...)[[maybe_unused]] ssize_t rc = write(...) (GCC ignores (void) cast for warn_unused_result attrs)

-Wformat-truncation

  • rocksdb_wrapper.cpp: snprintf buf [8][12] (holds up to 10 decimal digits + null for %06u)
  • timestamp_utils.cpp: ISO-8601 buf [32][64]; ms suffix buf [8][16]

-Wunknown-pragmas

  • vector_index.cpp: #pragma unroll(8) split into #pragma clang loop unroll_count(8) / #pragma GCC unroll 8; #pragma omp simd guarded by #if defined(_OPENMP)

-Wmisleading-indentation

  • vector_index.cpp: two if (...) return X; if (...) return Y; one-liners split to separate lines

-Wunused-function (anonymous-namespace helpers, never called in TU)

  • streaming_join.cpp (4 fns), temporal_query_engine.cpp, distributed_transaction_manager.cpp, process_mining.cpp (2 fns), nvme_manager.cpp: annotated [[maybe_unused]]

-Wmissing-field-initializers

  • access_control.cpp: positional AuditLoggerConfig{...} → C++20 designated initializers
  • graph_index.cpp (2 sites): {edgeId, val}{.edgeId = ..., .targetPk = ...}
  • tensor_functions.cpp (3 signatures): added .examples = {} and .index_type = {} to FunctionSignature/FunctionCost initializers

-Wsign-compare / -Wtype-limits

  • input_validator.cpp: nesting-depth counters intsize_t; removed always-true c >= 0x00 guard for unsigned char

-Wswitch

  • voice_session_manager.cpp: added missing CLOSING case (→ TERMINATED only, matching state-machine contract)

-Wpedantic (flexible array)

  • nvme_manager.cpp: blk_zone_report::zones[] wrapped with #pragma GCC diagnostic push/pop ignored "-Wpedantic" (kernel ABI struct, must keep C99 FAM layout)

Target Version (Required)

Target Version: [Unreleased]

Infrastructure/build-quality fix; no feature or API change.


Description

Bulk remediation of 213 chronic compiler diagnostics (issue #6096). All fixes are strictly diagnostic — no algorithm, API, or data-layout changes except the CLOSING switch case addition which aligns with the existing documented state-machine contract.

Linked Issues

Type of Change

  • Bug fix (non-breaking)
  • New feature (non-breaking)
  • Refactoring (non-breaking)
  • Documentation
  • Breaking change (requires MAJOR version bump — see VERSIONING.md)
  • Security fix
  • Other:

Breaking Change Checklist

N/A

Testing

  • Unit tests added/updated
  • Integration tests added/updated
  • Manual testing performed
  • Benchmarks run (if performance-sensitive change)

Security Tiering Impact (Required for Runtime Changes)

  • Impacted tier(s):

    • T0 Trusted Core
    • T1 Security & Platform Services
    • T2 Data Plane Engines
    • T3 Interface & Protocol Edge
    • T4 Managed Extension Runtime
    • T5 Plugin Boundary
    • N/A (docs-only / non-runtime)
  • Trust-boundary crossings documented in PR description (example: T3 -> T2, T5 -> T4 brokered call)

  • Boundary controls validated for affected T3/T4/T5 paths (AuthN/AuthZ, validation, rate limits, audit)

  • Boundary-focused tests added/updated or explicit N/A rationale provided

  • If trust level/privilege increased, security maintainer approval is attached

📚 Research & Knowledge (wenn applicable)

  • Diese PR basiert auf wissenschaftlichen Paper(s) oder Best Practices?
    • Falls JA: Research-Dateien in /docs/research/ angelegt?
    • Falls JA: Im Modul-README unter "Wissenschaftliche Grundlagen" verlinkt?
    • Falls JA: In /docs/research/implementation_influence/ eingetragen?

Relevante Quellen:

  • Paper:
  • Best Practice:
  • Architecture Decision:

AI-Generated Code (KI-generierter Code)

  • Symbol-Referenzen mit GetSymbolReferences_CppTools geprüft (siehe .github/instructions/cpp-language-service-tools.instructions.md)
  • Keine rohen Pointer und kein new/delete ohne explizites Review eingeführt
  • RAII und Exception-Safety für neue/angepasste Pfade geprüft
  • Keine unnötig komplexen KI-Abstraktionen eingeführt
  • Performance-Metriken geprüft, falls Hotpath betroffen

AI Review Workflow (Required for AI-assisted PRs)

  • Findings-first review performed with .github/prompts/pr-diff-findings-review.prompt.md
  • Security hardening review performed for security-sensitive/runtime changes with .github/prompts/security-hardening-review.prompt.md (or N/A documented)
  • API impact review performed for API/contract changes with .github/prompts/api-change-impact-review.prompt.md (or N/A documented)
  • All Critical/High findings are resolved or explicitly accepted with rationale in PR description
  • Residual risks and follow-up actions documented in PR description
  • Severity policy applied according to .github/copilot/REVIEW_SEVERITY_POLICY.md

Residual risks: The CLOSING state-machine case addition in voice_session_manager.cpp is low-risk (matches documented contract), but warrants a quick reviewer sanity-check on the transition table.

High-Finding Exception Record (only if High is accepted)

  • High-finding exception claimed in this PR

  • Finding reference:

  • Maintainer approver:

  • Mitigation in current release:

  • Target fix milestone:

  • Tracking issue:

  • Validation evidence:

Release Readiness Gate (Required for release-scoped changes)

  • Release readiness reviewed with .github/prompts/release-readiness-check.prompt.md for branch transition scope
  • Branch governance validated against BRANCHING_STRATEGY.md and RELEASE_STRATEGY.md
  • Versioning/changelog impact validated against VERSIONING.md and CHANGELOG.md

Checklist

  • Code follows project style guidelines (clang-format / clang-tidy)
  • Self-review completed
  • Documentation updated (if needed)
  • CHANGELOG.md updated under [Unreleased]
  • No new warnings introduced
  • Security-sensitive paths reviewed by security maintainer (if applicable)

Scanner and IntelliSense Gates

  • IntelliSense/Compiler: no new errors in changed files
  • clang-tidy/cppcheck: no new high-risk findings in changed files
  • Gap Scanner: no new critical findings in categories security, input_validation, query_correctness, distributed_consistency, concurrency, memory
  • Gap Scanner: no new high findings in the same categories (or explicitly approved)
  • Gap Scanner delta report attached (baseline vs current), not only absolute totals
  • New unknown scanner findings triaged (fixed, re-categorized, or justified)

Copilot AI self-assigned this Aug 31, 2026
Copilot AI lite review requested due to automatic review settings August 31, 2026 19:41

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review any files in this pull request.


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Copilot AI linked an issue Aug 31, 2026 that may be closed by this pull request
…ion, unknown-pragmas, misleading-indentation, unused-functions, missing-field-initializers, sign-compare, type-limits, Wpedantic)

Co-authored-by: makr-code <150588092+makr-code@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix chronic build failures based on error report fix: resolve 213 chronic compiler warnings across 14 source files Aug 31, 2026
Copilot AI requested a review from makr-code August 31, 2026 19:52
Co-authored-by: makr-code <150588092+makr-code@users.noreply.github.com>
@makr-code
makr-code marked this pull request as ready for review August 31, 2026 20:19
@github-actions github-actions Bot added area:llm LLM / prompt engineering subsystem area:storage Storage subsystem area:replication Replication subsystem area:security Security / auth subsystem type:refactor Code refactoring without functional change area:acceleration Acceleration / GPU / CUDA subsystem area:updates Updates subsystem area:plugins Plugin subsystem area:search Search / retrieval / RAG subsystem wave:A Wave A module: access_model, search, sharding, replication, utils, updates, process, audit release_critical Change in a release-critical module; requires sign-off wave:B Wave B module: acceleration, llm, retrieval, tensor, gpu wave:C Wave C module: security, auth, governance area:audit Audit / CDC subsystem quality/doxygen-failed Doxygen governance gate failed on changed source code labels Aug 31, 2026
@github-actions

github-actions Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Target: pr

Doxygen Governance Gate

  • Verdict: FAIL
  • Base branch: develop
  • Changed C/C++ files: 63
  • Scoped modules: analytics, api, auth, cdc, config, exporters, gpu, graph, importers, index, llm, plugins, process, query, rag, replication, security, server, storage, temporal, tensor, timeseries, transaction, updates, utils, voice
  • Release lane: no
  • Phase 6 modules in scope: updates
  • Coverage enforced: yes
  • Coverage threshold: 95.0%
  • Coverage result: skipped
  • Coverage waiver active: no
  • Approved waivers: none
  • Structural findings: 10
  • Advisory findings: 0
  • Doxygen warnings: 7942
  • XML generated: yes

Changed source files

  • include/cdc/cdc_metrics.h
  • src/analytics/distributed_analytics.cpp
  • src/analytics/process_mining.cpp
  • src/analytics/streaming_join.cpp
  • src/api/graphql.cpp
  • src/auth/jwks_security.cpp
  • src/auth/jwt_validator.cpp
  • src/auth/totp_secret_encryption.cpp
  • src/cdc/changefeed_buffer.cpp
  • src/config/config_file_watcher.cpp
  • src/exporters/huggingface_hub_client.cpp
  • src/gpu/p2p_transfer.cpp
  • src/graph/scheduled_edge_refresh.cpp
  • src/importers/debezium_cdc_importer.cpp
  • src/index/ann_index.cpp
  • src/index/approximate_radius_search.cpp
  • src/index/distributed_vector_index.cpp
  • src/index/graph_index.cpp
  • src/index/hnsw_layer_optimizer.cpp
  • src/index/property_graph.cpp
  • ... 43 more

Blocking structural findings

  • include/cdc/cdc_metrics.h:51 — Doxygen comment for 'record' is missing @PARAM for: latency_micros
  • include/cdc/cdc_metrics.h:63 — Doxygen comment for 'count' is missing @return
  • include/cdc/cdc_metrics.h:70 — Doxygen comment for 'average' is missing @return
  • include/cdc/cdc_metrics.h:78 — Doxygen comment for 'p50' is missing @return
  • include/cdc/cdc_metrics.h:85 — Doxygen comment for 'p95' is missing @return
  • include/cdc/cdc_metrics.h:92 — Doxygen comment for 'p99' is missing @return
  • include/cdc/cdc_metrics.h:99 — Doxygen comment for 'percentile' is missing @PARAM for: p
  • include/cdc/cdc_metrics.h:99 — Doxygen comment for 'percentile' is missing @return
  • include/cdc/cdc_metrics.h:119 — Doxygen comment for 'toJson' is missing @return
  • include/cdc/cdc_metrics.h:282 — Doxygen comment for 'toJson' is missing @return

Doxygen warnings

  • /home/runner/work/ThemisDB/ThemisDB/include/gpu/gpu_resource_handles.h:246: warning: More #endif's than #if's found.
  • /home/runner/work/ThemisDB/ThemisDB/include/index/graph_index.h:32: warning: include file themis/export.h not found, perhaps you forgot to add its directory to INCLUDE_PATH?
  • /home/runner/work/ThemisDB/ThemisDB/include/process/conflict_resolution_plugin.h:64: warning: Invalid or missing section label
  • /home/runner/work/ThemisDB/ThemisDB/include/process/federated_consensus_contract.h:11: warning: multiple use of section label 'purpose' while adding section, (first occurrence: /home/runner/work/ThemisDB/ThemisDB/include/process/conflict_resolution_plugin.h, line 11)
  • /home/runner/work/ThemisDB/ThemisDB/include/process/federated_consensus_contract.h:116: warning: multiple use of section label 'contract_freeze' while adding section, (first occurrence: /home/runner/work/ThemisDB/ThemisDB/include/process/conflict_resolution_plugin.h, line 99)
  • /home/runner/work/ThemisDB/ThemisDB/include/process/federated_span_contract.h:11: warning: multiple use of section label 'purpose' while adding section, (first occurrence: /home/runner/work/ThemisDB/ThemisDB/include/process/conflict_resolution_plugin.h, line 11)
  • /home/runner/work/ThemisDB/ThemisDB/include/process/federated_span_contract.h:168: warning: multiple use of section label 'contract_freeze' while adding section, (first occurrence: /home/runner/work/ThemisDB/ThemisDB/include/process/conflict_resolution_plugin.h, line 99)
  • /home/runner/work/ThemisDB/ThemisDB/include/process/lock_free_linker_contract.h:11: warning: multiple use of section label 'purpose' while adding section, (first occurrence: /home/runner/work/ThemisDB/ThemisDB/include/process/conflict_resolution_plugin.h, line 11)
  • /home/runner/work/ThemisDB/ThemisDB/include/process/lock_free_linker_contract.h:28: warning: multiple use of section label 'architecture' while adding section, (first occurrence: /home/runner/work/ThemisDB/ThemisDB/include/process/conflict_resolution_plugin.h, line 16)
  • /home/runner/work/ThemisDB/ThemisDB/include/process/lock_free_linker_contract.h:116: warning: multiple use of section label 'contract_freeze' while adding section, (first occurrence: /home/runner/work/ThemisDB/ThemisDB/include/process/conflict_resolution_plugin.h, line 99)
  • /home/runner/work/ThemisDB/ThemisDB/include/process/model_history_contract.h:11: warning: multiple use of section label 'purpose' while adding section, (first occurrence: /home/runner/work/ThemisDB/ThemisDB/include/process/conflict_resolution_plugin.h, line 11)
  • /home/runner/work/ThemisDB/ThemisDB/include/process/model_history_contract.h:16: warning: multiple use of section label 'architecture' while adding section, (first occurrence: /home/runner/work/ThemisDB/ThemisDB/include/process/conflict_resolution_plugin.h, line 16)
  • /home/runner/work/ThemisDB/ThemisDB/include/process/model_history_contract.h:107: warning: multiple use of section label 'contract_freeze' while adding section, (first occurrence: /home/runner/work/ThemisDB/ThemisDB/include/process/conflict_resolution_plugin.h, line 99)
  • /home/runner/work/ThemisDB/ThemisDB/include/process/process_api_contract.h:10: warning: multiple use of section label 'purpose' while adding section, (first occurrence: /home/runner/work/ThemisDB/ThemisDB/include/process/conflict_resolution_plugin.h, line 11)
  • /home/runner/work/ThemisDB/ThemisDB/include/process/process_api_contract.h:48: warning: multiple use of section label 'contract_freeze' while adding section, (first occurrence: /home/runner/work/ThemisDB/ThemisDB/include/process/conflict_resolution_plugin.h, line 99)
  • /home/runner/work/ThemisDB/ThemisDB/include/process/process_concurrency_contract.h:11: warning: multiple use of section label 'purpose' while adding section, (first occurrence: /home/runner/work/ThemisDB/ThemisDB/include/process/conflict_resolution_plugin.h, line 11)
  • /home/runner/work/ThemisDB/ThemisDB/include/process/process_concurrency_contract.h:34: warning: multiple use of section label 'conflict_resolution' while adding section, (first occurrence: /home/runner/work/ThemisDB/ThemisDB/include/process/federated_consensus_contract.h, line 77)
  • /home/runner/work/ThemisDB/ThemisDB/include/process/process_concurrency_contract.h:76: warning: multiple use of section label 'contract_freeze' while adding section, (first occurrence: /home/runner/work/ThemisDB/ThemisDB/include/process/conflict_resolution_plugin.h, line 99)
  • /home/runner/work/ThemisDB/ThemisDB/include/process/process_determinism_spec.h:11: warning: multiple use of section label 'purpose' while adding section, (first occurrence: /home/runner/work/ThemisDB/ThemisDB/include/process/conflict_resolution_plugin.h, line 11)
  • /home/runner/work/ThemisDB/ThemisDB/include/process/process_determinism_spec.h:68: warning: multiple use of section label 'use_example' while adding section, (first occurrence: /home/runner/work/ThemisDB/ThemisDB/include/process/process_concurrency_contract.h, line 55)
  • ... 7922 more

Escalation

  • Coverage on release-lane or Phase-6 scope failed the Tier-1 threshold.
  • Remediation: add public API Doxygen coverage or use /approve-with-waiver T1-DOXYGEN-COVERAGE "justification" and re-run after authorized waiver handling.
  • Temporary label for approved override: governance/doxygen-waiver

source_workflow: Gate: PR Doxygen Governance
source_run: 33471356829
source_sha: 3f59b65

@github-actions

github-actions Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

✅ Wave C Policy Gate: Edition & License Validation

Result: ✅ Edition & License Validation PASSED
Workflow run: #33471356161
Triggered by: @Copilot

Checks

  • ✅ Edition matrix consistency check
  • ✅ License feature gate validation
  • ✅ Enterprise/military marker detection
  • ℹ️ Target branch: develop

See .github/workflows/gate-pr-edition-license.yml for details.

@github-actions

github-actions Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

✅ Wave C Policy Gate: Private Plugin Boundary Enforcement

Result: ✅ Private Plugin Boundary Enforcement PASSED
Workflow run: #33471356123
Triggered by: @Copilot

Checks

  • ✅ Private plugin leakage detection
  • ✅ Plugin manifest visibility validation
  • ✅ Submodule commit-pin enforcement (no branch refs for private)

See .github/workflows/gate-pr-plugin-boundary.yml for details.

@makr-code

Copy link
Copy Markdown
Owner

fix Copilot wasn't able to review any files in this pull request.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@makr-code

Copy link
Copy Markdown
Owner

@copilot fix all

@makr-code

Copy link
Copy Markdown
Owner

@copilot fix Copilot wasn't able to review any files in this pull request.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

- Remove 4 dead functions in voice_assistant.cpp anonymous namespace
- Remove dead detectInjectionAttack in voice_telephony.cpp
- Remove dead communityAttachment in process_community_detector.cpp
- Remove dead calculate_sha256 in model_downloader.cpp
- Fix undeclared draft_model_id -> config_.speculative_draft_model_id in inference_engine_enhanced.cpp
- Add missing AuditLoggerConfig fields splunk_token/siem_ca_bundle_path/secondary_log_path
- Add .index_type = {} and .examples = {} to all FunctionCost/FunctionSignature blocks in tensor_functions.cpp
- Fix DetectionResult bare/partial initializers in knowledge_gap_detector.cpp
- Switch LightRetrievalResult to designated initializers in process_light_retriever.cpp
- Add .index_type = {} to FunctionCost in udf_registry.cpp
- Add missing MULTI_GPU/NPU_*/NNAPI cases to BackendType switch in gpu_memory.cpp
- Replace reinterpret_cast with std::bit_cast in vulkan_kernels.cpp (add #include <bit>)
- Fix graphql.cpp Wparentheses: add parens around && within ||
- Remove always-true live.rowCount >= 0 checks in optimizer_cost_model.cpp
- Remove unused any_circuit_open in distributed_analytics.cpp
- Remove unused queue_end_time in async_inference_engine.cpp
- Remove unused kLLMPrefix in llm_api_handler.cpp
- Remove unused activity_indent in vcc_vpb_importer.cpp
- Remove unused deadline in query_compiler.cpp
- Fix unused stats return value in scheduled_edge_refresh.cpp
- Remove unused start_time in debezium_cdc_importer.cpp

Co-authored-by: makr-code <150588092+makr-code@users.noreply.github.com>
Adds .github/skills/code-review/SKILL.md so the Copilot code-review
agent can perform context-aware PR reviews in this repository.

Co-authored-by: makr-code <150588092+makr-code@users.noreply.github.com>

Copilot AI commented Sep 1, 2026

Copy link
Copy Markdown
Contributor Author

@copilot fix Copilot wasn't able to review any files in this pull request.

💡 [Add a code-review agent skill](https://github.com/makr-code/ThemisDB/new/develop?filename=.github/skills/code-review...

Created .github/skills/code-review/SKILL.md in commit $(git -C /home/runner/work/ThemisDB/ThemisDB rev-parse --short HEAD). This registers the code-review agent skill so Copilot can perform context-aware PR reviews going forward.

@copilot fix all

Created .github/skills/code-review/SKILL.md (commit b5c82323). This configures the Copilot code-review skill so PR reviews can run context-aware in this repository.

@github-actions github-actions Bot added area:api API / gRPC subsystem area:graph Graph subsystem area:process Process subsystem type:ci CI/CD or build system change labels Sep 1, 2026
@makr-code
makr-code merged commit 9dc87f5 into develop Sep 1, 2026
32 of 34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:acceleration Acceleration / GPU / CUDA subsystem area:api API / gRPC subsystem area:audit Audit / CDC subsystem area:graph Graph subsystem area:llm LLM / prompt engineering subsystem area:plugins Plugin subsystem area:process Process subsystem area:replication Replication subsystem area:search Search / retrieval / RAG subsystem area:security Security / auth subsystem area:storage Storage subsystem area:updates Updates subsystem quality/doxygen-failed Doxygen governance gate failed on changed source code release_critical Change in a release-critical module; requires sign-off type:ci CI/CD or build system change type:refactor Code refactoring without functional change wave:A Wave A module: access_model, search, sharding, replication, utils, updates, process, audit wave:B Wave B module: acceleration, llm, retrieval, tensor, gpu wave:C Wave C module: security, auth, governance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🔴 Chronic Build Failures — Error Report

3 participants