Skip to content

refactor: split distill and graph endpoint modules (v2.59.3) - #302

Merged
Lyellr88 merged 4 commits into
MARM-mainfrom
refactor/file-splits-4
Oct 7, 2026
Merged

Lyellr88 merged 4 commits into
MARM-mainfrom
refactor/file-splits-4

Conversation

@Lyellr88

@Lyellr88 Lyellr88 commented Oct 7, 2026 •

Copy link
Copy Markdown
Owner

Module Splits, Part 3 (v2.59.3)

Two more server modules over the file-length limit are split into smaller modules with no change in behavior.

  • core/distill.py (now 495 lines) moves its sentence scoring patterns, _shape_score, and the text cleanup helpers to core/distill_selection.py.
  • endpoints/graph.py (now 561 lines) moves the Console request and response models to endpoints/graph_models.py, and the project root, delete, and memory-linking helpers to endpoints/graph_projects.py.

Moved code is verbatim, checked against the original with a line-multiset diff. The only test change retargets two patches in the project-delete test to graph_projects, where those helpers are now read. The version moves to 2.59.3 with a changelog entry, and CONTRIBUTING.md lists the new modules.

The version-surface files (settings.py and the READMEs) overlap with open PRs #296, #297 and #300, so expect small conflicts on those lines when they merge.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Release
    • Updated the displayed product and server version to 2.59.3 across release information, installation guidance, and deployment metadata.
  • Documentation
    • Updated project structure references to reflect the current organization of graph and memory-processing components.

Lyellr88 and others added 4 commits October 7, 2026 03:03
Moves the spaCy scoring patterns, _shape_score and the text helpers into core/distill_selection.py. Moved code is verbatim and distill.py keeps importing every name it exposed, so callers and tests are unchanged.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Moves the Console request and response models to graph_models.py and the project root, delete and memory-linking helpers to graph_projects.py. Moved code is verbatim. The delete-flow test now patches graph_projects, where those helpers are read.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@Lyellr88 Lyellr88 added the chore Maintenance with no user-facing change label Oct 7, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-07T07:23:30.089917Z 7f54df1 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: Lyellr88/marm-memory/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 88769fcc-7b70-4e2e-b0d0-13e6b05b3569
📥 Commits

Reviewing files that changed from the base of the PR and between 990a013 and 7f54df1.

📒 Files selected for processing (19)
  • CHANGELOG.md
  • CONTRIBUTING.md
  • README.md
  • docs/INSTALL-LINUX.md
  • docs/INSTALL-WINDOWS.md
  • marm-mcp-server/Dockerfile
  • marm-mcp-server/README.md
  • marm-mcp-server/docker-compose.yml
  • marm-mcp-server/marm_mcp_server/__init__.py
  • marm-mcp-server/marm_mcp_server/config/settings.py
  • marm-mcp-server/marm_mcp_server/core/distill.py
  • marm-mcp-server/marm_mcp_server/core/distill_selection.py
  • marm-mcp-server/marm_mcp_server/endpoints/graph.py
  • marm-mcp-server/marm_mcp_server/endpoints/graph_models.py
  • marm-mcp-server/marm_mcp_server/endpoints/graph_projects.py
  • marm-mcp-server/marm_mcp_server/resources/marm-docs/README.md
  • marm-mcp-server/pyproject.toml
  • marm-mcp-server/server.json
  • marm-mcp-server/tests/test_graph_auto_index.py

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.

📜 Recent review details
⏰ Context from checks skipped due to timeout. (5)
  • GitHub Check: Analyze (python)
  • GitHub Check: Analyze (javascript-typescript)
  • GitHub Check: docker
  • GitHub Check: Analyze (actions)
  • GitHub Check: python
🧰 Additional context used
📓 Path-based instructions (3)
Focus on tests that are flaky, non-isolated, incorrectly asserting behavior, or missing coverage for a changed high-risk path.

⚙️ CodeRabbit configuration file

Files:

  • marm-mcp-server/tests/test_graph_auto_index.py
Only flag documentation issues that are materially wrong, misleading for installation/release behavior, or inconsistent with live MCP behavior.

⚙️ CodeRabbit configuration file

Files:

  • docs/INSTALL-WINDOWS.md
  • marm-mcp-server/README.md
  • docs/INSTALL-LINUX.md
  • README.md
  • marm-mcp-server/marm_mcp_server/resources/marm-docs/README.md
  • CHANGELOG.md
  • CONTRIBUTING.md
Prioritize runtime correctness, async/concurrency safety, SQLite transaction safety, auth/rate-limit behavior, release-breaking packaging issues, and MCP protocol compatibility.

⚙️ CodeRabbit configuration file

