Skip to content

Commit 65e7b7d

Browse files
nassorCopilot
andcommitted
Update dependencies and improve CI configuration for Rust 1.95.0
Co-authored-by: Copilot <copilot@github.com>
1 parent 090c168 commit 65e7b7d

12 files changed

Lines changed: 64 additions & 87 deletions

.github/workflows/ci.yml

Lines changed: 10 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -16,62 +16,53 @@ jobs:
1616
test:
1717
name: Test
1818
runs-on: ubuntu-latest
19-
strategy:
20-
matrix:
21-
rust:
22-
- stable
23-
- 1.89.0 # Rust minimum version
2419
steps:
2520
- uses: actions/checkout@v4
26-
21+
2722
- name: Install Rust
2823
uses: dtolnay/rust-toolchain@master
2924
with:
30-
toolchain: ${{ matrix.rust }}
31-
25+
toolchain: 1.95.0
26+
components: rustfmt, clippy
27+
3228
- name: Cache cargo registry
3329
uses: actions/cache@v4
3430
with:
3531
path: ~/.cargo/registry
3632
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
37-
33+
3834
- name: Cache cargo index
3935
uses: actions/cache@v4
4036
with:
4137
path: ~/.cargo/git
4238
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
43-
39+
4440
- name: Cache cargo build
4541
uses: actions/cache@v4
4642
with:
4743
path: target
4844
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
49-
45+
5046
- name: Check formatting
5147
run: cargo fmt --all -- --check
52-
if: matrix.rust == 'stable'
53-
48+
5449
- name: Run clippy
5550
run: cargo clippy --all-targets --all-features -- -D warnings
56-
if: matrix.rust == 'stable'
5751

5852
- name: Build
5953
run: cargo build
6054

6155
- name: Check benchmarks
6256
run: cargo check --benches
63-
if: matrix.rust == 'stable'
6457

6558
- name: Check examples
6659
run: cargo check --examples
67-
if: matrix.rust == 'stable'
68-
60+
6961
- name: Run tests
7062
run: cargo test --lib
71-
63+
7264
- name: Run doctests
7365
run: cargo test --doc
74-
if: matrix.rust == 'stable'
7566

7667
security_audit:
7768
name: Security Audit

Cargo.lock

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

Cargo.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
[package]
22
name = "cano"
3-
version = "0.8.0"
3+
version = "0.9.0"
44
homepage = "https://nassor.github.io/cano/"
55
edition = "2024"
6-
rust-version = "1.89.0"
6+
rust-version = "1.95.0"
77
description = "High-performance orchestration engine for building resilient, self-healing systems in Rust. Uses Finite State Machines (FSM) for strict, type-safe transitions."
88
license = "MIT"
99
repository = "https://github.com/nassor/cano"
@@ -14,7 +14,7 @@ authors = ["Nassor Frazier-Silva"]
1414

1515
[dependencies]
1616
async-trait = "0.1"
17-
tokio = { version = "1.51.1", features = ["macros", "sync", "time", "rt-multi-thread"] }
17+
tokio = { version = "1.52.1", features = ["macros", "sync", "time", "rt-multi-thread"] }
1818
rand = "0.10"
1919
chrono = { version = "0.4", features = ["serde"], optional = true }
2020
cron = { version = "0.16", optional = true }
@@ -27,16 +27,16 @@ tracing = ["dep:tracing"]
2727
all = ["scheduler", "tracing"]
2828

2929
[dev-dependencies]
30-
axum = "0.8"
30+
axum = "0.8.9"
3131
criterion = { version = "0.8", features = ["html_reports", "async_tokio"] }
3232
reqwest = { version = "0.13", features = ["json"] }
33-
rig-core = "0.34"
33+
rig-core = "0.35"
3434
serde = { version = "1", features = ["derive"] }
3535
serde_json = "1"
3636
wide = "1.2"
3737
tracing-subscriber = { version = "0.3", features = ["env-filter", "fmt"] }
3838
chrono = { version = "0.4", features = ["serde"] }
39-
tokio = { version = "1.51.1", features = ["macros", "sync", "time", "rt-multi-thread", "signal"] }
39+
tokio = { version = "1.52.1", features = ["macros", "sync", "time", "rt-multi-thread", "signal"] }
4040

