Skip to content

refactor(runtime): simplify composition and verify ownership boundaries - #1173

Merged
ScriptedAlchemy merged 8 commits into
codex/tracedecay-total-redesign-plan-reopenedfrom
codex/composition-runtime-followups
Sep 9, 2026
Merged

refactor(runtime): simplify composition and verify ownership boundaries#1173
ScriptedAlchemy merged 8 commits into
codex/tracedecay-total-redesign-plan-reopenedfrom
codex/composition-runtime-followups

Conversation

@ScriptedAlchemy

@ScriptedAlchemy ScriptedAlchemy commented Sep 9, 2026

Copy link
Copy Markdown
Owner

The composition root now reuses admitted MCP owners instead of passing their fields separately, and enables too_many_arguments with reasoned item-level exceptions at actual composition boundaries. Remote HTTP routes mount canonical operation ports directly, removing the forwarding owner while retaining transport admission and cancellation behavior.

This follow-up also preserves the original HTTPS measurement middleware order and adds a regression using a real contended SQLite writer during semantic bootstrap and shutdown. Integration Clippy findings are fixed at their declarations.

Validation: 52 MCP tests, 9 API tests plus 1 contract test, 33 mounted HTTP/TLS tests, and real writer-contention tests passed (including a 25% CPU quota run). Both Hotpath root test-compilation gates and workspace Hotpath Clippy passed on the transport candidate. Final combined root all-target Clippy with test-helpers passed with zero errors and warnings (cc-12740, commit dce72a7a1).

Partial progress on #1086, #1088, #1073 and #913; these remain open for their remaining acceptance criteria. Targets the head branch of draft #707, not master.

Resolve argument-count offenders through existing authorities: complete_tool_call reads connection identity and notifications from its server; search and context use McpToolContext index capabilities; application surface accepts RequestControls; affected-test rendering retains TestRunOutput on both success and failure.

Keep item-scoped exceptions for AdminCliContext::with_project and handle_admin_cli (independent admitted stores, sync, protocol controls), handle_dashboard (independent optional mounted providers), handle_status (independent observability authorities), terminal_failure (exact admitted settlement and dispatched target evidence), and redundancy test_pair (independent fixture node dimensions). Each exception records its invariant at the function. No new argument bags or crate-wide allowances.

Verification: affected-workflow tests passed 19 cases (cc-12618). Strict Clippy and graph/request checks are pending; source is checkpointed for combined integration verification.
Remove the crate-wide too_many_arguments allowance. Existing MCP owners
replace repeated arguments; remaining composition and fixture boundaries
keep item-scoped reasons rather than adding one-use parameter bags.

Root inventory/disposition: LSP registration, code-index mount, project
server composition, portable warmup/request/dispatch and registered branch
opening retain distinct admitted owners. Maintenance run/tick retain store
and continuation lifetimes. Scheduler loop, user-job pass, retained
settlement, effect admission and reused-skip abandonment retain cancellation,
configuration and settlement guards. Retained LCM query mapping preserves
independent filters. Host-session, detached-session and semantic-activation
fixtures intentionally vary authority dimensions independently.

MCP inventory/dispositions are recorded in the preceding handler commit;
combined effect preparation retains its explicit authority-binding exception.

Validation: integrated root all-target Clippy with test-helpers and
-D warnings passes (cc-12676). All 52 affected MCP tests pass.
@changeset-bot

changeset-bot Bot commented Sep 9, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: dce72a7

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 ⚠️ Failed 2026-09-09T17:40:38.628734Z dce72a7 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.

@ScriptedAlchemy
ScriptedAlchemy merged commit 11509a6 into codex/tracedecay-total-redesign-plan-reopened Sep 9, 2026
15 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

Performance Comparison codex/tracedecay-total-redesign-plan-reopenedcodex/composition-runtime-followups

Total Elapsed Time: 3.94s → 4.01s (+1.8%)
CPU Baseline: 89.94µs → 90.90µs (+1.1%)
Benchmark ID: index-bench-timing

timing - Execution duration of functions.

