oficina / slides Public

Merge branch 'fix/hosted-ci' into main

Merge branch 'fix/hosted-ci' into main

Hosted CI fixes: keep the save-queue test's event loop alive under Node 22,
build wasm natively on non-x86 Linux (byte comparison skipped there), and
re-pin home/connect to a published commit.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev ee29570c64259f48979a316d7d05c449e02e6b7a parent ddf880bparent 9faafd2
6 files changed, +49 −10
  • .amadan/ci.d/10-gate +12 −2
  • fixtures/save-queue.test.mjs +8 −1
  • go.mod +1 −1
  • go.sum +2 −2
  • scripts/build-pdf-wasm.sh +13 −2
  • scripts/build-wasm.sh +13 −2

CI passed — run details

diff --git a/.amadan/ci.d/10-gate b/.amadan/ci.d/10-gate
index 3c3d2c4..c3f99cc 100755
--- a/.amadan/ci.d/10-gate
+++ b/.amadan/ci.d/10-gate
@@ -93,7 +93,12 @@ echo "=== wasm: the artifact the host embeds"
./scripts/build-wasm.sh
echo "=== the embedded wasm must match a fresh build"
-if ! cmp -s core/target/wasm32-unknown-unknown/release/slides_core.wasm internal/slides/core/testdata/slides_core.wasm; then
+if [[ "$(uname -s)" == Linux && "$(uname -m)" != x86_64 ]]; then
+ # Cargo hashes the host architecture into crate identities, so no
+ # Linux arm64 build reproduces the committed amd64 bytes (the build
+ # script builds natively here). Linux amd64 runs keep this check.
+ echo "gate: SKIPPED on Linux/$(uname -m): internal/slides/core/testdata/slides_core.wasm is the canonical amd64 build, which no build on this host reproduces byte for byte"
+elif ! cmp -s core/target/wasm32-unknown-unknown/release/slides_core.wasm internal/slides/core/testdata/slides_core.wasm; then
echo "gate: internal/slides/core/testdata/slides_core.wasm does not match a fresh build — rebuild and commit the wasm:" >&2
echo " ./scripts/build-wasm.sh && cp core/target/wasm32-unknown-unknown/release/slides_core.wasm internal/slides/core/testdata/slides_core.wasm" >&2
exit 1
@@ -126,7 +131,12 @@ echo "=== wasm: the pdf artifact the host embeds"
./scripts/build-pdf-wasm.sh
echo "=== the embedded pdf wasm must match a fresh build"
-if ! cmp -s core/pdf/target/wasm32-unknown-unknown/release/slides_pdf.wasm internal/slides/pdfcore/testdata/slides_pdf.wasm; then
+if [[ "$(uname -s)" == Linux && "$(uname -m)" != x86_64 ]]; then
+ # Cargo hashes the host architecture into crate identities, so no
+ # Linux arm64 build reproduces the committed amd64 bytes (the build
+ # script builds natively here). Linux amd64 runs keep this check.
+ echo "gate: SKIPPED on Linux/$(uname -m): internal/slides/pdfcore/testdata/slides_pdf.wasm is the canonical amd64 build, which no build on this host reproduces byte for byte"
+elif ! cmp -s core/pdf/target/wasm32-unknown-unknown/release/slides_pdf.wasm internal/slides/pdfcore/testdata/slides_pdf.wasm; then
echo "gate: internal/slides/pdfcore/testdata/slides_pdf.wasm does not match a fresh build — rebuild and commit the wasm:" >&2
echo " ./scripts/build-pdf-wasm.sh && cp core/pdf/target/wasm32-unknown-unknown/release/slides_pdf.wasm internal/slides/pdfcore/testdata/slides_pdf.wasm" >&2
exit 1
diff --git a/fixtures/save-queue.test.mjs b/fixtures/save-queue.test.mjs
index 243f135..5652d65 100644
--- a/fixtures/save-queue.test.mjs
+++ b/fixtures/save-queue.test.mjs
@@ -323,7 +323,14 @@ test('a save is sent keepalive, and given up if it is never answered', async ()
assert.equal(answerTimeoutMs(new Uint8Array(8)), SAVE_TIMEOUT_MS + 1 + 5000)
const { signal } = await saveRequest(new Uint8Array(1), { timeoutMs: 10 })
assert.ok(signal, 'a save on the wire forever would stop every save after it')
- await new Promise((resolve) => signal.addEventListener('abort', resolve))
+ // AbortSignal.timeout's timer does not hold the event loop open. Node
+ // 24's test runner keeps it open anyway; Node 22's does not, so with
+ // nothing else pending it ends the file here and cancels every later
+ // test. A held timer keeps the loop alive until the signal fires.
+ await new Promise((resolve) => {
+ const hold = setTimeout(() => {}, 60_000)
+ signal.addEventListener('abort', () => { clearTimeout(hold); resolve() })
+ })
assert.equal(signal.reason.name, 'TimeoutError')
})
diff --git a/go.mod b/go.mod
index 7d14ee8..7f702e6 100644
--- a/go.mod
+++ b/go.mod
@@ -7,7 +7,7 @@ toolchain go1.26.5
require (
amadan.net/oficina/agent-access.git v0.0.0-20261024232549-8ed8ba826000
amadan.net/oficina/estilo.git v0.0.0-20261025200559-260f98c42e2d
- amadan.net/oficina/home/connect v0.0.0-20261030223040-6d99b0ccc542
+ amadan.net/oficina/home/connect v0.0.0-20261101223546-d82341cd9a0c
amadan.net/oficina/home/dashboard v0.0.0-20261024234842-3774eb68f816
amadan.net/oficina/home/handoff v0.0.0-20261024233715-ff16bf56bc4d
amadan.net/oficina/home/roster v0.0.0-20261028171508-67c12e39a9d2
diff --git a/go.sum b/go.sum
index 9bd63b3..a3a08b3 100644
--- a/go.sum
+++ b/go.sum
@@ -2,8 +2,8 @@ amadan.net/oficina/agent-access.git v0.0.0-20261024232549-8ed8ba826000 h1:L07nc+
amadan.net/oficina/agent-access.git v0.0.0-20261024232549-8ed8ba826000/go.mod h1:Ph9PIa3VE1IEaUzZiQH6D+IQ6HThWWGfVr0ecMMgrFA=
amadan.net/oficina/estilo.git v0.0.0-20261025200559-260f98c42e2d h1:p9+01xRdBD7s1viTINgQ6XoDD5ghOxYubD7FNcjhBTw=
amadan.net/oficina/estilo.git v0.0.0-20261025200559-260f98c42e2d/go.mod h1:4u0jNBtIdMLOsJyrScfqoEuYDJF7BBM3qM9YWbzt6aw=
-amadan.net/oficina/home/connect v0.0.0-20261030223040-6d99b0ccc542 h1:b2JT0B0Y+5sTsCmVhX6cywCRdGd9s3lRP8wpqOytlbM=
-amadan.net/oficina/home/connect v0.0.0-20261030223040-6d99b0ccc542/go.mod h1:ix81eFV87yE9f2SXiRuxYCVM4lAgTRC5YoQMiH3+TDk=
+amadan.net/oficina/home/connect v0.0.0-20261101223546-d82341cd9a0c h1:6NOvTeDLlctihXkIa/FCr1np3N3N4oKB0YS9x8VSfxI=
+amadan.net/oficina/home/connect v0.0.0-20261101223546-d82341cd9a0c/go.mod h1:ix81eFV87yE9f2SXiRuxYCVM4lAgTRC5YoQMiH3+TDk=
amadan.net/oficina/home/dashboard v0.0.0-20261024234842-3774eb68f816 h1:AFDuOio0MxNxN9ZWVc3lul1QHkNjNUCO56kXpe/Fw3I=
amadan.net/oficina/home/dashboard v0.0.0-20261024234842-3774eb68f816/go.mod h1:+7xsX+QyVFrKy5gDAGh+FZ5+75z4CibWTL0wl9DWAw0=
amadan.net/oficina/home/handoff v0.0.0-20261024233715-ff16bf56bc4d h1:8RTZkLQnyxvH2g0RMovhN/m2LN9D8qb+kBfqdBeqq+s=
diff --git a/scripts/build-pdf-wasm.sh b/scripts/build-pdf-wasm.sh
index 2ed0659..4d2474d 100755
--- a/scripts/build-pdf-wasm.sh
+++ b/scripts/build-pdf-wasm.sh
@@ -4,17 +4,28 @@
set -euo pipefail
cd "$(dirname "$0")/.."
# Lint the PDF renderer before building its standalone C ABI module.
-if [[ "${1:-}" != "--build-only" && "${1:-}" != "--canonical-build" ]]; then
+if [[ "${1:-}" != "--build-only" && "${1:-}" != "--canonical-build" && "${1:-}" != "--native-build" ]]; then
cargo clippy --manifest-path core/pdf/Cargo.toml --all-targets -- -D warnings
fi
# Rust/Cargo crate identities affect code ordering even after path remapping.
-# Build on Linux amd64 at fixed source/toolchain paths on every host.
+# Build on Linux amd64 at fixed source/toolchain paths on every host that can.
if [[ "${1:-}" == "--canonical-build" ]]; then
[[ "$(uname -s)/$(uname -m)" == "Linux/x86_64" && "$(pwd)" == /work \
&& "$CARGO_HOME" == /usr/local/cargo && "$RUSTUP_HOME" == /usr/local/rustup ]] \
|| { echo "build-pdf-wasm: invalid canonical build environment" >&2; exit 1; }
export CARGO_TARGET_DIR=/work/core/pdf/target RUSTUP_TOOLCHAIN=1.98.0
+elif [[ "${1:-}" == "--native-build" ]]; then
+ : # this checkout, this host's toolchain: built below, not reproducible
else
+ # Cargo's crate identities (-C metadata) also depend on the host
+ # architecture, so no build on a Linux arm64 host matches the committed
+ # amd64 bytes, and the amd64 image crashes under qemu there. Build
+ # natively instead, for the tests that read the artifact; the gate skips
+ # its byte-for-byte check on these hosts and keeps it on Linux amd64.
+ if [[ "$(uname -s)" == Linux && "$(uname -m)" != x86_64 ]]; then
+ echo "build-pdf-wasm: Linux/$(uname -m) builds natively; the result is not the canonical amd64 build" >&2
+ exec ./scripts/build-pdf-wasm.sh --native-build
+ fi
out="core/pdf/target/wasm32-unknown-unknown/release/slides_pdf.wasm"
mkdir -p "$(dirname "$out")"
temporary=$(mktemp "${out}.XXXXXX")
diff --git a/scripts/build-wasm.sh b/scripts/build-wasm.sh
index dbd11b1..5a535c4 100755
--- a/scripts/build-wasm.sh
+++ b/scripts/build-wasm.sh
@@ -8,17 +8,28 @@ cd "$(dirname "$0")/.."
# Doc::with_client_id() both draw entropy this build has no safe source
# for. A doc comment alone has been wrong, or gotten around, more than
# once; this is the actual enforcement.
-if [[ "${1:-}" != "--build-only" && "${1:-}" != "--canonical-build" ]]; then
+if [[ "${1:-}" != "--build-only" && "${1:-}" != "--canonical-build" && "${1:-}" != "--native-build" ]]; then
cargo clippy --manifest-path core/Cargo.toml --all-targets -- -D warnings -D clippy::disallowed_methods
fi
# Rust/Cargo crate identities affect code ordering even after path remapping.
-# Build on Linux amd64 at fixed source/toolchain paths on every host.
+# Build on Linux amd64 at fixed source/toolchain paths on every host that can.
if [[ "${1:-}" == "--canonical-build" ]]; then
[[ "$(uname -s)/$(uname -m)" == "Linux/x86_64" && "$(pwd)" == /work \
&& "$CARGO_HOME" == /usr/local/cargo && "$RUSTUP_HOME" == /usr/local/rustup ]] \
|| { echo "build-wasm: invalid canonical build environment" >&2; exit 1; }
export CARGO_TARGET_DIR=/work/core/target RUSTUP_TOOLCHAIN=1.98.0
+elif [[ "${1:-}" == "--native-build" ]]; then
+ : # this checkout, this host's toolchain: built below, not reproducible
else
+ # Cargo's crate identities (-C metadata) also depend on the host
+ # architecture, so no build on a Linux arm64 host matches the committed
+ # amd64 bytes, and the amd64 image crashes under qemu there. Build
+ # natively instead, for the tests that read the artifact; the gate skips
+ # its byte-for-byte check on these hosts and keeps it on Linux amd64.
+ if [[ "$(uname -s)" == Linux && "$(uname -m)" != x86_64 ]]; then
+ echo "build-wasm: Linux/$(uname -m) builds natively; the result is not the canonical amd64 build" >&2
+ exec ./scripts/build-wasm.sh --native-build
+ fi
out="core/target/wasm32-unknown-unknown/release/slides_core.wasm"
mkdir -p "$(dirname "$out")"
temporary=$(mktemp "${out}.XXXXXX")