Skip to content

Add explicit Fastly delivery-compression support #362

Description

@jevansnyc

Description

Add reusable delivery-compression intent/capabilities and Fastly finalization so an application can explicitly hand off identity bytes for final client compression. Priority remains P3. The paired framework PR #452 and trusted-server#884 drafts contain the extraction, but neither branch-level implementation nor local guest output establishes mainline delivery or live Fastly negotiation.

Steps to reproduce

Inspection steps (no deployment, compression measurement or fresh tests executed):

  1. Inspect main Fastly response conversion; main has no delivery-compression intent/finalizer integration.
  2. Compare the open framework draft with the consumer draft.
  3. Read their exact-revision evidence and limitations, including the reported local debug/WASM loader discrepancy and still-unverified real Fastly negotiation.

Expected behavior

An explicit, checked identity-body intent and unavailable-by-default adapter capability let callers choose offload before omitting their encoder. Fastly applies final headers to buffered and custom streaming sends without collecting lazy bodies; unmarked and unsupported paths retain existing behavior.

Impact

Applications currently duplicate generic delivery intent/capability/header logic, and standard conversion alone misses consumers that send through a custom lazy streaming path.

Proposed fix

Complete and merge the core intent/capability API and Fastly finalizer in PR #452, then move Trusted Server to a merged release and remove its duplicate generic glue. Finalization must follow late header/privacy effects, set X-Compress-Hint: on, maintain repeated/wildcard Vary: Accept-Encoding correctly and prevent stale encoding/length framing.

Applications must provide identity bytes; removing Content-Encoding from compressed bytes is invalid. Preserve gzip/Brotli limitations and explicit unsupported-adapter fallback. Keep negotiation policy, SSAT eligibility, codecs, auctions, HTML/template behavior and privacy application-owned; do not change origin negotiation or add a publisher flag.

The drafts record framework 157f091e42b5c584898a5d0f8a0d3ddc3a4dd5ec and consumer 85a9b9184a67a9c827be9b59ead95a801fb07faf. Their test/CI records are historical branch evidence; refresh required checks before merge. The smoke-fixture EOF handshake fix does not establish live negotiation or performance.

Done when

  • Merge and document portable intent/capability APIs with checked identity-body and explicit unsupported-adapter contracts.
  • Apply the Fastly contract at final send in buffered and custom streaming paths, after late mutations, without whole-body collection.
  • Cover marked/unmarked responses, unsupported adapters, framing/body agreement and repeated/wildcard Vary.
  • Retain current behavior for unmarked and already-encoded responses.
  • Integrate a merged EdgeZero release into Trusted Server, remove duplicate generic glue and preserve its negotiation/fallback, SSAT, templates and privacy tests.
  • Verify real Fastly negotiation separately from local/Viceroy guest output.
  • Resolve or document the reported local loader discrepancy and retain exact-revision evidence; do not claim wire-size/vCPU gains without fresh platform measurements.

Related

PR #452 is the fully covering open framework PR; trusted-server#858, trusted-server#884 and original trusted-server#853.

Activity

  1. changed the title [-]Utilize client compression hints for client delivery[/-] [+]Add reusable Fastly delivery-compression support[/+] on Nov 2, 2026
  2. changed the title [-]Add reusable Fastly delivery-compression support[/-] [+]Add explicit Fastly delivery-compression support[/+] on Nov 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions