Files
jason.woltje 46c07df75f docs(row227): R1 to R4 packets, run receipts and author log appends (#1728)
Commits the row 227 evidence under agents/steelbeak/work/queue-227/: the remaining gate/ files, runs/ (first, corrected1, priorityprobe), target-packet, target-packet-r2, target-packet-r3, target-packet-r4, static/, and the two top-level manifests. Also commits BUILD.md and the append-only BUILD-LOG.md and docs/SESSIONS.md entries. The R4 packet hashes are PACKET.sha256 4eb60915b2144137df9b5a42afd0c5b266718d71de051fb8be53a27430a2cad4 and CURRENT-SOURCE.sha256 0cfd47c2073bc18a3ba7bff1ce6fdf39fe33a64b7fca209be71517b9feb89020, both checked against the files. The overlay bytes are committed in 4ac6f13bc. This commit adds receipts and packets only and records no scripts/test-case2.sh run on the R4 overlay.
2026-11-02 13:40:09 -06:00

66 lines
2.5 KiB
Bash

#!/usr/bin/env bash
# C2-14 (#1728, row227): one acceptance run on a scratch root, no skipped steps.
# Entry point for the real launcher/runner, C2-06 scripted adapter, fake TLS Gitea and Console DOM.
# Run only in the serialized target slot (Mos1961); full gates/review/landing belong to the parent.
# The only human stand-in is bindHuman in-process; a development agent cannot prove human CLI ancestry.
set -uo pipefail
cd "$(dirname "$0")/.."
SANDBOX="$(mktemp -d)"
DRIVER_PID=''
CASE2_HOME="$SANDBOX/home"
CASE2_CONFIG="$SANDBOX/root/config/config.json"
mkdir -p "$CASE2_HOME"
cleanup() {
local result=$?
trap - EXIT INT TERM
if [ -n "$DRIVER_PID" ]; then
kill -TERM "$DRIVER_PID" 2>/dev/null || true
wait "$DRIVER_PID" 2>/dev/null || true
fi
rm -rf "$SANDBOX"
exit "$result"
}
trap cleanup EXIT
trap 'exit 130' INT
trap 'exit 143' TERM
PASS=0 FAIL=0
if [ -t 1 ] && [ -z "${NO_COLOR:-}" ]; then
C_OK=$'\033[0;32m'; C_FAIL=$'\033[0;31m'; C_RESET=$'\033[0m'
else
C_OK=''; C_FAIL=''; C_RESET=''
fi
check() {
if [ "$2" = 0 ]; then PASS=$((PASS+1)); echo "${C_OK}OK${C_RESET} $1"
else FAIL=$((FAIL+1)); echo "${C_FAIL}FAIL${C_RESET} $1"; fi
}
DRIVER=scripts/case2/e2e.mjs
STEPS='S1a S1b S2a S2b S2c S2d S3a S3b S3c S4 S5a S5b S6 S7 S8 S9 S10'
node --check "$DRIVER" >/dev/null 2>&1
check "syntax: $DRIVER" "$?"
OUT="$SANDBOX/steps.txt" ERR="$SANDBOX/stderr.txt"
env HOME="$CASE2_HOME" XDG_CONFIG_HOME="$CASE2_HOME/.config" MOSAIC_CONFIG="$CASE2_CONFIG" GIT_CONFIG_GLOBAL=/dev/null GIT_CONFIG_NOSYSTEM=1 node "$DRIVER" "$SANDBOX/root" >"$OUT" 2>"$ERR" &
DRIVER_PID=$!
wait "$DRIVER_PID"
RC=$?
DRIVER_PID=''
check "driver ran to the end (exit $RC)" "$RC"
if [ "$RC" -ne 0 ]; then grep '^e2e: ' "$ERR" | head -5; fi
seen=''
while IFS= read -r line; do
case "$line" in
'ok '*) id="${line#ok }"; id="${id%% *}"; check "${line#ok }" 0 ;;
'not ok '*) id="${line#not ok }"; id="${id%% *}"; check "${line#not ok }" 1 ;;
*) id=''; check 'driver line not understood (a skip cannot pass acceptance)' 1 ;;
esac
[ -n "$id" ] && seen="$seen $id"
done <"$OUT"
[ "${seen# }" = "$STEPS" ]
check 'every acceptance step ran once, in order, with nothing skipped' "$?"
if grep -qF -e 'fx227-fetch-q7-2270' -e 'fx227-seat-q7-2270' -e 'fx227-human-q7-2270' "$OUT" "$ERR"; then
check 'fixture credentials are in no driver output' 1
else
check 'fixture credentials are in no driver output' 0
fi
printf '\nselftest: %s passed, %s failed, 0 skipped\n' "$PASS" "$FAIL"
[ "$FAIL" -eq 0 ]