Skip to content

Providers in the shared app, awaited before finalization #1591

Description

@aram356

Summary

Providers in the shared app, awaited before finalization; only follow-up writes after the response; verified on Fastly with ID5.

Part of #1558, server-side identity on every adapter. Plan ID T11, planned in wave 6 (MVP: Fastly and Axum); priority P1, size M. Design: spec; order and dependencies: plan.

Requirements

ID-4 Providers on every supported adapter

Lookups start at navigation alongside the origin fetch, share one deadline, and are awaited before finalization, so their IDs reach the record and the cookies of the same document response. A page load writes the record once.

ID-5 After-response work

Only pull sync and guarded follow-up writes run after the response is sent: after send on Fastly, a task drained on SIGTERM on Axum, waitUntil on Cloudflare. On Spin the work runs before the response (DEC-14; DEC-16 rules out skipping it).

WB-1 Document and EC route responses only

Identity cookies are set on top-level HTML document responses and on EC route responses (ID-9), on every supported adapter.

Current state

What the code does today, from the design's survey at the revisions it names:

  • WB-1: main mints ts-ec on Fastly navigations, and the RC adds Axum.

Acceptance criteria

  • ID-4: A mock provider that answers within the deadline has its ID in the record and in the mirror cookie of that navigation's response
  • ID-4: One that misses the deadline is skipped and does not delay the response past it
  • ID-5: On Fastly, Axum and Cloudflare a follow-up write recorded after send is in the record before the next navigation, and on Axum SIGTERM waits for it (A3). On Spin the follow-up write lands before the response
  • WB-1: Identity Set-Cookie headers appear on navigation and EC route responses and never on asset or other API responses

Dependencies

Blocked by:

Blocks:

Related pull requests

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