告别有bug的网页应用
An end to buggy web apps

原始链接: https://replay.io/blog/an-end-to-buggy-web-apps

Replay 的使命是实现可靠、自动地检测和修复所有 Web 缺陷。这需要编码代理、用于查看和根因分析缺陷的可观测性,以及将它们连接起来的运行框架。Replay 的核心技术是一个面向 Chromium 和 Node.js 的时间旅行调试器,它记录非确定性输入并支持确定性重放,将执行过程拆解为可查询的语句、状态和依赖数据库——为代理提供“完美可观测性”,使其无需猜测。 基于此调试器,Replay QA 是一个可直接接入的工具,用于探索和测试应用、从部分数据复现用户会话,并发现多种缺陷(功能损坏、故障、性能、安全)。对于每个缺陷,它会结合录制中的支持证据识别根因。其自有后端也被录制,因此检测到的失败会被调试、修复,并由软件工厂转化为持久测试用例。 在一个对主要应用构建商推广的 40 个应用进行的实验中,Replay QA 发现了 900+ 个缺陷。与仅提供复现步骤(迫使代理猜测根因)的工具不同,Replay QA 提供由证据支持的确切原因——例如缺失的 onClick 处理器或多因素布局偏移——使代理能够直接修复缺陷。Replay QA 已正式可用,可免费试用,并提供集成、定时运行和 API。

Hacker News 的一个帖子链接到 replay.io 的“An end to buggy web apps.” 评论者认为减少 bug 需要小心、在编码前理解改动、删除代码以及简化功能。其他人说软件,尤其是 Web 应用,变得更 buggy 了。OP 认为 AI 可以生成 buggy 的 Web 应用,但也能帮助修复它们,而另一位评论者说 AI 代码通常冗长且更难维护。有人开玩笑说“vibe coder”听起来比“bug breeder”更好。最后一条评论预测,用户会越来越多地把任务委托给能导航甚至糟糕 UI 的代理,从而使 UX 对人类没那么重要。
相关文章

原文

It is possible now to reliably and automatically detect and fix every bug which users are encountering on the web.  This clearly hasn’t happened yet.  Our mission at Replay is to bring it about.

A few ingredients are needed:

  1. A modern coding agent
  2. Observability to see every bug
  3. Observability to root cause each bug
  4. A harness wiring these together

The right observability is key to this process, as it is generally to the AI powered SDLC.

Agents need context to thrive, and observability is the context layer for agents to know how the app they are building actually behaves.  When they don’t actually know what is going on, they start guessing, make mistakes, and things go downhill quickly.  When they do know, they can confirm theories about the app’s behavior and stay on track.

Better observability drives better results.

Perfect Observability

Replay’s core technology is a time travel debugger for Chromium and Node.js.  Forked versions of these runtimes capture non-deterministic inputs to the runtimes with low overhead, allowing the runtime to be replayed deterministically.  Everything it did while recording can be recovered and unpacked into what is essentially a database, allowing agents to see every statement that was executed, the state at every point, every control and data dependency, and so on, with no loss of detail.

A time travel debugger provides perfect observability: every question about how the app behaved can be answered.  With one in hand, agents never need to guess.  They can figure out exactly what happened, work their way back to the actual root cause of a problem, and develop the right fix.

Replay QA

We launched Replay QA a few months ago as a drop in tool for finding and explaining every bug in an app, building on our debugger.  QA explores and tests apps on its own or with guidance, and with new self healing capabilities can create recordings by reproducing user sessions from partial and redacted data.  It processes the recordings it creates to spot a wide variety of bugs (from broken features to glitches, performance issues, security holes and so on) and for every bug identifies the root cause and supports its analysis with evidence drawn from the recording.

QA can also fix itself.  Its entire backend is recorded, and when problems are detected (failures to spot a bug or root cause it accurately) those problems are debugged, fixed, and converted to a durable test case by a software factory.

As an experiment we ran QA on 40 apps that have won contests or otherwise been promoted by major app building tools (Lovable, Replit, Base44, Bolt.new, etc).  We had Astra confirm and deduplicate findings and ended up with over 900 bugs, with the distribution below.

Example: dead button

For comparison we ran other QA tools on some of these apps.  Below is a bug report from QA Wolf on one of the apps, CallVance.  A download button doesn’t work.  QA Wolf identifies and generates STR for the bug, but does not explain at all what is causing it.

An agent addressing this bug report has to read the code and guess what the root cause is.  If it guesses wrong it will have to go through several repair cycles and might end up stuck and unable to fix the problem.

These problems are not specific to CallVance or QA Wolf.  The products of app building tools are loaded with bugs, and QA’ing them without using a time travel debugger can only give limited information about the causes.  Surface level observations from watching screen recordings or looking at network and console logs can sometimes suggest a cause, but can’t identify it definitively, and the agent is always left guessing.

Below is a report from Replay QA for the same dead button.

Replay QA identifies the exact problem: a missing onClick handler on the React component.  QA identified the rendering function associated with the button, and produced evidence showing that function and the missing handler.  An agent reviewing this report can cross check the root cause against the evidence, and fix the bug itself without guessing.

Example: layout shift

The technique above applies just as well to more complex bugs, including ones that are difficult to spot without recording based analysis.  Below is a layout shift in the same CallVance app.  While the app loads, a skeleton changes size and other controls on the page shift around on their own, impacting usability.

Below is the root cause from the report.

This report is more extensive and describes the root cause of the layout shift in reference to all the contributing factors, including the different React commits, the network requests made in between, and variable values in the component render functions.  This detailed report provides an agent exactly what it needs to fix the layout shift properly.

What’s Next

Replay QA is generally available and free to try today.  It’s easy to set up integrations including self healing user session analysis, github and agent connections, and scheduled runs to keep a close watch on your app according to your needs.  We are continually improving QA and are working on incorporating backend recording generation and analysis more deeply for full stack time travel debugging.

QA is also available to use via API to generate recordings and analyze them for bugs.  Contact us if you’re interested in integrating its capabilities directly into a product you’re building.

联系我们 contact @ memedata.com