Skip to content

chore: Implement comprehensive CI and update project metadata#1

Merged
leszek3737 merged 3 commits into
mainfrom
docs
May 23, 2026
Merged

chore: Implement comprehensive CI and update project metadata#1
leszek3737 merged 3 commits into
mainfrom
docs

Conversation

@leszek3737
Copy link
Copy Markdown
Owner

@leszek3737 leszek3737 commented May 23, 2026

Establishes a GitHub Actions workflow for continuous integration, including:

  • Automated formatting checks with rustfmt
  • Linting with clippy (all warnings as errors)
  • Execution of various test suites (cargo test)
  • Documentation generation and checks (cargo doc)
  • Dependency vulnerability auditing (rustsec/audit-check)

Also, updates repository links and project branding (GitNexus) to honcho-rust-sdk in Cargo.toml, README.md, AGENTS.md, and CLAUDE.md. The OpenAPI schema is relocated to tests/schemas/openapi.json for better self-containment and testing, with references updated accordingly. Finally, the .gitignore file is expanded to ignore additional development artifacts.

Summary by Sourcery

Introduce a Rust CI pipeline and align project metadata and schemas with the honcho-rust-sdk repo.

New Features:

  • Add a GitHub Actions workflow running rustfmt, clippy, tests, docs, and dependency audits.

Enhancements:

  • Relocate the OpenAPI schema into tests/schemas and update test configuration and inventory references to use the new path.
  • Exclude test schema assets from the published crate package and expand .gitignore to cover additional development artifacts.
  • Update repository URLs and branding to reference the honcho-rust-sdk project.

CI:

  • Set up a CI workflow that enforces formatting, linting, testing, documentation builds, and security audits on pushes and pull requests.

Documentation:

  • Refresh README links and helper agent docs (AGENTS.md, CLAUDE.md, .openapi-inventory.md) to reflect the new repository location and OpenAPI schema path.

Establishes a GitHub Actions workflow for continuous integration, including:
- Automated formatting checks with `rustfmt`
- Linting with `clippy` (all warnings as errors)
- Execution of various test suites (`cargo test`)
- Documentation generation and checks (`cargo doc`)
- Dependency vulnerability auditing (`rustsec/audit-check`)

Also, updates repository links and project branding (`GitNexus`) to `honcho-rust-sdk` in `Cargo.toml`, `README.md`, `AGENTS.md`, and `CLAUDE.md`. The OpenAPI schema is relocated to `tests/schemas/openapi.json` for better self-containment and testing, with references updated accordingly. Finally, the `.gitignore` file is expanded to ignore additional development artifacts.
@sourcery-ai
Copy link
Copy Markdown

sourcery-ai Bot commented May 23, 2026

Reviewer's Guide

Configures a full Rust CI pipeline in GitHub Actions (fmt, clippy, tests, docs, audit), relocates and wires the OpenAPI schema into the repository’s tests, updates project/repository metadata to point to honcho-rust-sdk, and broadens ignored artifacts in .gitignore.

File-Level Changes

Change Details Files
Add a GitHub Actions CI workflow that enforces formatting, linting, tests, docs, and dependency audits.
  • Introduce a CI workflow triggered on pushes and pull requests to main.
  • Add a fmt job using rustfmt in check mode.
  • Add a clippy job with all targets/features and warnings treated as errors, using rust-cache.
  • Add a test job that runs library tests, *_types tests, wire_format_peers, and compile_assertions, using rust-cache.
  • Add a doc job that builds docs with all features and fails on documentation warnings.
  • Add an audit job using rustsec/audit-check with warnings denied.
.github/workflows/ci.yml
Relocate the OpenAPI schema into the tests directory and wire test code and metadata to the new location.
  • Change the documented OpenAPI schema source path in the OpenAPI inventory to tests/schemas/openapi.json.
  • Update the shared test helper to default to tests/schemas/openapi.json when HONCHO_OPENAPI_SPEC is unset, using CARGO_MANIFEST_DIR as base.
  • Exclude tests/schemas from the published crate in Cargo.toml to keep the schema test-only.
  • Add the OpenAPI schema file under tests/schemas/openapi.json.
.openapi-inventory.md
tests/common/mod.rs
Cargo.toml
tests/schemas/openapi.json
Update project metadata and GitNexus references to the honcho-rust-sdk repository and branding.
  • Update Cargo.toml repository and homepage URLs to point to github.com/leszek3737/honcho-rust-sdk.
  • Adjust README links to reference the honcho-rust-sdk repository and explicitly label the Honcho server repo.
  • Update GitNexus index name and statistics in AGENTS.md and CLAUDE.md from rust to honcho-rust-sdk and change all gitnexus://repo/* resource URIs accordingly.
Cargo.toml
README.md
AGENTS.md
CLAUDE.md
Broaden ignored development artifacts to keep the repository clean.
  • Extend the .gitignore to ignore additional build, IDE, and developer-local artifacts (exact patterns as per diff).
