Skip to content

feat(hotpath): fill session-temporal-store query/persist gaps - #781

Draft
ScriptedAlchemy wants to merge 4 commits into
codex/tracedecay-total-redesign-plan-reopenedfrom
cursor/hotpath-session-temporal-gaps-9833
Draft

feat(hotpath): fill session-temporal-store query/persist gaps#781
ScriptedAlchemy wants to merge 4 commits into
codex/tracedecay-total-redesign-plan-reopenedfrom
cursor/hotpath-session-temporal-gaps-9833

Conversation

@ScriptedAlchemy

@ScriptedAlchemy ScriptedAlchemy commented Aug 31, 2026

Copy link
Copy Markdown
Owner

Summary

Fills the remaining hotpath coverage gaps in crates/tracedecay-session-temporal-store (HP-temporal), instrumentation only — no behavior changes, no Cargo.toml/feature changes, and hotpath stays opt-in (every macro is a no-op without the hotpath feature).

All labels follow the existing session_temporal.<area>.<verb> taxonomy. Getters, Display impls, tests, cfg(test) helpers, and pure delegations were skipped.

New instrumentation

File Labels
operations/message_anchor.rs publication.resolve_anchor, publication.anchor_occurrence, publication.anchor_observation
store.rs store.persist_refresh_batch, store.persist_refresh_batch_controlled, store.refresh_recovery, store.refresh_running
query.rs query.read_generation, query.read_active_generation, query.read_observation, query.read_observations
cursor_keys.rs cursor_key.provision, cursor_key.load_active, cursor_key.load, cursor_key.keyring (sync)
execution.rs execution.validate_report, execution.authorize_task_session (sync — file is a ports/types module with no async code)
retrieval/candidates.rs query.root_authority, query.candidate_clause
sql.rs sql.query (aggregate over every temporal retrieval read)
hydration.rs (add-missing) hydrate.authorize, hydrate.read_authorized, hydrate.decode_message, hydrate.read_occurrence, hydrate.resolve_occurrence, hydrate.resolve_summary, hydrate.summary_evidence
projection/persist.rs (add-missing) projection.record_count, persist.occurrences, projection.canonical_occurrence, projection.require_occurrence, projection.validate_copy, projection.validate_copy_proof, persist.assertion, projection.validate_assertion

Notes

  • refresh.rs (add-missing target) needed no changes: every entry point already carries a measure; the only unmeasured async method (persist_session_refresh_projection_batch_result) is a pure delegation to the measured controlled variant, so adding a label there would only duplicate the session_temporal.persist.refresh_batch span.
  • test_registered_impls.rs skipped as instructed.
  • Row-decoding micro-helpers under already-measured entry points were left alone, matching the existing pattern in operations/generation.rs.

Verification

  • cargo check -p tracedecay-session-temporal-store (default features) — pass
  • cargo check -p tracedecay-session-temporal-store --features hotpath — pass (macros active)
  • cargo clippy -p tracedecay-session-temporal-store --all-targets — clean
  • cargo test -p tracedecay-session-temporal-store — 131 passed, 0 failed
  • Commit subject passes commitlint.
Open in Web Open in Cursor 

Co-authored-by: Zack Jackson <ScriptedAlchemy@users.noreply.github.com>
@changeset-bot

changeset-bot Bot commented Aug 31, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 387f039

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

@github-actions

github-actions Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Performance Comparison codex/tracedecay-total-redesign-plan-reopenedcursor/hotpath-session-temporal-gaps-9833

Total Elapsed Time: 5.82s → 5.36s (-7.9%)
CPU Baseline: 79.53µs → 85.11µs (+7.0%)
Benchmark ID: index-bench-timing

timing - Execution duration of functions.

