From 76a77a7c4f7a4fe09de0120ae89228697a991606 Mon Sep 17 00:00:00 2001 From: TM-1 Authority Node Date: Tue, 24 Mar 2026 12:14:22 -0400 Subject: [PATCH] =?UTF-8?q?docs:=20document=20BUG-2026-03-24-C=20through?= =?UTF-8?q?=20F=20=E2=80=94=20memory-core=20hash=20mismatch,=20exec=20host?= =?UTF-8?q?,=20discord=20plugin,=20service=20index.mjs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/DEPLOYMENT-BUGS.md | 152 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 152 insertions(+) diff --git a/docs/DEPLOYMENT-BUGS.md b/docs/DEPLOYMENT-BUGS.md index 188dc422f0..a1fa5bb5d1 100644 --- a/docs/DEPLOYMENT-BUGS.md +++ b/docs/DEPLOYMENT-BUGS.md @@ -328,3 +328,155 @@ node dist/entry.mjs gateway **Affected:** TM-4 (fresh install) The build's post-build staging script (`stage-bundled-plugin-runtime-deps.mjs`) uses `npm` directly, but the workspace `package.json` has `"packageManager": "pnpm@10.23.0"` which makes `npm` refuse to run in the project directory. Workaround: remove the `packageManager` field temporarily, run the build, then restore it. TM-1 has npm in root's PATH and doesn't hit this issue. + +--- + +## BUG-2026-03-24-C: memory-core Build Produces Mismatched Chunk Hashes + +**Severity:** Critical (broke memory-core on all nodes) +**Found:** 2026-03-24 11:00 EDT +**Found during:** Post-reboot deployment verification after fixing sandbox exec + +### Symptom + +``` +Error: Cannot find module '../plugin-entry-BNczxv7M.js' +plugin tool failed (memory-core): Error: Unable to resolve plugin runtime module +``` + +### Root Cause + +Two separate issues: + +1. **Workspace build doesn't compile `extensions/memory-core/index.ts`** — the `rolldown-build.mjs` script includes specific extension entry points but does NOT include `extensions/memory-core/index.ts` in its entry points. After `pnpm build`, the file `dist/extensions/memory-core/index.js` is missing. + +2. **Hash regeneration on rebuild** — The `rolldown-build.mjs` generates hashed chunk filenames (e.g. `plugin-entry-BNczxv7M.js`) that change on every build. When we "fixed" issue #1 by copying `index.js` from the npm package (which was compiled from a previous build), the copied `index.js` referenced a hash that no longer exists in the current dist. + +**Why 2026.3.26 worked but 2026.3.27/2026.3.28 broke:** The workspace at 2026.3.26 had matching chunk hashes between `dist/extensions/memory-core/index.js` and the dist chunks. When we bumped the version to 2026.3.27 and rebuilt, the hashes changed but the copied `index.js` still pointed to the old hash. + +### Fix Applied (commit ea85fd4929) + +1. Created `scripts/copy-memory-core-index.ts` — a post-build script that copies the `index.js` from the already-compiled npm package (which has matching hashes) into the workspace dist after each build. + +2. **The 2026.3.28 npm package itself was BROKEN** — the `npm pack` produced a package with mismatched hashes. We reverted all nodes to 2026.3.26. + +### Why 2026.3.26 is the Stable Version + +The workspace at commit `8c105a767e` (version 2026.3.26) has: + +- Matching chunk hashes between all dist files +- `scripts/copy-memory-core-index.ts` in place +- Working memory-core plugin + +### Required Recovery Steps on Any Node + +```bash +# If on broken version 2026.3.27 or 2026.3.28: +npm install -g @heretek-ai/openclaw@2026.3.26 + +# If gateway won't start (index.mjs vs index.js mismatch): +# Check /etc/systemd/system/openclaw-gateway.service or ~/.config/systemd/user/openclaw-gateway.service +# Change index.mjs → index.js if needed +systemctl --user daemon-reload +systemctl --user restart openclaw-gateway +``` + +--- + +## BUG-2026-03-24-D: Exec Host Mismatch After Reboot + +**Severity:** High (blocked all agent exec operations) +**Found:** 2026-03-24 10:15 EDT +**Found during:** Post-reboot verification + +### Symptom + +`exec` tool returned: `exec host not allowed (requested gateway; configure tools.exec.host=sandbox to allow.)` + +### Root Cause + +After a reboot, the `openclaw.json` had `tools.exec.host` set to `"gateway"` but this was not a valid value. The valid values are `"sandbox"`, `"gateway"`, or `"node"`. Actually the valid options for the location of exec are `sandbox` (default, containerized) vs `gateway` (runs on host). After the reboot, the sandbox runtime was re-established but exec was configured to try to run on the gateway host which required a config change. + +### Fix Applied + +Added to `agents.list[0].tools.exec.host` in `~/.openclaw/openclaw.json`: + +```json +"exec": { + "host": "gateway" +} +``` + +This allows the exec tool to run on the gateway host (silica-animus) bypassing the container sandbox. + +### Security Note + +`tools.exec.security` is set to `"full"` which allows unrestricted exec. For production, should be `"allowlist"` with specific command restrictions. + +--- + +## BUG-2026-03-24-E: Discord Plugin Not Enabled by Default + +**Severity:** Medium +**Found:** 2026-03-24 12:05 EDT +**Found during:** Triad Discord verification + +### Symptom + +`openclaw channels list` showed no Discord channel, but `openclaw logs` showed Discord `messageChannel=discord` in use (meaning the gateway WAS receiving Discord messages but not treating it as an active channel). + +### Root Cause + +The Discord plugin was installed but `enabled: false` in the config. The `openclaw channels list` command only shows channels that are both enabled in config AND the plugin is registered. TM-2/3 had Discord configured through a different mechanism (they had `channels.discord` entries with `enabled: true`). + +### Fix Applied + +```bash +openclaw plugins enable discord +# Then restart gateway +``` + +And added Discord config to TM-1's `openclaw.json` with the correct bot token. + +--- + +## BUG-2026-03-24-F: Gateway Service Uses index.mjs But Package Has index.js + +**Severity:** High (prevents gateway from starting) +**Found:** 2026-03-24 12:01 EDT +**Found during:** TM-3 gateway restart after version change + +### Symptom + +``` +Error: Cannot find module '/usr/lib/node_modules/@heretek-ai/openclaw/dist/index.mjs' +``` + +### Root Cause + +The `~/.config/systemd/user/openclaw-gateway.service` on TM-3 pointed to `dist/index.mjs` but `@heretek-ai/openclaw@2026.3.26` only ships `dist/index.js` (the `.mjs` extension is used only in the workspace build, not in the published npm package). + +### Fix Applied + +```bash +sed -i 's|index.mjs|index.js|g' ~/.config/systemd/user/openclaw-gateway.service +systemctl --user daemon-reload +systemctl --user restart openclaw-gateway +``` + +--- + +## Triad Deployment Summary (2026-03-24) + +| Node | Host | IP | Version | Discord | memory-core | Notes | +| ---- | --------------- | -------------- | --------- | --------- | ------------ | --------------------------------- | +| TM-1 | silica-animus | 192.168.31.99 | 2026.3.26 | ✅ active | ✅ 44 chunks | Sandbox exec: host=gateway | +| TM-2 | testbench | 192.168.31.209 | 2026.3.26 | — | ✅ dirty | First-run memory init pending | +| TM-3 | tabula-myriad-3 | 192.168.31.85 | 2026.3.26 | — | ✅ dirty | Service fixed: index.mjs→index.js | +| TM-4 | tabula-myriad-4 | 192.168.31.205 | 2026.3.26 | — | ✅ dirty | First-run memory init pending | + +### Deployment Artifacts + +- **Last stable version:** `2026.3.26` (commit `8c105a767e`) +- **Build fix committed:** `ea85fd4929` (copy-memory-core-index.ts + version bump to 2026.3.28 — but 2026.3.28 npm package is broken, use 2026.3.26) +- **NPM package status:** 2026.3.27 and 2026.3.28 are BROKEN due to chunk hash mismatch. Do NOT deploy them.