fix(sdd-execute): bundle agent branch ref not HEAD in cargo-lock post-step#157
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (6)
📝 WalkthroughSummary by CodeRabbit
WalkthroughThree agent execution workflows (sdd-execute-haiku, opus, sonnet) are regenerated with updated metadata identifiers from the gh-aw compilation tool, and a functional fix is applied: the post-agent Cargo.lock refresh step now uses ChangesSDD Execute Workflow Updates
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
Actionable comments posted: 0 |
…gent output The sdd-execute agent runs inside a firewalled sandbox with no crates.io egress, so it cannot run cargo fmt/clippy and ships rustfmt-dirty, clippy-dirty code. Extend the #153 host post-step (which already refreshes Cargo.lock outside the firewall) so that, when the agent's patch touches Rust (*.rs or Cargo.toml), the host also installs rustfmt + clippy components, runs cargo fmt --all and cargo clippy --fix (machine-applicable lints only), and folds any change into the agent's commit via a single git commit --amend + one transport regen using the ${base_sha}..${AGENT_BRANCH} bundle ref (#157). Gated on a Rust change so non-Rust PRs pay nothing. fmt and clippy are best-effort: a genuine compile error or non-machine-applicable lint surfaces for consumer CI rather than being masked, and never blocks PR creation. Dead-code suppression is out of scope (#158 non-goal). The block is duplicated across the three tier sources (a shared fragment cannot be referenced from @main in the same PR that introduces it); locks regenerated with gh aw compile (pinned v0.74.3). Closes #158 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Root cause
#153's Cargo.lock post-step regenerates the agent's git bundle with the wrong ref:
A bundle built from
..HEADrecords the tip asHEAD, not as a branch ref. gh-aw'ssafe_outputsapplies the bundle by fetchingrefs/heads/<branch>from it, which is absent:Every Rust task PR whose patch touches a
Cargo.toml(so the post-step fires) fails to materialize. Observed ongominimal/minspec-testtask #16 (run 26556867070); tasks #14 and #17 predate #153 and were unaffected. The comment one line above the bug already states the correct form (<base>..<branch>).Fix
$AGENT_BRANCHis the agent's branch (git rev-parse --abbrev-ref HEAD, captured in the detect step). Ranging to the branch name recordsrefs/heads/<branch>in the bundle, which is exactly the ref gh-aw fetches. Applied to all three tier sources; locks regenerated withgh aw compile(pinned v0.74.3). Theformat-patchline is left onHEAD— patches carry commits, not ref names, sogit amis unaffected.Acceptance
sdd-executerun whose patch editsCargo.tomlopens its PR successfully (bundle applies,refs/heads/<branch>resolves).Cargo.toml(post-step still no-ops).Non-goals
References