nikivdev/code · error

jj workspace not available

Error message

jj workspace not available

What it means

Error "jj workspace not available" thrown in nikivdev/code.

Source

Thrown at src/commit.rs:8395

        }
    }
    if out.is_empty() {
        "branch".to_string()
    } else {
        out
    }
}

fn create_review_bookmark(repo_root: &Path, commit_sha: &str, branch: &str) -> Result<String> {
    if env_flag("FLOW_COMMIT_QUEUE_JJ_DISABLE") {
        bail!("FLOW_COMMIT_QUEUE_JJ_DISABLE=1");
    }
    let Some(prefix) = review_bookmark_prefix(repo_root) else {
        bail!("review prefix disabled");
    };
    let Some(jj_root) = vcs::jj_root_if_exists(repo_root) else {
        println!("ℹ️  jj workspace not found; skipping review bookmark creation.");
        bail!("jj workspace not available");
    };
    let branch_slug = sanitize_review_branch(branch);
    let base = format!("{}/{}-{}", prefix, branch_slug, short_sha(commit_sha));
    let mut name = base.clone();
    let mut index = 1;
    while jj_bookmark_exists(&jj_root, &name) {
        name = format!("{}-{}", base, index);
        index += 1;
        if index > 50 {
            bail!("too many review bookmarks with base {}", base);
        }
    }

    if let Err(err) = jj_run_in(&jj_root, &["bookmark", "create", &name, "-r", commit_sha]) {
        let msg = err.to_string().to_lowercase();
        if msg.contains("commit not found")
            || msg.contains("current working-copy commit not found")
            || msg.contains("failed to load short-prefixes index")

View on GitHub (pinned to a747e741ae)

When it happens

Trigger: Thrown at src/commit.rs:8395 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of nikivdev/code@a747e741ae (2026-09-01). Data as JSON: /api/errors/495ed4a25ad14c2a. Report an issue: GitHub.