Skip to content

feat(people): auto-apply sure name suggestions, with undo - #159

Merged
Egoushka merged 1 commit into
mainfrom
feat/auto-names
Oct 20, 2026
Merged

Egoushka merged 1 commit into
mainfrom
feat/auto-names

Conversation

@Egoushka

Copy link
Copy Markdown
Collaborator

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 (default true) and people.autoApplyConfidence (default 0.85, 0.5 to 1). A new named suggestion of a speaker, label or person target at or above the threshold is applied in the suggest-names run's transaction, through the code of accept, under a savepoint (one that cannot apply rolls back and stays pending). Status auto_applied, distinct from accepted; 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 becomes rejected, so the unique key never offers or applies it again. 204, 404 unknown, 409 not auto-applied.
  • Never auto-applied (stay pending): a role alone, a voice group, a run that gives two voices one name, a voice with a pending/applied suggestion of another name, a name a role-only person has, a person target whose name another person has (merge cannot be undone), a voice already someone else's, label segments that all have a person.
  • Auto-apply never merges or renames a named person, so no respell (feat(people): respell a renamed person's name in generated text #143/fix(people): respelling a name no longer rewrites common lowercase words #148) happens and undo has none to revert.
  • GET /api/v1/people/suggestions takes status=auto_applied and limit (1–200); items gain decidedAt. Chosen over a review kind because the review inbox is "waiting for your answer" and these are not.
  • /api/v1/info feature auto-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. AiTestBase keeps 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

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>
@Egoushka
Egoushka merged commit 82d089f into main Oct 20, 2026
3 checks passed
@Egoushka
Egoushka deleted the feat/auto-names branch October 20, 2026 12:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant