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-sovereign-core-mv/blob/main/scripts/prefill-gate/fails-on-main.sh # aien-sovereign-core-mv AienOS host runtime: inference scheduling, paged KV state, the aien CLI and Spark verification tooling. Its inference engine is in alpha testing (DGX Spark GB10); Omega is the implementation destination. 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-sovereign-core-mv / scripts / prefill-gate / fails-on-main.sh` 74 lines ยท 2747 bytes Raw Blame History 1 #!/usr/bin/env bash 2 # SPDX-License-Identifier: Apache-2.0 3 # Copyright 2026 Drake Stapleton (AIEN / aien-dev) 4 # 5 # Licensed under the Apache License, Version 2.0 (the "License"); 6 # you may not use this file except in compliance with the License. 7 # You may obtain a copy of the License at 8 # 9 # http://www.apache.org/licenses/LICENSE-2.0 10 # 11 # Unless required by applicable law or agreed to in writing, software 12 # distributed under the License is distributed on an "AS IS" BASIS, 13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 # See the License for the specific language governing permissions and 15 # limitations under the License. 16 17 # PREFILL-GATE counterexample check (shell only). 18 # 19 # Copies the two new main-compatible test files onto a clean checkout of the 20 # base ref (default origin/main) and runs them there. The defect is present on 21 # main, so each test must FAIL with the PREFILL_GATE_VIOLATION marker. 22 # 23 # Exit 0 ONLY when every test fails on the base ref with that marker. A test 24 # that passes on main, or fails for another reason (build error), exits 1. 25 # 26 # The temporary worktree is created as a sibling of this checkout (kept out of 27 # the repository tree), and is removed on exit. 28 # 29 # Usage: bash scripts/prefill-gate/fails-on-main.sh [base-ref] 30 set -u 31 32 ROOT="$(cd "$(dirname "$0")/../.." && pwd)" 33 BASE="${1:-origin/main}" 34 TMP="$(dirname "$ROOT")/.prefill-gate-main-check-$$" 35 export CARGO_TARGET_DIR="${CARGO_TARGET_DIR:-$ROOT/target/prefill-gate-main}" 36 37 cleanup() { 38 git -C "$ROOT" worktree remove --force "$TMP" >/dev/null 2>&1 39 git -C "$ROOT" worktree prune >/dev/null 2>&1 40 } 41 trap cleanup EXIT 42 43 git -C "$ROOT" worktree add --detach "$TMP" "$BASE" >/dev/null 2>&1 || { 44 echo "cannot create worktree of $BASE at $TMP" 45 exit 2 46 } 47 48 mkdir -p "$TMP/crates/aien-scheduler/tests" "$TMP/crates/aien-runtime/tests" 49 cp "$ROOT/crates/aien-scheduler/tests/prefill_gate_test.rs" "$TMP/crates/aien-scheduler/tests/" 50 cp "$ROOT/crates/aien-runtime/tests/swarm_prefill_gate_test.rs" "$TMP/crates/aien-runtime/tests/" 51 52 ALL_OK=1 53 check() { 54 local pkg="$1" test="$2" log rc 55 log="$(mktemp -t "prefill-main-${test}-XXXXXX.log")" 56 (cd "$TMP" && cargo test -p "$pkg" --test "$test") >"$log" 2>&1 57 rc=$? 58 if [ "$rc" -ne 0 ] && grep -q "PREFILL_GATE_VIOLATION" "$log"; then 59 echo "FAILS ON $BASE (expected): $pkg --test $test" 60 else 61 echo "UNEXPECTED on $BASE: $pkg --test $test exit $rc without PREFILL_GATE_VIOLATION. Log: $log" 62 tail -n 30 "$log" 63 ALL_OK=0 64 fi 65 } 66 67 check aien-scheduler prefill_gate_test 68 check aien-runtime swarm_prefill_gate_test 69 70 if [ "$ALL_OK" -eq 1 ]; then 71 echo "PREFILL-GATE counterexample confirmed: new tests fail on $BASE" 72 exit 0 73 fi 74 exit 1