Skip to content

Harden edgezero #269 runtime config-store load (HTTP layer)#783

Draft
prk-Jr wants to merge 16 commits into
feature/ts-cli-nextfrom
feature/edgezero-269-http
Draft

Harden edgezero #269 runtime config-store load (HTTP layer)#783
prk-Jr wants to merge 16 commits into
feature/ts-cli-nextfrom
feature/edgezero-269-http

Conversation

@prk-Jr

@prk-Jr prk-Jr commented Jun 18, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • HTTP-layer (runtime) half of edgezero stackpop/edgezero#269. Stacked on feature/ts-cli-next (which carries the As a buyer, I want the first bid request to include IAB cohorts, signals, and synthetic ID #269 repin, Body fixes, the Fastly adapter migration, and config-store-backed Settings load). Draft — base is unmerged; retarget to main once ts-cli-next lands.
  • Core change (spec "option Y"): a config-store read failure (store unseeded, transient backend, or a listed key missing) now maps to a new TrustedServerError::ConfigStoreUnavailable503, while a reconstruct/verify failure (settings_from_config_entries: hash mismatch / unparseable) stays 500. One new error variant; no platform-layer change.
  • Security-aware: the actionable hint (run \ts config push``) goes to server logs (error chain); the public 503 body stays generic by design.
  • Includes the design spec + implementation plan, and the upstream finding/plan docs for context.

Base note: diff is against feature/ts-cli-next, so it shows only this branch's work. Against main it would include all of ts-cli-next.

Changes

File Change
crates/trusted-server-core/src/error.rs New ConfigStoreUnavailable { store_name, message } variant → 503 (+ exhaustiveness guard, unit test)
crates/trusted-server-core/src/settings_data.rs read_config_entry read failures → ConfigStoreUnavailable; tests (unseeded→503, malformed-hash→500, missing-listed-key→503, hint-in-chain)
crates/trusted-server-adapter-fastly/src/error.rs Test: ConfigStoreUnavailable renders 503 to client via to_error_response
crates/integration-tests/Cargo.lock Reconciled to edgezero #269
`docs/superpowers/specs plans/*`

Closes

n/a — issue linking skipped by request.

Test plan

  • cargo test --workspace (core 1376 / adapter 39, 0 fail)
  • cargo clippy --workspace --all-targets --all-features -- -D warnings
  • cargo fmt --all -- --check
  • cargo build -p trusted-server-adapter-fastly --release --target wasm32-wasip1
  • integration-tests workspace builds; docs format clean

Checklist

  • Changes follow CLAUDE.md conventions (error-stack, log, colocated tests)
  • No unwrap() in production code
  • No secrets committed
  • New code has tests

@prk-Jr prk-Jr self-assigned this Jun 18, 2026
prk-Jr added 3 commits June 18, 2026 21:12
The runtime reconstructs Settings from the app_config config store at request
time, but the Viceroy integration fixture never declared that store, so every
settings-dependent route returned 503 (EC batch sync) or skipped injection
(HTML), and the browser harness never became ready.

Seed app_config from a single source — a new integration trusted-server.toml
fixture (example config plus the origin, proxy-secret, EC passphrase, EC
partner, and certificate-check overrides the build previously passed as env
vars). A shared render_seeded_viceroy_config helper builds the config-store
payload via build_config_payload, so the Rust test harness and the new
seed-viceroy-config binary used by the browser runner stay in lockstep.

- fastly.rs renders a seeded Viceroy config per spawn into a temp file removed on drop
- browser runner script and CI job seed via the binary and point VICEROY_CONFIG_PATH at it
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.

1 participant