Skip to content

renamed to codexray#70

Merged
iohub merged 2 commits into
mainfrom
dev-0609
Jun 10, 2026
Merged

renamed to codexray#70
iohub merged 2 commits into
mainfrom
dev-0609

Conversation

@iohub

@iohub iohub commented Jun 10, 2026

Copy link
Copy Markdown
Owner

Summary by Sourcery

Rename the Rust code analysis service and its integration from CodeBase/codebase to CodeXRay/codexray across the project, updating configs, endpoints, tooling, and documentation to match the new naming.

Enhancements:

  • Standardize Go, Rust, and TUI code on the new Codexray naming, including server structs, runner types, global context fields, and helper functions.
  • Update HTTP API endpoints (e.g. initialization route) and error/log messages to use the codexray naming while preserving existing behavior.
  • Align configuration keys, embedding/retrieval pipeline settings, and storage paths from [codebase] to [codexray] without changing semantics.

Build:

  • Adjust build scripts, Cargo metadata, and packaging paths to build and bundle the renamed codexray Rust binary instead of the previous codebase binary.

Documentation:

  • Refresh architecture, retrieval, and README documentation (English and Chinese) to describe the Codexray service, its APIs, configuration, and integration points instead of Codebase.
  • Update diagrams, examples, and file references to the new codexray module paths and binary names in both Go and Rust sides of the system.

Tests:

  • Rename and update tests and helper functions to use Codexray URLs and types, ensuring coverage remains aligned with the new service name and endpoints.

@sourcery-ai

sourcery-ai Bot commented Jun 10, 2026

Copy link
Copy Markdown

Reviewer's Guide

Renames the Rust code analysis service and its integration throughout the Go agent from codebase/CodeBase to codexray/CodeXRay, updating binaries, config keys, HTTP endpoints, types, URLs, tests, docs, and startup wiring to the new naming and package layout.

Sequence diagram for Codexray startup and semantic search

sequenceDiagram
    actor User
    participant Main as main.go
    participant CodexrayProc as codeactor-codexray
    participant CodexraySrv as CodeXRayServer
    participant App as CodeActor.Init
    participant RepoTool as RepoOperationsTool

    User->>Main: runTUI()/runHTTP
    Main->>Main: findAvailablePort
    Main->>CodexrayProc: startCodexrayServer
    CodexrayProc->>CodexraySrv: start
    Main->>CodexraySrv: GET /health
    CodexraySrv-->>Main: ApiResponse

    Main->>App: Init
    App->>App: set CodexrayPort
    App->>App: set GlobalCtx.CodexrayURL
    App->>RepoTool: NewRepoOperationsTool(CodexrayURL, ProjectPath)

    User->>RepoTool: ExecuteSemanticSearch
    RepoTool->>RepoTool: doCodexrayRequest("/semantic_search", body)
    RepoTool->>CodexraySrv: POST /semantic_search
    CodexraySrv-->>RepoTool: SemanticSearchResponse
Loading

File-Level Changes

Change Details Files
Rename Rust service crate, types, and CLI from CodeBase/codebase to CodeXRay/codexray and adjust config schema.
  • Change Cargo crate name from codeactor-codebase to codeactor-codexray and move the Rust project directory from codebase/ to codexray/.
  • Rename core Rust types and runners (e.g., CodeBaseServerCodeXRayServer, CodeBaseRunnerCodeXRayRunner) and update their uses in main.rs, CLI runner, and HTTP module re-exports.
  • Update config structs and usage from Config { codebase: CodeBaseConfig, ... } to Config { codexray: CodeXRayConfig, ... }, including all references to codebase.* in Rust services (embedding, hybrid search, reranker, commit/repo knowledge services, storage, vectorize handler).
codexray/Cargo.toml
codexray/src/main.rs
codexray/src/cli/mod.rs
codexray/src/cli/runner.rs
codexray/src/http/server.rs
codexray/src/http/mod.rs
codexray/src/config.rs
codexray/src/services/embedding_service.rs
codexray/src/services/commit_embedding_service.rs
codexray/src/services/repo_knowledge_service.rs
codexray/src/services/reranker_service.rs
codexray/src/http/handlers/vectorize.rs
codexray/src/storage/mod.rs
Update Go integration to use Codexray naming for URLs, ports, and helper types when calling the Rust service.
  • Change GlobalCtx field and setter from CodebaseURL/SetCodebaseURL to CodexrayURL/SetCodexrayURL and update all call sites (agents, commit learner/manager, repo knowledge manager, tests).
  • Rename RepoOperationsTool fields and methods from CodebaseURL/doCodebaseRequest to CodexrayURL/doCodexrayRequest and update semantic search/skeleton/snippet callers and related tests.
  • Adjust application wiring to pass and store CodexrayPort instead of CodebasePort, and propagate it into GlobalCtx and RepoOperationsTool.
  • Change environment variable and test expectations from CODEBASE_PORT to CODEXRAY_PORT where applicable.
