RenderCheck: the figure check reads the frame without the chamber's tint; render-mutants.sh rebuilds after each restore

The translucent chamber turned two hand bodies inside it blue; the lanes check now draws the volume hidden. The mutant script touched nothing
after restoring a file, so MSBuild kept the mutant's assembly; it touches the file and reads the build output whole.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-11-23 02:14:48 +01:00
commit 61f5478bd8
2 changed files with 11 additions and 6 deletions

View file

@ -80,7 +80,10 @@ public partial class RenderCheck : Node
CheckFifteenBit(play);
CheckBlocks(play, Block);
CheckFigureWhereLanesAre(play);
_main.Chamber.Volume.Visible = false; // the translucent box tints the hand bodies inside it
CheckFigureWhereLanesAre(await Capture("play-clear"));
_main.Chamber.Volume.Visible = true;
var home = _camera.Transform;
_camera.Distance = 0.9f;
@ -92,7 +95,7 @@ public partial class RenderCheck : Node
await CheckGlow();
}
/// <summary>Every channel of every pixel is a multiple of 8: 15-bit colour, within one level of the 8-bit rounding. Bound 0; shipped 0, post off 1729077 channels.</summary>
/// <summary>Every channel of every pixel is a multiple of 8: 15-bit colour, within one level of the 8-bit rounding. Bound 0; shipped 0, post off 1728141 channels.</summary>
private void CheckFifteenBit(Frame f)
{
int bad = 0;
@ -103,7 +106,7 @@ public partial class RenderCheck : Node
Check(bad == 0, "15-bit", $"{bad} channels are not a multiple of 8");
}
/// <summary>Every block of the line grid, anchored at the screen centre, is one colour. Bound 0 pixels; shipped 0, sampling per pixel 218066.</summary>
/// <summary>Every block of the line grid, anchored at the screen centre, is one colour. Bound 0 pixels; shipped 0, sampling per pixel 218873.</summary>
private void CheckBlocks(Frame f, int s)
{
var seen = new Dictionary<(int, int), uint>();

View file

@ -20,7 +20,7 @@ status=0
for m in "${MUTANTS[@]}"; do
IFS='|' read -r name file old new want <<<"$m"
cp "$file" "$file.orig"
restore() { mv -f "$file.orig" "$file"; }
restore() { mv -f "$file.orig" "$file"; touch "$file"; }
if ! python - "$file" "$old" "$new" <<'PY'
import sys
path, old, new = sys.argv[1:4]
@ -32,12 +32,14 @@ text = text.replace(old, new)
open(path, 'w', newline='').write(text.replace('\n', '\r\n') if '\r\n' in raw else text)
PY
then restore; echo "MUTANT $name: edit did not apply once; aborting"; exit 2; fi
if ! dotnet build BadDay.Client.csproj 2>&1 | grep -q "Build succeeded"; then restore; echo "MUTANT $name: does not build; aborting"; exit 2; fi
build="$(dotnet build BadDay.Client.csproj 2>&1)"
if ! grep -q "Build succeeded" <<<"$build"; then restore; echo "MUTANT $name: does not build; aborting"; exit 2; fi
out="$("$GODOT" --path . res://tests/RenderCheck.tscn 2>&1)"
restore
readings="$(grep '^RENDER ' <<<"$out" | grep -v 'FAIL\|PASS\|FAILED' | sed 's/^RENDER //' | tr '\n' ';')"
if grep -q "^RENDER FAIL $want:" <<<"$out"; then echo "MUTANT $name: fails '$want' as wanted [$readings]"
else echo "MUTANT $name: DOES NOT FAIL '$want' [$readings]"; status=1; fi
done
dotnet build BadDay.Client.csproj 2>&1 | grep -q "Build succeeded" || { echo "the shipped code does not build after the run"; status=1; }
build="$(dotnet build BadDay.Client.csproj 2>&1)"
grep -q "Build succeeded" <<<"$build" || { echo "the shipped code does not build after the run"; status=1; }
exit $status