components C6: /doctor wiring + config-validation surfacing - #298
Merged
Conversation
- /doctor finally reaches the dormant DoctorScreen (TUI inversion) and a new output-style registry command serves headless/REPL (python/ platform, ripgrep availability, sessions dir, config + rule health) - services/config_health: per-file JSON/encoding/top-level checks over the paths the loaders ACTUALLY read (git-root-anchored project config via get_project_config_path — review M1 — plus the .clawcodex settings trio and the managed file); startup warning rows in a new visually-distinct "-warning" SystemMessage variant, with "Run /doctor for details." - loaders HARDENED so "file ignored" is true for every detected class (review M2): permissions/setup._load_settings_file catches ValueError/OSError + rejects non-dict top levels (a mis-encoded or array-shaped settings file crashed setup_permissions before the TUI mounted); config._read_json rejects non-object top levels (which previously blew up in _deep_merge) - delivers the C1-deferred rule-warning surfacing (review M3): collect_rule_warnings formats dangerous + shadowed permission rules into the startup rows, the /doctor report, AND a new DoctorScreen section; the stale C1 comment now states it - conftest: GLOBAL_CONFIG_DIR isolated per-test (full-app tests no longer read the developer's real global config) 18 tests incl. loader-hardening regressions through the REAL loaders, a real-CommandContext pin, unreadable/dir-shaped paths, and a subprocess textual-free import check. Suite baseline-identical. Critic-approved after one round; KeybindingWarnings deferral and the no-reset-gate divergence documented in the module. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
singlaamitesh
pushed a commit
to singlaamitesh/clawcodex
that referenced
this pull request
Jul 7, 2026
…-doctor-validation components C6: /doctor wiring + config-validation surfacing
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
/doctorwired on every surface: the dormant DoctorScreen (now with config-health + permission-rules sections) for the TUI, an output-style registry command elsewhereservices/config_healthchecks the loader-faithful path set (git-root project config,.clawcodexsettings trio, managed file) and surfaces problems as distinct warning startup rowssetup_permissionspre-mount; non-object config blew up in_deep_merge)/doctoreverywhere)Test plan
CommandContextfield pin, unreadable/dir-shaped paths, textual-free subprocess import check, startup-row emit/silent paths🤖 Generated with Claude Code