Skip to content

fix(server): warn when a recorded flow backtracks - #759

Merged
divshekhar merged 4 commits into
reticlehq:mainfrom
kushals256:fix/record-backtrack-warning
Sep 6, 2026
Merged

divshekhar merged 4 commits into
reticlehq:mainfrom
kushals256:fix/record-backtrack-warning

Conversation

@kushals256

Copy link
Copy Markdown
Contributor

Summary

  • A recorded drive that clicks into a product and then "back" to search saved both clicks and dropped the navigation between them. Replay landed on the product page and looked for a search-only control.
  • reticle_record stop and reticle_flow_save now warn when the recorded route list returns to an earlier page (/search → /product/1 → /search). Linear A→B→C stays quiet; consecutive stays on the same page are collapsed so a re-render is not a backtrack.
  • The flow-file format is unchanged. The route list is in-memory only and is not written to disk.

Fixes #603.

Test plan

  • recording-backtrack.test.ts — silent on linear/single-page, warns on return, hash-router pages are distinct, to fallback
  • record-stop-backtrack.test.ts — stop warns on a backtracking window, quiet on linear
  • flow-save-recording.test.ts — save warns, does not persist routes, linear stays quiet
  • existing record-stop-budget / flow-save tests stay green

Made with Cursor

kushals256 and others added 2 commits September 4, 2026 16:17
The recorder stores clicks, not navigations, so a drive that returns to an earlier page cannot replay. Stop and save now name that journey instead of writing a flow that fails on the next click.

Signed-off-by: Kushal S <skushal.mys@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
CI recorded hidden-api-500 and broken-form-validation as NOT MEASURED after Playwright MCP initialize/click timeouts, which shrank coverage and tripped the gate while catch-rate stayed 1.0. Replay-detect already retries that rig noise; Layer A now does too.

Signed-off-by: Kushal S <skushal.mys@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@kushals256

Copy link
Copy Markdown
Contributor Author

Same coverage-floor flake as #750 / #753 / #755 / #757, not this change. This run shrank 48 → 45: hidden-api-500 timed out on MCP initialize for Playwright and DevTools, and broken-form-validation/playwright hung on browser_click. Catch-rate stayed 1.0.

Cherry-picked the one-retry from #750 (the same rule replay-detect already uses for a flaky baseline). A missing tool is still a miss.

@divshekhar
divshekhar merged commit 0d4849e into reticlehq:main Sep 6, 2026
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[agent] recorded flows do not capture navigations, so a flow that backtracks cannot replay

2 participants