Skip to content

Implement each adapter’s local provisioning writer #293

Description

@aram356

Description

Section 5 of #288 covers Cloudflare, Fastly, Spin and Axum local manifest/env writers. PR #287 contains the proposed implementation but remains unmerged. Dependencies: #289, #291, #292.

Steps to reproduce

Inspection steps (no tests executed):

  1. Inspect main provision orchestration.
  2. Compare this section’s tasks in local-provision plan with the open branch.
  3. Confirm the local-provision contract is still absent from main rather than treating checked-off branch tasks as delivery.

Expected behavior

The section’s contract is present on main and composes with the other local-provision sections without cloud operations during local mode.

Impact

Each adapter needs local state in its native shape while preserving operator content and avoiding remote resource creation.

Proposed fix

Review and merge this section through PR #287, preserving the tasks below and subsequent umbrella amendments. Reconcile with current main rather than reintroducing removed Fastly runtime-env descriptors.

Dependencies: #289, #291, #292.

Done when

Cloudflare

  • Task 17: Cloudflare primitive synthesiser for wrangler.toml (toml_edit, not raw format!) + synthesise_baseline_manifest override
  • Task 18: Cloudflare local-mode provision — [[kv_namespaces]] bindings with deployed precedence (logical vs platform split); resolve wrangler_path via adapter_manifest_path
  • Task 19: Cloudflare .dev.vars emission (key-normalised line dedup)
  • Task 20: Cloudflare provision_typed — .dev.vars secret placeholders (next to wrangler.toml, NOT manifest_root)

Fastly

  • Task 21: Fastly primitive synthesiser for fastly.toml (toml_edit)
  • Task 22: Fastly local-mode provision — [local_server.*] and current logical-alias store bindings (the former edgezero_runtime_env descriptor architecture was removed by Bind Fastly stores per deployment environment #381); contents MUST be a sub-table (NOT contents = ""); upsert deployed service_id even on existing manifests
  • Task 23: Fastly provision_typed — [[local_server.secret_stores.<store_id>]] entries

Spin

  • Task 24: Spin primitive synthesiser — spin.toml (component-id resolution) + runtime-config.toml (toml_edit; ArrayOfTables for [[trigger.http]])
  • Task 25: Spin local-mode provision — bindings + runtime-config.toml blocks + .env __NAME lines (NO SPIN_VARIABLE_* here — typed-only)
  • Task 26: Spin provision_typed — lowercased [variables] + SPIN_VARIABLE_* placeholders (canonical spin_var = key_value.to_ascii_lowercase())

Axum

  • Task 27: Axum local-mode provision — ensure .edgezero/ + write .edgezero/.env; does NOT touch axum.toml
  • Task 28: Axum provision_typed — append secret placeholders to .edgezero/.env

Re-enable

  • Task 28b: Re-enable Task 13's worktree-clean dry-run test
  • Keep local writers and typed placeholders aligned with current mainline runtime naming and Fastly logical aliases; do not restore runtime-env descriptor stores.

Required repository verification: cargo fmt --all -- --check; cargo clippy --workspace --all-targets --all-features -- -D warnings; cargo test --workspace --all-targets; cargo check --workspace --all-targets --features "fastly cloudflare spin"; cargo check -p edgezero-adapter-spin --target wasm32-wasip2 --features spin. These are acceptance requirements, not tests executed during this audit.

Related

#288; local-provision plan; PR #287 is the fully covering open PR. #289, #291, #292

July amendment: all five generated manifests, including axum.toml, are gitignored.

Activity

  1. self-assigned this
    on Jun 30, 2026
  2. changed the title [-]Section 5 — Per-adapter local writers (Tasks 17–28, 28b)[/-] [+]Implement each adapter’s local provisioning writer[/+] on Nov 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions