Files
julian.kiedaischandClaude Opus 5.5 5c16cf18b4 test(core): Swift oracle — the filius-ipad core built on Linux as the reference
tools/swift-oracle builds the unchanged Swift runtime (pinned 3b5ded0)
in Docker and replays JSON scenarios; the TypeScript engine must produce
the same trace events, results and end state. Five scenarios, 884
events, identical.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 19:33:14 +00:00

27 lines
1.1 KiB
Bash
Executable File

#!/bin/sh
# Copies the UI-free Swift sources of filius-ipad, at the commit the port
# follows, into Sources/FiliusCore and applies the Linux patches.
set -eu
here="$(cd "$(dirname "$0")" && pwd)"
commit=3b5ded0
upstream="$here/.upstream"
if [ ! -d "$upstream/.git" ]; then
git clone -q https://github.com/filius-project/filius-ipad "$upstream"
fi
git -C "$upstream" fetch -q origin
git -C "$upstream" checkout -q "$commit"
core="$here/Sources/FiliusCore"
rm -rf "$core"
mkdir -p "$core"
editor="$upstream/ios/FiliusPad/TopologyEditor"
cp "$editor"/State/*.swift "$editor"/State/Reports/*.swift "$editor"/Model/*.swift \
"$editor"/Persistence/*.swift "$upstream/ios/FiliusPad/Localization/FiliusLocalization.swift" "$core/"
# Apple's Network framework has no Linux counterpart; the LAN transport of the
# remote link is not needed to replay a simulation.
rm "$core/TopologyRemoteLinkLANController.swift"
for patch in "$here"/patches/*.patch; do
(cd "$core" && patch -p1 --forward --quiet < "$patch")
done
echo "filius-ipad $commit → $core ($(ls "$core" | wc -l) files)"