fix(watcher): never walk into raw/rejected/ — brain_reject (closes #81)
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user