Skip to content

fix(knowledge): fix git log parser and ISSUE_RE pattern (#151)#156

Merged
Kewton merged 1 commit intodevelopfrom
feature/issue-151-file-modifies
Mar 24, 2026
Merged

fix(knowledge): fix git log parser and ISSUE_RE pattern (#151)#156
Kewton merged 1 commit intodevelopfrom
feature/issue-151-file-modifies

Conversation

@Kewton
Copy link
Copy Markdown
Owner

@Kewton Kewton commented Mar 24, 2026

Summary

  • Git log parser fix: Empty line after COMMIT_END sentinel incorrectly set reading_files=false, causing ALL file paths to be skipped during extract_file_modifies_from_git_log. This resulted in 0 file nodes and 0 modifies edges after index command.
  • ISSUE_RE pattern fix: Added issue[-]?(\d+) pattern to capture feat(issue-99) style references that were previously unmatched.

Changes

  • Fix empty line handling in git log parser (skip instead of reset state)
  • Add capture group 5 for issue-NNN pattern in ISSUE_RE regex
  • Add 3 regression tests for the bug patterns

Test plan

  • cargo build — no errors
  • cargo clippy --all-targets -- -D warnings — 0 warnings
  • cargo test --all — 498 unit tests pass
  • cargo fmt --all -- --check — clean
  • commandindexdev index produces file nodes and modifies edges
  • commandindexdev why src/config/z-index.ts returns related Issues

Fixes #151

🤖 Generated with Claude Code

…fies extraction

Two bugs fixed:
1. Git log parser: empty line after COMMIT_END sentinel incorrectly set
   reading_files=false, causing ALL file paths to be skipped. Now empty
   lines are ignored during file reading; state resets on next COMMIT_START.
2. ISSUE_RE: added issue-NNN pattern (e.g. feat(issue-99)) which was not
   matched by existing regex. Added capture group 5 for issue[-]?(\d+).

Fixes #151

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@Kewton Kewton force-pushed the feature/issue-151-file-modifies branch from 4ab33df to adc2214 Compare March 24, 2026 23:36
@Kewton Kewton merged commit 65c7d00 into develop Mar 24, 2026
4 checks passed
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