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
228 changes: 114 additions & 114 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,167 +1,167 @@
name: CI

on:
push:
branches:
- main
pull_request:

env:
CARGO_TERM_COLOR: always
RUST_VERSION: 1.90.0

jobs:
fmt:
name: fmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Weavegraph CI — runs on push to main and on every pull request.
name: "CI"
# triggers
on: # event hooks
push: # push events
branches: ["main"]
pull_request: # all PR events
types: [opened, synchronize, reopened]
workflow_dispatch: # allow manual runs from the GitHub UI
# build env
env: # build-time defaults
CARGO_TERM_COLOR: "always"
RUST_VERSION: "1.90.0"
# jobs
jobs: # CI pipeline
# ── format ───────────────────────────────────────────────────────────────
fmt: # formatting check
name: cargo fmt
runs-on: ubuntu-24.04
steps: # fmt steps
- uses: "actions/checkout@v4"
- uses: dtolnay/rust-toolchain@stable
with:
with: # fmt toolchain
toolchain: ${{ env.RUST_VERSION }}
components: rustfmt
- uses: Swatinem/rust-cache@v2
with:
- uses: "Swatinem/rust-cache@v2"
with: # fmt cache
prefix-key: fmt
- name: cargo fmt --check
run: cargo fmt --all -- --check

- run: cargo fmt --all -- --check
# ───────────────────────────────────────────────────────────────────────
# ── lint ─────────────────────────────────────────────────────────────────
clippy:
name: clippy (${{ matrix.toolchain }} / ${{ matrix.track }})
runs-on: ubuntu-latest
strategy:
name: cargo clippy (${{ matrix.toolchain }})
runs-on: ubuntu-24.04
strategy: # toolchain matrix
fail-fast: false
matrix:
matrix: # toolchain variants
include:
- toolchain: "1.90.0"
track: required
experimental: false
- toolchain: "stable"
track: canary
- toolchain: stable
experimental: true
continue-on-error: ${{ matrix.experimental }}
steps:
- uses: actions/checkout@v4
steps: # clippy steps
- uses: "actions/checkout@v4"
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.toolchain }}
with: # clippy toolchain
toolchain: "${{ matrix.toolchain }}"
components: clippy
- uses: Swatinem/rust-cache@v2
with:
- uses: "Swatinem/rust-cache@v2"
with: # clippy cache
prefix-key: clippy-${{ matrix.toolchain }}
- name: cargo clippy
run: cargo clippy --workspace --all-targets --all-features -- -D warnings

- run: cargo clippy --workspace --all-targets --all-features -- -D warnings
# ---
# ── test ─────────────────────────────────────────────────────────────────
test:
name: test (${{ matrix.toolchain }} / ${{ matrix.track }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
name: cargo test (${{ matrix.toolchain }})
runs-on: ubuntu-24.04
strategy: # test matrix
fail-fast: false # continue even if one toolchain fails
matrix: # test toolchains
include:
- toolchain: "1.90.0"
track: required
experimental: false
- toolchain: "stable"
track: canary
- toolchain: stable
experimental: true
continue-on-error: ${{ matrix.experimental }}
steps:
- uses: actions/checkout@v4
steps: # test steps
- uses: "actions/checkout@v4"
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.toolchain }}
- uses: Swatinem/rust-cache@v2
with:
with: # test toolchain
toolchain: "${{ matrix.toolchain }}"
- uses: "Swatinem/rust-cache@v2"
with: # test cache
prefix-key: test-${{ matrix.toolchain }}
- name: cargo test (lib only - postgres requires external service)
run: cargo test --lib --all-features
# postgres feature tests require an external service; run lib-only here
- run: cargo test --lib --all-features

# ── docs ─────────────────────────────────────────────────────────────────
doc:
name: doc
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
name: cargo doc
runs-on: ubuntu-24.04
steps: # doc steps
- uses: "actions/checkout@v4"
- uses: dtolnay/rust-toolchain@stable
with:
with: # doc toolchain
toolchain: nightly
- uses: Swatinem/rust-cache@v2
with:
- uses: "Swatinem/rust-cache@v2"
with: # doc cache
prefix-key: doc
- name: cargo doc
env:
- name: Build docs — deny rustdoc warnings
env: # rustdoc flags
RUSTDOCFLAGS: "--cfg docsrs -D warnings"
run: cargo +nightly doc --workspace --all-features --no-deps

# ───────────────────────────────────────────────────────────────────────
# ── semver ───────────────────────────────────────────────────────────────
semver-checks:
name: cargo semver-checks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
runs-on: ubuntu-24.04
steps: # semver steps
- uses: "actions/checkout@v4"
- uses: dtolnay/rust-toolchain@stable
with:
with: # semver toolchain
toolchain: stable
- uses: taiki-e/install-action@v2
with:
with: # semver install
tool: cargo-semver-checks
- uses: Swatinem/rust-cache@v2
with:
- uses: "Swatinem/rust-cache@v2"
with: # semver cache
prefix-key: semver-checks
- name: Check semver
# cargo-semver-checks requires rustc >= 1.91.0; run on stable, not pinned MSRV
run: cargo +stable semver-checks check-release --workspace
# semver-checks requires rustc >= 1.91.0; run on stable rather than pinned MSRV
- run: cargo +stable semver-checks check-release --workspace

