Skip to content

Cache: keep a location on the app's own origin as its path (appLocation) #701

Open

Description

@kblok

Upstream cache/route.ts keeps a location on the app's own origin as its path (appLocation(location, appOrigin)), so a recording made against one deployment replays against another. The port's CacheRoute.Identity keeps the full authority, so a recorded location carries the origin it was recorded on.

This matters now that #645 (PR #699) lets app.url use port 0: each run serves the app on a new port, so a trace recorded on http://127.0.0.1:53211/ never matches a live http://127.0.0.1:49872/, and replays miss on every run. The same holds for preview URLs that change per deploy.

Port appLocation and apply it where the port records and compares routes (Agent/StepCache.cs, Cache/Decide.cs), with the app origin of the session. Upstream tests: tests/unit/cache-route.test.ts (or the file that covers appLocation).


Generated by Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions