Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/aien-architecture-mv/blob/main/scripts/test_rebase_crumb.sh # aien-architecture-mv Canonical architecture for the AIEN ecosystem: flows, boundaries, ADRs, and the map from design to implementation repositories. Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `aien-architecture-mv / scripts / test_rebase_crumb.sh` 186 lines ยท 11041 bytes Raw Blame History 1 #!/usr/bin/env bash 2 # Offline test for rebase-crumb.sh. Real temporary git repos (a bare "origin" plus a worktree whose 3 # origin URL looks like an aien-dev URL, redirected to the bare repo with insteadOf). Crumb compile and 4 # verify are retired (DRA-97): a `crumb` stub that exits 99 is on PATH and in $CRUMB, and the test 5 # proves it is never called and no crumb commit is added. No network, no auth. 6 set -u 7 here="$(cd "$(dirname "$0")" && pwd)" 8 script="$here/rebase-crumb.sh" 9 tmp="$(mktemp -d)"; trap 'rm -rf "$tmp"' EXIT 10 export GIT_AUTHOR_NAME=T GIT_AUTHOR_EMAIL=t@example.invalid GIT_COMMITTER_NAME=T GIT_COMMITTER_EMAIL=t@example.invalid 11 export GIT_CONFIG_GLOBAL=/dev/null GIT_CONFIG_SYSTEM=/dev/null 12 FAKEURL="https://github.com/aien-dev/fake-repo" 13 14 mkdir -p "$tmp/bin" 15 cat > "$tmp/bin/crumb" <> "$tmp/crumb-called" 19 exit 99 20 S 21 chmod +x "$tmp/bin/crumb" 22 export PATH="$tmp/bin:$PATH" CRUMB="$tmp/bin/crumb" 23 RETIRED="crumb: retired (DRA-97), conflicting .crumb files keep main's copy; no compile, verify or crumb commit" 24 nocrumbcommit() { test "$(git -C "$1" log --format=%s origin/main..HEAD | grep -c '^crumb compile (after rebase onto main)$')" = 0; } 25 26 pass=0; bad=0 27 ok() { pass=$((pass+1)); } 28 no() { bad=$((bad+1)); echo "TEST FAIL: $1"; } 29 expect() { # expect