interplane-mv
INTERPLANE: open interoperability protocol between AI models and agent runtimes. Models express intent. Runtimes retain authority.
Brought by drakestapleton
interplane-mv / bench / runs / offline-integration-20261005T1338Z / run-part1.sh
| 1 | #!/usr/bin/env bash |
| 2 | # Offline INTERPLANE checks, mirroring .github/workflows/ci.yml at the checked-out commit. No model, no GPU. |
| 3 | WT=$HOME/workspace/cand2-campaign/wt-ip-offline |
| 4 | OUT=$HOME/workspace/evidence-out/IP-OFFLINE-3fa8ee0 |
| 5 | SC=$HOME/workspace/evidence-out/ip-scratch # scratch: venvs, siblings, tmp (not published) |
| 6 | mkdir -p "$SC" "$OUT/logs"; cd "$WT" || exit 1 |
| 7 | : > "$OUT/steps.tsv" |
| 8 | step() { # name, working-dir (relative to WT), command... |
| 9 | local n=$1 d=$2; shift 2 |
| 10 | local s e rc; s=$(date -u +%FT%TZ) |
| 11 | ( cd "$WT/$d" && bash -c "$*" ) > "$OUT/logs/$n.log" 2>&1; rc=$? |
| 12 | e=$(date -u +%FT%TZ) |
| 13 | printf '%s\t%s\t%s\t%s\t%s\n' "$n" "$rc" "$s" "$e" "$*" >> "$OUT/steps.tsv" |
| 14 | echo "$n rc=$rc" |
| 15 | } |
| 16 | V=$SC/venv |
| 17 | python3 -m venv $V >/dev/null 2>&1 |
| 18 | step pip-install . "$V/bin/pip install -q -c constraints/ci-python.txt pytest jsonschema pyflakes -e python" |
| 19 | PY="$V/bin/python"; export PATH="$V/bin:$PATH" |
| 20 | step schema-selfcheck . "$PY - <<'PYX' |
| 21 | import json,glob |
| 22 | from jsonschema import Draft202012Validator |
| 23 | for f in sorted(glob.glob('spec/schemas/*.json')): |
| 24 | Draft202012Validator.check_schema(json.load(open(f))); print('ok', f) |
| 25 | PYX" |
| 26 | step fixture-validation . "$PY conformance/runners/validate_fixtures.py" |
| 27 | step bench-validate . "$PY bench/tools/validate.py --require-jsonschema" |
| 28 | step bench-validate-0.2x . "$PY bench/tools/validate.py --corpus 0.2x --require-jsonschema" |
| 29 | step live-injection-offline . "PYTHONPATH=python PYTHONDONTWRITEBYTECODE=1 $PY bench/tools/test_live_injection.py" |
| 30 | step stats-newcombe . "$PY bench/tools/stats.py" |
| 31 | step analyze-tests . "$PY bench/tools/test_analyze.py && rm -rf $SC/analyze-out && $PY bench/tools/analyze.py bench/tools/testdata/synthetic-run --out $SC/analyze-out && diff -r $SC/analyze-out bench/tools/testdata/synthetic-expected" |
| 32 | step rust-fmt rust "cargo fmt --all --check" |
| 33 | step rust-clippy rust "cargo clippy --all-targets --all-features -- -D warnings" |
| 34 | step rust-test rust "cargo test --all" |
| 35 | step rust-negctl-tests rust "cargo test -p interplane-conformance --features negative-controls" |
| 36 | step rust-conformance rust "cargo run -q -p interplane-conformance -- ../conformance/fixtures --out $OUT/rust-verdicts.json" |
| 37 | step py-pyflakes . "$PY -m pyflakes python/interplane python/tests" |
| 38 | step py-pytest . "$PY -m pytest python/tests -q" |
| 39 | step py-conformance . "$PY -m interplane.conformance conformance/fixtures --out $OUT/py-verdicts.json" |
| 40 | step cross-language . "$PY - <<'PYX' |
| 41 | import json,sys |
| 42 | r=json.load(open('$OUT/rust-verdicts.json')); p=json.load(open('$OUT/py-verdicts.json')) |
| 43 | bad=[c for c in sorted(set(r)|set(p)) if json.dumps(r.get(c),sort_keys=True)!=json.dumps(p.get(c),sort_keys=True)] |
| 44 | print('cases:',len(r),'mismatches:',bad); sys.exit(1 if bad or len(r)!=106 else 0) |
| 45 | PYX" |
| 46 | step trust-digest . "$PY conformance/runners/trust_digest.py --check" |
| 47 | step negctl-not-in-pipeline . "! grep -rIl -E 'negctl|negative-controls|NEGCTL' rust/crates/interplane-core rust/crates/interplane-crossveil rust/crates/interplane-crossaxis rust/crates/interplane-lenshift python/interplane/core.py python/interplane/crossveil.py python/interplane/crossaxis.py python/interplane/lenshift" |
| 48 | step default-build-refuses-variant rust "cargo build -q -p interplane-conformance && ! grep -q NEGCTL_BUILT_IN target/debug/interplane-conformance && { rc=0; target/debug/interplane-conformance ../conformance/fixtures --out /dev/null --variant V4 || rc=\$?; test \"\$rc\" = 2; }" |
| 49 | step negctl-matrix . "(cd rust && cargo run -q -p interplane-conformance --features negative-controls -- ../conformance/fixtures --matrix $OUT/rust-matrix.json) && $PY -m interplane.conformance conformance/fixtures --matrix $OUT/py-matrix.json && cmp $OUT/rust-matrix.json $OUT/py-matrix.json" |
| 50 | # package job |
| 51 | step pkg-wheel . "rm -rf $SC/dist && $V/bin/pip wheel -q --no-deps -w $SC/dist ./python" |
| 52 | step pkg-venv-examples . "rm -rf $SC/v && python3 -m venv $SC/v && $SC/v/bin/pip install -q $SC/dist/interplane-*.whl && cd $SC && INTERPLANE_REQUIRE_INSTALLED=1 $SC/v/bin/python $WT/examples/offline/run_offline.py && INTERPLANE_REQUIRE_INSTALLED=1 $SC/v/bin/python $WT/examples/adapter/todo_adapter.py" |
| 53 | step pkg-wheel-vs-checkout . "(cd $SC && $SC/v/bin/interplane-conformance $WT/conformance/fixtures --out $SC/wheel-verdicts.json) && PYTHONPATH=python $PY -m interplane.conformance $WT/conformance/fixtures --out $SC/checkout-verdicts.json && cmp $SC/wheel-verdicts.json $SC/checkout-verdicts.json" |
| 54 | step pkg-adapter-runner . "H=$WT/bench/runs/home-check-20261005T1320Z; rm -rf $SC/home && mkdir $SC/home && cp \$H/authority.py \$H/table-entry.json $SC/home/ && printf 'from authority import RUNTIME, POLICY, make_pipeline, HomeAuthority\n\n\ndef make_authority(**kw):\n return HomeAuthority(**kw)\n' > $SC/home/shim.py && cd $SC && R=\"$SC/v/bin/python $WT/conformance/runners/adapter_runner.py --module home/shim.py --entry home/table-entry.json\" && \$R --out home/verdicts.json && cmp home/verdicts.json \$H/verdicts.json && { if \$R --no-exposure-check --out home/negctl.json; then echo negctl-passed; exit 1; fi; cmp home/negctl.json \$H/verdicts-negctl.json; }" |
| 55 | step pkg-cargo-package rust "cargo package --workspace --locked" |
| 56 | # adapter-aien |
| 57 | step aien-siblings . "adapters/aien/setup-siblings.sh $HOME/workspace/cand2-campaign" |
| 58 | step aien-fmt adapters/aien "cargo fmt --all --check" |
| 59 | step aien-clippy adapters/aien "cargo clippy --all-targets -- -D warnings" |
| 60 | step aien-test adapters/aien "cargo test" |
| 61 | step aien-t4 adapters/aien "T4_OUT=$OUT/t4-verdicts.json cargo test --test t4_corpus -- --nocapture" |