fix(watcher): never re-ingest AutoTunnel's own tunnel-candidates log (#88)
Root cause was neither of the two mechanisms the issue named (CanonicalizeLinks over-canonicalizing, or a schema/prompt bias) — CanonicalizeLinks correctly resolved [[Mission]] because wiki/concepts/mission.md genuinely exists; the extraction prompt has no "mission" bias either. The real bug: watcher.processDir walks brain/raw/ and feeds every .md/.txt/.pdf file to pipeline.Run as source material to extract, with no exclusion for tunnel-candidates-*.md — AutoTunnel's own fuzzy-match human-review queue (logFuzzyCandidates writes it into that same raw/ directory). The watcher's next poll re-ingested the raw candidate log itself, and the LLM naturally surfaced "mission" as a wikilink because the log literally lists `(term: "mission")` entries in its content — a generic-word title match DetectTunnels correctly flagged as fuzzy (not auto-tunneled) but which still leaked downstream once treated as real source material. api.ListPending already excludes tunnel-candidates-* when listing raw/ for promotion; processDir gets the same exclusion. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Roq1ajWKR5f1hG5Df9wC6A
This commit is contained in:
@@ -74,6 +74,13 @@ func processDir(ctx context.Context, cfg Config, date string) []error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// AutoTunnel's own fuzzy-match human-review queue, not source
|
||||
// material to extract (hyperguild#88) — same exclusion as
|
||||
// api.ListPending already applies when listing raw/ for promotion.
|
||||
if strings.HasPrefix(d.Name(), "tunnel-candidates-") {
|
||||
return nil
|
||||
}
|
||||
|
||||
// Skip files that have already been processed or permanently failed.
|
||||
if _, err := os.Stat(path + ".processed"); err == nil {
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user