internal/globalctx/global_context.go
internal/app/app.go
internal/tools/repo_operations.go
internal/agents/repo.go
internal/agents/repo_knowledge_manager.go
internal/agents/commit_learner.go
internal/agents/commit_manager.go
internal/agents/commit_api_test.go
internal/agents/repo_knowledge_test.go
internal/agents/conductor_test.go
Rename server startup, health/wait logic, and embedded binary handling in the Go entrypoint and build scripts to codexray.
  • Replace startCodebaseServer/waitForCodebase with startCodexrayServer/waitForCodexray in main.go, including log messages and error strings, and switch to using the codeactor-codexray binary and codexray log directory.
  • Update initApp, runTUI, and runHTTP to work with codexrayPort/codexrayCmd instead of codebasePort/codebaseCmd.
  • Change build scripts and packaging paths from codebase to codexray, including build.sh (Rust project dir, crate name, binary name, log messages) and scripts/build-centos7.sh (build path and copied binary).
main.go
build.sh
scripts/build-centos7.sh
Rename HTTP API endpoint /codebase_init to /codexray_init and align docs, diagrams, and tests.
  • Change the documented initialization endpoint from POST /codebase_init to POST /codexray_init in API docs and architecture specs, including sequence diagrams and task executor references.
  • Update any hard-coded references in ASCII diagrams and comments describing codebase_init to use codexray_init.
  • Ensure that task executor documentation and flow descriptions mention the new endpoint for index initialization.
docs/knowledge-indexing-and-retrieval.md
docs/ARCHITECTURE.md
Update configuration files and defaults from [codebase] to [codexray] and related keys, including embedding and retrieval pipeline sections.
  • Change top-level config sections and references from [codebase], [codebase.embedding], [codebase.retrieval_pipeline], and nested codebase.* keys to the equivalent codexray names across user-facing config examples and default TOML files.
  • Adjust Rust config loading and warnings to expect the new codexray section while still warning about deprecated old fields where present.
  • Align documentation of HTTP ports (codebase_portcodexray_port) and config snippets in README/CLAUDE docs and retrieval pipeline docs.
config/config.toml
internal/config/default_config.toml
codexray/src/config.rs
CLAUDE.md
codexray/CLAUDE.md
codexray/README.md
codexray/README_ZH.md
docs/multi_stage_retrieval_pipeline.md
docs/retrieval-quality-analysis.md
CODEACTOR.md
README.md
README_zh.md
Refresh documentation, diagrams, HTML templates, and tests to the new Codexray branding and paths.
  • Rename the Rust project folder references in docs from codebase/ to codexray/ and update architecture diagrams, SVGs, and path tables accordingly.
  • Adjust descriptive text, headings, comments, and tables across English and Chinese docs to use CodeXRay/codexray instead of CodeBase/codebase, including tool descriptions and external dependency lists.
  • Update the web UI HTML template button labels and JS helpers from "Build Codebase" to "Build Codexray".
  • Rename test directories and references (codebase/tests/...codexray/tests/...) and fix any mentions in test code and integration scripts (e.g., semantic search tests, integration shell scripts).
docs/knowledge-indexing-and-retrieval.md
CLAUDE.md
CODEACTOR.md
docs/ARCHITECTURE.md
docs/multi_stage_retrieval_pipeline.md
docs/retrieval-quality-analysis.md
docs/Browser_Agent_Design.md
docs/VSCODE_SERVER_INTEGRATION.md
codexray/README.md
codexray/README_ZH.md
codexray/CLAUDE.md
codexray/src/http/handlers/templates/main_page.html
codexray/tests/test_functional.rs
codexray/tests/test_semantic_search.py
scripts/build-centos7.sh

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot 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.

Hey - I've found 2 issues, and left some high level feedback:

  • Renaming the Rust config section from [codebase] to [codexray] without backward-compatible aliases will break existing config.toml files; consider adding #[serde(alias = "codebase")] on the codexray field (and nested structs) or an explicit migration path so older configs still deserialize.
  • Similarly, changing API endpoints (e.g. /codebase_init/codexray_init) and env vars (CODEBASE_PORTCODEXRAY_PORT) is a breaking change for existing clients; it may be worth keeping the old names as deprecated aliases on the server side to maintain compatibility during the transition.
  • Some log and error messages still reference "Codebase" (e.g. the health-wait failure log in main.go), while others now say "Codexray"; it would be good to sweep for inconsistent naming to avoid confusion when debugging.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- Renaming the Rust config section from `[codebase]` to `[codexray]` without backward-compatible aliases will break existing `config.toml` files; consider adding `#[serde(alias = "codebase")]` on the `codexray` field (and nested structs) or an explicit migration path so older configs still deserialize.
- Similarly, changing API endpoints (e.g. `/codebase_init``/codexray_init`) and env vars (`CODEBASE_PORT``CODEXRAY_PORT`) is a breaking change for existing clients; it may be worth keeping the old names as deprecated aliases on the server side to maintain compatibility during the transition.
- Some log and error messages still reference "Codebase" (e.g. the health-wait failure log in `main.go`), while others now say "Codexray"; it would be good to sweep for inconsistent naming to avoid confusion when debugging.

## Individual Comments

