Skip to content

[Request]: let urlcode test fixtures carry a cookie session between steps #811

Closed

Description

@jimhoyd

Problem or use case

This came up while building the headless-auth-profile recipe for #810. The recipe itself landed; this issue is about testing it with urlcode test fixtures.

A cookie-session lifecycle cannot be written as tests/requests.json:

  • A steps fixture's capture takes one single-valued response header, and docs/READINESS.md explicitly says "so not set-cookie".
  • No cookie jar carries cookies between steps.

So a flow of CSRF, then register or login, then a protected call, then logout has to live in a package test. urlcode audit can also never report such a project ready, because every auth: true route answers 401 without a session.

This is the owner-scoped store route behind auth, which is the normal way to hold per-user application data.

Proposed behavior and alternatives

Choose one:

  • (a) A per-fixture cookie jar: steps within one fixture keep and send the cookies set by earlier steps, with domain and path scoped to the test origin.
  • (b) Explicit capture of a named Set-Cookie value into a variable that later steps send.

In either case, captured cookie values must never be written into test output or audit reports.

Evidence

recipes/headless-auth-profile lists only extensions, validate and test in its commands, not audit. Its signed-in flow is covered in packages/auth/test/headless-auth-profile-recipe.test.ts instead. Not independently reproduced beyond that recipe.


Generated by Claude Code

Activity

  1. added
    enhancement
    ai-first
    on Sep 27, 2026
  2. jimhoyd commented on Sep 27, 2026

    @jimhoyd
    CollaboratorAuthor

    Decision (owner, 2026-09-27): option (a), a per-fixture cookie jar. Stored cookie values are redacted from all output. The headless-auth-profile recipe will cover its signed-in lifecycle as fixtures.


    Generated by Claude Code

  3. added
    in-progress
    on Sep 27, 2026
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

    ai-firstenhancementin-progress

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions