Skip to content

refactor(surface): move application dispatch to owner crates - #1134

Merged
ScriptedAlchemy merged 11 commits into
codex/tracedecay-total-redesign-plan-reopenedfrom
sol/application-surface-1073
Sep 9, 2026
Merged

ScriptedAlchemy merged 11 commits into
codex/tracedecay-total-redesign-plan-reopenedfrom
sol/application-surface-1073

Conversation

@ScriptedAlchemy

Copy link
Copy Markdown
Owner

Summary

  • move the canonical application-surface implementation from root into tracedecay-daemon-service
  • move catalog composition and use-case/schema validation into tracedecay-contracts
  • leave root responsible only for injecting and mounting the authenticated dispatcher/router
  • make SDK conformance follow the whole daemon-service owner and correct live ownership documentation
  • retain the 448-binding budget, 640 KiB discovery ceiling, and canonical dashboard/HTTP parity behavior

Part of #1073 and the #707 simplification audit.

Verification

  • contracts: 440 library + 286 suite tests
  • daemon-service: 207 tests
  • root product-surface suite: 95 tests
  • transport mount conformance: 2 tests
  • affected all-target checks and no-deps clippy with zero warnings
  • actionlint and SDK workflow policy checks
  • formatting, doc-link validation for changed rustdocs, diff hygiene, and commitlint

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.
@changeset-bot

changeset-bot Bot commented Sep 9, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 99a77ab

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 9, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-09T06:38:54.958552Z 3cc1eb1 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Performance Comparison codex/tracedecay-total-redesign-plan-reopenedsol/application-surface-1073

Total Elapsed Time: 3.49s → 3.54s (+1.4%)
CPU Baseline: 70.81µs → 73.27µs (+3.5%)
Benchmark ID: index-bench-timing

timing - Execution duration of functions.

