Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ jobs:
test -n "$VERSION"
bash check-version.sh "$VERSION"

- name: Check public API compatibility with v5.3.2
- name: Check public API compatibility with v5.3.3
run: |
cargo install cargo-semver-checks --version 0.48.0 --locked
bash scripts/check_semver.sh 5.3.2
bash scripts/check_semver.sh 5.3.3

- name: Check SDK protocol and API alignment
run: |
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [5.3.4] - 2026-07-16

### Fixed

- Prepared one saved source document per active language before a cold
workspace-symbol search, so language servers that load projects on document
open can serve the first semantic query instead of returning `No Project`.

## [5.3.3] - 2026-07-16

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion core/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "a3s-code-core"
version = "5.3.3"
version = "5.3.4"
edition = "2021"
authors = ["A3S Lab Team"]
license = "MIT"
Expand Down
12 changes: 12 additions & 0 deletions core/src/code_intelligence/language_runtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,18 @@ impl LanguageRuntime {
self.initialized.capabilities
}

pub(crate) async fn prepare_saved_document(
&self,
path: &WorkspacePath,
saved_content: &str,
cancellation: &CancellationToken,
) -> Result<(), LanguageRuntimeError> {
self.require_path(path)?;
self.sync_saved_document(path, saved_content, cancellation)
.await?;
ensure_not_cancelled(cancellation)
}

pub(crate) async fn document_symbols(
&self,
path: &WorkspacePath,
Expand Down
19 changes: 19 additions & 0 deletions core/src/code_intelligence/workspace_runtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -346,15 +346,34 @@ impl WorkspaceRuntime {
return Ok(self.workspace_result(Vec::new(), false));
}

let source_paths = tokio::select! {
_ = cancellation.cancelled() => return Err(CodeIntelligenceError::Cancelled),
paths = self.source_paths.read() => paths.clone(),
};
let mut queries = FuturesUnordered::new();
for slot in self
.slots
.iter()
.filter(|slot| slot.relevant.load(Ordering::Acquire))
{
let anchor = source_paths
.iter()
.find(|path| slot.profile.supports_path(Path::new(path.as_str())))
.cloned();
let cancellation = cancellation.clone();
queries.push(async move {
let anchor = anchor.ok_or_else(|| CodeIntelligenceError::Unavailable {
message: format!(
"no saved source file can prepare the {} language runtime",
profile_language(slot.profile.id())
),
})?;
let runtime = self.ensure_runtime(slot, &cancellation).await?;
let content = self.read_saved(&anchor, &cancellation).await?;
runtime
.prepare_saved_document(&anchor, &content, &cancellation)
.await
.map_err(|error| map_language_error(slot.profile.id(), error))?;
runtime
.search_symbols(query, limit, cancellation)
.await
Expand Down
47 changes: 47 additions & 0 deletions core/src/code_intelligence/workspace_runtime/integration_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,53 @@ fn test_runtime_with_file_system(
)
}

#[tokio::test]
async fn first_workspace_symbol_query_opens_a_saved_source_document() {
let workspace = tempfile::tempdir().unwrap();
write_workspace_files(
workspace.path(),
&[
("package.json", "{}\n"),
(
"src/main.ts",
"export function answer(): number { return 42; }\n",
),
],
);
let root = std::fs::canonicalize(workspace.path()).unwrap();
let snapshot = snapshot(&root, &["package.json", "src/main.ts"]);
let server_dir = tempfile::tempdir().unwrap();
let server = server_dir.path().join(if cfg!(windows) {
"requires-open-fake-lsp.exe"
} else {
"requires-open-fake-lsp"
});
compile_fake_server(&server);
let runtime = test_runtime(
&root,
&snapshot,
vec![LanguageServerProfile::typescript_javascript(&server)],
);

let result = runtime
.search_symbols("answer", 10, CancellationToken::new())
.await
.expect("the first workspace symbol query must prepare a language project");

assert_eq!(result.items.len(), 1);
assert_eq!(result.items[0].name, "answer");
assert_eq!(result.items[0].location.path.as_str(), "src/main.ts");
let log = std::fs::read_to_string(server.with_extension("log")).unwrap();
let did_open = log.find("\"method\":\"textDocument/didOpen\"").unwrap();
let workspace_symbol = log.find("\"method\":\"workspace/symbol\"").unwrap();
assert!(
did_open < workspace_symbol,
"the saved source must be opened before workspace symbol search: {log}"
);

runtime.shutdown().await;
}

#[tokio::test]
async fn abandoned_caller_does_not_restart_an_in_flight_language_runtime() {
let workspace = tempfile::tempdir().unwrap();
Expand Down
12 changes: 12 additions & 0 deletions core/tests/fixtures/code_intelligence_fake_lsp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,18 @@ fn main() -> io::Result<()> {
}
continue;
};
if executable_name.contains("requires-open")
&& method == "workspace/symbol"
&& document_uri.is_none()
{
write_message(
&mut output,
&format!(
"{{\"jsonrpc\":\"2.0\",\"id\":{id},\"error\":{{\"code\":1,\"message\":\"No Project.\"}}}}"
),
)?;
continue;
}
if is_navigation_method(&method) {
navigation_requests += 1;
}
Expand Down
5 changes: 4 additions & 1 deletion scripts/check_semver.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,13 @@

set -euo pipefail

BASELINE_VERSION="${1:-5.3.2}"
BASELINE_VERSION="${1:-5.3.3}"
PACKAGE="a3s-code-core"

case "$BASELINE_VERSION" in
5.3.3)
BASELINE_SHA256="5ed95dff8354578962130615e36654f7107c7bd9a0b862fe8e9e6ae1ed1676f9"
;;
5.3.2)
BASELINE_SHA256="da8f43aa04ca80edbc543575a5b2bfc9e1cf48e76aecf74a61f67d536f8172c2"
;;
Expand Down
4 changes: 2 additions & 2 deletions sdk/node/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions sdk/node/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "a3s-code-node"
version = "5.3.3"
version = "5.3.4"
edition = "2021"
authors = ["A3S Lab Team"]
license = "MIT"
Expand All @@ -11,7 +11,7 @@ description = "A3S Code Node.js bindings - Native addon via napi-rs"
crate-type = ["cdylib"]

[dependencies]
a3s-code-core = { version = "5.3.3", path = "../../core", features = ["s3", "serve"] }
a3s-code-core = { version = "5.3.4", path = "../../core", features = ["s3", "serve"] }
napi = { version = "2", features = ["async", "napi6", "serde-json"] }
napi-derive = "2"
tokio = { version = "1.35", features = ["full"] }
Expand Down
14 changes: 7 additions & 7 deletions sdk/node/examples/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 8 additions & 8 deletions sdk/node/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions sdk/node/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@a3s-lab/code",
"version": "5.3.3",
"version": "5.3.4",
"description": "A3S Code - Native Node.js bindings for the coding-agent runtime",
"main": "index.js",
"types": "index.d.ts",
Expand Down Expand Up @@ -44,11 +44,11 @@
"test:helpers": "node test-helpers.mjs"
},
"optionalDependencies": {
"@a3s-lab/code-darwin-arm64": "5.3.3",
"@a3s-lab/code-linux-x64-gnu": "5.3.3",
"@a3s-lab/code-linux-x64-musl": "5.3.3",
"@a3s-lab/code-linux-arm64-gnu": "5.3.3",
"@a3s-lab/code-linux-arm64-musl": "5.3.3",
"@a3s-lab/code-win32-x64-msvc": "5.3.3"
"@a3s-lab/code-darwin-arm64": "5.3.4",
"@a3s-lab/code-linux-x64-gnu": "5.3.4",
"@a3s-lab/code-linux-x64-musl": "5.3.4",
"@a3s-lab/code-linux-arm64-gnu": "5.3.4",
"@a3s-lab/code-linux-arm64-musl": "5.3.4",
"@a3s-lab/code-win32-x64-msvc": "5.3.4"
}
}
2 changes: 1 addition & 1 deletion sdk/python-bootstrap/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ name = "a3s-code"
# Keep in sync with crates/code core release. The bootstrap loader fetches
# the matching native wheel from `https://github.com/AI45Lab/Code/releases/tag/v<version>`
# at import time.
version = "5.3.3"
version = "5.3.4"
description = "A3S Code Python SDK — pure-Python bootstrap that fetches the native wheel from GitHub Releases"
readme = "README.md"
license = {text = "MIT"}
Expand Down
2 changes: 1 addition & 1 deletion sdk/python-bootstrap/src/a3s_code/_bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

