fix: keep merged and resolved threads out of the draft queue (#33)
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:
+1
-1
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user