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
3 changes: 2 additions & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ Describe the change and motivation.
## Checklist

- [ ] Tests added/updated
- [ ] `cargo test` passes locally
- [ ] Regular tests pass locally (`cargo nt`)
- [ ] Doc tests pass locally (`cargo test --doc --all-features`)
- [ ] Docs updated
- [ ] Existing docs updated where behavior changed
- [ ] New doc added under `docs/` if introducing a new area
Expand Down
10 changes: 10 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Microsoft Open Source Code of Conduct

This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).

Resources:

- [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/)
- [Microsoft Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/)
- Contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with questions or concerns
- Employees can reach out at [aka.ms/opensource/moderation-support](https://aka.ms/opensource/moderation-support)
40 changes: 34 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,28 @@

Thanks for your interest in improving duroxide!

Before submitting changes, please review this checklist:
This project welcomes contributions and suggestions. Most contributions require you to
agree to a Contributor License Agreement (CLA) declaring that you have the right to,
and actually do, grant us the rights to use your contribution. For details, visit
https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need
to provide a CLA and decorate the PR appropriately (for example, label or comment).
Simply follow the instructions provided by the bot. You will only need to do this once
across all repositories using our CLA.

This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/)
or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.

## Reporting security issues

Please do not report security vulnerabilities through public GitHub issues. Follow the instructions in [SECURITY.md](SECURITY.md).

## Before submitting changes

- Code
- [ ] Build passes locally (`cargo test`)
- [ ] Regular tests pass locally (`cargo nt`)
- [ ] Lints/clippy (if applicable) are clean
- [ ] Tests added or updated for behavior changes
- Documentation
Expand All @@ -20,13 +38,23 @@ Before submitting changes, please review this checklist:
- Write or update tests first (happy path + 1-2 edge cases).
- Keep public APIs stable where possible; note breakages clearly.
- Prefer small, focused commits with descriptive messages.
- For non-trivial changes, include a short design rationale in the pull request description with code pointers.
- Update documentation when a change affects existing docs, introduces a new surface area, or changes behavior users rely on.

## Running tests
Before opening a pull request, run the checks relevant to your change:

```bash
cargo nt
cargo clippy --all-targets --all-features
cargo test --doc --all-features
```
cargo test

For broader runtime changes, also run the comprehensive two-pass suite:

```bash
./run-tests.sh
```

## Filing PRs
## Filing pull requests

Use the PR template in `.github/pull_request_template.md`. Fill in the docs checkboxes.
Use the pull request template in [.github/pull_request_template.md](.github/pull_request_template.md) and fill in the docs checkboxes.
30 changes: 28 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -224,10 +224,36 @@ that fits how you want to author and host your workflows:
## Development

```bash
cargo build # Build
cargo test --all -- --nocapture # Run all tests
cargo build --all-features # Build
cargo nt # Run regular tests with nextest
cargo test --doc --all-features # Run doctests
./run-tests.sh # Full two-pass CI test suite
./run-stress-tests.sh # Stress tests (see STRESS_TEST_MONITORING.md)
```

See [CHANGELOG.md](CHANGELOG.md) for release notes and
[CONTRIBUTING.md](CONTRIBUTING.md) to get involved.

## Support

Use GitHub Issues for bug reports and feature requests. Do not report security vulnerabilities through public GitHub issues; follow the instructions in [SECURITY.md](SECURITY.md) instead.

## Code of Conduct

This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information, see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with questions or comments.

## Security

Microsoft takes the security of our software products and services seriously. Please do not report security vulnerabilities through public GitHub issues. See [SECURITY.md](SECURITY.md) for security reporting instructions.

## Privacy and Telemetry

Duroxide does not send telemetry to Microsoft. Applications may configure their own logging or metrics exporters; those signals are controlled by the application owner.

## Trademarks

