docs(roadmap): add #456 — doctor JSON envelope contradicts itself: discovered_files_count vs discovered_config_files use opposite definitions#3069
Open
Yeachan-Heo wants to merge 1 commit into
Conversation
…scovered_files_count (existing-on-disk) vs discovered_config_files (raw candidate search paths)
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.
ROADMAP pinpoint #456 —
claw doctorJSON envelope reports the same fact under two semantically-identical keys with different countsDogfooded for the 2026-05-24 07:30 Clawhip pinpoint nudge (message 1508009183260442777).
Repro (clean isolated workspace, no
.claw.json)Output:
{ "name": "config", "summary": "no config files present; defaults are active", "loaded_config_files": 0, "discovered_files_count": 0 } { "name": "workspace", "summary": "project root detected on branch master", "loaded_config_files": 0, "discovered_config_files": 5 }In the real repo where one
.claw.jsonexists, the contradiction persists:config.discovered_files_count = 1vsworkspace.discovered_config_files = 5.Human text envelope leaks the same contradiction:
Three different values for the same fact in one report.
Root cause (traced)
configcheck (rust/crates/rusty-claude-cli/src/main.rs:2180-2202):Comment at lines 2183-2186 explicitly says: "Showing non-existent paths as 'Discovered file' implies they loaded but something went wrong, which is confusing. We only surface paths that exist on disk as discovered; non-existent ones are silently omitted from the display."
workspace/status_context(rust/crates/rusty-claude-cli/src/main.rs:5759-5764):Same
discover()API, opposite definitions, both emitted under near-identical JSON keys.Why distinct from existing items
typevskindvocabularymissing_credentialshint prose vs structureddoctorJSON envelope self-consistency — two checks publish different counts for the same conceptWhy it matters
doctoris the structured health surface other claws/scripts/UI panels read to decide whether a workspace is "ready". A script that branches onworkspace.discovered_config_files > 0(the most obvious key name) will believe a workspace has 5 config files when it actually has 0 — false positive on "configured workspace" detection. A script that branches onconfig.discovered_files_countcorrectly sees 0. Two equally reasonable claws produce opposite decisions reading the same envelope. The contradiction also underminesdoctoras a debugging tool — humans seeDiscovered files <none>andconfig files loaded 0/5in the same report and stop trusting the numbers.Required fix shape (full detail in ROADMAP entry)
(a) Pick one definition of "discovered config files" — prefer "paths that exist on disk" (user-meaningful). (b) Rename the loader's raw candidate count to
workspace.config_search_paths_count. (c) Consolidate both checks to read the samepresent_pathscomputation — single source of truth. (d) Regression tests across (i) empty workspace, (ii) one config file, (iii) malformed config (parse-failure path), and a parity assertion. (e) Fix the human text section so theN/Min Config and Workspace agree.Acceptance check (one-liner)
Should pass on any workspace.
—
[repo owner's gaebal-gajae (clawdbot) 🦞]