Skip to content

Guard serving runtime environment names - #1637

Open
prk-Jr wants to merge 17 commits into
feat/1573-axum-production-servingfrom
feat/1580-runtime-env-guard
Open

prk-Jr wants to merge 17 commits into
feat/1573-axum-production-servingfrom
feat/1580-runtime-env-guard

Conversation

@prk-Jr

@prk-Jr prk-Jr commented Nov 19, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Guard process-environment reads in serving code with a compiler-checked runtime_env! macro and target-matched production Clippy passes. Approved names remain the TRUSTED_SERVER__ prefix and five individually justified exceptions: four Fastly metadata names and EdgeZero's native Geo provider override.

Revision status, checked 2026-12-03 12:13 UTC: the maintainer advanced this PR to 7f3a351803, with base feat/1573-axum-production-serving at e0473eee666afb4859ca751bf620604435fd145d and EdgeZero ef5cbf308. Earlier signed review correction d61d61fb9f remains in its history. Local/runtime and hosted results below are historical for their named revisions; they do not qualify this later SDK merge. Exact-head CI reports 26 contexts (26 QUEUED); full current-head qualification is assessed separately.

The checked reader requires Unicode environment values. A selected Geo profile with a non-Unicode pathname is therefore Unavailable, even where Linux can read the file. The operator guide documents this requirement. Build inputs, test poison values, operator tools, Worker bindings and EdgeZero-owned configuration remain outside this serving-only gate.

Closes #1580.

Review follow-up

This follow-up shares the readable non-Unicode off profile setup between the two existing Linux Geo regressions. Their actual caller assertions remain in place: the old var_os/file-read/parser path accepts the valid file, the checked loader rejects its non-Unicode environment value, and the KV declaration test proves the absent-profile positive case before checking the supplied-profile negative case.

Only a private Linux test helper, its imports and two call sites change. Production code is byte-for-byte unchanged; no new tests, environment exceptions, configuration or schema are introduced.

The five earlier requested corrections were implemented at 146f126bd and explicitly accepted on re-review. They remain intact: explicit production features exclude Core test-utils, separate Fastly default/reusable-sandbox passes cover both modes, C fixtures use the target's c_char, the docs explain all five exceptions, and identity providers are primary lint packages only where this revision's serving adapters consume them. The existing five author responses are preserved.

Stack

At the original follow-up’s qualification, the actual base was feat/1573-axum-production-serving at fb7fc9b13e835bfd0eb7d44b14ab2d376ef4a3d7, independently verified then through Git and the GitHub branch ref, and the source merge base was 41e428899796969e85f4757ebcac5deb029235d6. The later maintainer source/base identities are recorded above. No merge, rebase or retarget was part of the original correction.

The original object-only preview against its then-advanced base was clean; local checks below qualify the original follow-up source, not the later SDK merge. New-head hosted checks are tracked separately. The direct child #1627 has the same guard/native-Geo files; a later forward merge carries this test-only cleanup. When new serving consumers are introduced, reconfirm the combined tree's serving-guard coverage.

Verification

Review follow-up commit: d61d61fb9fcf1f9cbc4f3b184f5eca0aef78a802.

  • All 21 required local gate groups pass, including five adapter test modes, eight target-matched clippy aliases, parity and native digest tests/lint, CLI checks, JS lint/build/format, documentation lint/format/build, domain checks against the actual base, and source/runtime guards.
  • Full JS: 81 files and 3,319 tests pass with no type errors.
  • Actual Linux ARM64: all eight native_geo tests pass, none ignored, with geo-kv enabled and the real raw-byte file in guest /tmp. The same source passes ARM native Clippy and all 41 compiler fixtures. The container uses pinned Rust/Clippy 1.98.1 and Node 24.20.0, read-only source/prebuilt JS and no network during verification; host trust and global toolchains are untouched.
  • Host compiler fixtures pass under macOS Bash 3.2. Five real Cargo feature graphs, derived from the actual guard commands, exclude Core test-utils and select identity-provider primaries only for Fastly. The actual five-pass production guard also passes.
  • Fresh production builds and all four runtime health/startup smokes pass. Fastly, Cloudflare and Spin deadline runtime fixtures pass. Local HTML EOF checks are not triggered: the full PR does not change EOF finalization, publisher or HTML-processor code.

