Skip to content

feat(search): expose semantic index build timings#82

Open
Suknna wants to merge 1 commit into
cortexkit:mainfrom
Suknna:semantic-index-observability
Open

feat(search): expose semantic index build timings#82
Suknna wants to merge 1 commit into
cortexkit:mainfrom
Suknna:semantic-index-observability

Conversation

@Suknna
Copy link
Copy Markdown
Contributor

@Suknna Suknna commented Jun 2, 2026

Summary

  • Add elapsed_ms and stage_elapsed_ms to semantic index build progress/status.
  • Reuse the existing semantic progress/status pipeline and debounced status_changed push frame.
  • Keep the change observational only: no storage format, search behavior, or UI changes.

Context

Related issue: #81

stage_elapsed_ms starts when AFT first observes a stage transition in semantic progress events. This keeps the implementation small and avoids adding a new metrics subsystem before deeper performance work.

Verification

  • cargo fmt -p agent-file-tools -- --check
  • cargo check -p agent-file-tools
  • cargo test -p agent-file-tools status_exposes_semantic_build_timings
  • cargo test -p agent-file-tools semantic_progress_event_pushes_status_snapshot
  • cargo test -p agent-file-tools building_status_returns_lexical_fallback_results
  • cargo test -p agent-file-tools natural_language_auto_falls_back_to_grep_while_semantic_builds
  • cargo test -p agent-file-tools lexical_only_fallback_reports_more_available_when_capped_or_over_top_k

View with Codesmith Autofix with Codesmith
Need help on this PR? Tag @codesmith with what you need. Autofix is disabled.


Summary by cubic

Expose semantic index build timings (total elapsed_ms and per-stage stage_elapsed_ms) in progress events and the status API to improve observability while indexing. Observational only; no changes to search behavior, storage, or UI. Related to #81.

  • New Features
    • Add elapsed_ms and stage_elapsed_ms to SemanticIndexEvent::Progress and surface them in the status JSON and debounced status_changed push frames.
    • Track stage transitions to compute stage_elapsed_ms and reuse the existing progress pipeline.
    • Update configure/build flow to emit timings; warmup and search handlers accept the new fields without behavior changes.

Written for commit 638b4c1. Summary will update on new commits.

Review in cubic

Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

No issues found across 7 files

Re-trigger cubic

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