Skip to content

Split finalization write and cleanup profile diagnostics #326

Description

@jununfly

This was generated by AI during triage.

Parent

Plan: docs/plans/2026-06-20-rust-hybrid-finalization-cleanup-diagnostics-and-batching.md

What to build

Add more specific profile diagnostics for the TypeScript-owned finalization write/cleanup tail while preserving the existing high-level profile fields. The goal is to make edge materialization, endpoint validation, edge insert, resolved-reference cleanup, intentionally-unresolved cleanup, and related row/edge counts visible enough for later optimization decisions.

Do not change graph semantics, reference disambiguation, SQLite schema, CLI/SDK/MCP behavior, or README metrics. This slice is diagnostics only.

Acceptance criteria

  • Existing high-level fields such as edgeMaterializationMs, edgeWriteMs, unresolvedCleanupMs, and databaseAccessMs remain present.
  • Profile diagnostics expose sub-buckets or equivalent fields that answer: endpoint validation time, edge insert time, resolved cleanup time, intentionally unresolved cleanup time, inserted edge count, resolved cleanup row count, and intentionally unresolved cleanup row count.
  • A deterministic profile-shape test covers the new fields.
  • Existing profile/status/doctor consumers continue to pass.
  • No schema, disambiguation, import/framework, dynamic-dispatch, or user-facing behavior changes.

Blocked by

None - can start immediately

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestready-for-agentFully specified and ready for an AFK agent

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions