fix(gym): isolate scenario Cargo projects from parent workspace#8640
Merged
jh-block merged 1 commit intoApr 20, 2026
Merged
Conversation
Scaffolded Cargo.toml files for the file-editing and multi-turn-edit
scenarios do not declare [workspace], so when the gym is run from
inside a checkout of goose (or any other Rust workspace) the
scenario's final 'cargo build' validation fails with:
error: current package believes it's in a workspace when it's not
Add an empty [workspace] table to each scaffolded Cargo.toml so the
scenario project is self-contained regardless of where the gym runs.
Signed-off-by: Kyle De Freitas <kdefreitas@squareup.com>
jh-block
approved these changes
Apr 20, 2026
spikewang
pushed a commit
to spikewang/goose
that referenced
this pull request
Apr 22, 2026
…-goose#8640) Signed-off-by: Kyle De Freitas <kdefreitas@squareup.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two open-model-gym scenarios (
file-editingandmulti-turn-edit) scaffold a Cargo project without declaring[workspace]. When the gym is run from inside a checkout ofgooseitself — which is the most natural place to run it — the finalcargo buildvalidation step fails before goose's output is even evaluated:This causes the scenario to be scored as failed regardless of how well the agent performed the edit.
Fix
Add an empty
[workspace]table to the scaffoldedCargo.tomlin each affected scenario. This makes the scenario project self-contained socargo buildworks regardless of where the gym is executed.Cargo.toml: | [package] name = "user-service" version = "0.1.0" edition = "2021" + + [workspace]Repro
From inside a goose checkout, with a model configured:
Before this change,
file-editingfails at thecargo buildvalidation rule even when the agent produces the correct edit. After the change, the scenario runs to completion.Verified locally on macOS with
databricks/goose-claude-4-7-opus— thefile-editingscenario now passes end-to-end (1/1 tests passedin ~27s).Scope
Minimal, two-line change. No behavior change for users who run the gym outside a Rust workspace.