Audit cleanup: config doctor, snake_case tags, MCP fixes, tests - #6
Merged
Conversation
…tests
- Rename `config validate` to `config doctor` with `--fix` flag for
auto-correcting legacy camelCase config keys (validate kept as hidden alias)
- Add `config open` command to open config directory in file manager
- Change JSON struct tags to snake_case with backwards-compatible
unmarshaling via custom UnmarshalJSON
- Add HasLegacyKeys(), LegacyKeyReplacement(), MigrateKeys() to config pkg
- Remove CWD fallback from mcpResolveRepo (MCP tools use registry only)
- Fix workspace_stop if_running dead code
- Add missing ReadOnlyHint annotations to MCP tools
- Fix error message style in TUI ("failed to archive" → "archiving")
- Add flock package tests (lock/unlock, exclusivity, re-lock)
- Add MIT license file and link from README
- Update rules, docs, and skill templates for all changes
- Wrap defer Close/Unlock in closures to satisfy errcheck - Convert if-else chain to switch in config doctor - Remove unused contains and initTestRepo test helpers
Runs build, vet, test, lint, and tidy checks locally to approximate the GitHub Actions CI pipeline before pushing.
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.
What
Codebase audit against documented rules and best practices, with all findings fixed.
Why
Several patterns had drifted from the conventions documented in
.claude/rules/. This brings the codebase back into alignment and adds missing test coverage.How
Config improvements
config validate→config doctorwith--fixflag for auto-correcting legacy camelCase config keys (validate kept as hidden alias)config opencommand to open the config directory in the file managersnake_casewith backwards-compatible unmarshaling via customUnmarshalJSONHasLegacyKeys(),LegacyKeyReplacement(),MigrateKeys()to config packageMCP server fixes
mcpResolveRepo— MCP tools should always use the global registry, not detect from CWDworkspace_stopif_runningdead code (was checking wrong variable)ReadOnlyHintannotations on mutating toolsStyle & consistency
"failed to archive"→"archiving")~/.config/fr8/choice overos.UserConfigDir()Tests & docs
config open/configDir()testTest plan
go test -race -count=1 ./...— all 18 packages passgo build ./...andgo vet ./...clean