Repository navigation
Add explicit adapter delivery compression support - #452
Draft
ChristianPavilonis wants to merge 3 commits into
Draft
ChristianPavilonis wants to merge 3 commits into
ChristianPavilonis wants to merge 3 commits into
Conversation
Expose portable request capability and checked identity-response intent. Share Fastly header finalization between standard conversion and custom streaming senders without changing unmarked output or collecting bodies in the reusable finalizer. Keep negotiation, rewriting, privacy and cache policy application-owned. Cover native contracts and actual Fastly SDK conversion under Viceroy. Record the reviewed design and cross-repository implementation plan. Refs #362
Gate the post-commit abort origin on observed downstream body bytes. Preserve immediate pre-commit fault probes and strict partial-response and correlated-error assertions. Add ordering and pre-header-close regressions.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Changes
edgezero-core/src/delivery_compression.rsedgezero-adapter-fastly/src/delivery_compression.rsDesign and implementation plan.
Two independent design checks and a separate implementation inspection found no blockers. Applications must install identity bytes or their final identity-producing stream before marking. Body-transforming middleware must remove the intent before re-encoding. Reader negotiation/fallback remains application-owned; Fastly uses the matching original client request.
Closes
Closes #362.
Paired consumer: IABTechLab/trusted-server#884, tracked in trusted-server#858. The consumer now pins this PR's exact commit
157f091e42b5c584898a5d0f8a0d3ddc3a4dd5ecin all six declarations and eight locked packages. Both PRs remain draft for joint review. EdgeZero merges first; replace the consumer's temporary revision pin with a merged release before making it merge-ready.Test plan
Passed locally with Rust 1.98.1 and Viceroy 0.21.0:
cargo test --workspace --all-targets --lockedcargo clippy --workspace --all-targets --all-features --locked -- -D warningscargo fmt --all -- --checkcargo check --workspace --all-targets --features "fastly cloudflare spin" --lockedcargo check -p edgezero-adapter-spin --target wasm32-wasip2 --features spin --lockedThe new core, helper, request-conversion and SDK-converter regressions were observed failing before their implementation and passing on the final source. No manifest, lockfile, new dependency, or unrelated fixture changes were needed. All GitHub checks on the original
63c7b63implementation passed, including demo/generated-project smoke checks. The test-only review follow-up triggers fresh CI.Checklist
Paired consumer integration
Trusted Server #884 is now a feature-only rebase onto main
51730bd, published as85a9b9184a67a9c827be9b59ead95a801fb07faf. It removes its duplicate mechanism and keeps a pending output plan until identity output is installed. Its custom Fastly sender calls this shared finalizer after late effects and privacy enforcement, without collecting lazy bodies.Before this review follow-up, consumer
db27e738with framework63c7b63passed all 32 local Rust/repository gates, 1,838 JS tests, docs checks, actual deadline fixtures and actual Axum/release-Fastly EOF controls. Independent source review found no blockers. Its required Fastly aliases and runtime controls passed under default Viceroy 0.21.0 with no runner override or SDK stub. Review reruns also found current local SDK contract and both consumer Fastly alias builds link-blocked onpending_req_header_insert. Same-tree hosted CI passed those paths. The discrepancy is unresolved, not a proven main or production failure.R1 review follow-up
Resolved local review R1 in framework
1c0f475097a813a3a9cbb7a4a121ca0523d5ed64: Vary test rows now contain literal expected header fields instead of copying the production matching predicate. No shipping SDK logic changed. Consumer5298c0a20b664394d6ec218862296ca1ba9463b8refreshes six declarations and eight lock sources to that exact commit, with no registry or SDK version drift.Fresh checks passed: 13 framework native helper/core tests, SDK formatting and scoped strict Clippy; six consumer delivery tests, ten build-digest tests, consumer formatting and changed Markdown formatting. Earlier broad verification belongs to the original revisions noted above. New commits trigger fresh hosted CI.
This is not a Viceroy runtime fix. Current local loader divergence remains unresolved; no SDK stub, runtime-source/pin workaround or trap override was introduced. Real Fastly staging remains open.
CI smoke fixture fix
Framework
157f091e42b5c584898a5d0f8a0d3ddc3a4dd5ecfixes the failed reusable HTTP smoke probe. Delivery contracts had passed 12/12 and Fastly library tests 103/103; uncontrolled origin EOF could race downstream receipt.The post-commit origin now waits for the existing client first-body-byte signal before closing short. Plain immediate aborts still serve pre-commit fault tests. Status 200, exact
partial, interrupted-response type and matching guest error remain mandatory. No sleeps, retries, SDK stubs, trap overrides or runtime changes were added. Cleanup releases waiters after failed probes.A regression failed before the fix. Final checks pass 2 core + 27 harness tests, formatting, strict Clippy and the full pinned-Viceroy Fastly smoke. All three custom variants observed the required bytes and correlated error. Two independent source investigations/reviews found no blocking issue.
Consumer
85a9b9184a67a9c827be9b59ead95a801fb07fafrefreshes all six declarations/eight lock sources. Six delivery tests, ten build-digest tests and formatting pass, with no registry/SDK drift. GitHub's test workflow now passes at157f091e, including the previously failing Fastly job. Retained CI artifacts confirm 200/partialand matching guest errors for all three custom variants. Both PRs remain draft; consumer CI runs separately.This does not resolve the separate local debug/WASM loader discrepancy or prove live Fastly negotiation/performance.
Remaining validation
No live deployment or performance measurement ran. Viceroy establishes guest bytes/headers and SDK behavior, not real Fastly dynamic compression, final wire negotiation, service-chain behavior, progressive wire delivery, or transfer/vCPU savings. Those remain explicit staging work with the consumer issue.