Skip to content

Commit 7653eaa

Browse files
committed
Fix:
- ai: safer handling of malformed API responses prevents potential crashes - app: case-insensitive .app bundle detection catches more installed apps on macOS - app: reduced unnecessary cloning and memory allocations across all modules - app: removed redundant unsafe Send/Sync impls on progress tracker - ci: Linux builds now install required X11 system dependencies - ci: clippy checks split into lib and test targets for better lint coverage
1 parent d5c4f01 commit 7653eaa

171 files changed

Lines changed: 1502 additions & 1350 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yml

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ jobs:
3939
timeout-minutes: 20
4040
steps:
4141
- uses: actions/checkout@v4
42+
- name: Install system dependencies
43+
run: sudo apt-get update && sudo apt-get install -y libxcb1-dev libxkbcommon-dev libxkbcommon-x11-dev
4244
- uses: dtolnay/rust-toolchain@stable
4345
with:
4446
components: clippy
@@ -47,18 +49,32 @@ jobs:
4749
with:
4850
prefix-key: "v1-rust"
4951
cache-on-failure: true
50-
- name: Clippy
52+
- name: Clippy (lib)
5153
env:
5254
SCCACHE_GHA_ENABLED: "true"
5355
RUSTC_WRAPPER: "sccache"
54-
run: cargo clippy --workspace --all-targets --locked -- -D warnings
56+
run: cargo clippy --workspace --lib --locked -- -D warnings
57+
- name: Clippy (tests)
58+
env:
59+
SCCACHE_GHA_ENABLED: "true"
60+
RUSTC_WRAPPER: "sccache"
61+
run: >-
62+
cargo clippy --workspace --tests --bins --locked -- -D warnings
63+
-A clippy::unwrap_used -A clippy::indexing_slicing
64+
-A clippy::needless_raw_string_hashes -A clippy::unreadable_literal
65+
-A clippy::uninlined_format_args -A clippy::single_char_pattern
66+
-A clippy::float_cmp -A clippy::redundant_closure
67+
-A clippy::default_trait_access -A clippy::ignore_without_reason
68+
-A clippy::manual_let_else -A clippy::panic
5569
5670
test:
5771
name: Test
5872
runs-on: ubuntu-latest
5973
timeout-minutes: 30
6074
steps:
6175
- uses: actions/checkout@v4
76+
- name: Install system dependencies
77+
run: sudo apt-get update && sudo apt-get install -y libxcb1-dev libxkbcommon-dev libxkbcommon-x11-dev
6278
- uses: dtolnay/rust-toolchain@stable
6379
- name: Setup mold linker
6480
uses: rui314/setup-mold@v1

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# Changelog
22

3+
## v0.7.1
4+
5+
Fix:
6+
- ai: safer handling of malformed API responses prevents potential crashes
7+
- app: case-insensitive .app bundle detection catches more installed apps on macOS
8+
- app: reduced unnecessary cloning and memory allocations across all modules
9+
- app: removed redundant unsafe Send/Sync impls on progress tracker
10+
- ci: Linux builds now install required X11 system dependencies
11+
- ci: clippy checks split into lib and test targets for better lint coverage
12+
313
## v0.8.0
414

515
- app: reorganized into 28 independent crates for faster builds and modular composition

Cargo.lock

Lines changed: 28 additions & 28 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ exclude = ["vendor"]
3333
resolver = "2"
3434

3535
[workspace.package]
36-
version = "0.7.0"
36+
version = "0.7.1"
3737
edition = "2024"
3838
rust-version = "1.94.0"
3939
license = "MIT"

crates/automation/src/executor.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ pub struct Executor {
4848

4949
impl Executor {
5050
/// Create a new executor
51-
pub async fn new(config: ExecutorConfig) -> Result<Self, ExecutorError> {
51+
pub fn new(config: ExecutorConfig) -> Result<Self, ExecutorError> {
5252
let db = CacheDb::open().map_err(ExecutorError::Database)?;
5353

5454
Ok(Self {
@@ -233,9 +233,7 @@ impl Executor {
233233
}
234234

235235
// Check destination is available
236-
let dest_mount = if let Some(m) = self.get_destination_mount(&automation).await {
237-
m
238-
} else {
236+
let Some(dest_mount) = self.get_destination_mount(&automation).await else {
239237
tracing::debug!(automation_id = automation.id, "Destination not available");
240238
continue;
241239
};
@@ -338,7 +336,7 @@ impl Executor {
338336
}
339337

340338
/// Mark interrupted runs on startup
341-
pub async fn recover_interrupted_runs(&self) -> Result<u64, ExecutorError> {
339+
pub fn recover_interrupted_runs(&self) -> Result<u64, ExecutorError> {
342340
let count = self.db.mark_interrupted_on_startup()?;
343341

344342
if count > 0 {
@@ -349,7 +347,7 @@ impl Executor {
349347
}
350348

351349
/// Get resumable runs
352-
pub async fn get_resumable_runs(&self) -> Result<Vec<Run>, ExecutorError> {
350+
pub fn get_resumable_runs(&self) -> Result<Vec<Run>, ExecutorError> {
353351
self.db
354352
.find_resumable_runs()
355353
.map_err(ExecutorError::Database)

crates/automation/src/executor_test.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ async fn test_recover_interrupted_runs() {
147147
assert_eq!(run.status, RunStatus::Running);
148148

149149
// Recover interrupted runs
150-
let count = executor.recover_interrupted_runs().await.unwrap();
150+
let count = executor.recover_interrupted_runs().unwrap();
151151
assert_eq!(count, 1);
152152

153153
// Check run is now partial
@@ -178,7 +178,7 @@ async fn test_manual_trigger() {
178178
triggers: Triggers::default(),
179179
paths: vec![PathMapping {
180180
source: source_dir.to_string_lossy().to_string(),
181-
dest: "".to_string(),
181+
dest: String::new(),
182182
exclude: vec![],
183183
}],
184184
settings: Settings {

0 commit comments

Comments
 (0)