Skip to content

fix(manifest): use JSON file pattern during discovery - #305

Open
bobtista wants to merge 1 commit into
developmentfrom
fix/manifest-discovery-pattern
Open

fix(manifest): use JSON file pattern during discovery#305
bobtista wants to merge 1 commit into
developmentfrom
fix/manifest-discovery-pattern

Conversation

@bobtista

@bobtista bobtista commented Jul 27, 2026

Copy link
Copy Markdown

Summary

Fix manifest discovery to use the configured JSON filename pattern instead of a literal identifier, restoring recursive filesystem discovery.

Add coverage for nested manifests, non-JSON files, and malformed JSON.

Testing

  • Focused manifest tests: 7 passed.
  • Core Release suite: 1,210 passed.

Closes #302

Greptile Summary

Fixes filesystem manifest discovery by recursively matching JSON filenames instead of a literal pattern.

  • Adds coverage for nested JSON manifests and ignoring non-JSON files.
  • Adds coverage showing malformed JSON does not prevent another manifest from loading.
  • Adds per-test temporary-directory setup and cleanup.

Confidence Score: 3/5

The recursive discovery failure should be handled before merging because one inaccessible descendant can abort content discovery or manifest initialization.

The corrected pattern activates recursive traversal of user-configurable directories, but enumeration exceptions occur outside the existing recovery boundary and prevent accessible manifests from being discovered.

Files Needing Attention: GenHub/GenHub/Features/Manifest/ManifestDiscoveryService.cs

Important Files Changed

Filename Overview
GenHub/GenHub/Features/Manifest/ManifestDiscoveryService.cs Corrects the JSON search pattern, but the newly effective recursive enumeration can abort discovery when any descendant cannot be enumerated.
GenHub/GenHub.Tests/GenHub.Tests.Core/Features/Manifest/ManifestDiscoveryServiceTests.cs Adds focused filesystem coverage for nested, non-JSON, and malformed manifest files.
Prompt To Fix All With AI
Fix the following 1 code review issue. Work through them one at a time, proposing concise fixes.

---

### Issue 1 of 1
GenHub/GenHub/Features/Manifest/ManifestDiscoveryService.cs:64
**Recursive enumeration aborts discovery**

When a configured content directory contains an inaccessible or concurrently removed descendant, recursive enumeration throws outside the per-file exception handler, causing content discovery to fail or manifest initialization to abort instead of returning accessible manifests.

Reviews (1): Last reviewed commit: "fix(manifest): use JSON file pattern dur..." | Re-trigger Greptile

Greptile also left 1 inline comment on this PR.

@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@bobtista, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 8 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: b3967ac1-1116-4044-8045-d619ee962204

📥 Commits

Reviewing files that changed from the base of the PR and between 5ba2a51 and 0ddbd1d.

📒 Files selected for processing (2)
  • GenHub/GenHub.Tests/GenHub.Tests.Core/Features/Manifest/ManifestDiscoveryServiceTests.cs
  • GenHub/GenHub/Features/Manifest/ManifestDiscoveryService.cs
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/manifest-discovery-pattern

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@bobtista
bobtista marked this pull request as ready for review July 27, 2026 15:34
@bobtista bobtista self-assigned this Jul 27, 2026
{
logger.LogInformation("Scanning directory for manifests: {Directory}", directory);
var manifestFiles = Directory.EnumerateFiles(directory, "FileTypes.JsonFilePattern", SearchOption.AllDirectories);
var manifestFiles = Directory.EnumerateFiles(directory, FileTypes.JsonFilePattern, SearchOption.AllDirectories);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Recursive enumeration aborts discovery

When a configured content directory contains an inaccessible or concurrently removed descendant, recursive enumeration throws outside the per-file exception handler, causing content discovery to fail or manifest initialization to abort instead of returning accessible manifests.

Prompt To Fix With AI
This is a comment left during a code review.
Path: GenHub/GenHub/Features/Manifest/ManifestDiscoveryService.cs
Line: 64

Comment:
**Recursive enumeration aborts discovery**

When a configured content directory contains an inaccessible or concurrently removed descendant, recursive enumeration throws outside the per-file exception handler, causing content discovery to fail or manifest initialization to abort instead of returning accessible manifests.

How can I resolve this? If you propose a fix, please make it concise.

@kilo-code-bot

kilo-code-bot Bot commented Jul 27, 2026

Copy link
Copy Markdown

Code Review Summary

Status: 1 Issue Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 1
WARNING 0
SUGGESTION 0
Issue Details (click to expand)

CRITICAL

File Line Issue
GenHub/GenHub/Features/Manifest/ManifestDiscoveryService.cs 64 Recursive enumeration aborts discovery - when a configured content directory contains an inaccessible or concurrently removed descendant, recursive enumeration throws outside the per-file exception handler, causing content discovery to fail or manifest initialization to abort instead of returning accessible manifests.
Files Reviewed (2 files)
  • GenHub/GenHub/Features/Manifest/ManifestDiscoveryService.cs - 1 issue
  • GenHub/GenHub.Tests/GenHub.Tests.Core/Features/Manifest/ManifestDiscoveryServiceTests.cs - 0 issues

Fix these issues in Kilo Cloud


Reviewed by glm-4.7 · Input: 43.2K · Output: 5.7K · Cached: 462K

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