Skip to content

fix(sdd-execute): install protobuf-compiler in host rust cleanup - #325

Merged
norrietaylor merged 1 commit into
mainfrom
fix/execute-cleanup-protoc
Jun 24, 2026
Merged

fix(sdd-execute): install protobuf-compiler in host rust cleanup#325
norrietaylor merged 1 commit into
mainfrom
fix/execute-cleanup-protoc

Conversation

@norrietaylor

Copy link
Copy Markdown
Owner

Root cause

  • shared/sdd-rust-cleanup.md installs the Rust toolchain on the host runner but not protoc.
  • The refresh step runs cargo clippy, which compiles the workspace + build scripts; prost/tonic crates shell out to protoc at build time.
  • A manifest-adding task that pulls a protobuf crate fails the refresh: Could not find protoc (seen on a consumer pilot run adding a WireGuard mesh dep — the agent implemented the change but could not finalize the lock/lint cleanup, so the run produced no usable PR).

Fix

  • New Install protobuf-compiler (host) step after the Rust toolchain install, gated on the same cargo_detect.changed. Best-effort: skips if protoc already present, installs via apt on Debian hosts, warns otherwise so clippy fails loudly on a genuinely missing tool.

Deploy

  • Fragment edit only; recompile-locks regenerates the three sdd-execute-* locks on merge to main (ADR 0018). Retag v0.3.0 after the auto-recompile lands.

🤖 Generated with Claude Code

The post-agent rust cleanup installs the Rust toolchain on the host
runner but not protoc. The refresh step's `cargo clippy` compiles the
workspace and runs build scripts; crates using prost/tonic shell out to
`protoc`, so a manifest-adding task that pulls a protobuf crate fails the
refresh with "Could not find protoc" (seen on a consumer pilot run adding
a WireGuard mesh dependency). Install protobuf-compiler best-effort,
gated on the same Rust-edit detection; non-Debian hosts degrade to a
warning so clippy fails loudly rather than this step erroring opaquely.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0143kv2BRrRqGxmVwwHskQtS
@coderabbitai

coderabbitai Bot commented Jun 24, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 22791907-affe-4d61-b4e3-e2b9cf42e973

📥 Commits

Reviewing files that changed from the base of the PR and between d395045 and 2d22829.

📒 Files selected for processing (1)
  • shared/sdd-rust-cleanup.md

📝 Walkthrough

Summary by CodeRabbit

  • Chores
    • Enhanced Rust project build reliability with automatic installation of required build dependencies when Rust code changes are detected.

Walkthrough

A new host post-step is added to shared/sdd-rust-cleanup.md that installs protobuf-compiler when the agent's patch touches Rust files (*.rs or Cargo.toml). The step checks for an existing protoc, falls back to apt-get install, and emits a warning if apt-get is unavailable.

Changes

Rust Cleanup: protoc Install Step

Layer / File(s) Summary
Gated protoc install host post-step
shared/sdd-rust-cleanup.md
Inserts a new "Install protobuf-compiler (host)" post-step gated on Rust-edit detection; checks for existing protoc, attempts apt-get install protobuf-compiler on Debian-like hosts, and logs a warning when apt-get is unavailable.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

  • norrietaylor/spectacles#177: Modifies the same shared/sdd-rust-cleanup.md host-side Rust cleanup post-step logic for detecting Rust changes and running cargo fmt/clippy.
  • norrietaylor/spectacles#178: Also modifies the shared host-side Rust cleanup logic in shared/sdd-rust-cleanup.md by adjusting the Rust post-step behavior in the same code-path area.
  • norrietaylor/spectacles#160: Modifies the same Rust-edit–triggered host post-step logic, expanding it to run cargo fmt/cargo clippy --fix and conditional lock refresh.

Poem

🐰 Hop, hop, little build — no more protoc fright,
I check if it's there, then install it just right.
If apt-get is absent, I'll leave you a note,
A warning to heed so your clippy won't choke.
Best-effort, I say — a rabbit does try! 🦀

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: installing protobuf-compiler in the host Rust cleanup step, which is the primary fix addressed in the pull request.
Description check ✅ Passed The description is directly related to the changeset, explaining the root cause, the fix implemented, and deployment considerations that match the changes made to the markdown file.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ 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 fix/execute-cleanup-protoc

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

@norrietaylor
norrietaylor merged commit 6101295 into main Jun 24, 2026
13 checks passed
@norrietaylor
norrietaylor deleted the fix/execute-cleanup-protoc branch June 24, 2026 03:22
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