Files
OlivierandClaude Fable 5.1 f0072a3e11
Quality Gate / Quality Gate (pull_request) Successful in 6m55s
Add sunlit shallows site with localized sun shafts
New visual test site under game/world/sites: flat sandy floor at
-40 m, calm surface at 0 m, fixed daytime sun ahead of and above
the submarine. Light shafts come from a shadow-only surface
occluder whose alpha-scissor ripples open only inside a pool a few
tens of metres ahead; a subtractive FogVolume cancels the global
volumetric fog above the water, and an unshaded ceiling mesh shows
the lit underside of the surface inside that pool. A composed
world (sunlit_shallows_world.tscn) mounts the submarine, cockpit
and camera rig in it, with the projectors kept out of the fog.

Cockpit: the porthole glass moves to its own render layer with a
rougher material and the porthole fill light excludes that layer,
so interior lamps no longer mirror as hard specular points.

Quality gate: new integration suite for the site (42 checks), three
glass assertions in the foundation suite, and the Input-access
architecture rule now matches both path separators so the gate runs
on Windows. project.godot raises the volumetric fog froxel grid to
128 so the shafts stay readable.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-06 23:18:56 +02:00

135 lines
4.7 KiB
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
SCRIPT_DIRECTORY="$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)"
PROJECT_DIRECTORY="$(CDPATH= cd -- "$SCRIPT_DIRECTORY/.." && pwd)"
GODOT_EXECUTABLE="${GODOT_BIN:-godot}"
REQUIRED_GODOT_VERSION="4.7.2"
QUALITY_TEMP_DIRECTORY="$(mktemp -d "${TMPDIR:-/tmp}/ransoms-wake-quality.XXXXXX")"
cleanup_quality_directory() {
if [ -n "$QUALITY_TEMP_DIRECTORY" ] && [ -d "$QUALITY_TEMP_DIRECTORY" ]; then
rm -r -- "$QUALITY_TEMP_DIRECTORY"
fi
}
trap cleanup_quality_directory EXIT
cd "$PROJECT_DIRECTORY"
check_godot_log() {
local stage_name="$1"
local log_path="$2"
local unexpected_messages
unexpected_messages="$(
rg -n '^(ERROR|SCRIPT ERROR|WARNING):' "$log_path" \
| rg -v '^.*ERROR: Condition "ret != noErr" is true\. Returning: ""$' \
|| true
)"
if [ -n "$unexpected_messages" ]; then
printf 'Quality gate: unexpected Godot diagnostics during %s\n%s\n' \
"$stage_name" "$unexpected_messages"
exit 1
fi
}
actual_version="$($GODOT_EXECUTABLE --version)"
case "$actual_version" in
"$REQUIRED_GODOT_VERSION"*) ;;
*)
printf 'Quality gate: Godot %s required, found %s.\n' \
"$REQUIRED_GODOT_VERSION" "$actual_version"
exit 1
;;
esac
printf 'Quality gate: shell scripts\n'
bash -n scripts/check_architecture.sh scripts/quality_gate.sh
printf 'Quality gate: architecture\n'
bash scripts/check_architecture.sh
printf 'Quality gate: project import\n'
if ! "$GODOT_EXECUTABLE" --headless \
--log-file "$QUALITY_TEMP_DIRECTORY/import.log" \
--path . \
--import \
>"$QUALITY_TEMP_DIRECTORY/import-console.log" 2>&1; then
printf 'Quality gate: project import failed\n'
cat "$QUALITY_TEMP_DIRECTORY/import-console.log"
exit 1
fi
printf 'Quality gate: resource loading\n'
"$GODOT_EXECUTABLE" --headless \
--log-file "$QUALITY_TEMP_DIRECTORY/load.log" \
--path . \
--script tests/run_load_checks.gd \
2>&1 | tee "$QUALITY_TEMP_DIRECTORY/load-console.log"
check_godot_log "resource loading" "$QUALITY_TEMP_DIRECTORY/load-console.log"
printf 'Quality gate: POC unit tests\n'
"$GODOT_EXECUTABLE" --headless \
--log-file "$QUALITY_TEMP_DIRECTORY/unit.log" \
--path . \
--script tests/run_tests.gd \
2>&1 | tee "$QUALITY_TEMP_DIRECTORY/unit-console.log"
check_godot_log "unit tests" "$QUALITY_TEMP_DIRECTORY/unit-console.log"
printf 'Quality gate: production dive unit tests\n'
"$GODOT_EXECUTABLE" --headless \
--log-file "$QUALITY_TEMP_DIRECTORY/dive-unit.log" \
--path . \
--script tests/unit/run_dive_foundation_tests.gd \
2>&1 | tee "$QUALITY_TEMP_DIRECTORY/dive-unit-console.log"
check_godot_log "production dive unit tests" "$QUALITY_TEMP_DIRECTORY/dive-unit-console.log"
printf 'Quality gate: production vehicle application unit tests\n'
"$GODOT_EXECUTABLE" --headless \
--log-file "$QUALITY_TEMP_DIRECTORY/vehicle-application-unit.log" \
--path . \
--script tests/unit/run_vehicle_application_tests.gd \
2>&1 | tee "$QUALITY_TEMP_DIRECTORY/vehicle-application-unit-console.log"
check_godot_log \
"production vehicle application unit tests" \
"$QUALITY_TEMP_DIRECTORY/vehicle-application-unit-console.log"
printf 'Quality gate: production sonar application unit tests\n'
"$GODOT_EXECUTABLE" --headless \
--log-file "$QUALITY_TEMP_DIRECTORY/sonar-application-unit.log" \
--path . \
--script tests/unit/run_sonar_application_tests.gd \
2>&1 | tee "$QUALITY_TEMP_DIRECTORY/sonar-application-unit-console.log"
check_godot_log \
"production sonar application unit tests" \
"$QUALITY_TEMP_DIRECTORY/sonar-application-unit-console.log"
printf 'Quality gate: production foundation integration\n'
"$GODOT_EXECUTABLE" --headless \
--log-file "$QUALITY_TEMP_DIRECTORY/foundation-integration.log" \
--path . \
--script tests/integration/run_vertical_slice_foundation.gd \
2>&1 | tee "$QUALITY_TEMP_DIRECTORY/foundation-integration-console.log"
check_godot_log \
"production foundation integration" \
"$QUALITY_TEMP_DIRECTORY/foundation-integration-console.log"
printf 'Quality gate: sunlit shallows environment integration\n'
"$GODOT_EXECUTABLE" --headless \
--log-file "$QUALITY_TEMP_DIRECTORY/sunlit-shallows-integration.log" \
--path . \
--script tests/integration/run_sunlit_shallows_environment.gd \
2>&1 | tee "$QUALITY_TEMP_DIRECTORY/sunlit-shallows-integration-console.log"
check_godot_log \
"sunlit shallows environment integration" \
"$QUALITY_TEMP_DIRECTORY/sunlit-shallows-integration-console.log"
printf 'Quality gate: POC B integration\n'
"$GODOT_EXECUTABLE" --headless \
--log-file "$QUALITY_TEMP_DIRECTORY/poc_b_integration.log" \
--path . \
--script tests/run_poc_b_integration.gd \
2>&1 | tee "$QUALITY_TEMP_DIRECTORY/poc_b-integration-console.log"
check_godot_log "POC B integration" "$QUALITY_TEMP_DIRECTORY/poc_b-integration-console.log"
printf 'Quality gate: passed.\n'