Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
98247d6
Document EdgeZero store selector alignment
aram356 Sep 16, 2026
ca5b4d4
Plan EdgeZero store selector alignment
aram356 Sep 16, 2026
fbeb195
Use canonical Fastly secret store selectors
aram356 Sep 16, 2026
f2b1b39
Consume canonical EdgeZero deployment selectors
aram356 Sep 16, 2026
3416b71
Document deploy-time Fastly store selection
aram356 Sep 16, 2026
76bc65d
Merge branch 'main' into fix/align-edgezero-pr-381
aram356 Sep 16, 2026
645d641
Open Fastly stores by logical ID on the EdgeZero PR 381 branch head
aram356 Sep 17, 2026
d3bb29d
Read the Fastly config entry under its logical ID on every target
aram356 Sep 17, 2026
86a3df8
Move the EdgeZero pin to the PR 381 branch head dbb95018
aram356 Sep 18, 2026
2c43347
Move the EdgeZero pin to the PR 381 branch head fba2076a
aram356 Sep 18, 2026
f9d959f
Move the EdgeZero pin to the PR 381 branch head c40ae8d0
aram356 Sep 18, 2026
713b271
Move the EdgeZero pin to the PR 381 branch head 4531aeec
aram356 Sep 18, 2026
3c9d8c0
Move the EdgeZero pin to the PR 381 branch head 7162b7e2
aram356 Sep 18, 2026
9226cfb
Move the EdgeZero pin to the PR 381 branch head 8b506782
aram356 Sep 18, 2026
7d212b7
Move the EdgeZero pin to the PR 381 branch head fd45db1f
aram356 Sep 18, 2026
c7483aa
Move the EdgeZero pin to the PR 381 branch head 6258b6b2
aram356 Sep 18, 2026
9380c12
Move the EdgeZero pin to the PR 381 branch head bb4e0040
aram356 Sep 19, 2026
b1d41c5
Move the EdgeZero pin to the PR 381 branch head cf9a96a0
aram356 Sep 19, 2026
4295039
Move the EdgeZero pin to the PR 381 branch head 119fbf80
aram356 Sep 19, 2026
1e6fc67
Watch only bundle inputs in the trusted-server-js build script
aram356 Sep 19, 2026
ae47b43
Move the EdgeZero pin to the PR 381 branch head 5878eb74
aram356 Sep 19, 2026
6e9c50c
Select the release manifest in the CLI deploy examples
aram356 Sep 20, 2026
d6fecdf
Move the EdgeZero pin to the PR 381 branch head 12c3215c
aram356 Sep 20, 2026
39e045f
Merge branch 'main' into fix/align-edgezero-pr-381
prk-Jr Sep 21, 2026
591b873
Merge branch 'main' into fix/align-edgezero-pr-381
aram356 Sep 24, 2026
a1710a0
Pin EdgeZero to an immutable rev and close the review findings
aram356 Sep 24, 2026
ae434d4
Merge remote-tracking branch 'origin/main' into fix/align-edgezero-pr…
aram356 Oct 2, 2026
86695c3
Address deployment-documentation review and repin EdgeZero
aram356 Oct 2, 2026
870135e
Merge branch 'main' into fix/align-edgezero-pr-381
prk-Jr Oct 5, 2026
c0dc08c
Merge remote-tracking branch 'origin/main' into fix/align-edgezero-pr…
aram356 Oct 8, 2026
fa0353b
Address review feedback and move sandbox bounds off the deprecated store
aram356 Oct 8, 2026
4cd2024
Merge branch 'main' into fix/align-edgezero-pr-381
aram356 Oct 8, 2026
9b92886
Stop the Fastly deploy skill from recommending compute publish
aram356 Oct 8, 2026
cfa87ac
Merge branch 'main' into fix/align-edgezero-pr-381
aram356 Oct 8, 2026
4a1eb28
Pin EdgeZero to v0.0.9 and address the latest review round
aram356 Oct 12, 2026
fde0086
Merge remote-tracking branch 'origin/main' into fix/align-edgezero-pr…
aram356 Oct 12, 2026
3add18d
Name the managed-deploy token and staged-version config prerequisites
aram356 Oct 12, 2026
48d6bfa
Merge remote-tracking branch 'origin/main' into fix/align-edgezero-pr…
aram356 Oct 14, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions .claude/skills/deploying-trusted-server-to-fastly/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,18 @@ accounts and harmless for single-service ones, so prefer it by default.
- **Always `ts config push --dry-run` first.** It prints the exact target
physical store; confirm it is the service-scoped one, not a shared default,
before writing.
- **Always pass `--service-id=<SID>`** to `fastly compute publish`. A checked-in
`fastly.toml` may pin a different (or dead) `service_id`; without the flag,
publish targets that one.
- **Never deploy with `fastly compute publish`.** This app declares Config, KV,
and Secret Stores, and only EdgeZero's managed deploy links each selected
physical store to the service version under its logical ID. Publishing with
the Fastly CLI clones the active version's links, so the new version is
missing the links the runtime opens: app config fails to load and every
publisher route returns 500 while `/health` still answers 200. Deploy with
`ts deploy --adapter fastly --service-id=<SID> --application-release <root>`,
with `EDGEZERO_MANIFEST` set to the release's `edgezero.toml`, or EdgeZero's
`deploy-fastly` action.
- **Always pass `--service-id=<SID>`** to any deploy or publish command. A
checked-in `fastly.toml` may pin a different (or dead) `service_id`; without
the flag, the command targets that one.
- **`ts config push` only upserts entries**; the target store must already exist
(`fastly config-store create`) before pushing.
- **Verify a shared store stayed untouched** by recording its `updated`
Expand Down
5 changes: 3 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,9 @@ cargo build --package trusted-server-adapter-fastly --release --target wasm32-wa
# Run locally with Fastly simulator
fastly compute serve