# Version is the bootstrap's own version, which equals the matching native
# wheel version on GH Releases. Bumped by the release workflow.
__version__ = "5.3.3"
__version__ = "5.3.4"

_DEFAULT_BASE_URL = "https://github.com/A3S-Lab/Code/releases/download"
_REQUEST_TIMEOUT_S = 120
Expand Down
7 changes: 7 additions & 0 deletions sdk/python/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ All notable changes to the A3S Code Python SDK will be documented in this file.

## [Unreleased]

## [5.3.4] - 2026-07-16

### Fixed

- Updated the bundled Core so a cold workspace-symbol query prepares a saved
source document before asking the language server to search its projects.

## [5.3.3] - 2026-07-16

### Fixed
Expand Down
4 changes: 2 additions & 2 deletions sdk/python/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions sdk/python/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "a3s-code-py"
version = "5.3.3"
version = "5.3.4"
edition = "2021"
authors = ["A3S Lab Team"]
license = "MIT"
Expand All @@ -12,7 +12,7 @@ name = "a3s_code"
crate-type = ["cdylib"]

[dependencies]
a3s-code-core = { version = "5.3.3", path = "../../core", features = ["s3", "serve"] }
a3s-code-core = { version = "5.3.4", path = "../../core", features = ["s3", "serve"] }
pyo3 = { version = "0.23", features = ["multiple-pymethods"] }
tokio = { version = "1.35", features = ["full"] }
serde_json = "1.0"
Expand Down
2 changes: 1 addition & 1 deletion sdk/python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "maturin"

[project]
name = "a3s-code"
version = "5.3.3"
version = "5.3.4"
description = "A3S Code - Native Python bindings for the coding-agent runtime"
readme = "README.md"
license = {text = "MIT"}
Expand Down
Loading