Skip to content

Add pluggable introspection routes (manifest / config / routes)#300

Draft
aram356 wants to merge 18 commits into
mainfrom
worktree-feature+introspection-routes
Draft

Add pluggable introspection routes (manifest / config / routes)#300
aram356 wants to merge 18 commits into
mainfrom
worktree-feature+introspection-routes

Conversation

@aram356

@aram356 aram356 commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds three reusable, framework-supplied introspection handlers bound via [[triggers.http]]:

Handler Emits
edgezero_core::introspection::manifest Full manifest as JSON (baked at compile time; secret values redacted)
edgezero_core::introspection::config Default config-store envelope .data (secret-safe: secret fields stay as unresolved key-name references)
edgezero_core::introspection::routes [{method, path}] from the live route index

Default-mounted at /_<app-name>/{manifest,config,routes} in app-demo and every generated app (plain, editable trigger rows). The app! macro serializes the manifest and injects it via RouterBuilder::with_manifest_json; RouterInner::dispatch injects IntrospectionData into each request's extensions (shared chokepoint — no global state, no per-adapter changes). Removes the legacy enable_route_listing / /__edgezero/routes machinery.

Also: the app! macro now emits include_bytes!(<manifest>) so Cargo rebuilds when edgezero.toml changes, and edgezero-macros' proc-macro2/quote/syn now use workspace deps.

Spec: docs/superpowers/specs/2026-07-01-introspection-routes-design.md
Plan: docs/superpowers/plans/2026-07-02-introspection-routes.md

Status

  • Design spec
  • Implementation (Tasks 1–7)
  • Tests (core: manifest/router/introspection; app-demo: introspection_routes_are_wired)
  • CI gates green (fmt, clippy -D warnings, 1087 workspace tests, 27 app-demo, wasm32-wasip2, feature checks, generated-project build, nested-AppConfig audit)

Notes

  • These endpoints are unauthenticated wherever bound (auth is deferred by design); /manifest emits environment.variables[].value, so do not store secrets in [environment.variables] (only [environment.secrets] values are redacted). Documented in docs/guide/routing.md.

Closes #299

aram356 added 16 commits July 1, 2026 19:50
…nfig/app-demo test coverage, workspace commands
…dy-mode rename, Internal->500, scaffold CI checks
Match the edgezero-cli precedent and the workspace-dependency
convention. Adds quote to [workspace.dependencies].
…veat

- emit `include_bytes!` const in app! output so edits to edgezero.toml
  trigger a Cargo rebuild without requiring a .rs change
- strengthen middleware_sees_introspection_data to assert manifest_json
  presence and non-empty route list, mirroring dispatch test
- add content-type assertion to routes_lists_registered_routes
- add security caveat to routing.md Introspection Routes section noting
  endpoints are unauthenticated and environment.variables values are emitted
@aram356 aram356 marked this pull request as ready for review July 2, 2026 05:46
@aram356 aram356 self-assigned this Jul 2, 2026
@aram356 aram356 marked this pull request as draft July 2, 2026 07:43
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.

Add pluggable introspection routes (manifest / config / routes)

1 participant