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
12 changes: 10 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,14 @@ jobs:
components: rustfmt
- run: cargo fmt --all --check

cargo-version-sync:
name: Cargo Version Sync
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@stable
- run: scripts/check-cargo-version-sync.sh

clippy:
name: Lint
runs-on: ubuntu-latest
Expand All @@ -59,7 +67,7 @@ jobs:
with:
components: clippy
- uses: Swatinem/rust-cache@v2
- run: cargo clippy -p claudette -p claudette-server --all-targets --all-features
- run: cargo clippy -p claudette -p claudette-server -p claudette-cli --all-targets --all-features

test:
name: Test
Expand All @@ -72,7 +80,7 @@ jobs:
- uses: taiki-e/install-action@cargo-llvm-cov
- uses: Swatinem/rust-cache@v2
- name: Run tests with coverage
run: cargo llvm-cov -p claudette -p claudette-server --all-features --lcov --output-path lcov.info
run: cargo llvm-cov -p claudette -p claudette-server -p claudette-cli --all-features --lcov --output-path lcov.info
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
with:
Expand Down
6 changes: 1 addition & 5 deletions release-please-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,7 @@
],
"packages": {
".": {
"include-component-in-tag": false,
"extra-files": [
"src-tauri/Cargo.toml",
"src-cli/Cargo.toml"
]
"include-component-in-tag": false
}
}
}
39 changes: 39 additions & 0 deletions scripts/check-cargo-version-sync.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#!/usr/bin/env bash
set -euo pipefail

Comment thread
jamesbrink marked this conversation as resolved.
repo_root="$(cd "$(dirname "$0")/.." && pwd)"
cd "$repo_root"

cargo metadata --locked --format-version 1 --no-deps |
python3 -c '
import json
import sys

metadata = json.load(sys.stdin)
workspace_members = set(metadata["workspace_members"])
packages = [
package
for package in metadata["packages"]
if package["id"] in workspace_members
]

versions = {}
for package in packages:
versions.setdefault(package["version"], []).append(
(package["name"], package["manifest_path"])
)

if len(versions) != 1:
print("workspace package versions are not in sync", file=sys.stderr)
for version, version_packages in sorted(versions.items()):
print(f" {version}:", file=sys.stderr)
for name, manifest_path in sorted(version_packages):
print(f" - {name}: {manifest_path}", file=sys.stderr)
sys.exit(1)

version, version_packages = next(iter(versions.items()))
print(
f"Cargo workspace package versions are in sync: "
f"{version} ({len(version_packages)} packages)"
)
'
10 changes: 4 additions & 6 deletions src/agent/naming.rs
Original file line number Diff line number Diff line change
Expand Up @@ -174,12 +174,10 @@ pub async fn generate_session_name(
env.apply(&mut cmd);
}

let output = cmd.output().await.map_err(|e| {
format!(
"Failed to spawn claude at {:?} for session name: {e}",
claude_path
)
})?;
let output = cmd
.output()
.await
.map_err(|e| format!("Failed to spawn claude at {claude_path:?} for session name: {e}"))?;

if !output.status.success() {
let stderr = String::from_utf8_lossy(&output.stderr);
Expand Down
2 changes: 0 additions & 2 deletions src/db/test_support.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
//! Each domain module's `mod tests` imports from here so we don't duplicate
//! the same `make_*` helpers across files.

#![cfg(test)]

use crate::model::{AgentStatus, ChatMessage, ChatRole, Repository, Workspace, WorkspaceStatus};

use super::Database;
Expand Down
Loading