feat(doctor): probeRoots for six fixed-location providers (#899 Tier 2, batch 1) - #938
Open
therickfactr wants to merge 1 commit into
Open
feat(doctor): probeRoots for six fixed-location providers (#899 Tier 2, batch 1)#938therickfactr wants to merge 1 commit into
therickfactr wants to merge 1 commit into
Conversation
…al#899 Tier 2, batch 1) Tier 2 of getagentseal#899: cline, roo-code, kilo-code, grok, pi/omp and kimi report the roots their discovery actually reads, so `codeburn doctor` can tell "tool not installed" from "configured root is empty" for them. Batch 1 is deliberately the Cline family and its closest cousins. `cline` is the provider whose silence motivated getagentseal#874 and it still had no probeRoots: the CLI half got one, the extension half never did. Its four roots - three VS Code variant globalStorage paths plus `~/.cline/data` - make the Tier 2 case concretely, because today there is no way to see which of the four was found. Before: Cline 0 NOTHING FOUND (tool likely not installed or no history yet) KiloCode 0 NOTHING FOUND (tool likely not installed or no history yet) After, on a machine with the Cline CLI installed and the extension not: Cline 0 NOTHING FOUND (~/.cline/data exists but holds no sessions) KiloCode 0 NOTHING FOUND (...kilocode.kilo-code does not exist; tool likely not installed) ## One shared resolver instead of a mirror probeRoots() is only useful if it reports what discovery truly reads, so the resolution is shared rather than duplicated. `vscode-cline-parser.ts` gains `clineTaskRoots(extensionId, overrideDir)`, `discoverClineTasks` is rewritten to call it, and cline / roo-code / kilo-code use the same function for their probes. That is the entire change to the shared parser: a pure extraction with no parsing touched, so Roo Code, KiloCode and IBM Bob are unaffected - their suites and the parser's own are green. An earlier draft mirrored the logic in a local helper instead, and the mirror had already drifted: it detected "no override" with `=== undefined` while `discoverClineTasks` uses truthiness, so an empty-string override made doctor report `[""]` while discovery scanned the three default roots - a probe pointing where discovery never looked, which is the exact failure this method exists to prevent. One resolver makes that unrepresentable; the regression test pins it anyway. ## Per-provider notes - kilo-code reports both halves of its split discovery: the legacy task tree and the SQLite store, labelled separately. - pi and omp are two providers in one module; each reports its own sessions dir, with a test that they cannot collide. - kimi reports `<shareDir>/sessions`, not shareDir. Discovery walks the former; reporting the latter would point doctor at a directory that exists even when no sessions do - the false reassurance this campaign removes. - Candidate roots are reported before any existence filter, per getagentseal#903, since doctor's job is to show where it looked. Assertions pin exact root sets rather than substrings, so a wrong-but-similar path cannot pass, and each guard is mutation-checked: reverting the resolver to `=== undefined`, making cline's probe ignore its override, and making kimi report shareDir each fail the suite. Tests live in their own file because getagentseal#903 introduces the Tier 1 suite and is still open; happy to fold the two together once it lands.
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.
Tier 2 of #899, batch 1:
probeRoots()forcline,roo-code,kilo-code,grok,pi/ompandkimi.Standalone rather than stacked on #903 — no provider overlaps its twelve, and the shared-parser extraction below stands on its own. The Tier 2 tests are in their own file for the same reason; happy to fold them into the Tier 1 suite once #903 lands.
Why these six first
clineis the provider whose silence motivated #874, and it still had noprobeRoots()— the CLI half got one, the extension half never did. Its four roots (three VS Code variant globalStorage paths plus~/.cline/data) make the Tier 2 case concretely: four places to look, and no way to see which one CodeBurn found.Real
doctoroutput on a machine with the Cline CLI installed and the extension not:Both rows were an unexplained
0before. Now one says the root is there and empty — the case where the user has the tool and something is wrong — and the other says the tool is not installed.One shared resolver instead of a mirror
probeRoots()is only worth having if it reports what discovery truly reads, so the resolution is shared rather than duplicated.vscode-cline-parser.tsgainsclineTaskRoots(extensionId, overrideDir),discoverClineTasksis rewritten to call it, and the three Cline-family providers use the same function for their probes.That is the whole change to the shared parser: a pure extraction, no parsing touched. Roo Code, KiloCode and IBM Bob are unaffected — their suites plus the parser's own are green (44/44 across the six affected files).
This is worth spelling out because the first draft of this branch mirrored the logic in a local helper, and the mirror had already drifted before review: it detected "no override" with
=== undefinedwhilediscoverClineTasksuses truthiness. An empty-string override therefore madedoctorreport[""]while discovery scanned the three default roots — a probe pointing where discovery never looked, stated authoritatively, which is precisely the failure this method exists to prevent. One resolver makes that class unrepresentable; there is a regression test pinning it regardless.Per-provider notes
<shareDir>/sessions, notshareDir. Discovery walks the former; reporting the latter would pointdoctorat a directory that exists even when no sessions do — exactly the false reassurance this campaign removes.lingtai-tuicall in feat(doctor): probeRoots for 12 more providers (#899 Tier 1) #903: dropping non-existent dirs is right for discovery and wrong fordoctor, whose job is to show where it looked.Testing
npm testpassesnpm run buildsucceedsAssertions pin exact root sets rather than substrings, so a wrong-but-similar path cannot pass. Each guard is mutation-checked — reverting the resolver to
=== undefined, making cline's probe ignore its override, and making kimi reportshareDireach fail the suite (3 failed / 5 passed with the mutations, 8/8 without).npm test: 11 failed / 2699 passed. Every failure is pre-existing onmain— 1 assertion failure and 10 timeouts, all incache-refresh-lockandapp/electron/cli. I rancache-refresh-lockon cleanmainand on this branch and got identical results, so it is not introduced here; it looks like the lock family from #914 has not fully settled.Open question from #899
Still unanswered, and it shapes batches 2 and 3: for providers whose discovery globs (e.g.
~/.gemini/tmp/<project>/chats), do you want the glob parent reported, or the resolved matches? Parent is cheap and stable; resolved matches are more useful but turndoctorinto a directory walk. I have gone parent-only here, consistent with the cheap-existence-check shape, and will keep doing so unless you say otherwise.