Skip to content

fix(hermes): decode hook IO as utf-8#80

Merged
Grivn merged 1 commit into
masterfrom
fix/hermes-recall-utf8
Jul 3, 2026
Merged

fix(hermes): decode hook IO as utf-8#80
Grivn merged 1 commit into
masterfrom
fix/hermes-recall-utf8

Conversation

@Grivn

@Grivn Grivn commented Jul 3, 2026

Copy link
Copy Markdown
Member

Summary

Fixes #77.

The Hermes remind hook now uses explicit UTF-8 decoding for its JSON payload, persisted mnemon state files, and mnemon recall subprocess stdout. This avoids Windows locale defaults such as cp1252 when recalled memory content contains typographic or other Unicode characters.

The recall subprocess also uses replacement for malformed bytes so parsing fallback paths still receive a string instead of crashing downstream. I also swept the adjacent Hermes Python hooks and updated the post-call nudge hook to read its payload and write its queued reminder file with explicit UTF-8.

Validation

  • go test ./internal/setup
  • go build -o mnemon .
  • make test (147/147 E2E checks passed)

Make the Hermes Python hooks read payload/state files and mnemon recall stdout with explicit UTF-8 encoding so Windows locale defaults do not corrupt Unicode memory content. The recall subprocess also replaces malformed bytes so parsing fallback paths still receive a string instead of crashing downstream.

This also covers the post-call nudge hook's queued reminder file, keeping the remind/nudge state handoff independent of platform default encodings.

Validation: go test ./internal/setup; go build -o mnemon .; make test.
@Grivn Grivn force-pushed the fix/hermes-recall-utf8 branch from 3eda759 to 6070cb4 Compare July 3, 2026 11:59
@Grivn Grivn changed the title fix(hermes): decode recall output as utf-8 fix(hermes): decode hook IO as utf-8 Jul 3, 2026
@Grivn Grivn merged commit 38e2b40 into master Jul 3, 2026
1 check passed
@Grivn Grivn deleted the fix/hermes-recall-utf8 branch July 3, 2026 12:01
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.

mnemon_recall crashes with NoneType.strip on Windows

1 participant