feat(hotpath): fill sessions ingest/transcript/backfill gaps - #776
Draft
ScriptedAlchemy wants to merge 2 commits into
Draft
feat(hotpath): fill sessions ingest/transcript/backfill gaps#776ScriptedAlchemy wants to merge 2 commits into
ScriptedAlchemy wants to merge 2 commits into
Conversation
|
Contributor
Performance Comparison
|
Co-authored-by: Zack Jackson <ScriptedAlchemy@users.noreply.github.com>
cursor
Bot
force-pushed
the
cursor/hotpath-gap-fill-f2b0
branch
from
August 31, 2026 22:00
089ef04 to
efb8b56
Compare
…sor/hotpath-gap-fill-f2b0
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Gap-fill hotpath coverage in
crates/tracedecay-sessionsonly (HP-sessions scope). 42 new#[hotpath::measure]sites across 10 files, all on persist / ingest / recall / backfill / IO paths. Purely additive: no existing measure sites, gauges, or program logic were touched (diff is 58 inserted attribute lines, 0 deletions). NoCargo.tomlchanges — the crate'shotpath/hotpath-alloc/hotpath-cpupassthroughs already exist and none of them are reachable fromdefaultorproduction. Macros no-op without--features hotpath.Rebased onto the current base tip. During the rebase, the base had independently instrumented the four hermes sweep entry points (
sessions.hosts.hermes.ingest_projects/ingest_project/ingest_user/ingest_legacy); those base labels were kept and this PR's duplicate attributes for the same functions were dropped. This PR still adds the two hermes discovery-walk measures below.Verified after rebase:
cargo check -p tracedecay-sessions --features hotpathandcargo check -p tracedecay-sessionsboth pass; no duplicate labels crate-wide;npm run lint:commitpasses. Base iscodex/tracedecay-total-redesign-plan-reopened(#707, not merged by this PR).New measure sites
runtime/store_access/transcript.rsget_parse_offset(free fn)sessions.transcript.offset_readruntime/store_access/transcript.rsset_parse_offset(free fn)sessions.transcript.offset_writeruntime/store_access/transcript.rsupsert_sessionsessions.transcript.session_upsertruntime/store_access/transcript.rsget_session_resultsessions.transcript.session_readruntime/store_access/transcript.rsupsert_session_message_in_existing_txsessions.transcript.message_upsertruntime/store_access/transcript.rspersist_transcript_offset_resultsessions.transcript.offset_commitruntime/store_access/transcript.rsupsert_transcript_batches_innersessions.transcript.batch_persistruntime/store_access/transcript.rsadvance_parse_offset_resultsessions.transcript.offset_advanceruntime/store_access/transcript.rsreplace_parse_offset_resultsessions.transcript.offset_replaceruntime/store_access/transcript.rsreplace_parse_offset_pair_resultsessions.transcript.offset_replace_pairruntime/hosts/hermes/ingest.rsall_profile_sourcessessions.hosts.hermes.discover_profilesruntime/hosts/hermes/ingest.rscandidate_state_dbssessions.hosts.hermes.discover_candidatesruntime/workflow/workflow_index.rsensure_workflow_index_schemasessions.workflow_index.ensure_schemaruntime/workflow/workflow_index.rsread_ingest_watermarksessions.workflow_index.watermark_readruntime/workflow/workflow_index.rsupsert_runsessions.workflow_index.run_upsertruntime/workflow/workflow_index.rsupsert_agentsessions.workflow_index.agent_upsertruntime/workflow/workflow_index.rsruns_for_sessionsessions.workflow_index.runs_for_sessionruntime/workflow/workflow_index.rsrun_for_idsessions.workflow_index.run_readruntime/workflow/workflow_index.rsagents_for_runsessions.workflow_index.agents_for_runruntime/workflow/workflow_index.rsruns_for_git_scopesessions.workflow_index.runs_for_git_scoperuntime/git_correlation/backfill/history_progress.rsinstall_final_schemasessions.git_correlation.history_schemaruntime/git_correlation/backfill/history_progress.rsread_progresssessions.git_correlation.history_progress_readruntime/git_correlation/backfill/history_progress.rsread_oldest_progresssessions.git_correlation.history_progress_oldestruntime/git_correlation/backfill/history_progress.rsinsert_progresssessions.git_correlation.history_progress_insertruntime/git_correlation/backfill/history_progress.rscompare_and_swap_progresssessions.git_correlation.history_progress_casruntime/git_correlation/backfill/history_progress.rsupsert_segmentsessions.git_correlation.history_segment_upsertruntime/git_correlation/backfill/history_progress.rsread_pending_pagesessions.git_correlation.history_pending_pageruntime/git_correlation/backfill/bounded.rsrun_bounded_history_index_pagesessions.git_correlation.backfill.bounded_pageruntime/git_correlation/backfill/bounded.rsstream_git_evidencesessions.git_correlation.backfill.stream_evidenceruntime/git_correlation/backfill/bounded.rsresume_git_evidencesessions.git_correlation.backfill.resume_evidenceruntime/git_correlation/backfill/bounded.rsdry_run_native_historysessions.git_correlation.backfill.dry_runruntime/git_correlation/backfill/bounded.rspersist_frontiersessions.git_correlation.backfill.frontier_persistruntime/hosts/cursor_composer/ingest.rsdrain_composer_projection_queuesessions.hosts.cursor.composer_projection_drainruntime/hosts/cursor_composer/ingest.rsadvance_composer_coveragesessions.hosts.cursor.composer_coverage_advanceruntime/hosts/cursor_composer/ingest.rsingest_with_contextsessions.hosts.cursor.composer_sweepruntime/hosts/cursor_composer/ingest.rsingest_state_vscdbsessions.hosts.cursor.composer_state_vscdbruntime/hosts/cursor_composer/ingest.rsingest_chat_store_dbssessions.hosts.cursor.composer_chat_storesruntime/hosts/cursor_composer/ingest.rsingest_one_store_dbsessions.hosts.cursor.composer_store_dbruntime/ingest/scheduler.rsread_ingest_frontiersessions.ingest.frontier_readruntime/ingest/scheduler.rswrite_ingest_frontiersessions.ingest.frontier_writeruntime/ingest/scheduler.rsread_codex_discovery_frontiersessions.ingest.codex_frontier_readruntime/ingest/scheduler.rswrite_codex_discovery_frontiersessions.ingest.codex_frontier_writeruntime/hosts/cursor.rs(add-missing)try_ingest_cursor_user_transcript_event_capped_with_admissionsessions.hosts.cursor.ingest_user_event_cappedruntime/hosts/cursor.rs(add-missing)admit_cursor_sweep_observations_with_session_idssessions.hosts.cursor.sweep_admitruntime/hosts/cursor.rs(add-missing)CursorSweepSource::transcript_pathssessions.hosts.cursor.sweep_discoverruntime/hosts/cursor.rs(add-missing)dispatch_model_for_agentsessions.hosts.cursor.dispatch_model_scanruntime/source.rs(add-missing)load_transcript_cursorsessions.source.cursor_loadruntime/source.rs(add-missing)read_host_provider_coveragesessions.source.coverage_readruntime/source.rs(add-missing)persist_host_provider_coveragesessions.source.coverage_persistruntime/source.rs(add-missing)preflight_strict_jsonlsessions.source.preflight_jsonlruntime/source.rs(add-missing)read_changed_filesessions.source.read_changedruntime/source.rs(add-missing)read_changed_with_companionsessions.source.read_changed_companionruntime/observation/jsonl_observation_admission.rs(add-missing)build_shared_jsonl_pagesessions.observation.jsonl_page_buildruntime/observation/jsonl_observation_admission.rs(add-missing)prepare_shared_jsonl_window_with_background_cpusessions.observation.jsonl_window_prepareruntime/observation/jsonl_observation_admission.rs(add-missing)shared_jsonl_page_with_cancellationsessions.observation.jsonl_page_lookupruntime/observation/jsonl_observation_admission.rs(add-missing)advance_coveragesessions.observation.jsonl_coverage_advanceruntime/observation/jsonl_observation_admission.rs(add-missing)capturesessions.observation.jsonl_captureruntime/observation/jsonl_observation_admission.rs(add-missing)capture_windowsessions.observation.jsonl_capture_windowConventions followed
sessions.transcript.*,sessions.hosts.hermes.*,sessions.hosts.cursor.*,sessions.git_correlation.*,sessions.workflow_index.*,sessions.ingest.*,sessions.source.*,sessions.observation.*); no duplicate labels crate-wide.future = true; sync FS-walk/scan fns use plain#[hotpath::measure].Displayimpls, row decoders, thin wrappers,#[cfg(test)]code, and planning-only pure functions.