From d47aaa921e6ea05bf3c06e39eef7728a2ed1f256 Mon Sep 17 00:00:00 2001 From: Chemaclass Date: Mon, 10 Aug 2026 21:07:36 +0200 Subject: [PATCH] test(build): raise the standalone size guard to 550 KiB The 500 KiB budget landed in #990 with the binary at 485 KiB. Eight feature PRs since (#1033-#1042) grew it to 513 KiB, so Build Verification has been red on main since #1037. The guard exists to catch accidental bloat, not to cap planned growth, so re-baseline it to 550 KiB (~9% headroom) and document when to move it again. --- tests/unit/project/build_test.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/unit/project/build_test.sh b/tests/unit/project/build_test.sh index 0ebaacc9..f2491c76 100644 --- a/tests/unit/project/build_test.sh +++ b/tests/unit/project/build_test.sh @@ -321,7 +321,10 @@ function test_built_binary_contains_no_source_lines() { assert_equals "0" "$(grep -c '^source ' "$build_dir/bashunit")" } -function test_built_binary_stays_below_500_kib() { +# A ceiling on accidental bloat (a stray embed, a disabled comment strip), not a +# cap on the project: features legitimately grow the distributable. Re-baseline +# deliberately when planned growth reaches it, keeping ~10% headroom. +function test_built_binary_stays_below_550_kib() { if ! build_optimizer_is_available; then bashunit::skip "shfmt and jq are required for standalone optimization" return @@ -334,7 +337,7 @@ function test_built_binary_stays_below_500_kib() { local bytes bytes=$(wc -c <"$build_dir/bashunit" | tr -d ' ') - assert_less_or_equal_than 512000 "$bytes" + assert_less_or_equal_than 563200 "$bytes" } function test_build_assert_valid_syntax_rejects_broken_file() {