deny:
name: cargo deny
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# ── deny ─────────────────────────────────────────────────────────────────
deny: # license/advisory check
name: "cargo deny"
runs-on: ubuntu-24.04
steps: # deny steps
- uses: "actions/checkout@v4"
- uses: dtolnay/rust-toolchain@stable
with:
with: # deny toolchain
toolchain: ${{ env.RUST_VERSION }}
- uses: taiki-e/install-action@v2
with:
tool: cargo-deny
- uses: Swatinem/rust-cache@v2
with:
prefix-key: deny
- uses: "taiki-e/install-action@v2"
with: # deny install
tool: "cargo-deny"
- uses: "Swatinem/rust-cache@v2"
with: # deny cache
prefix-key: "deny"
- run: cargo deny check

machete:
name: cargo machete
runs-on: ubuntu-latest
continue-on-error: true
steps:
- uses: actions/checkout@v4
# ───────────────────────────────────────────────────────────────────────
# ── machete ──────────────────────────────────────────────────────────────
machete: # unused-dep check
name: "cargo machete"
runs-on: ubuntu-24.04
continue-on-error: true # non-blocking
steps: # machete steps
- uses: "actions/checkout@v4"
- uses: dtolnay/rust-toolchain@stable
with:
with: # machete toolchain
toolchain: ${{ env.RUST_VERSION }}
- uses: taiki-e/install-action@v2
with:
tool: cargo-machete
- uses: Swatinem/rust-cache@v2
with:
prefix-key: machete
- uses: "taiki-e/install-action@v2"
with: # machete install
tool: "cargo-machete"
- uses: "Swatinem/rust-cache@v2"
with: # machete cache
prefix-key: "machete"
- run: cargo machete --with-metadata

