Skip to content

Initialize native TS from prepared immutable stores - #1528

Draft
ChristianPavilonis wants to merge 2 commits into
review/edgezero-compatibilityfrom
review/native-aws-startup
Draft

ChristianPavilonis wants to merge 2 commits into
review/edgezero-compatibilityfrom
review/native-aws-startup

Conversation

@ChristianPavilonis

@ChristianPavilonis ChristianPavilonis commented Nov 11, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Extract the existing demo's strict native startup, immutable prepared config/secret snapshots and default-off AWS provider forwarding.
  • Preserve checked per-request URL/client metadata, pre-dispatch trace, SDK-owned HTTP, caller limits and fail-before-listen behavior.
  • Retain native streamed-send/SDK-decoding contracts without restoring the retired raw client or batch-driver implementation.

Draft. Required current-head checks have failed. The current-main forwarding/provenance incompatibility below is not waived.

Stack and exact input

Head: ea779fb47c0d20bb53f66ef342ff1367d7ede7f6. Base: review/edgezero-compatibility.

Retain the original demo RC #1424 and its dirty worktrees. No source from excluded #1499 or the independent #1506 implementation is imported or coordinated. Relay/privacy work remains separate. No deployment, live input change, main merge, old-RC retirement or recovery deletion is part of this PR.

Changes

Area Change
Axum startup/app/middleware/platform Load bounded verified inputs before listening and retain snapshot/trace/request ownership.
Core config/secret helpers Collect active references before awaiting providers; retain validation and read-only request snapshots.
Core URL and HTTP facade Preserve the existing prepared native public-URL view and explicit native SDK decoding/stream support.
Native fixtures/tests Real binary startup/routes, two-gateway isolation, POST limits, restart, cancellation and11 real-origin wire regressions.
Guide and preserved original spec Describe current scope and distinguish historical review from current execution.

Closes

Closes #1524.

Spec

Preserved original native contract and two-round review, with an explicit historical-identity/delivery preface. Current startup guide identifies the selected SDK, caller port and current scope. Later combined-source proof is separate.

Test plan

Compatibility stop: selected SDK4563136 removes X-Forwarded-Host/Proto before app.begin_ingress, while current TS main's credential-authenticated ForwarderPreparation needs those assertions afterward. The isolated test-only constructor correction compiles and strict CLI Clippy passes, but real proxy regressions still return403 instead of200 and lose the browser authority/port. No trust policy, SDK hook/order change, raw-header fallback or assertion relaxation was implemented. Execution is paused for the scope choice between compatible-baseline demo cleanup and separately scoped current-main forwarding/provenance compatibility.

Source: SDK native boundary. Native proxy regression output is retained privately with exact tested patches. Parity API compile and earlier Fastly EOF failures remain open. Narrow local fixture/profile work is preserved but unpublished; it is not a full current-head pass.

The inherited HTTP fixture now uses pbs.example.com instead of a TEST-NET IP rejected by the repository domain linter. All27 focused auction-plan tests and strict Core Clippy passed on that test-only correction; no allowlist/suppression, behavior or assertion was relaxed. Other unchanged-input results below remain bounded to their recorded source.

Current source: Core3386 passed/2 existing ignores; native17 lib +4 binary +7 acceptance/1 ignored +11 HTTP +32 routes +6 startup, with1 ignored doctest; provider-runner Node5 passed; strict Core/Axum Clippy and formatting pass. Final Fastly/Cloudflare/Spin compile checks pass on this head. The ignored real Next.js case, independent account-free provider runtime, required broader/Fastly/deadline/EOF gates, image and cloud acceptance are not claimed passed. SDK draft462 separately discloses an unclassified parallel hosting-fixture failure; the focused pass does not waive it.

  • Complete required current-head gates in AGENTS.md before review readiness.
  • Record all failed, ignored or unavailable checks without counting them as passes.

Checklist

  • Scope is the existing demo extraction and minimum caller adaptation.
  • Feature contract/review history is linked where applicable, without backdating approval.
  • Synthetic test/operator examples only; no credentials, state or licensed Geo inputs added.
  • Original work, PR identities and parked experiments remain preserved.
  • Final combined checkpoint and affected-delta review complete.

