Skip to content

Commit 104b365

Browse files
Jonathan D.A. Jewellclaude
andcommitted
fix: skip third-party paths (winget-pkgs, HOL) in dispatch-runner
Adds THIRD_PARTY_PATHS exclusion list so fix scripts never modify code that isn't ours (Microsoft winget-pkgs, HOL Theorem Prover, etc.). Also adds shared lib/third-party-excludes.sh for fix scripts to source. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent b7da1d7 commit 104b365

2 files changed

Lines changed: 43 additions & 0 deletions

File tree

scripts/dispatch-runner.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,14 @@ REPOS_BASE="${REPOS_BASE:-/var/mnt/eclipse/repos}"
5757
FLEET_SCRIPTS="${FLEET_SCRIPTS:-/var/mnt/eclipse/repos/gitbot-fleet/scripts}"
5858
RRA_BIN="${RRA_BIN:-/var/mnt/eclipse/repos/gitbot-fleet/robot-repo-automaton/target/release/robot-repo-automaton}"
5959

60+
# Third-party subdirectories inside monorepos that must NOT be modified.
61+
# Fix scripts will skip these paths entirely.
62+
THIRD_PARTY_PATHS=(
63+
"developer-ecosystem/package-publishers/winget-pkgs"
64+
"developer-ecosystem/package-publishers/macports-ports"
65+
"echidna/HOL"
66+
)
67+
6068
# Try hypatia's data first, then fall back to central verisimdb-data
6169
if [[ -f "${HYPATIA_DATA}/dispatch/pending.jsonl" ]]; then
6270
MANIFEST_PATH="${HYPATIA_DATA}/dispatch/pending.jsonl"
@@ -193,6 +201,16 @@ execute_entry() {
193201
return
194202
fi
195203

204+
# Skip third-party paths that must not be modified
205+
local rel_repo_path="${repo_path#"$REPOS_BASE"/}"
206+
for tp in "${THIRD_PARTY_PATHS[@]}"; do
207+
if [[ "$rel_repo_path" == "$tp" || "$rel_repo_path" == "$tp/"* ]]; then
208+
echo " SKIP: $repo (third-party path: $tp)"
209+
((SKIPPED++)) || true
210+
return
211+
fi
212+
done
213+
196214
# Skip if repo doesn't exist locally
197215
if [[ ! -d "$repo_path" ]]; then
198216
echo " SKIP: $repo (not found at $repo_path)"
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/usr/bin/env bash
2+
# SPDX-License-Identifier: PMPL-1.0-or-later
3+
#
4+
# third-party-excludes.sh — Shared exclusion list for fix scripts
5+
#
6+
# Source this to get FIND_THIRD_PARTY_EXCLUDES for use with find commands.
7+
# These are directories containing third-party code that must not be modified.
8+
9+
# Third-party / vendored directories to always skip
10+
THIRD_PARTY_SKIP_DIRS=(
11+
.git target node_modules _build .lake deps
12+
vendor dist build __pycache__ .tox .mypy_cache
13+
winget-pkgs
14+
macports-ports
15+
compiler-source
16+
HOL
17+
.elixir_ls .hex .mix
18+
coverage .cache .parcel-cache
19+
)
20+
21+
# Build find -not -path exclusions
22+
FIND_THIRD_PARTY_EXCLUDES=()
23+
for d in "${THIRD_PARTY_SKIP_DIRS[@]}"; do
24+
FIND_THIRD_PARTY_EXCLUDES+=(-not -path "*/${d}/*")
25+
done

0 commit comments

Comments
 (0)