omega-mv
Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance.
Brought by drakestapleton
omega-mv / evidence / CAND2-LIVING-79a805d / 00-declared / cand2_ladder.sh
| 1 | #!/bin/bash |
| 2 | # CAND-2 chip ladder: omega code 79a805d (+ map-only descendant) + physics 6d7cf0d. Copied from cand1_ladder.sh. |
| 3 | # usage: cand2_ladder.sh <omega harness sha> ladder|r11|chipwait|m18|r15 |
| 4 | # Runs ONLY from the forge (lanes.sh queue --heavy). Never wrapped in timeout; never kills anything. |
| 5 | # Run under quietlock hold (campaign approval, announced on the mindmap); every step still records the GPU/CPU load. |
| 6 | set -u |
| 7 | OMEGA_SHA=${1:?usage: cand2_ladder.sh <omega sha: 79a805d or a map-only descendant> <ladder|chipwait|m18>}; CODE_SHA=79a805d162bfded8c5ce5a4c14f7c29e79025f39; shift |
| 8 | PHYS_SHA=6d7cf0d4d8eb2cda7b512100ff6058e25dbb3ddf |
| 9 | W=$HOME/workspace/cand3-campaign/cand2 |
| 10 | O=$W/wt-omega-chip |
| 11 | P=$W/wt-physics-chip |
| 12 | OUT=$HOME/workspace/evidence-out/CAND2-LIVING-79a805d |
| 13 | export PHYSICS_DIR=$P AIENOS_LOCK_REPO=$HOME/workspace/r16-survey/aienos ARGUS_REPO=$HOME/workspace/aienos-argus ARGUS_STREAMS=$OUT/argus-streams |
| 14 | export R16_REPO_OMEGA=$O R16_REPO_SOVEREIGN_CORE=$W/survey/aien-sovereign-core \ |
| 15 | R16_REPO_AEGIS_RUNTIME=$W/survey/aegis-runtime R16_REPO_AIENOS=$W/survey/aienos \ |
| 16 | R16_REPO_PHYSICS=$P |
| 17 | cd "$O" || exit 2 |
| 18 | snap() { # $1 dir, $2 tag |
| 19 | local d=$1/machine-$2; mkdir -p "$d" |
| 20 | date -u +%FT%TZ > "$d/time.txt" |
| 21 | nvidia-smi > "$d/nvidia-smi.txt" 2>&1 |
| 22 | nvidia-smi --query-gpu=name,driver_version,pci.bus_id,uuid,temperature.gpu,utilization.gpu,clocks.sm --format=csv > "$d/gpu-identity.csv" 2>&1 |
| 23 | nvidia-smi --query-compute-apps=pid,process_name,used_memory --format=csv > "$d/gpu-processes.csv" 2>&1 |
| 24 | ps -eo pid,user,pcpu,pmem,etime,comm --sort=-pcpu | head -30 > "$d/top-cpu.txt" |
| 25 | uptime > "$d/uptime.txt"; uname -a > "$d/uname.txt" |
| 26 | { echo "omega $(git -C "$O" rev-parse HEAD) dirty=[$(git -C "$O" status --porcelain | head -3 | tr '\n' ' ')]"; |
| 27 | echo "physics $(git -C "$P" rev-parse HEAD) dirty=[$(git -C "$P" status --porcelain | head -3 | tr '\n' ' ')]"; |
| 28 | echo "physics.lock $(head -1 "$O/physics.lock")"; } > "$d/heads.txt" |
| 29 | dmesg 2>/dev/null | grep -ci 'xid' > "$d/xid-count.txt" || true |
| 30 | } |
| 31 | guard() { |
| 32 | [ "$(git -C "$O" rev-parse HEAD)" = "$OMEGA_SHA" ] || { echo "omega HEAD is not $OMEGA_SHA"; exit 2; } |
| 33 | [ "$(git -C "$P" rev-parse HEAD)" = "$PHYS_SHA" ] || { echo "physics HEAD is not $PHYS_SHA"; exit 2; } |
| 34 | [ -z "$(git -C "$O" status --porcelain)" ] || { echo "omega tree dirty"; exit 2; } |
| 35 | git -C "$O" diff --quiet $CODE_SHA HEAD -- . ":(exclude)spec/r16-orchestrator-retirement-map.md" ":(glob,exclude)**/.crumb" ":(exclude).crumb" || { echo "omega HEAD differs from CAND-2 code $CODE_SHA beyond the R16 map and crumbs"; exit 2; } |
| 36 | } |
| 37 | step() { # $1 gate dir name, rest = command |
| 38 | local g=$1; shift; local d=$OUT/$g |
| 39 | mkdir -p "$d"; snap "$d" before |
| 40 | echo "$*" > "$d/command.txt" |
| 41 | local s=$(date -u +%s) |
| 42 | "$@" > "$d/stdout.log" 2> "$d/stderr.log" < /dev/null |
| 43 | local rc=$? |
| 44 | echo "$rc" > "$d/exit.txt"; echo "$(( $(date -u +%s) - s ))" > "$d/seconds.txt" |
| 45 | snap "$d" after |
| 46 | echo "$g rc=$rc secs=$(cat "$d/seconds.txt")" | tee -a "$OUT/LADDER-SUMMARY.txt" |
| 47 | } |
| 48 | mkdir -p "$OUT"; guard |
| 49 | case "${1:-}" in |
| 50 | ladder) |
| 51 | snap "$OUT/00-identity" start |
| 52 | # R16 harness: G1-G5 + G7 ladder (R1-R11 host, R12/R13/R14 host+silicon, R15 parity host+silicon, |
| 53 | # R15 G7 host, R15 receipt test) + G3 authpath host+silicon. Stops later silicon after one silicon FAIL. |
| 54 | step R16-ladder env R16_OUT_DIR="$OUT/R16-ladder/raw" R16_EXPECT_COMMIT=$OMEGA_SHA tools/r16_qualify.sh |
| 55 | cp -a build/qual-runs "$OUT/qual-runs-after-R16" 2>/dev/null |
| 56 | step R13-testbuild-silicon env OMEGA_CANDIDATE_COMMIT=$OMEGA_SHA make test-r13-testbuild-silicon |
| 57 | cp -a build/qual-runs "$OUT/qual-runs-after-R13" 2>/dev/null |
| 58 | step prod-hygiene-silicon make test-prod-hygiene-silicon |
| 59 | step COMPOSITION-2-GPU make test-composition-gate-gpu |
| 60 | [ -s build/composition_gate_gpu_receipt.json ] && cp build/composition_gate_gpu_receipt.json \ |
| 61 | "$OUT/COMPOSITION-2-GPU/receipt-$(sha256sum build/composition_gate_gpu_receipt.json | cut -c1-64).json" |
| 62 | guard; echo "ladder done" >> "$OUT/LADDER-SUMMARY.txt" ;; |
| 63 | chipwait) |
| 64 | # CHIPWAIT campaign: 3 x tools/m19r_qualify.sh full mode (M19R Gates 1/2 incl. the LONG_SOAK |
| 65 | # >= 100000-cycle endurance criterion), predeclared 3/3 rule from tools/m19r_campaign.sh. No --record. |
| 66 | # m19r_qualify runs `make clean` in this worktree: keep this lane AFTER the ladder lane. |
| 67 | step CHIPWAIT tools/chipwait_campaign.sh --omega-candidate $OMEGA_SHA --physics-candidate $PHYS_SHA \ |
| 68 | --physics-dir "$P" --campaign-dir "$OUT/CHIPWAIT/campaign" --runs 3 |
| 69 | guard; echo "chipwait done" >> "$OUT/LADDER-SUMMARY.txt" ;; |
| 70 | m18) |
| 71 | # M18 matmul gates (src/omega_blackwell_gates.c, --run-m18-gates). Last chip PASS: M18-UNCACHED b20ff9e |
| 72 | # (merged ccdfef3); submit.c changed since (ea60ea6, 5e29b82). Builds omegatool first. |
| 73 | step M18-build make build/omegatool |
| 74 | step M18 ./build/omegatool --run-m18-gates |
| 75 | guard; echo "m18 done" >> "$OUT/LADDER-SUMMARY.txt" ;; |
| 76 | r11) |
| 77 | # R11 living under load (tests/runtime/rx_r11_aien.c). Runs only inside its own quietlock hold: |
| 78 | # quietlock exports QUIETLOCK_HOLD and the flag line carries hold=<id> (quiet_flag_is_mine); under any |
| 79 | # other quiet flag it prints "living run not exercised", which is a refusal, never a pass. |
| 80 | step R11-build make build/rx_r11_aien_test |
| 81 | sha256sum build/rx_r11_aien_test > "$OUT/R11-build/rx_r11_aien_test.sha256" |
| 82 | sleep 60 # let the 1-minute load average settle after the build |
| 83 | step R11-living ./build/rx_r11_aien_test |
| 84 | guard; echo "r11 done" >> "$OUT/LADDER-SUMMARY.txt" ;; |
| 85 | r15) |
| 86 | # R15 silicon on its own (the R16 ladder stops later silicon after one FAIL). Since omega #295 the |
| 87 | # energy preflight refuses before a window is used when the SPBM instrument is absent: that is |
| 88 | # recorded as INSTRUMENT_UNAVAILABLE, never as a performance result. |
| 89 | step R15-silicon tools/r15_qualify.sh silicon |
| 90 | guard; echo "r15 done" >> "$OUT/LADDER-SUMMARY.txt" ;; |
| 91 | *) echo "usage: $0 <sha> ladder|r11|chipwait|m18|r15"; exit 2 ;; |
| 92 | esac |