At original follow-up publication, exact-head CI was pending. Its preceding head had duplicate check sets (60 successful entries representing 30 unique workflow/check names); those historical results do not qualify the later maintainer merge or require duplicate new-head runs. This is local/compiler/fixture evidence, not a deployed-service, live-provider or real-browser qualification. Historical execution claims without recoverable receipts are not presented as newly executed checks.

Spec

Runtime environment guard design and implementation plan.

@prk-Jr prk-Jr self-assigned this Nov 19, 2026
Brings #1635, which now carries the identity integration chain (dhruv8sh's
spine with the core identity app, the protected native Geo from #1532, the
identity conformance suite from #1613, the certificate-check statement from
#1616, the health and startup-failure contract from #1617 applied to the
native production runner, and the creative-proxy identity disclosure policy
from #1615), into the serving runtime environment guard.

The merge has no textual conflict, but the PR's guard rejected three
process-environment reads the protected native Geo added in the Axum
native_geo.rs: the TS boot profile path, read twice with var_os, and
EdgeZero's Geo provider setting. Each read now sits in a one-line private
helper with a scoped clippy::disallowed_methods allowance and a reason
comment, marked as a stopgap pending review. The reads, their names, the
var_os handling of a non-Unicode path and kv_selected's short-circuit order
are unchanged, and runtime_env!'s allowlist is untouched. The guard still
rejects any other unsuppressed read in that file.

AGENTS.md: the PR's guard gate follows the base's production health and
startup contract gate as item 20, in the same list.

Cargo.lock is the base's.
Brings #1532's rename of the native Geo profile variable to
TRUSTED_SERVER__NATIVE_GEO_PROFILE_FILE and #1617's bash 3.2 fix for the
smoke credentials expansion into the serving runtime environment guard, and
replaces this PR's earlier stopgap for the protected native Geo reads.

Axum native Geo: the profile path and EdgeZero's Geo provider override are
read through runtime_env!, so the stopgap helpers and their scoped
clippy::disallowed_methods allowances go. An absent profile still defers to
EdgeZero, and a profile path that is not Unicode now reports the profile's
Unavailable error instead of being read. kv_selected still declares the Geo
KV store only when no profile is set and EdgeZero's override selects kv.

runtime_env!: one justified allowlist entry for
EDGEZERO__ADAPTER__GEO__PROVIDER, EdgeZero's own native Geo provider
override, read only to decide whether the app declares the Geo KV store,
because EdgeZero exposes no API for that selection. The macro's docs and the
AGENTS.md gate name it beside the Fastly metadata exceptions.

Tests: the guard fixtures accept the new name through the checked macro and
still reject other EDGEZERO__ names. A native Geo unit test pins the
non-Unicode profile path as Unavailable.

Cargo.lock is the base's.
aram356 added a commit that referenced this pull request Nov 24, 2026
…plan

