How to Benchmark Mobile AI Coding: Pass Rate, Cost, and Reproducibility Explained
This article explains why general-purpose code benchmarks fail to answer the questions engineering teams actually care about, and how to build a proper evaluation for AI coding agents working on mobile codebases. It breaks down the two essential metrics (pass rate and completion score), the three hidden variables in long-running task evaluation (pass rate alone is misleading, wall-clock time is itself part of capability, and cost accounting must be consistent), and a single practical metric, cost-per-pass, for cross-model comparison. It then covers how to design your own evaluation set from real historical work items, how to build a reproducible sandbox environment, and how to translate leaderboard numbers into concrete engineering decisions. Key takeaway: pass rate measures autonomous delivery, completion measures collaboration cost, time and unit cost measure engineering feasibility, and the task set plus sandbox determine whether the results are trustworthy.
1. Why AI Coding Needs Its Own Benchmarks
General-purpose code capability tests (code completion accuracy, function-level problem-solving correctness) cannot answer what engineering teams really need to know: can a model independently complete a change that spans multiple files and requires compilation and testing to verify, within a real repository? That is the problem mobile AI coding benchmarks are designed to solve.
These task sets are typically built around mobile application development scenarios, and they share a few distinctive characteristics:
- Long chains: A single task may involve reading code, locating modules, editing multiple files, compiling, running tests, and rolling back or retrying after failures. Tool calls can reach into the dozens.
- Long duration: One complete test round can take hours, which puts continuous pressure on a model’s context stability and error recovery.
- Strong environment dependence: Dependency versions, build caches, and differences between emulator or container environments can directly affect the conclusions.
- Hard criteria: Scoring often relies on hidden test cases or whether compilation and tests pass, leaving little room for subjective judgment.
For these reasons, the numbers in evaluation results cannot be read simply as “how strong the model is at coding.” With different metric definitions, task difficulty, and cost-control approaches, the conclusions can be completely opposite. Understanding the method is more valuable than memorizing a ranking.
2. Pass Rate and Completion Score: You Need Both
Leaderboards usually present two metrics side by side:
- Pass rate: The proportion of tasks that pass all hidden tests and satisfy every hard criterion. It is a binary “either success or failure” metric.
- Average completion score: Incomplete tasks still receive partial credit, typically computed as a weighted combination of the proportion of tests passed and how closely the change matches the expected scope.
Looking at pass rate alone underestimates capability. A model that completes 90% of the correct changes on 70% of tasks and only misses the final edge case may still post a low pass rate, yet in engineering terms it can already shoulder a substantial portion of the work. Conversely, completion score alone can also be misleading—a large volume of small changes can inflate it.
That is why a rigorous evaluation publishes both and uses a “tiered” conclusion: pass rate reflects the upper limit of autonomy (whether the model can deliver end to end), while completion score reflects cost-effectiveness in collaboration (how much it costs for a human to take over).
3. Three Hidden Variables in Long-Running Task Evaluation
A recent public update to a mobile AI coding benchmark reveals a very representative trend: a new-generation model raised its long-running task pass rate from roughly 12% in the previous generation to about 24%, a doubling; average wall-clock time per complete test round dropped from about 66 hours to about 27 hours; and average call cost fell from about $418 to about $317. Meanwhile, a model positioned around being “lightweight and low-cost” completed comparable tasks with about 17% pass rate, about 12 hours of time, and about $10 in cost—an extremely significant cost advantage. The top result was about 40% pass rate—meaning that even the leading approach still fails to complete roughly 60% of long-running tasks autonomously.
These numbers illustrate three frequently overlooked variables:
- Pass rate is not the only dimension. A low-cost 17% and a higher pass rate at higher cost may correspond to completely different total costs across a batch of tasks.
- Time is itself part of capability. Shorter time may come from better error recovery (fewer detours), or from fewer verification steps (less rigor). The evaluation must record both time and scoring results to distinguish “getting faster” from “getting sloppier.”
- Cost accounting must be consistent. Call costs should include every round, tool call, and retry; counting only the cost of successful tasks will systematically underestimate it.
A Metric for Easy Cross-Comparison
def evaluate(rows):"""rows: one record per taskpass: bool whether all hidden tests passedscore: float task completion score, 0~1cost_usd: float actual cumulative call cost for this taskwall_hours: float end-to-end time in hours"""n = len(rows)pass_rate = sum(r["pass"] for r in rows) / navg_score = sum(r["score"] for r in rows) / ntotal_cost = sum(r["cost_usd"] for r in rows)avg_hours = sum(r["wall_hours"] for r in rows) / n# Cost per pass: the money spent to deliver one successful taskcost_per_pass = total_cost / max(sum(r["pass"] for r in rows), 1)return {"pass_rate": round(pass_rate, 4),"avg_score": round(avg_score, 4),"avg_cost_usd": round(total_cost / n, 2),"avg_hours": round(avg_hours, 2),"cost_per_pass_usd": round(cost_per_pass, 2),}
cost_per_pass is the most practical single metric for selection: it combines “pass rate” and “cost” into one number and directly answers “how much will it cost to run 1,000 tasks.”
4. Designing an Evaluation Set: From Public Leaderboards to Your Own Question Bank
The value of public leaderboards is cross-comparison, but teams ultimately face their own repositories and their own tech stacks. It is worth building a small-scale evaluation set of your own—the scale does not need to be large; 20 to 100 tasks are enough to cover the main scenarios.
Task sources should come from real historical work items rather than being fabricated by hand:
- Defects from historical issues that were merged with fixes and have clear test cases;
- Refactoring requirements (replacing a dependency, splitting a module, adjusting naming conventions);
- New small features (CRUD endpoints with unit tests, page state management);
- Cross-module changes (interface signature changes affecting three or more files).
Difficulty tiering matters. Sort tasks by “number of files involved, whether cross-module reasoning is required, and whether environment configuration is required” into three tiers, and compute the pass rate separately for each. The real conclusion is often “very high pass rate on the easy tier, near zero on the hard tier”—which is far more actionable than a single average: the easy tier can be used with confidence, while the hard tier must have a human backstop.
Anti-contamination and reproducibility are two easily overlooked points:
- Use time-based splitting to control task leakage. Only use new issues created after a cutoff date, to avoid the tasks already being in the training data.
- Keep the tasks and reference answers offline, and score with hidden test cases during evaluation so that the test code is not exposed to the execution environment.
5. The Sandbox Environment: The Foundation for Trustworthy Results
When the same model runs the same task repeatedly, differences in results may come from the environment rather than the model. When building the evaluation environment, fix the following:
- Dependency snapshot: Lock build tools, SDK, and dependency versions; disable resolving the latest versions over the network.
- Command contract: Define fixed build and test commands, timeout limits, and the allowed network scope.
- Resource limits: Keep CPU/memory/disk quotas consistent so that build failures are not counted as model failures.
- Trace logging: Fully record each round’s tool calls, command output, diffs, and time.
Architecturally, you can use a container platform for isolation and elastic scheduling, object storage to archive the complete trace of each run, a message queue for task distribution and result collection, a logging service for centralized failure-cause search, and monitoring and alerting to flag anomalies in pass rate or time.
# Evaluation environment constraints (illustrative)sandbox:image: build-env:pinned-2026-08 # Fixed image, drift not allowednetwork: none # No network during evaluation to avoid external interferencecpu: 4memory: 8Gitimeout_seconds: 3600 # Per-task timeout; a timeout counts as a failurejudge:build_cmd: "./gradlew assembleDebug"test_cmd: "./gradlew testDebugUnitTest"hidden_tests: ["t_normal", "t_edge", "t_regress"]scoring:pass: "all(hidden_tests)"score: "passed_tests / total_tests"
One thing must be clear: timeouts, compilation failures, and test-framework errors must all be classified as “task failures,” not “skipped environment anomalies.” Only then can the results align with the leaderboard’s methodology.
6. Turning Leaderboard Numbers into Engineering Decisions
When you receive an evaluation result, it is best to read it in this order:
- Look at pass rate to determine the autonomy boundary. A 40% figure means 60% of tasks still need a human to take over, making it suitable as a “speed-up tool” rather than a “replacement for labor.”
- Look at completion score to determine collaboration cost. High completion with low pass rate means the direction of the change is right but the details are off, which suits generating a draft for a human to finish.
- Look at time to determine process bottlenecks. If most of the time comes from builds and tests rather than inference, then optimizing CI and caching pays off more than switching models.
- Look at unit cost to determine feasibility at scale. Under batch tasks, differences in
cost_per_passcan be amplified into orders-of-magnitude gaps. - Look at variance to determine reliability. If the pass rate fluctuates widely across repeated runs of the same task, it is not suitable for an automated pipeline.
Common Pitfalls in Practice
- Treating the top leaderboard result as the only choice. Leaderboard tasks differ greatly from your own repository; it is best to run a small local re-test of 20 to 50 tasks before deciding.
- Blocking failures directly in CI. A long-running task that fails in CI will block delivery; it is better to run it as a side-path task first, and merge after human confirmation.
- Ignoring data boundaries. Code must be desensitized before leaving the repository; repositories involving keys, internal domains, or proprietary protocols should be handled through private deployment or a compliance channel.
- Not measuring real returns. Compare adoption rate, rework rate, review time, and defect escape rate before and after to prove the tool’s value; a single demo cannot make the case.
7. Summary
The value of mobile AI coding benchmarks lies not in producing a ranking, but in providing a reusable measurement framework: pass rate measures autonomous delivery capability, completion score measures collaboration cost, time and unit cost measure engineering feasibility, and the task set and sandbox environment determine whether the conclusions are trustworthy. When a new-generation approach doubles the pass rate and cuts the time to one-third, what truly deserves attention is not “can AI write code now?” but “within our own repository, which layer of work has it taken over, and who shoulders the remaining layer?”
The recommended approach for teams is: build a tiered evaluation set, fix the sandbox and scoring scripts, connect evaluation results to monitoring, and run regular regressions. Check the leaderboard quarterly, but run your own evaluation after every toolchain change—because the only capability that degrades is the one nobody continuously measures.
