#!/usr/bin/env bash # Reproduce issue #18175: user presets inheriting from a sibling file in the same # user preset directory are silently dropped at load (current main, built binary). # # Uses the MCP harness on a private Xvfb display (orca-mcp wrapper for this slot). # Screenshots are black under software GL, so the proof is in the debug log and the # preset_list tool output, both echoed below. set -eu HERE="$(cd "$(dirname "$0")" && pwd)" D="$HERE/run2" rm -rf "$D" mkdir -p "$D/user/default/process" "$D/user/default/filament" cp "$HERE/presets/ReproParent.json" "$D/user/default/process/" cp "$HERE/presets/ReproChild.inherits_sibling.json" "$D/user/default/process/ReproChild.json" cp "$HERE/presets/ReproFilParent.json" "$D/user/default/filament/" cp "$HERE/presets/ReproFilChild.inherits_sibling.json" "$D/user/default/filament/ReproFilChild.json" orca-mcp stop >/dev/null 2>&1 || true orca-mcp launch --bin "$ORCA_BIN" --datadir "$D" --timeout 180 >/dev/null echo "== preset_list (what the dropdowns can offer):" for t in process filament; do orca-mcp call preset_list "{\"type\":\"$t\"}" \ | python3 -c "import json,sys; [print(' ',it['name']) for it in json.load(sys.stdin)['items'] if 'Repro' in it.get('name','')]" done echo "== files still on disk:" ls "$D/user/default/process" "$D/user/default/filament" echo "== debug log:" LOG=$(ls -t "$D"/log/debug_*.log.0 | head -1) grep -E "can not find parent|loaded [0-9]+ presets from .*$D/user" "$LOG" orca-mcp stop