# ── benchmarks ───────────────────────────────────────────────────────────
benchmarks:
name: benchmark regression
runs-on: ubuntu-latest
# Only run on pushes to main to establish baselines and detect regressions
runs-on: ubuntu-24.04
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v4
steps: # bench steps
- uses: "actions/checkout@v4"
- uses: dtolnay/rust-toolchain@stable
with:
with: # bench toolchain
toolchain: ${{ env.RUST_VERSION }}
- uses: Swatinem/rust-cache@v2
with:
- uses: "Swatinem/rust-cache@v2"
with: # bench cache
prefix-key: bench
- name: Run benchmarks
run: cargo bench --workspace
- name: Store benchmark results
uses: actions/upload-artifact@v4
with:
- run: cargo bench --workspace
- uses: actions/upload-artifact@v4
with: # artifact upload
name: benchmark-results
path: target/criterion
retention-days: 30
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ data/*.sqlite
data/*.tmp
.vscode/
tmp/
AGENTS.md

# Prevent committing test binaries
test_deprecation
Expand Down
39 changes: 38 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,38 @@ All notable changes to Weavegraph will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.7.0] - 2026-05-23

### Added

- `LLMStreamingEventBuilder`, returned by `LLMStreamingEvent::builder(chunk)`, for constructing LLM streaming events without the removed eight-argument constructor. The builder supports optional `session_id`, `node_id`, `stream_id`, `is_final`, `scope`, `metadata`, and `timestamp` fields before `.build()`.

### Changed

- Internal code-quality passes across `src/app.rs`, `src/channels/`, `src/control.rs`, `src/event_bus/`, `src/graphs/`, `src/llm/`, `src/message.rs`, `src/node.rs`, `src/reducers/`, `src/runtimes/`, `src/schedulers/`, `src/state.rs`, `src/telemetry/`, `src/types.rs`, and `src/utils/`: documentation condensed, dead code removed, control flow simplified, and private helpers renamed for clarity. No behavior changes are intended for these maintenance-only revisions.
- `conditional_edges()` now returns `&[ConditionalEdge]` instead of `&Vec<ConditionalEdge>`. Most callers coerce transparently; explicit `&Vec<_>` annotations should be changed to slices.
- `WeaveError` now derives `Default`; behavior is unchanged.
- `EventBus::with_sink` and `Channel::set_version` were cosmetically cleaned up without semantic changes.
- `MetricsObserver` now relies on the default no-op `RuntimeObserver::on_invocation_start` implementation instead of an explicit empty override.
- **Breaking (existing databases — hard failure):** Migration SQL files were rederived with equivalent schemas but changed file contents. Any existing database that already ran the `0001_init` migration will produce a hard `sqlx` checksum error on the **very next `connect()` call**, and the application will refuse to start. This is **not** a schema change — no tables, columns, or data are altered — but the connection is unconditionally rejected until the stored checksum record is corrected. SQLite users are affected by default (`sqlite-migrations` is a default feature). PostgreSQL users are affected only if the `postgres-migrations` feature was explicitly enabled. **See the [v0.7.0 migration guide](docs/MIGRATION.md#breaking-migration-sql-checksum-mismatch-existing-databases) for exact fix SQL and step-by-step Docker upgrade instructions.**

### Removed

- **Breaking:** `LLMStreamingEvent::new` was removed. Use `LLMStreamingEvent::builder(...)` or the existing `chunk_event`, `final_event`, and `error_event` factory methods.
- **Breaking:** `NodeContext::emit_node()` was removed. Use `NodeContext::emit(scope, message)`, which has the same signature and behavior.
- **Breaking:** `PersistenceError::MissingField` was removed.
- **Breaking:** `SQLiteCheckpointerError` was removed. Use `CheckpointerError` directly.
- **Breaking:** `checkpointer_postgres_helpers` and `checkpointer_sqlite_helpers` modules were removed; their contents are now private implementation details of the corresponding checkpointers.
- **Breaking:** Unused public utility surface was trimmed: `IdError`, `ParsedId`, `IdGenerator::{generate_uuid, generate_random_id, parse_id, current_counter, reset_counter}`, `id_utils`, `JsonValueExt::deep_clone`, `merge_inspector`, `message_id_helpers`, and `type_guards`.
- `tmp/license-relicensing-audit.md` was removed from git tracking.

### Fixed

- Removed misapplied `#[must_use]` attributes from mutating `VersionedState::{add_message, add_extra}` methods.
- Removed the private `VersionedStateBuilder::new()` constructor in favor of `VersionedStateBuilder::default()`.
- Tightened private runtime helper visibility and made SQLite `row_to_checkpoint` synchronous because it had no await points.
- Fixed the `IdGenerator` doctest to avoid using `gen`, a reserved keyword in Rust 2024.

## [0.6.0] - 2026-05-11

### Added
Expand Down Expand Up @@ -191,7 +223,12 @@ Initial stable release. Core features:

---

[unreleased]: https://github.com/Idleness76/weavegraph/compare/weavegraph-v0.2.0...HEAD
[unreleased]: https://github.com/Idleness76/weavegraph/compare/weavegraph-v0.7.0...HEAD
[0.7.0]: https://github.com/Idleness76/weavegraph/compare/weavegraph-v0.6.0...weavegraph-v0.7.0
[0.6.0]: https://github.com/Idleness76/weavegraph/compare/weavegraph-v0.5.0...weavegraph-v0.6.0
[0.5.0]: https://github.com/Idleness76/weavegraph/compare/weavegraph-v0.4.0...weavegraph-v0.5.0
[0.4.0]: https://github.com/Idleness76/weavegraph/compare/weavegraph-v0.3.0...weavegraph-v0.4.0
[0.3.0]: https://github.com/Idleness76/weavegraph/compare/weavegraph-v0.2.0...weavegraph-v0.3.0
[0.2.0]: https://github.com/Idleness76/weavegraph/compare/weavegraph-v0.1.3...weavegraph-v0.2.0
[0.1.3]: https://github.com/Idleness76/weavegraph/compare/weavegraph-0.1.2...weavegraph-v0.1.3
[0.1.2]: https://github.com/Idleness76/weavegraph/compare/weavegraph-v0.1.1...weavegraph-0.1.2
Expand Down
16 changes: 10 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Contributing to Weavegraph

Thank you for your interest in contributing to Weavegraph! This project welcomes contributions from developers of all skill levels. Weavegraph is in active development (v0.2.x released, targeting v0.3.0 API stabilization) with ongoing improvements based on real-world usage and community feedback.
Thank you for your interest in contributing to Weavegraph! This project welcomes contributions from developers of all skill levels. Weavegraph is in active development (v0.7.x, moving toward 1.0 API stabilization) with ongoing improvements based on real-world usage and community feedback.

## Getting Started

### Prerequisites

- Rust 1.89 or later
- Rust 1.90 or later
- Basic familiarity with async Rust and the `tokio` runtime
- Understanding of graph-based workflows is helpful but not required

Expand All @@ -26,9 +26,9 @@ Thank you for your interest in contributing to Weavegraph! This project welcomes

3. **Run examples to understand the framework**:
```bash
cargo run --example basic_nodes
cargo run --example advanced_patterns
cargo run --example streaming_events
cargo run --example basic_nodes --features examples
cargo run --example advanced_patterns --features examples
cargo run --example streaming_events --features examples
```

4. **Set up local services** (optional):
Expand All @@ -45,7 +45,7 @@ Before submitting a PR, run local CI checks to catch issues early:
# Quick checks (fmt, clippy, test, doc)
./scripts/ci-quick.sh

# Full CI suite (includes MSRV 1.89, deny, machete)
# Full CI suite (includes MSRV 1.90, deny, machete)
./scripts/ci-local.sh
```

Expand Down Expand Up @@ -152,3 +152,7 @@ This project follows the [Contributor Covenant Code of Conduct](CODE_OF_CONDUCT.
- Consult the [documentation](https://docs.rs/weavegraph)

Thank you for helping make Weavegraph better!

## License

By contributing to Weavegraph, you agree that your contributions will be licensed under the [Apache License, Version 2.0](LICENSE).
Loading
Loading