PR #83: vcs/util.go not delivered — GetAllFilesInPath and BuildLineToPositionMap missing #84

Closed
opened 2026-05-12 19:16:18 +00:00 by rodin · 0 comments
Owner

What was missed

Issue #78 required vcs/util.go as part of this PR, containing two utility functions: GetAllFilesInPath (recursive directory traversal returning map[string]string) and BuildLineToPositionMap (unified diff parser returning per-file new-line-to-diff-position maps). The exit criteria explicitly listed unit tests for both. The PR delivered vcs/interfaces.go and vcs/types.go but omitted vcs/util.go entirely.

Source

  • PR: #83 — feat(vcs): extract interfaces and types from gitea/ (Phase 1)
  • Linked issue: #78 — feat(vcs): extract interfaces and types from gitea/ (Phase 1)
  • File: vcs/util.go (not present)

What needs to happen

  • vcs/util.go is created with GetAllFilesInPath(ctx context.Context, client FileReader, owner, repo, path string) (map[string]string, error) and BuildLineToPositionMap(diff string) map[string]map[int]int
  • Unit tests for GetAllFilesInPath: empty dir, flat dir, nested dirs, mixed
  • Unit tests for BuildLineToPositionMap: single hunk, multi-hunk, deletion lines not in map, multiple files
  • go build ./... and go test ./... pass

References

## What was missed Issue #78 required `vcs/util.go` as part of this PR, containing two utility functions: `GetAllFilesInPath` (recursive directory traversal returning `map[string]string`) and `BuildLineToPositionMap` (unified diff parser returning per-file new-line-to-diff-position maps). The exit criteria explicitly listed unit tests for both. The PR delivered `vcs/interfaces.go` and `vcs/types.go` but omitted `vcs/util.go` entirely. ## Source - PR: #83 — feat(vcs): extract interfaces and types from gitea/ (Phase 1) - Linked issue: #78 — feat(vcs): extract interfaces and types from gitea/ (Phase 1) - File: `vcs/util.go` (not present) ## What needs to happen - `vcs/util.go` is created with `GetAllFilesInPath(ctx context.Context, client FileReader, owner, repo, path string) (map[string]string, error)` and `BuildLineToPositionMap(diff string) map[string]map[int]int` - Unit tests for `GetAllFilesInPath`: empty dir, flat dir, nested dirs, mixed - Unit tests for `BuildLineToPositionMap`: single hunk, multi-hunk, deletion lines not in map, multiple files - `go build ./...` and `go test ./...` pass ## References - [PR #83](https://gitea.weiker.me/rodin/review-bot/pulls/83) - [Issue #78](https://gitea.weiker.me/rodin/review-bot/issues/78)
rodin added the bugai-review labels 2026-05-12 19:16:18 +00:00
rodin self-assigned this 2026-05-12 19:23:02 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: rodin/review-bot#84