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>
5 files changed,
+30
−7
.amadan/ci.d/10-gate+6 −1fixtures/save-queue.test.mjs+8 −1go.mod+1 −1go.sum+2 −2scripts/build-wasm.sh+13 −2
CI passed — run details
diff --git a/.amadan/ci.d/10-gate b/.amadan/ci.d/10-gate| index 6393361..b25e836 100755 |
| --- a/.amadan/ci.d/10-gate |
| +++ b/.amadan/ci.d/10-gate |
| @@ -241,7 +241,12 @@ cargo build --release --manifest-path core/Cargo.toml |
| cargo test --manifest-path core/Cargo.toml |
| echo "=== the embedded wasm must match a fresh build" |
| -if ! cmp -s core/target/wasm32-unknown-unknown/release/docs_core.wasm internal/core/testdata/docs_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/core/testdata/docs_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/docs_core.wasm internal/core/testdata/docs_core.wasm; then |
| echo "gate: internal/core/testdata/docs_core.wasm is stale. Re-copy it." >&2 |
| exit 1 |
| fi |
diff --git a/fixtures/save-queue.test.mjs b/fixtures/save-queue.test.mjs| index 3b49d94..39982e8 100644 |
| --- a/fixtures/save-queue.test.mjs |
| +++ b/fixtures/save-queue.test.mjs |
| @@ -260,7 +260,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 92aaa9f..9a84256 100644 |
| --- a/go.mod |
| +++ b/go.mod |
| @@ -5,7 +5,7 @@ go 1.26.5 |
| require ( |
| amadan.net/oficina/agent-access.git v0.0.0-20261024232549-8ed8ba826000 |
| amadan.net/oficina/estilo.git v0.0.0-20261110225909-62be5bcc8ad7 |
| - 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-20261024235511-baa2503c7064 |
| amadan.net/oficina/home/handoff v0.0.0-20260908102137-481d2d57f489 |
| amadan.net/oficina/home/roster v0.0.0-20261030153823-602f5136f9af |
diff --git a/go.sum b/go.sum| index 688073f..fa57ee6 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-20261110225909-62be5bcc8ad7 h1:BxvPwmUzKfreL7+ufLoVtpBM6MMnga2bMH6w3ZcmXG4= |
| amadan.net/oficina/estilo.git v0.0.0-20261110225909-62be5bcc8ad7/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-20261024235511-baa2503c7064 h1:2YbDksZDxpY9khlhXmTeiM89yze7w2XfYSumtrzH4tc= |
| amadan.net/oficina/home/dashboard v0.0.0-20261024235511-baa2503c7064/go.mod h1:+7xsX+QyVFrKy5gDAGh+FZ5+75z4CibWTL0wl9DWAw0= |
| amadan.net/oficina/home/handoff v0.0.0-20260908102137-481d2d57f489 h1:RPKtyry/71i06o8L+gjAaUyexbmG56kO1YPs601URAM= |
diff --git a/scripts/build-wasm.sh b/scripts/build-wasm.sh| index d277b38..1d70bd2 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/docs_core.wasm" |
| mkdir -p "$(dirname "$out")" |
| temporary=$(mktemp "${out}.XXXXXX") |