Cleanup after the name generator: the old AI names code, and only used runs kept (#1345) #1353
Loading…
Reference in a new issue
No description provided.
Delete branch "chore/1345-names-cleanup"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Findings for #1345.
1. Old AI names code.
audio_service.generate_name_optionshad no caller outside tests: the session routePOST /sessions/{id}/name-options/generate(its handler shares the name) runs thenamesWorkbench tool, which draws fromapp/names/throughname_service.draw. Prep's Names drawer uses that, and Describe usesname_service.describe, which does not touch what was removed. Removed: the function,_NAME_CATEGORY_DESCRIPTION_HINTS,_NAME_CATEGORY_DESCRIPTION_HINTS_BY_SYSTEM,_NAME_GENERATOR_SYSTEM_PROMPT, the three pf2e/free-form/dnd5e hint tests, and thegenerate_name_optionshalf oftest_names_sends_its_schema. Kept:NAME_OPTIONS_SCHEMA(thenamestool's output schema, used bygeneration_service).2. Names runs. A "names run" is a
generation_resultsrow withtool_id='names'. Every draw is persisted (sheet route and Planning both go throughrun_and_record), plus onename_offersrow per name. The old retention kept an unused run for 30 days. A draw readsname_offersand the wiki titles and aliases (name_service.excluded_keys), nevergeneration_results, soname_offersalone gives "never twice" and is untouched.Signals for "used": a run in a prep sheet or For later (
kept_clause, "Keep it") was already recorded. Saving to the wiki records no link to the run (Planning callscreateLoreEntry, a sheet callscanonical-names), and "copied" is client-only, recorded nowhere. So a run counts as used whenkept_clauseholds it, or one of its names (compared byname_key) is now a live wiki page title or alias in the same campaign. Copying does not count.Done:
generation_result_service.delete_unused_names_runs(24 h), called from the existing dailyprune_generation_resultstask. No migration.Closes #1345.
🤖 Generated with Claude Code