### Comment 1
<location path="internal/app/app.go" line_range="36" />
<code_context>
 	globalCtx      *globalctx.GlobalCtx
 	DisabledAgents string // comma-separated list of agent names to disable (e.g. "repo,coding,chat")
-	CodebasePort   int    // codebase 服务端口,由 main 函数动态分配
+	CodexrayPort   int    // codebase 服务端口,由 main 函数动态分配

 	SkillRegistry *skills.SkillRegistry // 技能注册表,加载 .codeactor/skills/ 下的 .md 文件
</code_context>
<issue_to_address>
**nitpick (typo):** Field comment still refers to 'codebase' while the field and service have been renamed to 'Codexray'.

The inline comment for `CodexrayPort` still mentions `codebase 服务端口`. Please update it to reference `Codexray` or use a neutral description (e.g., "embedding service port") to keep terminology consistent.

```suggestion
	CodexrayPort   int    // Codexray 服务端口,由 main 函数动态分配
```
</issue_to_address>

### Comment 2
<location path="CLAUDE.md" line_range="42" />
<code_context>
 - **LLM**: `github.com/openai/openai-go/v3` (multi-provider: OpenAI-compatible, Bedrock)
 - **HTTP/WS**: `gin-gonic/gin` + `olahol/melody`
 - **TUI**: Bubble Tea
-- **External**: `codeactor-codebase` (Rust, `127.0.0.1:12800`) — semantic search, repo investigation, call graph, code skeleton/snippet. See [Codebase Component](#codebase-component) below.
+- **External**: `codeactor-codexray` (Rust, `127.0.0.1:12800`) — semantic search, repo investigation, call graph, code skeleton/snippet. See [Codexray Component](#codexray-component) below.
 - **System deps**: `ripgrep` (rg), `fzf`

</code_context>
<issue_to_address>
**suggestion (typo):** Consider standardizing the component name capitalization (e.g., `CodeXRay Component`) for consistency.

Elsewhere in the docs this is `CodeXRay`/`CodeXRay Server`, but here the link text and heading use `Codexray`. Please align this heading and link text with the canonical name (e.g. `CodeXRay Component` and `#codexray-component`).

Suggested implementation:

```
- **External**: `codeactor-codexray` (Rust, `127.0.0.1:12800`) — semantic search, repo investigation, call graph, code skeleton/snippet. See [CodeXRay Component](#codexray-component) below.

```

To fully align capitalization and anchors:
1. Update the corresponding section heading from `## Codexray Component` (or similar) to `## CodeXRay Component`. On GitHub, this will still generate the `#codexray-component` anchor.
2. Search the rest of `CLAUDE.md` for `Codexray` and update occurrences to the canonical `CodeXRay` / `CodeXRay Server` naming as appropriate, ensuring any manual anchors or references remain consistent (e.g. `#codexray-component`).
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Comment thread internal/app/app.go
globalCtx *globalctx.GlobalCtx
DisabledAgents string // comma-separated list of agent names to disable (e.g. "repo,coding,chat")
CodebasePort int // codebase 服务端口,由 main 函数动态分配
CodexrayPort int // codebase 服务端口,由 main 函数动态分配

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

nitpick (typo): Field comment still refers to 'codebase' while the field and service have been renamed to 'Codexray'.

The inline comment for CodexrayPort still mentions codebase 服务端口. Please update it to reference Codexray or use a neutral description (e.g., "embedding service port") to keep terminology consistent.

Suggested change
CodexrayPort int // codebase 服务端口,由 main 函数动态分配
CodexrayPort int // Codexray 服务端口,由 main 函数动态分配

Comment thread CLAUDE.md
- **LLM**: `github.com/openai/openai-go/v3` (multi-provider: OpenAI-compatible, Bedrock)
- **HTTP/WS**: `gin-gonic/gin` + `olahol/melody`
- **TUI**: Bubble Tea
- **External**: `codeactor-codebase` (Rust, `127.0.0.1:12800`) — semantic search, repo investigation, call graph, code skeleton/snippet. See [Codebase Component](#codebase-component) below.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

suggestion (typo): Consider standardizing the component name capitalization (e.g., CodeXRay Component) for consistency.

Elsewhere in the docs this is CodeXRay/CodeXRay Server, but here the link text and heading use Codexray. Please align this heading and link text with the canonical name (e.g. CodeXRay Component and #codexray-component).

Suggested implementation:

- **External**: `codeactor-codexray` (Rust, `127.0.0.1:12800`) — semantic search, repo investigation, call graph, code skeleton/snippet. See [CodeXRay Component](#codexray-component) below.

To fully align capitalization and anchors:

  1. Update the corresponding section heading from ## Codexray Component (or similar) to ## CodeXRay Component. On GitHub, this will still generate the #codexray-component anchor.
  2. Search the rest of CLAUDE.md for Codexray and update occurrences to the canonical CodeXRay / CodeXRay Server naming as appropriate, ensuring any manual anchors or references remain consistent (e.g. #codexray-component).

@iohub iohub merged commit c5a9870 into main Jun 10, 2026
5 of 6 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.

1 participant