fix(joinir): stabilize phase1883 latch/entry preds

This commit is contained in:
2025-12-28 23:39:51 +09:00
parent d8786ebab9
commit dd8c2709bd
11 changed files with 202 additions and 79 deletions

View File

@ -7,18 +7,21 @@ require_env || exit 2
# Test: Nested loop (3x3 iterations, sum = 9)
FIXTURE="$NYASH_ROOT/apps/tests/phase1883_nested_minimal.hako"
RUN_TIMEOUT_SECS=${RUN_TIMEOUT_SECS:-10}
if ! output=$(NYASH_DISABLE_PLUGINS=1 "$NYASH_BIN" --backend vm "$FIXTURE" 2>&1); then
exit_code=$?
log_error "phase1883_nested_minimal_vm: fixture failed to execute"
echo "$output"
set +e
OUTPUT=$(timeout "$RUN_TIMEOUT_SECS" env NYASH_DISABLE_PLUGINS=1 HAKO_JOINIR_STRICT=1 "$NYASH_BIN" --backend vm "$FIXTURE" 2>&1)
EXIT_CODE=$?
set -e
if [ "$EXIT_CODE" -eq 124 ]; then
log_error "phase1883_nested_minimal_vm: hakorune timed out (>${RUN_TIMEOUT_SECS}s)"
exit 1
fi
# Check exit code == 9 (expected sum result)
exit_code=$?
if [ "$exit_code" != "9" ]; then
log_error "phase1883_nested_minimal_vm: expected exit code 9, got $exit_code"
if [ "$EXIT_CODE" -ne 9 ]; then
log_error "phase1883_nested_minimal_vm: expected exit code 9, got $EXIT_CODE"
echo "$OUTPUT"
exit 1
fi