test(config): cover the deferring-global skip path of the --global isolation gate#36
Merged
Merged
Conversation
…lidation Follow-up to the `rig config set --global` isolation gate (#20). Multi-model review flagged that the `agent_tools_source is None` early return — the branch that lets a global config legitimately defer its checkout to per-repo/env without a spurious catalog scan — had no test. Add one: a `--global` set of a non-catalog key, with a global file that pins no own `agent_tools_source`, must succeed and skip the isolated catalog scan (TDD-verified: drop the guard and the deferring config is wrongly rejected). Also fold in the review's small cleanups: trim the duplicated call-site comment (the why lives in the helper docstring) and drop a stray `(codex P2)` triage tag from a test comment. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.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.
Follow-up to #20 (the
rig config set --globalisolation gate). The multi-model review of #20 flagged a coverage gap: theagent_tools_source is Noneearly return in_validate_layer_in_isolation— the branch that lets a global config legitimately defer its checkout to per-repo/env without a spurious catalog scan — had no test.What
test_cli_set_global_without_own_source_skips_isolated_catalog_scan: a--globalset of a non-catalog key, where the global file pins no ownagent_tools_source, must succeed and skip the isolated catalog scan. TDD-verified — removing the guard makes the deferring config get wrongly rejected and the test fails.(codex P2)triage tag from a test comment.Test-only + comment changes; full suite green (771 passed, 8 skipped).
🤖 Generated with Claude Code