fix: add architect-bot to FORGE_BOT_USERNAMES default and fix duplicate detection exclusion

This commit is contained in:
Agent 2026-04-01 10:12:12 +00:00
parent bd20ac89b9
commit 8484fb04a3
2 changed files with 19 additions and 11 deletions

View file

@ -180,11 +180,15 @@ def collect_findings(root):
""" """
root = Path(root) root = Path(root)
# Skip architect scripts for duplicate detection (stub formulas, see #99) # Skip architect scripts for duplicate detection (stub formulas, see #99)
EXCLUDED_FILES = {"architect/architect-run.sh"} EXCLUDED_SUFFIXES = ("architect/architect-run.sh",)
sh_files = sorted(
p for p in root.rglob("*.sh") def is_excluded(p):
if ".git" not in p.parts and str(p) not in EXCLUDED_FILES """Check if path should be excluded by suffix match."""
) return p.suffix == ".sh" and ".git" not in p.parts and any(
str(p).endswith(suffix) for suffix in EXCLUDED_SUFFIXES
)
sh_files = sorted(p for p in root.rglob("*.sh") if not is_excluded(p))
ap_hits = check_anti_patterns(sh_files) ap_hits = check_anti_patterns(sh_files)
dup_groups = check_duplicates(sh_files) dup_groups = check_duplicates(sh_files)
@ -242,11 +246,15 @@ def print_duplicates(groups, label=""):
def main() -> int: def main() -> int:
# Skip architect scripts for duplicate detection (stub formulas, see #99) # Skip architect scripts for duplicate detection (stub formulas, see #99)
EXCLUDED_FILES = {"architect/architect-run.sh"} EXCLUDED_SUFFIXES = ("architect/architect-run.sh",)
sh_files = sorted(
p for p in Path(".").rglob("*.sh") def is_excluded(p):
if ".git" not in p.parts and str(p) not in EXCLUDED_FILES """Check if path should be excluded by suffix match."""
) return p.suffix == ".sh" and ".git" not in p.parts and any(
str(p).endswith(suffix) for suffix in EXCLUDED_SUFFIXES
)
sh_files = sorted(p for p in Path(".").rglob("*.sh") if not is_excluded(p))
if not sh_files: if not sh_files:
print("No .sh files found.") print("No .sh files found.")

View file

@ -98,7 +98,7 @@ export FORGE_PREDICTOR_TOKEN="${FORGE_PREDICTOR_TOKEN:-${FORGE_TOKEN}}"
export FORGE_ARCHITECT_TOKEN="${FORGE_ARCHITECT_TOKEN:-${FORGE_TOKEN}}" export FORGE_ARCHITECT_TOKEN="${FORGE_ARCHITECT_TOKEN:-${FORGE_TOKEN}}"
# Bot usernames filter: FORGE_BOT_USERNAMES > legacy CODEBERG_BOT_USERNAMES # Bot usernames filter: FORGE_BOT_USERNAMES > legacy CODEBERG_BOT_USERNAMES
export FORGE_BOT_USERNAMES="${FORGE_BOT_USERNAMES:-${CODEBERG_BOT_USERNAMES:-dev-bot,review-bot,planner-bot,gardener-bot,vault-bot,supervisor-bot,predictor-bot}}" export FORGE_BOT_USERNAMES="${FORGE_BOT_USERNAMES:-${CODEBERG_BOT_USERNAMES:-dev-bot,review-bot,planner-bot,gardener-bot,vault-bot,supervisor-bot,predictor-bot,architect-bot}}"
export CODEBERG_BOT_USERNAMES="${FORGE_BOT_USERNAMES}" # backwards compat export CODEBERG_BOT_USERNAMES="${FORGE_BOT_USERNAMES}" # backwards compat
# Project config (FORGE_* preferred, CODEBERG_* fallback) # Project config (FORGE_* preferred, CODEBERG_* fallback)