Skip to content

Commit 37b4dbb

Browse files
committed
tooling: beagle-callgraph RENTS chartroom callgraph.clj; delete the duplicated engine
The scope-correct call-graph engine was copy-pasted in beagle/bin/_beagle-callgraph.clj AND chartroom. It now lives once in chartroom/src/callgraph.clj; beagle rents it: - bin/beagle-callgraph: exec bb -cp $FRAM_OUT:$CHARTROOM/src -m callgraph (CHARTROOM env, defaults ~/code/chartroom; fails closed if the engine is missing). - DELETE bin/_beagle-callgraph.clj (the duplicate). - CI: the cascade-graph gate passes CHARTROOM=$GITHUB_WORKSPACE/.chartroom (already checked out). The code-as-claims engine (Layer 2) lives in chartroom; beagle/bin tooling is Layer-3 consumer glue that rents it. Verified: cascade-graph gate green renting the engine (incl. a relocated CHARTROOM; bogus CHARTROOM fails fast).
1 parent 69b1ef4 commit 37b4dbb

3 files changed

Lines changed: 13 additions & 134 deletions

File tree

.github/workflows/test.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,11 @@ jobs:
6969
repository: tompassarelli/chartroom
7070
path: .chartroom
7171

72+
# beagle-callgraph RENTS chartroom's scope-correct call-graph engine
73+
# (src/callgraph.clj) — the Layer-2 engine lives in chartroom, beagle's tooling
74+
# rents it, so CHARTROOM must point at the checked-out copy.
7275
- name: Graph-native cascade — scope-correctness gate
73-
run: FRAM_OUT="$GITHUB_WORKSPACE/.fram/out" bin/test/cascade-graph/run.sh
76+
run: FRAM_OUT="$GITHUB_WORKSPACE/.fram/out" CHARTROOM="$GITHUB_WORKSPACE/.chartroom" bin/test/cascade-graph/run.sh
7477

7578
# Repair pipeline: beagle-repair consumes blame.rkt's semantic suspicions as
7679
# STRUCTURED records, not by regex-scraping the prose SUSPECT line. Gates that

bin/_beagle-callgraph.clj

Lines changed: 0 additions & 132 deletions
This file was deleted.

bin/beagle-callgraph

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,23 @@ fi
2525
DIR="$(cd "$1" && pwd)"
2626
BIN="$(cd "$(dirname "$0")" && pwd)"
2727
FRAM_OUT="${FRAM_OUT:-$HOME/code/fram/out}"
28+
# The scope-correct call-graph ENGINE is Layer 2 and lives in chartroom (callgraph.clj);
29+
# beagle's tooling RENTS it — one engine, no duplicated copy. Override with CHARTROOM.
30+
CHARTROOM="${CHARTROOM:-$HOME/code/chartroom}"
2831

2932
if [[ ! -d "$FRAM_OUT" ]]; then
3033
echo "beagle-callgraph: Fram classpath not found at $FRAM_OUT" >&2
3134
echo " (graph-native repair runs on the Fram engine — build fram/out or set FRAM_OUT)" >&2
3235
exit 3
3336
fi
37+
if [[ ! -f "$CHARTROOM/src/callgraph.clj" ]]; then
38+
echo "beagle-callgraph: Layer-2 call-graph engine not found at $CHARTROOM/src/callgraph.clj" >&2
39+
echo " (the engine lives in chartroom; check it out or set CHARTROOM)" >&2
40+
exit 3
41+
fi
3442

3543
CLAIMS="$(mktemp /tmp/beagle-callgraph.XXXXXX)"
3644
trap 'rm -f "$CLAIMS"' EXIT
3745

3846
"$BIN/beagle-claims" "$DIR" > "$CLAIMS"
39-
exec bb -cp "$FRAM_OUT" "$BIN/_beagle-callgraph.clj" "$CLAIMS"
47+
exec bb -cp "$FRAM_OUT:$CHARTROOM/src" -m callgraph "$CLAIMS"

0 commit comments

Comments
 (0)