Skip to content

Isolate repository validation from generated worktrees - #91

Merged
ProGraMajster merged 1 commit into
masterfrom
codex/issue-83-repository-validation-isolation
Aug 20, 2026
Merged

Isolate repository validation from generated worktrees#91
ProGraMajster merged 1 commit into
masterfrom
codex/issue-83-repository-validation-isolation

Conversation

@ProGraMajster

Copy link
Copy Markdown
Owner

Summary

Repository-level validation now distinguishes tracked source files from generated artifacts and nested worktrees, eliminating false positives without hiding real source-tree inconsistencies.

Root cause

ReleaseVersionConsistencyTests previously scanned the filesystem recursively and could discover projects inside artifacts/, including complete nested worktrees with historical package versions.

Solution

  • prefer tracked-file enumeration through local git ls-files when Git metadata is available
  • provide a bounded, safe filesystem fallback for source archives and unavailable Git metadata
  • exclude generated directories by complete path segment rather than substring
  • normalize the repository root and reject unsafe or escaping paths
  • prune nested worktrees represented by either a .git directory or worktree file
  • avoid following reparse points, symlinks, and junctions
  • return deterministic, ordinally sorted repository-relative results and diagnostics

Regression coverage

Coverage includes:

  • generated artifacts content and complete nested worktrees
  • bin and obj
  • nested .git directories and worktree files
  • similarly named source directories such as ArtifactsDocumentation, BinaryTools, and ObjectModel
  • Windows and Unix path separators and case handling
  • repository-root resolution and no-Git fallback
  • unsafe path traversal and reparse points
  • confirmation that a real source-tree version inconsistency is still detected

Validation

  • dotnet restore .\ModernFormsNext.slnx: passed
  • full Debug build: passed, 0 warnings / 0 errors
  • full Release build: passed, 0 warnings / 0 errors
  • all automated tests: 1140/1140 passed
  • RepositoryFileEnumeratorTests: 28/28 passed
  • ReleaseVersionConsistencyTests: 5/5 passed with three existing nested worktrees under artifacts/
  • release documentation script tests: 32/32 assertions passed
  • VSIX Debug and Release validation: passed, 0 warnings / 0 errors
  • release packages: 8 NuGet and 7 symbol packages validated
  • git diff --check: passed

Closes #83

- centralize repository source traversal rules
- exclude generated artifacts and nested worktrees from repository validation
- preserve detection of real source-tree inconsistencies
- harden root/path handling across Windows and CI
- add regression coverage for generated and nested checkout content
@ProGraMajster
ProGraMajster marked this pull request as ready for review August 20, 2026 16:06
@ProGraMajster
ProGraMajster merged commit 60fc4b9 into master Aug 20, 2026
1 check passed
@ProGraMajster
ProGraMajster deleted the codex/issue-83-repository-validation-isolation branch August 20, 2026 16:13
@github-project-automation github-project-automation Bot moved this from Backlog to Done in ModernFormsNext Roadmap Aug 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Isolate repository validation from nested worktrees and artifacts

1 participant