Skip to content

[Bug] Conditional catalog 304 can replay and renew a different cached representation #6144

Closed

Description

@Afloat16

Reproduction

At e1e33a9, seed the Codex model-catalog cache with body A and ETag "old". Send a request with If-None-Match: "new" and have upstream return 304 because the client has current catalog B. The wrapper instead returns 200 with body A and renews A's freshness. It also trusts conditional 304 responses when the cached catalog supplied no validators.

Expected behavior

Renew/replay only the representation identified by the conditional response. A 304 for another client representation must remain a 304 and must not restore stale model capabilities.

Verified patch

Persist ETag and Last-Modified; compare weak ETags, use response tags to disambiguate, and respect If-None-Match precedence. Five new regressions fail on unchanged source. All 17 catalog tests, typecheck and build pass. #4864 fixed unconditional 304; this mismatch occurs on a legitimate conditional request.

Activity

  1. ranxianglei commented on Nov 12, 2026

    @ranxianglei
    Owner

    Fixed in batch PR #6439 (merged).

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions