Some checks failed
The last structural fix for the collision class that has bitten three times. Both containers now clone the repository into their OWN named volume instead of bind-mounting a human's working tree, so an agent's local git config cannot capture a human's commits, a credential helper cannot leak a container-only path onto the host, and a `git add -A` cannot sweep another party's in-flight files. Cloned once at startup and never auto-pulled: pulling under a running agent moves files out from under whatever it is mid-edit, which is the same bug again. Accepted knowingly: Claude Code keys per-project memory off the working directory, so moving off the host path starts that memory empty. The corpus in docs/ is the memory that matters and it travels with the clone. Other changes: * docker/agent -> docker/decoder; the launcher is sylph-decoder. Roles, not "the agent", now that there is more than one. * /reborn is gone -- one repository now, so the port reads HANDOFF from its own checkout rather than through a live read-only mount of someone else's tree. * Canary mounts separately at /canary; it stays a fork tracking upstream. * A shared `sylpheed-exchange` volume at /exchange, with tools/ on PATH so `share` is available in both. * The decoder's credential file gets the .host-copy treatment the port already had -- `credential.helper=store` rewrites by rename-over-target, which is EBUSY on a bind mount and reports a fatal that is not one. * Budget split deliberately: decoder 5 cpu / 6 GB, port 3 / 4, leaving room for the planned Referee. "Half the host" was right when there was one agent. Prompts move to docs/agents/ and are rewritten around the protocol: the oracle is the running game, dynamic RE stays with the decoder, each iteration must attempt to refute one claim of the other, and neither may verify its way out of its own role.
48 lines
1.9 KiB
Bash
Executable File
48 lines
1.9 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Build / test Sylpheed Reborn inside the container.
|
|
#
|
|
# CARGO_TARGET_DIR points outside the bind-mounted repo (see the Dockerfile), so
|
|
# this never fights the host's incremental state.
|
|
#
|
|
# build-reborn cargo build --workspace
|
|
# build-reborn test cargo test --workspace, disc tests enabled
|
|
# build-reborn ci fmt + clippy + test
|
|
# build-reborn <cargo args...>
|
|
set -euo pipefail
|
|
|
|
SRC="${PROJECT_DIR:-/work}/Syplheed-Reborn"
|
|
JOBS="${SYLPH_JOBS:-2}"
|
|
cd "$SRC"
|
|
|
|
# The disc-gated integration tests self-skip when this is unset, and a green run
|
|
# then means almost nothing — point them at the extracted disc if it is there.
|
|
if [ -z "${SYLPHEED_DISC:-}" ]; then
|
|
for c in "${PROJECT_DIR:-/work}/sylph_extract" "$SRC/../sylph_extract"; do
|
|
[ -d "$c/dat" ] && { export SYLPHEED_DISC="$(readlink -f "$c")"; break; }
|
|
done
|
|
fi
|
|
[ -n "${SYLPHEED_DISC:-}" ] && export SYLPHEED_RES3D="$SYLPHEED_DISC/hidden/resource3d"
|
|
if [ -z "${SYLPHEED_ISO:-}" ]; then
|
|
iso="$(find "${PROJECT_DIR:-/work}" -maxdepth 2 -iname '*.iso' -print -quit 2>/dev/null || true)"
|
|
[ -n "$iso" ] && export SYLPHEED_ISO="$iso"
|
|
fi
|
|
echo "==> SYLPHEED_DISC=${SYLPHEED_DISC:-<unset — disc tests will SKIP>}" >&2
|
|
|
|
export CARGO_BUILD_JOBS="$JOBS"
|
|
|
|
case "${1:-build}" in
|
|
build) shift || true; exec cargo build --workspace "$@" ;;
|
|
test) shift || true; exec cargo test --workspace "$@" ;;
|
|
ci)
|
|
cargo fmt --all -- --check
|
|
cargo clippy --workspace -- -D warnings
|
|
cargo test --workspace
|
|
# NOTE: `just ci` also checks wasm32. That leg does not build, and not for
|
|
# any reason in this crate: the workspace pins tokio with features=["full"],
|
|
# which pulls mio, which refuses to compile for wasm32. Left out here rather
|
|
# than reported as a failure of the change under test.
|
|
echo "==> native CI green (wasm leg skipped — see the note in this script)"
|
|
;;
|
|
*) exec cargo "$@" ;;
|
|
esac
|