+------------------------------------------+----------------------------+---------------------------------+---------------------------------+----------------------------------+------------------------------+
| Function                                 | Calls                      | Avg                             | P95                             | Total                            | % Total                      |
+------------------------------------------+----------------------------+---------------------------------+---------------------------------+----------------------------------+------------------------------+
| tracedecay-index-bench                   | 1 → 1 (+0.0%)              | 5.82s → 5.36s (-7.9%)           | 5.82s → 5.36s (-7.9%)           | 5.82s → 5.36s (-7.9%)            | 100.00% → 100.00% (+0.0%)    |
+------------------------------------------+----------------------------+---------------------------------+---------------------------------+----------------------------------+------------------------------+
| query.artifact.append_pages              | 13 → 13 (+0.0%)            | 201.36ms → 188.33ms (-6.5%)     | 286.00ms → 253.36ms (-11.4%)    | 2.62s → 2.45s (-6.5%)            | 44.98% → 45.67% (+1.5%)      |
+------------------------------------------+----------------------------+---------------------------------+---------------------------------+----------------------------------+------------------------------+
| query.artifact.batch.sqlite              | 13 → 13 (+0.0%)            | 128.80ms → 129.54ms (+0.6%)     | 176.03ms → 174.19ms (-1.0%)     | 1.67s → 1.68s (+0.6%)            | 28.77% → 31.41% (+9.2%)      |
+------------------------------------------+----------------------------+---------------------------------+---------------------------------+----------------------------------+------------------------------+
| query.artifact.batch.postings            | 13 → 13 (+0.0%)            | 112.35ms → 112.72ms (+0.3%)     | 152.83ms → 153.62ms (+0.5%)     | 1.46s → 1.47s (+0.7%)            | 25.10% → 27.34% (+8.9%)      |
+------------------------------------------+----------------------------+---------------------------------+---------------------------------+----------------------------------+------------------------------+
| CodeIndexProductionOwnerV1::extract_file | 276 → 276 (+0.0%)          | 6.23ms → 4.96ms (-20.4%) 🚀     | 11.37ms → 7.65ms (-32.7%) 🚀    | 1.72s → 1.37s (-20.3%) 🚀        | 29.52% → 25.51% (-13.6%)     |
+------------------------------------------+----------------------------+---------------------------------+---------------------------------+----------------------------------+------------------------------+
| code_index.workers.install               | 83 → 83 (+0.0%)            | 21.68ms → 16.18ms (-25.4%) 🚀   | 74.19ms → 54.85ms (-26.1%) 🚀   | 1.80s → 1.34s (-25.6%) 🚀        | 30.92% → 25.06% (-19.0%)     |
+------------------------------------------+----------------------------+---------------------------------+---------------------------------+----------------------------------+------------------------------+
| code_index.build.and_publish             | 2 → 2 (+0.0%)              | 660.24ms → 543.96ms (-17.6%)    | 661.65ms → 545.78ms (-17.5%)    | 1.32s → 1.09s (-17.4%)           | 22.69% → 20.29% (-10.6%)     |
+------------------------------------------+----------------------------+---------------------------------+---------------------------------+----------------------------------+------------------------------+
| domain.canonical.sha256                  | 114526 → 114526 (+0.0%)    | 11.24µs → 8.99µs (-20.0%) 🚀    | 15.02µs → 14.99µs (-0.2%)       | 1.29s → 1.03s (-20.2%) 🚀        | 22.12% → 19.20% (-13.2%)     |
+------------------------------------------+----------------------------+---------------------------------+---------------------------------+----------------------------------+------------------------------+
| query.artifact.finalization.advance_wake | 14 → 14 (+0.0%)            | 58.19ms → 59.86ms (+2.9%)       | 286.00ms → 300.94ms (+5.2%)     | 814.72ms → 838.04ms (+2.9%)      | 14.00% → 15.63% (+11.6%)     |
+------------------------------------------+----------------------------+---------------------------------+---------------------------------+----------------------------------+------------------------------+
| query.artifact.prepare_pages             | 13 → 13 (+0.0%)            | 61.78ms → 48.55ms (-21.4%) 🚀   | 92.80ms → 70.32ms (-24.2%) 🚀   | 803.18ms → 631.12ms (-21.4%) 🚀  | 13.80% → 11.77% (-14.7%)     |
+------------------------------------------+----------------------------+---------------------------------+---------------------------------+----------------------------------+------------------------------+
| code_index.chunk.index_file              | 276 → 276 (+0.0%)          | 2.85ms → 2.26ms (-20.7%) 🚀     | 5.66ms → 3.34ms (-41.0%) 🚀     | 786.78ms → 625.08ms (-20.6%) 🚀  | 13.52% → 11.66% (-13.8%)     |
+------------------------------------------+----------------------------+---------------------------------+---------------------------------+----------------------------------+------------------------------+
| code_index.extract.parser_artifact       | 276 → 276 (+0.0%)          | 2.72ms → 2.14ms (-21.3%) 🚀     | 5.67ms → 3.28ms (-42.2%) 🚀     | 750.67ms → 590.97ms (-21.3%) 🚀  | 12.90% → 11.02% (-14.6%)     |
+------------------------------------------+----------------------------+---------------------------------+---------------------------------+----------------------------------+------------------------------+
| query.artifact.batch.parallel_prepare    | 13 → 13 (+0.0%)            | 50.04ms → 37.96ms (-24.1%) 🚀   | 74.71ms → 54.85ms (-26.6%) 🚀   | 650.55ms → 493.46ms (-24.1%) 🚀  | 11.18% → 9.21% (-17.6%)      |
+------------------------------------------+----------------------------+---------------------------------+---------------------------------+----------------------------------+------------------------------+
| 🆕 code_index.build.assemble             | 0 → 2 (+100.0%) ⚠️         | 0.00ns → 197.52ms (+100.0%) ⚠️  | 0.00ns → 210.76ms (+100.0%) ⚠️  | 0.00ns → 395.04ms (+100.0%) ⚠️   | 0.00% → 7.37% (+100.0%) ⚠️   |
+------------------------------------------+----------------------------+---------------------------------+---------------------------------+----------------------------------+------------------------------+
| code_index.chunk.build                   | 276 → 276 (+0.0%)          | 1.77ms → 1.39ms (-21.5%) 🚀     | 4.43ms → 2.00ms (-54.9%) 🚀     | 487.27ms → 382.28ms (-21.5%) 🚀  | 8.37% → 7.13% (-14.8%)       |
+------------------------------------------+----------------------------+---------------------------------+---------------------------------+----------------------------------+------------------------------+
| 🗑️ code_index.chunk.identify             | 276 → 0 (-100.0%) 🚀       | 1.75ms → 0.00ns (-100.0%) 🚀    | 4.40ms → 0.00ns (-100.0%) 🚀    | 482.61ms → 0.00ns (-100.0%) 🚀   | 8.29% → 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.

2 participants