Skip to content

Commit 8a3ad90

Browse files
Kasper Jungeclaude
authored andcommitted
Fix config CLI bugs, add guards, and expand tests
Fix critical bugs: global scope skips repo-local sync/delete, sync errors no longer silently discarded, $EDITOR handling uses shlex.split and propagates exit code. Fix important bugs: config path --global checks existence, hardcoded paths in errors, sources reject extra values. Add else guards on dispatch chains, extract VALID_CANONICAL_INSTRUCTIONS constant and GlobalScope type alias. Add 14 new CLI tests covering edit, default_source, unset, type flags, and deprecation warnings. Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 1aa40e9 commit 8a3ad90

5 files changed

Lines changed: 1217 additions & 3 deletions

File tree

CHANGELOG.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,24 @@
22

33
## [Unreleased]
44

5+
### Fixed
6+
- `agr config set/add/remove tools --global` no longer calls `find_repo_root()` or syncs/deletes repo-local skills
7+
- `_sync_dependencies_to_tools` return value is now checked; non-zero exits with error
8+
- `agr config edit` handles `$EDITOR` with flags (e.g. `"code --wait"`) via `shlex.split`
9+
- `agr config edit` propagates editor exit code
10+
- `agr config path --global` errors when `~/.agr/agr.toml` doesn't exist instead of printing a nonexistent path
11+
- Hardcoded `~/.agr/agr.toml` in `_load_config` error message replaced with actual path
12+
- `agr config add/remove sources` rejects extra values (only one source name at a time)
13+
14+
### Changed
15+
- Extracted `VALID_CANONICAL_INSTRUCTIONS` constant in `agr/config.py`, shared with `config_cmd.py`
16+
- Extracted `GlobalScope` type alias in `agr/main.py` replacing 8 duplicate `Annotated` definitions
17+
- Added `else: raise AssertionError` guards to key dispatch chains in `run_config_get/set/unset`
18+
- `agr config add tools` skips `config.save()` when no tools were actually added
19+
20+
### Added
21+
- 14 new CLI tests for config edit, default_source, sync_instructions, canonical_instructions, type flags, unconfigured tools, extra values, and deprecation warnings
22+
523
## [0.7.6] - 2026-03-02
624

725
### Added

0 commit comments

Comments
 (0)