You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Compile-time logging_for for applications with a hand-written Hooks impl #504
An application that implements Hooks by hand has no compile-time way to return the manifest's logging configuration from Hooks::logging_for. Only app! bakes it.
Behavior today
app! generates logging_for from [adapters.*.logging] at compile time (crates/edgezero-macros/src/app.rs, build_logging_tokens).
app! also generates the routes from manifest triggers. An application whose routes are not manifest triggers therefore writes its own Hooks impl, as Trusted Server does on all four adapters, and loses the baked table. Its only options are to parse edgezero.toml at runtime with ManifestLoader::load_from_str, or to copy the values into code.
On Fastly, the managed setup calls logging_for before every callback. A non-reusable instance serves one request, so a runtime parse happens on every request, health checks included.
Acceptance criteria
A hand-written Hooks impl can return the manifest's logging configuration for an adapter with no runtime parse and no copied values.
The result equals what app! generates for the same manifest.
The expression reuses app!'s compiler-side manifest loader, validation and logging emitter. It does not generate routes or parse configuration at runtime. Adapter lookup is evaluated once; defaults, case folding, precedence, endpoints and validation remain shared. All four adapter guides document this path. Adapter logger ownership and runtime overrides are unchanged.
Executed local evidence on the published source tree:
$ cargo test --offline --locked -p edgezero-macros --test logging_config
test result: ok. 4 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 24.67s
$ bash scripts/run_tests.sh
All tests completed successfully.
Both commands exited 0. The focused compiler regression was rerun on the exact pushed head; broad validation ran on the same source tree before committing. The compiler suite includes three positive consumers, nine compile-fail fixtures, differential parity with app!/ManifestLoader, caller hygiene, and a valid-to-valid-to-invalid manifest-only rebuild. Disabling only dependency tracking reproduced stale values; restoring it passed the same regression. The executable also runs without the source manifest.
Design and plan/evidence, including unsuccessful attempts. All primary Rust gates, strict rustdoc, adapter/fixture checks and docs checks passed locally. One earlier, unrelated-in-scope harness cancellation assertion has an unconfirmed cause; passing reruns are not claimed as a repair. Fresh CI and independent review remain pending. This issue stays open until the implementation merges; no hosted qualification is claimed.
Activity
aram356 commentedon Nov 16, 2026
CREATOR: fixed in
b65e7144, pushed to existing PR #275 as requested.Hand-written hooks can now implement:
The expression reuses
app!'s compiler-side manifest loader, validation and logging emitter. It does not generate routes or parse configuration at runtime. Adapter lookup is evaluated once; defaults, case folding, precedence, endpoints and validation remain shared. All four adapter guides document this path. Adapter logger ownership and runtime overrides are unchanged.Executed local evidence on the published source tree:
Both commands exited 0. The focused compiler regression was rerun on the exact pushed head; broad validation ran on the same source tree before committing. The compiler suite includes three positive consumers, nine compile-fail fixtures, differential parity with
app!/ManifestLoader, caller hygiene, and a valid-to-valid-to-invalid manifest-only rebuild. Disabling only dependency tracking reproduced stale values; restoring it passed the same regression. The executable also runs without the source manifest.Design and plan/evidence, including unsuccessful attempts. All primary Rust gates, strict rustdoc, adapter/fixture checks and docs checks passed locally. One earlier, unrelated-in-scope harness cancellation assertion has an unconfirmed cause; passing reruns are not claimed as a repair. Fresh CI and independent review remain pending. This issue stays open until the implementation merges; no hosted qualification is claimed.
Repin EdgeZero to rc/identity at 3d92ee38
Resolve the Fastly logging table at compile time