.gitignore

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Copy Markdown

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've found 1 issue, and left some high level feedback:

  • In the CI workflow, you’re installing the Rust toolchain independently in each job; consider extracting a shared setup step via a composite action or using a common job (or actions-rs/toolchain) to reduce duplication and overall CI time.
  • The test job runs multiple cargo test invocations sequentially; you can simplify and speed this up by using a single command (e.g., cargo test --all-features --tests plus specific --test filters) to avoid redundant test harness startup and configuration.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- In the CI workflow, you’re installing the Rust toolchain independently in each job; consider extracting a shared setup step via a composite action or using a common job (or `actions-rs/toolchain`) to reduce duplication and overall CI time.
- The `test` job runs multiple `cargo test` invocations sequentially; you can simplify and speed this up by using a single command (e.g., `cargo test --all-features --tests` plus specific `--test` filters) to avoid redundant test harness startup and configuration.

## Individual Comments

### Comment 1
<location path=".github/workflows/ci.yml" line_range="18-27" />
<code_context>
+    name: Test
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v4
+      - uses: dtolnay/rust-toolchain@stable
+      - uses: Swatinem/rust-cache@v2
+      - run: cargo test --lib --all-features
+      - run: cargo test --test '*_types'
+      - run: cargo test --test wire_format_peers
+      - run: cargo test --test compile_assertions
+
+  doc:
+    name: Docs
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v4
+      - uses: dtolnay/rust-toolchain@stable
+      - uses: Swatinem/rust-cache@v2
+      - run: cargo doc --all-features --no-deps
+        env:
+          RUSTDOCFLAGS: "-D warnings"
+
+  audit:
+    name: Audit
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v4
+      - uses: rustsec/audit-check@v2
+        with:
+          deny: warnings
</code_context>
<issue_to_address>
**🚨 suggestion (security):** Consider pinning GitHub Actions to specific commit SHAs for better supply-chain security

These actions (e.g., `actions/checkout@v4`, `dtolnay/rust-toolchain@stable`, `Swatinem/rust-cache@v2`, `rustsec/audit-check@v2`) are all using floating tags. Please pin them to specific commit SHAs (or immutable tags where applicable) so CI runs are not silently affected by upstream changes, especially for security-related steps like `rustsec/audit-check`.
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Comment thread .github/workflows/ci.yml Outdated
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request migrates the project to a new repository, updates project metadata across several configuration and documentation files, and relocates the OpenAPI schema to a local directory for better self-containment. Feedback focuses on ensuring the schema directory is included in the published package to prevent test failures for downstream users, restoring the CI status badge with the updated repository URL, and maintaining valid documentation and schema links in the README.

Comment thread Cargo.toml
Comment on lines 14 to 17
exclude = [
"tests/fixtures/parity/**",
"tests/schemas/**",
]
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Excluding tests/schemas/** from the package will cause cargo test to fail for users who attempt to run tests from the published crate (e.g., when downloaded from crates.io), as the test suite relies on tests/schemas/openapi.json at runtime. Since this file is now the source of truth for schema validation tests and the PR aims for "better self-containment", this directory should be included in the package.

exclude = [
    "tests/fixtures/parity/**",
]

Comment thread README.md

![rust-sdk](https://github.com/plastic-labs/honcho/actions/workflows/rust-sdk.yml/badge.svg)

> **Status:** Alpha — do not use in production. This SDK is under active development.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The CI status badge was removed. Since this PR establishes a new GitHub Actions workflow, the badge should be updated to point to the new repository's workflow instead of being deleted. This provides immediate visibility into the build status for users and contributors.

Suggested change
> **Status:** Alpha — do not use in production. This SDK is under active development.
![CI](https://github.com/leszek3737/honcho-rust-sdk/actions/workflows/rust-sdk.yml/badge.svg)
> **Status:** Alpha — do not use in production. This SDK is under active development.

Comment thread README.md Outdated
Comment on lines 245 to 247
- [Repository](https://github.com/leszek3737/honcho-rust-sdk)
- [Honcho Server](https://github.com/plastic-labs/honcho)
- [OpenAPI Spec](https://github.com/plastic-labs/honcho/tree/main/docs)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The links section should be updated to maintain access to documentation and reflect the relocation of the OpenAPI schema:

  1. The Documentation link (https://docs.rs/honcho-ai) was removed but remains a valuable resource for users.
  2. The OpenAPI Spec link still points to the old repository (plastic-labs/honcho), which contradicts the goal of relocating the schema to this repository for self-containment. It should point to the local path.
Suggested change
- [Repository](https://github.com/leszek3737/honcho-rust-sdk)
- [Honcho Server](https://github.com/plastic-labs/honcho)
- [OpenAPI Spec](https://github.com/plastic-labs/honcho/tree/main/docs)
- [Documentation](https://docs.rs/honcho-ai)
- [Repository](https://github.com/leszek3737/honcho-rust-sdk)
- [Honcho Server](https://github.com/plastic-labs/honcho)
- [OpenAPI Spec](./tests/schemas/openapi.json)

- Remove tests/schemas from exclude so tests work from crates.io
- Add CI status badge pointing to new workflow
- Fix audit-check: use token input instead of deny
- Link OpenAPI spec to local path, restore docs.rs link
@leszek3737 leszek3737 merged commit a96aa78 into main May 23, 2026
6 checks passed
@leszek3737 leszek3737 deleted the docs branch May 23, 2026 06:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant