NEXO 7.8.1 — v7.8 emergency-diary SID targeting closed

Published 2026-04-22. Patch release over v7.8.0.

v7.8.0 shipped the main compaction-continuity work: PostCompact as a real registered hook, exact SID via CLAUDE_SESSION_ID, per-conversation sidecar under $NEXO_HOME, fail-closed on mismatch, per-session event queue. Francisco audited the diff and flagged one residual hole: the Layer-2 emergency auto-diary and Layer-3 compaction_memory.record_auto_flush inside pre-compact.sh were still querying SELECT sid FROM sessions ORDER BY last_update_epoch DESC LIMIT 1 — the same "latest active session" anti-pattern that v7.8 had just eliminated from the main restore path. In multi-conversation Desktop that routinely wrote the emergency diary against the wrong conversation even when the main restore was already correct.

What v7.8.1 changes

Behavioural tests, not just contract tests

v7.8.0 shipped source-contract tests (greps that pin strings). Francisco asked explicitly for multi-conv behavioural coverage. v7.8.1 adds two tests that drive the real shell script:

The latent bash-escape bug we would have never caught otherwise

Adding the behavioural tests surfaced a subtle production bug: a Python comment inside the python3 -c "..." shell heredoc contained a phrase in double quotes (# not "latest active" which ...). Inside a bash double-quoted string, the inner " silently closed the argument early — so the entire Layer-2 Python block had been no-oping on the first hook run in production even though the source looked correct. The comment was reworded to remove any bash-meta characters inside the Python payload. The behavioural tests would fail noisily if this ever regresses.

No Desktop bump

Entirely Brain-side. Desktop v0.27.0 continues to ship.

Tests

Pytest: 2092 passing (+2 new behavioural). Ten unrelated pre-existing failures remain (darwin-only TTY / client-sync / doctor / evolution).

Related: full v7.8.1 changelog · v7.8.0 release notes · source on GitHub