From a3891a5b88d19bd2db0f605576143dc0564c5a9f Mon Sep 17 00:00:00 2001 From: Alan Tse Date: Wed, 25 Mar 2026 11:19:06 -0700 Subject: [PATCH 1/4] build: bump versions and reduce false positives Removing perf and refactor from audit bumping. This means we have to be careful those don't change any actual apis/features requiring new hlsl files. --- .../Dynamic Cubemaps/Shaders/Features/DynamicCubemaps.ini | 4 ++-- .../Grass Collision/Shaders/Features/GrassCollision.ini | 4 ++-- features/Grass Lighting/Shaders/Features/GrassLighting.ini | 4 ++-- features/Hair Specular/Shaders/Features/HairSpecular.ini | 4 ++-- features/IBL/Shaders/Features/ImageBasedLighting.ini | 4 ++-- .../Linear Lighting/Shaders/Features/LinearLighting.ini | 4 ++-- features/Screen Space GI/Shaders/Features/ScreenSpaceGI.ini | 4 ++-- .../Shaders/Features/ScreenSpaceShadows.ini | 4 ++-- features/Sky Sync/Shaders/Features/SkySync.ini | 4 ++-- features/Skylighting/Shaders/Features/Skylighting.ini | 4 ++-- .../Terrain Blending/Shaders/Features/TerrainBlending.ini | 4 ++-- .../Terrain Shadows/Shaders/Features/TerrainShadows.ini | 4 ++-- features/Unified Water/Shaders/Features/UnifiedWater.ini | 4 ++-- features/Upscaling/Shaders/Features/Upscaling.ini | 4 ++-- features/VR/Shaders/Features/VR.ini | 4 ++-- .../Shaders/Features/VolumetricLighting.ini | 4 ++-- features/Weather Editor/Shaders/Features/WeatherEditor.ini | 4 ++-- .../Wetness Effects/Shaders/Features/WetnessEffects.ini | 4 ++-- tools/feature_version_audit.py | 6 +++--- 19 files changed, 39 insertions(+), 39 deletions(-) diff --git a/features/Dynamic Cubemaps/Shaders/Features/DynamicCubemaps.ini b/features/Dynamic Cubemaps/Shaders/Features/DynamicCubemaps.ini index fba25432c8..7e78c8c4b6 100644 --- a/features/Dynamic Cubemaps/Shaders/Features/DynamicCubemaps.ini +++ b/features/Dynamic Cubemaps/Shaders/Features/DynamicCubemaps.ini @@ -1,2 +1,2 @@ -[Info] -Version = 2-2-3 \ No newline at end of file +[Info] +Version = 2-3-0 \ No newline at end of file diff --git a/features/Grass Collision/Shaders/Features/GrassCollision.ini b/features/Grass Collision/Shaders/Features/GrassCollision.ini index 5a20fcd76d..0514cb92bf 100644 --- a/features/Grass Collision/Shaders/Features/GrassCollision.ini +++ b/features/Grass Collision/Shaders/Features/GrassCollision.ini @@ -1,2 +1,2 @@ -[Info] -Version = 3-0-2 \ No newline at end of file +[Info] +Version = 3-0-3 \ No newline at end of file diff --git a/features/Grass Lighting/Shaders/Features/GrassLighting.ini b/features/Grass Lighting/Shaders/Features/GrassLighting.ini index 1f0c0722b9..38b022aa86 100644 --- a/features/Grass Lighting/Shaders/Features/GrassLighting.ini +++ b/features/Grass Lighting/Shaders/Features/GrassLighting.ini @@ -1,2 +1,2 @@ -[Info] -Version = 2-0-0 \ No newline at end of file +[Info] +Version = 2-0-1 \ No newline at end of file diff --git a/features/Hair Specular/Shaders/Features/HairSpecular.ini b/features/Hair Specular/Shaders/Features/HairSpecular.ini index 519c4a9ce8..38f9201738 100644 --- a/features/Hair Specular/Shaders/Features/HairSpecular.ini +++ b/features/Hair Specular/Shaders/Features/HairSpecular.ini @@ -1,2 +1,2 @@ -[Info] -Version = 1-0-3 \ No newline at end of file +[Info] +Version = 1-1-0 \ No newline at end of file diff --git a/features/IBL/Shaders/Features/ImageBasedLighting.ini b/features/IBL/Shaders/Features/ImageBasedLighting.ini index 735cfd23a9..38f9201738 100644 --- a/features/IBL/Shaders/Features/ImageBasedLighting.ini +++ b/features/IBL/Shaders/Features/ImageBasedLighting.ini @@ -1,2 +1,2 @@ -[Info] -Version = 1-0-1 \ No newline at end of file +[Info] +Version = 1-1-0 \ No newline at end of file diff --git a/features/Linear Lighting/Shaders/Features/LinearLighting.ini b/features/Linear Lighting/Shaders/Features/LinearLighting.ini index 19f01444dc..38f9201738 100644 --- a/features/Linear Lighting/Shaders/Features/LinearLighting.ini +++ b/features/Linear Lighting/Shaders/Features/LinearLighting.ini @@ -1,2 +1,2 @@ -[Info] -Version = 1-0-0 \ No newline at end of file +[Info] +Version = 1-1-0 \ No newline at end of file diff --git a/features/Screen Space GI/Shaders/Features/ScreenSpaceGI.ini b/features/Screen Space GI/Shaders/Features/ScreenSpaceGI.ini index 299c8ca954..b47cc502a6 100644 --- a/features/Screen Space GI/Shaders/Features/ScreenSpaceGI.ini +++ b/features/Screen Space GI/Shaders/Features/ScreenSpaceGI.ini @@ -1,2 +1,2 @@ -[Info] -Version = 4-0-1 \ No newline at end of file +[Info] +Version = 4-1-0 \ No newline at end of file diff --git a/features/Screen-Space Shadows/Shaders/Features/ScreenSpaceShadows.ini b/features/Screen-Space Shadows/Shaders/Features/ScreenSpaceShadows.ini index 1f0c0722b9..76c57cb24f 100644 --- a/features/Screen-Space Shadows/Shaders/Features/ScreenSpaceShadows.ini +++ b/features/Screen-Space Shadows/Shaders/Features/ScreenSpaceShadows.ini @@ -1,2 +1,2 @@ -[Info] -Version = 2-0-0 \ No newline at end of file +[Info] +Version = 2-1-0 \ No newline at end of file diff --git a/features/Sky Sync/Shaders/Features/SkySync.ini b/features/Sky Sync/Shaders/Features/SkySync.ini index 19f01444dc..3039b0b786 100644 --- a/features/Sky Sync/Shaders/Features/SkySync.ini +++ b/features/Sky Sync/Shaders/Features/SkySync.ini @@ -1,2 +1,2 @@ -[Info] -Version = 1-0-0 \ No newline at end of file +[Info] +Version = 1-0-1 \ No newline at end of file diff --git a/features/Skylighting/Shaders/Features/Skylighting.ini b/features/Skylighting/Shaders/Features/Skylighting.ini index 98d5c0fac2..82b4686c15 100644 --- a/features/Skylighting/Shaders/Features/Skylighting.ini +++ b/features/Skylighting/Shaders/Features/Skylighting.ini @@ -1,2 +1,2 @@ -[Info] -Version = 1-2-3 \ No newline at end of file +[Info] +Version = 1-2-4 \ No newline at end of file diff --git a/features/Terrain Blending/Shaders/Features/TerrainBlending.ini b/features/Terrain Blending/Shaders/Features/TerrainBlending.ini index 735cfd23a9..5a3741e7c9 100644 --- a/features/Terrain Blending/Shaders/Features/TerrainBlending.ini +++ b/features/Terrain Blending/Shaders/Features/TerrainBlending.ini @@ -1,2 +1,2 @@ -[Info] -Version = 1-0-1 \ No newline at end of file +[Info] +Version = 1-0-2 \ No newline at end of file diff --git a/features/Terrain Shadows/Shaders/Features/TerrainShadows.ini b/features/Terrain Shadows/Shaders/Features/TerrainShadows.ini index 01aaedc093..38f9201738 100644 --- a/features/Terrain Shadows/Shaders/Features/TerrainShadows.ini +++ b/features/Terrain Shadows/Shaders/Features/TerrainShadows.ini @@ -1,2 +1,2 @@ -[Info] -Version = 1-0-2 \ No newline at end of file +[Info] +Version = 1-1-0 \ No newline at end of file diff --git a/features/Unified Water/Shaders/Features/UnifiedWater.ini b/features/Unified Water/Shaders/Features/UnifiedWater.ini index 19f01444dc..3039b0b786 100644 --- a/features/Unified Water/Shaders/Features/UnifiedWater.ini +++ b/features/Unified Water/Shaders/Features/UnifiedWater.ini @@ -1,2 +1,2 @@ -[Info] -Version = 1-0-0 \ No newline at end of file +[Info] +Version = 1-0-1 \ No newline at end of file diff --git a/features/Upscaling/Shaders/Features/Upscaling.ini b/features/Upscaling/Shaders/Features/Upscaling.ini index 7c4d5a2a34..8dc1735318 100644 --- a/features/Upscaling/Shaders/Features/Upscaling.ini +++ b/features/Upscaling/Shaders/Features/Upscaling.ini @@ -1,2 +1,2 @@ -[Info] -Version = 1-2-0 \ No newline at end of file +[Info] +Version = 1-3-0 \ No newline at end of file diff --git a/features/VR/Shaders/Features/VR.ini b/features/VR/Shaders/Features/VR.ini index 735cfd23a9..38f9201738 100644 --- a/features/VR/Shaders/Features/VR.ini +++ b/features/VR/Shaders/Features/VR.ini @@ -1,2 +1,2 @@ -[Info] -Version = 1-0-1 \ No newline at end of file +[Info] +Version = 1-1-0 \ No newline at end of file diff --git a/features/Volumetric Lighting/Shaders/Features/VolumetricLighting.ini b/features/Volumetric Lighting/Shaders/Features/VolumetricLighting.ini index 19f01444dc..38f9201738 100644 --- a/features/Volumetric Lighting/Shaders/Features/VolumetricLighting.ini +++ b/features/Volumetric Lighting/Shaders/Features/VolumetricLighting.ini @@ -1,2 +1,2 @@ -[Info] -Version = 1-0-0 \ No newline at end of file +[Info] +Version = 1-1-0 \ No newline at end of file diff --git a/features/Weather Editor/Shaders/Features/WeatherEditor.ini b/features/Weather Editor/Shaders/Features/WeatherEditor.ini index 19f01444dc..38f9201738 100644 --- a/features/Weather Editor/Shaders/Features/WeatherEditor.ini +++ b/features/Weather Editor/Shaders/Features/WeatherEditor.ini @@ -1,2 +1,2 @@ -[Info] -Version = 1-0-0 \ No newline at end of file +[Info] +Version = 1-1-0 \ No newline at end of file diff --git a/features/Wetness Effects/Shaders/Features/WetnessEffects.ini b/features/Wetness Effects/Shaders/Features/WetnessEffects.ini index 67116d2605..67e8ddf6d2 100644 --- a/features/Wetness Effects/Shaders/Features/WetnessEffects.ini +++ b/features/Wetness Effects/Shaders/Features/WetnessEffects.ini @@ -1,2 +1,2 @@ -[Info] -Version = 3-0-0 \ No newline at end of file +[Info] +Version = 3-1-0 \ No newline at end of file diff --git a/tools/feature_version_audit.py b/tools/feature_version_audit.py index 5a8b3d91ca..4b77995600 100644 --- a/tools/feature_version_audit.py +++ b/tools/feature_version_audit.py @@ -40,7 +40,7 @@ RE_COMMIT_REFACTOR = re.compile(r"^refactor(\(|:|\s)", re.IGNORECASE) RE_COMMIT_PERF = re.compile(r"^perf(\(|:|\s)", re.IGNORECASE) RE_COMMIT_BREAKING = re.compile(r"!\s*:|BREAKING CHANGE:", re.IGNORECASE) -RE_COMMIT_NONFUNCTIONAL = re.compile(r"^(chore|docs|style|ci|test|build)(\(|:|\s)", re.IGNORECASE) +RE_COMMIT_NONFUNCTIONAL = re.compile(r"^(chore|docs|style|ci|test|build|refactor|perf)(\(|:|\s)", re.IGNORECASE) # ===================== # End Configuration @@ -128,7 +128,7 @@ def get_bump_commit(file_path, base_ref): if len(parts) < 2: continue commit_hash, msg = parts - if RE_COMMIT_FEAT.match(msg) or RE_COMMIT_FIX.match(msg) or RE_COMMIT_REFACTOR.match(msg) or RE_COMMIT_PERF.match(msg) or RE_COMMIT_BREAKING.search(msg): + if RE_COMMIT_FEAT.match(msg) or RE_COMMIT_FIX.match(msg) or RE_COMMIT_BREAKING.search(msg): return commit_hash except Exception: pass @@ -272,7 +272,7 @@ def propose_new_version(prior_version, commits): return None is_minor = any(RE_COMMIT_FEAT.match(c) or RE_COMMIT_BREAKING.search(c) for c in commits) - is_patch = any(RE_COMMIT_FIX.match(c) or RE_COMMIT_REFACTOR.match(c) or RE_COMMIT_PERF.match(c) for c in commits) + is_patch = any(RE_COMMIT_FIX.match(c) for c in commits) is_nonfunctional_only = all(RE_COMMIT_NONFUNCTIONAL.match(c) for c in commits) if is_minor: From 9b93b285393112ed88bd410fbf113c7c1bfffb28 Mon Sep 17 00:00:00 2001 From: Alan Tse Date: Wed, 25 Mar 2026 14:24:22 -0700 Subject: [PATCH 2/4] chore: address ai comments --- tools/feature_version_audit.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/feature_version_audit.py b/tools/feature_version_audit.py index 4b77995600..e60afe87a4 100644 --- a/tools/feature_version_audit.py +++ b/tools/feature_version_audit.py @@ -123,13 +123,17 @@ def get_bump_commit(file_path, base_ref): ["git", "log", f"{base_ref}..HEAD", "--pretty=%H %s", "--", file_path], stderr=subprocess.DEVNULL, ).decode("utf-8") + fallback_commit = None for line in output.splitlines(): parts = line.split(" ", 1) if len(parts) < 2: continue commit_hash, msg = parts + if fallback_commit is None: + fallback_commit = commit_hash if RE_COMMIT_FEAT.match(msg) or RE_COMMIT_FIX.match(msg) or RE_COMMIT_BREAKING.search(msg): return commit_hash + return fallback_commit except Exception: pass return None From 9c64fea3332e2cb58cec8b0286a412df74429068 Mon Sep 17 00:00:00 2001 From: Alan Tse Date: Wed, 25 Mar 2026 14:36:22 -0700 Subject: [PATCH 3/4] chore: more ai comments --- tools/feature_version_audit.py | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/tools/feature_version_audit.py b/tools/feature_version_audit.py index e60afe87a4..29bfd8afa5 100644 --- a/tools/feature_version_audit.py +++ b/tools/feature_version_audit.py @@ -123,17 +123,24 @@ def get_bump_commit(file_path, base_ref): ["git", "log", f"{base_ref}..HEAD", "--pretty=%H %s", "--", file_path], stderr=subprocess.DEVNULL, ).decode("utf-8") - fallback_commit = None for line in output.splitlines(): parts = line.split(" ", 1) if len(parts) < 2: continue commit_hash, msg = parts - if fallback_commit is None: - fallback_commit = commit_hash if RE_COMMIT_FEAT.match(msg) or RE_COMMIT_FIX.match(msg) or RE_COMMIT_BREAKING.search(msg): return commit_hash - return fallback_commit + except Exception: + pass + return None + +def get_latest_commit(file_path, base_ref): + try: + output = subprocess.check_output( + ["git", "log", f"{base_ref}..HEAD", "-1", "--pretty=%H", "--", file_path], + stderr=subprocess.DEVNULL, + ).decode("utf-8").strip() + return output or None except Exception: pass return None @@ -379,6 +386,7 @@ def get_feature_key(feature_dir, feature_meta_map): all_commits = [] bump_commit = None bump_author = None + any_commit = None for status, f in changes: commits = get_commits_for_file(f, base_ref) all_commits.extend(commits) @@ -386,6 +394,11 @@ def get_feature_key(feature_dir, feature_meta_map): bump_commit = get_bump_commit(f, base_ref) if bump_commit: bump_author = get_commit_author(bump_commit) + if not any_commit: + any_commit = get_latest_commit(f, base_ref) + if not bump_commit and any_commit: + bump_commit = any_commit + bump_author = get_commit_author(any_commit) proposed_ver = propose_new_version(prior_ver, all_commits) if ini_path else None needs_bump = (proposed_ver is not None and new_ver is not None and proposed_ver > new_ver) From 43b2c074b6c4e597422d32d7389f9fd6c957ea86 Mon Sep 17 00:00:00 2001 From: Alan Tse Date: Wed, 25 Mar 2026 14:58:12 -0700 Subject: [PATCH 4/4] chore: handle more ai comments --- tools/feature_version_audit.py | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/tools/feature_version_audit.py b/tools/feature_version_audit.py index 29bfd8afa5..feca06dfd6 100644 --- a/tools/feature_version_audit.py +++ b/tools/feature_version_audit.py @@ -110,34 +110,36 @@ def get_changed_files(feature_path, base_ref, file_types=None): def get_commits_for_file(file_path, base_ref): try: output = subprocess.check_output( - ["git", "log", f"{base_ref}..HEAD", "--pretty=%s", "--", file_path], + ["git", "log", f"{base_ref}..HEAD", "--pretty=%B%x1e", "--", file_path], stderr=subprocess.DEVNULL, ).decode("utf-8") - return [line.strip() for line in output.splitlines() if line.strip()] + return [msg.strip() for msg in output.split("\x1e") if msg.strip()] except Exception: return [] def get_bump_commit(file_path, base_ref): try: output = subprocess.check_output( - ["git", "log", f"{base_ref}..HEAD", "--pretty=%H %s", "--", file_path], + ["git", "log", f"{base_ref}..HEAD", "--pretty=%H%x1f%B%x1e", "--", file_path], stderr=subprocess.DEVNULL, ).decode("utf-8") - for line in output.splitlines(): - parts = line.split(" ", 1) + for entry in output.split("\x1e"): + if not entry.strip(): + continue + parts = entry.strip().split("\x1f", 1) if len(parts) < 2: continue commit_hash, msg = parts if RE_COMMIT_FEAT.match(msg) or RE_COMMIT_FIX.match(msg) or RE_COMMIT_BREAKING.search(msg): - return commit_hash + return commit_hash.strip() except Exception: pass return None -def get_latest_commit(file_path, base_ref): +def get_latest_commit(file_paths, base_ref): try: output = subprocess.check_output( - ["git", "log", f"{base_ref}..HEAD", "-1", "--pretty=%H", "--", file_path], + ["git", "log", f"{base_ref}..HEAD", "-1", "--pretty=%H", "--", *sorted(file_paths)], stderr=subprocess.DEVNULL, ).decode("utf-8").strip() return output or None @@ -386,19 +388,17 @@ def get_feature_key(feature_dir, feature_meta_map): all_commits = [] bump_commit = None bump_author = None - any_commit = None for status, f in changes: - commits = get_commits_for_file(f, base_ref) - all_commits.extend(commits) + all_commits.extend(get_commits_for_file(f, base_ref)) if not bump_commit: bump_commit = get_bump_commit(f, base_ref) if bump_commit: bump_author = get_commit_author(bump_commit) - if not any_commit: - any_commit = get_latest_commit(f, base_ref) - if not bump_commit and any_commit: - bump_commit = any_commit - bump_author = get_commit_author(any_commit) + if not bump_commit and changes: + any_commit = get_latest_commit([f for _, f in changes], base_ref) + if any_commit: + bump_commit = any_commit + bump_author = get_commit_author(any_commit) proposed_ver = propose_new_version(prior_ver, all_commits) if ini_path else None needs_bump = (proposed_ver is not None and new_ver is not None and proposed_ver > new_ver)