Repository navigation
fix(crew): a confined worker's Git does not read the system git config - #2720
Merged
Merged
Conversation
Contributor
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
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.
Fixes #2609
What
Confinement::scrub_env(the one place a confined worker's environment is built, called fromagents/driver/pipes.rs) now setsGIT_CONFIG_NOSYSTEM=1on every platform, over any value the parent had. A worker's Git no longer reads the system config (/etc/gitconfig, the Homebrew prefix file). Docs indocs/crew/protocol/SPEC.mdupdated.Limit: Git ignores
GIT_CONFIG_NOSYSTEMfor an explicitgit config --systemwrite (checked with git 2.54: withGIT_CONFIG_SYSTEMpointing at a writable file, the write still lands, but a plain read no longer sees it). So the variable closes the read side; a write still depends on the file being unwritable to the worker's user. The docs say so.Evidence
On the box (
cargo-remote.sh):host::confine::env_tests::a_worker_git_does_not_read_the_system_configFAILED andhost::confine::env_tests::the_rules_set_no_system_git_config_over_any_other_valueFAILED (8 passed, 2 failed).cargo test -p orbyn-core confine::40 passed, 0 failed.cargo clippy -p orbyn-core --all-targets -- -D warnings: finished, no errors.The first test runs real
git config --getagainst a fake system file named byGIT_CONFIG_SYSTEM: Git with no rules reads the planted value, a worker's Git does not.AI usage
Tool: Claude Code 2.1.330. Model: claude-sonnet-5-5. Effort: medium. Human role: lead set the scope. Sources: none.
Agent review: Eng 3 checked the diff at 6864982