fix: keep merged and resolved threads out of the draft queue (#33)
build / image (push) Successful in 36s
build / test (push) Successful in 3m21s

The draft predicate only looked at the auto_thread marker, so a cluster
merged into another (resolved, zero observations left) stayed on the list
forever and the queue could never drain: 6 of 13 candidates on this index
were merged or resolved.

IsDraft now owns the predicate for both surfaces: auto-threaded, not
resolved, and still holding at least one observation.
This commit is contained in:
2026-11-04 20:37:53 -08:00
parent 45f966d44f
commit 4658bdfc83
4 changed files with 38 additions and 9 deletions
+1 -1
View File
@@ -340,7 +340,7 @@ func NewMCPServer(kdb *db.KnoxDB) *mcp.Server {
}
selected := make([]db.Thread, 0, len(threads))
for _, t := range threads {
if strings.Contains(t.Provenance, "auto_thread") || strings.HasPrefix(t.Motivation, "Auto-detected") {
if t.IsDraft() {
selected = append(selected, t)
}
if len(selected) >= limit {