Skip to content

Feat/v0.6.0 call parity polysemy#31

Merged
SaschaOnTour merged 11 commits into
mainfrom
feat/v0.6.0-call-parity-polysemy
May 19, 2026
Merged

Feat/v0.6.0 call parity polysemy#31
SaschaOnTour merged 11 commits into
mainfrom
feat/v0.6.0-call-parity-polysemy

Conversation

@SaschaOnTour

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings May 19, 2026 14:11

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR bumps rlm to v0.6.0 and focuses on keeping CLI and MCP behavior in lockstep (“call parity”), while improving support for polysemous identifiers (e.g. new, open) via parent/type disambiguation and tightening read-vs-write tool semantics (notably splitting quality_clear).

Changes:

  • Introduces application::facades as the single per-command entrypoint and refactors CLI/MCP handlers to delegate through them for parity.
  • Adds parent/type disambiguation across query surfaces (refs, search, callgraph/context/scope metadata) and improves Rust chunking to capture parents for more impl forms.
  • Splits destructive quality truncation into quality_clear (MCP) / rlm quality clear (CLI), adds auto_create_index config gate, and hardens SQLite concurrency (busy_timeout) with new integration coverage; adds Nix flake packaging.

Reviewed changes

Copilot reviewed 94 out of 96 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tests/mcp_tests.rs Updates MCP tool-count expectations; asserts instructions/tool-surface parity; checks quality_clear schema/annotations.
tests/concurrent_reads_tests.rs New end-to-end concurrency regression test for parallel rlm read avoiding SQLITE_BUSY.
tests/cli_mcp_parity_tests.rs Adjusts CLI↔MCP parity rules to account for quality_clear being a dedicated MCP tool.
src/mcp/tools.rs Adds parent to refs params; removes clear from quality params schema.
src/mcp/tool_handlers.rs Updates re-exports to match new handler signatures/types.
src/mcp/tool_handlers_util.rs Refactors MCP utility handlers to call application::facades; adds handle_quality_clear.
src/mcp/tool_handlers_tests.rs Updates handler tests for new param types and adds quality_clear truncation test.
src/mcp/tool_handlers_read.rs Routes MCP read via facade with unified request inputs.
src/mcp/tool_handlers_query.rs Refactors query handlers to facades; adds adapter-local parsing helpers for fields/detail.
src/mcp/tool_handlers_query_tests.rs New unit tests for MCP-side fields/detail parsing helpers.
src/mcp/tool_handlers_index.rs Minor cleanup (removes qual marker).
src/mcp/tool_handlers_edit.rs Refactors edit handlers to facades; unifies replace preview/apply via ReplaceMode/ReplaceOutput.
src/mcp/server_lifecycle.rs Adds RlmServer constructor/accessors/tool-router exposure for tests.
src/mcp/server_helpers.rs Removes session factories; adds respond_string/respond_json helpers and shared formatting finalize step.
src/mcp/server_helpers_tests.rs Updates staleness test to validate facade-based MCP path.
src/mcp/mod.rs Wires new server_lifecycle module.
src/main.rs Refactors CLI dispatch for grouped args and new quality subcommand; introduces dispatch_quality; routes MCP/setup to lifecycle handlers.
src/ingest/code/rust_tests.rs Adds regression tests for capturing parent type in more Rust impl forms.
src/ingest/code/queries/rust/chunk.scm Extends Rust chunk query to capture parent type for generic/scoped impl items.
src/infrastructure/persistence/savings_repo.rs Changes record_savings_v2 to accept SavingsEntry struct reference.
src/infrastructure/persistence/file_repo.rs Adds get_files_by_ids to persistence trait and Database impl.
src/infrastructure/persistence/chunk_repo.rs Adds get_chunks_by_idents to persistence trait and Database impl.
src/error.rs Adds IndexAutoCreateDisabled and structured SectionNotFoundError with hints; defines MAX_SECTION_HINT.
src/db/queries/savings.rs Refactors record_savings_v2 to take SavingsEntry and map fields to columns.
src/db/queries/savings_tests.rs Adds coverage for struct-based record_savings_v2.
src/db/queries/refs.rs Extends refs-with-context query to include containing chunk parent.
src/db/queries/mod_tests.rs Adds tests for get_files_by_ids.
src/db/queries/mod_chunk_tests.rs Adds tests for get_chunks_by_idents.
src/db/queries/files.rs Implements batched get_files_by_ids and shared row projection helper.
src/db/queries/chunks.rs Implements batched get_chunks_by_idents with IN query builder.
src/db/connection.rs Sets SQLite busy_timeout=5000 explicitly; removes open_required.
src/db/connection_tests.rs Replaces open_required tests with busy_timeout contract test.
src/config.rs Adds [indexing] auto_create_index; removes from_cwd; tweaks test-only serialization error mapping.
src/cli/mod.rs Exposes new lifecycle handlers module.
src/cli/lifecycle_handlers.rs Adds CLI-only lifecycle commands (mcp, setup) outside call-parity-checked handlers.
src/cli/helpers.rs Adds cwd_project_root + run_facade; refactors resolve_code to take CodeSource.
src/cli/handlers.rs Refactors most commands to facades; introduces grouped args structs for read/replace; adds --parent to refs.
src/cli/handlers_util.rs Refactors stats/quality/verify to facades; adds cmd_quality_clear; removes CLI mcp/setup wiring.
src/cli/commands.rs Adds CodeSource args bundle; adds refs --parent; changes quality to subcommand-based quality clear; adds command parsing tests hook.
src/cli/commands_tests.rs New clap parsing tests for quality subcommand and rejection of old --clear flag.
src/application/symbol/type_info.rs Reshapes type-info as output type only (parent included); removes DB-query helper.
src/application/symbol/type_info_tests.rs Removes tests for deleted type-info query helper.
src/application/symbol/text_scan.rs New shared byte/ident scanning utilities for path matching (Unicode-safe).
src/application/symbol/test_runner.rs Removes qual markers (no logic change).
src/application/symbol/test_impact.rs Removes qual markers (no logic change).
src/application/symbol/test_impact_analyze.rs Removes qual marker (no logic change).
src/application/symbol/signature.rs Reshapes signature metadata output types; adds parent-aware signature entries.
src/application/symbol/signature_tests.rs Removes tests for deleted signature query helper.
src/application/symbol/scope.rs Returns structured scope symbols including parent/kind instead of plain strings.
src/application/symbol/scope_tests.rs Updates scope tests for new structured output and parent propagation.
src/application/symbol/refs_tests.rs Updates impact result test fixtures for new fields (target_candidates, in_parent, col).
src/application/symbol/path_match.rs New string-based Rust qualified-path call matcher used for parent filtering.
src/application/symbol/path_match_tests.rs New tests covering path-match forms, Unicode safety, and whitespace tolerance.
src/application/symbol/mod.rs Wires new path_match + text_scan private modules.
src/application/symbol/impact.rs Extends impact output with target candidates, containing parent/col, and adds parent-based filtering using path matching.
src/application/symbol/context.rs Refactors context output to structured definitions + parent-aware callees.
src/application/symbol/context_tests.rs Updates context tests for new output shape (definitions + callees).
src/application/symbol/context_graph_tests.rs Updates graph-related context tests for new definitions/callees shapes.
src/application/symbol/callgraph.rs Adds SymbolRef (ident+parent) for callers/callees; adds batched callee-parent resolution.
src/application/symbol/callgraph_tests.rs Updates/extends callgraph tests for parent propagation and polysemy handling.
src/application/symbol/callgraph_refs_tests.rs Updates callgraph ref-kind tests for new callee representation.
src/application/session.rs Unifies read/replace/refs APIs; adds parent-filtered refs; adds quality_clear; removes old insert-without-index path.
src/application/savings/reporting.rs Extracts savings aggregation into dedicated module.
src/application/savings/mod.rs Refactors savings recording to struct-based DB write; moves report generation to reporting.
src/application/query/tree.rs Removes string formatting helper format_tree (tests now validate structured JSON).
src/application/query/tree_tests.rs Updates tests to stop relying on removed format_tree.
src/application/query/stats.rs Splits destructive quality truncation into clear_quality_log; removes clear flag from QualityFlags.
src/application/query/stats_tests.rs Adds tests for clear_quality_log behavior.
src/application/query/search.rs Adds parent on SearchHit; removes adapter parsing helper from application layer.
src/application/query/search_tests.rs Adds tests for parent serialization on search hits.
src/application/query/mod.rs Removes DetailLevel string parsing from application layer (adapter responsibility).
src/application/mod.rs Exposes new application::facades module.
src/application/index/staleness.rs Removes ChangeReport::is_clean method.
src/application/index/staleness_tests.rs Replaces is_clean checks with test-only helper.
src/application/index/mod.rs Adds auto_create_index gate to ensure_index (errors when disabled).
src/application/index/mod_tests.rs Adds tests covering auto_create_index behavior.
src/application/facades.rs New per-command facade layer (open session + call one session method).
src/application/facades_tests.rs Adds documentation-only test module rationale.
src/application/edit/write_dispatch.rs Introduces unified dispatch_replace API and removes dead insert-without-index branch.
src/application/edit/replacer.rs Refactors replace/delete primitives to take typed inputs; introduces EditTarget bundling.
src/application/edit/replacer_edge_tests.rs Updates tests to match new replace input type signature.
src/application/edit/mod.rs Re-exports edit DTOs for shared use.
src/application/edit/extractor.rs Refactors extractor to accept ExtractInput and uses structured DeleteInput for deletes.
src/application/edit/extractor_tests.rs Updates extractor tests for new ExtractInput signature.
src/application/edit/delete_symbol_tests.rs Updates delete tests for new DeleteInput signature.
rustqual.toml Adds call-parity rule + new layer split (cli_helpers/mcp_helpers); ignores run for LONG_FN; updates layer paths/comments.
README.md Updates docs for refs --parent, auto-index behavior/config, and adds Nix flake usage instructions.
flake.nix Adds Nix flake packaging + dev shell.
flake.lock Adds locked Nix inputs for the flake.
Cargo.toml Bumps crate version to 0.6.0.
Cargo.lock Updates lockfile for 0.6.0 and includes missing registry metadata for a dependency entry.

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

Comment thread src/cli/helpers.rs Outdated
Comment thread src/db/queries/chunks.rs
Comment thread src/db/queries/files.rs Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 97 out of 99 changed files in this pull request and generated 3 comments.

Comment thread src/mcp/tool_handlers_util.rs
Comment thread src/application/symbol/impact.rs
Comment thread README.md Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 97 out of 99 changed files in this pull request and generated 2 comments.

Comment thread src/application/symbol/text_scan.rs Outdated
Comment thread src/db/batched.rs
Copilot AI review requested due to automatic review settings May 19, 2026 17:44

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 97 out of 99 changed files in this pull request and generated 2 comments.

Comment thread src/mcp/tool_handlers_util.rs
Comment thread src/cli/handlers_util.rs Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 97 out of 99 changed files in this pull request and generated no new comments.

@SaschaOnTour SaschaOnTour merged commit edf603e into main May 19, 2026
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.

2 participants