Skip to content

[P2] Honor cookie deletion between Gym lifecycle requests #107

Closed

Description

@nabinchha

Follow-up from the review of merged PR #87 (reviewed head f6de62582f5172f4b05f987613c33be0b73eef19).

In GymColumnGenerator._post, the separate cookie dictionary only adds or replaces cookies from response.cookies.jar. Cookies deleted through Set-Cookie: ...; Max-Age=0 are absent from that response jar, leaving their previous values in the dictionary. Before the next lifecycle request, the code clears HTTPX's updated cookie jar and restores those stale values. A service's expired or invalidated session cookie is therefore sent again to subsequent execution or cleanup endpoints.

Affected code: columns.py, lines 353–361.

Reproduced through GymResourceColumnGenerator.generate() using an HTTPX MockTransport:

  1. Initialization returns Set-Cookie: session=abc; Path=/.
  2. Execution receives session=abc and returns Set-Cookie: session=; Max-Age=0; Path=/.
  3. Cleanup still receives Cookie: session=abc; the call reports completed.

Expected: cleanup and subsequent lifecycle requests omit the deleted cookie. Please reconcile cookie deletions while retaining the documented forwarding between trusted configured services. Add regression coverage for deletion on execution and on an intermediate initialization step, plus ordinary cookie updates and row isolation.

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