# Deploy to Fastly
fastly compute publish
# Deploy to Fastly (managed path; links logical stores to the version)
EDGEZERO_MANIFEST="<release-root>/edgezero.toml" \
ts deploy --adapter fastly --service-id <service-id> --application-release "<release-root>"

# Run Axum dev server (native — no Viceroy)
cargo run -p trusted-server-adapter-axum
Expand Down
20 changes: 12 additions & 8 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,12 @@ cssparser = "0.36"
derive_more = { version = "2.0", features = ["display", "error"] }
directories = "5"
ed25519-dalek = { version = "2.2", features = ["rand_core"] }
edgezero-adapter-axum = { git = "https://github.com/stackpop/edgezero", rev = "683202c66948146ec360f490126f1d60f920288b", default-features = false }
edgezero-adapter-cloudflare = { git = "https://github.com/stackpop/edgezero", rev = "683202c66948146ec360f490126f1d60f920288b", default-features = false }
edgezero-adapter-fastly = { git = "https://github.com/stackpop/edgezero", rev = "683202c66948146ec360f490126f1d60f920288b", default-features = false }
edgezero-adapter-spin = { git = "https://github.com/stackpop/edgezero", rev = "683202c66948146ec360f490126f1d60f920288b", default-features = false }
edgezero-cli = { git = "https://github.com/stackpop/edgezero", rev = "683202c66948146ec360f490126f1d60f920288b" }
edgezero-core = { git = "https://github.com/stackpop/edgezero", rev = "683202c66948146ec360f490126f1d60f920288b", default-features = false }
edgezero-adapter-axum = { git = "https://github.com/stackpop/edgezero", tag = "v0.0.9", default-features = false }
edgezero-adapter-cloudflare = { git = "https://github.com/stackpop/edgezero", tag = "v0.0.9", default-features = false }
edgezero-adapter-fastly = { git = "https://github.com/stackpop/edgezero", tag = "v0.0.9", default-features = false }
edgezero-adapter-spin = { git = "https://github.com/stackpop/edgezero", tag = "v0.0.9", default-features = false }
edgezero-cli = { git = "https://github.com/stackpop/edgezero", tag = "v0.0.9" }
edgezero-core = { git = "https://github.com/stackpop/edgezero", tag = "v0.0.9", default-features = false }
env_logger = "0.11"
error-stack = "0.6"
esi = "0.7.2"
Expand Down
50 changes: 15 additions & 35 deletions crates/trusted-server-adapter-fastly/src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,8 @@ use std::sync::Arc;

