Skip to content

Commit 0705dae

Browse files
committed
feat: mirror the pkl seeding step in run_local.sh's committed-baseline path
Keeps the local harness faithful to action.yml (its stated purpose) — the committed-baseline branch had the same bug: no pkl, so the head run always fell back to a full analysis.
1 parent 8a8c454 commit 0705dae

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

scripts/run_local.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,21 @@ else
9090
echo "== Resolving base analysis at $BASE_REF =="
9191
if git -C "$REPO" show "$BASE_REF:.codeboarding/analysis.json" > "$BASE_DIR/analysis.json" 2>/dev/null; then
9292
echo " using committed baseline"
93+
# Mirror action.yml: a committed analysis.json alone can't drive incremental —
94+
# the engine needs the base static_analysis.pkl with its cluster baseline.
95+
# Seed it deterministically (LSP + clustering, no LLM); fail-open on error.
96+
BASE_SRC="$OUT/base-src"
97+
git -C "$REPO" worktree remove --force "$BASE_SRC" 2>/dev/null || true
98+
git -C "$REPO" worktree prune
99+
rm -rf "$BASE_SRC"
100+
git -C "$REPO" worktree add --detach "$BASE_SRC" "$BASE_REF" >/dev/null
101+
if run_engine seed --repo "$BASE_SRC" --out "$BASE_DIR" --source-sha "$BASE_REF"; then
102+
echo " seeded static-analysis baseline (no LLM)"
103+
else
104+
rm -f "$BASE_DIR/static_analysis.pkl" "$BASE_DIR/static_analysis.sha"
105+
echo " WARNING: seeding failed; head will fall back to a full run" >&2
106+
fi
107+
git -C "$REPO" worktree remove --force "$BASE_SRC" >/dev/null 2>&1 || true
93108
else
94109
rm -f "$BASE_DIR/analysis.json"
95110
echo " no committed baseline; running FULL analysis on base (LLM)..."

0 commit comments

Comments
 (0)