fix: pipeline, backfill, watcher and archive writes go through the brain root (#158 part B) #195
Open
mathias
wants to merge 3 commits from
fix/pipeline-writes-158 into main
pull from: fix/pipeline-writes-158
merge into: :main
:main
:fix/pipeline-writes-158
:fix/edit-path-io-192
:fix/create-regular-188
:fix/guard-special-179
:fix/linkcheck-keeps-write-178
:fix/write-dir-redirect-173
:fix/tunnel-detect-174
:fix/pipeline-root-157
:w3/154-mcp-auth-wiring
:fix/tunnel-traversal
:test/in-brain-targets-171
:fix/brain-scan-root-157
:fix/graph-wiki-root-157
:fix/vectorstore-root-157
:fix/notes-root-157
:fix/search-root-157
:fix/brainwide-root-157
:fix/raw-symlinks-153
:feat/symlink-tripwire-157
:fix/rest-auth-149
:fix/123-brain-edit-envelope-check
:feat/106-page-aware-extraction
:fix/105-source-drift-on-main
:fix/104-surface-merge-conflicts-on-main
:agent/b1-compile-on-ingest
:agent/104-surface-merge-conflicts
:agent/105-source-drift
:agent/107-loud-unconfigured-alerting
:feat/brain-read-edit
:fix/capture-i1-refusal-names-target
:renovate/configure
:feat/consolidate-single-harness
:icebox/cmd-routing
:feat/brain-pending-promote
:fix/close-session-classification-refresh
:fix/capture-summarywriter
3
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
22d0653b61 |
test(watcher): a marker link planted during the run is refused and not retried (#158)
Review round 2 on PR #195: the marker writes had no test, so reverting them to by-path writes, or the refusal to log-only, stayed green. The link is planted from inside the fake model call, between the walk's Lstat and the marker write, for both markers and both an outside and an in-brain relative target; red on all four flips. The marker-entry skip is now checked for .failed too. Also pins cleanRel's acceptance of a backslash as a filename byte in brainfs itself, and stops the buildAndWrite control claiming writes it does not count. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
1a2a93d2f4 |
fix(watcher): refusals end in a terminal state; pin every converted writer (#158)
Review round 1 on PR #195: - A refused marker or archive write left no marker, so the note was reprocessed every interval (archive copies piling up; an LLM call per round on the failure path). The marker check now uses Lstat (any entry at the marker path counts, so a dangling marker link skips the note instead of looping), and a note whose archive copy or marker write is refused is remembered (path, size, mtime) and not retried until it changes. - cleanRel no longer refuses a backslash: it is a legal filename byte on Linux, not a traversal, and a raw note named with one was never archived or marked. - Tests now reach every converted writer: the log.md append (real raw/failed so the log is reached, symlinked log.md), a dangling marker link, the refused-retry loop with a positive control, a backslash name, a buildAndWrite swap race, and the claude-session archive with in-brain and outside symlinked archive dirs. The stale lint allowlist entry for appendWatcherLog is removed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
77c44f298c |
fix: pipeline, backfill, watcher and archive writes go through the brain root (#158 part B)
The remaining writers created or rewrote brain files by path: - pipeline buildAndWrite: os.MkdirAll + os.WriteFile of every page. - BackfillRefs: os.WriteFile of each concept page; a page swapped for a symlink after the read was written through (the race test overwrote an in-brain target before this change). - watcher: the raw/processed and raw/failed archive copies (os.Create), the .processed/.failed markers and the log.md entry (os.OpenFile). - cmd/server: the claude-session archive. All now go through brainfs PutRegular/AppendRegular (new package-level PutFile/AppendFile for one-off writers: the watcher's call-site lint bans .Open calls in that file so raw/ reads stay on OpenRegular). Stacked on #189 (needs PutRegular/AppendRegular). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |