Skip to content

Pin Wrangler for the Cloudflare smoke and CI - #1625

Open
prk-Jr wants to merge 6 commits into
spec/edgezero-pr275-migrationfrom
fix/1610-wrangler-pin
Open

prk-Jr wants to merge 6 commits into
spec/edgezero-pr275-migrationfrom
fix/1610-wrangler-pin

Conversation

@prk-Jr

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

Copy link
Copy Markdown
Collaborator

Summary

  • Restore the local Cloudflare smoke by pinning Wrangler 4.83.0 in the shared tool manifest.
  • Make all three Cloudflare CI installations read that pin, including browser jobs that change directories.
  • Record the passing Cloudflare smoke in the cutover specification and remove the completed pin follow-up while preserving historical results.

Stacked on #1506 (spec/edgezero-pr275-migration) because its cutover specification is absent from main. Retarget after #1506 merges.

Changes

File Change
.tool-versions Declare Wrangler 4.83.0 as the common runtime version.
.github/workflows/integration-tests.yml Read and require the manifest pin in both Wrangler installations using the absolute workspace path.
.github/workflows/worker-auction-deadlines.yml Read and require the same pin for Cloudflare deadline fixtures.
docs/superpowers/specs/2026-10-17-edgezero-pr275-hard-cutover-design.md Replace the current missing-pin failure with verified smoke results and remove the completed follow-up.
docs/superpowers/specs/2026-11-18-1610-wrangler-pin-design.md Record scope, acceptance criteria, and two design review rounds.
docs/superpowers/plans/2026-11-18-1610-wrangler-pin.md Record implementation, validation, and delivery steps.
docs/guide/cloudflare.md Document tool-manager selection in the isolated workspace.
scripts/smoke-cloudflare.sh Anchor tool selection to the checkout, preserve pins in the temporary workspace, and diagnose version-probe failures.
scripts/smoke-cloudflare.test.mjs Cover missing/mismatched pins, failed executables, directory changes and all three CI installer blocks.

Closes

Closes #1610

Spec

Not a feature; tooling and CI correction. Design and implementation plan.

Test plan

The checked items and runtime observations below are preserved historical author reports, at the revisions named below or an unrecorded revision. Their underlying local/deployed receipts were unavailable to this audit; they do not certify current head e09478891. Hosted CI is separate.

  • Reproduce the missing-pin failure on the base.
  • Run the Cloudflare smoke twice, including the final committed head, with a fresh CLI and Worker: all four missing-binding controls return HTTP 500 with expected diagnostics; the configured publisher request returns HTTP 200, the origin sentinel, and a rewritten asset URL.
  • Verify all three workflow blocks select 4.83.0 and fail when the pin is absent; check shell and YAML syntax.
  • Rust tests: Fastly, reusable Fastly sandbox, Axum, Cloudflare, Spin, parity, native build-digest, and CLI.
  • All eight target-matched Clippy aliases and native build-digest Clippy.
  • cargo fmt --all -- --check.
  • JS tests: 80 files and 3,299 tests pass with default workers and with one worker; JS build and format pass.
  • Docs and Markdown format, including the final three changed documentation files.
  • Fastly, Axum, and Cloudflare builds; Fastly release build.
  • Actual Fastly deadline fixtures and Cloudflare/Spin deadline fixture builds, Clippy, and runtime checks.
  • Domain and WASM-clock lints; documentation-proposal, CI Node pin, release-producer, and Fastly response script checks.
  • Independent reviews resolved all findings; local and GitHub signature verification pass for the published head.

All 40 reconciled Rust, runtime, lint, and script gates exit 0. The JS, formatting, workflow probes, and Cloudflare smoke checks above also pass. Runtime validation is local; no deployed Cloudflare access is needed.

Checklist

  • Feature spec requirement does not apply; design and two review rounds are linked above.
  • Changes follow AGENTS.md conventions.
  • No production Rust code is changed.
  • No application logging is changed.
  • Existing smoke and workflow checks verify changed behavior.
  • No secrets or credentials committed.

