Originally created by: lodar
DIVE-1935 made the merge-gate live for the whole fleet — for one repo. _PUSH_DEFAULT_REPO is a readonly constant pinned to 5dive-ai/5dive and every binding resolved against it, so lodar/5dive-api (== prod) and lodar/5dive-frontend had zero coverage. Marcus's DIVE-1911 hygiene sweep found five tasks at status=done with genuinely unmerged work there, hours after DIVE-1935 closed.
The sharper half: off-repo the gate was not blind, it was wrong. An api task whose result said PR #6 was judged against the CLI repo's unrelated [#6] — a confident verdict about the wrong pull request, which can refuse a legitimate close or bless a bad one.
delivery_ref and full pull URLs resolve in their own repo; a Branch: line or a bare PR #N can declare one with a Repo: <owner>/<repo> body line (the sibling of the DIVE-1462 Branch: line). The extractor emits <slug>|<number>, and a URL beats the same number appearing bare in the same text.#N is never resolved against a default slug. Exists in exactly one known repo → that repo (the common case, so DIVE-1935 coverage does not regress); in two or more → tie-break only on evidence (exactly one names the ident in its title/head-branch); otherwise ambiguous — a loud warn plus a task.merge-gate-ambiguous audit row that blocks nothing and blesses nothing.Branch: search sweep every repo. Branch: was fail-CLOSED against the CLI repo only, so a legitimately landed api task was permanently unclosable. A repo whose listing fails no longer counts as scanned: the close reports partial-repo-scan-N-of-M and is audited UNVERIFIED.delivery_ref is refused outright (done-with-ambiguous-delivery-ref). No live task carries one (all 7 are URLs, checked 2026-07-25) — this keeps the shape from being introduced silently.task merge-audit sweeps all three repos via FIVE_GATE_REPOS, so a fourth repo is config and not a patch.ambiguous, partial-repo-scan-N-of-M, a dead ref parser, an unresolvable reference and unreadable checks on a confirmed merge are all non-verdicts that existed only as a warn (scrolls away) and an audit row (a different artifact than the one anyone reads). The task row still said done with no finding — the clean verdict the gate declined to make. A [merge-gate: UNVERIFIED — <reason>] marker now rides the result: appended, never substituting the maker's text, and absent on a genuinely verified close so it stays meaningful. Same rule as DIVE-1869 — a check that could not reach its answer must not render as one.statusCheckRollup carries every run on the head commit, so a check that failed and was re-run green still contributed its stale FAILURE. Verified on lodar/5dive-api#13: smoke-gate FAILED 11:49:41, SUCCEEDED 12:41:15, merged 12:42:06 — it went green and then merged, so DIVE-1810's merged-red finding was a false positive and is withdrawn. A green check still cannot launder a different red one.15 findings, 11 ambiguous, 0 unverified. The real ones:
| task | PR | state |
|---|---|---|
| DIVE-1672 | lodar/5dive-frontend [#16] | OPEN |
| DIVE-1674 | lodar/5dive-api [#12] | MERGED-RED |
| DIVE-1809 | lodar/5dive-api [#12] | MERGED-RED |
| DIVE-1935 | 5dive-ai/5dive [#25] | CLOSED (ignored by the gate by design) |
DIVE-1828 (api [#17], OPEN) was in the first sweep and has since been reopened off done, so the audit no longer scans it. DIVE-1935's own "0 OPEN, 0 merged-red" is now correctly scoped to the CLI repo. The sweep also stops reporting DIVE-1874/1875 as CLOSED on a #25 that is a 5dive-api number colliding with an old CLI one — the benign half of the same bug, previously excused by a footnote that covered unverified but not a state that happened to resolve.
Known bound, stated not hidden: the sweep cannot see a task that names no PR at all. DIVE-1690 closed with unmerged frontend work and no PR anywhere; the weekly branch-hygiene digest is what covers that class. Also still open: the gate cannot distinguish a PR a task delivered from one it is reporting on, so an audit/recap task enumerating open PRs still needs --force-merge-gate (audited).
Live evidence for DIVE-1771: api [#12] merged to api main without its smoke gate ever passing — that is the hole DIVE-1771 (make smoke a required CI gate) exists to close.
All still OPEN today: api [#6] CONFLICTING (DIVE-1560), api [#10] MERGEABLE (DIVE-1808), api [#17] MERGEABLE (DIVE-1828), frontend [#16] CONFLICTING (DIVE-1672); DIVE-1690 has no PR anywhere. Marcus reopened them himself: 1560 todo, 1828 todo, 1808 in_progress, 1690 blocked on a lodar brand gate (mature customer-facing /council, so no dev PR). DIVE-1672 is still at done and is being routed to dev3 as DIVE-1956.
tests/task_merge_gate_multirepo_unit.sh, 24 assertions. All 15 task/gate suites pass, including the DIVE-1935 harness — whose gh stub is now repo-aware, because a stub answering every --repo identically makes every bare number look like a three-way collision.
🤖 Generated with Claude Code
Ticket changed by: lodar