260519-spec-config-flag#94
Merged
Merged
Conversation
Users can now specify --config PATH on create, babysit, and fix-pr commands to use a single config file, completely bypassing global and project config files. The path is persisted in state.json and reused by draft continue.
- Add isinstance(data, dict) guard raising ConfigError — non-mapping YAML roots crash validate_config with AttributeError instead of a clean error message - Add list-root and scalar-root regression tests — cover the two non-mapping cases identified in the review
…iring - Pop env var from hook env when ctx is None or value is _SKIP — reviewer flagged that parent-process values for DRAFT_BRANCH / DRAFT_BASE_BRANCH could bleed through when the context was absent - Add `_resolve_config_arg`, `_load_run_config`, `_decorate_validation_errors`, `_config_label` helpers to command_common — reviewer noted the per-command load logic should be shared - Move config load + validate before `run_dir.mkdir` in create and babysit — reviewer flagged orphan run_dir left on config errors - Wire `--config PATH` arg into create, babysit, fix-pr; thread `config_path`/`repo` into each `_print_preamble` — reviewer asked for the flag to appear in all three commands with visible preamble output - Persist `config_path` on RunContext; command_continue reads it and errors clearly when the file is gone — reviewer asked continue to reuse the same file without silent fallback - Add `config:` line to status text and `config_path` to status JSON; add `config_path: null` to unknown-status JSON branch — reviewer noted the field was missing from that branch - Add tests for list-root and scalar-root YAML in `test_load_config_from_file` — reviewer asked for explicit coverage of non-mapping root rejection
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
Test plan