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
61 changes: 49 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,26 @@ on:
pull_request:

env:
# PINNED, not `stable`. On 2026-07-29 the runner moved to clippy 1.97, which
# added `question_mark`, and the lint gate went red with no commit behind it —
# a compiler release is not a change to this repository and must not be able
# to fail its CI.
#
# Pinning here rather than in a `rust-toolchain.toml`: the toolchain action
# exports RUSTUP_TOOLCHAIN, which takes precedence over that file, so the
# pin would be ignored in exactly the place it is needed. The file exists too,
# for local parity.
#
# To bump: raise this, run `cargo +<new> clippy --workspace --all-targets --
# -D warnings` and `cargo +<new> fmt --all -- --check` locally first, and fix
# whatever the new release added in the same commit.
RUST_VERSION: "1.97.0"
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
MSRV: "1.85"
# The version this project promises to build on, verified by the job below
# against the WHOLE workspace. Keep in step with `rust-version` in the root
# Cargo.toml, which is where consumers read it.
MSRV: "1.91"

jobs:
# MSRV (Minimum Supported Rust Version) check
Expand Down Expand Up @@ -43,8 +60,11 @@ jobs:
restore-keys: |
${{ runner.os }}-cargo-msrv-

# `-p aingle_minimal` before, which is the one member with no wasmer in
# its dependency tree — so it passed at 1.85 while the workspace could
# not build below 1.91. A promise nothing checks is not a promise.
- name: Check MSRV
run: cargo check -p aingle_minimal
run: cargo check --workspace --all-targets

# Format check
fmt:
Expand All @@ -54,8 +74,9 @@ jobs:
- uses: actions/checkout@v6

- name: Install Rust
uses: dtolnay/rust-toolchain@stable
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.RUST_VERSION }}
components: rustfmt

- name: Check formatting
Expand All @@ -69,8 +90,9 @@ jobs:
- uses: actions/checkout@v6

- name: Install Rust
uses: dtolnay/rust-toolchain@stable
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.RUST_VERSION }}
components: clippy

- name: Install system dependencies
Expand Down Expand Up @@ -118,7 +140,9 @@ jobs:
- uses: actions/checkout@v6

- name: Install Rust
uses: dtolnay/rust-toolchain@stable
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.RUST_VERSION }}

- name: Install system dependencies
run: |
Expand Down Expand Up @@ -151,7 +175,9 @@ jobs:
- uses: actions/checkout@v6

- name: Install Rust
uses: dtolnay/rust-toolchain@stable
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.RUST_VERSION }}

- name: Install system dependencies
run: |
Expand Down Expand Up @@ -183,7 +209,9 @@ jobs:
- uses: actions/checkout@v6

- name: Install Rust
uses: dtolnay/rust-toolchain@stable
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.RUST_VERSION }}

- name: Install system dependencies
run: |
Expand Down Expand Up @@ -227,7 +255,9 @@ jobs:
- uses: actions/checkout@v6

- name: Install Rust
uses: dtolnay/rust-toolchain@stable
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.RUST_VERSION }}

- name: Install cargo-audit
run: cargo install cargo-audit
Expand All @@ -245,8 +275,9 @@ jobs:
- uses: actions/checkout@v6

- name: Install Rust
uses: dtolnay/rust-toolchain@stable
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.RUST_VERSION }}
components: llvm-tools-preview

- name: Install system dependencies
Expand Down Expand Up @@ -288,7 +319,9 @@ jobs:
- uses: actions/checkout@v6

- name: Install Rust
uses: dtolnay/rust-toolchain@stable
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.RUST_VERSION }}

- name: Install system dependencies
run: |
Expand Down Expand Up @@ -327,7 +360,9 @@ jobs:
- uses: actions/checkout@v6

- name: Install Rust
uses: dtolnay/rust-toolchain@stable
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.RUST_VERSION }}

- name: Install system dependencies
run: |
Expand Down Expand Up @@ -356,7 +391,9 @@ jobs:
- uses: actions/checkout@v6

- name: Install Rust
uses: dtolnay/rust-toolchain@stable
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.RUST_VERSION }}

- name: Install system dependencies
run: |
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ concurrency:
cancel-in-progress: true

env:
# Pinned on purpose: see the note in ci.yml.
RUST_VERSION: "1.97.0"
CARGO_TERM_COLOR: always

