Skip to content

refactor(hooks): move Hook V2 replay drain into tracedecay-hooks - #1139

Merged
ScriptedAlchemy merged 1 commit into
codex/tracedecay-total-redesign-plan-reopenedfrom
grok/w1-hook-replay
Sep 9, 2026
Merged

refactor(hooks): move Hook V2 replay drain into tracedecay-hooks#1139
ScriptedAlchemy merged 1 commit into
codex/tracedecay-total-redesign-plan-reopenedfrom
grok/w1-hook-replay

Conversation

@ScriptedAlchemy

Copy link
Copy Markdown
Owner

Child of #707 for #1073 (composition root).

Hook V2 spool drain moves from the root crate into tracedecay-hooks as drain_host_spool_once(spool, project_id, binding, now, admit). The daemon keeps only hook_v2_replay_consumer.rs, which admits a host spool, passes the project id, and maps typed admission outcomes. No TraceDecay port, no compatibility re-export; the root hook_v2_replay.rs is deleted.

Behavior preserved: Backpressured/Unavailable retain records; stale/conflict/expired tombstone. New: a foreign project id is binding_unavailable and retains records (tested).

Verification: 13 hook_v2_replay tests in tracedecay-hooks pass; clippy -D warnings on tracedecay-hooks and tracedecay; fmt; commitlint.

Pass an admitted host spool and project id so the root crate no longer
opens or owns that drain path.
@changeset-bot

changeset-bot Bot commented Sep 9, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: c59ddfb

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-09T08:42:36.724562Z c59ddfb 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-reopenedgrok/w1-hook-replay

Total Elapsed Time: 3.87s → 3.86s (-0.3%)
CPU Baseline: 89.04µs → 83.43µs (-6.3%)
Benchmark ID: index-bench-timing

timing - Execution duration of functions.