+------------------------------------------+----------------------------+--------------------------------+--------------------------------+--------------------------------+------------------------------+
| Function                                 | Calls                      | Avg                            | P95                            | Total                          | % Total                      |
+------------------------------------------+----------------------------+--------------------------------+--------------------------------+--------------------------------+------------------------------+
| tracedecay-index-bench                   | 1 → 1 (+0.0%)              | 3.94s → 4.01s (+1.8%)          | 3.94s → 4.01s (+1.8%)          | 3.94s → 4.01s (+1.8%)          | 100.00% → 100.00% (+0.0%)    |
+------------------------------------------+----------------------------+--------------------------------+--------------------------------+--------------------------------+------------------------------+
| query.artifact.append_pages              | 13 → 13 (+0.0%)            | 119.50ms → 122.70ms (+2.7%)    | 160.56ms → 163.18ms (+1.6%)    | 1.55s → 1.60s (+3.2%)          | 39.44% → 39.79% (+0.9%)      |
+------------------------------------------+----------------------------+--------------------------------+--------------------------------+--------------------------------+------------------------------+
| code_index.workers.install               | 83 → 83 (+0.0%)            | 13.28ms → 13.29ms (+0.1%)      | 46.14ms → 45.88ms (-0.6%)      | 1.10s → 1.10s (+0.0%)          | 27.99% → 27.51% (-1.7%)      |
+------------------------------------------+----------------------------+--------------------------------+--------------------------------+--------------------------------+------------------------------+
| domain.canonical.sha256                  | 110414 → 110414 (+0.0%)    | 8.79µs → 8.73µs (-0.7%)        | 11.49µs → 11.37µs (-1.0%)      | 970.41ms → 964.49ms (-0.6%)    | 24.64% → 24.06% (-2.4%)      |
+------------------------------------------+----------------------------+--------------------------------+--------------------------------+--------------------------------+------------------------------+
| query.artifact.batch.sqlite              | 13 → 13 (+0.0%)            | 68.25ms → 69.92ms (+2.4%)      | 90.70ms → 91.88ms (+1.3%)      | 887.25ms → 908.90ms (+2.4%)    | 22.53% → 22.67% (+0.6%)      |
+------------------------------------------+----------------------------+--------------------------------+--------------------------------+--------------------------------+------------------------------+
| code_index.build.and_publish             | 2 → 2 (+0.0%)              | 448.31ms → 449.47ms (+0.3%)    | 510.92ms → 508.56ms (-0.5%)    | 896.63ms → 898.93ms (+0.3%)    | 22.76% → 22.42% (-1.5%)      |
+------------------------------------------+----------------------------+--------------------------------+--------------------------------+--------------------------------+------------------------------+
| query.artifact.batch.postings            | 13 → 13 (+0.0%)            | 60.12ms → 61.25ms (+1.9%)      | 80.87ms → 81.85ms (+1.2%)      | 781.51ms → 796.24ms (+1.9%)    | 19.84% → 19.86% (+0.1%)      |
+------------------------------------------+----------------------------+--------------------------------+--------------------------------+--------------------------------+------------------------------+
| query.artifact.finalization.advance_wake | 14 → 14 (+0.0%)            | 43.73ms → 44.76ms (+2.4%)      | 270.01ms → 272.11ms (+0.8%)    | 612.15ms → 626.62ms (+2.4%)    | 15.54% → 15.63% (+0.6%)      |
+------------------------------------------+----------------------------+--------------------------------+--------------------------------+--------------------------------+------------------------------+
| code_index.chunk.index_file              | 276 → 276 (+0.0%)          | 2.05ms → 2.03ms (-1.0%)        | 3.04ms → 2.98ms (-2.0%)        | 565.72ms → 559.27ms (-1.1%)    | 14.36% → 13.95% (-2.9%)      |
+------------------------------------------+----------------------------+--------------------------------+--------------------------------+--------------------------------+------------------------------+
| query.artifact.prepare_pages             | 13 → 13 (+0.0%)            | 42.19ms → 42.90ms (+1.7%)      | 60.62ms → 61.18ms (+0.9%)      | 548.49ms → 557.75ms (+1.7%)    | 13.93% → 13.91% (-0.1%)      |
+------------------------------------------+----------------------------+--------------------------------+--------------------------------+--------------------------------+------------------------------+
| code_index.extract.parser_artifact       | 276 → 276 (+0.0%)          | 1.88ms → 1.84ms (-2.1%)        | 2.90ms → 2.81ms (-3.1%)        | 519.92ms → 507.40ms (-2.4%)    | 13.20% → 12.66% (-4.1%)      |
+------------------------------------------+----------------------------+--------------------------------+--------------------------------+--------------------------------+------------------------------+
| query.artifact.batch.postings.ngram_rows | 13 → 13 (+0.0%)            | 33.39ms → 33.96ms (+1.7%)      | 45.65ms → 46.53ms (+1.9%)      | 434.12ms → 441.43ms (+1.7%)    | 11.02% → 11.01% (-0.1%)      |
+------------------------------------------+----------------------------+--------------------------------+--------------------------------+--------------------------------+------------------------------+
| query.artifact.batch.parallel_prepare    | 13 → 13 (+0.0%)            | 32.99ms → 33.22ms (+0.7%)      | 47.48ms → 48.01ms (+1.1%)      | 428.88ms → 431.83ms (+0.7%)    | 10.89% → 10.77% (-1.1%)      |
+------------------------------------------+----------------------------+--------------------------------+--------------------------------+--------------------------------+------------------------------+
| code_index.build.assemble                | 2 → 2 (+0.0%)              | 209.70ms → 211.28ms (+0.8%)    | 219.55ms → 222.43ms (+1.3%)    | 419.40ms → 422.56ms (+0.8%)    | 10.65% → 10.54% (-1.0%)      |
+------------------------------------------+----------------------------+--------------------------------+--------------------------------+--------------------------------+------------------------------+
| code_index.chunk.build                   | 276 → 276 (+0.0%)          | 1.27ms → 1.25ms (-1.6%)        | 1.84ms → 1.80ms (-2.2%)        | 349.79ms → 345.85ms (-1.1%)    | 8.88% → 8.63% (-2.8%)        |
+------------------------------------------+----------------------------+--------------------------------+--------------------------------+--------------------------------+------------------------------+

Generated with hotpath-rs

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