Skip to content

Skip hidden folders on codex builds#3068

Merged
cotti merged 1 commit intomainfrom
fix/codex-build
Apr 10, 2026
Merged

Skip hidden folders on codex builds#3068
cotti merged 1 commit intomainfrom
fix/codex-build

Conversation

@cotti
Copy link
Copy Markdown
Contributor

@cotti cotti commented Apr 10, 2026

This pull request improves the handling and testing of file system access in the CodexCloneService, especially around hidden directories and permission issues, and adds comprehensive unit tests for the FindDocsetFile method. It also updates project configuration to support internal visibility for testing.

Testing improvements:

  • Added a new test class FindDocsetFileTests in Navigation.Tests to cover various scenarios for CodexCloneService.FindDocsetFile, including standard and non-standard paths, skipping hidden directories, and handling cases where no docset file is found.
  • Updated the project file Elastic.Codex.csproj to include Navigation.Tests as a friend assembly, allowing tests to access internal members.

Error handling enhancements:

  • Improved exception handling in CodexCloneService.FindDocsetFile to catch both UnauthorizedAccessException and SecurityException, ensuring directories blocked by the file system (such as hidden directories) are properly skipped.
  • Added the necessary System.Security namespace import to support the enhanced exception handling.

@cotti cotti self-assigned this Apr 10, 2026
@cotti cotti added the fix label Apr 10, 2026
@cotti cotti requested a review from a team as a code owner April 10, 2026 14:51
@cotti cotti requested a review from technige April 10, 2026 14:51
@coderabbitai coderabbitai bot added chore and removed fix labels Apr 10, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 10, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: feae98fc-d233-4521-ae7c-9a1dceca682a

📥 Commits

Reviewing files that changed from the base of the PR and between 6140fa5 and 80d0699.

📒 Files selected for processing (3)
  • src/Elastic.Codex/Elastic.Codex.csproj
  • src/Elastic.Codex/Sourcing/CodexCloneService.cs
  • tests/Navigation.Tests/Codex/FindDocsetFileTests.cs

📝 Walkthrough

Walkthrough

This pull request makes three complementary changes to support improved docset file discovery testing. It grants the Navigation.Tests assembly visibility to internal members via a new ItemGroup entry in the project file. The CodexCloneService exception handling during recursive directory traversal is updated to catch both UnauthorizedAccessException and SecurityException, reflecting additional protection mechanisms. A new test class validates the FindDocsetFile method across five scenarios: standard path detection, recursive discovery in non-standard directories, hidden directory skipping via scoped filesystems, null returns for missing docsets, and node_modules exclusion.

Suggested labels

chore

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: improving handling of hidden folders during codex builds through enhanced exception handling and testing.
Description check ✅ Passed The description is clearly related to the changeset, covering the three main areas: test additions, project configuration updates, and error handling improvements.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch fix/codex-build

Comment @coderabbitai help to get the list of available commands and usage tips.

@cotti cotti merged commit e82f624 into main Apr 10, 2026
31 checks passed
@cotti cotti deleted the fix/codex-build branch April 10, 2026 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant