The guard still substituted the repository top level whenever the caller's
base spelling was not lexically under git's canonical top (macOS /var vs
/private/var, symlinked workspaces), so #1070's argument-order swap only
covered the lexically-canonical case - its own subdirectory test is red on
macOS.
Make the session cwd authoritative: canonicalize it once with realpath (so
containment against git's canonical paths still works and nested-worktree
adoption stays correct, #952) and never substitute the repository top.
Linked-worktree following is unchanged.
Refs #1024#1080#1070