Record against Req 0.7, where the Finch adapter is a module - #7
Open
johns10 wants to merge 3 commits into
Open
Conversation
The record path built its passthrough with `adapter: &Req.Steps.run_finch/1`. Req 0.7 moved that to the `Req.Finch` adapter module, so the capture raises UndefinedFunctionError the moment a cassette is written. Replay never touches this path, so an application on Req 0.7 keeps replaying its existing cassettes and looks healthy. The breakage only surfaces when someone records a new one — which is where it is least welcome. Resolved at runtime so one build works across the rename, and the version range widened to admit 0.7. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01M6g6U83HzmVZmeCiyD1Ay4
Naming Steps.run_finch/1 in the fallback branch warns on every build against Req 0.7, which is the configuration the fallback exists to avoid. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01M6g6U83HzmVZmeCiyD1Ay4
Sequential replay is strictly positional: interaction N answers request N. But record mode answers a repeat from the file instead of performing it, so a request made three times is stored once — and the replay that follows runs out on the second, reporting no matching interaction for a request the cassette visibly contains. The diagnostic says as much: method matched, URI matched, body matched, nothing left. That combination is easy to reach and hard to read. Anything that polls until a resource is ready records one poll; a page that re-reads a listing in reaction to an event records one read. The recording looks complete and the replay is short by however many repeats happened. Under sequential the only coherent recording is one interaction per request actually made, so record every one. Non-sequential cassettes keep collapsing repeats, which is what you want there. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01M6g6U83HzmVZmeCiyD1Ay4
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
forward_and_capture/3builds its passthrough withadapter: &Req.Steps.run_finch/1. Req 0.7 replaced that function with theReq.Finchadapter module, so on 0.7 the capture raisesUndefinedFunctionErroras soon as a cassette is recorded.The failure mode is unusually quiet: replay never reaches this path, so an application that upgrades to Req 0.7 keeps replaying its existing cassettes and looks completely healthy. Nothing surfaces until someone records a new one — in our case months later, and the error (
function Req.Steps.run_finch/1 is undefined or private) points at Req rather than at the version constraint that allowed the combination.~> 0.5.15 or ~> 0.6 or ~> 0.7Happy to add a 0.7 row to the CI compatibility matrix if you'd like it in the same PR — the comment at that call site asks for exactly that, and I did not want to guess at your matrix layout.
🤖 Generated with Claude Code
https://claude.ai/code/session_01M6g6U83HzmVZmeCiyD1Ay4