Skip to content

refactor(daemon-service): move query authz and remote protocol - #1178

Merged
ScriptedAlchemy merged 4 commits into
codex/tracedecay-total-redesign-plan-reopenedfrom
grok/w2-daemon-transport
Sep 9, 2026
Merged

refactor(daemon-service): move query authz and remote protocol#1178
ScriptedAlchemy merged 4 commits into
codex/tracedecay-total-redesign-plan-reopenedfrom
grok/w2-daemon-transport

Conversation

@ScriptedAlchemy

@ScriptedAlchemy ScriptedAlchemy commented Sep 9, 2026

Copy link
Copy Markdown
Owner

Move daemon query authorization and remote protocol composition into daemon-service while retaining the canonical receiving-only frame-transfer authority in store-runtime. The merged result removes the obsolete local transfer implementation and exposes the existing query observation function directly.

Independently reviewed against the integrated #707 owner changes. Corrected-head protocol recovery test passes (cc-12945, 1 test); strict daemon-service library/test Clippy passes with zero warnings or errors (cc-12946). Root integration checks follow on the combined tip.

@changeset-bot

changeset-bot Bot commented Sep 9, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: a9ccd0f

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-09T18:39:39.194113Z d3af84f 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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d3af84fb4a

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +32 to 34
pub fn new(
access: impl Fn(UtcMicros) -> CurrentCallableCodeAccessFuture<'static> + Send + Sync + 'static,
) -> Self {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Restrict the injectable authorization constructor

Keep this constructor private: because DaemonCallableCodeAuthorizationSource is publicly reexported, pub fn new lets any consumer present an arbitrary closure as the daemon's canonical source-access authority instead of using the configuration-backed production path. A repository-wide search at this commit finds its only caller in this module's #[cfg(test)] fixture, so this widens the production authorization boundary solely for tests and permits shadow authorities.

AGENTS.md reference: AGENTS.md:L121-L123

Useful? React with 👍 / 👎.

Comment on lines 64 to 67
pub fn remote_query_result_observation(
operation_ref: &str,
expected_shards: usize,
result: &tracedecay_contracts::remote::query::RemoteQueryResultV1,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Gate the remote observation helper to test builds

Do not expose this as an unconditional production API: the only repository callers are the two cases in crates/tracedecay/src/daemon/remote_protocol_tests.rs, while the actual runtime path calls the private observability implementation directly. Moving the old #[cfg(test)] pub(super) wrapper across the crate boundary as plain pub leaves a test-only surface compiled and callable in every shipped daemon-service build; expose it under the existing test-helpers feature instead.

AGENTS.md reference: AGENTS.md:L121-L123

Useful? React with 👍 / 👎.

@ScriptedAlchemy
ScriptedAlchemy merged commit 01b8635 into codex/tracedecay-total-redesign-plan-reopened Sep 9, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Performance Comparison codex/tracedecay-total-redesign-plan-reopenedgrok/w2-daemon-transport

Total Elapsed Time: 4.48s → 4.09s (-8.8%)
CPU Baseline: 93.15µs → 92.05µs (-1.2%)
Benchmark ID: index-bench-timing

timing - Execution duration of functions.

+------------------------------------------+----------------------------+---------------------------------+---------------------------------+----------------------------------+------------------------------+
| Function                                 | Calls                      | Avg                             | P95                             | Total                            | % Total                      |
+------------------------------------------+----------------------------+---------------------------------+---------------------------------+----------------------------------+------------------------------+
| tracedecay-index-bench                   | 1 → 1 (+0.0%)              | 4.48s → 4.09s (-8.7%)           | 4.48s → 4.09s (-8.7%)           | 4.48s → 4.09s (-8.7%)            | 100.00% → 100.00% (+0.0%)    |
+------------------------------------------+----------------------------+---------------------------------+---------------------------------+----------------------------------+------------------------------+
| query.artifact.append_pages              | 13 → 13 (+0.0%)            | 140.27ms → 124.00ms (-11.6%)    | 199.75ms → 170.00ms (-14.9%)    | 1.82s → 1.61s (-11.5%)           | 40.67% → 39.44% (-3.0%)      |
+------------------------------------------+----------------------------+---------------------------------+---------------------------------+----------------------------------+------------------------------+
| code_index.workers.install               | 83 → 83 (+0.0%)            | 16.14ms → 13.32ms (-17.5%)      | 62.46ms → 46.79ms (-25.1%) 🚀   | 1.34s → 1.11s (-17.2%)           | 29.88% → 27.05% (-9.5%)      |
+------------------------------------------+----------------------------+---------------------------------+---------------------------------+----------------------------------+------------------------------+
| query.artifact.batch.sqlite              | 13 → 13 (+0.0%)            | 74.51ms → 71.46ms (-4.1%)       | 104.46ms → 96.14ms (-8.0%)      | 968.68ms → 928.95ms (-4.1%)      | 21.61% → 22.73% (+5.2%)      |
+------------------------------------------+----------------------------+---------------------------------+---------------------------------+----------------------------------+------------------------------+
| code_index.build.and_publish             | 2 → 2 (+0.0%)              | 473.77ms → 462.35ms (-2.4%)     | 516.42ms → 517.47ms (+0.2%)     | 947.54ms → 924.70ms (-2.4%)      | 21.13% → 22.63% (+7.1%)      |
+------------------------------------------+----------------------------+---------------------------------+---------------------------------+----------------------------------+------------------------------+
| domain.canonical.sha256                  | 110414 → 110414 (+0.0%)    | 8.67µs → 8.26µs (-4.7%)         | 10.59µs → 10.53µs (-0.6%)       | 956.95ms → 911.55ms (-4.7%)      | 21.34% → 22.30% (+4.5%)      |
+------------------------------------------+----------------------------+---------------------------------+---------------------------------+----------------------------------+------------------------------+
| query.artifact.batch.postings            | 13 → 13 (+0.0%)            | 65.31ms → 62.73ms (-4.0%)       | 91.16ms → 85.79ms (-5.9%)       | 848.97ms → 815.54ms (-3.9%)      | 18.94% → 19.95% (+5.3%)      |
+------------------------------------------+----------------------------+---------------------------------+---------------------------------+----------------------------------+------------------------------+
| query.artifact.finalization.advance_wake | 14 → 14 (+0.0%)            | 47.55ms → 44.71ms (-6.0%)       | 285.74ms → 273.15ms (-4.4%)     | 665.74ms → 625.90ms (-6.0%)      | 14.85% → 15.31% (+3.1%)      |
+------------------------------------------+----------------------------+---------------------------------+---------------------------------+----------------------------------+------------------------------+
| query.artifact.prepare_pages             | 13 → 13 (+0.0%)            | 53.94ms → 42.32ms (-21.5%) 🚀   | 79.89ms → 60.98ms (-23.7%) 🚀   | 701.16ms → 550.20ms (-21.5%) 🚀  | 15.64% → 13.46% (-13.9%)     |
+------------------------------------------+----------------------------+---------------------------------+---------------------------------+----------------------------------+------------------------------+
| code_index.chunk.index_file              | 276 → 276 (+0.0%)          | 1.99ms → 1.98ms (-0.5%)         | 2.89ms → 2.93ms (+1.4%)         | 548.93ms → 545.68ms (-0.6%)      | 12.24% → 13.35% (+9.1%)      |
+------------------------------------------+----------------------------+---------------------------------+---------------------------------+----------------------------------+------------------------------+
| code_index.extract.parser_artifact       | 276 → 276 (+0.0%)          | 1.90ms → 1.89ms (-0.5%)         | 2.91ms → 2.91ms (+0.0%)         | 524.07ms → 521.17ms (-0.6%)      | 11.69% → 12.75% (+9.1%)      |
+------------------------------------------+----------------------------+---------------------------------+---------------------------------+----------------------------------+------------------------------+
| query.artifact.batch.postings.ngram_rows | 13 → 13 (+0.0%)            | 35.50ms → 34.80ms (-2.0%)       | 47.64ms → 47.45ms (-0.4%)       | 461.49ms → 452.44ms (-2.0%)      | 10.29% → 11.07% (+7.6%)      |
+------------------------------------------+----------------------------+---------------------------------+---------------------------------+----------------------------------+------------------------------+
| code_index.build.assemble                | 2 → 2 (+0.0%)              | 227.77ms → 217.28ms (-4.6%)     | 249.95ms → 225.31ms (-9.9%)     | 455.55ms → 434.57ms (-4.6%)      | 10.16% → 10.63% (+4.6%)      |
+------------------------------------------+----------------------------+---------------------------------+---------------------------------+----------------------------------+------------------------------+
| query.artifact.batch.parallel_prepare    | 13 → 13 (+0.0%)            | 44.48ms → 33.22ms (-25.3%) 🚀   | 67.50ms → 48.04ms (-28.8%) 🚀   | 578.18ms → 431.80ms (-25.3%) 🚀  | 12.90% → 10.56% (-18.1%)     |
+------------------------------------------+----------------------------+---------------------------------+---------------------------------+----------------------------------+------------------------------+
| 🆕 code_index.chunk.build                | 0 → 276 (+100.0%) ⚠️       | 0.00ns → 1.23ms (+100.0%) ⚠️    | 0.00ns → 1.77ms (+100.0%) ⚠️    | 0.00ns → 339.64ms (+100.0%) ⚠️   | 0.00% → 8.31% (+100.0%) ⚠️   |
+------------------------------------------+----------------------------+---------------------------------+---------------------------------+----------------------------------+------------------------------+
| 🗑️ code_index.chunk.map_ordered          | 780 → 0 (-100.0%) 🚀       | 439.60µs → 0.00ns (-100.0%) 🚀  | 484.35µs → 0.00ns (-100.0%) 🚀  | 342.89ms → 0.00ns (-100.0%) 🚀   | 7.65% → 0.00% (-100.0%) 🚀   |
+------------------------------------------+----------------------------+---------------------------------+---------------------------------+----------------------------------+------------------------------+

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