Skip to content

Final stabilization pass for VFS and Swarm#283

Merged
iberi22 merged 2 commits intomainfrom
chore/final-stabilization-pass-7871503102391225519
Apr 20, 2026
Merged

Final stabilization pass for VFS and Swarm#283
iberi22 merged 2 commits intomainfrom
chore/final-stabilization-pass-7871503102391225519

Conversation

@iberi22
Copy link
Copy Markdown
Owner

@iberi22 iberi22 commented Apr 16, 2026

This commit completes a final stabilization pass for the gestalt-rust project.
Key changes:

  • Replaced unwrap() with expect() or proper error handling in gestalt_core/src/application/indexer.rs.
  • Introduced IndexerError using thiserror for domain-specific error handling in Indexer.
  • Added RustDoc examples to VirtualFileSystem trait methods in vfs.rs.
  • Updated ARCHITECTURE.md with detailed VFS overlay architecture and merge logic.
  • Created gestalt_swarm/README.md with CLI usage instructions.
  • Added integration tests for OverlayFs merge logic to verify isolation and Copy-on-Write semantics.
  • Verified workspace-wide compilation and formatting.

Fixes #282


PR created automatically by Jules for task 7871503102391225519 started by @iberi22

@google-labs-jules
Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 16, 2026

Warning

Rate limit exceeded

@iberi22 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 56 minutes and 42 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 56 minutes and 42 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 5915c09e-5791-48c1-bdb8-b4cad2a7aad0

📥 Commits

Reviewing files that changed from the base of the PR and between 0f6cfe3 and ebdcfaf.

📒 Files selected for processing (3)
  • gestalt_core/src/application/indexer.rs
  • gestalt_core/src/ports/outbound/vfs.rs
  • gestalt_swarm/README.md
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/final-stabilization-pass-7871503102391225519

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 and usage tips.

@github-actions
Copy link
Copy Markdown
Contributor

🤖 Guardian Decision: AUTO-MERGE (Confidence: 100%)

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request updates the architecture documentation for VFS isolation, introduces a custom IndexerError type in gestalt_core, and transitions the VectorAdapter trait to use anyhow::Result. It also adds documentation and tests for the VirtualFileSystem trait and provides a README for the gestalt_swarm crate. Feedback includes removing redundant map_err calls where thiserror's #[from] attribute handles conversion, adopting more idiomatic error handling in tests using the ? operator, addressing an unused error variant, and maintaining consistency in documentation examples.

Comment on lines +45 to +46
#[error("Other error: {0}")]
Other(String),
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The Other variant in the IndexerError enum is currently unused within the codebase. If this is intended for future use, consider adding a TODO comment or removing it to keep the public API clean and avoid dead code.

let path = PathBuf::from(url).canonicalize()?;
let path = PathBuf::from(url)
.canonicalize()
.map_err(IndexerError::Io)?;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The explicit map_err(IndexerError::Io) is redundant here. Since IndexerError implements From<std::io::Error> via the #[from] attribute and the function returns Result<..., IndexerError>, the ? operator will automatically perform the conversion.

Suggested change
.map_err(IndexerError::Io)?;
.canonicalize()?

let content = std::fs::read_to_string(file_path)?;
let relative_path = file_path
.strip_prefix(root)
.map_err(IndexerError::StripPrefix)?
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

This map_err is redundant. IndexerError already implements From<std::path::StripPrefixError>, so the ? operator will handle the conversion automatically.

Suggested change
.map_err(IndexerError::StripPrefix)?
.strip_prefix(root)?

.map_err(IndexerError::StripPrefix)?
.to_string_lossy()
.to_string();
let content = std::fs::read_to_string(file_path).map_err(IndexerError::Io)?;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

This map_err is redundant. IndexerError already implements From<std::io::Error>, so the ? operator will handle the conversion automatically.

Suggested change
let content = std::fs::read_to_string(file_path).map_err(IndexerError::Io)?;
let content = std::fs::read_to_string(file_path)?;

fn test_scan() {
let dir = tempdir().unwrap();
fn test_scan() -> anyhow::Result<()> {
let dir = tempdir().expect("failed to create temp dir");
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

Since the test function now returns anyhow::Result<()>, it is more idiomatic to use the ? operator instead of expect(). This allows the test runner to handle errors gracefully and provides a cleaner syntax. This applies to all subsequent expect() calls in this test as well.

Suggested change
let dir = tempdir().expect("failed to create temp dir");
let dir = tempdir()?;

/// # use gestalt_core::ports::outbound::vfs::{VirtualFileSystem, OverlayFs};
/// # tokio_test::block_on(async {
/// let vfs = OverlayFs::new();
/// let data = vfs.read(Path::new("hello.txt")).await;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

For consistency with the other examples in this trait (see lines 83 and 97), consider handling the Result returned by read(), for example by using .unwrap() or .expect().

let data = vfs.read(Path::new("hello.txt")).await.unwrap();

@github-actions
Copy link
Copy Markdown
Contributor

📊 Benchmark Summary

Comparing Python memory benchmarks...
✅ No regressions detected.

Comparing Rust core benchmarks...
Current results not found: benchmarks/rust_current.json

@github-actions
Copy link
Copy Markdown
Contributor

🤖 Guardian Decision: AUTO-MERGE (Confidence: 100%)

@iberi22 iberi22 marked this pull request as ready for review April 20, 2026 01:35
@iberi22 iberi22 merged commit 34aefb0 into main Apr 20, 2026
6 of 8 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.

chore: Final stabilization pass

1 participant