Skip to content

refactor: reorganize recoco-splitters module structure to match upstream#107

Merged
bashandbone merged 5 commits intomainfrom
claude/issue-101-20260316-1659
Mar 17, 2026
Merged

refactor: reorganize recoco-splitters module structure to match upstream#107
bashandbone merged 5 commits intomainfrom
claude/issue-101-20260316-1659

Conversation

@bashandbone
Copy link
Copy Markdown
Contributor

Summary

This PR syncs the module structure of recoco-splitters with upstream CocoIndex changes from PRs #1751 and #1752.

Changes

  • Moved output_positions.rs from split/ to crate root (upstream PR #1751)
  • Moved by_separators.rs and recursive.rs from split/ to crate root (upstream PR #1752)
  • Updated import paths in moved files (super::crate::)
  • Updated split/mod.rs to re-export from crate root
  • Updated lib.rs to declare new root-level modules

Testing

  • All 25 tests pass ✅
  • Public API unchanged — all types still accessible via recoco_splitters::split::*
  • No downstream code affected

Fixes #101


Generated with Claude Code

github-actions bot and others added 2 commits March 16, 2026 17:06
Move output_positions, by_separators, and recursive modules from
src/split/ to crate root, matching upstream CocoIndex structure
changes from PRs #1751 and #1752.

Changes:
- Move output_positions.rs to src/ (from src/split/)
- Move by_separators.rs to src/ (from src/split/)
- Move recursive.rs to src/ (from src/split/)
- Update all imports to use crate:: paths
- Simplify split/mod.rs to only contain type definitions
- Re-export public items at crate level in lib.rs

This is a purely structural change with no behavioral impact.
All tests pass and the public API is preserved.

Fixes #101

Co-authored-by: Adam Poulemanos <github-actions[bot]@users.noreply.github.com>
Move output_positions.rs, by_separators.rs, and recursive.rs from split/
subdirectory to crate root, matching upstream CocoIndex structure from PRs
#1751 and #1752.

Changes:
- Move output_positions.rs to crate root (upstream PR #1751)
- Move by_separators.rs and recursive.rs to crate root (upstream PR #1752)
- Update import paths in moved files (super:: → crate::)
- Update split/mod.rs to re-export from crate root
- Update lib.rs to declare new root-level modules

Public API remains unchanged. All 25 tests pass.

Fixes #101

Co-authored-by: Adam Poulemanos <github-actions[bot]@users.noreply.github.com>
Copilot AI review requested due to automatic review settings March 16, 2026 17:12
@bashandbone bashandbone added the upstream-sync Issues for syncing updates with our upstream (cocoindex-io/cocoindex) label Mar 16, 2026
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages bot commented Mar 16, 2026

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
❌ Deployment failed
View logs
recoco-docs 017751c Mar 17 2026, 07:30 PM

@github-actions
Copy link
Copy Markdown
Contributor

🤖 Hi @bashandbone, I've received your request, and I'm working on it now! You can track my progress in the logs for more details.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Refactors recoco-splitters’ module layout to mirror upstream CocoIndex (ops_text) restructuring, while keeping the public API available under recoco_splitters::split::*.

Changes:

  • Moved separator-based splitting, recursive chunking, and output-position logic to crate-root modules.
  • Updated split module to re-export splitter APIs from crate root and adjusted import paths accordingly.
  • Updated lib.rs module declarations to include the new root-level modules.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
crates/recoco-splitters/src/lib.rs Declares new crate-root modules (by_separators, recursive, output_positions) while keeping split public.
crates/recoco-splitters/src/split/mod.rs Switches split to re-export types from crate-root modules (preserving external API).
crates/recoco-splitters/src/by_separators.rs Crate-root implementation of separator-based splitting.
crates/recoco-splitters/src/recursive.rs Crate-root implementation of recursive syntax-aware chunking.
crates/recoco-splitters/src/output_positions.rs Crate-root internal helper for computing output positions from byte offsets.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +19 to 22
pub use crate::by_separators::{KeepSeparator, SeparatorSplitConfig, SeparatorSplitter};
pub use crate::recursive::{
CustomLanguageConfig, RecursiveChunkConfig, RecursiveChunker, RecursiveSplitConfig,
};
@bashandbone
Copy link
Copy Markdown
Contributor Author

@copilot open a new pull request to apply changes based on the comments in this thread

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 16, 2026

@bashandbone I've opened a new pull request, #108, to work on those changes. Once the pull request is ready, I'll request review from you.

…lit/` (#108)

* Initial plan

* refactor: delete stale duplicate files from src/split/

Co-authored-by: bashandbone <89049923+bashandbone@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: bashandbone <89049923+bashandbone@users.noreply.github.com>
@bashandbone
Copy link
Copy Markdown
Contributor Author

@copilot Please feature gate the splitters such that they can both be gated, but keep the defaults the same.

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 16, 2026

@bashandbone I've opened a new pull request, #109, to work on those changes. Once the pull request is ready, I'll request review from you.

* Initial plan

* feat(recoco-splitters): feature gate splitter-separator and splitter-recursive

Co-authored-by: bashandbone <89049923+bashandbone@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: bashandbone <89049923+bashandbone@users.noreply.github.com>
@bashandbone
Copy link
Copy Markdown
Contributor Author

@copilot you need to run the tests next time, because the suite is broken on ungated usage. Please correct it.

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 17, 2026

@bashandbone I've opened a new pull request, #110, to work on those changes. Once the pull request is ready, I'll request review from you.

* Initial plan

* fix: add dep:notify to source-local-file feature

Co-authored-by: bashandbone <89049923+bashandbone@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: bashandbone <89049923+bashandbone@users.noreply.github.com>
@bashandbone bashandbone merged commit 68a5576 into main Mar 17, 2026
35 of 37 checks passed
@bashandbone bashandbone deleted the claude/issue-101-20260316-1659 branch March 17, 2026 19:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

upstream-sync Issues for syncing updates with our upstream (cocoindex-io/cocoindex)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[upstream-sync] ops_text module refactor: move output_positions and split elements (upstream PRs #1751, #1752)

3 participants