+------------------------------------------+----------------------------+--------------------------------+---------------------------------+----------------------------------+------------------------------+
| Function                                 | Calls                      | Avg                            | P95                             | Total                            | % Total                      |
+------------------------------------------+----------------------------+--------------------------------+---------------------------------+----------------------------------+------------------------------+
| tracedecay-index-bench                   | 1 → 1 (+0.0%)              | 3.49s → 3.54s (+1.4%)          | 3.49s → 3.54s (+1.4%)           | 3.49s → 3.54s (+1.4%)            | 100.00% → 100.00% (+0.0%)    |
+------------------------------------------+----------------------------+--------------------------------+---------------------------------+----------------------------------+------------------------------+
| query.artifact.append_pages              | 13 → 13 (+0.0%)            | 106.40ms → 109.27ms (+2.7%)    | 147.59ms → 159.25ms (+7.9%)     | 1.38s → 1.42s (+2.9%)            | 39.64% → 40.14% (+1.3%)      |
+------------------------------------------+----------------------------+--------------------------------+---------------------------------+----------------------------------+------------------------------+
| code_index.workers.install               | 83 → 83 (+0.0%)            | 11.01ms → 10.58ms (-3.9%)      | 36.47ms → 37.55ms (+3.0%)       | 914.16ms → 878.51ms (-3.9%)      | 26.20% → 24.82% (-5.3%)      |
+------------------------------------------+----------------------------+--------------------------------+---------------------------------+----------------------------------+------------------------------+
| query.artifact.batch.sqlite              | 13 → 13 (+0.0%)            | 64.95ms → 67.13ms (+3.4%)      | 88.28ms → 98.76ms (+11.9%)      | 844.36ms → 872.66ms (+3.4%)      | 24.20% → 24.66% (+1.9%)      |
+------------------------------------------+----------------------------+--------------------------------+---------------------------------+----------------------------------+------------------------------+
| domain.canonical.sha256                  | 110414 → 110414 (+0.0%)    | 6.80µs → 6.81µs (+0.1%)        | 8.30µs → 9.01µs (+8.6%)         | 750.57ms → 752.44ms (+0.2%)      | 21.51% → 21.26% (-1.2%)      |
+------------------------------------------+----------------------------+--------------------------------+---------------------------------+----------------------------------+------------------------------+
| code_index.build.and_publish             | 2 → 2 (+0.0%)              | 385.07ms → 362.02ms (-6.0%)    | 468.45ms → 415.50ms (-11.3%)    | 770.14ms → 724.04ms (-6.0%)      | 22.07% → 20.46% (-7.3%)      |
+------------------------------------------+----------------------------+--------------------------------+---------------------------------+----------------------------------+------------------------------+
| query.artifact.batch.postings            | 13 → 13 (+0.0%)            | 47.37ms → 48.60ms (+2.6%)      | 65.37ms → 68.09ms (+4.2%)       | 615.75ms → 631.77ms (+2.6%)      | 17.64% → 17.85% (+1.2%)      |
+------------------------------------------+----------------------------+--------------------------------+---------------------------------+----------------------------------+------------------------------+
| query.artifact.finalization.advance_wake | 14 → 14 (+0.0%)            | 40.84ms → 42.70ms (+4.6%)      | 239.86ms → 255.07ms (+6.3%)     | 571.78ms → 597.75ms (+4.5%)      | 16.38% → 16.89% (+3.1%)      |
+------------------------------------------+----------------------------+--------------------------------+---------------------------------+----------------------------------+------------------------------+
| code_index.chunk.index_file              | 276 → 276 (+0.0%)          | 1.88ms → 1.65ms (-12.2%)       | 4.50ms → 2.39ms (-46.9%) 🚀     | 519.87ms → 454.84ms (-12.5%)     | 14.90% → 12.85% (-13.8%)     |
+------------------------------------------+----------------------------+--------------------------------+---------------------------------+----------------------------------+------------------------------+
| query.artifact.prepare_pages             | 13 → 13 (+0.0%)            | 33.12ms → 33.77ms (+2.0%)      | 47.51ms → 48.50ms (+2.1%)       | 430.60ms → 438.95ms (+1.9%)      | 12.34% → 12.40% (+0.5%)      |
+------------------------------------------+----------------------------+--------------------------------+---------------------------------+----------------------------------+------------------------------+
| code_index.extract.parser_artifact       | 276 → 276 (+0.0%)          | 2.01ms → 1.56ms (-22.4%) 🚀    | 4.75ms → 2.39ms (-49.7%) 🚀     | 554.88ms → 430.44ms (-22.4%) 🚀  | 15.90% → 12.16% (-23.5%) 🚀  |
+------------------------------------------+----------------------------+--------------------------------+---------------------------------+----------------------------------+------------------------------+
| query.artifact.batch.postings.ngram_rows | 13 → 13 (+0.0%)            | 26.77ms → 27.82ms (+3.9%)      | 37.55ms → 39.85ms (+6.1%)       | 348.04ms → 361.62ms (+3.9%)      | 9.97% → 10.22% (+2.5%)       |
+------------------------------------------+----------------------------+--------------------------------+---------------------------------+----------------------------------+------------------------------+
| query.artifact.batch.parallel_prepare    | 13 → 13 (+0.0%)            | 26.00ms → 26.53ms (+2.0%)      | 38.11ms → 38.96ms (+2.2%)       | 337.94ms → 344.83ms (+2.0%)      | 9.68% → 9.74% (+0.6%)        |
+------------------------------------------+----------------------------+--------------------------------+---------------------------------+----------------------------------+------------------------------+
| code_index.build.assemble                | 2 → 2 (+0.0%)              | 164.56ms → 166.60ms (+1.2%)    | 170.52ms → 175.37ms (+2.8%)     | 329.12ms → 333.20ms (+1.2%)      | 9.43% → 9.41% (-0.2%)        |
+------------------------------------------+----------------------------+--------------------------------+---------------------------------+----------------------------------+------------------------------+
| code_index.chunk.build                   | 276 → 276 (+0.0%)          | 1.19ms → 1.02ms (-14.3%)       | 3.85ms → 1.46ms (-62.1%) 🚀     | 328.48ms → 281.80ms (-14.2%)     | 9.41% → 7.96% (-15.4%)       |
+------------------------------------------+----------------------------+--------------------------------+---------------------------------+----------------------------------+------------------------------+

Generated with hotpath-rs

@ScriptedAlchemy
ScriptedAlchemy merged commit 431afb5 into codex/tracedecay-total-redesign-plan-reopened Sep 9, 2026
10 of 16 checks passed
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