Files:

  • marm-mcp-server/marm_mcp_server/config/settings.py
  • marm-mcp-server/marm_mcp_server/__init__.py
  • marm-mcp-server/tests/test_graph_auto_index.py
  • marm-mcp-server/marm_mcp_server/endpoints/graph_projects.py
  • marm-mcp-server/marm_mcp_server/core/distill.py
  • marm-mcp-server/marm_mcp_server/core/distill_selection.py
  • marm-mcp-server/marm_mcp_server/endpoints/graph.py
  • marm-mcp-server/marm_mcp_server/endpoints/graph_models.py
🪛 ast-grep (0.45.3)
marm-mcp-server/marm_mcp_server/core/distill_selection.py

[warning] 151-151: XPath query is request-/variable-derived; use parameterized XPath to prevent injection.
Context: _CODE_SHAPED.findall(text)
Note: [CWE-643] Improper Neutralization of Data within XPath Expressions ('XPath Injection').

(xpath-injection-python)

🔇 Additional comments (19)
marm-mcp-server/marm_mcp_server/core/distill_selection.py (1)

1-287: LGTM!

marm-mcp-server/marm_mcp_server/core/distill.py (1)

45-53: LGTM!

marm-mcp-server/marm_mcp_server/endpoints/graph_models.py (1)

1-124: LGTM!

marm-mcp-server/marm_mcp_server/endpoints/graph_projects.py (1)

1-119: LGTM!

marm-mcp-server/marm_mcp_server/endpoints/graph.py (1)

21-21: LGTM!

Also applies to: 31-49

marm-mcp-server/tests/test_graph_auto_index.py (1)

1574-1574: LGTM!

Also applies to: 1585-1588

CHANGELOG.md (1)

3-11: LGTM!

CONTRIBUTING.md (1)

111-111: LGTM!

Also applies to: 130-131

README.md (1)

8-8: LGTM!

docs/INSTALL-LINUX.md (1)

497-497: LGTM!

docs/INSTALL-WINDOWS.md (1)

482-482: LGTM!

marm-mcp-server/Dockerfile (1)

68-68: LGTM!

marm-mcp-server/README.md (1)

10-10: LGTM!

marm-mcp-server/docker-compose.yml (1)

6-6: LGTM!

Also applies to: 19-19

marm-mcp-server/marm_mcp_server/__init__.py (1)

17-17: LGTM!

Also applies to: 22-22

marm-mcp-server/marm_mcp_server/config/settings.py (1)

103-103: LGTM!

marm-mcp-server/marm_mcp_server/resources/marm-docs/README.md (1)

1-1: LGTM!

marm-mcp-server/pyproject.toml (1)

7-7: LGTM!

marm-mcp-server/server.json (1)

6-6: LGTM!

Also applies to: 20-20, 29-29


📝 Walkthrough

Walkthrough

The pull request moves Distill selection helpers and graph endpoint models and project helpers into separate modules. It also updates release references and documented versions from 2.59.2 to 2.59.3.

Changes

Module extraction and v2.59.3 release

Layer / File(s) Summary
Distill candidate selection
marm-mcp-server/marm_mcp_server/core/distill.py, marm-mcp-server/marm_mcp_server/core/distill_selection.py, CONTRIBUTING.md
Selection scoring, normalization, deduplication, Markdown handling, span validation, and reparsing helpers are defined in distill_selection.py. distill.py imports those helpers.
Graph route models
marm-mcp-server/marm_mcp_server/endpoints/graph_models.py
Request models define field constraints and selected values. Response models define project-index and project-job states.
Graph project helpers and endpoint wiring
marm-mcp-server/marm_mcp_server/endpoints/graph.py, marm-mcp-server/marm_mcp_server/endpoints/graph_projects.py, marm-mcp-server/tests/test_graph_auto_index.py, CONTRIBUTING.md
Project lookup, deletion, code-link cleanup, and memory-linking status helpers are defined in graph_projects.py and imported by graph.py. The test patches helpers on the new module.
Release version references
CHANGELOG.md, README.md, docs/INSTALL-*, marm-mcp-server/Dockerfile, marm-mcp-server/README.md, marm-mcp-server/docker-compose.yml, marm-mcp-server/marm_mcp_server/__init__.py, marm-mcp-server/marm_mcp_server/config/settings.py, marm-mcp-server/resources/marm-docs/README.md, marm-mcp-server/pyproject.toml, marm-mcp-server/server.json
Release metadata, package and image versions, README headings, and documented health-check responses are updated to v2.59.3.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~25 minutes

Merge Risk: ⚪ Minimal · up to 7f54d

The module split and version updates are ready to merge after normal checks.

🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@Lyellr88
Lyellr88 merged commit fcc3c89 into MARM-main Oct 7, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Maintenance with no user-facing change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant