Skip to content

fix(tui): update graph metrics every turn, not only on extraction#1934

Merged
bug-ops merged 2 commits intomainfrom
1932-graph-metrics-zero
Mar 16, 2026
Merged

fix(tui): update graph metrics every turn, not only on extraction#1934
bug-ops merged 2 commits intomainfrom
1932-graph-metrics-zero

Conversation

@bug-ops
Copy link
Copy Markdown
Owner

@bug-ops bug-ops commented Mar 16, 2026

Summary

  • sync_graph_counts() was called only from persistence.rs after a graph extraction event, leaving entity/edge/community counts at zero on startup and during turns that do not trigger extraction
  • Added a per-turn call to sync_graph_counts() in process_user_message_inner after analyze_and_learn() — startup calls (check_vector_store_health + sync_graph_counts in runner.rs) were already in place
  • The function is guarded with early-return when graph store is absent, so the change is safe for non-graph-memory configurations

Test plan

  • Build passes: cargo build --features full
  • No clippy warnings: cargo clippy --workspace --features full -- -D warnings
  • All tests pass: cargo nextest run --config-file .github/nextest.toml --workspace --features full --lib --bins (6098 passed)
  • Manual: enable [memory.graph] enabled = true, have a conversation to populate graph data, restart agent, open TUI — entity/edge/community counts should reflect actual DB values immediately

Closes #1932

sync_graph_counts() was only called from persistence.rs after a graph
extraction event fired, leaving entity/edge/community counts at zero on
startup and during turns that do not trigger extraction.

Add a per-turn call to sync_graph_counts() in process_user_message_inner,
after analyze_and_learn(). Startup calls (check_vector_store_health and
sync_graph_counts in runner.rs) were already present.

Closes #1932
@github-actions github-actions bot added the bug Something isn't working label Mar 16, 2026
@bug-ops bug-ops enabled auto-merge (squash) March 16, 2026 22:07
@github-actions github-actions bot added documentation Improvements or additions to documentation rust Rust code changes core zeph-core crate size/XS Extra small PR (1-10 lines) and removed bug Something isn't working labels Mar 16, 2026
@github-actions github-actions bot added the bug Something isn't working label Mar 16, 2026
@bug-ops bug-ops merged commit 3facf15 into main Mar 16, 2026
20 checks passed
@bug-ops bug-ops deleted the 1932-graph-metrics-zero branch March 16, 2026 22:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working core zeph-core crate documentation Improvements or additions to documentation rust Rust code changes size/XS Extra small PR (1-10 lines)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(tui): graph memory metrics always zero — sync_graph_counts not called at startup or per-turn

1 participant