Skip to content

Extract explicit EC storage selection and celld - #1537

Open
ChristianPavilonis wants to merge 56 commits into
baseline/sourcepoint-20261110from
baseline/ec-storage-20261110
Open

ChristianPavilonis wants to merge 56 commits into
baseline/sourcepoint-20261110from
baseline/ec-storage-20261110

Conversation

@ChristianPavilonis

@ChristianPavilonis ChristianPavilonis commented Nov 11, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Original typed EC provider selection, read/write/expiry/generation bridge and celld integration.
  • Reorganize the existing working demo using EdgeZero83d7a629, not current-main forwarding compatibility.

Draft baseline review unit. Not a current-main merge candidate, deployment approval or completed current-head CI claim.

Baseline and sequence

Head: f14eefa672e83517dc57ff0c0d87383447e07807. Base: baseline/sourcepoint-20261110.

Historical main anchor: 2dd968aeebeb2cc0d5110115f64e0ad58e2e1d13. Original demo: TS2423a2ed plus separately preserved dirty inputs. Matching EdgeZero: draft431, exact revision 83d7a6296d285e135c4ea70021b19e6c8dca7e9f.

The user selected compatible-baseline cleanup. Current-main integration with EdgeZero462 and the authenticated-forwarder incompatibility are deferred. Preserve current-main PR1525/1526 ready and1527/1528 draft, with their existing bases. No excluded1499 or independent1506 implementation, relay/privacy experiment, new transport fallback, group/codec/phase design or operational deployment is included.

Changes

Area Change
This unit Original typed EC provider selection, read/write/expiry/generation bridge and celld integration.
Unchanged work Original checkouts, dirty Prebid inputs, recovery references and existing PRs remain preserved.

Closes

Refs #1530. This unit completes one part of the baseline extraction and does not close the overall tracker on its own.

Spec

Not a new feature. This is extraction of existing demo behavior and bounded build/caller corrections. Original native and EC storage design/review records remain in the baseline where applicable; they are not presented as approval of later combined source. No new forwarding, consent, timer or provider policy is designed here.

Test plan

Core3016 plus5 storage configuration cases and native all-feature suites pass. Three explicitly selected real local celld cases pass for lifecycle, prepared startup and native HTTP issuance/withdrawal/restart/outage. Local fixture proof is not replicated/fleet durability.

  • Required current-head hosted checks complete before ready-state transition.
  • Final baseline combined-check results recorded with exact input revisions and limitations.
  • Focused failures and corrections retained rather than assertions relaxed.

The b67ffc6 baseline checkpoint has passing documented local gates: Fastly/default/reuse/native/Cloudflare/Spin suites, all adapter strict lint lanes, 17 cross-adapter parity cases, 1252 JS cases, CLI suites, formatting, clock/digest/proposal checks and changed-lines domain lint. Passing checks at121ebcc36 are reused only for unchanged relevant inputs; the final follow-up covers the CLI test-import and documentation-only corrections. These results are not a substitute for this PR's current-head hosted checks.

Checklist

  • Existing behavior extracted into a scoped review unit.
  • Public examples use fictional inputs and no licensed Geo data.
  • No deployment, main merge, old-RC closure or recovery deletion.
  • No new worker launched or paused experiment resumed.
  • Review readiness confirmed independently from later units.

Operational Terraform remains in trusted-server-deployer. Local checks and prototype tests do not qualify cloud access, fleet durability or a live publisher.

Hosted docs-build correction

The first hosted format-docs job caught an additional site-build gate that the original local formatter checkpoint had not run: a relative link from the native EC guide to a Terraform example outside the site. Native EC correction8b11dbad3 replaces it with the plain repository path; no dead-link check is disabled. That docs-only correction is carried through the existing upper PR identities. Native EC and final integration8985b111 both pass docs ESLint and VitePress build; the final docs formatter also passes. Runtime, dependency, image-build-context and test inputs are unchanged from b67ffc6, so their prior exact-input proofs are reused. Hosted current-head checks still control readiness.

Startup negative-probe correction

A hosted native EC case failed the no-listener probe while its child logged the expected startup validation failure. The old log has no socket endpoints, so the failure's exact subtype is not claimed confirmed. A separate controlled Linux reproduction demonstrates a successful TCP self-connection with no listening server. Native correction8490c691d distinguishes equal local/peer endpoints from a real listener; actual socket controls prove the self-connection is excluded and a real listener is still detected. Nonzero exit, expected diagnostic, secret-redaction and the original startup deadline remain required. This changes only the acceptance fixture, not production admission, transport or trust.

