mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-10-30 09:16:55 +00:00
* test(studio): record each edit-accuracy shard's file writes and reloads when HF_WRITE_TRACE is set * style(studio): format the write trace * fix(core): hash the write trace with sha256 * style(studio): wrap the trace hash helper * style(studio): format the trace hash helper * fix(studio): turn the reload log on in the Studio page the trace watches
15 lines
865 B
Bash
Executable File
15 lines
865 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# edit-accuracy-shard.sh <i/n>: runs one edit accuracy shard into /tmp/edit-accuracy, then re-runs twice each case
|
|
# whose verdict differs from the base branch (/tmp/base-edit-accuracy.json). A slow runner makes the bench exit 75.
|
|
set -euo pipefail
|
|
export HF_WRITE_TRACE="/tmp/edit-accuracy/write-trace-${1//\//-}.log"
|
|
mkdir -p /tmp/edit-accuracy
|
|
bench() { bun run --cwd packages/studio test:edit-accuracy -- --grid "$EDIT_ACCURACY_GRID" --jobs 2 "$@"; }
|
|
bench --shard "$1" --out /tmp/edit-accuracy/run1
|
|
mapfile -t FLIPPED < <(node packages/studio/tests/e2e/edit-accuracy/ratchet.mjs flipped \
|
|
/tmp/base-edit-accuracy.json /tmp/edit-accuracy/run1/results.json)
|
|
if (( ${#FLIPPED[@]} > 0 )); then
|
|
FILTER="^($(IFS='|'; echo "${FLIPPED[*]}"))$"
|
|
for run in 2 3; do bench --filter "$FILTER" --rerun --out "/tmp/edit-accuracy/run${run}"; done
|
|
fi
|