+------------------------------------------+----------------------------+--------------------------------+--------------------------------+--------------------------------+------------------------------+
| Function                                 | Calls                      | Avg                            | P95                            | Total                          | % Total                      |
+------------------------------------------+----------------------------+--------------------------------+--------------------------------+--------------------------------+------------------------------+
| tracedecay-index-bench                   | 1 → 1 (+0.0%)              | 3.87s → 3.86s (-0.3%)          | 3.88s → 3.87s (-0.3%)          | 3.87s → 3.86s (-0.3%)          | 100.00% → 100.00% (+0.0%)    |
+------------------------------------------+----------------------------+--------------------------------+--------------------------------+--------------------------------+------------------------------+
| query.artifact.append_pages              | 13 → 13 (+0.0%)            | 118.77ms → 118.68ms (-0.1%)    | 163.58ms → 163.32ms (-0.2%)    | 1.54s → 1.54s (+0.0%)          | 39.85% → 39.93% (+0.2%)      |
+------------------------------------------+----------------------------+--------------------------------+--------------------------------+--------------------------------+------------------------------+
| code_index.workers.install               | 83 → 83 (+0.0%)            | 13.55ms → 13.35ms (-1.5%)      | 46.60ms → 46.89ms (+0.6%)      | 1.12s → 1.11s (-0.9%)          | 29.03% → 28.67% (-1.2%)      |
+------------------------------------------+----------------------------+--------------------------------+--------------------------------+--------------------------------+------------------------------+
| domain.canonical.sha256                  | 110414 → 110414 (+0.0%)    | 8.46µs → 8.52µs (+0.7%)        | 11.01µs → 11.10µs (+0.8%)      | 933.96ms → 940.64ms (+0.7%)    | 24.11% → 24.34% (+1.0%)      |
+------------------------------------------+----------------------------+--------------------------------+--------------------------------+--------------------------------+------------------------------+
| query.artifact.batch.sqlite              | 13 → 13 (+0.0%)            | 68.57ms → 68.69ms (+0.2%)      | 93.91ms → 91.42ms (-2.7%)      | 891.38ms → 893.02ms (+0.2%)    | 23.01% → 23.11% (+0.4%)      |
+------------------------------------------+----------------------------+--------------------------------+--------------------------------+--------------------------------+------------------------------+
| code_index.build.and_publish             | 2 → 2 (+0.0%)              | 440.65ms → 438.62ms (-0.5%)    | 514.59ms → 509.87ms (-0.9%)    | 881.30ms → 877.23ms (-0.5%)    | 22.75% → 22.70% (-0.2%)      |
+------------------------------------------+----------------------------+--------------------------------+--------------------------------+--------------------------------+------------------------------+
| query.artifact.batch.postings            | 13 → 13 (+0.0%)            | 60.07ms → 59.70ms (-0.6%)      | 83.62ms → 80.48ms (-3.8%)      | 780.90ms → 776.16ms (-0.6%)    | 20.16% → 20.09% (-0.3%)      |
+------------------------------------------+----------------------------+--------------------------------+--------------------------------+--------------------------------+------------------------------+
| query.artifact.finalization.advance_wake | 14 → 14 (+0.0%)            | 44.47ms → 44.35ms (-0.3%)      | 270.27ms → 267.65ms (-1.0%)    | 622.51ms → 620.86ms (-0.3%)    | 16.07% → 16.07% (+0.0%)      |
+------------------------------------------+----------------------------+--------------------------------+--------------------------------+--------------------------------+------------------------------+
| code_index.chunk.index_file              | 276 → 276 (+0.0%)          | 2.13ms → 2.08ms (-2.3%)        | 3.15ms → 3.05ms (-3.2%)        | 587.24ms → 575.34ms (-2.0%)    | 15.16% → 14.89% (-1.8%)      |
+------------------------------------------+----------------------------+--------------------------------+--------------------------------+--------------------------------+------------------------------+
| code_index.extract.parser_artifact       | 276 → 276 (+0.0%)          | 2.11ms → 2.07ms (-1.9%)        | 3.23ms → 3.14ms (-2.8%)        | 582.86ms → 571.83ms (-1.9%)    | 15.04% → 14.80% (-1.6%)      |
+------------------------------------------+----------------------------+--------------------------------+--------------------------------+--------------------------------+------------------------------+
| query.artifact.prepare_pages             | 13 → 13 (+0.0%)            | 42.65ms → 42.19ms (-1.1%)      | 60.65ms → 60.62ms (-0.0%)      | 554.42ms → 548.52ms (-1.1%)    | 14.31% → 14.19% (-0.8%)      |
+------------------------------------------+----------------------------+--------------------------------+--------------------------------+--------------------------------+------------------------------+
| query.artifact.batch.parallel_prepare    | 13 → 13 (+0.0%)            | 33.82ms → 33.61ms (-0.6%)      | 47.97ms → 48.37ms (+0.8%)      | 439.71ms → 436.89ms (-0.6%)    | 11.35% → 11.31% (-0.4%)      |
+------------------------------------------+----------------------------+--------------------------------+--------------------------------+--------------------------------+------------------------------+
| query.artifact.batch.postings.ngram_rows | 13 → 13 (+0.0%)            | 33.59ms → 33.49ms (-0.3%)      | 47.25ms → 45.58ms (-3.5%)      | 436.63ms → 435.43ms (-0.3%)    | 11.27% → 11.27% (+0.0%)      |
+------------------------------------------+----------------------------+--------------------------------+--------------------------------+--------------------------------+------------------------------+
| code_index.build.assemble                | 2 → 2 (+0.0%)              | 195.02ms → 196.45ms (+0.7%)    | 205.39ms → 206.57ms (+0.6%)    | 390.05ms → 392.89ms (+0.7%)    | 10.07% → 10.17% (+1.0%)      |
+------------------------------------------+----------------------------+--------------------------------+--------------------------------+--------------------------------+------------------------------+
| code_index.chunk.build                   | 276 → 276 (+0.0%)          | 1.35ms → 1.32ms (-2.2%)        | 1.98ms → 1.90ms (-4.0%)        | 373.03ms → 364.47ms (-2.3%)    | 9.63% → 9.43% (-2.1%)        |
+------------------------------------------+----------------------------+--------------------------------+--------------------------------+--------------------------------+------------------------------+

Generated with hotpath-rs

@ScriptedAlchemy
ScriptedAlchemy merged commit a75d6a1 into codex/tracedecay-total-redesign-plan-reopened Sep 9, 2026
31 of 40 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