Framework RecipesImplementation, failure path, check

Agent repair workflows by failure

Stop stale responses from replacing newer state

Invalidate the older request before the next one starts, and check that identity before writing either a result or an error. Cancellation saves work; the state guard decides which completion may update the screen.

How do I stop an older response from overwriting a newer result?

Choose the implementation for your framework. Each linked guide includes the source, integration prerequisites, failure-path tests, saved requirement and recorded check.

Existing captured source checks; these are individual examples
ImplementationSaved requirementBroken sourceCorrected sourceCapture date
Keep old React search responses from replacing the current queryobsolete-search-does-not-updateRule findingNo rule finding2026-10-14
Cancel and invalidate Vue watcher requests before the next awaitwatcher-registers-cleanupRule findingNo rule finding2026-10-14
Cancel obsolete Angular HttpClient searches with switchMapsearch-switches-obsolete-requestRule findingNo rule finding2026-10-14
Reject stale Flutter search results after a newer query or disposalsearch-generation-currentRule findingNo rule finding2026-10-14

Inspect the requirement before installing it

The Keep old React search responses from replacing the current query example uses this requirement on src/useOrderSearch.js:

- name: obsolete-search-does-not-update
  where: "src/useOrderSearch.js"
  ensure: >-
    The fulfilled search response must check obsolete before setting items, so a response for a previous query cannot replace the current result.

Exact corrected source and broken edit · Recorded Perch output · Download this requirement

Make the agent check the requirement after its edit

Keep your existing perch.yaml. The scoped rule pack installs the saved requirement under .perch/rules/. Review its file selector and use the implementation’s integration prerequisites before adapting it to your application.

Install Perch and configure your agent

npm install -g @lakeday/perch
perch login
# Choose the setup command for your agent:
perch setup claude-code
# Or: perch setup codex
# Or: perch setup cursor

Check the edit and recheck the repair

curl -fL 'https://reporules.fyi/react/stale-request-cleanup/rule-pack.zip' -o requirement.zip
unzip -n requirement.zip
perch check src/useOrderSearch.js --rules obsolete-search-does-not-update --json
# Read the finding, repair the implementation, then repeat:
perch check src/useOrderSearch.js --rules obsolete-search-does-not-update --json

Run the same check on the repaired working file before committing. Keep the application regression tests alongside it. Fresh model judgments can vary; an unchanged request can reuse its cached answer. A passing check does not prove application correctness.

Compare the implementations before choosing a rule

Keep the check tied to its source

The table reports saved checks on the exact linked source versions. Adapt the paths, adapters and regression tests to your repository. The example source may differ from the released framework or your service; the recorded outcome belongs to that example.

Other agent-edit failure paths · All framework recipes