The earliest native unit and final9356c557 default/all-feature acceptance checks and strict lint pass, including both controls and the original failure case. Ignores remain explicit; earlier separately executed celld proof is not relabeled as a new ignored-case run. Correction is merged upward through existing PR identities without force-pushing or retargeting. Current-head hosted checks must pass; the old failure is retained rather than rerun-only waived. Runtime/API/dependency inputs remain unchanged. A fresh exact9356 producer build and real runtime smoke now pass: image sha256:65a735d38e9dbc0573d0f6068a8b261bd202c43aea05085c2b2d6bccc91ebdbd, linux/amd64 UID/GID10001, including startup rejection and in-flight SIGTERM drain. Prior b67 image receipts remain separate; no image was pushed. All local parent runners are complete.

Browser CI host compatibility

Preserved older browser failures show Playwright1.58.2 rejecting ubuntu-latest's new Ubuntu26.04 image before browser installation; later missing-executable failures are consequences, not passing browser tests. Nativeb1216763a pins only the browser job to ubuntu-24.04, leaving dependency versions, tests and assertions unchanged. Direct Actionlint1.7.12 passes at the owning native and final integration points; the first shim-only attempt could not run because no global version was configured, and is not counted as lint proof. No global tooling was changed. The only9356 ->ee7 delta is this workflow host/comment; runtime, Cargo, docs, tests and Docker-context inputs are unchanged. Actual browser execution on the supported hosted runner remains pending and must pass before readiness. No waiver or browser skip.

Reconciliation refresh above the new PR 1506 head

Merge-forward head 99016b97f6631cfaa972506b9249a0b5f90fc18d retains original public 4a838272c6f8125b1c19bc04cfe2dc57605bcf91, previous local candidate 804fffbccb7294a4709d6eaa88afaaa407bcc5d7 and updated parent 2cc297bee412ba0ab21cf68f45b9ce4efef79507. The original feature patch is unchanged. Aram's #1516 code/tests/spec are preserved upstream rather than duplicated as another owned production port. The existing PR identity, feature boundary and readiness remain intact.

Fresh shared-root and combined RC qualification passes on the refreshed source. Reused JS/Chrome/storage/wrapper/Terraform evidence is explicitly fingerprinted, not claimed as a new execution. Source-image proof is bound to refreshed #1539, not a new RC release. Fresh hosted/macOS, digest-backed wrapper/RC images, other external browser/framework lanes and live AWS/publisher/CMP acceptance remain unverified. Ignored/unexecuted cases and original failed receipts are not counted as passes. Historical claims above remain bound to their named old inputs. No tag, registry publication or deployment is included.

Published snapshot; newer upstream integration pending

Published deliberately for review from the qualified #1506 checkpoint 57d7c6ad8db43601ef31c1e1d1615e6dd2aa6a6a. At publication the moving author branch was at 628474ec4a8cee8361a6927ae6b79b68fdd33a55. Newer upstream bounded-response handling, per-profile RTB caps and Sourcepoint changes are not incorporated or qualified in this snapshot. Further merge-forward reconciliation and conflict resolution may be needed before merge. Local results above describe this exact qualified source, not a merge with the newer base or a release.

@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

The typed [ec.storage] model, the Fastly legacy compatibility and the Cloudflare/Spin rejection paths look sound. Two things should be addressed before this unit is ready: the shared example config now fails at startup on every adapter except Fastly, and the new cargo test (axum native) job fails at this head.

Blocking

