[BUG] octocode index and clear commands panic!
Thank you for fixing reported issues, and improving the Octocode capabilities.
Unfortunately, the new version 0.8.0 has introduced new issues, but the first and most important one which occurs with both octocode index and octocode clear is the following:
thread 'main' panicked at /Users/ossfellow/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.46.1/src/runtime/scheduler/multi_thread/mod.rs:86:9:
Cannot start a runtime from within a runtime. This happens because a function (like `block_on`) attempted to block the current thread while the thread is being used to drive asynchronous tasks.
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
I should add that in the case of clear command, after multiple failures, I manually deleted everything, except the config file, and ran the command both from inside and outside a local git repository but the issue persisted.
So, because of this, I cannot test if any of the 3 issues, I had reported including the search and graphrag commands are now working or not.
Installing via the curl -fsSL https://raw.githubusercontent.com/Muvon/octocode/master/install.sh | sh command resultet in a non working installation on my MacOS.
I needed to:
- dowload the release manually
- Delete the old binary:
rm ~/.local/bin/octocode - Extract the Package:
tar xvzf octocode-0.8.0-aarch64-apple-darwin.tar.gz - Move the binary:
mv octocode ~/.local/bin - Un-quarantine:
xattr -d com.apple.quarantine ~/.local/bin/octocode
After that octocode 0.8.0 is running
> $ octocode graphrag search --query "type:issue"
Loading 240 GraphRAG nodes from database...
Loading 64 GraphRAG relationships from database...
Loaded GraphRAG knowledge graph with 240 nodes and 64 relationships
Searching for: type:issue
GRAPHRAG NODES (218 found)
FILE: apps/web/lib/utils.ts
source_file utils
ID: apps/web/lib/utils.ts
Description: utils typescript file (5 lines)
[...]
Oh, and i needed to change the ~/.local/share/octocode/config.toml by adding:
[graphrag.llm]
description_model = "openai/gpt-4.1-mini"
relationship_model = "openai/gpt-4.1-mini"
ai_batch_size = 8
max_batch_tokens = 16384
batch_timeout_seconds = 60
fallback_to_individual = true
max_sample_tokens = 1500
confidence_threshold = 0.8
architectural_weight = 0.9
relationship_system_prompt = ""
description_system_prompt = ""
@Jehu, yes; the config file changes aren't fully identified in the changelog; however, for @donhardman to be able to track issues, please keep different topics and issues separate; otherwise, a maintainer will have a hard time tracking them.
BTW, you need to index a repository before running search, or graphrag queries.
I'm unable to reproduce the crash; can you please provide your config? And how did you install the binary? With cargo from git, from a crate, or from releases? Thanks.
As I can see, you installed it with Cargo directly from Git or from a crate?
I'm installed from the sources locally and trying to use the latest version and indexing from scratch—no issues.
➜ octomind-ui master ✓ octocode clear
Clearing all database tables except memory data...
Successfully dropped all tables and schemas (memory data preserved).
Note: Tables will be recreated with current schema on next indexing operation.
➜ octomind-ui master ✓ octocode --version
octocode 0.8.0
➜ octomind-ui master ✓ octocode index
✓ Git repository detected: /Users/dk/Work/dev/muvon/octomind-ui
⠋ Counting files... - Counting files...📋 First-time git indexing: indexing all files
📊 Loaded metadata for 0 files from database
⠼ Counting files... - Building GraphRAG knowledge graph...📦 Found 12 imports, 9 exports in src-tauri/src/commands.rs
Imports: ["anyhow::Result", "serde::{Deserialize, Serialize}", "std::collections::HashMap", "std::env", "std::process::Stdio", "std::sync::{Arc, Mutex}", "tauri::{AppHandle, Emitter, State, Window}", "tokio::io::{AsyncBufReadExt, AsyncWriteExt, BufReader}", "tokio::process::Command as TokioCommand", "tokio::sync::mpsc", "uuid::Uuid", "tauri_plugin_dialog::DialogExt"]
Exports: ["get_available_sessions", "create_session_config", "resume_session_config", "start_session_process", "send_message_to_session", "stop_session_process", "get_session_info", "select_directory_native", "list_directories"]
🤖 AI Decision: file=426 lines, symbols=13, language=rust, use_ai=true
🔍 Symbols found: ["get_available_sessions", "default", "start_session_process", "ansi_to_html", "create_session_config"]
🤖 Collecting for AI batch: src-tauri/src/commands.rs (426 lines, 13 symbols)
⠇ Counting files... - Building GraphRAG knowledge graph...📦 Found 1 imports, 0 exports in svelte.config.js
Imports: ["@sveltejs/vite-plugin-svelte"]
Installing via the
curl -fsSL https://raw.githubusercontent.com/Muvon/octocode/master/install.sh | shcommand resultet in a non working installation on my MacOS.I needed to:
* dowload the release manually * Delete the old binary: `rm ~/.local/bin/octocode` * Extract the Package: `tar xvzf octocode-0.8.0-aarch64-apple-darwin.tar.gz` * Move the binary: `mv octocode ~/.local/bin` * Un-quarantine: `xattr -d com.apple.quarantine ~/.local/bin/octocode`After that octocode 0.8.0 is running
> $ octocode graphrag search --query "type:issue" Loading 240 GraphRAG nodes from database... Loading 64 GraphRAG relationships from database... Loaded GraphRAG knowledge graph with 240 nodes and 64 relationships Searching for: type:issue GRAPHRAG NODES (218 found) FILE: apps/web/lib/utils.ts source_file utils ID: apps/web/lib/utils.ts Description: utils typescript file (5 lines) [...]
The config is the known issue; well, mostly the tool was made for myself ;) so currently it just uses a strict config. If something changes there - well, yes, this is a pain. I will create an issue about it just to remember: https://github.com/Muvon/octocode/issues/13
I will check the binary installation because I am personally using Cargo for installing.
I'm using cargo install too; but as mentioned in the issue I'm using the 0.8.0 version.
Hey @ossfellow, did you have a chance to check the latest version? Is it fixed?
Hey @donhardman, if I try either of octocode clear or index commands to kickoff repository indexing, the panik, which I had reported before aborts the operation:
thread 'main' panicked at /Users/ossfellow/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.47.1/src/runtime/scheduler/multi_thread/mod.rs:86:9:
Cannot start a runtime from within a runtime. This happens because a function (like `block_on`) attempted to block the current thread while the thread is being used to drive asynchronous tasks.
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
zsh: abort octocode index
Please note that this isn't a config related issue, as my config is based on the default config and passes validation; also, config errors surface before other issues.
In the build process, it could be useful to do a clean slate test, by running octocode against a small sample repo to catch these errors before they end up in the release.
@ossfellow thanks for the reply! I found the issue; hopefully, I will draft the release soon (the issue is just in huggingface initialization), while with voyage it works well.
I just cannot make it work to run tests for all features in GitHub. Somehow, on Linux, it failed, while it works well on macOS locally. That's why I disabled tests for it. Hopefully will find solution for it.