Repository navigation
feat(people): auto-apply sure name suggestions, with undo - #159
Merged
Merged
Conversation
A new name suggestion at or above people.autoApplyConfidence (default 0.85) applies itself
when people.autoApplyNames is on (default true): status auto_applied, through the code of
accept, recording what it changed in name_suggestions.applied (migration 0035).
POST /api/v1/people/suggestions/{id}/undo reverts it and makes it rejected. Conflicts (one
name for two voices, a second name for a voice, a role-only person's name, a merge) stay
pending. GET /api/v1/people/suggestions takes status=auto_applied and limit, and items
carry decidedAt. Feature flag auto-names.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Naming people took a tap per suggestion. Now a suggestion the model is sure of names its voice at once and can be undone.
What changes
people.autoApplyNames(defaulttrue) andpeople.autoApplyConfidence(default0.85, 0.5 to 1). A newnamedsuggestion of aspeaker,labelorpersontarget at or above the threshold is applied in thesuggest-namesrun's transaction, through the code of accept, under a savepoint (one that cannot apply rolls back and stays pending). Statusauto_applied, distinct fromaccepted;name_suggestions.applied(jsonb, migration 0035; 0034 is taken by fix: refuse import times outside the chunk format's range; a process-session that cannot read its chunks stops retrying #152) records what it changed.POST /api/v1/people/suggestions/{id}/undo(admin): unlinks the voice it linked, clears the segments it named, removes the role tag it added, gives a role-only person their role name back, deletes a person the apply created when nothing else holds them (no voice, segment, voiceprint or note). The row becomesrejected, so the unique key never offers or applies it again.204,404unknown,409not auto-applied.persontarget whose name another person has (merge cannot be undone), a voice already someone else's, label segments that all have a person.GET /api/v1/people/suggestionstakesstatus=auto_appliedandlimit(1–200); items gaindecidedAt. Chosen over a review kind because the review inbox is "waiting for your answer" and these are not./api/v1/infofeatureauto-names. MCP stays read-only: only the job applies names.Threshold: one, not two
Owner's server, aggregates only (
hz sql nytka-postgres, read-only): 66 name suggestions, all pending, 0 accepted, 0 rejected, so there is no acceptance rate to set a per-kind threshold from. Self-introduction (evidence in the voice's own segments): 28, 22 at ≥ 0.85. Addressed by name: 38, 32 at ≥ 0.85. Existing pending suggestions are not touched.Tests
AutoNameTests(9, Testcontainers): apply and listing, threshold and switch, undo of a created person, of a pre-existing person plus role tag, of a role-only rename, conflicts.AiTestBasekeeps auto-apply off unless a test opts in. ScopeTests, settings catalog and feature lists updated. Full suite locally: Audio 131 passed; Server 2000 passed, 5 skipped.🤖 Generated with Claude Code