Review round 1 on PR #175:
- entryIndex returned WalkRegular's walk-root ErrNotRegular as an error,
and StripUnresolvedLinks runs before every brain_write: a symlinked,
dangling or regular-file knowledge/ (or wiki/) made every write fail
and lose the learning. main's filepath.WalkDir skipped such a root. It
is now skipped with a warning; other walk errors still abort, as on
main. New table test over the three shapes.
- The symlinked-hall assertion passed with no index written at all. It
now indexes a real hall next to the symlinked one and asserts no
error, the index exists and lists the real note; a new test does the
same for BuildAllWingIndexes with a symlinked wing next to a real one.
- The test comment no longer says this PR fixed the FIFO hang on every
brain_write: that path is tunnel.DetectTunnels (slice 5b).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
BuildWingIndex/BuildAllWingIndexes listed wiki/<wing>/<hall>/ with
os.ReadDir and opened each note by path: a symlinked note put the
target's title into _index.md (110k leaks in the swap race), a symlinked
wing was followed and its _index.md written into the target, and a FIFO
hung the build (it runs on every brain_write).
- New brainfs.ReadDirDirs: real subdirectories only, every component of
the dir a real directory. Wings and halls are listed with it and
ReadDirRegular; titles are read with ReadRegular
(readTitleAndCreatedIn). A symlinked wing is an error; a symlinked hall
is skipped.
- linkcheck entryIndex walks with WalkRegular: a symlinked .md name no
longer makes a [[link]] resolve.
- readTitleAndCreated (path-based) stays for tunnel.DetectTunnels until
PR #170 lands; that is slice 5b.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>