Skip to content

ci: standardize release-plz workflow with robust path patching - #7

Merged
garnizeh-labs merged 2 commits into
mainfrom
ci/standardize-release-workflow
Apr 19, 2026
Merged

garnizeh-labs merged 2 commits into
mainfrom
ci/standardize-release-workflow

Conversation

@garnizeh

@garnizeh garnizeh commented Apr 19, 2026

Copy link
Copy Markdown
Collaborator

Standardizes the client's release workflow by introducing the same robust Cargo manifest patching logic used in the engine. This ensures historical path dependencies are resolved correctly even in temporary CI environments.

Summary by CodeRabbit

  • Chores
    • Improved CI workflow to check out project components into a structured workspace for clearer builds.
    • Added a dedicated checkout step for an external protocol dependency to ensure reproducible builds.
    • Enhanced build environment setup to apply dependency overrides and ensure consistent tool behavior.
    • Added a lightweight wrapper to normalize manifests before build steps and updated release manifest targeting.

@coderabbitai

coderabbitai Bot commented Apr 19, 2026

Copy link
Copy Markdown

Caution

Review failed

Pull request was closed or merged during review

📝 Walkthrough

Walkthrough

GitHub Actions workflow updated to checkout the client into aetheris-client/ and the protocol into aetheris-protocol/, configure Cargo with git-based [patch.crates-io] overrides pinned to the protocol commit, add a Cargo wrapper that strips local path deps, and point release-plz to aetheris-client/Cargo.toml.

Changes