use crate::rate_limiter::{FastlyRateLimiter, RATE_COUNTER_NAME};
use edgezero_adapter_fastly::context::FastlyRequestContext;
use edgezero_adapter_fastly::runtime_env_config;
use edgezero_core::app::{App, Hooks, StoreMetadata, StoresMetadata};
use edgezero_core::context::RequestContext;
use edgezero_core::env_config::EnvConfig;
use edgezero_core::error::EdgeError;
use edgezero_core::http::{
HandlerFuture, HeaderValue, Method, Request, Response, StatusCode, header,
Expand Down Expand Up @@ -162,11 +160,19 @@ pub(crate) struct RuntimeStoreConfig {
}

impl RuntimeStoreConfig {
pub(crate) fn from_env(env: &EnvConfig) -> Self {
/// Store bindings for the Fastly runtime.
///
/// Store selection is a deploy-time input; no store selector reaches the
/// Fastly runtime. `EdgeZero` links each selected physical store to the
/// service version under its logical ID, so the runtime opens stores by
/// logical ID and reads the config entry under that same ID for every
/// publication target. Staging isolation comes from linking a different
/// physical store, never from a different key.
pub(crate) fn logical() -> Self {
Comment thread
aram356 marked this conversation as resolved.
Resolved
Self {
config_store_name: StoreName::from(env.store_name("config", DEFAULT_CONFIG_STORE_ID)),
config_key: env.store_key("config", DEFAULT_CONFIG_STORE_ID),
secret_store_name: StoreName::from(env.store_name("secrets", DEFAULT_SECRET_STORE_ID)),
config_store_name: StoreName::from(DEFAULT_CONFIG_STORE_ID),
config_key: DEFAULT_CONFIG_STORE_ID.to_owned(),
secret_store_name: StoreName::from(DEFAULT_SECRET_STORE_ID),
}
}
}
Expand Down Expand Up @@ -1334,8 +1340,7 @@ impl Hooks for TrustedServerApp {
}

fn routes() -> RouterService {
let runtime_env = runtime_env_config(Self::stores());
let stores = RuntimeStoreConfig::from_env(&runtime_env);
let stores = RuntimeStoreConfig::logical();
Self::router_with_state(&stores).0
}

Expand Down Expand Up @@ -1376,7 +1381,6 @@ mod tests {
use edgezero_core::app::Hooks as _;
use edgezero_core::body::Body;
use edgezero_core::context::RequestContext;
use edgezero_core::env_config::EnvConfig;
use edgezero_core::http::{
HeaderValue, Method, Request, Response, StatusCode, header, request_builder,
};
Expand Down Expand Up @@ -1447,32 +1451,8 @@ mod tests {
}

#[test]
fn runtime_store_config_maps_logical_store_names_and_config_key() {
let env = EnvConfig::from_vars([
(
"EDGEZERO__STORES__CONFIG__TRUSTED_SERVER_CONFIG__NAME",
"physical_config",
),
(
"EDGEZERO__STORES__CONFIG__TRUSTED_SERVER_CONFIG__KEY",
"active_config",
),
(
"EDGEZERO__STORES__SECRETS__TRUSTED_SERVER_SECRETS__NAME",
"ts_secrets",
),
]);

let stores = RuntimeStoreConfig::from_env(&env);

assert_eq!(stores.config_store_name.as_ref(), "physical_config");
assert_eq!(stores.config_key, "active_config");
assert_eq!(stores.secret_store_name.as_ref(), "ts_secrets");
}

#[test]
fn runtime_store_config_uses_logical_defaults_without_overrides() {
let stores = RuntimeStoreConfig::from_env(&EnvConfig::default());
fn runtime_store_config_opens_logical_store_ids_and_key() {
let stores = RuntimeStoreConfig::logical();

assert_eq!(stores.config_store_name.as_ref(), "trusted_server_config");
assert_eq!(stores.config_key, "trusted_server_config");
Expand Down
5 changes: 1 addition & 4 deletions crates/trusted-server-adapter-fastly/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ use std::sync::Arc;

use edgezero_adapter_fastly::config_store::FastlyConfigStore as EdgeZeroFastlyConfigStore;
use edgezero_adapter_fastly::request::into_core_request;
use edgezero_adapter_fastly::runtime_env_config;
use edgezero_core::app::Hooks as _;
use edgezero_core::body::Body as EdgeBody;
use edgezero_core::config_store::ConfigStoreHandle;
use edgezero_core::error::EdgeError;
Expand Down Expand Up @@ -325,8 +323,7 @@ fn heap_mib() -> String {

/// Handles a request through the `EdgeZero` router path.
fn edgezero_main(mut req: FastlyRequest, sandbox: &mut Sandbox, ordinal: u64, request_id: &str) {
let runtime_env = runtime_env_config(TrustedServerApp::stores());
let runtime_stores = RuntimeStoreConfig::from_env(&runtime_env);
let runtime_stores = RuntimeStoreConfig::logical();

// Short-circuit the sandbox counters probe before app construction. It must
// not build the application: polling it would otherwise increment the very
Expand Down
Loading
Loading