When you create a post in WP, if you don't specify a title rapidly, WP generates a default slug on autosave, based on the post ID. Then, when you add the title later, unless you modify the slug by editing it, it remains the same (based on post ID)
What I'm trying to do is add an action on post publish, that generates and saves the post slug, based on the post title.