Per-kind duplicate-report floors — notes/tasks default 0.93 #105

Merged
bvandeusen merged 1 commits from dev into main 2026-08-09 10:37:06 -04:00
Owner

Closes the #280 calibration question by operator decision: at chunk grain a note-pair's similarity is its closest chunk pair, so the shared 0.82 floor saturated the note/task reports with related families (38 note / 155 task groups against the 200-pair cap, measured 2026-08-09).

  • kb_duplicate_threshold splits into per-kind settings keys: kb_duplicate_threshold_snippet / _note / _task.
  • Defaults: snippet 0.82 (single-chunk — its similarity scale never shifted, and it stays below the 0.90 write gate to catch what the gate admits), note/task 0.93 (above the gate on purpose; chunk grain lifts related families over 0.90).
  • get_duplicate_threshold(user_id, kind) resolves key + default per kind; the report route, MCP tool, and Knowledge view already pass "use configured" and inherit it unchanged.
  • Settings UI: the single report-threshold field becomes three per-kind fields with per-kind fallback defaults.
  • Tests: threshold resolution parameterized per kind; a new test pins that each kind reads its own key; the report-below-gate invariant is narrowed to snippets with the chunk-grain rationale; note/task = 0.93 pinned.

Scribe task #2558. CI green on 272b7db (run 3556).

🤖 Generated with Claude Code

https://claude.ai/code/session_01UaYUaouG9jjhATyuxCKrQs

Closes the #280 calibration question by operator decision: at chunk grain a note-pair's similarity is its closest chunk pair, so the shared 0.82 floor saturated the note/task reports with related families (38 note / 155 task groups against the 200-pair cap, measured 2026-08-09). - `kb_duplicate_threshold` splits into per-kind settings keys: `kb_duplicate_threshold_snippet` / `_note` / `_task`. - Defaults: snippet **0.82** (single-chunk — its similarity scale never shifted, and it stays below the 0.90 write gate to catch what the gate admits), note/task **0.93** (above the gate on purpose; chunk grain lifts related families over 0.90). - `get_duplicate_threshold(user_id, kind)` resolves key + default per kind; the report route, MCP tool, and Knowledge view already pass "use configured" and inherit it unchanged. - Settings UI: the single report-threshold field becomes three per-kind fields with per-kind fallback defaults. - Tests: threshold resolution parameterized per kind; a new test pins that each kind reads its own key; the report-below-gate invariant is narrowed to snippets with the chunk-grain rationale; note/task = 0.93 pinned. Scribe task #2558. CI green on 272b7db (run 3556). 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01UaYUaouG9jjhATyuxCKrQs
bvandeusen added 1 commit 2026-08-09 10:36:59 -04:00
feat(dedup): per-kind duplicate-report floors — notes/tasks default 0.93
CI & Build / Python lint (push) Successful in 4s
CI & Build / Plugin hooks (push) Successful in 10s
CI & Build / integration (push) Successful in 19s
CI & Build / TypeScript typecheck (push) Successful in 33s
CI & Build / Python tests (push) Successful in 53s
CI & Build / Build & push image (push) Successful in 42s
272b7dbddf
At chunk grain (#280) a note-pair's similarity is its closest chunk pair,
so the shared 0.82 floor saturated the note/task reports with related
families (38 note / 155 task groups against the 200-pair cap, measured
2026-08-09). Split kb_duplicate_threshold into per-kind settings keys
with per-kind defaults: snippet 0.82 (single-chunk, scale unchanged),
note/task 0.93 (points the report at genuinely-alike records). Settings
UI grows the two new knobs; report entrypoints inherit the change via
get_duplicate_threshold(user_id, kind).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UaYUaouG9jjhATyuxCKrQs
bvandeusen merged commit 854aae252a into main 2026-08-09 10:37:06 -04:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: bvandeusen/FabledScribe#105