Fixes #2098
## Problem
When OpenClaw gateway exits abnormally, the openclaw-runtime.lock/ dir
and owner.json remain on disk. On restart, if the OS reuses the same
PID, pidIsAlive() signals itself and incorrectly reports duplicate
runtime.
## Fix
Added `if (pid === process.pid) return false;` in pidIsAlive() to
exclude self-PID from stale lock check. Zero side-effect: owner.pid can
only equal process.pid when the lock is from a previous lifecycle of the
same process.
## Files changed
- apps/memos-local-plugin/adapters/openclaw/runtime-lock.ts
Description
This PR consolidates the tested local-plugin fixes from
fix-20260820-local-plugin:batchSize, token-basedmaxInputTokens, bounded four-chunk sampling and vector pooling, adaptive batch splitting for 400/413/422 responses, and per-input failure isolation across capture, import, and embedding rebuild paths;maxInputTokens: 1024, while preserving0for existing configurations created before this setting;This supersedes #2123.
Related Issue (Required): Fixes #2121
Related: #2099
Type of change
How Has This Been Tested?
pnpm test: 176 test files passed; 1,466 tests passed and 2 skipped.pnpm lintpnpm build:packagemake formatwas also attempted, but Poetry is not installed in the local environment (poetry: No such file or directory). The plugin's own lint, full tests, and production build all pass.Checklist
@Memtensor-AI @syzsunshine219 please review.
Reviewer Checklist