From 2742691780abd3293af3bf06a90448956e4cd64c Mon Sep 17 00:00:00 2001 From: Kamil Sopko Date: Thu, 25 Jun 2026 20:28:40 +0200 Subject: [PATCH 1/3] ci: add docs job to CI workflow Build rustdoc for xtax-encryption, xtax-blob-storage, and xtax with --all-features --no-deps, treating warnings as errors. Also add .cline rule 01-git-workflow.md enforcing Rust-style PR workflow (branch, conventional commit, push, gh pr create) for all changes. --- .cline/rules/01-git-workflow.md | 55 +++++++++++++++++++++++++++++++++ .github/workflows/ci.yml | 33 +++++++++++++++++++- 2 files changed, 87 insertions(+), 1 deletion(-) create mode 100644 .cline/rules/01-git-workflow.md diff --git a/.cline/rules/01-git-workflow.md b/.cline/rules/01-git-workflow.md new file mode 100644 index 0000000..e2328a8 --- /dev/null +++ b/.cline/rules/01-git-workflow.md @@ -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. \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f8081d3..c08de9e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 \ No newline at end of file + 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 \ No newline at end of file From 95066c8e923eeb2e27f9b8302ad500edc8e1ccbd Mon Sep 17 00:00:00 2001 From: Kamil Sopko Date: Thu, 25 Jun 2026 20:33:49 +0200 Subject: [PATCH 2/3] fix: use full path in intra-doc link for Duration Replace [] with [] in the Periodic doc comment to avoid an unresolved link error under -D warnings, without pulling a top-level into the file. --- crates/xtax-blob-storage/src/builder/strategies.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/xtax-blob-storage/src/builder/strategies.rs b/crates/xtax-blob-storage/src/builder/strategies.rs index e876912..a33a5de 100644 --- a/crates/xtax-blob-storage/src/builder/strategies.rs +++ b/crates/xtax-blob-storage/src/builder/strategies.rs @@ -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 From 149e662691616796aa74f5d6bdcd3ff9e0428024 Mon Sep 17 00:00:00 2001 From: Kamil Sopko Date: Thu, 25 Jun 2026 20:36:33 +0200 Subject: [PATCH 3/3] style: wrap bare URLs in angle brackets Fix markdownlint MD034 violations in .cline rules. --- .cline/rules/00-rust-api-guidelines.md | 2 +- .cline/rules/01-git-workflow.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.cline/rules/00-rust-api-guidelines.md b/.cline/rules/00-rust-api-guidelines.md index 4176a9a..314aa39 100644 --- a/.cline/rules/00-rust-api-guidelines.md +++ b/.cline/rules/00-rust-api-guidelines.md @@ -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: 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. diff --git a/.cline/rules/01-git-workflow.md b/.cline/rules/01-git-workflow.md index e2328a8..8e4cc5e 100644 --- a/.cline/rules/01-git-workflow.md +++ b/.cline/rules/01-git-workflow.md @@ -51,5 +51,5 @@ gh pr create \ ## Reference -- Conventional commits: https://www.conventionalcommits.org/ +- Conventional commits: - Rust commit style often matches conventional commits with lowercase, no trailing punctuation. \ No newline at end of file