Repository navigation
feat(ci): bench-source CI guard — hard-fail on orphaned bench_*.cpp (Maßnahme #8) - #4600
Merged
Merged
Conversation
- Add tools/check_bench_targets.py: standalone guard that detects bench_*.cpp files without CMake target coverage. A source is covered by either an explicit add_executable() entry or the THEMIS_AUTO_REGISTER_ELIGIBLE_BENCHMARKS block. Supports --strict mode (requires explicit targets), --format json, --no-color. - Add tools/perf_expectations_audit.py: audit orchestrator with STATUS_FAIL checks: * Check 8a: orphaned_sources == [] (PASS: 81 auto-registered, 0 orphaned) * Check 8b: tools/check_bench_targets.py exists (PASS) - Add .github/workflows/05-quality_build_bench-source-guard-ci.yml: CI workflow that runs both tools on PR/push/schedule. Fails hard on new orphaned sources. Agent-Logs-Url: https://github.com/makr-code/ThemisDB/sessions/6b5afc19-3345-4f0c-bb3f-a8f172edbe9a Co-authored-by: makr-code <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
81
bench_*.cppfiles inbenchmarks/had no explicitadd_executable()entry — silently swallowed by theTHEMIS_AUTO_REGISTER_ELIGIBLE_BENCHMARKSfallback with zero CI enforcement. This adds a hard CI gate preventing new orphaned bench sources from slipping through.Description
tools/check_bench_targets.py— standalone guardbench_*.cppglob against CMake explicit targets + auto-registration presenceadd_executable(<stem>)ORTHEMIS_AUTO_REGISTER_ELIGIBLE_BENCHMARKSblock present → covered; otherwise → orphaned--strict: requires explicit target per file (exposes the 81 auto-reg-only files)--format jsonfor machine consumption;--no-color,--quietfor CI/pre-commit usetools/perf_expectations_audit.py— audit orchestrator (§1.4)STATUS_FAIL:orphaned_sources == []→ PASS (81 auto-registered, 0 truly orphaned)STATUS_FAIL:tools/check_bench_targets.pyexists → PASSSTATUS_FAIL.github/workflows/05-quality_build_bench-source-guard-ci.ymlbench_*.cpp,CMakeLists.txt, guard tools), plus nightlyLinked Issues
Type of Change
Breaking Change Checklist
VERSIONandCMakeLists.txtdocs/migration/### Removed/### Changedsection updatedTesting
Verified locally:
check_bench_targets.py→ exit 0 on current repo (auto-reg present)check_bench_targets.pyagainst a synthetic CMakeLists.txt without auto-reg and one unregistered file → exit 1 with correct diagnosticperf_expectations_audit.py→ Check 8a PASS, Check 8b PASS, exit 0perf_expectations_audit.py --format json→"pass": true,orphaned_sources: []📚 Research & Knowledge (wenn applicable)
/docs/research/angelegt?/docs/research/implementation_influence/eingetragen?Relevante Quellen:
Checklist
[Unreleased]