fix(trail): refuse a bare-number update that would overwrite another trail
Commit
A bare number names a project trail, and change and pull request numbers look the same: from a branch on trail #2706 (change cli/1744), 'entire trail update 1744 --body ...' replaced the description of unrelated project trail #1744. Reproduced on staging, and pinned by a fake-server test before this fix.
trail update <N> now looks up the checked-out branch's work (one request; only for a bare number in a clone of a repository in the trail's project, without --branch or --repo) and refuses when that work belongs to a different trail. The error names both trails, the command for this branch's trail, and the ULID form to update #N anyway; when N is the branch's change number it says so. A branch with no trail, a ULID, another project, or a failed lookup (with a warning) does not block the update.
Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com Claude-Session: https://claude.ai/code/session_01XJeHKftfKHD7hSi6ZxJww8 Entire-Checkpoint: 01M6KTNTHMNPJD6MMXHBK8NGZY