browser-replay
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseBrowser Replay
浏览器重放
Re-drive a recorded session trajectory. Used for regression testing, deterministic re-runs, and as the verification path that plus actually produces something replayable.
browser-recordbrowser-selectorsThis skill is the load-bearing assumption of the v0.2.0 architecture. ADR-0001 Verification §4 requires ≥80% replay success across 10 distinct sites of varying drift profiles before the proposal moves from→Proposed. If you find replay unreliable, capture the failure modes inAcceptedand report them up the ADR.findings.md
重新驱动已录制的会话轨迹。用于回归测试、确定性重跑,以及作为验证路径,确保搭配生成的内容可被重放。
browser-recordbrowser-selectors该技能是v0.2.0架构的核心假设。 ADR-0001验证第4节要求,在10个具有不同漂移特征的站点上实现≥80%的重放成功率,提案才能从(提议)状态转为Proposed(已接受)状态。如果发现重放不可靠,请在Accepted中记录失败模式并上报至ADR。findings.md
When to use
使用场景
- Regression-testing a UI flow after a deploy.
- Reproducing a bug captured in a prior session.
- Comparing two runs of the same flow for .
browser-screenshot-diff - Forking a session () and replaying the parent before mutating.
/ruflo-browser fork
- 部署后对UI流程进行回归测试。
- 复现先前会话中捕获的Bug。
- 对比同一流程的两次运行结果,用于。
browser-screenshot-diff - 分叉会话()并在修改前重放父会话。
/ruflo-browser fork
Steps
操作步骤
- Locate the source session:
bash
npx -y ruvector@0.2.25 rvf status <session-id>.rvf - Load the trajectory:
Each line isbash
Read .../trajectory.ndjson.{ts, action, args, selector, result} - Open a fresh browser via (target URL = original or
mcp__claude-flow__browser_openoverride).--url - For each trajectory step, dispatch the matching MCP tool (,
browser_click,browser_fill, etc.) with the recorded args.browser_eval - On selector miss, do not fail immediately — query the namespace for an embedding-similar selector for the same
browser-selectorsand retry once:<host>:<intent>bashnpx -y @claude-flow/cli@latest memory search --namespace browser-selectors \ --query "<host> <intent>" --limit 5 - Record a new trajectory for the replay run (allocate a fresh RVF container, lineage-tracked via ).
rvf derive - Verdict: tally matched-step / total-step ratio. Default tolerance threshold is 0.85 (configurable via ). Verdict goes into
--tolerance.findings.md
- 定位源会话:
bash
npx -y ruvector@0.2.25 rvf status <session-id>.rvf - 加载轨迹:
每一行格式为bash
Read .../trajectory.ndjson。{ts, action, args, selector, result} - 通过打开新浏览器(目标URL为原始URL或通过
mcp__claude-flow__browser_open覆盖)。--url - 针对每个轨迹步骤,调度匹配的MCP工具(、
browser_click、browser_fill等)并传入录制的参数。browser_eval - 当选择器匹配失败时,不要立即终止——查询命名空间,获取具有相同
browser-selectors的嵌入相似度匹配选择器,并重试一次:<host>:<intent>bashnpx -y @claude-flow/cli@latest memory search --namespace browser-selectors \ --query "<host> <intent>" --limit 5 - 为重放运行录制新轨迹(分配新的RVF容器,通过进行 lineage 追踪)。
rvf derive - 判定结果: 计算匹配步骤数/总步骤数的比率。默认容错阈值为0.85(可通过配置)。判定结果需写入
--tolerance。findings.md
Caveats
注意事项
- Browserbase explicitly does not offer replay (rrweb session replay was deprecated). We're betting on selector-embedding recovery; expect noise on heavily drifted sites.
- Network nondeterminism (timing, content variation) can produce false-fail verdicts. Use to inject expected variation or pin to a fixture.
--mutate - For visual diff, chain into against the parent session id.
browser-screenshot-diff - If selector recovery requires more than one retry per step, log it. That's the signal that the site needs a re-record, not a replay.
- Browserbase明确不提供重放功能(rrweb会话重放已被弃用)。我们寄希望于选择器嵌入恢复技术;在DOM漂移严重的站点上可能会出现异常。
- 网络不确定性(时序、内容变化)可能导致误判。使用注入预期变化或固定到测试夹具。
--mutate - 如需视觉对比,可将结果与父会话ID关联到工具中。
browser-screenshot-diff - 如果每个步骤的选择器恢复需要超过一次重试,请记录该情况。这表明该站点需要重新录制会话,而非进行重放。