Conversation
A page-by-page audit of docs/guide against the current crates found names that no longer exist, behaviour descriptions the code contradicts, and public surface with no coverage. This commit fixes what the audit turned up. Phantom names: dispatch_with_config / dispatch_with_config_handle (fastly, cloudflare, architecture), AxumProxyClient::default(), EDGEZERO_SECRET_ prefix, wrangler secret put --binding, diff.rs entry point, dispatch_with_*_handle, crate-root imports for types that live in proxy:: / context:: / dev_server::. Behaviour: response streaming is preserved only on Cloudflare (Fastly, Spin and Axum buffer); duplicate routes panic at build rather than first-registered-wins; Axum honours the axum.toml port through the CLI and reads EDGEZERO__LOGGING__LEVEL, not edgezero.toml; Axum KV files are .edgezero/kv-<slug>-<hash>.redb; healthcheck emits status-code only when an HTTP status arrived and degrades to service-level without a token; EDGEZERO_MANIFEST and the missing-manifest fallback apply to build/deploy/serve only; Cloudflare local push selects by --binding; deploy actions use cache/restore@v6 + cache/save@v6 and no checkout; the cache key includes the workspace path and build-args hash. Coverage: Fastly custom entry points (runtime_env_config, dispatch_with_registries, RUNTIME_ENV_STORE_NAME and the two footguns); FastlyService / CloudflareService builders; store extractors (Kv, Config, Secrets, AppConfig<C>); FnMiddleware and middleware_arc; app! argument list; adapter metadata component/host/port and auth-* command overrides; EDGEZERO__LOGGING__* rows; config push --staging as the supported staging path; Spin everywhere it was missing (landing page, platform table, architecture, roadmap, overview tests and capability table, and Logging / Proxy / Context / Testing sections on its page); Axum KV and Secret Store sections; Cloudflare Secret Store and the kv/config merged-id collision; scaffold tree and generated CLI surface; KV page added to the sidebar.
The dev server derives .edgezero/kv-<slug>-<hash>.redb for every declared id (kv_store_path in dev_server.rs); the hard-coded .edgezero/kv.redb default the module doc described no longer exists.
ChristianPavilonis
left a comment
There was a problem hiding this comment.
Summary
Reviewed the locked PR revision against its base. The documentation alignment is broadly correct, with five actionable documentation corrections noted inline.
Five inline comments from the PR 373 review, each checked against source before editing. "Cloudflare's documented manual dispatch call does not compile": the builder's dispatch takes (req, env, ctx) and is async. Documented the real call with a complete entrypoint example. "Duplicate routes are not always caught at startup": only Axum builds the router once at startup; Fastly, Cloudflare, and Spin call build_app() per request, so the panic lands on the first request after a successful deploy. Said so and pointed at the Axum dev server as the pre-deploy check. "These Fastly logging controls are not applied on the runtime-env path": FastlyLogging::from(&EnvConfig) derives logger use from ENDPOINT alone and hard-codes echo_stdout. Marked USE_FASTLY_LOGGER and ECHO_STDOUT as resolved but not applied, and noted that ENDPOINT is what enables the logger. "Buffering adapters do not provide the claimed memory benefit": Axum collects into an unbounded buffer and Spin caps at 16 MiB. Scoped the memory claim to Cloudflare and described streaming on the buffering adapters as composability only. "EDGEZERO_MANIFEST also applies to auth": run_auth calls load_manifest_optional and has no --manifest flag. Added auth to the env-var scope and the missing-manifest fallback.
prk-Jr
left a comment
There was a problem hiding this comment.
PR Review
Summary
A genuinely high-quality audit — the corrections I spot-checked held up against source almost without exception, and at least one of them (the Fastly streaming claim) removes a description that was never true of this codebase. Findings below are mostly the audit's own blind spot: places where a correction landed in one file but the identical stale text, or a directly adjacent claim, was left behind. One finding is a hard blocker because it would not compile.
😃 Praise
- The streaming rewrite fixes a fabricated claim.
stream_to_clientappears nowhere incrates/— the old text described an API that does not exist.fastly/src/response.rs:18-25really does drain the wholeBody::Streamviaexecutor::block_on(stream.next())into afastly::Bodybefore returning. Correctly scoped, and correctly left alone for Cloudflare, which genuinely streams viaCfResponse::from_stream(cloudflare/src/response.rs:30). - The Axum bind-precedence rewrite is exact and complete, covering both paths: CLI (
axum/src/cli.rs:473-540, env →edgezero.toml→axum.toml→addr::DEFAULT_*) and direct-binary (dev_server.rs:517-519, which passesNone, Noneso only env or default apply). The old "binds to 127.0.0.1:8787 regardless of axum.toml" was stale. - The Store Capabilities table is correct in every cell across all four adapters, including the
gc_config_entries/ staging-lifecycle exclusivity claim. - The cache-key component list matches
resolve-project.sh:224term for term, workspace path and build-args hash included.
Findings
Blocking
-
🔧 Cloudflare's
dispatch_with_registriesispub(crate)— inline ondocs/guide/adapters/cloudflare.md:85. Would fail to compile if a reader follows the Fastly page's import pattern. -
🔧 Fastly custom entry point omits the
owns_loggingguard — inline ondocs/guide/adapters/fastly.md:145. Breaks the "full parity" promise the section is built on. -
🔧
cargo install worker-builderinstalls nothing — the crate isworker-build.docs/guide/adapters/cloudflare.md:8(unchanged by this PR) still says:- worker-builder: `cargo install worker-builder`This PR changed line 34 to
command = "worker-build --release", matchingcloudflare/src/templates/wrangler.toml.hbs:6— correct, and now sitting 26 lines below a prerequisite command that fails.worker-builderappears nowhere else in the repo. Cheap to fix while in the file. -
🔧 The same stale wrangler command survives in a file this PR edited.
docs/guide/manifest-store-migration.md:182still readsPopulate the namespace via `wrangler kv:key put`. This PR fixed that exact string incloudflare.md:201(wrangler kv key put), and the repo's own CLI uses the space form (cloudflare/src/cli.rs:134). The colon form is the deprecated pre-3.60 spelling. Same one-word fix.
Non-blocking
-
♻️
proxying.mdgainedSpinProxyClientbut the two bullets above it still say "Fastly and Cloudflare". The PR updated line 59; lines 56-57 were left:- L56 "Fastly and Cloudflare preserve streaming bodies; Axum buffers outbound bodies before sending." Spin buffers too, and harder than Axum —
spin/src/proxy.rs:29callscollect_body_bytes, which errors above 16 MiB (spin/src/response.rs:19,38-42). A reader who has just been introduced to Spin's proxy client on line 59 is left assuming it streams. - L57 "Fastly and Cloudflare automatically decode gzip/br responses for you." Spin does this as well —
spin/src/proxy.rs:52(decompress_body), strippingcontent-encoding/content-lengthat :66-70.
(The Fastly/Cloudflare halves of L56 are correct:
fastly/src/proxy.rs:183-193writes chunks to aStreamingBody,cloudflare/src/proxy.rs:70-81usesWorkerBody::from_stream. Proxy streaming and response streaming differ per adapter, which is worth not flattening.) - L56 "Fastly and Cloudflare preserve streaming bodies; Axum buffers outbound bodies before sending." Spin buffers too, and harder than Axum —
-
♻️
.edgezero/kv.redbstill stands in core.crates/edgezero-core/src/key_value_store.rs:915, in theput_bytes_with_ttldoc comment: "Keys never accessed after expiration remain in the database until deleted, so.edgezero/kv.redbgrows without bound on long-running dev servers." This is the identical stale path the PR corrects in the Axum sibling module doc — same fix, one file over. -
🤔
[local_server.*]framing onfastly.md:41— inline. -
⛏
axum.md:272"(geolocation)" names a gap that does not exist — inline. -
⛏
key_value_store.rs:9"each declared KV id" — keyed by resolved store name, not id — inline. -
⛏ Redundant
Ok(…?)onfastly.md:150— inline.
Verification notes
Claims were checked against source rather than read for plausibility. Verified correct, among others: the FastlyService / CloudflareService builder surfaces (every method name, arity, and sync-vs-async — Fastly's dispatch is sync and consumes self, Cloudflare's is async and takes (req, env, ctx), and both docs get this right); RUNTIME_ENV_STORE_NAME and the EDGEZERO__SERVICES__<ID>__… → canonical-key translation; the two Fastly footguns, both backed by existing tests; manifest_version = 3 against the template; store extractors Kv / Config / Secrets / AppConfig<C> with .default() / .named(); FnMiddleware and middleware_arc (router.rs:155); the duplicate-route panic string (router.rs:105) and the per-adapter timing claim (build_app() per request in fastly/cloudflare/spin lib.rs, once at startup in dev_server.rs:352); EDGEZERO_MANIFEST scope, confirmed at all four load_manifest_optional call sites — run_build, run_deploy, run_serve, and auth.rs:30; --key/--staging exclusivity (config.rs:1389-1401); the healthcheck output shape, including status-code being emitted only when a status arrived (fastly/src/cli.rs:5468-5476); pushed-key / pushed-store; the app! argument table against the macro's own "expected state or owns_logging" error; the adapter metadata keys against the manifest's component/crate/host/manifest/port rejection message; wrangler kv bulk put … --binding … --local (cloudflare/src/cli.rs:474); cache/restore@v6 + cache/save@v6 with no actions/checkout in the composite actions; and if: always() on the job-summary step (deploy-fastly/action.yml:449).
Two caveats on coverage. The Fastly/Cloudflare and Axum/Spin areas were verified exhaustively, file by file. The CLI/config and core-guide areas were verified claim-by-claim via targeted source lookups rather than full reads, so a stale claim there is likelier to have been missed than in the first two.
CI Status
Run against fa40699 merged with main (593fc92):
cargo fmt --all -- --check: PASScargo clippy --workspace --all-targets --all-features -- -D warnings: PASScargo test --workspace --all-targets: PASS — 1421 passed, 0 failedcd docs && npm run lint && npm run format && npm run build: PASS, no dead links
Two trybuild cases corroborate the configuration.md additions directly: secret_store_ref_optional.rs and secret_with_serde_container_rename_all.rs / nested_parent_rename_all.rs all exist as should-fail-to-compile fixtures, so the rename_all and non-Option store_ref rules the PR documents are genuinely enforced.
Ten findings from the PR 373 review, each re-checked against source. "Cloudflare's dispatch_with_registries is pub(crate)": reworded so the name is not presented as a public entry point, unlike Fastly's. "Fastly custom entry point omits the owns_logging guard": the example now mirrors run_app's `use_fastly_logger && !owns_logging()` check. "cargo install worker-builder installs nothing": the crate is worker-build; prerequisite fixed. "The same stale wrangler command survives": `wrangler kv:key put` in manifest-store-migration.md is now the space form. "proxying.md bullets still say Fastly and Cloudflare": Spin buffers outbound bodies with a 16 MiB cap and also decodes gzip/br; both bullets say so. ".edgezero/kv.redb still stands in core": the put_bytes_with_ttl doc comment now names the per-store kv-<slug>-<hash>.redb file. "[local_server.*] framing": provision writes only [setup.*], keyed by platform name; config push --local writes the config-store stanzas, kv/secret local seeding is hand-edited. "(geolocation) names a gap that does not exist": parenthetical replaced with a claim that holds. "each declared KV id": files are keyed by resolved store name; the module doc says store. "Redundant Ok(...?)": dropped; dispatch_with_registries already returns the right Result.
|
Addressed the second review in 8f55e2e. The six inline threads each have a reply. The four items that were only in the review body are also in that commit:
Docs lint, format, and build pass locally; |
Summary
docs/guideagainst the current crates found names that no longer exist, behaviour the code contradicts, and public surface with no coverage. This PR fixes what the audit turned up, so a reader following the guides lands on APIs and commands that exist and behave as described.Changes
docs/guide/adapters/fastly.mddispatch_with_config*with theFastlyServicebuilder; add Custom entry points (runtime_env_config,dispatch_with_registries,RUNTIME_ENV_STORE_NAME, both footguns); buffering,-C,manifest_version = 3,[setup],proxy::importdocs/guide/adapters/cloudflare.mdCloudflareServicebuilder;worker-buildbuild command;context::/proxy::imports;wrangler kv key put; Secret Store section; kv/config merged-id collisiondocs/guide/adapters/axum.mddev_server::run_app,AxumProxyClient::try_new(), bind-address precedence,EDGEZERO__LOGGING__LEVEL,owns_logging; KV Storage and Secret Store sections; KV no longer listed as unavailabledocs/guide/adapters/spin.mdrequired = truevsdefault = ""docs/guide/adapters/overview.mddocs/guide/streaming.md,proxying.mdSpinProxyClient,AxumProxyClient::try_new()?docs/guide/routing.md,handlers.md,middleware.md,kv.mdKv,Config,Secrets,AppConfig<C>);FnMiddleware/middleware_arc; Axum KV file namingdocs/guide/configuration.mdapp!argument table; adapter metadatacomponent/host/port;auth-*command overrides;rename_allandstore_refrules; compiling secret-resolution exampledocs/guide/blob-app-config-migration.mdconfig push --stagingas the supported staging path; Axum env-var andwrangler secret putforms; canary key in examples;config.rsdiff entry pointdocs/guide/manifest-store-migration.mdEDGEZERO__LOGGING__*rows; dropdispatch_with_*_handledocs/guide/cli-reference.md,cli-walkthrough.md-C/--manifest-pathserve and deploy forms; healthcheck outputs and token behaviour; Cloudflare--binding --local;pushed-key/pushed-store;EDGEZERO_MANIFESTscope;my-app.tomlin the tree; lifecycle commands in the generated CLIdocs/guide/deploy-github-actions.md,docs/specs/edgezero-deploy-github-action.mdcache/restore@v6+cache/save@v6, nocheckout; cache-key components; artifact retention and job summarydocs/guide/architecture.md,what-is-edgezero.md,roadmap.md,docs/index.mddispatch_with_configdropped from the diagramdocs/.vitepress/config.mtscrates/edgezero-adapter-axum/src/key_value_store.rs.edgezero/kv-<slug>-<hash>.redb, not the removed.edgezero/kv.redbdefaultCloses
Closes #372
Closes #361
Closes #77
Test plan
cargo fmt --all -- --checkcd docs && npm run lint && npm run format && npm run builddocs/guidereports only placeholder app names and third-party namescargo test --workspace --all-targets(no Rust code changed; one//!comment)cargo clippy --workspace --all-targets --all-features -- -D warnings(not applicable)cargo check --workspace --all-targets --features "fastly cloudflare spin"(not applicable)examples/app-demoworkspace (not applicable)edgezero serve --adapter axum(not applicable)Checklist
{id}syntax (not:id)edgezero_core(nothttpcrate)KvRegistry/ConfigRegistry/SecretRegistry(not the legacy single-handle setters) — see spec §6.6