Remove ambient fs - #448
Conversation
Remove the unpublished `ambient_fs` workspace dependency and keep the necessary ambient operations at their application call sites. Exclude `netsuke` from `no_std_fs_operations` through `dylint.toml`, as Whitaker requires. Keep dependency automation, documentation, and lockfiles aligned with the single-crate layout. Register the crates.io installation fence so the README continues to satisfy the executable-documentation contract.
Reviewer's GuideRemove the ambient_fs crate and inline its remaining functionality into Netsuke, updating filesystem-related code paths and documentation to reflect ambient filesystem access at application boundaries while adding new clone-detection and install docs for Whitaker/Netsuke. Flow diagram for clone-detection AST feature extractionflowchart TD
A["Input: source file + ByteSpan"] --> B["lower_span validates span"]
B --> C{"parser feature enabled?"}
C -- yes --> D["parse file with ra_ap_syntax"]
D --> E["find smallest covering syntax subtree"]
E --> F["normalize subtree to NormalizedTree"]
F --> G["extract_features from NormalizedTree"]
G --> H["count syntax kinds"]
G --> I["apply depth weighting"]
G --> J["collect bigrams/trigrams"]
G --> K["compute canonical hash with PARSER_SCHEMA_VERSION"]
C -- no --> L["AstError::ParserUnavailable"]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
WalkthroughThe ChangesAmbient filesystem removal
Possibly related PRs
Suggested reviewers: Poem
Caution Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional.
❌ Failed checks (1 error, 2 warnings)
✅ Passed checks (17 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 193baff2da
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@coderabbitai review |
✅ Action performedReview finished.
|
There was a problem hiding this comment.
Actionable comments posted: 4
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.gitignore:
- Line 4: Update the swap-file ignore pattern in .gitignore from “.*.swp” to
“*.swp” so both hidden and non-hidden Vim swap files are ignored.
In `@docs/whitaker-users-guide.md`:
- Around line 694-695: Rename the heading “Clone Detection: AST Feature
Extraction” to “Clone detection: AST feature extraction” to follow sentence
case.
- Around line 43-46: Update the documentation sentence describing dylint-link
verification to say it is “not invoked directly for verification” rather than
“never executed,” while preserving the explanation that it operates as a linker
wrapper and forwards arguments to the underlying linker.
In `@dylint.toml`:
- Around line 19-22: Narrow the no_std_fs_operations exemption in dylint.toml so
it applies only to sanctioned call sites or the smallest targeted scope, rather
than excluding the entire netsuke crate; update docs/developers-guide.md to
accurately describe the resulting enforcement scope.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: e04a4ee2-b378-4d3b-a787-5ffc1bca9968
⛔ Files ignored due to path filters (2)
Cargo.lockis excluded by!**/*.locktest_support/Cargo.lockis excluded by!**/*.lock
📒 Files selected for processing (16)
.github/dependabot.yml.gitignoreCargo.tomlREADME.mdambient_fs/Cargo.tomlambient_fs/src/lib.rsdocs/developers-guide.mddocs/whitaker-users-guide.mddylint.tomlrust-toolchain.tomlsrc/runner/process/file_io.rssrc/stdlib/which/lookup/mod.rssrc/stdlib/which/lookup/workspace/mod.rssrc/stdlib/which/lookup/workspace/posix.rssrc/stdlib/which/lookup/workspace/windows.rstests/documentation_examples_tests.rs
🔗 Linked repositories identified
CodeRabbit considers these linked repositories for cross-repo context during reviews:
leynos/rstest-bdd(auto-detected)leynos/ortho-config(auto-detected)leynos/shared-actions(auto-detected)
💤 Files with no reviewable changes (4)
- ambient_fs/Cargo.toml
- ambient_fs/src/lib.rs
- Cargo.toml
- .github/dependabot.yml
Add the registry installation command alongside the source checkout flow. Extend the executable documentation contract so the user guide and README cannot silently diverge.
Summary by Sourcery
Remove the ambient_fs crate and adopt direct standard-library filesystem operations while updating documentation and tooling to reflect the new ambient filesystem strategy and installation flow.
New Features:
Enhancements:
Build:
CI:
Documentation:
Tests:
Chores: