fix(watcher): never walk into raw/rejected/ — brain_reject (closes #81)
CI / Lint / Test / Vet (push) Successful in 33s
CI / Mirror to GitHub (push) Successful in 4s

Adds brain_reject (RejectNote + MCP tool) and fixes the watcher to skip raw/rejected/, preventing declined notes from being silently re-ingested and republished.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-authored-by: Mathias <mthbqv@gmail.com>
This commit was merged in pull request #133.
This commit is contained in:
2026-09-23 06:06:35 +00:00
committed by mathias
co-authored by Claude Sonnet 5
parent 9a37881441
commit 674858fe5e
8 changed files with 228 additions and 6 deletions
+8 -2
View File
@@ -59,10 +59,16 @@ func processDir(ctx context.Context, cfg Config, date string) []error {
return nil
}
// Skip processed/ and failed/ subdirectories entirely.
// Skip processed/, failed/, and rejected/ subdirectories entirely.
// rejected/ (hyperguild#81, brain_reject) holds notes a human already
// looked at and declined — walking into it would run the extraction
// pipeline over a note and publish it to the wiki, the exact opposite
// of the human's decision. The whole reason RejectNote moves a note
// there instead of leaving it in raw/ was to keep it out of every
// path that treats raw/ as "awaiting processing" — this is that path.
if d.IsDir() {
name := d.Name()
if name == "processed" || name == "failed" {
if name == "processed" || name == "failed" || name == "rejected" {
return filepath.SkipDir
}
return nil