interplane.Get Omega
Read in your language

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

branch main Branches Tags History

aien-sovereign-core-mv / benchmarks / data / headstart / patched-20261015-4c83e38 / toolchain / 13-diag-once.sh

58 lines · 2355 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# One untimed diagnostic of the Headstart-ON incremental failure, run as
18# `quietlock run -- 13-diag-once.sh inner` (refused, exit 75, while another
19# job holds the quiet flag). Steps: prime an ON incremental check on a fresh
20# target dir, apply the same body edit as the measured series (step 1), run
21# ONE incremental ON check with -j 8 capturing full stderr, revert the edit.
22set -euo pipefail
23E=~/workspace/headstart-exp
24H=$E/headstart
25S=$E/aien-work/src
26WT=~/aien-sovereign-core/.claude/worktrees/agent-adc52ad674d7b621a
27D=$WT/benchmarks/data/headstart/patched-20261015-4c83e38/diag-once
28if [ "${1:-}" != inner ]; then
29 exec quietlock run -- "$0" inner
30fi
31mkdir -p "$D"
32CARGO=$H/cargo/target/release/cargo
33export RUSTC=$H/rustc/build/host/stage1/bin/rustc
34export CARGO_UNSTABLE_HEADSTART=true
35export CARGO_TARGET_DIR=$E/aien-work/target-diag-once-ON
36F=crates/cortex-rs/src/lib.rs
37ANCHOR=' pub fn in_memory() -> Result<Self, String> {'
38cd "$S"
39trap 'git checkout -- "$F"' EXIT
40git diff --quiet || { echo "worktree not clean" >&2; exit 1; }
41rm -rf "$CARGO_TARGET_DIR"
42"$CARGO" check --workspace --all-targets -j 8 > "$D/prime.stderr.log" 2>&1
43echo "prime rc=$?" > "$D/result.txt"
44n=$(grep -nF -- "$ANCHOR" "$F" | cut -d: -f1)
45sed -i "${n}a\\ let _headstart_m0_probe = std::hint::black_box(1u64);" "$F"
46set +e
47"$CARGO" check --workspace --all-targets -j 8 > "$D/incr-on.stderr.log" 2>&1
48rc=$?
49set -e
50echo "incremental ON check rc=$rc" >> "$D/result.txt"
51git checkout -- "$F"
52for f in rustc-ice-*.txt; do
53 [ -e "$f" ] || continue
54 awk '/^stack backtrace:/ { exit } NR > 12 { exit } { print }' "$f" > "$D/${f%.txt}.head.txt"
55 rm -f "$f"
56done
57rm -rf "$CARGO_TARGET_DIR"
58cat "$D/result.txt"