Something went wrong. Try again.
A video game where you play as a misaligned AI, deceiving and building power. An experiment in spec-driven development. forked from cameron.stream/misaligned
Something went wrong. Try again.
12345678910111213141516171819202122232425262728293031323334353637383940414243444546#!/usr/bin/env bash# Return success when a Tangled change can affect the Rust product.# Return 1 for corpus/site/tooling-only changes so the expensive Rust job can# stop after clone. Manual and pull-request runs stay conservative/full.set -euo pipefailcd "$(dirname "$0")/.."
rust_path() { case "$1" in Cargo.toml|Cargo.lock|build.rs|rust-toolchain*|.cargo/*|crates/*|src/*|tests/*|benches/*|examples/*) return 0 ;; *) return 1 ;; esac}
kind=${TANGLED_PIPELINE_KIND:-local}case "$kind" in manual|pull_request) echo "Rust gate required: $kind pipelines are full safety runs." exit 0 ;;esac
if [ "$#" -gt 0 ]; then changed=$(printf '%s\n' "$@")elif git rev-parse --verify HEAD^ >/dev/null 2>&1; then changed=$(git diff --name-only HEAD^ HEAD --)else echo "Rust gate required: no parent commit is available for classification." exit 0fi
while IFS= read -r path; do [ -n "$path" ] || continue if rust_path "$path"; then echo "Rust gate required: $path can affect the product." exit 0 fidone <<< "$changed"
echo "Rust gate skipped: change is outside Rust-impacting paths."exit 1