Proposal: prevent engram corruption at the source (for review) #55

Closed
tim.lingo wants to merge 1 commits from fix/prevent-engram-corruption into main
Member

Soul-core proposal (untested El — needs your engram-internals review). Root cause of the 21% engram corruption: boot-time seeding re-inserts instead of updates (dup spam), and there's no UTF-8 validation on write. New users start clean but would rot the same way.

The one question that unblocks it: does engram_node_full upsert by label or always insert? (conv:history reuses a label and doesn't dup; soul:boot_count reuses a label and accumulated ~120 copies.)

Fixes (ranked): (1) idempotent boot seeding — upsert boot_count + safety beliefs by label; (2) UTF-8 validation on write; (3) confirm read-back-verify covers all paths (close the neuron-api.el:198 exception); (4) cap time-series events (NOT dedup — they're legit per-boot history).

Details + exact code anchors + test plan in PREVENTION-FIXES-FOR-REVIEW.md. Full spec: docs repo CORRUPTION-PREVENTION-SPEC.md.

🤖 Generated with Claude Code

Soul-core proposal (untested El — needs your engram-internals review). Root cause of the 21% engram corruption: boot-time seeding re-inserts instead of updates (dup spam), and there's no UTF-8 validation on write. New users start clean but would rot the same way. **The one question that unblocks it:** does `engram_node_full` upsert by label or always insert? (conv:history reuses a label and doesn't dup; soul:boot_count reuses a label and accumulated ~120 copies.) Fixes (ranked): (1) idempotent boot seeding — upsert boot_count + safety beliefs by label; (2) UTF-8 validation on write; (3) confirm read-back-verify covers all paths (close the neuron-api.el:198 exception); (4) cap time-series events (NOT dedup — they're legit per-boot history). Details + exact code anchors + test plan in PREVENTION-FIXES-FOR-REVIEW.md. Full spec: docs repo CORRUPTION-PREVENTION-SPEC.md. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
tim.lingo added 1 commit 2026-06-27 16:45:01 +00:00
Soul-core proposal for Will's review (untested El). Root cause: boot-time writes re-insert instead of
update (dup spam), no UTF-8 validation on write. Full spec in docs repo CORRUPTION-PREVENTION-SPEC.md.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
will.anderson closed this pull request 2026-06-29 16:09:05 +00:00

Pull request closed

Please reopen this pull request to perform a merge.
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: neuron-technologies/neuron#55