Skip to content

fix(mempalace): require >= 3.3.2 for PID guard + HNSW crash fix - #83

Closed
dylanneve1 wants to merge 1 commit into
mainfrom
fix/mempalace-3.3.2
Closed

fix(mempalace): require >= 3.3.2 for PID guard + HNSW crash fix#83
dylanneve1 wants to merge 1 commit into
mainfrom
fix/mempalace-3.3.2

Conversation

@dylanneve1

Copy link
Copy Markdown
Owner

Summary

Bumps mempalace minimum version from 3.3 to 3.3.2 across docstrings, config comments, and README install instructions.

Upstream 3.3.2 is a bug-fix release:

  • PID file guard β€” prevents stacking mine processes (#1023)
  • Quarantine stale HNSW β€” recovers from HNSW/sqlite drift, fixes SIGSEGV on palace load (#1000)
  • Windows Unicode β€” replaces Unicode checkmark with ASCII for Windows encoding (#681)

No code changes to the plugin itself β€” MCP server command/args are unchanged. Local venv on this VPS has already been bumped to 3.3.2 and is running fine.

Test plan

  • npm run typecheck β€” clean
  • npm run format:check β€” clean
  • npx vitest run β€” 1361/1361 passing
  • Local venv upgraded to 3.3.2 and mempalace MCP tools verified working (palace status, search, kg queries)

Upstream 3.3.2 adds:
  - PID file guard β€” prevents stacking mine processes
  - Quarantine stale HNSW β€” recovers from HNSW/sqlite drift (fixes SIGSEGV)
  - Windows Unicode fix for ASCII-only terminals

Bump install instructions + docstrings from 'mempalace >= 3.3' to
'mempalace >= 3.3.2'. No code changes to the plugin itself β€” the MCP
server command/args are unchanged.

Release notes: https://github.com/MemPalace/mempalace/releases/tag/v3.3.2

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the documented minimum required mempalace version to >= 3.3.2 across configuration docstrings, plugin docs, and README installation instructions to reflect upstream bug-fix requirements (PID guard + HNSW crash fix).

Changes:

  • Bump documented mempalace minimum version from 3.3 to 3.3.2 in config and plugin docstrings.
  • Update the plugin’s validation error message to recommend installing mempalace>=3.3.2.
  • Update README requirements and install commands to use mempalace>=3.3.2.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
src/util/config.ts Updates config schema docstring to require mempalace >= 3.3.2 for entity languages.
src/plugins/mempalace/index.ts Updates plugin docs and an install hint error message to reference mempalace>=3.3.2.
README.md Updates MemPalace requirements and installation commands to mempalace>=3.3.2.

πŸ’‘ Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread README.md
~/.talon/mempalace-venv/bin/pip install mempalace # Unix
# or: ~/.talon/mempalace-venv/Scripts/pip install mempalace # Windows
~/.talon/mempalace-venv/bin/pip install 'mempalace>=3.3.2' # Unix
# or: ~/.talon/mempalace-venv/Scripts/pip install 'mempalace>=3.3.2' # Windows

Copilot AI Apr 23, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The install command uses single quotes around the requirement spec. This works in Unix shells and PowerShell, but will fail in Windows cmd.exe (single quotes aren’t string delimiters, and > is parsed as redirection). Consider documenting Windows with double quotes (e.g., "mempalace>=3.3.2") and/or explicitly labeling the Windows command as PowerShell-only.

Suggested change
# or: ~/.talon/mempalace-venv/Scripts/pip install 'mempalace>=3.3.2' # Windows
# or: ~/.talon/mempalace-venv/Scripts/pip install "mempalace>=3.3.2" # Windows

Copilot uses AI. Check for mistakes.
Comment on lines +107 to 108
`mempalace package not installed or mcp_server submodule missing. Run: ${pythonPath} -m pip install 'mempalace>=3.3.2'${stderr ? `. Details: ${stderr}` : ""}`,
);

Copilot AI Apr 23, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The suggested install command uses single quotes around mempalace>=3.3.2. That quoting works in Unix shells and PowerShell, but will break in Windows cmd.exe (and > can be treated as output redirection). Consider adjusting the message to either avoid quoting, or tailor it per platform (e.g., double quotes for Windows), so users can copy/paste safely. Also, the earlier "Python binary not found" error path still suggests pip install mempalace without the minimum versionβ€”worth aligning the guidance within validateConfig().

Copilot uses AI. Check for mistakes.
@dylanneve1

Copy link
Copy Markdown
Owner Author

Superseded by #86 β€” unified plugin-lifecycle overhaul that removes opt-in flags, adds a shared self-heal layer, and consolidates the CI matrix.

@dylanneve1 dylanneve1 closed this Apr 23, 2026
dylanneve1 pushed a commit that referenced this pull request May 5, 2026
Overhaul of mempalace, github, and playwright to remove opt-in flags
and introduce a shared, robust self-heal layer. Replaces #83, #84, #85.

Enabling a built-in plugin now fully sets it up β€” no flags, no manual
bootstrap:

  { "mempalace": { "enabled": true } }
  { "github":    { "enabled": true, "token": "ghp_..." } }
  { "playwright":{ "enabled": true, "browser": "chromium" } }

On every start Talon re-verifies the install and realigns to the pinned
version if it drifted. Removed: autoInstall, autoPull, installBrowsers.
Added: structured per-step progress logging with timings that pinpoint
the slow/failing step.

- semver.ts     β€” tiny parse/compare for the floor + pin check
- errors.ts     β€” PluginError taxonomy (8 kinds) + subprocess stderr
                  classifier with regression-tested patterns
- progress.ts   β€” numbered, timed step tracker with pluggable log sink
- subprocess.ts β€” line-streaming spawn wrapper that normalises CR/LF/CR-only
                  output (docker pull uses bare \r), captures stderr, and
                  returns a classified PluginError on failure
- lifecycle.ts  β€” HealFn contract + runHeal() with hard timeout guard

Each plugin keeps the upstream version pin as a source-of-truth constant
and implements a dedicated heal() that uses the shared infra:

- mempalace/heal.ts: MEMPALACE_TARGET="3.3.2", MEMPALACE_FLOOR="3.3.2".
  Managed mode owns ~/.talon/mempalace-venv (create β†’ pip install β†’ verify).
  User-supplied pythonPath switches to verify-only mode β€” we never
  mutate a user's Python environment without consent.
- github/heal.ts: GITHUB_MCP_IMAGE="ghcr.io/github/github-mcp-server:v1.0.2".
  Always pulls on heal to refresh digest. Pull-fail with cached image β†’
  degraded (we run on stale); pull-fail without cache β†’ failed.
- playwright/heal.ts: PLAYWRIGHT_MCP_VERSION="0.0.70" (matches pin in
  package.json). Verify-only for the npm package (we do NOT mutate
  node_modules at runtime), auto-install for the chosen browser binary.

Deliberately targeted, not volume. Shared infra: 39 cases. Per-plugin
heal: 9 mempalace, 6 github, 11 playwright. Plugin factory: 5 mempalace.
All test at decision boundaries (managed vs verify-only, present vs
missing vs drift, happy vs classified-failure paths) β€” no mock-the-mock
redundancy.

1421/1421 total passing Β· typecheck clean Β· prettier clean Β· 0 lint errors.

Single workflow, three jobs:

  mempalace  β†’ matrix Ubuntu/macOS/Windows Γ— Python 3.11/3.12 (6 runs)
  github     β†’ Ubuntu (Docker-only)                            (1 run)
  playwright β†’ matrix Ubuntu/macOS/Windows Γ— chromium           (3 runs)

Each job: pull/install the pinned version, spawn the real MCP server
over stdio, handshake, tools/list, call a representative tool. No
mocks, no network fakes. Triggers: PRs touching plugin paths, main
pushes, nightly cron (05:30 UTC), manual dispatch.

- npx vitest run         β†’ 1421/1421 passing
- npm run typecheck       β†’ clean
- npm run format:check    β†’ clean
- npm run lint            β†’ 0 errors (9 pre-existing warnings)
- node scripts/smoke-mempalace.mjs install + smoke β†’ 29 tools, status ok
- node scripts/smoke-github.mjs pull + smoke       β†’ 41 tools, list ok
- node scripts/smoke-playwright.mjs install + smoke β†’ 21 tools, navigate + close ok
dylanneve1 pushed a commit that referenced this pull request May 8, 2026
Overhaul of mempalace, github, and playwright to remove opt-in flags
and introduce a shared, robust self-heal layer. Replaces #83, #84, #85.

Enabling a built-in plugin now fully sets it up β€” no flags, no manual
bootstrap:

  { "mempalace": { "enabled": true } }
  { "github":    { "enabled": true, "token": "ghp_..." } }
  { "playwright":{ "enabled": true, "browser": "chromium" } }

On every start Talon re-verifies the install and realigns to the pinned
version if it drifted. Removed: autoInstall, autoPull, installBrowsers.
Added: structured per-step progress logging with timings that pinpoint
the slow/failing step.

- semver.ts     β€” tiny parse/compare for the floor + pin check
- errors.ts     β€” PluginError taxonomy (8 kinds) + subprocess stderr
                  classifier with regression-tested patterns
- progress.ts   β€” numbered, timed step tracker with pluggable log sink
- subprocess.ts β€” line-streaming spawn wrapper that normalises CR/LF/CR-only
                  output (docker pull uses bare \r), captures stderr, and
                  returns a classified PluginError on failure
- lifecycle.ts  β€” HealFn contract + runHeal() with hard timeout guard

Each plugin keeps the upstream version pin as a source-of-truth constant
and implements a dedicated heal() that uses the shared infra:

- mempalace/heal.ts: MEMPALACE_TARGET="3.3.2", MEMPALACE_FLOOR="3.3.2".
  Managed mode owns ~/.talon/mempalace-venv (create β†’ pip install β†’ verify).
  User-supplied pythonPath switches to verify-only mode β€” we never
  mutate a user's Python environment without consent.
- github/heal.ts: GITHUB_MCP_IMAGE="ghcr.io/github/github-mcp-server:v1.0.2".
  Always pulls on heal to refresh digest. Pull-fail with cached image β†’
  degraded (we run on stale); pull-fail without cache β†’ failed.
- playwright/heal.ts: PLAYWRIGHT_MCP_VERSION="0.0.70" (matches pin in
  package.json). Verify-only for the npm package (we do NOT mutate
  node_modules at runtime), auto-install for the chosen browser binary.

Deliberately targeted, not volume. Shared infra: 39 cases. Per-plugin
heal: 9 mempalace, 6 github, 11 playwright. Plugin factory: 5 mempalace.
All test at decision boundaries (managed vs verify-only, present vs
missing vs drift, happy vs classified-failure paths) β€” no mock-the-mock
redundancy.

1421/1421 total passing Β· typecheck clean Β· prettier clean Β· 0 lint errors.

Single workflow, three jobs:

  mempalace  β†’ matrix Ubuntu/macOS/Windows Γ— Python 3.11/3.12 (6 runs)
  github     β†’ Ubuntu (Docker-only)                            (1 run)
  playwright β†’ matrix Ubuntu/macOS/Windows Γ— chromium           (3 runs)

Each job: pull/install the pinned version, spawn the real MCP server
over stdio, handshake, tools/list, call a representative tool. No
mocks, no network fakes. Triggers: PRs touching plugin paths, main
pushes, nightly cron (05:30 UTC), manual dispatch.

- npx vitest run         β†’ 1421/1421 passing
- npm run typecheck       β†’ clean
- npm run format:check    β†’ clean
- npm run lint            β†’ 0 errors (9 pre-existing warnings)
- node scripts/smoke-mempalace.mjs install + smoke β†’ 29 tools, status ok
- node scripts/smoke-github.mjs pull + smoke       β†’ 41 tools, list ok
- node scripts/smoke-playwright.mjs install + smoke β†’ 21 tools, navigate + close ok
dylanneve1 pushed a commit that referenced this pull request May 8, 2026
Overhaul of mempalace, github, and playwright to remove opt-in flags
and introduce a shared, robust self-heal layer. Replaces #83, #84, #85.

Enabling a built-in plugin now fully sets it up β€” no flags, no manual
bootstrap:

  { "mempalace": { "enabled": true } }
  { "github":    { "enabled": true, "token": "ghp_..." } }
  { "playwright":{ "enabled": true, "browser": "chromium" } }

On every start Talon re-verifies the install and realigns to the pinned
version if it drifted. Removed: autoInstall, autoPull, installBrowsers.
Added: structured per-step progress logging with timings that pinpoint
the slow/failing step.

- semver.ts     β€” tiny parse/compare for the floor + pin check
- errors.ts     β€” PluginError taxonomy (8 kinds) + subprocess stderr
                  classifier with regression-tested patterns
- progress.ts   β€” numbered, timed step tracker with pluggable log sink
- subprocess.ts β€” line-streaming spawn wrapper that normalises CR/LF/CR-only
                  output (docker pull uses bare \r), captures stderr, and
                  returns a classified PluginError on failure
- lifecycle.ts  β€” HealFn contract + runHeal() with hard timeout guard

Each plugin keeps the upstream version pin as a source-of-truth constant
and implements a dedicated heal() that uses the shared infra:

- mempalace/heal.ts: MEMPALACE_TARGET="3.3.2", MEMPALACE_FLOOR="3.3.2".
  Managed mode owns ~/.talon/mempalace-venv (create β†’ pip install β†’ verify).
  User-supplied pythonPath switches to verify-only mode β€” we never
  mutate a user's Python environment without consent.
- github/heal.ts: GITHUB_MCP_IMAGE="ghcr.io/github/github-mcp-server:v1.0.2".
  Always pulls on heal to refresh digest. Pull-fail with cached image β†’
  degraded (we run on stale); pull-fail without cache β†’ failed.
- playwright/heal.ts: PLAYWRIGHT_MCP_VERSION="0.0.70" (matches pin in
  package.json). Verify-only for the npm package (we do NOT mutate
  node_modules at runtime), auto-install for the chosen browser binary.

Deliberately targeted, not volume. Shared infra: 39 cases. Per-plugin
heal: 9 mempalace, 6 github, 11 playwright. Plugin factory: 5 mempalace.
All test at decision boundaries (managed vs verify-only, present vs
missing vs drift, happy vs classified-failure paths) β€” no mock-the-mock
redundancy.

1421/1421 total passing Β· typecheck clean Β· prettier clean Β· 0 lint errors.

Single workflow, three jobs:

  mempalace  β†’ matrix Ubuntu/macOS/Windows Γ— Python 3.11/3.12 (6 runs)
  github     β†’ Ubuntu (Docker-only)                            (1 run)
  playwright β†’ matrix Ubuntu/macOS/Windows Γ— chromium           (3 runs)

Each job: pull/install the pinned version, spawn the real MCP server
over stdio, handshake, tools/list, call a representative tool. No
mocks, no network fakes. Triggers: PRs touching plugin paths, main
pushes, nightly cron (05:30 UTC), manual dispatch.

- npx vitest run         β†’ 1421/1421 passing
- npm run typecheck       β†’ clean
- npm run format:check    β†’ clean
- npm run lint            β†’ 0 errors (9 pre-existing warnings)
- node scripts/smoke-mempalace.mjs install + smoke β†’ 29 tools, status ok
- node scripts/smoke-github.mjs pull + smoke       β†’ 41 tools, list ok
- node scripts/smoke-playwright.mjs install + smoke β†’ 21 tools, navigate + close ok
dylanneve1 pushed a commit that referenced this pull request May 9, 2026
Overhaul of mempalace, github, and playwright to remove opt-in flags
and introduce a shared, robust self-heal layer. Replaces #83, #84, #85.

Enabling a built-in plugin now fully sets it up β€” no flags, no manual
bootstrap:

  { "mempalace": { "enabled": true } }
  { "github":    { "enabled": true, "token": "ghp_..." } }
  { "playwright":{ "enabled": true, "browser": "chromium" } }

On every start Talon re-verifies the install and realigns to the pinned
version if it drifted. Removed: autoInstall, autoPull, installBrowsers.
Added: structured per-step progress logging with timings that pinpoint
the slow/failing step.

- semver.ts     β€” tiny parse/compare for the floor + pin check
- errors.ts     β€” PluginError taxonomy (8 kinds) + subprocess stderr
                  classifier with regression-tested patterns
- progress.ts   β€” numbered, timed step tracker with pluggable log sink
- subprocess.ts β€” line-streaming spawn wrapper that normalises CR/LF/CR-only
                  output (docker pull uses bare \r), captures stderr, and
                  returns a classified PluginError on failure
- lifecycle.ts  β€” HealFn contract + runHeal() with hard timeout guard

Each plugin keeps the upstream version pin as a source-of-truth constant
and implements a dedicated heal() that uses the shared infra:

- mempalace/heal.ts: MEMPALACE_TARGET="3.3.2", MEMPALACE_FLOOR="3.3.2".
  Managed mode owns ~/.talon/mempalace-venv (create β†’ pip install β†’ verify).
  User-supplied pythonPath switches to verify-only mode β€” we never
  mutate a user's Python environment without consent.
- github/heal.ts: GITHUB_MCP_IMAGE="ghcr.io/github/github-mcp-server:v1.0.2".
  Always pulls on heal to refresh digest. Pull-fail with cached image β†’
  degraded (we run on stale); pull-fail without cache β†’ failed.
- playwright/heal.ts: PLAYWRIGHT_MCP_VERSION="0.0.70" (matches pin in
  package.json). Verify-only for the npm package (we do NOT mutate
  node_modules at runtime), auto-install for the chosen browser binary.

Deliberately targeted, not volume. Shared infra: 39 cases. Per-plugin
heal: 9 mempalace, 6 github, 11 playwright. Plugin factory: 5 mempalace.
All test at decision boundaries (managed vs verify-only, present vs
missing vs drift, happy vs classified-failure paths) β€” no mock-the-mock
redundancy.

1421/1421 total passing Β· typecheck clean Β· prettier clean Β· 0 lint errors.

Single workflow, three jobs:

  mempalace  β†’ matrix Ubuntu/macOS/Windows Γ— Python 3.11/3.12 (6 runs)
  github     β†’ Ubuntu (Docker-only)                            (1 run)
  playwright β†’ matrix Ubuntu/macOS/Windows Γ— chromium           (3 runs)

Each job: pull/install the pinned version, spawn the real MCP server
over stdio, handshake, tools/list, call a representative tool. No
mocks, no network fakes. Triggers: PRs touching plugin paths, main
pushes, nightly cron (05:30 UTC), manual dispatch.

- npx vitest run         β†’ 1421/1421 passing
- npm run typecheck       β†’ clean
- npm run format:check    β†’ clean
- npm run lint            β†’ 0 errors (9 pre-existing warnings)
- node scripts/smoke-mempalace.mjs install + smoke β†’ 29 tools, status ok
- node scripts/smoke-github.mjs pull + smoke       β†’ 41 tools, list ok
- node scripts/smoke-playwright.mjs install + smoke β†’ 21 tools, navigate + close ok
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants