Testing and Evaluating End-to-End App Generation with Open-Weight Models
Most model benchmarks stop at single-question accuracy—one problem, one function, one snippet of code—which says little about real engineering performance. This article argues for end-to-end app generation as a more meaningful evaluation basis: give a model a complete specification and check whether it produces an app you can actually open, click through, and run. Based on hands-on tests across login, list, and form pages, it shows that degradation shows up in requirement fidelity and state completeness rather than code syntax. It walks through a spec-first evaluation design with a weighted scoring card, attributes the capability gap to four levels of understanding depth, and lays out five engineering techniques for closing it—contracts first, per-page generation, tests as specs, constraint injection, and an automated regression loop. It also covers deployment and operations essentials, why open weights matter for control, reproducibility, and supply-chain safety, and a practical adoption checklist.
1. Why Use End-to-End App Generation as an Evaluation Benchmark
Most traditional benchmarks stop at “single-question accuracy”: one question, one function, one snippet of code. These metrics reflect a model’s language and knowledge level, but they barely predict how it will perform in real engineering. The reason is that real delivery tasks combine four traits at once: large context (requirements documents, design-spec notes, and interface contracts), many mutually coupled constraints, a large share of implicit requirements (“support resetting filters” implies state rollback), and acceptance criteria that must actually execute (the app runs and the interactions line up).
A more valuable evaluation is therefore to hand the model a complete requirement and have it produce an app that can be directly accessed, clicked, and run through the main flow, then judge it item by item against an acceptance checklist. Interfaces like this usually reveal a clear capability gradient:
- Display-type pages (e.g., a login page): highly concentrated patterns and well-covered corpus, so models reproduce them easily.
- Data-type pages (e.g., a list page): filter conditions, state linkage, pagination, and empty/loading states begin to cross, so constraints start to interact.
- Input-type pages (e.g., a form page): field relationships, validation timing, error localization, and draft retention—essentially a state-machine completeness problem, and the hardest of the three.
Watching a model’s fidelity decay along this gradient exposes its capability boundaries better than any leaderboard.
2. Evaluation Design: Spec First, Acceptance Checklist in Parallel
To make evaluation reproducible, the requirements document must first be turned into a spec. A structured task description should contain at least three parts: task constraints, a page list with acceptance items, and prohibited items.
task: end_to_end_app_generationstack: unrestricted language and framework; the model may choose freelypages:- id: loginmust_have:- Required-field validation for username and password, with field-level error messages- Captcha clickable to refresh, disabled during the countdown- Carousel auto-plays plus manual switching, pauses when leaving the pagemust_not_have: [plaintext credential storage, hardcoded secrets]- id: listmust_have:- Filters: category / price range / on-sale status, with one-click reset- Filter state synced bidirectionally with URL query parameters; refresh restores state- Pagination + empty state + loading state + retry on request failure- id: formmust_have:- Field linkage: switching the required-field set when customer type changes- Validation timing: validate on blur, full validation on submit- Retain the filled draft on submit failure; localize errors to specific fieldsacceptance: each must_have maps to one executable acceptance case
Once acceptance items are written as checkable entries, evaluation shifts from subjective impression to scoring. Suggested dimension weights (adjust to your team’s actual situation):
| Dimension | Weight | How It’s Judged |
|---|---|---|
| Runnability | 20% | Build passes, main flow works end to end |
| Requirement coverage | 30% | Hit ratio of must_have items |
| Constraint consistency | 20% | Whether cross-cutting constraints (linkage, sync, state rollback) are correct |
| Engineering maintainability | 15% | Module structure, type completeness, naming, unused dependencies |
| Visual and design consistency | 10% | Alignment with the design system / component library conventions |
| Latency and iteration cost | 5% | Time for the first version, time to fix one round |
Keep the scoring function minimal so it plugs easily into automation:
weights = { runnability: 0.20, coverage: 0.30, consistency: 0.20,maintainability: 0.15, visual: 0.10, latency: 0.05 }function score(report):total = 0for (dimension, weight) in weights:total += weight * normalize(report[dimension])return total, report.failed_items
The key output is not the total score but that failed-items list—it points directly at the capability shortfall.
3. Test Observations: Decay Happens in Requirement Fidelity, Not Code Syntax
Running end-to-end generation on a real project produced highly consistent observations:
Login page: basically usable. The page skeleton is complete and the high-frequency interactions are all there—the “tweak it a little and ship it” level. This tier is not a problem, because the login form is the densest pattern in the entire frontend corpus.
List page: correct structure, unmet requirements. The overall layout, component breakdown, and data-rendering path are all right, but the filter block is either missing entirely or rendered without bound state. This is not an occasional omission but a systematic shortfall for this class of page: the model tends to generate an interface that looks right rather than an implementation whose behavior matches the spec.
Form page: incomplete field relationships and validation logic. It runs, but details like linked fields, validation timing, and draft retention after a submit failure are heavily simplified. A form is a state-machine problem; every constraint in the spec is a state-transition rule, and dropping one produces observably wrong behavior.
Style and experience: engineering usability first. Generated visuals typically sit slightly above a wireframe prototype but clearly below artifacts that reuse a mature component library and design tokens. The design feels plain.
Latency: End-to-end generation of a multi-page project often takes tens of minutes, while some closed-source flagship solutions compress this to a few minutes. Latency is not itself a capability metric, but it dictates the pace of “iterative repair”—the slower the generation, the higher the cost of filling gaps through repeated rework. Peak-hour queuing and rate limits on hosted services can amplify this cost further.
The conclusion is clear: on display-type tasks, the gap between open-weight models and leading closed-source models is small; the gap concentrates in “joint constraint satisfaction” and “state completeness”—the parts that demand deep understanding.
4. Gap Attribution: Four Levels of Understanding Depth
Breaking “understanding depth” apart reveals four progressive levels, with the dividing line for model capability appearing at the third:
- Literal understanding: grasping what each requirement sentence says. Most models already pass this.
- Structural understanding: mapping sentences into page regions and a component tree. Most models manage this too.
- Joint constraint satisfaction: combining items scattered across different parts of the document that depend on each other. For example, “sync filters to the URL” involves three pieces of logic at once—filter state, route-parameter parsing, and initialization backfill—and dropping any one makes the feature appear broken. This level fails for three typical reasons: attention decay on intermediate information in long specs; implicit requirements that need cross-item reasoning rather than local parsing; and a model tendency to “produce visible results fast,” sacrificing completeness.
- State and lifecycle completeness: correctly handling validation timing, error localization, the loading/empty/error trio, rollback on failure, and cleanup on unmount. This requires the model to mentally simulate the full interaction sequence, not just generate the corresponding UI.
Closed-source flagship models are more stable at levels three and four, essentially because they are better at treating a spec as a set of hard constraints that must all be satisfied simultaneously, rather than as descriptive text to “implement roughly.”
5. Engineering the Gap: Five Ways to Raise Fidelity
Model capability is hard to change in the short term; engineering methods pay off immediately.
1) Contract first. Have the model produce type definitions and data structures first, get them reviewed, then generate the UI. Types are the cheapest requirements validator.
// Step one: produce only the contract, no UItype FilterState = {category: string;priceRange: [number, number] | null;onSaleOnly: boolean;};type ListPageProps = {initialFilter: FilterState; // parsed from the URLonSubmit: (f: FilterState) => void;};
2) Generate per page / per module, with interface contracts managed centrally. Generating the whole site at once fills the context window and dilutes later pages’ constraints; sliced generation with fixed contracts keeps each call focused on a few hard constraints.
3) Tests as specs. Rewrite must_have items into acceptance cases, submit the cases first, then let the model fill in the implementation—failed items become the next round’s input directly. This is far more efficient than eyeballing whether the list page skipped its filters.
4) Constraint-injection template. Explicitly declare in the prompt the “set of items that must all be satisfied” and the “items that must not be simplified,” and require the model to self-check before finishing.
[Mandatory constraints — must not be omitted]1. Filter conditions must sync bidirectionally with URL query parameters and restore on refresh;2. On submit failure, the draft must be retained with field-level error messages;3. Do not introduce any undeclared third-party dependencies.[Pre-output self-check]List the implementation location (file:function) of each constraint above, marking "implemented / not implemented".
The self-check step costs almost nothing but is very effective at improving constraint consistency, because it turns “implicit omissions” into problems the model must explicitly confront in its output.
5) Automated regression loop. Generate → build → unit/E2E tests → static checks → feed failure logs back into the next round. Without this loop, the model can only repair by guesswork; with it, the model effectively gains the ability to “look at the run result and fix,” which often pays off more than swapping in a stronger model.
6. From Artifacts to Deliverables: Deployment and Operations Essentials
Generated code is only half the job; the other half is keeping it running reliably in production.
- Static asset hosting: upload build output to object storage with CDN distribution, which naturally supports canary releases and version rollback.
- Dynamic service hosting: when server-side capability is needed, use a container platform plus a gateway plus a relational/cache database, rather than running generated code bare on a production host.
- Observability: wire in logging, metrics collection, monitoring alerts, and distributed tracing, and add the frontend load-failure rate and backend API error rate to alert rules.
- Long-running tasks: operations like report export and bulk import should go through a message queue plus a task scheduler, returning a task identifier immediately to avoid request timeouts.
- Security audit: this is where generated code is most likely to break. Check whether secrets are hardcoded (move them to a key-management service), whether unvetted dependencies are introduced (run supply-chain and vulnerability scanning), whether object storage or databases are granted overly broad permissions (follow least privilege), and whether user input is handled with parameterized queries and output escaping.
- Version control: put code in a repository plus a pipeline so every generation produces a diffable commit rather than an overwrite-style one-off artifact.
On Baidu AI Cloud, for example, these capabilities map to general product categories that can be combined directly: object storage for static assets, a container platform for services, logging plus monitoring/alerts for the observability loop, message queues for asynchronous tasks, and a key-management service to isolate sensitive configuration. The value of this path is that the uncertainty of model generation is constrained by the determinism of engineering infrastructure.
7. Why Open Weights Matter: Not Just “Usable” but “Controllable”
Back to the opening question: if model capability approaches the leading tier, what does its open-weight nature mean?
Controllable data boundary. Weights can be deployed locally or in a private environment, so sensitive code and business data stay within your domain—a hard requirement rather than a bonus in finance, government, and healthcare.
Tunable and distillable. Enterprises can inject internal coding conventions, private component-library usage, and historical review rules into the model. A general model doesn’t understand your component wrappers; a fine-tuned one can.
Reproducible evaluation. Public weights and inference configuration mean the same spec can be tested repeatedly across environments, and results can be verified by third parties—something closed APIs rarely offer. For enterprises, reproducible evaluation is the foundation of selection decisions.
Negotiating power and supply-chain safety. Open weights break single-vendor lock-in; enterprises can switch between self-hosting and API calls based on cost and compliance needs.
The costs should also be stated plainly: open source is not free. GPU memory and compute procurement, inference-engine tuning (batching, quantization, KV-cache management), capacity planning, and version upgrades plus regression testing are real, ongoing costs. For small teams, the total cost of ownership of self-hosting is often higher than calling a managed service; the rational move is a quantified comparison rather than an emotional choice.
8. What It Means for AI: Reconstructing the Evaluation Paradigm and Role Division
Paradigm shift. As the capability gap moves from “how much knowledge” to “constraint satisfaction and state completeness,” the evaluation focus inevitably shifts from problem scores to end-to-end task completion—and more importantly to “completion per unit cost”: how usable a result you can reach for a given amount of money and time.
Accelerated capability leveling. Open weights spread high-level capability from a few closed products across the whole ecosystem, pushing both the price and capability curves downward. This is a net win for developers: competition lowers prices, and the ecosystem offers alternatives.
A dual-track landscape, not zero-sum. Closed-source flagships explore the capability ceiling and take on the hardest uncertainty; open weights approach the usability floor and guarantee autonomy and predictable cost. Enterprises will likely use both, routing by task difficulty:
function route(task):if task.constraint_count <= 5 and task.has_no_sensitive_data:return local_open_model(task) # most cost-efficientif task.involves_sensitive_data:return local_open_model(task) # compliance firstreturn hosted_flagship_model(task) + human_review # capability first
Reconstructed engineer role. As the implementation stage is heavily automated, human value moves forward into writing specs, defining contracts, and designing acceptance cases, and backward into reviewing generated artifacts and governing technical debt and security incidents. The methods in Sections 2 and 5 are essentially the working manual for this new role.
9. Adoption Checklist
- Run an end-to-end generation test on a real requirement from your team—not a vocabulary-quiz-style task.
- Structure the requirements document so each requirement maps to one executable acceptance case.
- Quantify the six dimensions with a scorecard, focusing on the failed-items list.
- Build an automatic generate → build → test → feedback loop.
- Do contract-first + sliced generation + constraint self-check, and fix the constraint-consistency shortfall first.
- Before launch, complete the four security audits: secrets, dependencies, permissions, and input validation.
- Route models by data sensitivity and constraint complexity; run self-hosted and managed in parallel.
- Bring every generation under version control and regression baselines so quality doesn’t drift with iteration.
The core judgment: the shortfall of open-weight models in end-to-end app generation is not in syntax or scaffolding but in deep understanding and state completeness. This gap can be narrowed significantly through specification-, contract-, and test-driven engineering, and can be borne long-term through a self-hosted inference pipeline in a way that keeps compliance and cost controllable. For development teams, the best investment right now is neither waiting for a stronger model nor scrambling to migrate the tech stack—it is building up the real spec → generation → acceptance pipeline.
