Chooses the worktree branch for a ticket whose frontmatter does not name
one. stem is the ticket file’s stem; exec-sourced tickets have none and
always fall back to sloop/<ticket_id>. Err refuses the ticket with the
given reason: reindex holds it, sloop post rejects it.
The numeric ordinal an id ends in, whatever its prefix: TICK-38 is 38.
Allocation makes this a monotonic proxy for registration order, so it is
what recency ordering falls back to when timestamps tie. Ids that do not
end in -<digits> have none.