Skip to content

Conversation

zhangfengcdt
Copy link
Owner

@zhangfengcdt zhangfengcdt commented Jul 23, 2025

This PR addresses the issue where VersionedKvStore::commit() was creating two separate git commits: one for the main data changes and another for prolly metadata files (prolly_config_tree_config and prolly_hash_mappings). The changes consolidate these into a single atomic commit.

Changes Made

Core Changes

  • Modified VersionedKvStore::commit() (src/git/versioned_store.rs:257-291)
    • Updated create_git_tree() to stage prolly metadata files before creating the git tree using git add and git
      write-tree
    • Removed the separate commit_prolly_metadata() call that was creating the second commit
    • Maintains the same functionality while reducing commit count from 2 to 1
  • Updated VersionedKvStore::init() (src/git/versioned_store.rs:104-114)
    • Removed the extra metadata commit after initialization
    • Now creates only the initial commit which includes metadata files
  • Removed unused function (src/git/versioned_store.rs)
    • Deleted commit_prolly_metadata() function as it's no longer needed
    • Function was only used for creating separate metadata commits

@zhangfengcdt zhangfengcdt marked this pull request as draft July 23, 2025 04:24
@zhangfengcdt zhangfengcdt marked this pull request as ready for review July 23, 2025 04:24
@zhangfengcdt zhangfengcdt force-pushed the feature/ai.agent.financial_advisor7 branch from 6cd9feb to a9fbd97 Compare July 23, 2025 04:39
@zhangfengcdt zhangfengcdt requested a review from Copilot July 23, 2025 13:58
@zhangfengcdt zhangfengcdt changed the title Fix the history command for finance advisor example Consolidate VersionedKvStore commits to eliminate duplicate metadata commits Jul 23, 2025
@zhangfengcdt zhangfengcdt merged commit fb7d810 into main Jul 23, 2025
2 checks passed
@zhangfengcdt zhangfengcdt deleted the feature/ai.agent.financial_advisor7 branch July 29, 2025 00:01
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