diff --git a/.github/scripts/commit_prefix_check.py b/.github/scripts/commit_prefix_check.py
index fffba6d87ae..b8c14c2e3c5 100644
--- a/.github/scripts/commit_prefix_check.py
+++ b/.github/scripts/commit_prefix_check.py
@@ -62,11 +62,14 @@ def infer_prefix_from_paths(paths):
component_prefixes.add(f"{parts[1]}:")
# ----- src/ → flb_xxx.* → xxx: OR src/
/ → : -----
+ # ----- src/fluent-bit.c → bin: -----
if p.startswith("src/"):
filename = os.path.basename(p)
if filename.startswith("flb_"):
core = filename[4:].split(".")[0]
component_prefixes.add(f"{core}:")
+ elif filename == "fluent-bit.c":
+ component_prefixes.add("bin:")
else:
parts = p.split("/")
if len(parts) > 1:
diff --git a/.github/scripts/tests/test_commit_lint.py b/.github/scripts/tests/test_commit_lint.py
index 575a7f814b2..ec6b9982a03 100644
--- a/.github/scripts/tests/test_commit_lint.py
+++ b/.github/scripts/tests/test_commit_lint.py
@@ -66,6 +66,16 @@ def test_infer_multiple_prefixes():
# At least one real component touched → build is optional
assert build_optional is True
+def test_infer_prefix_fluent_bit_entrypoint():
+ """
+ Test that src/fluent-bit.c infers bin: prefix.
+
+ fluent-bit.c is the main entry point of the fluent-bit binary,
+ so commits touching this file should allow the 'bin:' prefix.
+ """
+ prefixes, build_optional = infer_prefix_from_paths(["src/fluent-bit.c"])
+ assert prefixes == {"bin:"}
+ assert build_optional is True
# -----------------------------------------------------------
# Tests: Bad Squash Detection
@@ -158,6 +168,21 @@ def test_valid_commit_multiple_signoffs_allowed():
assert ok is True
+def test_valid_commit_bin_prefix_for_fluent_bit():
+ """
+ Test that commits modifying src/fluent-bit.c allow the 'bin:' prefix.
+
+ The fluent-bit.c file represents the binary entry point, so using
+ 'bin:' as the commit prefix should be valid.
+ """
+ commit = make_commit(
+ "bin: adjust startup behavior\n\nSigned-off-by: User",
+ ["src/fluent-bit.c"]
+ )
+ ok, _ = validate_commit(commit)
+ assert ok is True
+
+
# -----------------------------------------------------------
# Tests: validate_commit ERROR CASES
# -----------------------------------------------------------