Skip to content

feat(ci-guard): Check 8c – bench source-vs-binary mismatch CI guard with actual build verification - #4669

Merged
makr-code merged 2 commits into
developfrom
copilot/fix-150588092-1085539157-9aa531e2-7ec1-4f8c-85fd-1df6f166746d
Apr 15, 2026
Merged

makr-code merged 2 commits into
developfrom
copilot/fix-150588092-1085539157-9aa531e2-7ec1-4f8c-85fd-1df6f166746d

Conversation

Copilot AI commented Apr 15, 2026 •

Copy link
Copy Markdown
Contributor

bench_*.cpp sources existed without guaranteed built binaries in CI; only CMake target coverage (8a) and guard script presence (8b) were enforced. This adds Check 8c: an actual build + binary verification job.

What changed

tools/check_bench_targets.py

  • check_bench_targets() now returns a 5-tuple: added auto_reg_binary_skipped (auto-registered EXCLUDE_FROM_ALL sources intentionally absent from default build, not a CI error)
  • In --build-dir mode, only explicitly-wired (add_executable()) non-allowlisted sources are required to have binaries; auto-registered sources are informational
  • --strict enforces binary presence for all sources (requires building themis_benchmarks_all_eligible)
  • format_text() and format_json() surface the new list; JSON gains auto_reg_binary_skipped in counts

tools/bench_source_allowlist.toml

  • Expanded from 13 → 28 entries; added 15 conditionally-gated sources that have explicit add_executable() entries but are CMake-gated by THEMIS_ENABLE_CUDA/HIP/GPU/LLM:
    • GPU_ONLY (8): bench_fused_kernels, bench_gpu_backends, bench_gpu_training_cycle, bench_mixed_precision_perf, bench_multi_gpu_scaling, bench_lora_gpu, bench_vulkan_lora, bench_fused_lora_kernels
    • THIRD_PARTY/LLM (7): bench_backend_comparison, bench_data_transfer, bench_gpu_vram_allocation, bench_llm_inference_performance, bench_lora_auto_binding, bench_multi_gpu_lora_advanced, bench_multi_lora_fusion

.github/workflows/05-quality_build_bench-source-guard-ci.yml

  • New bench-binary-guard job (Job 2, needs: bench-source-guard, 45 min timeout):
    • Installs apt deps (cmake, ninja, libbenchmark-dev, libssl-dev, libboost-all-dev, librocksdb-dev, etc.) — no vcpkg
    • Configures via cmake -S cmake with THEMIS_BUILD_BENCHMARKS=ON, THEMIS_ENABLE_LLM/GPU/CUDA/GRPC=OFF
    • Builds default target (all explicitly-wired benchmarks)
    • Runs check_bench_targets.py --build-dir → exits 1 on any missing binary
    • Uploads bench-binary-guard-results-<sha>.json; writes job summary with Check 8c pass/fail table and missing binary list

docs/ci-cd/workflows/05-quality/bench-source-guard-ci.md

  • Added Check 8c section with source-type → binary-check expectation table, scope note, and Job 2 workflow details

PERFORMANCE_EXPECTATIONS.md

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

  • MAJOR version bump planned in VERSION and CMakeLists.txt
  • Migration guide added in docs/migration/
  • Announcement prepared for GitHub Discussions (≥ 2 weeks before release)
  • CHANGELOG ### Removed / ### Changed section updated

Testing

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

Verified locally:

  • check_bench_targets.py (no --build-dir): exit 0, 0 orphaned, 28 allowlisted, 72 auto-reg covered
  • check_bench_targets.py --build-dir <empty-dir>: exit 1, 71 binary_missing (explicitly-wired), 72 auto_reg_binary_skipped (EXCLUDE_FROM_ALL, informational only)
  • JSON output includes new auto_reg_binary_skipped_sources array and auto_reg_binary_skipped count

📚 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:

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)

…ctual build verification

- Update tools/check_bench_targets.py: in --build-dir mode, skip auto-registered
  (EXCLUDE_FROM_ALL) sources by default; add auto_reg_binary_skipped to
  JSON/text output; update function signature to 5-tuple return value

- Update tools/bench_source_allowlist.toml: add 15 conditionally-gated benchmark
  sources (GPU/CUDA/HIP/Vulkan-gated and LLM-gated) that cannot be built without
  special hardware or third-party LLM runtime

- Add bench-binary-guard job to 05-quality_build_bench-source-guard-ci.yml:
  builds all explicitly-wired benchmark targets (cmake -S cmake, no vcpkg),
  then runs check_bench_targets.py --build-dir to verify binaries are present;
  uploads JSON artifact with results; job summary with Check 8c pass/fail table

- Update docs/ci-cd/workflows/05-quality/bench-source-guard-ci.md: document
  new Check 8c, binary verification table, Job 2 (bench-binary-guard) workflow

- Mark PERFORMANCE_EXPECTATIONS.md Maßnahme #8 as ERLEDIGT"

Agent-Logs-Url: https://github.com/makr-code/ThemisDB/sessions/26d2d8a9-9f61-41e7-9e8c-9f520012ac59

Co-authored-by: makr-code <[email protected]>
Copilot AI changed the title [WIP] Copilot Request feat(ci-guard): Check 8c – bench source-vs-binary mismatch CI guard with actual build verification Apr 15, 2026
Copilot AI requested a review from makr-code April 15, 2026 18:57
@makr-code
makr-code marked this pull request as ready for review April 15, 2026 18:58
@makr-code
makr-code merged commit 3686c1a into develop Apr 15, 2026
10 checks passed
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.

[Agentic AI][CI Guard] Fail when benchmark source exists without binary

2 participants