jobs:
Expand All @@ -25,7 +27,9 @@ jobs:
- uses: actions/checkout@v6

- name: Install Rust
uses: dtolnay/rust-toolchain@stable
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.RUST_VERSION }}

- name: Install system dependencies
run: |
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ permissions:
contents: write

env:
# Pinned on purpose: see the note in ci.yml.
RUST_VERSION: "1.97.0"
CARGO_TERM_COLOR: always

jobs:
Expand Down Expand Up @@ -50,8 +52,9 @@ jobs:
- uses: actions/checkout@v6

- name: Install Rust
uses: dtolnay/rust-toolchain@stable
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.RUST_VERSION }}
targets: ${{ matrix.target }}

- name: Install system dependencies (Linux)
Expand Down Expand Up @@ -163,7 +166,9 @@ jobs:
- uses: actions/checkout@v6

- name: Install Rust
uses: dtolnay/rust-toolchain@stable
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.RUST_VERSION }}

- name: Install system dependencies
run: |
Expand Down
14 changes: 11 additions & 3 deletions .github/workflows/security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ on:
workflow_dispatch:

env:
# Pinned on purpose: see the note in ci.yml.
RUST_VERSION: "1.97.0"
CARGO_TERM_COLOR: always

jobs:
Expand All @@ -28,7 +30,9 @@ jobs:
- uses: actions/checkout@v6

- name: Install Rust
uses: dtolnay/rust-toolchain@stable
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.RUST_VERSION }}

- name: Install cargo-audit
run: cargo install cargo-audit
Expand Down Expand Up @@ -60,7 +64,9 @@ jobs:
- uses: actions/checkout@v6

- name: Install Rust
uses: dtolnay/rust-toolchain@stable
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.RUST_VERSION }}

- name: Install cargo-deny
run: cargo install cargo-deny
Expand Down Expand Up @@ -109,7 +115,9 @@ jobs:
- uses: actions/checkout@v6

- name: Install Rust
uses: dtolnay/rust-toolchain@stable
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.RUST_VERSION }}

- name: Install cargo-vet
run: cargo install cargo-vet
Expand Down
14 changes: 14 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
[workspace.package]
# The MSRV, declared ONCE. It said 1.83 in twelve crates, 1.85 in the CI
# environment and 1.83 in CLAUDE.md, and the truth was none of those: the
# workspace needs 1.91, because `wasmer` (via aingle_contracts) requires it
# and `cranelift` under it requires 1.90. Verified by bisection — 1.85 and
# 1.90 both fail, 1.91 builds. Nothing had ever checked, because the MSRV job
# ran `cargo check -p aingle_minimal`: the one member with no wasmer in its
# tree.
#
# Uniform rather than per-crate on purpose: a lower number on a crate that
# has not been built at that version is the same unverified promise this is
# replacing. Refine per crate only with a run behind each figure.
rust-version = "1.91"