This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow [Microsoft's Trademark & Brand Guidelines](https://www.microsoft.com/en-us/legal/intellectualproperty/trademarks/usage/general). Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos is subject to those third-party policies.

## License

MIT License - see [LICENSE](LICENSE) for details.
3 changes: 3 additions & 0 deletions examples/delays_and_timeouts.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

#![allow(clippy::unwrap_used)]
#![allow(clippy::clone_on_ref_ptr)]
#![allow(clippy::expect_used)]
Expand Down
3 changes: 3 additions & 0 deletions examples/fan_out_fan_in.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

//! Fan-Out/Fan-In Pattern Example
//!
//! This example demonstrates parallel execution of multiple activities
Expand Down
3 changes: 3 additions & 0 deletions examples/hello_world.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

//! Hello World Example - Start here to learn Duroxide basics
//!
//! This example demonstrates:
Expand Down
3 changes: 3 additions & 0 deletions examples/metrics_cli.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

//! Interactive observability dashboard for duroxide.
//!
//! This CLI tool demonstrates how to consume and display duroxide metrics
Expand Down
3 changes: 3 additions & 0 deletions examples/timers_and_events.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

//! Timers and External Events Example
//!
//! This example demonstrates:
Expand Down
3 changes: 3 additions & 0 deletions examples/with_observability.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

//! Example demonstrating duroxide with observability enabled.
//!
//! This example shows how to configure structured logging and metrics
Expand Down
3 changes: 3 additions & 0 deletions run-stress-tests.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#!/bin/bash
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.

# Run Duroxide stress tests
#
# This script runs the stress test suite including:
Expand Down
3 changes: 3 additions & 0 deletions run-tests.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#!/usr/bin/env bash
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.

# Run the full duroxide test suite in two passes:
# Pass 1: --all-features (enables replay-version-test, runs v2 acceptance tests)
# Pass 2: no features (runs v1 serde rejection tests — proves v2 events are rejected)
Expand Down
3 changes: 3 additions & 0 deletions sqlite-stress/src/bin/large-payload-stress.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

//! Large Payload SQLite Stress Test Binary
//!
//! This binary runs the large payload stress test with SQLite provider.
Expand Down
3 changes: 3 additions & 0 deletions sqlite-stress/src/bin/sqlite-stress.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

//! SQLite Stress Test Binary
//!
//! This binary runs the SQLite stress test suite across multiple configurations.
Expand Down
3 changes: 3 additions & 0 deletions sqlite-stress/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

//! SQLite Stress Tests for Duroxide
//!
//! This library provides SQLite-specific stress test implementations for Duroxide,
Expand Down
3 changes: 3 additions & 0 deletions sqlite-stress/track-results.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#!/bin/bash
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.

# Track stress test results with git history and rolling averages

set -e
Expand Down
3 changes: 3 additions & 0 deletions src/client/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

use std::sync::Arc;

use tracing::info;
Expand Down
3 changes: 3 additions & 0 deletions src/combinators.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

use crate::{Either2, Either3};
use std::future::Future;
use std::pin::Pin;
Expand Down
3 changes: 3 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

//! # Duroxide: Durable execution framework in Rust
//!
//! Duroxide is a framework for building reliable, long-running code based workflows that can survive
Expand Down
3 changes: 3 additions & 0 deletions src/provider_stress_test/core.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

//! Core stress test infrastructure - types, runner, and utilities.

use crate::providers::Provider;
Expand Down
3 changes: 3 additions & 0 deletions src/provider_stress_test/large_payload.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

//! Large payload stress test scenario.
//!
//! Tests memory consumption and history management with large event payloads.
Expand Down
3 changes: 3 additions & 0 deletions src/provider_stress_test/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

//! Provider stress test infrastructure implementation modules.

pub mod core;
Expand Down
3 changes: 3 additions & 0 deletions src/provider_stress_test/parallel_orchestrations.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

//! Parallel orchestrations stress test scenario.
//!
//! Tests fan-out/fan-in orchestration patterns with concurrent instance execution.
Expand Down
3 changes: 3 additions & 0 deletions src/provider_stress_tests.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

//! Provider Stress Test Infrastructure
//!
//! This module provides reusable stress test infrastructure for validating custom Provider implementations
Expand Down
3 changes: 3 additions & 0 deletions src/provider_validation/atomicity.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

use crate::provider_validation::{Event, EventKind, ExecutionMetadata, start_item};
use crate::provider_validations::ProviderFactory;
use crate::providers::{TagFilter, WorkItem};
Expand Down
3 changes: 3 additions & 0 deletions src/provider_validation/bulk_deletion.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

//! Provider validation tests for bulk delete instance operations.
//!
//! These tests verify that providers correctly implement the delete_instance_bulk API,
Expand Down
3 changes: 3 additions & 0 deletions src/provider_validation/cancellation.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

use crate::provider_validation::{Event, EventKind, ExecutionMetadata, start_item};
use crate::provider_validations::ProviderFactory;
use crate::providers::{ScheduledActivityIdentifier, TagFilter, WorkItem};
Expand Down
3 changes: 3 additions & 0 deletions src/provider_validation/capability_filtering.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

//! Capability filtering provider validation tests.
//!
//! These tests validate that providers correctly implement the capability filtering
Expand Down
3 changes: 3 additions & 0 deletions src/provider_validation/custom_status.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

//! Provider validation tests for custom status.
//!
//! These tests validate that a Provider implementation correctly handles
Expand Down
3 changes: 3 additions & 0 deletions src/provider_validation/deletion.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

//! Provider validation tests for deletion operations.
//!
//! These tests verify that providers correctly implement the deletion API,
Expand Down
3 changes: 3 additions & 0 deletions src/provider_validation/error_handling.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

use crate::INITIAL_EXECUTION_ID;
use crate::provider_validation::{Event, EventKind, ExecutionMetadata, create_instance, start_item};
use crate::provider_validations::ProviderFactory;
Expand Down
3 changes: 3 additions & 0 deletions src/provider_validation/instance_creation.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

use crate::provider_validation::{Event, EventKind, ExecutionMetadata, start_item};
use crate::provider_validations::ProviderFactory;
use crate::providers::WorkItem;
Expand Down
3 changes: 3 additions & 0 deletions src/provider_validation/instance_locking.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

use crate::provider_validation::{ExecutionMetadata, start_item};
use crate::provider_validations::ProviderFactory;
use crate::providers::WorkItem;
Expand Down
3 changes: 3 additions & 0 deletions src/provider_validation/kv_store.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

//! Provider validation tests for the KV store.
//!
//! These tests validate that a Provider implementation correctly handles
Expand Down
3 changes: 3 additions & 0 deletions src/provider_validation/lock_expiration.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

use crate::provider_validation::{Event, EventKind, ExecutionMetadata, WorkItem, start_item};
use crate::provider_validations::ProviderFactory;
use crate::providers::TagFilter;
Expand Down
3 changes: 3 additions & 0 deletions src/provider_validation/long_polling.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

//! Long polling validation tests for providers.
//!
//! These tests verify correct polling behavior. Providers that don't support long polling
Expand Down
3 changes: 3 additions & 0 deletions src/provider_validation/management.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

use crate::provider_validation::{Event, EventKind, ExecutionMetadata, start_item};
use crate::provider_validations::ProviderFactory;
use crate::providers::WorkItem;
Expand Down
3 changes: 3 additions & 0 deletions src/provider_validation/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

//! Provider Validation Tests
//!
//! Comprehensive test suite for validating provider implementations.
Expand Down
3 changes: 3 additions & 0 deletions src/provider_validation/multi_execution.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

use crate::provider_validation::{Event, EventKind, ExecutionMetadata};
use crate::provider_validations::ProviderFactory;
use crate::providers::WorkItem;
Expand Down
3 changes: 3 additions & 0 deletions src/provider_validation/poison_message.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

//! Poison Message Detection Validation Tests
//!
//! These tests validate that providers correctly track attempt counts
Expand Down
3 changes: 3 additions & 0 deletions src/provider_validation/prune.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

//! Provider validation tests for execution pruning operations.
//!
//! These tests verify that providers correctly implement the prune API,
Expand Down
3 changes: 3 additions & 0 deletions src/provider_validation/queue_semantics.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

use crate::provider_validation::{Event, EventKind, ExecutionMetadata, create_instance, start_item};
use crate::provider_validations::ProviderFactory;
use crate::providers::{TagFilter, WorkItem};
Expand Down
3 changes: 3 additions & 0 deletions src/provider_validation/sessions.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

//! Session Routing Provider Validation Tests
//!
//! Tests that validate the implicit session routing contract for providers.
Expand Down
Loading
Loading