-
Notifications
You must be signed in to change notification settings - Fork 1.5k
fix(ci): resolve SANDBOX_DOCKER_EXACT_PATHS crate prefixes dynamically #7394
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
theredspoon
wants to merge
2
commits into
nearai:main
Choose a base branch
from
theredspoon:agent/qa-sandbox-docker-exact-paths
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This regression test calls
_sandbox_docker_exact_paths()directly, so it remains green ifbuild_plan()stops consuming the resolved set or fails to setrun_sandbox_dockerfor a relocated path—the exact silent loss of Docker coverage this change is intended to prevent. Drivebuild_plan()with the relocatedplanner.rs/resolver.rspaths and assert the emitted Docker-lane flag instead of only inspecting the helper result.AGENTS.md reference: AGENTS.md:L78-L83
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Confirmed, and fixed in 77923ed. I reproduced the gap with a mutation test first: I removed the
path in sandbox_docker_exact_pathsarm frombuild_plan()'s consumption check (keeping the prefix arm intact) and reran the suite.test_sandbox_docker_exact_paths_resolve_through_crate_inventory_when_nestedstayed green because it only asserts on_sandbox_docker_exact_paths()'s return value, never touchingbuild_plan(). That's the exact silent-coverage-loss scenario this PR exists to prevent.Added
test_sandbox_docker_exact_paths_route_relocated_crate_through_build_plan, following the same pattern astest_sandbox_docker_prefix_follows_crate_inventory_when_nested: it mockscrate_directoryto relocateironclaw_runtime_policyand drivesbuild_plan()itself instead of calling the resolver directly. With the mutation in place this new test fails (run_sandbox_dockerisFalse); reverting the mutation makes it pass again.One deliberate detail: the test also mutates the synthetic package's
manifest_pathto the relocated directory. Without that,build_plan()'s package-directory lookup can't find the moved crate, hits the "a crate path maps to no workspace package" arm, and falls back to_full_plan()— which setsrun_sandbox_docker=Trueunconditionally regardless of the exact-paths logic. That fallback would make the assertion pass for the wrong reason and mask a real regression. The test also assertsplan["mode"] == "selected"(not"full") specifically to rule that out.Reran both suites clean:
test_reborn_pr_test_plan.py(75/75) andtest_ws12_workflow_contracts.py(52/52).