🔧 wrench

  • The example config fails at startup off Fastly. See the inline comment on trusted-server.example.toml.

  • CI: cargo test (axum native) fails at f14eefa (not a required check on this base). active_legacy_ec_environment_cannot_disable_or_override_published_storage panics at crates/trusted-server-adapter-axum/tests/startup.rs:165 with "should not listen while required startup inputs are invalid". The same test passed on the earlier cdad6df31 run, so this looks like a flake rather than a production defect. The likely cause is the Linux self-connection already fixed in native_acceptance.rs (connected_to_listener, merged in 83f58c5e3). ServerFixture::assert_failed_before_listen in startup.rs uses the same reserve-release-reconnect probe without that guard, and this PR adds three new callers. The CI log has no socket endpoints, so the cause is inferred rather than confirmed. Suggested change (outside the diff, so not a one-click suggestion; not compiled):

    if let Ok(stream) = TcpStream::connect_timeout(&self.addr, Duration::from_millis(20)) {
        // Linux can self-connect when an ephemeral source port equals
        // the target; only distinct endpoints prove a real listener.
        assert_eq!(
            stream.local_addr().expect("should read probe source"),
            stream.peer_addr().expect("should read probe peer"),
            "should not listen while required startup inputs are invalid"
        );
    }

Non-blocking

🤔 thinking

  • ts config push --adapter <x> already knows its target runtime, but publishing only runs validate_storage. Resolving against the target adapter at push time would surface the example-config failure before the server starts. This is separate from the "do not resolve according to the CLI host" rule.
  • Celld preparation errors: see the inline comment on celld_ec.rs.

📝 note

  • The [ec] field table in docs/guide/configuration.md (around line 645) still lists only ec_store and does not document storage.

CI Status

  • 16 checks pass.
  • FAIL: cargo test (axum native), which is not in the base branch's required set.
  • Locally, the core ec_storage_config tests pass (5/5). I also ran a throwaway probe that resolves the shipped example config for each runtime. The full adapter suites, the real-celld ignored tests and the image script were not re-run for this review.

Comment thread trusted-server.example.toml Resolved
@ChristianPavilonis
ChristianPavilonis marked this pull request as ready for review November 11, 2026 13:50
Resolve provider shape in Core and construct the selected native live handle during bounded prepared startup. Reject obsolete launch selection and unsupported or uncompiled providers before readiness. Keep exact retained table and namespace identities.

Use EdgeZero .2 conditional records for celld, without a generic-KV replacement or cached identity snapshots. Preserve current adapter normalization and direct transport ownership. Qualify real disposable celld persistence, restart, CAS, withdrawal and outage, plus typed-config DynamoDB binary fault controls.
The shared CLI template deliberately selects Fastly storage. Leave that graph intact in Fastly fixtures and remove only its known placeholder for Axum, Cloudflare and Spin smokes before typed validation and export.

Give the EOF fixture its serving adapter and keep non-Fastly graphs unconfigured. Preserve production provider validation and all negative startup/body/timeout assertions. Native CLI export now reaches prepared startup without an unsupported Fastly selection.
Pass the serving adapter through the existing helper caller, keep both listener-port cases, and assert that Axum/Cloudflare/Spin omit Fastly storage while Fastly retains it.
Takes #1535's new head 3254b22, which carries #1506's repin of EdgeZero to
rc/identity at 459bd27d (42e0c46): PR 275 at 0e2a58ae, the stack's test
fixes and EdgeZero 536's bounded record update, RecordHandle::update.

`Cargo.toml` conflicts only where this PR's own edits sit next to the
EdgeZero pin text; the merge keeps this PR's text with the new pin.
@aram356

aram356 commented Nov 26, 2026

Copy link
Copy Markdown
Collaborator

