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
2 changes: 1 addition & 1 deletion .cline/rules/00-rust-api-guidelines.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Rust API Guidelines for Cline

Purpose: keep Rust public APIs idiomatic, predictable, interoperable, and stable.
Source basis: https://rust-lang.github.io/api-guidelines/
Source basis: <https://rust-lang.github.io/api-guidelines/>

Use this file as a compact rule set for code generation and review. Prefer these rules for public crate APIs, library boundaries, exported traits, exported structs, public modules, and public error types. For private implementation code, follow the same style unless it hurts clarity.

Expand Down
55 changes: 55 additions & 0 deletions .cline/rules/01-git-workflow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Git Workflow for Cline

Purpose: enforce a consistent Rust-style PR workflow for all changes. Every change must go through a feature branch, a conventional commit, and a pull request.

## Rules (MUST)

1. **Always create a new branch** before committing.
- Branch names must be kebab-case: `add-docs-ci-job`, `fix-blob-encrypt-panic`, `ci-pin-actions`.
- Use a descriptive, short name that reflects the change.

2. **Commit messages must follow conventional commits** with a Rust-style prefix:
- `feat:` – new feature
- `fix:` – bug fix
- `docs:` – documentation only
- `ci:` – CI/CD changes
- `chore:` – maintenance, deps, tooling
- `refactor:` – code change that neither fixes a bug nor adds a feature
- `style:` – formatting, whitespace (no code change)
- `test:` – adding or updating tests
- `perf:` – performance improvement
- `build:` – build system or external dependencies
- `revert:` – revert a previous commit

3. **Push the branch** to `origin`.

4. **Create a pull request** via `gh pr create`:
- Use the commit message as the PR title.
- Fill the PR body with a summary of changes.
- Use `--base main`.
- Reference related issues if applicable.

## Example workflow

```bash
# 1. Create branch
git checkout -b add-docs-ci-job

# 2. Stage and commit
git add .github/workflows/ci.yml
git commit -m "ci: add docs job to CI workflow"

# 3. Push
git push -u origin add-docs-ci-job

# 4. Create PR
gh pr create \
--base main \
--title "ci: add docs job to CI workflow" \
--body "Build rustdoc for xtax-encryption, xtax-blob-storage, and xtax with --all-features --no-deps, treating warnings as errors."
```

## Reference

- Conventional commits: <https://www.conventionalcommits.org/>
- Rust commit style often matches conventional commits with lowercase, no trailing punctuation.
33 changes: 32 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,4 +107,35 @@ jobs:
run: cargo test -p xtax-blob-storage ${{ matrix.features }}

- name: Clippy
run: cargo clippy -p xtax-blob-storage ${{ matrix.features }} -- -D warnings
run: cargo clippy -p xtax-blob-storage ${{ matrix.features }} -- -D warnings

# Documentation build
docs:
name: Documentation build
runs-on: ubuntu-latest
env:
RUSTDOCFLAGS: "-D warnings"
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7

- name: Install Rust stable
uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable

- name: Cache cargo registry
uses: actions/cache@2c8a9bd7457de244a408f35966fab2fb45fda9c8 # v6
with:
path: |
~/.cargo/registry/
~/.cargo/git/
target/
key: ${{ runner.os }}-cargo-docs-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-docs-

- name: Build docs xtax-encryption
run: cargo doc -p xtax-encryption --all-features --no-deps

- name: Build docs xtax-blob-storage
run: cargo doc -p xtax-blob-storage --all-features --no-deps

- name: Build docs xtax
run: cargo doc -p xtax --all-features --no-deps
2 changes: 1 addition & 1 deletion crates/xtax-blob-storage/src/builder/strategies.rs
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ impl BackgroundStrategy for OnStart {

/// Strategy that runs the task immediately, then repeats periodically.
///
/// The inner [`Duration`] must be **non-zero**. Passing `Duration::ZERO` causes
/// The inner [`std::time::Duration`] must be **non-zero**. Passing `Duration::ZERO` causes
/// `build()` to return an `Err(InvalidInput(...))`.
///
/// # Example
Expand Down