From 13ab95e18ae5bf8517e92082394fd818f3369384 Mon Sep 17 00:00:00 2001 From: allaun Date: Mon, 22 Jun 2026 21:22:14 -0500 Subject: [PATCH] =?UTF-8?q?feat(infra):=20lbi=20wrapper=20=E2=80=94=20lake?= =?UTF-8?q?=20build=20+=20ENE=20ingest=20in=20one=20call?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Usage: lbi # full build + ingest lbi Compiler # compiler surface + ingest lbi Semantics.GraphRank # narrow target + ingest Keeps databases in sync during development, not just on commit. Add to shell: alias lb='lbi' --- 4-Infrastructure/shim/lbi.sh | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100755 4-Infrastructure/shim/lbi.sh diff --git a/4-Infrastructure/shim/lbi.sh b/4-Infrastructure/shim/lbi.sh new file mode 100755 index 00000000..41160056 --- /dev/null +++ b/4-Infrastructure/shim/lbi.sh @@ -0,0 +1,35 @@ +#!/bin/bash +# lbi — Lake Build + Ingest wrapper +# Runs `lake build` and ingests results into ENE on neon-64gb. +# Use this instead of bare `lake build` to keep databases in sync. +# +# Usage: +# lbi # full build + ingest +# lbi Compiler # compiler surface + ingest +# lbi Semantics.GraphRank # narrow target + ingest +# +# Aliases (add to .bashrc / .zshrc): +# alias lake-build='lbi' +# alias lb='lbi' + +set -euo pipefail + +LEAN_DIR="${LEAN_DIR:-/home/allaun/Research Stack/0-Core-Formalism/lean/Semantics}" +INGEST_SCRIPT="/home/allaun/Research Stack/4-Infrastructure/shim/lake_build_ingest.py" +TARGET="${1:-}" +ACTOR="${2:-opencode}" + +# Run lake build +echo "▸ lake build ${TARGET:-}" +cd "$LEAN_DIR" || exit 1 +lake build $TARGET 2>&1 +BUILD_EXIT=$? + +if [ $BUILD_EXIT -ne 0 ]; then + echo "✗ lake build failed (exit $BUILD_EXIT), skipping ingest" + exit $BUILD_EXIT +fi + +echo "▸ ingesting into ENE..." +python3 "$INGEST_SCRIPT" ${TARGET:+$TARGET} --actor "$ACTOR" 2>&1 || true +echo "✓ done"