@aram356
aram356 added this pull request to stack #1542 November 11, 2026 06:48

@prk-Jr prk-Jr left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Summary

Verdict: REQUEST_CHANGES at ea779fb47. Two introduced issues are documented inline: incomplete migration of existing native harnesses and a macOS portability failure in gateway acceptance.

Cross-cutting / body-level findings

🔧 Required verification remains blocked. Current-head CI also has CLI/parity compilation failures and other failed gates. The disclosed credential-forwarding incompatibility remains unresolved. The SDK compatibility problems are inherited from the base; they still prevent readiness. Resolve the compatibility scope and required gate failures before treating the change as ready.

Local validation

With pinned Rust/Node: formatting, five provider-runner tests, 17 library tests, four binary tests, 11 HTTP tests, 32 route tests, and six startup tests passed. Acceptance had six passes, the macOS failure described inline, and one ignored real Next.js case. Docker provider runtime and the full cross-adapter matrix remain unverified locally. No fixes were implemented.

CI status

}
};
if let Err(err) = AxumDevServer::with_config(App::new(router), config).run() {
if let Err(err) = run_production_app_with_initializer::<TrustedServerApp, _>(|app, stores| {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔧 P2 — Migrate existing harnesses with native startup.

This switches to prepared stores, but existing integration launchers still use legacy config/secrets and PORT. crates/trusted-server-integration-tests/tests/environments/axum.rs:9,83 also imports/calls the deleted config_env_var, breaking compilation. The native EOF launcher at tests/html_eof_runtime.rs:275-289 still uses the old inputs; current-head CI's native EOF diagnostic confirms startup exits with CONFIG_DIR: required for declared stores. scripts/smoke-axum.sh uses the same old launch contract.

Migrate these launchers to the prepared config map, EDGEZERO__SECRETS__*, and EDGEZERO__ADAPTER__* inputs, and change invalid-input smoke expectations to process exit before listening. This requires coordinated changes across the launchers, so the correction is prose-only.

Comment on lines +556 to +559
let alpha_client = client(Some(
"127.0.0.2".parse().expect("should parse alpha source"),
));
let beta_client = client(Some("127.0.0.3".parse().expect("should parse beta source")));

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔧 P2 — Make gateway acceptance portable.

These clients bind to 127.0.0.2 and 127.0.0.3. On an Apple Silicon macOS host, cargo test-axum fails at the first direct request with AddrNotAvailable (OS error 49), before reaching the gateway assertions. This was reproduced with the pinned Rust 1.98.1 and Node 24.20.0; six other acceptance tests pass and the real Next.js case is ignored.

Use a portable socket arrangement preserving trusted/untrusted peer coverage, or explicitly isolate platform-specific coverage. The fixture/source-address arrangement needs coordinated changes, so the correction is prose-only.

@ChristianPavilonis ChristianPavilonis linked an issue Nov 12, 2026 that may be closed by this pull request
aram356 added a commit that referenced this pull request Nov 12, 2026


Per the user, every feature is built once and works on every adapter in
platform order, with platform gaps sent to EdgeZero (DEC-16, SH-5). T21
moves the identity routes, EC lifecycle, providers and write-back into one
router in core that each adapter mounts; A2, A10, T8, T9, T17 and T18
shrink to turning it on per adapter and passing the conformance suite, and
T7, T14 and A11 fold into A2 and A10. EZI-2a adds EdgeZero's local store
for Axum development and EZI-4 binds Axum's geo provider from the manifest.

Restack the Axum RC units on #1506: #1531 carries A1 in place of #1528,
#1533 and #1534 close as copies of #1525 and #1526, and the image and
Terraform units sit directly on #1532 so A6 and A7 stop waiting on A2.
Record #1566, refresh the provider stack's fixes at their current heads,
and flag #1535 as unplanned.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Extract prepared-store native startup and AWS providers

2 participants