@prk-Jr prk-Jr self-assigned this Nov 18, 2026
@prk-Jr
prk-Jr marked this pull request as ready for review November 18, 2026 12:13
@prk-Jr prk-Jr linked an issue Nov 18, 2026 that may be closed by this pull request
3 tasks
Takes #1506's new head feaf3df, which brings #1506's repin of
EdgeZero to rc/identity at 9d02d7b3. The merge is clean, and this PR's tree
changes only by that repin.
@aram356 aram356 mentioned this pull request Nov 19, 2026
20 of 21 tasks
@prk-Jr
prk-Jr added this pull request to stack #1633 November 19, 2026 06:59
aram356 added a commit that referenced this pull request Nov 20, 2026
#1625 (e094788) pins Wrangler in .tool-versions so the Cloudflare smoke
test and CI run (#1610). The merge is clean.
Takes #1506's new head c197404, which repins EdgeZero to rc/identity at
d063a8e7 and merges main's Fastly SDK 0.13.3 upgrade (#1671): fastly 0.13.3,
url 2.5.9 and Viceroy 0.22.0. The merge is clean.
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.
aram356 added a commit that referenced this pull request Nov 25, 2026
#1625 (006b45e) merges #1506's new head, which carries the Fastly SDK
0.13.3 upgrade. #1627 now merges #1625 too, so its content is already here
through #1622's chain. The merge is clean.
@aram356

aram356 commented Nov 25, 2026

Copy link
Copy Markdown
Collaborator

For the identity integration branch (#1608), I pushed 006b45eea, a merge of #1506's new head c1974041f, which repins EdgeZero to rc/identity at d063a8e7 and merges main's Fastly SDK upgrade (#1671): fastly 0.13.3, url 2.5.9 and Viceroy 0.22.0. The merge had no conflicts. #1627 now merges this PR as well (a09391cea) and holds the docs/guide/cloudflare.md resolution between the two, so rc/identity no longer combines them.

Takes #1506's new head 42e0c46, which repins EdgeZero to rc/identity at
459bd27d: 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 b7e476491, a merge of #1506's new head 42e0c46c7, which repins EdgeZero to rc/identity at 459bd27d: EdgeZero #275 at 0e2a58ae, the EdgeZero stack's test fixes and EdgeZero #536's bounded record update, RecordHandle::update. The merge had no conflicts. #1627 merges this head too (9fbac463c), so rc/identity already carries it and takes no separate merge of this PR.

@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 wrangler 4.83.0 to .tool-versions. All three CI Wrangler installs now take their version from that one pin. Each install reads the pin with awk from the absolute $GITHUB_WORKSPACE path and fails if the entry is empty. The integration job used to install the latest Wrangler with no version, and now uses the pin too.

smoke-cloudflare.sh now runs from the repo root. It also copies .tool-versions into its temporary workspace, so tool-manager shims keep using the pinned Node and Wrangler versions.

Other workflows only read the nodejs, rust, spin, viceroy and terraform entries from .tool-versions, so the new line doesn't affect them. The docs updates match the code. I found no blocking or substantive issues.

Cross-cutting / body-level findings

  • 👍 Clear error when wrangler --version fails — smoke-cloudflare.sh now reports a clear error when wrangler --version fails. With pipefail and ||, that failure path works correctly.
  • 👍 Thorough test coverage for the pin — The new node test covers four failure cases: missing pin, wrong version, malformed version output, and a wrangler --version that fails. It also covers running the smoke script from another directory, and it runs each CI install block on its own against a test pin. It runs in the Cloudflare matrix leg of the deadline workflow.

CI Status

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

Takes #1506's new head 8edc50e, which repins EdgeZero to rc/identity at
1619078a, 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 92e9b167d.

Takes #1506's new head 8edc50e, which repins EdgeZero to rc/identity at 1619078a, 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.

The Wrangler pin is shared by the local smoke and all three CI installs. No blocking findings. The six focused tests passed, and the full Cloudflare smoke passed on 92e9b167d with a fresh CLI and Worker, using Wrangler 4.83.0 through mise shims. All four missing-binding controls returned the expected HTTP 500 diagnostics, and the publisher case returned HTTP 200 with the origin sentinel and rewritten asset URL.

)
const blocks =
source.match(
/ *wrangler_version=\$\(awk[^\n]+\n *test -n "\$wrangler_version"\n *npm install --global "wrangler@\$wrangler_version"/g

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.

Non-blocking: This regex makes the test depend on the installer's shell spelling. I renamed wrangler_version consistently in one step in a scratch copy. Both versions behaved identically with two valid pins and a missing pin, but the test failed with 2 !== 3. A small shared installer called by absolute workspace path would remove the three copies and let the test exercise the installer directly from another directory.

]) {
test(name, (t) => {
const result = fixture(t, version, pin)()
assert.equal(result.status, 1)

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.

Nit: If the subprocess exits with an unexpected status, this assertion hides stderr. I reproduced that with a forced exit and confirmed this reports the diagnostic without changing the passing cases.

Suggested change
assert.equal(result.status, 1)
assert.equal(result.status, 1, result.stderr)

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.

Pin Wrangler in .tool-versions so smoke-cloudflare.sh runs

4 participants