4141
[[example]]
4242
name = "ai_workflow_yes_and"

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
[![Downloads](https://img.shields.io/crates/d/cano.svg)](https://crates.io/crates/cano)
99
[![License](https://img.shields.io/crates/l/cano.svg)](https://github.com/nassor/cano/blob/main/LICENSE)
1010
[![CI](https://github.com/nassor/cano/workflows/CI/badge.svg)](https://github.com/nassor/cano/actions)
11-
[![Rust Version](https://img.shields.io/badge/rust-1.89%2B-blue.svg)](https://www.rust-lang.org)
11+
[![Rust Version](https://img.shields.io/badge/rust-1.95%2B-blue.svg)](https://www.rust-lang.org)
1212

1313
<em>**Orchestrate complex async processes with finite state machines, parallel execution, and built-in scheduling.**</em>
1414

15-
<em>Cano still far from 1.0 release. The API is subject to changes and breaking changes.</em>
15+
<em>Cano is still far from a 1.0 release. The API is subject to changes and may include breaking changes.</em>
1616

1717
</div>
1818

benches/resource_performance.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@ fn bench_lifecycle_n_resources(c: &mut Criterion) {
7575
}
7676
runtime.block_on(async {
7777
resources.setup_all().await.unwrap();
78+
// teardown_all returns (); per-resource errors are logged
79+
// internally. Noop never fails, so nothing to assert here.
7880
resources.teardown_all().await;
7981
});
8082
});

benches/task_performance.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -725,10 +725,10 @@ fn bench_task_run_bare(c: &mut Criterion) {
725725
&count,
726726
|b, &count| {
727727
let task = DirectRunTask;
728+
let res = Resources::new();
728729

729730
b.to_async(tokio::runtime::Runtime::new().unwrap())
730731
.iter(|| async {
731-
let res = Resources::new();
732732
for _i in 0..count {
733733
let _result = task.run(&res).await;
734734
}
@@ -741,10 +741,10 @@ fn bench_task_run_bare(c: &mut Criterion) {
741741
&count,
742742
|b, &count| {
743743
let task = ViaRunBareTask;
744+
let res = Resources::new();
744745

745746
b.to_async(tokio::runtime::Runtime::new().unwrap())
746747
.iter(|| async {
747-
let res = Resources::new();
748748
for _i in 0..count {
749749
let _result = task.run(&res).await;
750750
}

docs/config.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ build_search_index = false
77
generate_feeds = false
88

99
[extra]
10-
version = "0.8.0"
10+
version = "0.9.0"
1111
github_url = "https://github.com/nassor/cano"
1212
crates_url = "https://crates.io/crates/cano"
1313
docsrs_url = "https://docs.rs/cano"

examples/scheduler_book_prepositions.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ impl Node<WorkflowPhase> for BookRankingNode {
278278
println!("🏆 Ranking books by preposition diversity...");
279279

280280
let mut analyses = prep_res;
281-
analyses.sort_by(|a, b| b.preposition_count.cmp(&a.preposition_count));
281+
analyses.sort_by_key(|b| std::cmp::Reverse(b.preposition_count));
282282

283283
analyses
284284
.into_iter()

examples/scheduler_mapreduce_books.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,7 @@ async fn reduce_global_results(global_results: &GlobalResults) -> Result<(), Can
497497
.collect();
498498

499499
// Sort by preposition count
500-
all_books.sort_by(|a, b| b.preposition_count.cmp(&a.preposition_count));
500+
all_books.sort_by_key(|b| std::cmp::Reverse(b.preposition_count));
501501

502502
// Display batch summaries
503503
println!("\n📦 Batch Summaries:");

examples/workflow_ad_exchange.rs

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -600,24 +600,14 @@ async fn main() -> Result<(), CanoError> {
600600
let result = match workflow.orchestrate(AdExchangeState::Start).await {
601601
Ok(state) => state,
602602
Err(e) => {
603-
// If workflow fails due to split timeout/error, handle as NoFill
603+
// If workflow fails due to split timeout/error, handle as NoFill.
604+
// Reuse the original workflow/store so error tracking sees the real
605+
// request and any context produced before the failure.
604606
eprintln!("❌ Workflow error: {}", e);
607+
store.put("error_reason", e.to_string())?;
605608
println!("\n⚠️ Handling as No Fill due to error\n");
606609

607-
// Build a fresh workflow for the error recovery path
608-
let store2 = MemoryStore::new();
609-
store2.put(
610-
"ad_request",
611-
AdRequest {
612-
request_id: "req_abc123".to_string(),
613-
placement_id: "placement_728x90_top".to_string(),
614-
floor_price: 1.50,
615-
},
616-
)?;
617-
let workflow2 = create_ad_exchange_workflow(store2);
618-
workflow2
619-
.orchestrate(AdExchangeState::ErrorTracking)
620-
.await?
610+
workflow.orchestrate(AdExchangeState::ErrorTracking).await?
621611
}
622612
};
623613

0 commit comments

Comments
 (0)