refactor(surface): move application dispatch to owner crates - #1134
ScriptedAlchemy merged 11 commits into
Conversation
The root crate owned the whole callable application surface: HTTP routers, SSE and cancel routes, request-control admission, catalog binding resolution, typed request parsing, and the shared executor dispatch that HTTP, MCP, and the CLI all entered. None of it was composition. `application_surface` and its submodules and suites now live in `tracedecay-daemon-service`, the only crate that already owned daemon invocation dispatch together with the `tracedecay-api` route descriptors and the `tracedecay-application` operation-event and primitive authorities. Route paths, encoding, and the canonical envelopes stay in `tracedecay-api`; the root keeps only the mount, which injects the authenticated executor into the routers assembled there. Whole-module relocation needs the composed catalog below the transport, so `catalog_composition` moves down to `tracedecay-contracts` beside the operation descriptors and contributions it derives from, preserving the descriptor-derived authority instead of splitting it behind an injected handle. Its MCP `tools/list` measurement, which needs the root registry, moves to the root product-surface suite; the rest of its tests travel with the module. No route, DTO, or facade is duplicated, and the dependency graph gains no reversed edge: `tracedecay-cli` now depends on `tracedecay-daemon-service` directly rather than through a root re-export. `serde_path_to_error` leaves the root manifest with its last caller, and `tracedecay-daemon-service` gains the `hotpath` feature its relocated `AxumLayer` mount needs.
…plan-reopened' into sol/application-surface-1073
…plan-reopened' into sol/application-surface-1073
Point the parity, mount-conformance, and transport-boundary references at `tracedecay-daemon-service/src/application_surface.rs`, including the `application_http_context` deadline note, so the documented site matches where the transport adaptation now lives. State that `tracedecay-contracts` owns the use-case/schema validation it performs, and point the default-profile binding ceiling at the root `product_surface_suite/catalog_composition_contract.rs` assertions that bound the client-facing discovery cost. Narrow `application_surface::work::invoke_work_operation` to `pub(crate)`; the module-root wrapper stays the only cross-crate entry point, matching `workflow`, which is public solely because it is reexported. Drop `hotpath/axum-0-8` from the root and CLI manifests. Neither crate constructs an `AxumLayer`; `tracedecay-daemon-service` and `tracedecay-dashboard-api` select it where they layer their routers.
…plan-reopened' into sol/application-surface-1073 # Conflicts: # crates/tracedecay-contracts/src/catalog_composition.rs
…plan-reopened' into sol/application-surface-1073 # Conflicts: # crates/tracedecay-contracts/src/catalog_composition.rs
…plan-reopened' into sol/application-surface-1073
Trigger SDK conformance on the whole `tracedecay-daemon-service` crate
instead of the `application_surface.rs` facade alone. The suite drives a
production daemon over `/projects/{id}/application/...` and the published
`http_application_endpoint`, so dispatch, project-runtime publication, and
every nested surface module can move SDK-visible behavior. The owner-wide
glob also matches how every other crate enters this filter.
Correct the live API and architecture docs that still credited root
composition with assembling the application catalog. `tracedecay-contracts`
owns composition and schema/use-case validation, `tracedecay-daemon-service`
binds the canonical dispatcher, and the composition root injects and mounts
the result.
…plan-reopened' into sol/application-surface-1073
`tracedecay-daemon-service` retains and binds the canonical dispatcher; the composition root injects and mounts it.
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Performance Comparison
|
431afb5
into
codex/tracedecay-total-redesign-plan-reopened
Summary
tracedecay-daemon-servicetracedecay-contractsPart of #1073 and the #707 simplification audit.
Verification