Repository navigation
Description
in_scope()'s no-owner refusal tells the reader to run the copy inside a hub checkout, which is the remedy for exactly one of the several ways origin_owner() returns None. The other causes reach the same sentence and are misdiagnosed by it.
The behavior
origin_owner() returns None for any failure of its one git call, and for a URL its pattern does not match. The refusal then reads, in part:
the remedy for a copy of this script sitting outside a checkout is to run the copy that lives inside a hub checkout instead of this one
That is correct advice for a copy sitting outside a checkout. It is wrong advice for each of these, all of which produce the same None:
- git is not on
PATH, so the call raises and the handler returnsNone. Running a different copy of the script changes nothing. - The call times out, on the 5 second bound. Same.
- An inherited
GIT_CEILING_DIRECTORIESstops discovery walking up from the script's own directory to the repository root. The script is inside a checkout, and the probe still finds no repository. Constructed reproduction:
git init /tmp/probe/anchor
git -C /tmp/probe/anchor remote add origin https://github.com/acme/anchor.git
mkdir /tmp/probe/anchor/scripts
git -C /tmp/probe/anchor/scripts remote get-url origin
# https://github.com/acme/anchor.git
GIT_CEILING_DIRECTORIES=/tmp/probe/anchor git -C /tmp/probe/anchor/scripts remote get-url origin
# fatal: not a git repository (or any of the parent directories): .git- A local-path
origin, which a clone from another directory on the same machine has. The owner pattern reads the second-to-last path segment, so a checkout cloned from/srv/mirrors/ProjectTemplateyields ownermirrorsrather than no owner at all, and the refusal that follows is the different owner one rather than this one. That case is not misdiagnosed so much as undiagnosable: the message names an owner the reader has never heard of.
Why it matters now
Until recently the two write paths carrying this refusal, comment and reply, were both writes, where failing closed on an unreadable scope is plainly right and a wrong remedy line costs a reader one confused minute. wait now refuses on the same terms, and wait is otherwise a read. A user whose git is missing, or whose environment carries a ceiling, loses a polling command that never needed the owner for its reading half, and the message sends them to fix something that is not broken.
This is not an argument to reopen that decision. Refusing outright is what makes all three write paths state one rule, and the read remains available through status, which writes nothing. It is an argument that the sentence should name the cause it actually hit.
Suggested direction
Distinguish the causes at the point they occur rather than collapsing them into one None. The probe already catches its exception separately from a non-matching URL, so the two could carry different reasons, and a third for a URL that matched but yielded an implausible owner. Then the refusal names what happened and advises accordingly: install git, raise the timeout, unset the ceiling, or run the copy inside a checkout.
Worth deciding at the same time whether a local-path origin should refuse rather than silently resolve a path segment as an owner, since an owner read out of a filesystem path is not an owner in the sense the boundary means.
Scope
Found by a local strict review pass on the branch fixing #1561 and #1562. The message itself predates that branch and is unchanged by it, so it is reported here rather than folded in.
Activity
Keep the Scope Probe Out of an Inherited Environment, and Route wait …
ptr727 commentedon Oct 23, 2026
Closed under the maintainer's decision (ptr727, 2026-10-23) on #3391: the backlog keeps real bugs with a stated failure, features the maintainer wants, and open decisions. A finding the review loop filed on code or text a change did not touch, a refactor or consolidation chore, a tracker, a wording item, or a guard shape no session has produced is closed rather than worked. Reopen with the input and the wrong result if this issue states one.