For the identity integration branch (#1608), I pushed 9be8425a3, a merge of #1535's new head 3254b223f, which brings #1506's repin of EdgeZero to rc/identity at 459bd27d (42e0c46c7): EdgeZero #275 at 0e2a58ae, the EdgeZero stack's test fixes and EdgeZero #536's bounded record update, RecordHandle::update. Cargo.toml conflicted only because this PR's edgezero-store-celld line sits beside the EdgeZero pins; the merge keeps this PR's line with the new pin.

Takes #1535's new head 79860c7, which carries #1506's repin of EdgeZero to
rc/identity at 1619078a (8edc50e), a revert that removes EdgeZero 522
(portable Fastly record providers) and 524 (outbound mTLS client
identities).

`Cargo.toml` conflicts only where this PR's own edits sit next to the
EdgeZero pin text; the merge keeps this PR's text with the new pin.
@aram356

aram356 commented Nov 27, 2026

Copy link
Copy Markdown
Collaborator

For the identity integration branch (#1608), I pushed b53f26a36.

Takes #1535's new head 79860c7, which carries #1506's repin of EdgeZero to rc/identity at 1619078a (8edc50e), a revert that removes IABTechLab/edgezero#522 (portable Fastly record providers) and IABTechLab/edgezero#524 (outbound mTLS client identities).

Cargo.toml conflicts only where this PR's own edits sit next to the EdgeZero pin text; the merge keeps this PR's text with the new pin.

rustfmt skipped the record_ec acquire statement because of its long
inline message. Move the message into a constant so the statement is
formatted; the text is unchanged.

The storage spec still said legacy ec.ec_store stays inactive off
Fastly. Since the shared record contract, native, Cloudflare and Spin
reject it at startup, and Fastly names are KV resource links rather
than declared logical IDs. Note both in the implementation update.
@ChristianPavilonis

Copy link
Copy Markdown
Collaborator Author

Following up on the review summaries. 6913ee7 has the two code and doc changes; the inline threads carry the rest.

@prk-Jr (review):

  • cargo test (axum native) flake: ServerFixture::assert_failed_before_listen already has the self-connection guard (crates/trusted-server-adapter-axum/tests/startup.rs:215-226), and the job passed at b53f26a36.
  • ts config push --adapter resolving storage: I'm leaving this out of this PR. rc/identity's CLI only distinguishes adapters by identity-provider support, and checking storage at push time would change what push accepts. It's a reasonable follow-up on the identity branch.
  • docs/guide/configuration.md: Run Axum identity through the shared application #1646 adds the storage row and the Fastly-only note for ec_store (9ce4eb19c). I'm not repeating it here because it would conflict with that rewrite.

@dhruv8sh (review): every inline point has a reply. Most were resolved by the record-store redesign. The rustfmt issue had moved to record_ec.rs and is fixed in 6913ee7. The example-config and guide-wording points stay as they are to match rc/identity.

@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

Follow-up pass at 6913ee7b6. The record-store redesign is a clear improvement: [ec.storage] now holds only a logical/store reference with deny_unknown_fields, connector settings live in EdgeZero bindings, Fastly routes every graph consumer through one open_identity_record_store, and Cloudflare/Spin/Axum reject unsupported selections before routed work. I found no correctness defect in the selection or record path. Two blockers remain: the branch conflicts with the current base, so no hosted CI has run at this head, and the shipped example config no longer starts the documented Axum quickstart. The remaining items are non-blocking.

Blocking

🔧 wrench

  • Conflict with the current base; no CI at this head — see Cross-cutting below.
  • Shipped example config no longer starts the documented Axum quickstart (or Cloudflare/Spin) — see inline at trusted-server.example.toml:108

Non-blocking

🤔 thinking

  • Failed Fastly store open is cached for the whole sandbox — see inline at crates/trusted-server-adapter-fastly/src/ec_record_store.rs:44
  • Records declared and prepared, but no [ec.storage], starts without a graph — see inline at crates/trusted-server-adapter-axum/src/startup.rs:306
  • Image acceptance fixture now publishes a shape this PR rejects — see inline at scripts/test-native-ec-image.mjs:435

Cross-cutting / body-level findings

  • 🔧 Resolve the conflict with baseline/sourcepoint-20261110 so CI runs at the head. The base moved to bee443b26 after this PR's merge base (79860c77b). git merge-tree --write-tree origin/baseline/sourcepoint-20261110 <head> reports a content conflict in crates/trusted-server-adapter-axum/tests/native_ec.rs: the base split router into router(store: Store, geo) plus router_with_settings(settings, store: Store, geo), while this PR made router generic over S: EcKvStore + Clone + Send + Sync + 'static for the celld case. The resolution needs router_with_settings to take the generic store too, or the celld test will not compile under --all-features. GitHub reports mergeable: UNKNOWN and there are zero check runs or statuses on 6913ee7b6, so no workflow (including stock-celld-records and cargo test (axum native)) has run on this head or on its merge with the base.
  • 📝 One stale doc row outside the diff. docs/guide/edgezero.md:73 still lists ec.ec_store (ec_identity_store by default) and says Axum/Cloudflare/Spin treat it as "Unsupported: EC lookup is unavailable". At this head those three runtimes reject it at startup, and the example uses [ec.storage] store = "trusted_server_kv". Since this PR already edits the store table earlier in the same file, updating this row here would keep the guide consistent.

Prior review status

From my review at f14eefa67:

  • 🔧 Example config fails at startup off Fastly — still reproducible and still blocking. Resolving the shipped example's [ec] table at this head gives Fastly Fastly("trusted_server_kv") and ec.storage.provider is required outside Fastly on Native, Cloudflare and Spin. The author's point about option (a) holds: legacy ec_store now fails off Fastly too (legacy ec.ec_store is Fastly-only), so it no longer gives one starter that works everywhere. The fail-closed error names the field, but the getting-started Axum quickstart copies this example unchanged, and #1646 (which tracks the docs fix) targets feat/providers-awaited, so this branch keeps a quickstart that does not start. Details and the minimal fix are in the inline on trusted-server.example.toml.
  • 🔧 cargo test (axum native) self-connection flake — resolved. ServerFixture::assert_failed_before_listen now treats a probe whose local and peer addresses match as a self-connection (crates/trusted-server-adapter-axum/tests/startup.rs:218-226). cargo test (axum native) passed twice at b53f26a36.
  • 🤔 Target-aware storage check in ts config push --adapter — still open. The deferral to the identity branch is fine.
  • 🤔 Celld preparation errors collapse into one message — resolved for preparation. celld_ec.rs is gone; EdgeZero's binding reports provider unavailable and celld token: configured value absent, and the startup tests assert both. Request-time store_error collapsing is base code outside this diff.
  • 📝 configuration.md [ec] table lacks storage — still open. Deferral to #1646 is fine.

From @dhruv8sh's review (all non-blocking): local_endpoint in published config, the duplicated DynamoDB binding rules, both unreachable! panics, and the unformatted long line are resolved at this head. connector_configuration_is_not_accepted_or_echoed_as_identity_data covers endpoint/region/token rejection, ec_kv.rs is gone, Axum returns configuration_error, and Fastly accepts both selections. The guide-wording point was declined with a reasonable rationale. The example-config point is covered above.

CI Status

  • No checks reported for 6913ee7b6 (zero check runs and zero commit statuses). See the conflict finding above.
  • Previous head b53f26a36: 31 distinct checks, each run twice, all PASS. These include cargo fmt, cargo test, cargo test (axum native), cargo test (cross-adapter parity), cargo check/build/test (spin native + wasm32-wasip1), cargo check (cloudflare native + wasm32-unknown-unknown), stock-celld-records, integration tests, integration tests (Fastly EC lifecycle), HTML EOF runtime (Fastly), health-startup (all four adapters), browser integration tests and format-docs. The b53f26a36 to 6913ee7b6 delta is the record_ec.rs message constant and one spec sentence.
  • Run locally at 6913ee7b6: ec_storage_config (3/3 pass), plus a throwaway probe resolving the shipped example and an old-starter ec_store config for each runtime. Adapter suites, Viceroy, and the ignored real-celld cases were not re-run locally.

Comment on lines +35 to +44
fn store(&self) -> Result<&RecordEcKvStore, Report<TrustedServerError>> {
self.opened
.get_or_init(|| {
open(&self.store_name).inspect_err(|message| {
log::warn!(
"EC record store '{}' is unavailable: {message}",
self.store_name
);
})
})

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.

🤔 thinking: A failed open is cached for the life of the sandbox, which is longer than EdgeZero's cache.

opened is a OnceLock<Result<..>> on a store that IdentityApp holds once per application build. With the opt-in reusable-sandbox feature, one sandbox serves many requests. So one transient KVStore::open failure makes every later EC operation fail until the sandbox is recycled. EdgeZero classifies TooManyRequests and Unexpected(_) from open as KvStoreOpenFailure::Unavailable, which is transient.

The module doc says this matches "the way EdgeZero's declared stores cache theirs". At the pinned EdgeZero revision, though, build_kv_registry_with_records builds new FastlyKvStore::declared* handles inside each request's callback, so their OnceLock lasts one request. The removed FastlyEcKvStore opened on every operation. The default build (one request per sandbox) is unaffected.

One option is to cache only a successful open (sketch, not compiled):

opened: OnceLock<RecordEcKvStore>,

fn store(&self) -> Result<&RecordEcKvStore, Report<TrustedServerError>> {
    if let Some(store) = self.opened.get() {
        return Ok(store);
    }
    let store = open(&self.store_name).map_err(|message| {
        log::warn!("EC record store '{}' is unavailable: {message}", self.store_name);
        Report::new(TrustedServerError::KvStore {
            store_name: self.store_name.clone(),
            message,
        })
    })?;
    Ok(self.opened.get_or_init(|| store))
}

That retries a permanently missing link on each EC operation, which is what the old backend did. If the repeated warning is a concern, keep failure caching only for missing-binding or invalid-configuration outcomes. Either way, selecting_a_store_does_not_open_it's "should cache the failed open for the sandbox" assertion would change, and the module doc should be corrected.

.resolve_storage(EcRuntime::Native)
.map_err(settings_error)?
{
None => {}

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.

🤔 thinking: With TRUSTED_SERVER__EC_RECORDS_ENABLED=true and a record binding, but no [ec.storage] in the published config, this arm starts the server with no EC graph and logs nothing.

In that case record_ec::configure declares trusted_server_kv, and EdgeZero prepares the binding before readiness. That includes network I/O to celld or DynamoDB, and startup fails on an outage. Then resolve_storage(Native) returns None and the prepared handle is never used. Native publisher issuance needs a graph, so EC cookies stop.

Two ways to get here:

  • An operator follows the migration error ("declare TRUSTED_SERVER__EC_RECORDS_ENABLED and select an EdgeZero record binding") but doesn't add [ec.storage] provider = "records".
  • A config rollback removes that table while the launch inputs stay.

The design doc's rule is that explicit configuration is never silently ignored. Failing closed here would follow that rule. A log::warn! is the lighter option. Either way, record_ec::declared() needs to be pub(crate) for prepare_native to check it (two files, so not a one-click suggestion):

None if crate::record_ec::declared()? => {
    return Err(configuration_error(
        "TRUSTED_SERVER__EC_RECORDS_ENABLED declares EC records but ec.storage selects none",
    ));
}
None => {}

Comment on lines +429 to +435
storage: {
provider: 'dynamodb',
region: 'us-east-1',
table,
namespace,
local_endpoint: proxyEndpoint,
},

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.

🤔 thinking: This fixture now publishes ec.storage = { provider: 'dynamodb', region, table, namespace, local_endpoint }. That is the superseded schema, and this PR's parser rejects it. connector_configuration_is_not_accepted_or_echoed_as_identity_data asserts that provider='dynamodb' with region/table/namespace fails Settings::from_toml. The same hunk also drops TRUSTED_SERVER__EC_DYNAMODB_ENABLED without adding TRUSTED_SERVER__EC_RECORDS_ENABLED or an EDGEZERO__STORE_BINDINGS_FILE. So a --binary/--image run now fails at app-config load instead of exercising EC.

The script isn't in CI, and native-ec-persistence.md already calls it historical and in need of adaptation, so this isn't blocking. Still, the edit makes it look adapted when it isn't. Either revert this hunk and leave it explicitly historical, or adapt it to { provider: 'records', store: 'trusted_server_kv' }, TRUSTED_SERVER__EC_RECORDS_ENABLED=true and an aws-dynamodb-records binding file that carries the region, table, namespace and endpoint.

Comment on lines +103 to +108
# Fastly persistence uses this exact physical binding. Provider omission is
# Fastly-only; native providers require explicit configuration. An ordinary
# logical KV declaration does not select EC storage. Legacy ec.ec_store remains
# supported on Fastly, but cannot be combined with this section.
[ec.storage]
store = "trusted_server_kv"

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.

🔧 wrench (follow-up to my earlier thread here; keeping this blocking): I agree option (a) no longer works, since legacy ec_store is now rejected off Fastly too. But the problem this thread raised is still introduced by this PR and still reachable at this head.

docs/guide/getting-started.md "Option B — Axum server" tells operators to cp trusted-server.example.toml trusted-server.toml and run it unchanged. At the base, that example's ec_store = "ec_identity_store" was ignored off Fastly, so the quickstart started. At this head the example ships [ec.storage] store = "trusted_server_kv" with no provider, and resolving it for Native, Cloudflare and Spin gives ec.storage.provider is required outside Fastly. The documented Axum quickstart therefore no longer starts on this branch. #1646 targets feat/providers-awaited, not this branch, so it does not fix the baseline.

Existing Axum/Cloudflare/Spin deployments built from the old starter also keep ec_store and now fail with legacy ec.ec_store is Fastly-only; select an explicit prepared record binding, and no operator doc says so (native-ec-persistence.md only says Cloudflare/Spin reject "unsupported EC storage"; configuration.md still calls ec_store a "Fastly KV store name").

Minimal fix in this PR: make the Axum quickstart produce a config that starts (either add the required native [ec.storage] selection step there, or keep [ec.storage] commented in the shared example with a Fastly and a native form shown), and add a one-line upgrade note, e.g. "Remove ec.ec_store or [ec.storage] from Axum (unless selecting provider = \"records\"), Cloudflare and Spin configs before upgrading; they were previously ignored there and now fail startup." Failing closed is the right behavior; the gap is that the shipped starter and docs walk operators into it.

PR #1535's new head brings its consent update review fixes, plus the cascaded owner review fixes from #1525, #1526, #1488, #1489, #1639, #1531, #1532, #1615, #1637, #1533 and #1536.

crates/trusted-server-adapter-fastly/src/ec_kv.rs: #1526 reworded the module note on blocking Fastly KV hostcalls, and #1537 had already deleted this module for the record-store-backed ec_record_store.rs. The resolution keeps the deletion; the reworded note has no code left to describe.

crates/trusted-server-adapter-axum/tests/native_ec.rs: #1536 split router into a router_with_settings helper that takes Settings, and #1537 made router generic over any EcKvStore. The resolution keeps #1536's split and makes both functions generic over the store like #1537.
PR #1535's new head brings wave B: #1506's merge of main ab5c24f (#1501, js_asset_proxy rewriter ordering) and its repin of EdgeZero to rc/identity 8a73c0978806, carried up through the chain.

Cargo.toml: #1506 moved the workspace EdgeZero dependencies to 8a73c097, and #1537 added the workspace edgezero-store-celld dependency at the old pin next to them. The resolution keeps #1506's lines and #1537's edgezero-store-celld at 8a73c0978806bdb60caccb17a6ddf34e14f3bd5e.

Cargo.lock changes only the 10 EdgeZero package sources, now at 8a73c097; the codegen crate's nested Cargo.lock is unchanged. The re-resolved lock matches #1535's new head.
@aram356

aram356 commented Dec 1, 2026

Copy link
Copy Markdown
Collaborator

Round 12 identity realignment: rc/identity is now at db7dce634, and EdgeZero is pinned to its rc/identity at 8a73c097. This branch fast-forwarded from 6913ee7b6 to 924f95838:

This PR's edgezero-store-celld workspace dependency now names EdgeZero 8a73c097.

Each merge message says what it carries and how any conflict was resolved.

PR #1535's new head brings #1535's owner fix that keeps mirrored GPP consent through transient CMP not-ready states (#1678) and #1535's move of the consent-update test host to publisher.example.com for the URL-host lint. The merge is clean.
PR #1535's new head brings #1506's move of the five auction endpoint test requests from test-publisher.com to publisher.example.com, for the URL-host lint. The merge is clean.
PR #1535's new head brings #1535's Sourcepoint consent mirror deduplication and consent update coverage, plus #1506's repin of EdgeZero to rc/identity ef5cbf30, which renames Fastly backends to ez_b31v2_* and moves the yanked pin-project-lite, chacha20 and spin, #1625's shared Wrangler installer for CI, #1639's pull reserve boundary check and wording, #1613's conformance doc alignment, #1616's certificate policy and pull-sync fixture corrections, #1617's preserved startup diagnostics and hardened runtime checks, #1635's complete startup evidence in native fixtures, #1637's shared readable non-Unicode Geo fixture and #1627's Spin store reads and retained runtime coverage.

Cargo.toml: #1506 moved the workspace EdgeZero dependencies to ef5cbf30, and #1537 added the workspace edgezero-store-celld dependency at the old pin next to them. The resolution keeps #1506's lines and #1537's edgezero-store-celld at ef5cbf30878e0c6cdb8c706117c02add75493531; the re-resolved lock matches #1535's new head.

crates/trusted-server-adapter-axum/tests/native_acceptance.rs: #1635's owner commit added the shared connected_to_listener import, and #1537 added its celld fixture module and imports at the same place. The resolution keeps both.

scripts/smoke-runners.test.mjs (semantic fix): #1537's ad00c40 makes smoke_initialize_config edit the trusted-server.toml that `ts config init` writes and require its Fastly storage block, and #1617's owner commit e8b5489 adds runner tests whose fake `ts` writes no file on `config init`, so both Cloudflare config-push cases exited 1 instead of 42. This link is the first place the two commits meet, so the fix is here: the fake `ts` writes the template's [ec.storage] block on `config init`, as the real command does, and #1537's guard stays strict.

Cargo.lock changes only the EdgeZero package sources (now ef5cbf30) and the yanked pin-project-lite, chacha20 and spin; the codegen crate's nested Cargo.lock is unchanged.
@aram356

aram356 commented Dec 3, 2026

Copy link
Copy Markdown
Collaborator

Round 15 identity realignment: rc/identity is now at 391a08578, and EdgeZero is pinned to its rc/identity at ef5cbf308. This branch fast-forwarded from 3502ad767 to 4baa50c1a:

This round's link makes the fake ts in #1617's runner test write the template's [ec.storage] block on config init, because the real command writes the file that this PR's smoke_initialize_config edits. This PR's script check stays strict. Without the fix, both Cloudflare config-push cases exit 1 instead of 42.

Each merge message says what it carries and how any conflict was resolved.

Carries #1533's Axum startup-test port fix (779e446) and nothing
else. Owner commits pushed to other chain PRs since round 15 come in
with the next round.
@aram356

aram356 commented Dec 3, 2026

Copy link
Copy Markdown
Collaborator

Cascade of #1533's Axum startup-test port fix (779e44673): fcbe1f1fc merges it into this PR. There were no conflicts and nothing else changed. The fix moves free_loopback_port in crates/trusted-server-adapter-axum/tests/routes.rs below the ephemeral port range, and #1533's note has the details. Owner commits pushed to other chain PRs since round 15 come in with the next round. rc/identity is now 62f8e41e2.

@aram356

aram356 commented Dec 3, 2026

Copy link
Copy Markdown
Collaborator

Merged #1627's runtime KV removal (7c2b84f45) into this branch as 956cda0dc, on top of fcbe1f1fc.

At the maintainer's request, that commit removes the generic runtime KV store trusted_server_runtime_kv. Nothing reads or writes it, and the managed Fastly deploy made every service provision and pay for it. edgezero.toml and the Fastly Hooks::stores() now declare only trusted_server_kv, and RuntimeServices::kv_store() is unavailable on every adapter.

Only that commit was merged, not the base branch's new head. Conflicts were resolved in edgezero.toml, the Fastly Hooks::stores() in app.rs, fastly.toml, the Viceroy template, the integration tests' config.rs, trusted-server.example.toml, docs/guide/architecture.md and docs/guide/edgezero.md. Only trusted_server_kv stays declared, this branch's record-store comment and local seeds are kept, and the runtime-KV lines are dropped.

Checks on this head: no reference to the removed store remains and cargo fmt --check passes; clippy-fastly, clippy-axum, clippy-cloudflare and clippy-spin-native pass. rc/identity (b9dc3153e) passed the full CI gate list with the removal.

PR #1535's new head brings #1487's change that strips `ts-eids` from publisher-origin requests unless the operator opts in. The merge is clean.
@aram356

aram356 commented Dec 3, 2026

Copy link
Copy Markdown
Collaborator

Round 17 identity realignment: rc/identity is now at 0ed862633, and EdgeZero stays pinned to its rc/identity at ef5cbf308. This branch fast-forwarded from 956cda0dc to 9554372a1:

Each merge message says what it carries and how any conflict was resolved.

@aram356

aram356 commented Dec 4, 2026

Copy link
Copy Markdown
Collaborator

Merged #1614's /_ts/ local answers (48930c270) into this branch as 2b8587e4c, on top of 9554372a1.

Trusted Server owns the /_ts/ namespace (#1740). A request for /_ts or any /_ts/ path that no route handles now gets a local 404 on Fastly, Axum, Cloudflare and Spin, and never reaches the publisher origin. The path is matched after percent-decoding. Paths outside the namespace, such as /_tsx or /articles/_ts/x, still go to the publisher origin, and every routed /_ts/ path answers as before.

This merge takes #1535's new head (3a36b51c6), which carries 48930c270 and nothing else new to this branch. It was clean.

Checks on this head: no conflict markers; cargo fmt --all -- --check passes; the merge adds exactly #1614's change to this branch's files; it merges cleanly with every lower head in its stack. rc/identity (e72407155) passed the full CI gate list with the change.

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.

4 participants