fix: drop the auto_thread marker when a thread is rewritten (#29) #31

Merged
david merged 1 commits from fix/thread-draft-marker into main 2026-11-05 04:31:43 +00:00
Owner

Closes #29.

UpdateThread now treats a rewritten title or motivation as an editorial pass and clears the auto_thread provenance marker, recording groomed: true and keeping the cluster/score/sources keys. Polished threads leave knox_thread_draft.

Tag-only edits do not count, so a thread can still be tagged without silently declaring itself groomed. Provenance that was never auto-generated is untouched.

Test

TestUpdateThreadClearsAutoThreadMarker covers the retitle, motivation-only, tag-only and non-auto cases. go build ./... && go vet ./... && go test ./internal/db/ pass.

Closes #29. `UpdateThread` now treats a rewritten title or motivation as an editorial pass and clears the `auto_thread` provenance marker, recording `groomed: true` and keeping the cluster/score/sources keys. Polished threads leave `knox_thread_draft`. Tag-only edits do not count, so a thread can still be tagged without silently declaring itself groomed. Provenance that was never auto-generated is untouched. ### Test `TestUpdateThreadClearsAutoThreadMarker` covers the retitle, motivation-only, tag-only and non-auto cases. `go build ./... && go vet ./... && go test ./internal/db/` pass.
david added 1 commit 2026-11-05 04:29:02 +00:00
fix: drop the auto_thread marker when a thread is rewritten (#29)
build / image (push) Successful in 35s
build / test (push) Successful in 3m17s
b6c2676f2c
Editorial rewrites went through UpdateThread, which touched title,
motivation, priority and tags but never provenance. isAutoThreaded keys
off the auto_thread provenance marker (or an 'Auto-detected' motivation
prefix), so every polished thread kept reporting as a draft with no way
out of the queue.

A rewritten title or motivation now clears the marker and records
groomed=true, keeping the cluster/score/sources that provenance also
carries. Tag-only edits deliberately do not count as an editorial pass.
david merged commit 380f280ca4 into main 2026-11-05 04:31:43 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: david/knox#31