[workspace]
resolver = "2"
members = [
Expand Down
3 changes: 1 addition & 2 deletions crates/aingle_ai/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ authors = ["Apilium Technologies <hello@apilium.com>"]
keywords = ["aingle", "ai", "titans", "nested-learning", "memory"]
categories = ["science", "algorithms"]
edition = "2021"
rust-version = "1.83"

rust-version.workspace = true
[dependencies]
# Serialization
serde = { version = "1", features = ["derive"] }
Expand Down
10 changes: 8 additions & 2 deletions crates/aingle_ai/src/nested_learning/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,10 @@ impl NestedLearning {
self.tx_count += 1;

// 4. Check if optimizer-level update is needed
if self.tx_count % self.config.optimizer_update_interval == 0 {
if self
.tx_count
.is_multiple_of(self.config.optimizer_update_interval)
{
debug!(
tx_count = self.tx_count,
"Triggering optimizer-level update"
Expand All @@ -114,7 +117,10 @@ impl NestedLearning {
self.block_count += 1;

// Check if meta-level update is needed
if self.block_count % self.config.meta_update_interval == 0 {
if self
.block_count
.is_multiple_of(self.config.meta_update_interval)
{
debug!(
block_count = self.block_count,
"Triggering meta-level update"
Expand Down
3 changes: 1 addition & 2 deletions crates/aingle_contracts/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ authors = ["Apilium Technologies <hello@apilium.com>"]
keywords = ["aingle", "smart-contracts", "wasm", "dsl", "blockchain"]
categories = ["wasm", "database"]
edition = "2021"
rust-version = "1.83"

rust-version.workspace = true
[features]
default = ["runtime"]
runtime = ["dep:wasmer"]
Expand Down
3 changes: 1 addition & 2 deletions crates/aingle_cortex/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ authors = ["Apilium Technologies <hello@apilium.com>"]
keywords = ["aingle", "api", "graphql", "sparql", "rest"]
categories = ["web-programming", "database"]
edition = "2021"
rust-version = "1.83"

rust-version.workspace = true
[features]
default = ["rest", "sparql", "auth", "dag"]
rest = []
Expand Down
2 changes: 1 addition & 1 deletion crates/aingle_cortex/src/service/validate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ mod tests {
let s = v
.as_str()
.unwrap_or_else(|| panic!("expected hex, got {v}"));
assert!(s.len() % 2 == 0, "hex must be byte-aligned: {s:?}");
assert!(s.len().is_multiple_of(2), "hex must be byte-aligned: {s:?}");
(0..s.len() / 2)
.map(|i| u8::from_str_radix(&s[i * 2..i * 2 + 2], 16).expect("hex digit"))
.collect()
Expand Down
3 changes: 1 addition & 2 deletions crates/aingle_graph/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ authors = ["Apilium Technologies <hello@apilium.com>"]
keywords = ["aingle", "graph", "rdf", "semantic", "triplestore"]
categories = ["database", "data-structures"]
edition = "2021"
rust-version = "1.83"

rust-version.workspace = true
[features]
default = ["sled-backend"]
# Storage backends
Expand Down
3 changes: 1 addition & 2 deletions crates/aingle_ingest/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ version = "0.8.0"
description = "Structural extraction of triples and text chunks from markdown/code for AIngle"
license = "Apache-2.0 OR LicenseRef-Commercial"
edition = "2021"
rust-version = "1.83"

rust-version.workspace = true
[dependencies]
aingle_graph = { version = "0.8", path = "../aingle_graph", features = ["dag"] }
serde = { version = "1.0", features = ["derive"] }
Expand Down
3 changes: 1 addition & 2 deletions crates/aingle_logic/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ authors = ["Apilium Technologies <hello@apilium.com>"]
keywords = ["aingle", "logic", "reasoning", "validation", "rules"]
categories = ["algorithms", "data-structures"]
edition = "2021"
rust-version = "1.83"

rust-version.workspace = true
[features]
default = []
# Enable SPARQL-like query rules
Expand Down
3 changes: 1 addition & 2 deletions crates/aingle_minimal/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ authors = ["Apilium Technologies <hello@apilium.com>"]
keywords = ["aingle", "iot", "dag", "embedded"]
categories = ["embedded", "network-programming"]
edition = "2021"
rust-version = "1.85"

rust-version.workspace = true
[features]
default = ["std", "coap", "sqlite"]
std = []
Expand Down
2 changes: 1 addition & 1 deletion crates/aingle_minimal/src/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,7 @@ impl MinimalNode {
while self.running.load(Ordering::SeqCst) {
// Sync discovered peers periodically (every 100 iterations = ~1 second)
discovery_sync_counter = discovery_sync_counter.wrapping_add(1);
if discovery_sync_counter % 100 == 0 {
if discovery_sync_counter.is_multiple_of(100) {
self.network.sync_discovered_peers();
}

Expand Down
2 changes: 1 addition & 1 deletion crates/aingle_minimal/src/ota.rs
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,7 @@ mod hex {
}

pub fn decode(s: &str) -> Result<Vec<u8>, String> {
if s.len() % 2 != 0 {
if !s.len().is_multiple_of(2) {
return Err("Invalid hex string length".to_string());
}

Expand Down
2 changes: 1 addition & 1 deletion crates/aingle_minimal/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -732,7 +732,7 @@ mod hex {
}

pub fn decode(s: &str) -> Result<Vec<u8>, FromHexError> {
if s.len() % 2 != 0 {
if !s.len().is_multiple_of(2) {
return Err(FromHexError::OddLength);
}
(0..s.len())
Expand Down
Loading
Loading