Repository navigation
Conversation
Comment on lines
+44
to
+45
| "import signal, time; signal.signal(signal.SIGTERM, signal.SIG_IGN); " | ||
| "print('example-ready', flush=True); time.sleep(300)"], |
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
The new capability belongs to Trusted Server's HTML lifecycle and runtime service container; no EdgeZero revision change is needed. This implements #1241 through an explicit HTML finalizer registration rather than adding an asynchronous method to every generic
StreamProcessor. All synchronous processors reach EOF before the ordered terminal chain; this deliberately differs from interleaving asynchronous finishes between generic processors.Enabled finalizers bypass shared-template reads, reservations, and stores and return eligible synthesized HTML with
private, no-store. Raw-origin readthrough caching remains independent. This conservative first version removes transformed-template and downstream HTML caching even for page-level signing. A cacheable mode needs reader-neutral output, external-data/key identity, expiry, invalidation, failure-caching, and hit-execution rules; a user-independent flag alone is insufficient. The default chain budget is 5000 ms, configurable from 1–60000 ms. Fastly has no cooperative timer; consumers must bound their blocking host calls.Review fixes
Content-Range. Preserve encoded bytes, framing, validators, and ordinary origin policy before synthesized/inactive-ad/tag-suppression policy runs. Independent cookie and diagnostics privacy remains intact.web_time::Instant. The fresh release combined control now passes; broader Cloudflare Worker panics when a server-side auction runs (std::time::Instant::now()on wasm32-unknown-unknown) #1240 clock work remains separate.API shape and cacheable-finalization policy remain explicit maintainer design decisions. This PR stays a draft.
Changes
crates/trusted-server-core/src/integrations/html_finalization.rscrates/trusted-server-core/src/integrations/mod.rscrates/trusted-server-core/src/integrations/registry.rscrates/trusted-server-core/src/html_processor.rscrates/trusted-server-core/src/platform/timer.rscrates/trusted-server-core/src/platform/mod.rscrates/trusted-server-core/src/platform/types.rscrates/trusted-server-core/src/settings.rscrates/trusted-server-core/src/publisher/html_finalization.rscrates/trusted-server-core/src/publisher.rscrates/trusted-server-core/src/config.rstest-utils.crates/trusted-server-core/src/test_support.rscrates/trusted-server-core/src/test_support/async_html_finalization.rscrates/trusted-server-adapter-axum/src/app.rscrates/trusted-server-adapter-axum/src/platform.rscrates/trusted-server-adapter-cloudflare/Cargo.tomltest-utilsforwarding.crates/trusted-server-adapter-cloudflare/src/app.rscrates/trusted-server-adapter-cloudflare/src/platform.rscrates/trusted-server-adapter-cloudflare/src/lib.rscrates/trusted-server-adapter-fastly/src/app.rscrates/trusted-server-adapter-spin/Cargo.tomltest-utilsforwarding.crates/trusted-server-adapter-spin/src/app.rscrates/trusted-server-adapter-spin/src/platform.rscrates/trusted-server-adapter-spin/src/lib.rscrates/trusted-server-integration-tests/tests/parity.rsscripts/async-html-finalization-local-test.shscripts/fixtures/async-html-finalization-origin.pyscripts/fixtures/async-html-finalization-runtime.pytrusted-server.example.tomldocs/guide/configuration.mddocs/guide/integration-guide.mddocs/superpowers/specs/2026-10-12-1241-async-html-finalization-design.mddocs/superpowers/plans/2026-10-12-1241-async-html-finalization.mddocs/superpowers/reviews/2026-10-12-1241-async-html-finalization-implementation.mdcrates/trusted-server-core/src/auction/telemetry.rs.github/workflows/test.ymlscripts/fixtures/test_async_html_finalization_runtime.pydocs/superpowers/plans/2026-10-12-1241-review-hardening.mdCloses
Closes #1241
Related: #1226 makes the same
web_time::Instantimport change in auction telemetry as part of broader clock work. This PR includes only the targeted auction-telemetry correction for #1240; its other clock paths remain separate. KV adapter wiring under #1139 and a real signing integration are outside this change.Test plan
Checks below were run locally on the implementation branch. Hosted CI results remain separate.
cargo fmt --all -- --checkandgit diff --check.cargo test-fastly && cargo test-fastly-reuse && cargo test-axum && cargo test-cloudflare && cargo test-spin.cd crates/trusted-server-js/lib && npm run format.Sendyielding, ordering, shared deadline, timer ties, cancellation, poisoned/invalid candidates, unchanged-byte allocation identity, collection overflow, and fatal codec/sink regressions.std::time::Instant::now()on wasm32-unknown-unknown) #1240 paths are not declared fixed.--auctionis now wired into CI; its exact command passed locally.fastly compute serve: local Fastly verification used Viceroy directly.Independent architecture and final reviews found no remaining blocking findings in this implementation. The re-review found no remaining blocking issues. Spin/Fastly actual release controls preceded the final range-policy-only correction; final native/WASI tests and fresh ordinary artifacts verify that correction. Workers and Axum actual controls were rerun afterward. Hosted CI results for the new commits remain separate from local results.
See the review hardening and latest verification and the implementation and verification record for evidence boundaries, runtime timings, and spec/plan alignment.
Checklist
AGENTS.mdconventions.unwrap()in production code.logmacros for production diagnostics.