Cohort / File(s) Summary
CI Workflow
.github/workflows/release-plz.yml
Reworked checkout to actions/checkout@v6.0.2; check out aetheris-client/ and aetheris-protocol/ into separate directories; adjust cache paths to aetheris-client/target; set project_manifest: aetheris-client/Cargo.toml.
Cargo environment & wrapper
(configured inside the workflow) ~/.cargo/config.toml, ~/.local/bin/cargo (created at runtime)
Adds [patch.crates-io] overrides for aetheris-protocol, aetheris-encoder-serde, and aetheris-encoder-bitpack pinned to the protocol commit SHA; installs a cargo wrapper that intercepts `metadata
Repository checkout for protocol
aetheris-protocol/ (checked out by workflow)
Adds a dedicated checkout step for garnizeh-labs/aetheris-protocol using secrets.GITHUB_TOKEN into aetheris-protocol/ to enable pinned patch references.

Sequence Diagram(s)

sequenceDiagram
    autonumber
    participant GH as "GitHub Actions"
    participant Checkout as "actions/checkout"
    participant FS as "Workspace\n(aetheris-client/, aetheris-protocol/)"
    participant Setup as "Setup Robust Cargo\nEnvironment (workflow step)"
    participant CargoWrapper as "~/.local/bin/cargo (wrapper)"
    participant Cargo as "real cargo"
    participant Release as "release-plz action"

    GH->>Checkout: checkout aetheris-client@repo -> aetheris-client/
    GH->>Checkout: checkout aetheris-protocol@repo -> aetheris-protocol/
    GH->>Setup: write ~/.cargo/config.toml with [patch.crates-io] pointing to protocol commit
    GH->>Setup: install cargo wrapper at ~/.local/bin/cargo
    Release->>CargoWrapper: invoke cargo (metadata/package/check)
    CargoWrapper->>FS: scan and edit `Cargo.toml` to remove relative path deps
    CargoWrapper->>Cargo: forward modified invocation
    Cargo->>FS: build/metadata using patched config and checkouts
    Cargo->>Release: return results
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐰 I hopped through checkouts, client then protocol,

Pinned a commit, patched crates in a howl,
I wrapped Cargo gently, removed local paths sly—
Now release-plz reads the manifest with a sigh,
A rabbit's CI dance beneath the dev sky.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title accurately describes the main change: standardizing the release-plz workflow with robust path patching logic, which matches the core objectives of introducing Cargo manifest patching to handle path dependencies in the CI environment.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ci/standardize-release-workflow

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (1)
.github/workflows/release-plz.yml (1)

37-46: Scope the cache key to the client checkout.

After adding the protocol checkout, hashFiles('**/Cargo.lock') now includes both repositories. That will invalidate the Cargo cache on unrelated protocol lockfile changes even though this job only caches aetheris-client/target.

♻️ Narrow the cache key
-          key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-1.95.0
+          key: ${{ runner.os }}-cargo-${{ hashFiles('aetheris-client/Cargo.lock') }}-1.95.0
           restore-keys: |
-            ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
+            ${{ runner.os }}-cargo-${{ hashFiles('aetheris-client/Cargo.lock') }}
             ${{ runner.os }}-cargo-
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/release-plz.yml around lines 37 - 46, The Cargo cache step
("Cache Cargo") is using hashFiles('**/Cargo.lock') which picks up lockfiles
from other checkouts; narrow the cache key to only the client checkout by
replacing hashFiles('**/Cargo.lock') with a path restricted to the client (e.g.
hashFiles('aetheris-client/Cargo.lock') or
hashFiles('aetheris-client/**/Cargo.lock')) and make the same change for the
restore-keys expression so the cache key/restore-keys only reflect changes
inside aetheris-client while still caching aetheris-client/target.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/workflows/release-plz.yml:
- Around line 69-80: The wrapper currently hardcodes exec /usr/bin/cargo which
bypasses rustup's proxy and the selected toolchain; instead place the wrapper in
a separate directory earlier in PATH (keep using ~/.cargo/bin or create e.g.
~/.local/bin and add it to GITHUB_PATH before ~/.cargo/bin) and delegate to the
rustup-managed proxy by exec "$HOME/.cargo/bin/cargo" "$@" (or the same path as
$HOME/.cargo/bin/cargo) so the rustup-selected toolchain is honored; update the
script that creates the wrapper (the file written to ~/.cargo/bin/cargo and the
echo to $GITHUB_PATH) to reflect this delegation and avoid calling
/usr/bin/cargo directly.
- Around line 61-65: The current [patch.crates-io] entries for
aetheris-protocol, aetheris-encoder-serde and aetheris-encoder-bitpack use
floating git= URLs; capture the checked-out protocol commit SHA (set into a
variable like PROTOCOL_SHA when the repo is checked out) and change each entry
to include rev = "<SHA>" (use the captured PROTOCOL_SHA) so the config writes
git = "https://..." plus rev = PROTOCOL_SHA for deterministic resolution; update
the code that generates ~/.cargo/config.toml to insert rev = "${PROTOCOL_SHA}"
for the three package lines.

---

Nitpick comments:
In @.github/workflows/release-plz.yml:
- Around line 37-46: The Cargo cache step ("Cache Cargo") is using
hashFiles('**/Cargo.lock') which picks up lockfiles from other checkouts; narrow
the cache key to only the client checkout by replacing
hashFiles('**/Cargo.lock') with a path restricted to the client (e.g.
hashFiles('aetheris-client/Cargo.lock') or
hashFiles('aetheris-client/**/Cargo.lock')) and make the same change for the
restore-keys expression so the cache key/restore-keys only reflect changes
inside aetheris-client while still caching aetheris-client/target.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 9ac753e2-190f-4fd1-811f-e4920971da76

📥 Commits

Reviewing files that changed from the base of the PR and between cdf2758 and 35dc539.

📒 Files selected for processing (1)
  • .github/workflows/release-plz.yml

Comment thread .github/workflows/release-plz.yml Outdated
Comment thread .github/workflows/release-plz.yml Outdated
@garnizeh-labs
garnizeh-labs merged commit f1f55e9 into main Apr 19, 2026
9 of 10 checks passed
@garnizeh-labs
garnizeh-labs deleted the ci/standardize-release-workflow branch April 19, 2026 20:38
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.

2 participants