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_check_candidate.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_check_candidate.sh` 147 lines ยท 11013 bytes Raw Blame History 1 #!/usr/bin/env bash 2 # Test for tools/candidate/check_candidate.om. Offline: sha existence is stubbed (CAND_SHA_CHECK) and, 3 # for the real gh code path, a fake `gh` on PATH. No network or auth needed. The checker is compiled 4 # here with the pinned seeded compiler named by AIEN_OMC (exit 3 = NOT_RUN without it); the mutants 5 # below are sed edits of the .om source, recompiled, each proving one check bites. 6 set -u 7 here="$(cd "$(dirname "$0")" && pwd)" 8 src="$here/../tools/candidate/check_candidate.om" 9 omc="${AIEN_OMC:-}" 10 [ -n "$omc" ] && [ -x "$omc" ] || { echo "test_check_candidate: AIEN_OMC is not an executable omc (NOT_RUN)" >&2; exit 3; } 11 tmp="$(mktemp -d)"; trap 'rm -rf "$tmp"' EXIT 12 chk="$tmp/check_candidate" 13 "$omc" < "$src" > "$chk" && chmod +x "$chk" || { echo "TEST FAIL: $src does not compile with $omc"; exit 1; } 14 stub="$tmp/stub.sh" 15 cat > "$stub" <<'S' 16 #!/usr/bin/env bash 17 [ "$2" != "deadbeefdeadbeefdeadbeefdeadbeefdeadbeef" ] 18 S 19 chmod +x "$stub"; export CAND_SHA_CHECK="$stub" 20 good="$here/testdata/cand-draft-fixture.toml" # the 2026-10-01 draft, kept as a fixture so these tests do not depend on the live manifest 21 live="$here/../qualification/candidates/CAND-0.toml" 22 pass=0; bad=0 23 expect() { # expect <0|1>