You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
checkClaudeCliPresent/checkCodexCliPresent in packages/gittensory-miner/lib/laptop-init.js run unconditionally today, contradicting the code's own comment that a CLI is "only needed once a driver provider is configured" — a rationale that was never actually implemented. As a result, doctor currently cannot distinguish "no provider configured, CLI absence is fine" from "provider configured but the CLI is missing/broken, every attempt will fail."
Dependencies
None — independently shippable. MINER_CODING_AGENT_PROVIDER is already read elsewhere via process.env/options.env in existing tests, so this only requires reading that same value inside the two existing check functions.
Requirements
Inside checkClaudeCliPresent, read MINER_CODING_AGENT_PROVIDER (via process.env/options.env, matching the existing pattern used in tests) and only flip ok to false when the provider is configured as claude-cli and the CLI binary is not present.
Inside checkCodexCliPresent, apply the equivalent gating for codex-cli.
When no provider is configured (or a provider other than the CLI being checked is configured), the check must remain ok: true with an advisory-only message — never fail doctor for an irrelevant/unconfigured CLI.
When the relevant provider IS configured and its CLI is missing, ok must be false and the message must clearly state that every attempt will fail without it.
Do not change any other doctor check's behavior or the overall runDoctorChecks() control flow beyond these two functions.
Update test/unit/miner-cli-doctor-checks.test.ts to cover the new gating behavior for both claude-cli and codex-cli.
Deliverables / Acceptance Criteria
checkClaudeCliPresent gated by MINER_CODING_AGENT_PROVIDER === 'claude-cli'
checkCodexCliPresent gated by MINER_CODING_AGENT_PROVIDER === 'codex-cli'
Unconfigured-provider case remains ok: true advisory, not a failure
Configured-but-missing-CLI case is ok: false with a clear message
test/unit/miner-cli-doctor-checks.test.ts updated with new cases
No change to any other doctor check or to runDoctorChecks()'s overall structure
Test Coverage Requirements
This PR must ship with full test coverage for every changed line and branch — the repo's Codecov patch gate requires 99%+ coverage and the house standard is to aim for 100%, including both sides of every conditional/nullish-coalescing branch introduced. Add: (1) unit tests covering all four combinations (provider unconfigured/CLI missing, provider unconfigured/CLI present, provider configured/CLI missing, provider configured/CLI present) for both claude-cli and codex-cli, (2) an invariant test asserting that an unconfigured provider's CLI check is never reported as ok: false regardless of CLI presence — "not installed, nobody cares" must never fail doctor, and (3) a regression test asserting the previously-unconditional failure mode (CLI missing while unconfigured) no longer breaks doctor, since this issue is framed as a bug fix for the never-implemented gating comment.
Codecov visibility note:packages/gittensory-miner/**, apps/gittensory-miner-ui/**, and apps/gittensory-miner-extension/** currently sit entirely outside vitest's coverage.include glob, so codecov/patch cannot measure changes there yet — closing that gap is exactly what #4864 and #4865 (in this same milestone) do. Any part of this change under packages/gittensory-engine/src/** or the repo's own src/** remains fully Codecov-instrumented as usual. Either way, this does not lower the bar: treat the 100%-including-invariants-and-regression target above as the enforced house standard regardless of what Codecov can currently see, and it becomes gate-enforced for real once #4864/#4865 ship.
Expected Outcome
An operator running gittensory-miner doctor can now tell the difference between "I haven't set up a coding-agent CLI and don't need to" and "I configured a provider but its CLI is broken/missing and every attempt will fail" instead of getting an unconditional, uninformative check result either way.
Context
checkClaudeCliPresent/checkCodexCliPresentin packages/gittensory-miner/lib/laptop-init.js run unconditionally today, contradicting the code's own comment that a CLI is "only needed once a driver provider is configured" — a rationale that was never actually implemented. As a result,doctorcurrently cannot distinguish "no provider configured, CLI absence is fine" from "provider configured but the CLI is missing/broken, every attempt will fail."Dependencies
None — independently shippable.
MINER_CODING_AGENT_PROVIDERis already read elsewhere viaprocess.env/options.envin existing tests, so this only requires reading that same value inside the two existing check functions.Requirements
checkClaudeCliPresent, readMINER_CODING_AGENT_PROVIDER(viaprocess.env/options.env, matching the existing pattern used in tests) and only flipoktofalsewhen the provider is configured asclaude-cliand the CLI binary is not present.checkCodexCliPresent, apply the equivalent gating forcodex-cli.ok: truewith an advisory-only message — never fail doctor for an irrelevant/unconfigured CLI.okmust befalseand the message must clearly state that every attempt will fail without it.runDoctorChecks()control flow beyond these two functions.Deliverables / Acceptance Criteria
checkClaudeCliPresentgated byMINER_CODING_AGENT_PROVIDER === 'claude-cli'checkCodexCliPresentgated byMINER_CODING_AGENT_PROVIDER === 'codex-cli'ok: trueadvisory, not a failureok: falsewith a clear messagerunDoctorChecks()'s overall structureTest Coverage Requirements
This PR must ship with full test coverage for every changed line and branch — the repo's Codecov patch gate requires 99%+ coverage and the house standard is to aim for 100%, including both sides of every conditional/nullish-coalescing branch introduced. Add: (1) unit tests covering all four combinations (provider unconfigured/CLI missing, provider unconfigured/CLI present, provider configured/CLI missing, provider configured/CLI present) for both claude-cli and codex-cli, (2) an invariant test asserting that an unconfigured provider's CLI check is never reported as
ok: falseregardless of CLI presence — "not installed, nobody cares" must never fail doctor, and (3) a regression test asserting the previously-unconditional failure mode (CLI missing while unconfigured) no longer breaks doctor, since this issue is framed as a bug fix for the never-implemented gating comment.Codecov visibility note:
packages/gittensory-miner/**,apps/gittensory-miner-ui/**, andapps/gittensory-miner-extension/**currently sit entirely outside vitest'scoverage.includeglob, socodecov/patchcannot measure changes there yet — closing that gap is exactly what #4864 and #4865 (in this same milestone) do. Any part of this change underpackages/gittensory-engine/src/**or the repo's ownsrc/**remains fully Codecov-instrumented as usual. Either way, this does not lower the bar: treat the 100%-including-invariants-and-regression target above as the enforced house standard regardless of what Codecov can currently see, and it becomes gate-enforced for real once #4864/#4865 ship.Expected Outcome
An operator running
gittensory-miner doctorcan now tell the difference between "I haven't set up a coding-agent CLI and don't need to" and "I configured a provider but its CLI is broken/missing and every attempt will fail" instead of getting an unconditional, uninformative check result either way.Links & Resources
checkClaudeCliPresent,checkCodexCliPresent)doctorvalidate config content, not just its path #4873 (validates.gittensory-miner.ymlcontent — a distinct, unrelated doctor check)