Fixes#178. risk/low: data-hygiene behaviour, not a security control. It makes the link check fail open toward keeping the write, and never unwraps or invents a link it cannot verify.
Problem
StripUnresolvedLinks runs before every brain_write and brain_update. Any walk error below a linked tree's root, such as one unreadable subdirectory, returned an error, and the write was refused: the learning was lost. This was already the case on main.
Change
On an index error it logs a warning and returns the content unchanged. A partial index can't tell an invented link from one that points into the unreadable part, so nothing is unwrapped and the note is written with its links as given.
Tests
TestStripUnresolvedLinksKeepsContentWhenTheIndexCannotBeBuilt, with a positive control: once the tree is readable again, the strip runs.
TestWriteNoteKeepsTheLearningWhenTheLinkCheckCannotIndex: the end-to-end brain_write case.
Fixes #178. risk/low: data-hygiene behaviour, not a security control. It makes the link check fail open toward *keeping the write*, and never unwraps or invents a link it cannot verify.
## Problem
`StripUnresolvedLinks` runs before every brain_write and brain_update. Any walk error below a linked tree's root, such as one unreadable subdirectory, returned an error, and the write was refused: **the learning was lost**. This was already the case on main.
## Change
On an index error it logs a warning and returns the content **unchanged**. A partial index can't tell an invented link from one that points into the unreadable part, so nothing is unwrapped and the note is written with its links as given.
## Tests
- `TestStripUnresolvedLinksKeepsContentWhenTheIndexCannotBeBuilt`, with a positive control: once the tree is readable again, the strip runs.
- `TestWriteNoteKeepsTheLearningWhenTheLinkCheckCannotIndex`: the end-to-end brain_write case.
- **Flip:** restoring refuse-on-error turns both red.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---
_Created via git-mcp on behalf of @mathias_
StripUnresolvedLinks runs before every brain_write and brain_update. Any
walk error below a linked tree's root (e.g. one unreadable subdirectory)
made it return an error, and the write was refused: the learning was
lost. Already true on main.
It now logs a warning and returns the content unchanged: a partial index
cannot tell an invented link from one into the unreadable part, so it
unwraps nothing (never inventing a resolution) and the note is written
with its links as given.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Fixes #178. risk/low: data-hygiene behaviour, not a security control. It makes the link check fail open toward keeping the write, and never unwraps or invents a link it cannot verify.
Problem
StripUnresolvedLinksruns before every brain_write and brain_update. Any walk error below a linked tree's root, such as one unreadable subdirectory, returned an error, and the write was refused: the learning was lost. This was already the case on main.Change
On an index error it logs a warning and returns the content unchanged. A partial index can't tell an invented link from one that points into the unreadable part, so nothing is unwrapped and the note is written with its links as given.
Tests
TestStripUnresolvedLinksKeepsContentWhenTheIndexCannotBeBuilt, with a positive control: once the tree is readable again, the strip runs.TestWriteNoteKeepsTheLearningWhenTheLinkCheckCannotIndex: the end-to-end brain_write case.🤖 Generated with Claude Code
Created via git-mcp on behalf of @mathias