refactor: align with reflexio's window_size/stride_size config rename#12
refactor: align with reflexio's window_size/stride_size config rename#12
Conversation
Reflexio renamed Config.batch_size/batch_interval to window_size/stride_size in 0.2.20. Track that rename in the plugin: bump the floor to >=0.2.20, mirror the field names in the dashboard form + types, in the SessionStart hook constants, in the adapter call site, and in tests. Rename the adapter method to apply_extraction_defaults to match the new semantics. Reflexio still exposes the old field names as deprecated aliases, so existing servers are unaffected at the wire level. Also refresh the dashboard screenshots and tighten the README "stop repeating mistakes" example.
📝 WalkthroughWalkthroughThe PR replaces the batch-based configuration model (batch_size, batch_interval) with an extraction-based model (window_size, stride_size) across the UI, types, adapter logic, and tests, and bumps the reflexio-ai dependency to support these new fields. ChangesConfiguration Model Refactoring: Batch → Extraction
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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 `@reflexio`:
- Line 1: The repository's git submodule is pointing at an unreleased commit
b8ac1b0e92b703f3776b93a9f4d240b332d7981e (post-release) while the project claims
reflexio v0.2.20 (tag 9da73f80) and dependency pin reflexio-ai>=0.2.20; fix by
either updating the submodule to the official release commit (reset the
submodule to tag 9da73f80) or, if the newer commit is intentional, update the
dependency declaration and documentation to reference the unreleased commit/SHA
and adjust the version pin (e.g., require reflexio-ai>=0.2.21 or a git+ssh URL
to that SHA) so the stated dependency and the submodule SHA are consistent.
🪄 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: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 1529381c-dda3-4218-b847-8cac53ae3fbc
⛔ Files ignored due to path filters (3)
assets/playbook_dashboard.pngis excluded by!**/*.pngassets/profile_dashboard.pngis excluded by!**/*.pngplugin/uv.lockis excluded by!**/*.lock
📒 Files selected for processing (9)
README.mdplugin/dashboard/app/configure/server/page.tsxplugin/dashboard/lib/types.tsplugin/pyproject.tomlplugin/src/claude_smart/events/session_start.pyplugin/src/claude_smart/reflexio_adapter.pyreflexiotests/test_adapter.pytests/test_events.py
| @@ -1 +1 @@ | |||
| Subproject commit 9da73f80456365abc6f756b3742059d4e50b019d | |||
| Subproject commit b8ac1b0e92b703f3776b93a9f4d240b332d7981e | |||
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Confirm the submodule commit exists upstream and matches the 0.2.20 release tag.
set -e
# Show the configured submodule URL
cat .gitmodules || true
SHA="b8ac1b0e92b703f3776b93a9f4d240b332d7981e"
# Try to resolve via GitHub API (no clone needed) against the likely upstream repo.
echo "--- Commit metadata ---"
gh api "repos/ReflexioAI/reflexio/commits/${SHA}" \
--jq '{sha, message: .commit.message, author: .commit.author.name, date: .commit.author.date}' || true
echo "--- Tags pointing at this commit ---"
gh api "repos/ReflexioAI/reflexio/git/refs/tags" \
--jq '.[] | select(.object.sha=="'"${SHA}"'") | .ref' || true
echo "--- Release named 0.2.20 (if any) ---"
gh api "repos/ReflexioAI/reflexio/releases/tags/0.2.20" \
--jq '{tag_name, target_commitish, name, published_at}' || trueRepository: ReflexioAI/claude-smart
Length of output: 2370
🏁 Script executed:
#!/bin/bash
# Check all recent releases and tags in reflexio repo to understand versioning
echo "=== Recent releases ==="
gh api "repos/ReflexioAI/reflexio/releases" \
--jq '.[] | {tag_name, name, published_at, draft, prerelease}' \
--paginate | head -20 || true
echo ""
echo "=== Recent tags ==="
gh api "repos/ReflexioAI/reflexio/git/refs/tags" \
--jq '.[] | .ref' \
--paginate | head -20 || true
echo ""
echo "=== Verify if commit is on main/default branch ==="
SHA="b8ac1b0e92b703f3776b93a9f4d240b332d7981e"
gh api "repos/ReflexioAI/reflexio/commits/${SHA}" \
--jq '.commit.message[:100]' && echo "Commit verified in repo" || trueRepository: ReflexioAI/claude-smart
Length of output: 415
🏁 Script executed:
#!/bin/bash
# Verify v0.2.20 tag points to the correct commit
SHA="b8ac1b0e92b703f3776b93a9f4d240b332d7981e"
echo "=== v0.2.20 tag details ==="
gh api "repos/ReflexioAI/reflexio/git/refs/tags/v0.2.20" \
--jq '.object' || true
echo ""
echo "=== All tags with their commit SHAs ==="
gh api "repos/ReflexioAI/reflexio/git/refs/tags" \
--jq '.[] | select(.ref | contains("v0.2")) | {ref, sha: .object.sha}' \
--paginate || trueRepository: ReflexioAI/claude-smart
Length of output: 787
🏁 Script executed:
#!/bin/bash
# Get the commit that v0.2.20 tag points to
TAG_OBJECT_SHA="ecfb1682942aa3cacf077f896569f97b8bff73ea"
EXPECTED_COMMIT="b8ac1b0e92b703f3776b93a9f4d240b332d7981e"
echo "=== Tag object details (to find target commit) ==="
gh api "repos/ReflexioAI/reflexio/git/tags/${TAG_OBJECT_SHA}" \
--jq '{tagger: .tagger.name, message: .message[:200], object: .object}' || true
echo ""
echo "=== Alternative: Get v0.2.20 tag dereferenced to commit ==="
gh api "repos/ReflexioAI/reflexio/commits/v0.2.20" \
--jq '.sha' || true
echo ""
echo "Expected submodule commit: ${EXPECTED_COMMIT}"Repository: ReflexioAI/claude-smart
Length of output: 524
🏁 Script executed:
#!/bin/bash
# Check if submodule commit is a descendant of v0.2.20 or unrelated
SUBMODULE_COMMIT="b8ac1b0e92b703f3776b93a9f4d240b332d7981e"
V0220_COMMIT="9da73f80456365abc6f756b3742059d4e50b019d"
echo "=== Submodule commit details ==="
gh api "repos/ReflexioAI/reflexio/commits/${SUBMODULE_COMMIT}" \
--jq '{sha, date: .commit.author.date, message: .commit.message[:150]}' || true
echo ""
echo "=== v0.2.20 release commit details ==="
gh api "repos/ReflexioAI/reflexio/commits/${V0220_COMMIT}" \
--jq '{sha, date: .commit.author.date, message: .commit.message[:150]}' || true
echo ""
echo "=== Check if submodule commit is reachable from main/default branch ==="
gh api "repos/ReflexioAI/reflexio" \
--jq '.default_branch' || true
echo ""
echo "=== Commits since v0.2.20 (latest on default branch) ==="
gh api "repos/ReflexioAI/reflexio/commits" \
--jq '.[] | {sha, message: .commit.message[:80]}' \
--paginate | head -10 || trueRepository: ReflexioAI/claude-smart
Length of output: 1834
Submodule commit does not match reflexio 0.2.20 release—points to unreleased code instead.
The submodule SHA b8ac1b0e92b703f3776b93a9f4d240b332d7981e (dated 2026-05-04, PR #41: rename batch_size → window_size) is committed AFTER the v0.2.20 release tag 9da73f80 (dated 2026-05-03). This creates a critical mismatch: the PR claims alignment with reflexio 0.2.20, and the dependency pin specifies reflexio-ai>=0.2.20, but the submodule actually points to unreleased post-0.2.20 code. Either pin the submodule to the actual v0.2.20 release commit, or clarify that an unreleased version is intentional and ensure dependency pins reflect this.
🤖 Prompt for 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.
In `@reflexio` at line 1, The repository's git submodule is pointing at an
unreleased commit b8ac1b0e92b703f3776b93a9f4d240b332d7981e (post-release) while
the project claims reflexio v0.2.20 (tag 9da73f80) and dependency pin
reflexio-ai>=0.2.20; fix by either updating the submodule to the official
release commit (reset the submodule to tag 9da73f80) or, if the newer commit is
intentional, update the dependency declaration and documentation to reference
the unreleased commit/SHA and adjust the version pin (e.g., require
reflexio-ai>=0.2.21 or a git+ssh URL to that SHA) so the stated dependency and
the submodule SHA are consistent.
- README: link join URL https://discord.gg/Jbft3jPn with a Discord-branded shields.io badge. - Dashboard/Playbooks/Profiles empty states: drop the obsolete `/smart-sync` reference (no such command) and explain that extraction happens automatically as you keep using Claude.
Summary
Config.batch_size/batch_interval→window_size/stride_size(the old names remain as deprecated aliases).reflexio-aifloor to>=0.2.20and rename every reference (dashboard form + types, SessionStart hook constants, adapter call site, tests) to the canonical names.Adapter.apply_batch_defaults→Adapter.apply_extraction_defaultsso the method name no longer suggests a batch-processing semantics that doesn't exist anymore./smart-syncreference from dashboard empty-state copy — there is no such command; extraction is automatic.Changes
Plugin runtime
plugin/pyproject.toml— pinreflexio-ai>=0.2.20.plugin/uv.lock— re-resolved against PyPI 0.2.20.plugin/src/claude_smart/reflexio_adapter.py— renameapply_batch_defaults→apply_extraction_defaults; reads/writesconfig.window_size/config.stride_size.plugin/src/claude_smart/events/session_start.py— constants renamed to_CLAUDE_SMART_WINDOW_SIZE/_CLAUDE_SMART_STRIDE_SIZE; updated call site and comment.Dashboard
plugin/dashboard/lib/types.ts— swapbatch_size/batch_intervalforwindow_size/stride_sizeonReflexioConfig.plugin/dashboard/app/configure/server/page.tsx— bind the two number inputs to the renamed fields.plugin/dashboard/app/{dashboard,playbooks,profiles}/page.tsx— empty-state copy no longer references the non-existent/smart-synccommand; explains that extraction happens automatically as you keep using Claude.Submodule + assets
reflexio— bump to commitb8ac1b0(the rename commit, version 0.2.20).assets/playbook_dashboard.png,assets/profile_dashboard.png— refreshed screenshots.Docs
README.md— replace the "Stop repeating the same mistakes" example with a transferable major-version-bump scenario; add a Discord badge linking to the community server.Tests
tests/test_adapter.py— update_ConfigClientand the fourapply_extraction_defaults_*tests to the new field/method names.tests/test_events.py— renametest_session_start_applies_claude_smart_extraction_defaultsand the matching stub method; assertion now reads{"window_size": 5, "stride_size": 3}.Test Plan
uv run pytest tests/test_adapter.py tests/test_events.py -k "extraction_defaults or session_start_applies"→ 5 passed.uv run ruff checkon changed Python files → clean.uv run pyrighton changed Python files → 0 errors.npx tsc --noEmitandnpx biome checkon changed dashboard files → clean.window_size/stride_sizeagainst a running reflexio 0.2.20 backend (steady-state SessionStart should be a single GET; only the first SessionStart against a fresh server triggers aset_config).Summary by CodeRabbit
Documentation
Refactor
Dependencies