Skip to content

feat: expose extract/inline through CLI - #2063

Closed
vitali87 wants to merge 1 commit into
pr-split/split-pr1550-source/pr-4from
pr-split/split-pr1550-source/pr-5
Closed

vitali87 wants to merge 1 commit into
pr-split/split-pr1550-source/pr-4from
pr-split/split-pr1550-source/pr-5

Conversation

@vitali87

Copy link
Copy Markdown
Owner

Add cgr extract and cgr inline commands with help text and JSON report output.

Files changed

  • codebase_rag/cli_help.py
  • codebase_rag/cli.py

Diff stats

+131 additions, -0 deletions (131 LOC)

Dependencies

This PR depends on: pr-4

Dependency graph

Merge in this order:

pr-1: feat: add extract/inline public types and constants
└── pr-2: feat: analyze extract/inline scopes and transactions
    └── pr-3: feat: implement extract refactoring operation
        ├── pr-4: feat: implement inline refactoring operation
        │   ├── pr-5: feat: expose extract/inline through CLI  <-- this PR
        │   ├── pr-6: feat: expose extract/inline through MCP
        │   │   ├── pr-8: test: cover inline, MCP, and CRLF regression
        │   │   └── pr-10: docs: list extract/inline MCP tools
        │   └── pr-9: docs: document extract/inline architecture
        └── pr-7: test: cover extract refactoring
            └── pr-8: test: cover inline, MCP, and CRLF regression

@coderabbitai

coderabbitai Bot commented Sep 20, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 46 seconds.

Check out review usage here.

View limit details

Limit details: You’ve used all 8 included reviews currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Repository: vitali87/code-graph-rag/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 9f0b776f-0dfb-4909-b70e-450490d4bdce

📥 Commits

Reviewing files that changed from the base of the PR and between 42ab71c and 6c95b06.

📒 Files selected for processing (2)
  • codebase_rag/cli.py
  • codebase_rag/cli_help.py

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.

@greptile-apps

greptile-apps Bot commented Sep 20, 2026

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

Safe to merge.

What we checked:

  • Validated the CLI inline extraction by comparing the before and after evidence and confirming the final executed source matches the provided Python script. T-Rex
  • Cataloged the artifacts for the inline extraction run, including the cli-extract-inline-01-before.log, cli-extract-inline-02-after.log, and the final executed source file. T-Rex
  • Documented the validation blockers observed when the harness attempted to import codebase_rag.cli, noting the StackManager unavailability and an invalid stub package path. T-Rex
  • Recorded that the later harness correction was not executed, so there is no runtime evidence available from that attempt. T-Rex
  • Noted that the executed source text is preserved in the source artifact referenced by the validation proof. T-Rex

Summary

  • Adds cgr extract and cgr inline command surfaces with shared graph setup and JSON report output.
  • Registers command descriptions, argument help, and examples for both refactorings.
  • The new commands, their delegated help pages, and invalid extract line validation behaved as expected in the exercised CLI flows.

Reviews (1) · Last reviewed commit: "feat: expose extract/inline through CLI"

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

The new command paths lack CLI regression tests for context wiring, report serialization, dry-run behavior, and rollback exit status.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 Low severity

Open (1)
What changed in this PR

Adds cgr extract and cgr inline commands for graph-backed refactoring, including dry-run support and JSON reports.

Changes:

  • Added shared edit context and report emission logic.
  • Registered extract/inline commands and arguments.
  • Added CLI help text, examples, and command registry entries.
File Description
codebase_rag/​cli.py Implements extract and inline command execution.
codebase_rag/​cli_help.py Defines command names, help text, and examples.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread codebase_rag/cli.py Resolved

vitali87 commented Oct 9, 2026

Copy link
Copy Markdown
Owner Author

Closing as superseded: this is part of the split of #1550, which was closed without merging, and it targets the stale feat/move-op branch rather than main. The branch is kept, so the extract/inline work can be rebased onto main if it's picked up again.


Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants