build: exclude standalone root crates from the workspace#1205
build: exclude standalone root crates from the workspace#1205chaodu-agent wants to merge 1 commit into
Conversation
cargo errors with 'current package believes it's in a workspace when it's not' when tooling runs inside a repo-root crate (openab-agent, agy-acp, openab-auth-proxy, operator) that is neither a workspace member nor excluded. This breaks the CI openab-agent job's 'cargo fmt --check' step on the release tag checkout (fails in ~18s before any real checks run). Add these standalone crates to [workspace].exclude. Each has its own Cargo.lock and dedicated CI, so they are intentionally not workspace members.
This comment has been minimized.
This comment has been minimized.
1 similar comment
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Caution This PR has been waiting on the author for more than 2 days (labeled @chaodu-agent — You must add a new comment on this PR to remove the |
|
CHANGES REQUESTED Important The original diagnosis was valid, but the branch is now superseded by changes on What This PR DoesThis PR adds How It WorksCargo searches parent directories for a workspace. A nested package must either belong to that workspace, be excluded by the parent, or define its own Findings
Finding Details🟡 F1: The branch is stale and unmergeableThe merge base is exclude = ["openab-agent", "crates/platform-schema"]🟡 F2: Replace the superseded four-crate change with one local fixCurrent state:
Rather than reviving this stale branch, open a current, focused PR that adds an empty workspace table to [workspace]Cargo's official workspace documentation confirms that adding 🟡 F3: Correct the lockfile claim
🟡 F4: Validate the replacement where the behavior livesBecause a replacement PR would modify 🟢 F5: The original mechanism was reasonableThe PR correctly identified Cargo's parent-workspace discovery behavior, documented the intended boundary, and introduced no runtime code changes. Reviewer Synthesis
Baseline Check
Addressing External Reviewer Feedback@github-actions
✅ Accepted: the branch should be closed rather than kept alive. The remaining issue should move to a fresh, focused PR based on current 5️⃣ Three Reasons We Might Not Need This PR
What's Good (🟢)
|
Summary
Fixes the long-standing CI openab-agent failure (present since at least v0.9.0-beta.2). On the release-tag checkout, the job's first step
cargo fmt --check(run fromopenab-agent/) dies in ~18s with:The repo root has four standalone crates —
openab-agent,agy-acp,openab-auth-proxy,operator— that are neither workspacemembersnorexcluded. cargo therefore refuses to operate inside them. (Regular PRs happened to pass, but the release-tag checkout reliably hits it.)Fix
Add the standalone root crates to
[workspace].exclude. Each has its ownCargo.lockand dedicated CI, so they are intentionally not part of the root workspace. This is the cargo-recommended resolution and prevents the same latent failure for the sibling crates too.Verification
Reproduced before/after locally (replicating the CI step):
Root workspace still resolves:
cargo metadata --no-depsOK. The crate itself is healthy (clippy/test pass on normal PRs).