Debugging unfamiliar code
Trace a symptom from a support ticket to its root cause in a codebase you have never opened.
Open-source engineering practice
Interviews and real jobs are not about inverting binary trees. They are about stepping into code you did not write, understanding what is broken and fixing it so it stays fixed. Patchground gives you a real repository, a real ticket, your own editor and AI, and checks that run in Docker.
How it works
pgnd startA real repository with a bug report or feature request, in a fresh workspace. The tests that decide the outcome stay hidden.
your editorRead code you did not write, reproduce the problem and change it. Use your own editor and AI agent, or work without one.
pgnd checkRun the checks in Docker as often as you need. Red turns green only when the behaviour is actually right.
pgnd submitYour work is frozen into a report: what passed, whether your test proves the fix and where your diff landed.
What you practise
Trace a symptom from a support ticket to its root cause in a codebase you have never opened.
Write a regression test that fails before your change and passes after. Patchground runs it on both versions to check.
Direct Claude Code, Codex, a local model or no tool at all. Then use the outcomes to check what it really changed.
Extend existing behaviour without breaking what already works, so the old tests stay green.
Fix the problem in the right place. The report shows exactly which files your diff touched.
Every challenge has a realistic timebox. See how long you really took and how many hints you used.
Live debugging rounds and take-home feature tasks, rehearsed on real repositories against the clock.
Read before changing, find the right place for a fix, leave the tests stronger than you found them.
Direct your agent on a realistic task, then check its work with tests, regression evidence and diff scope.
What you walk away with
src/payments/Visible and hidden checks run fresh in Docker on your final code.
Your new test is run on the original code and on yours. It only counts if it catches the bug.
It flags deleted test files or functions and fewer assertions, so a fix can't pass by weakening tests.
It lists every file you changed and whether each one is in the area the ticket expects.
Elapsed time against the timebox, plus how many practice checks and hints you used.
Why it exists
Google: 90% of our engineers use the software you wrote (Homebrew), but you can’t invert a binary tree on a whiteboard…
Hello, my name is David. I would fail to write bubble sort on a whiteboard. I look code up on the internet all the time. I don't do riddles.
Engineers spend most of their time understanding existing codebases, reviewing pull requests and iterating on solutions, rather than implementing algorithms from scratch.
This is more representative of the developer environment that our future employees will work in, and also makes LLM-based cheating less effective.
The developer’s role has changed to be an orchestrator of agents, but LeetCode-style puzzles aren’t going to help you find them.
We found that brainteasers are a complete waste of time. … They don’t predict anything. They serve primarily to make the interviewer feel smart.
From each platform’s public pages · checked 2 November 2026
| Aspect | Patchground | LeetCode | HackerRank | CodeSignal | Exercism | CodeCrafters |
|---|---|---|---|---|---|---|
| What you work on | A real repository with a bug report or feature ticket | 4,100+ algorithm problems | Interview Preparation Kit: arrays, hashmaps, greedy, dynamic programming, trees… | Courses with an AI tutor, and certified coding assessments | 8,700+ small exercises across 85 languages | Build your own Redis, Git, SQLite… |
| Where you write code | Your editor, on your machine, with any AI or none | Browser editor, with a built-in AI agent on Premium credits | Browser editor | Browser IDE | Browser, or your editor through its CLI | Your editor; you submit with git push or its CLI |
| Where checks run | Docker, on your machine | LeetCode’s judge | HackerRank’s servers | CodeSignal’s servers | Your machine, or Exercism’s test runner | CodeCrafters’ test runners |
| What you get back | Verified outcomes: checks, regression proof, diff scope, time. No score. | Accepted or not, with runtime and memory percentiles | Pass or fail per test case | An assessment score from 200 to 600 | Passing tests, automated analysis, optional human mentoring | Stage-by-stage test results |
| Account needed | No | Yes | Yes | Yes | Yes; the CLI uses your API token | Yes |
| Source code public | Yes, Apache-2.0 | No | No | No | Yes, on GitHub | Its test runners are, on GitHub |
Sources: LeetCode problem list, Premium · HackerRank Interview Preparation Kit · CodeSignal Learn, assessment score · Exercism homepage, working locally · CodeCrafters how challenges work, CLI, redis-tester. Products change; if a cell is out of date, open an issue. Exercism and CodeCrafters are excellent—use them too. Patchground is narrower: unfamiliar codebases, your own tools, and outcomes your tests can back.
No account, server or subscription. Image builds may use the network; checks run on an internal Docker network with resource limits.
Use Claude Code, Codex, a local model, or nothing—in your own editor. Patchground needs no API key and has no built-in AI; what your assistant sees is up to you.
Every published challenge must prove, in its container, that the broken state fails and a reference fix passes—deterministically.
Challenges
The catalog API rejects the last page of results whenever the result count is not a multiple of the page size. Find the root cause and fix it.
patchground-examplesbuilt-inPython / Debug · pagination, off-by-one
A TTL cache keeps entries alive when they are read, expires them one tick late and accepts nonpositive TTLs. Find the causes and fix them without changing write behavior.
patchground-examplesbuilt-inPython / Debug · caching, ttl, time
OrderService imports and constructs SQLite and SMTP adapters itself, so nothing can be swapped for SMS or for fast tests. Introduce ports, inject the adapters and keep behaviour identical.
patchground-examplesbuilt-inPython / Refactor · architecture, ports-and-adapters, dependency-inversion, refactoring
A strict CSV stock importer aborts at the first bad row. Add a non-strict mode that returns the valid items and one precise error per rejected row, keeping strict behavior unchanged.
patchground-examplesbuilt-inPython / Feature · csv, validation, parsing, error-handling
A successful charge followed by a timeout causes a retry to charge twice.
patchground-examplesbuilt-inPython / Debug · idempotency, retries, payments
A synchronous exact-topic event bus cannot take a subscription back or listen once. Add unsubscribe and once with precise snapshot, re-entrancy and error-collection behavior.
patchground-examplesbuilt-inTypescript / Feature · events, reentrancy, error-handling
A release-tool library chooses the wrong latest version and misorders prereleases.
patchground-examplesbuilt-inTypescript / Debug · semver, ordering, releases
No challenge matches. Clear the search or pick another filter.
Difficulty and realism are not yet human-rated. Challenges marked AI-generated were drafted with a coding agent and validated like any other. built-in means shipped with the CLI and validated in this repository's CI; verified means a community pack whose every challenge passed pgnd validate in Patchground's CI on the date shown. Installing packs by name from the CLI is planned; today the CLI runs challenges from a local path or a pack URL. How to run one · Registry status
A pack is a git repository with a pack.yaml and one folder per challenge. It stays in its author's repo; Patchground only indexes it after re-validating every challenge in its own CI. Stars and forks come from the host.
Curated examples shipped with the CLI; validated in this repository's CI on every push.
No community pack has been verified yet. Publish yours and it will appear here after the next registry run.
Install
Patchground is an early, working release on PyPI. The curated challenges ship with the CLI, so there is nothing else to download.
uv tool install patchground
pgnd doctor
pgnd list --builtin
pgnd start pagination-last-pagePublish your pack
pgnd new my-bug scaffolds a runnable challenge; pgnd validate my-bug proves the broken state fails, the reference passes, and the result is stable. Fix every step until it reads valid.
Put each challenge folder at the root of a public repository next to a pack.yaml that names it. Declare a content_license and provenance in every challenge.yaml; keep services: [].
spec_version: "0.1"
name: my-pack # lowercase, hyphens; first publisher keeps the name
version: 0.1.0
description: Bugs from a payments team
challenges: [my-bug]Add the GitHub topic patchground-pack to the repository. On other hosts, add your https:// clone URL to registry/sources.yaml. That is the whole submission.
Every few hours the registry clones tagged repositories, runs the policy checks and pgnd validate on each challenge in Patchground's CI, and publishes the result. Passing packs show up in the catalog with a verified badge; anything else is explained on the status page with the failing step.
Planned: pgnd pack publish to validate and tag in one command, and pgnd pack add <name> to install by name from this index. Until then the steps above are the whole process. The registry never lists hidden checks, hints or reference solutions; only the public metadata you see in the catalog. Authoring guide
Built in the open
Patchground is Apache-2.0. Sharpen a ticket, extend the validator, add a language adapter, or report what confused you on your first session.