#1532 renamed TS_NATIVE_GEO_PROFILE_FILE to TRUSTED_SERVER__NATIVE_GEO_PROFILE_FILE on 2026-11-23, and #1637 reads it through runtime_env!. The older name stays where the text records the RC tag's state.
aram356 added a commit that referenced this pull request Nov 24, 2026
#1637 (0f206e4) adds the CI guard that runtime code reads only
TRUSTED_SERVER__ environment variables through runtime_env! (#1580). The
merge is clean.
@aram356

aram356 commented Nov 24, 2026

Copy link
Copy Markdown
Collaborator

For the identity integration branch (#1608), I pushed 0ca58298c and 0f206e4f1, merges of #1635's new heads.

This PR's guard found three direct reads in #1532's native_geo.rs. #1532 now names the profile variable TRUSTED_SERVER__NATIVE_GEO_PROFILE_FILE, and this PR reads it through runtime_env!: absent means no profile, and a non-Unicode value is the profile's Unavailable error (new unix test non_unicode_profile_path_is_unavailable). EDGEZERO__ADAPTER__GEO__PROVIDER, EdgeZero's own native Geo provider override, gets one justified allowlist entry in runtime_env!: the app reads it only to decide whether to declare the Geo KV store, because EdgeZero exposes no API for that selection. test-runtime-env.sh covers the new entry and rejects other EDGEZERO__ names (41 fixtures). AGENTS.md lists this gate as item 20.

ts config push applies TRUSTED_SERVER__ variables only to config leaves that already exist, so these runtime-only names are never read as config.

prk-Jr added a commit that referenced this pull request Nov 25, 2026
Record the current runtime environment guard head (0f206e4). This
branch already carries the guard with the os form and the native Geo
profile name, so the result keeps its version and changes no files.
#1637 keeps its base, #1635. This merge brings #1635's new head
(10ddb42), which carries #1506's repin of EdgeZero to rc/identity at
d063a8e7 and its merge of main's Fastly SDK 0.13.3 upgrade (#1671): fastly
0.13.3, url 2.5.9 and Viceroy 0.22.0.

It also brings the identity chain below #1635: 1f054c6 from #1488,
which forwards ortb2.user.ext.eids from the Prebid config into the auction
EIDs; a99dd66, a62601b, d1eb75f and 394892b from #1489, which cap
mirrored UID expiry at 30 days from the UTC day start and pass the request
time into finalize; and b2d4bfd from #1488, which records the known UID
hashes on lookup results with a setter, so the provider IDs the write
planner logs are not derived from them.

The merge had no conflicts.
aram356 added a commit that referenced this pull request Nov 25, 2026
This brings in 1f054c6 from #1488, which forwards ortb2.user.ext.eids
from the Prebid config into the auction EIDs, and a99dd66, a62601b,
d1eb75f and 394892b from #1489, which cap mirrored UID expiry at 30
days from the UTC day start and pass the request time into finalize. They
arrive through the chain's merges into #1639, #1640, #1612, #1628, #1623,
#1531, #1532, #1533, #1534, #1536, #1535, #1537, #1539, #1538, #1540,
#1566, #1624, #1641, #1642 and #1646, with #1646's move of the request
time into IdentityApp::finalize. It also brings d5276ee, which publishes
the native AWS runtime files without GNU mv -T, and Christian's merge
5597d3e of #1538 into #1540, through #1566's merge.

The base now also carries the Axum serving line (#1613, #1616, #1617, #1615,
#1635, #1637 and #1627), which #1533 merged, and #1627's b958107, which
decodes the Spin discovery document with Response::json, and #1627's merge
of #1625 (006b45e), which pins Wrangler for the Cloudflare smoke and CI.

This PR already carries #1646's head 461aa0d, so the merge adds only
#1646's new merge 166944769 of #1642 and the chain below it, including the
identity conformance check that now strips the mirrored UID's exp.

It also brings b2d4bfd from #1488, which records the known UID hashes
on lookup results with a setter, so the provider IDs the write planner
logs are not derived from them.

Restacking on the Axum serving line conflicts in the Axum startup tests,
where #1617 waits for /ready, since liveness stays up after a caught
initialization failure, and this PR rewrites the wait to retry a port
collision and to require the child's own ready lifecycle event.

Axum startup tests: wait_ready keeps this PR's collision retry and
lifecycle check, then probes #1617's /ready and returns the /health
response once the child is ready.

The fixture drains each child's output through this PR's log readers, so
#1617's assert_serves_failure_router reaps the stopped child and reads
those captured logs instead of collecting the pipes, which the readers
already own.

The base now also carries #1506's repin of EdgeZero to rc/identity at
d063a8e7 and its merge of main's Fastly SDK 0.13.3 upgrade (#1671): fastly
0.13.3, url 2.5.9 and Viceroy 0.22.0.

This PR now stacks on #1661 instead of #1646, so rc/identity can take both
as plain merges. #1661 sits on #1656 and #1626, which sit on #1646, so the
merge also brings #1626 (provider opt-outs and legacy EID expiry on Fastly
and Axum), #1656 (the configurable Edge Cookie browser gate) and #1661
(refusing EC creation when a trusted JA4 contradicts the User-Agent).

Fastly identity conformance fixture: #1661 records each scenario's runtime
TLS JA4 through a RuntimeTlsJa4 middleware in place of derived device
signals, takes the User-Agent from the scenario and drops the browser flag.
This PR adds geo consent requests with their own trusted client IP settings
and no browser device signals. The merge assembles the conformance app with
#1661's middleware and keeps this PR's geo_configured flag and
producer_settings. It sends the scenario's User-Agent unless the API request
supplies one, and inserts the scenario's JA4 only for requests without a geo
consent exchange, because this PR derived device signals only for those.

The base now also carries #1627's 4d0c1a2, which renames the generic
runtime KV store to trusted_server_runtime_kv, #1488's a610152 and
9104fd3, which add hashed-email intake for the LiveRamp and ID5
identity providers, #1646's aa31559, which gates identity writes for
rejected clients, and #1626's d07f789, which withholds a mirrored UID
while another source owner is opted out.

Fastly conformance JA4: the rebuilt #1661 merge supplies a trusted Python
JA4 behind the Chrome User-Agent for #1646's known non-browser API
requests, and this PR inserts the scenario's JA4 only without a geo
consent exchange, with its producer_settings. The merge keeps both: a
known non-browser request gets the Python JA4, any other request the
scenario's JA4 unless it is a geo consent exchange.

This PR's head moves to e8015ca, its clean merge of #1646's aa31559,
which the base already carries, so it adds no change beyond the base.

Axum lib.rs: the base now carries #1636, through #1626's merge of it, whose
after_response_drain_tests module sits where this PR adds its
geo_conformance module. The crate keeps both test modules.
aram356 added a commit that referenced this pull request Nov 25, 2026
This brings in 1f054c6 from #1488, which forwards ortb2.user.ext.eids
from the Prebid config into the auction EIDs, and a99dd66, a62601b,
d1eb75f and 394892b from #1489, which cap mirrored UID expiry at 30
days from the UTC day start and pass the request time into finalize. They
arrive through the chain's merges into #1639, #1640, #1612, #1628, #1623,
#1531, #1532, #1533, #1534, #1536, #1535, #1537, #1539, #1538, #1540,
#1566, #1624, #1641, #1642 and #1646, with #1646's move of the request
time into IdentityApp::finalize. It also brings d5276ee, which publishes
the native AWS runtime files without GNU mv -T, and Christian's merge
5597d3e of #1538 into #1540, through #1566's merge.

The base now also carries the Axum serving line (#1613, #1616, #1617, #1615,
#1635, #1637 and #1627), which #1533 merged, and #1627's b958107, which
decodes the Spin discovery document with Response::json, and #1627's merge
of #1625 (006b45e), which pins Wrangler for the Cloudflare smoke and CI.

The merge also brings the 12 #1646 commits this PR lacked, from 48a43ae
to 461aa0d: dhruv8sh's page-phase lookup and /auction EID work
(48a43ae, 82fe088, 1d0a74f, 838586e and his chain merges a061c01,
ecf16e8, e1d23a0, edcf4c5 and 9a020e1), the merge 9cad928 of
#1641 into #1642, and prk-Jr's "Merge providers-awaited into shared
identity" (4ffbaf8) and "Restore Fastly auction browser gating"
(461aa0d).

Edge cookies guide: a conflict is the request lifecycle paragraph.
The merge takes #1646's sentences on positive identity cookies, core
expiries and /auction body EIDs, and keeps this PR's closing sentences on
the default ec.sliding_refresh = false flow and sliding renewal.

Fastly adapter tests: 82fe088 from #1646 removed the navigation-lookups
thread-local and the page-lookups argument of apply_edgezero_ec_finalize,
since the handler now collects page lookups onto the EC context. This PR's
sliding_ec_renews_held_publisher_identity_before_terminal_privacy test
drops its two take_navigation_lookups calls and passes no page lookups to
finalize. Its configuration has no record store or providers, so no
lookups were collected before either, and its assertions are unchanged.

It also brings b2d4bfd from #1488, which records the known UID hashes
on lookup results with a setter, so the provider IDs the write planner
logs are not derived from them.

The base now also carries #1506's repin of EdgeZero to rc/identity at
d063a8e7 and its merge of main's Fastly SDK 0.13.3 upgrade (#1671): fastly
0.13.3, url 2.5.9 and Viceroy 0.22.0.

This PR now stacks on #1661 instead of #1646, so rc/identity can take both
as plain merges. #1661 sits on #1656 and #1626, which sit on #1646, so the
merge also brings #1626 (provider opt-outs and legacy EID expiry on Fastly
and Axum), #1656 (the configurable Edge Cookie browser gate) and #1661
(refusing EC creation when a trusted JA4 contradicts the User-Agent).

Cloudflare route tests: both PRs add a test at the end of the file. The
merge keeps both, this PR's
sliding_ec_configuration_preserves_unsupported_platform_responses and
#1661's ec_route_creates_no_record_whatever_the_bot_management_ja4.

Fastly sliding EC test: #1617, which now sits below this PR, answers GET
/health through the router's probe hook as an operational response, which
carries no EC state. This PR's
sliding_ec_renews_held_publisher_identity_before_terminal_privacy routes
/health through the router and expected EC state on every path but the
unsupported EC route, so it now also accepts the liveness probe without EC
state. Its check that /health issues no renewal cookie is unchanged.

The base now also carries #1627's 4d0c1a2, which renames the generic
runtime KV store to trusted_server_runtime_kv, #1488's a610152 and
9104fd3, which add hashed-email intake for the LiveRamp and ID5
identity providers, #1646's aa31559, which gates identity writes for
rejected clients, and #1626's d07f789, which withholds a mirrored UID
while another source owner is opted out.

Settings: this PR's MaxAgeDays and #1488's HashedEmailSource are both
added before Ec in settings.rs; the merge keeps both.

This PR's head moves to fbe5670, its merge of #1646's aa31559, which
models admitted clients in the core sliding tests, finalizes them with
the store gate and adds refused_client_gets_no_renewal_or_record_io, and
adds the proposal's review log. Taken as the change from the old head
668d501, the new head would replay #1646 commits the base already
carries in rebuilt form. The merge takes only fbe5670's own resolution,
the change from a plain merge of 668d501 and aa31559 to fbe5670:
the sliding tests and the proposal apply cleanly, and its Fastly sliding
test port is the one this merge already made.
aram356 added a commit that referenced this pull request Nov 25, 2026
…1622 into rc/identity

#1622 (244ca26) now carries the whole chain, each PR merging the one below
it:

- #1506 (c197404) repins EdgeZero to rc/identity at d063a8e7, which
  carries EdgeZero main's Fastly SDK 0.13.3 upgrade through every EdgeZero PR
  here, and merges Trusted Server main's upgrade (#1671): fastly 0.13.3, url
  2.5.9 and Viceroy 0.22.0.
- #1614, #1525, #1526, #1487 and #1488 take it in turn. #1488 also adds
  b2d4bfd, which records known UID hashes with a setter.
- #1489, the identity spine (#1639, #1640, #1612, #1628 and #1623), #1531 and
  #1532.
- The Axum serving line: #1613, #1616, #1617, #1615, #1635, #1637 and #1627,
  chained, with #1627's b958107 decoding the Spin discovery document with
  Response::json and #1627's merge of #1625, which brings #1625's Wrangler pin
  into the chain.
- The held line on #1627: #1533, #1534, #1536, #1535, #1537, #1539, #1538,
  #1540, #1566, #1624, #1641, #1642 and #1646. #1646 keeps its own shared
  after-response runner in ec::app::lookups.
- #1636 (72096cd) on #1646 (b5a5f62), draining Axum
  after-response identity tasks on SIGTERM through #1646's shared runner.
- The EC route line on #1636: #1626 (067531e), which merges #1636, the
  draft #1656, #1661, #1662 and #1622, and through #1622's merge of it,
  #1620's round-6 head.

Each conflict was resolved in the PR that sits higher. This merge is clean.

Since the last update the chain also takes #1488's hashed-email intake
(a610152 and 9104fd3) and its POST, body and header options for the
status call (f063a76), #1627's split of the generic runtime KV store into
trusted_server_runtime_kv (4d0c1a2), #1646's gate on identity writes for
rejected clients (aa31559) its native container test of the failure router
(4f4c036) and that test's header check on an ordinary route (71a573a),
#1626's withholding of a mirrored UID while another source owner is opted
out (d07f789), and #1617's description of the Axum startup failure router
(6d174a8) and of the startup failures that still exit before listening
(4c07cad). #1636 no longer sits in the Axum serving line; it arrives
through #1626, which merges it on top of #1646. Its new head adopts #1646's
after-response runner in place of the one rc/identity took with cf1102c.

Cloudflare guide: #1627's merge of #1625 now keeps both #1625's tool version
clause and #1627's TRUSTED_SERVER_RUNTIME_KV binding in the smoke paragraph,
and fixes #1625's smoke script test for #1617's Python floor and Worker
build, and #1537's merge fixes its ts stub for #1537's storage template
step, so this merge needs no resolution.
Takes #1635's new head fa250b1, 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.

The merge is clean.
@aram356

aram356 commented Nov 26, 2026

Copy link
Copy Markdown
Collaborator

For the identity integration branch (#1608), I pushed c2f3fc073, a merge of #1635's new head fa250b1d7, 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. The merge had no conflicts.

@dhruv8sh dhruv8sh 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

This PR adds a runtime_env! macro in core. At compile time, the macro only accepts the TRUSTED_SERVER__ prefix or a fixed list of platform names. The PR also adds a dedicated Clippy config, a lint runner with fixture tests, and CI wiring, and routes every existing production std::env read in serving code through the macro. I found no correctness problems. The only issue is that the design spec lists fewer platform exceptions than the macro allows.

Non-blocking

⛏ nitpick

  • Design spec lists four platform exceptions; the macro allows five — see Cross-cutting below (docs/superpowers/specs/2026-11-19-runtime-environment-guard-design.md:401)

📝 note

  • No remaining direct env reads in serving code — see Cross-cutting below

👍 praise

  • Axum Geo keeps its old behaviour and has a test — see Cross-cutting below

Cross-cutting / body-level findings

  • ⛏ Design spec lists four platform exceptions; the macro allows five — In docs/superpowers/specs/2026-11-19-runtime-environment-guard-design.md:401, the spec says there are "four explicit platform exceptions" and that the macro accepts "four justified exceptions". The macro and AGENTS.md also allow EDGEZERO__ADAPTER__GEO__PROVIDER, and the Axum native Geo code now relies on it. Please add the EdgeZero exception and its justification to this list. The spec requires a reviewed reason for every exception, and this one currently has none.
  • 📝 No remaining direct env reads in serving code — I checked the serving crates. Every remaining direct env read is in a build script (now explicitly exempt), in the CLI (not linted), or in test code. The gate should therefore pass on this tree.
  • 👍 Axum Geo keeps its old behaviour and has a test — A non-Unicode profile path still stops the Geo KV store from being declared. It now returns Unavailable instead of trying to read the file, and a new test covers that case.

CI Status

  • integration tests (Fastly EC lifecycle): PASS
  • integration tests: PASS
  • format-typescript: PASS
  • Fastly response diff script: PASS
  • CI Node pin guard: PASS
  • CLAUDE.md symlink guard: PASS
  • cargo test (cross-adapter parity): PASS
  • cargo check/build/test (spin native + wasm32-wasip1): PASS
  • ts dev lint domains (changed lines): PASS
  • cargo test (axum native): PASS
  • Native provider acceptance script: PASS
  • vitest: PASS
  • cargo fmt: PASS
  • cargo check (cloudflare native + wasm32-unknown-unknown): PASS
  • cargo test (ts CLI, native) (ubuntu-latest): PASS
  • release scripts: PASS
  • docs-proposal scripts: PASS
  • trace runtime and browser acceptance: PASS
  • browser integration tests: PASS
  • cargo test: PASS
  • HTML EOF runtime (Fastly): PASS
  • format-docs: PASS
  • prepare integration artifacts: PASS
  • worker-deadlines (cloudflare): PASS
  • worker-deadlines (spin): PASS
  • health-startup (spin): PASS
  • health-startup (fastly): PASS
  • health-startup (cloudflare): PASS
  • health-startup (axum): PASS
  • cargo test (ts CLI, native) (macos-latest): PASS

Takes #1635's new head 353aee7, 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).

The merge is clean.
@aram356

aram356 commented Nov 27, 2026

Copy link
Copy Markdown
Collaborator

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

Takes #1635's new head 353aee7, 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).

The merge is clean.

@ChristianPavilonis ChristianPavilonis 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.

Reviewed the PR's own changes against the live #1635 base at 353aee724. Please address the Geo regression coverage and keep test-only code out of the production lint passes. The ARM64 fixture, docs, and identity-provider matrix comments are non-blocking.

The 41 compiler fixtures pass on x86-64 and all 30 hosted checks are green. I separately checked the Geo functions on both revisions, resolved the Cargo feature and dependency graphs, and ran the two libc fixtures through Clippy for Linux ARM64.

Comment thread scripts/lint-runtime-env.sh Resolved
Comment thread scripts/test-runtime-env.sh Resolved
Comment thread scripts/lint-runtime-env.sh Resolved
@prk-Jr
prk-Jr added this pull request to stack #1673 December 1, 2026 16:01
PR #1635's new head brings the cascaded owner review fixes from #1525, #1526, #1488, #1489, #1639, #1531, #1532 and #1615.

AGENTS.md: #1526 added the core executor lint and #1635 added the native provider script helpers, and #1637 added the serving runtime process-environment guard. The resolution keeps every gate, base first: 17 Fastly response diff, 18 core executor lint, 19 native provider script helpers, 20 production health and startup contract, 21 runtime environment guard.

crates/trusted-server-adapter-axum/src/native_geo.rs: #1532 named the EdgeZero Geo provider variable as EDGEZERO_GEO_PROVIDER_ENV, and #1637 moved kv_selected's environment reads to runtime_env!. The resolution reads both variables through runtime_env!, using #1532's constant, which the macro's allowlist accepts.

docs/guide/native-rc-demo.md: #1637 added that the profile path must be Unicode, and #1532 reworded the EdgeZero settings sentence to say a supplied profile overrides EdgeZero's native Geo settings. The resolution keeps #1637's Unicode sentences and #1532's override wording.

@ChristianPavilonis ChristianPavilonis 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.

Re-review of 8eb716cb5..146f126bd (two commits).

All five items from my last review are addressed. The Geo regression test now fails on the old code, Core test-utils is out of the production gate, the libc fixture uses c_char, and the docs are updated. Approving; one optional duplication note inline.

#[cfg(all(target_os = "linux", feature = "geo-kv"))]
#[test]
fn geo_kv_store_declaration_distinguishes_absent_and_non_unicode_profiles() {
let directory = tempfile::tempdir().expect("should create Geo profile directory");

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.

R1 · Optional: this repeats the non-Unicode off profile fixture from the test above (lines 115-120) line for line. A small readable_non_unicode_off_profile(dir) helper would keep them in step. Fine to leave if you'd rather.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Addressed in d61d61fb9fcf1f9cbc4f3b184f5eca0aef78a802 with a private Linux-only readable_non_unicode_off_profile(&Path) helper used by both existing tests. The old var_os/read/parse positive and absent-profile KV positive stay in their callers; production code and test assertions are unchanged. Actual Linux ARM64 execution passes all eight Geo tests with geo-kv, all 41 ARM compiler fixtures and native Clippy; host fixtures and the full local gates also pass. New-head hosted CI is tracked separately; closure waits for those checks.

PR #1635'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. The merge is clean. Cargo.lock changes only the 10 EdgeZero package sources, now at 8a73c097; the codegen crate's nested Cargo.lock is unchanged.
@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 146f126bd to 8612fcdc1:

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

aram356 and others added 3 commits December 1, 2026 20:11
PR #1635'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.
Build the raw-byte pathname and valid off profile in one Linux-only test
helper. Keep the old-loader positive assertion and absent-profile KV
positive control in their existing callers so fixture construction cannot
drift between the two regression tests.

Only test setup changes; production selection and environment-name policy
remain unchanged.
PR #1635's new head brings #1635's complete startup evidence in native fixtures, 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, #1639's pull reserve boundary check and wording, #1613's conformance doc alignment, #1616's certificate policy and pull-sync fixture corrections and #1617's preserved startup diagnostics and hardened runtime checks. The merge is clean. 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 added a commit that referenced this pull request Dec 3, 2026
PR #1540's new head brings the identity chain's commits since #1667 last merged it at afc4f5d, including the EdgeZero repins up to rc/identity ef5cbf30, which renames Fastly backends to ez_b31v2_* and moves the yanked pin-project-lite, chacha20 and spin, main's #1501, #1525's plain HTTP opt-in for auction providers, and this round's owner commits on #1535, #1613, #1616, #1617, #1625, #1627, #1635, #1637 and #1639.

Cargo.toml and crates/trusted-server-adapter-axum/Cargo.toml: #1667 pinned EdgeZero at d063a8e7, and the chain now pins rc/identity ef5cbf30, which keeps the client certificate API #1667 uses. The files merge cleanly to the chain's pin, so #1667 no longer carries its own.

crates/trusted-server-core/src/auction/mod.rs: #1501 from main, which the chain carries, moved the APS provider test literal into the shared aps_provider_map helper, and #1667 added `mtls: false` to that literal. The resolution calls the helper and adds `mtls: false` to it.

docs/guide/auction-orchestration.md: #1525 reworded the endpoint and allow_insecure_http rows of the provider field table, and #1667 added the mtls row below them. The resolution keeps #1525's rows followed by #1667's mtls row.

docs/guide/configuration.md: #1525 added the allow_insecure_http row to the provider field table and the plain HTTP warning after the loopback exception, and #1667 added the mtls row and the note that an mtls provider needs an https endpoint. The resolution keeps #1525's table with #1667's mtls row last, and #1525's warning followed by #1667's note.

docs/guide/error-reference.md: #1616's owner commit replaced "TLS is always verified" with the adapter and platform TLS policy wording, and #1667 added the outbound client identity bullet after it. The resolution keeps #1616's wording followed by #1667's bullet.

crates/trusted-server-core/src/auction/plan.rs (semantic fix): #1525's 23e4bdd removed the local is_false helper from plan.rs and serializes allow_insecure_http through crate::settings::is_false, and #1667's mtls field still named the local helper. The mtls field now uses crate::settings::is_false too.

crates/trusted-server-adapter-axum/tests/native_ec.rs (semantic fix): #1536's 9d41f0f added an APS ProviderConfig literal to the Axum native EC tests, and #1667 added the required mtls field to ProviderConfig. The literal now sets `mtls: false`.

Cargo.lock matches #1540's new head: next to #1667's, it changes only the EdgeZero package sources (d063a8e7 to 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 d61d61fb9 to 7f3a35180:

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

PR #1635'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 7f3a35180 to c8db9f1af:

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 8dbb6a2bf, on top of c8db9f1af.

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 #1635's new head (78b151785), 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.

CI guard: runtime code reads only TRUSTED_SERVER__ environment names

4 participants