Files
Joshua Belke c340932c21 fix(worker): recycle a worker that is healthy but never becomes ready (#3476)
A worker whose background init throws stays initialized:false forever while
still answering 200 on /api/health and reporting the correct version, so the
version-mismatch recycle never fires and every hook skips indefinitely
(observed: 7.15 days of continuous wedged uptime until the hook-failure
counter began blocking hooks outright).

Three parts:
- ensureWorkerRunning() now tells a wedge from a cold boot using the worker's
  own self-reported uptime and recycles past CLAUDE_MEM_WEDGED_WORKER_UPTIME_S
  (default 300s). A fresh replacement starts near 0s, so this cannot feed back
  into a restart storm. An unreadable uptime is never grounds to kill.
- SessionStore schema migration v46 falls back from Statement.iterate() to
  .all() on Bun < 1.1.31, with a one-time warning naming the real cause —
  that TypeError was the init failure behind the observed wedge.
- engines.bun corrected to >=1.1.31 in package.json and plugin/package.json,
  the verified floor for Statement.iterate().

Author: @jbelke
Refs: #3603 (plan-15 Worker Port & Liveness Authority)

Merged origin/main (685981cb6) into the branch and resolved one conflict in
src/shared/worker-utils.ts: main's alreadyRecycledBundle guard stays on the
version-mismatch branch only, since a wedged worker's bundle is not stale.

Verified after that merge: bun test tests -> 3716 pass, 28 skip, 2 fail (both
pre-existing on main: field-deadline-wire real-network test and
plugin-distribution npm-tarball test that needs a build). tsc --noEmit clean;
lint:hook-io and lint:spawn-env OK.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015w89Sfxy7rZK9xDWixDPv7
2026-09-12 10:08:44 -07:00

46 lines
1.3 KiB
JSON

{
"name": "claude-mem-plugin",
"version": "13.24.23",
"private": true,
"description": "Runtime dependencies for claude-mem bundled hooks",
"type": "module",
"dependencies": {
"zod": "^4.4.3",
"tree-sitter-cli": "^0.26.5",
"tree-sitter-c": "^0.24.1",
"tree-sitter-cpp": "^0.23.4",
"tree-sitter-go": "^0.25.0",
"tree-sitter-java": "^0.23.5",
"tree-sitter-javascript": "^0.25.0",
"tree-sitter-python": "^0.25.0",
"tree-sitter-ruby": "^0.23.1",
"tree-sitter-rust": "^0.24.0",
"tree-sitter-typescript": "^0.23.2",
"tree-sitter-kotlin": "^0.3.8",
"tree-sitter-swift": "^0.7.1",
"tree-sitter-php": "^0.24.2",
"@tree-sitter-grammars/tree-sitter-lua": "^0.4.1",
"tree-sitter-scala": "^0.24.0",
"tree-sitter-bash": "^0.25.1",
"tree-sitter-haskell": "^0.23.1",
"@tree-sitter-grammars/tree-sitter-zig": "^1.1.2",
"tree-sitter-css": "^0.25.0",
"tree-sitter-scss": "^1.0.0",
"@tree-sitter-grammars/tree-sitter-toml": "^0.7.0",
"@tree-sitter-grammars/tree-sitter-yaml": "^0.7.1",
"@derekstride/tree-sitter-sql": "^0.3.11",
"@tree-sitter-grammars/tree-sitter-markdown": "^0.3.2",
"shell-quote": "1.9.0"
},
"overrides": {
"tree-sitter": "^0.25.0"
},
"trustedDependencies": [
"tree-sitter-cli"
],
"engines": {
"node": ">=20.12.0",
"bun": ">=1.1.31"
}
}