Files
Edward Langley ebf3dd2ba2 tooling: pr-reviews polls past the second poll; stale harness lock names its fix
improvise-7epn: two cases on the one-tick-per-read clock. One resolves on
poll 3, and one times out after polling up to the deadline. Replacing the
post-poll deadline check with `break` now fails exactly those two
(23 passed, 2 failed), where before it left the suite 23/23.

improvise-lnsh: when `cargo metadata --locked` refuses the opfs-contract
lock, build.sh now says not to remove --locked and names
`cargo update -w --manifest-path harness/opfs-contract/Cargo.toml`.
Checked by hand against a lock with pest pinned to 2.9.1. Evidence is in
context/test-evidence/tooling.md.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VdfEGXA7aJ6ftMsCc9PJze
2026-09-23 07:49:40 -07:00

51 lines
2.4 KiB
Bash
Executable File

#!/bin/sh
# Build everything the browser harness serves, into harness/serve/.
#
# harness/serve/ the assembled site, exactly as `web/assemble.sh`
# produces it for GitHub Pages
# harness/serve/opfs/ this harness's own page, worker and wasm bundle
#
# One server root, so Playwright runs one `python3 -m http.server`. The site
# half is the *deployed* arrangement rather than `web/` itself, because a
# harness that runs against a different tree from the one that ships is
# testing something nobody deploys (improvise-vvl3).
#
# Re-run THIS script, never `web/assemble.sh harness/serve` alone: assembling
# starts with `rm -rf` of its output, which deletes opfs/ and the fixtures
# (improvise-mkbp). opfs.spec.js says so if it finds opfs/ missing.
set -eu
root=$(cd "$(dirname "$0")/.." && pwd)
serve="$root/harness/serve"
# A stale opfs-contract/Cargo.lock fails HERE rather than being rewritten in
# every agent's tree (improvise-mkbp). wasm-pack cannot enforce this: it
# re-resolves the lock itself before any `-- --locked` reaches cargo build.
# Fix a failure with `cargo update -w` in harness/opfs-contract, and commit it.
cargo metadata --locked --format-version 1 \
--manifest-path "$root/harness/opfs-contract/Cargo.toml" >/dev/null || {
echo "harness/build.sh: harness/opfs-contract/Cargo.lock is stale. Do not remove --locked." >&2
echo " Run: cargo update -w --manifest-path harness/opfs-contract/Cargo.toml, and commit the lock." >&2
exit 1
}
"$root/web/build.sh" >/dev/null
"$root/web/assemble.sh" "$serve" harness >/dev/null
# The harness's own documents, beside the shipped one. `web/demo.improv` is
# the front page and stays as it is (gotcha 46); a grouped, multi-level model
# is the only way to reach the header-level, group-span and collapse paths
# `improvise-anr9` added (improvise-plcx). A seed that 404s is NOT an error --
# worker.js answers it with an empty model -- so every spec over these asserts
# real labels rather than that a grid exists.
cp -f "$root"/harness/fixtures/*.improv "$serve/app/"
wasm-pack build "$root/harness/opfs-contract" \
--target web --out-dir "$root/harness/www/opfs/pkg"
mkdir -p "$serve/opfs"
cp -f "$root/harness/www/opfs/index.html" "$root/harness/www/opfs/worker.js" "$serve/opfs/"
cp -rf "$root/harness/www/opfs/pkg" "$serve/opfs/pkg"
rm -f "$serve/opfs/pkg/.gitignore" "$serve/opfs/pkg/package.json"
echo "harness/serve ready"