From d8b745c16442c95e0158f45e8d028adec24a3d54 Mon Sep 17 00:00:00 2001 From: Joakim Persson Date: Sun, 16 Aug 2026 00:30:51 +0200 Subject: [PATCH] smoke+docs: pin the feeder's failed-remote-mine detection; REMOTE_PATH is server-visible MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit First boot of the 2026-08-15 image on EMB-7KJ4VR4G shipped 7 transcripts to the palace host and filed none. Two causes, neither visible in the log: - MEMPALACE_PI_REMOTE_PATH was unset, so the feeder used its /data/feed default, which assumes a CONTAINERIZED palace server. That fleet's primary runs natively (systemd user unit + uv tool), so it only sees host paths and the mine died with "source directory not found". rsync had already succeeded. - The feeder decided success with `'"error"' in body`, but MCP escapes the tool's JSON inside result.content[].text, so the check was blind and the catch-up log said "Done. Wing updated." Fixed in mempalace-toolkit 6e1f4f3, which ships `--self-test` with fixtures pinning that exact response body. - smoke-test.sh: run `mempalace-pi-session --self-test` against the BAKED toolkit, so a stale or reverted MEMPALACE_TOOLKIT_REF cannot reintroduce a feeder that mines nothing while reporting success. - .env.example: spell out that MEMPALACE_PI_REMOTE_PATH is the path the SERVER PROCESS can open — container path for a dockerized server, and identical to the ssh-target path for a native one — and that a mismatch fails quietly. --- .env.example | 15 ++++++++++++--- scripts/smoke-test.sh | 10 ++++++++++ 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/.env.example b/.env.example index b0fb5ad..470291f 100644 --- a/.env.example +++ b/.env.example @@ -57,9 +57,18 @@ SSH_KEY_PATH=~/.ssh # the server to mine its own local copy. Without MEMPALACE_PI_SSH_TARGET the # feeder is skipped (a remote palace with no inbox has nothing to mine). # MEMPALACE_PI_SSH_TARGET where to rsync to, as user@host:path -# MEMPALACE_PI_REMOTE_PATH what that inbox is called ON THE SERVER — must be -# the container path if the server runs in Docker -# (see docker-compose.mempalace.yml) +# MEMPALACE_PI_REMOTE_PATH what that inbox is called ON THE SERVER — i.e. the +# path the SERVER PROCESS can open. If the palace +# server runs in Docker, that is the container path +# (see docker-compose.mempalace.yml). If it runs +# NATIVELY (systemd unit / uv tool / plain +# `mempalace serve`), it sees host paths, so this +# must equal the path half of +# MEMPALACE_PI_SSH_TARGET. Getting this wrong is +# quiet: rsync still succeeds and only the mine +# fails with "source directory not found", so +# transcripts ship and are filed nowhere. The feeder +# warns in preflight when the two paths disagree. # MEMPALACE_PI_DEVICE inbox subdirectory for this machine (default: hostname) # MEMPALACE_PI_SSH_TARGET=user@palace-host:/srv/mempalace-feed # MEMPALACE_PI_REMOTE_PATH=/data/feed diff --git a/scripts/smoke-test.sh b/scripts/smoke-test.sh index 48016d1..0c864e9 100755 --- a/scripts/smoke-test.sh +++ b/scripts/smoke-test.sh @@ -195,6 +195,16 @@ run_expect "remote-palace-without-inbox skip is announced, not silent" \ "MemPalace catch-up skipped" run "...and the skip notice names the variable that fixes it" \ "grep -A6 'MemPalace catch-up skipped' /usr/local/bin/entrypoint-user.sh | grep -q 'MEMPALACE_PI_SSH_TARGET'" +# A remote mine that FAILS must not report success. MCP answers a hard tool +# failure with HTTP 200 and the tool's own JSON escaped inside +# result.content[].text, so the feeder's old `'\"error\"' in body` check could +# never see it: on 2026-08-15 a mine that died with "source directory not found: +# '/data/feed/...'" logged "Done. Wing updated." and exited 0, and this +# container's transcripts were filed nowhere for a whole session. The feeder +# carries fixtures for that exact body; run them against the baked toolkit so a +# stale/reverted toolkit ref can't reintroduce a silent feed. +run "baked feeder detects a failed remote mine (no silent false success)" \ + "mempalace-pi-session --self-test" # v1.0.0 base additions — verify presence and basic functionality. run "pandoc" "pandoc --version" run "typst" "typst --version"