Originally created by: lodar
Closes DIVE-2200. Marcus's non-blocking review note on DIVE-1963 (#259), filed as its own row rather than rebinding 1963 while it was mid-grade.
The DIVE-1963 comment claimed _gate_search_scope and _gate_resolve_qualified "branch on the same two inputs, so the sentence and the lookup cannot drift."
They did agree, and Marcus checked rather than took it: both computed rslug from the same %%|* split, the same [[ -z rslug && -n task_slug ]] && rslug=task_slug fallback, then the same [[ -n rslug ]] test. But that is parallel derivation, not shared. "Cannot drift" is what a shared definition buys; two copies that happen to be identical today buy "does not currently drift".
Same shape as the constraint made explicit in DIVE-1932's shelld work: a rule that holds because of the shape of the code, rather than because something declares it, is preserved by nothing.
Extract _gate_bind_slug — "the one repo a ref binds to, or empty for nothing binds it, sweep every known repo" — and point both call sites at it. The repo the gate looks in and the repo its warning names are now one answer rather than two derivations that agree.
No behaviour change. This is the claim being made true, not a fix.
Four cases pin the coupling as a contract: a ref carrying its own repo, a bare ref in a declaring task, the ref's own repo beating the task declaration, and nothing binding at all (falls through to the full sweep).
Three of the four go red against main without the shared helper. The fourth passes either way, because both sides return empty there and reach the same sweep — stated because 4/4 green reads like four independent guards and it is three.
tests/task_merge_gate_inferred_repo_unit.sh 18 passed / 0 failed. Seven sibling merge-gate suites unchanged green: multirepo 36, delivered-vs-cited 31, result_pr 29, gh_resolve 7, autodetect 14, ancestry 26, task_deliver 11.
Bundle rebuilt after the last src edit — the drift check caught that ordering on [#259] once already.
🤖 Generated with Claude Code
Ticket changed by: lodar