Skip to content

Accept empty and inconsequential configurations#437

Merged
Anilm3 merged 3 commits into
masterfrom
anilm3/inconsequential-configs
Aug 1, 2025
Merged

Accept empty and inconsequential configurations#437
Anilm3 merged 3 commits into
masterfrom
anilm3/inconsequential-configs

Conversation

@Anilm3

@Anilm3 Anilm3 commented Jul 31, 2025

Copy link
Copy Markdown
Collaborator

This PR modifies the behaviour of the builder to allow configurations which have no side-effects, i.e. inconsequential configurations. These are configurations which have no errors but also no loadable items, for example, a configuration may contain rules with a max_version below the current one, therefore it's perfectly valid but nothing will be loaded. Similarly, a configuration may be entirely empty or contain only empty sections.

While these configs don't provide any value, they also cause no harm, therefore they are now accepted instead of rejected.

In addition, this PR also removes the null_ruleset_info and base_ruleset_info classes as production deployments will always require diagnostics.

@codecov-commenter

codecov-commenter commented Jul 31, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 86.66667% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.45%. Comparing base (7fe72a0) to head (caeb1d2).
⚠️ Report is 40 commits behind head on master.

Files with missing lines Patch % Lines
src/ruleset_info.hpp 82.60% 1 Missing and 7 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #437      +/-   ##
==========================================
+ Coverage   85.30%   85.45%   +0.15%     
==========================================
  Files         176      176              
  Lines        9031     9029       -2     
  Branches     3968     3966       -2     
==========================================
+ Hits         7704     7716      +12     
+ Misses        512      511       -1     
+ Partials      815      802      -13     
Flag Coverage Δ
waf_test 85.45% <86.66%> (+0.15%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions

github-actions Bot commented Jul 31, 2025

Copy link
Copy Markdown

Artifact Size Comparison 📦

Artifact Previous Release This PR Difference
darwin-arm64::libddwaf.a 83315344 84957448 0.01%
darwin-arm64::libddwaf.a.stripped 4352184 4387176 0.00%
darwin-arm64::libddwaf.dylib 1919536 1920000 0.00%
darwin-universal::libddwaf.a 167911160 171220528 0.01%
darwin-universal::libddwaf.a.stripped 9268592 9344896 0.00%
darwin-universal::libddwaf.dylib 4033072 4033536 0.00%
darwin-x86_64::libddwaf.a 84595768 86263032 0.01%
darwin-x86_64::libddwaf.a.stripped 4916360 4957672 0.00%
darwin-x86_64::libddwaf.dylib 2091048 2090256 0.00%
linux-aarch64::libddwaf.a 68876962 70069396 0.01%
linux-aarch64::libddwaf.a.stripped 11720766 11478792 -0.02%
linux-aarch64::libddwaf.so 2429048 2424776 0.00%
linux-armv7::libddwaf.a 60213732 61897284 0.02%
linux-armv7::libddwaf.a.stripped 10612116 10482736 -0.01%
linux-armv7::libddwaf.so 2103320 2105932 0.00%
linux-i386::libddwaf.a 58414994 60105214 0.02%
linux-i386::libddwaf.a.stripped 9009642 9063214 0.00%
linux-i386::libddwaf.so 2302460 2343948 0.01%
linux-x86_64::libddwaf.a 68977050 70532060 0.02%
linux-x86_64::libddwaf.a.stripped 11389686 11299048 0.00%
linux-x86_64::libddwaf.so 2602216 2613584 0.00%
windows-win32::ddwaf.dll 3292160 3295744 0.00%
windows-win32::ddwaf.lib 11684 11922 0.02%
windows-win32::ddwaf_static.lib 46934870 47211042 0.00%
windows-x64::ddwaf.dll 4021248 4025856 0.00%
windows-x64::ddwaf.lib 11464 11698 0.02%
windows-x64::ddwaf_static.lib 54410908 54784218 0.00%
windows-x86_64::libddwaf.a 6204034 6192728 0.00%
windows-x86_64::libddwaf.dll 18785618 18786012 0.00%
windows-x86_64::libddwaf.dll.a 31292 31948 0.02%

@Anilm3
Anilm3 force-pushed the anilm3/inconsequential-configs branch from ed63375 to 4f1c69a Compare August 1, 2025 09:16
@pr-commenter

pr-commenter Bot commented Aug 1, 2025

Copy link
Copy Markdown

Benchmarks clang

Benchmark execution time: 2025-08-01 11:26:55

Comparing candidate commit caeb1d2 in PR branch anilm3/inconsequential-configs with baseline commit 7fe72a0 in branch master.

Found 1 performance improvements and 0 performance regressions! Performance is the same for 0 metrics, 0 unstable metrics.

scenario:global-benchmark.random.clang

  • 🟩 execution_time [-37.594ms; -37.574ms] or [-13.300%; -13.293%]

@pr-commenter

pr-commenter Bot commented Aug 1, 2025

Copy link
Copy Markdown

Benchmarks gcc

Benchmark execution time: 2025-08-01 11:28:28

Comparing candidate commit caeb1d2 in PR branch anilm3/inconsequential-configs with baseline commit 7fe72a0 in branch master.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 1 metrics, 0 unstable metrics.

@Anilm3
Anilm3 force-pushed the anilm3/inconsequential-configs branch from 4f1c69a to 6b6913a Compare August 1, 2025 09:40
@pr-commenter

pr-commenter Bot commented Aug 1, 2025

Copy link
Copy Markdown

Benchmarks clang-pgo

Benchmark execution time: 2025-08-01 10:16:03

Comparing candidate commit 6b6913a in PR branch anilm3/inconsequential-configs with baseline commit 7fe72a0 in branch master.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 1 metrics, 0 unstable metrics.

@Anilm3
Anilm3 marked this pull request as ready for review August 1, 2025 10:25
@Anilm3
Anilm3 requested a review from a team as a code owner August 1, 2025 10:25
Comment thread src/configuration/configuration_manager.hpp
Comment thread src/ruleset_info.hpp Outdated
@Anilm3
Anilm3 enabled auto-merge (squash) August 1, 2025 11:05
@Anilm3
Anilm3 merged commit 3911a64 into master Aug 1, 2025
55 of 56 checks passed
@Anilm3
Anilm3 deleted the anilm3/inconsequential-configs branch August 1, 2025 11:31
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.

3 participants