MergeDesk

Orient a large PR. List cited exceptions. Advisory.

MergeDesk is an exception desk for reviewers of large, often 1k–3k line, agent-written pull requests. It gives a reading order, an import neighborhood, and a short cited list a human can actually check. The stamp is advisory. Models never merge and never write patches. Public GitHub repos only.

Inspiration

Coding agents write faster than humans can review. Chen and Stratton (Harvard, 2026) measure the volume: after agents land, lines of code per worker-month rise about 30%, pull requests about 23%, and time from submit to merge about 49%. Those are volume figures for the industry, not MergeDesk metrics.

Sonar’s State of Code 2026 is the trust case: 96% of developers do not fully trust that AI-generated code is functionally correct, and 61% say it often looks right and still is not reliable. Again, a survey of the job, not a score for this app.

Incumbent review bots comment the diff. The reviewer of a 73-file, +3,000-line agent PR still has no start, no neighborhood, and no short list of exceptions that survived coverage. That is the job MergeDesk is built for.

The one-liner in the product is the brief: Orient a large PR. List cited exceptions. Advisory.

What it does

Paste a public GitHub PR URL, or click a known desk. MergeDesk:

  1. Fetches the issue and diff, snapshots the tree, and builds a local import neighborhood (seed plus 1–2 hops, cap 40 files).
  2. Packs a small context. Nemotron never sees the full repo.
  3. Runs a staged workflow on Nebius Token Factory: Lightning triage, Super findings, Tavily for invented surfaces, Super VL on screenshots, Ultra only when Super is unsure.
  4. Draws the neighborhood on a React Flow canvas with a recommended reading order. The caption is honest: this is an import / reference neighborhood, not a proven execution trace.
  5. Walks the change: numbered notes, who-does-what routing slips, files grouped by job.
  6. Lists cited review comments and copy-only suggested diffs. The desk never applies a patch.
  7. Stamps the run with one of three advisory labels: No cited exceptions, Cited exceptions, High-certainty exception. Review comments do not move the stamp. High-certainty is a regex secret, not a merge gate.

Coverage chips show what this run actually saw (snapshot, parser, hops, Tavily, vision, review). A Live / Fixture / Replay badge says whether Token Factory ran. An estimate ledger lists each Nemotron SKU, tokens, and estimated USD.

How I built it

Deterministic facts stay off the model. Tree-sitter (JS, TS, Python) and a regex neighborhood (Go, Rust, C, Java, and similar) build the graph on the server. Dagre lays out the canvas. Fixtures and a persisted run store make the desk demoable when a live path fails.

Ambiguous evidence goes to Nemotron on Token Factory (https://api.tokenfactory.nebius.com/v1/). Routing is in app code, not an auto-router:

Step Catalog id When
Triage nvidia/Nemotron-3_5-Lightning Every live run
Map and findings nvidia/nemotron-3-super-120b-a12b Every live run
Walkthrough / review Super After Gate
Vision nvidia/Nemotron-3.5-Super-VL 1–3 screenshots
Escalate nvidia/Nemotron-3-Ultra-550b-a55b Super confidence under 0.55, or Super proposed a high-certainty exception
Fallback triage nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B Lightning unavailable

Spend caps skip Ultra. Hugging Face or OpenRouter Nemotron calls do not count for this hackathon; MergeDesk does not use them at runtime.

Tavily searches package and API claims. Zero hits is not proof of absence; the ticket says so.

Stack. Next.js 16 App Router, React 19, TypeScript, Tailwind, Vitest, pnpm. GitHub REST for public PRs. OpenAI-compatible client against Token Factory. GitHub Action posts one advisory comment and always exits 0.

Pipeline: Fetch → Snapshot → Graph → Pack → Triage → Tavily → Vision → Gate → Review. Only VerdictGate sets the stamp.

Challenges I ran into

Two streams, one desk. Walkthrough and review can list concerns the stamp ignores. That is intentional (the sample PR stamps No cited exceptions while review still cites a 0ms timeout and an invented package), and it is easy to misread in a screenshot. The UI now says the stamp is advisory and that review does not move it.

Map first, then stamp. Early builds buried the neighborhood under overlay chrome or HTML recreations. The desk had to show the real canvas, reading order, and tickets, or the product looked empty.

Bounded context. Dumping a 3,000-line PR into one model call is the wrapper everyone else ships. Packing a neighborhood that is small enough for Super and still useful to a human took more iteration than the prompts.

Host limits. Vercel Hobby maxDuration is 300s on POST /api/runs. Long Ultra runs need a Node host (Render). Render can sleep; fixtures and a saved run keep the demo alive.

Honesty under failure. If the key is missing or Token Factory HTTP fails, the desk must say Replay, not pretend the model ran. Prebaked JSON and the badge were the fix.

What I learned

A complete product for this brief is input → useful result → next action, not a chat box. The useful result is a start file, a neighborhood, and a cited list. The next action is still the human.

Nemotron is the wrong tool for “what imports what.” It is the right tool for “does this hunk invent an API, and can Tavily find it.” Token Factory made SKU routing, prefix cache, and a visible estimate ledger practical in a five-day ship.

Judges and reviewers both need coverage. If vision was skipped, the desk has to say so.

What’s next

Keep the stamp advisory. Add native 1920×1080 recapture of walkthrough and review for demos. Optional GitHub Action on more public repos. No merge permission. No patch apply.

Try it

  1. Open https://mergedesk-pihi.onrender.com
  2. Paste mergedesk-sample#2 or click a fixture
  3. Read the map, then the walkthrough, then the stamp

If the host is waking, a finished run is at https://mergedesk-pihi.onrender.com/r/dquuBdp4SNhL_SgjtwASe. Source: github.com/AdityaKrSingh26/MergeDesk.

Built With

Share this project:

Updates

Submission history