Skip to content

Surface the resolved coding-agent-driver provider and CLI presence in gittensory-miner status --json #5164

Description

@JSONbored

Context

packages/gittensory-engine/src/miner/driver-factory.ts already resolves MINER_CODING_AGENT_PROVIDER along with per-provider model/timeout env vars, but packages/gittensory-miner/lib/status.js never surfaces any of that in its output. An operator running gittensory-miner status --json today has no way to see which coding-agent provider is actually configured or whether the corresponding CLI binary is present, without separately inspecting env vars or PATH.

Dependencies

None — independently shippable. This is a read-only extension to status.js reusing existing presence-check helpers already implemented in laptop-init.js; it does not depend on the doctor provider-gating issue or any other issue in this batch, even though it reuses the same underlying presence-check helpers that issue also touches.

Requirements

  1. Add a new driver section to the JSON object returned by gittensory-miner status --json.
  2. The driver section must include the resolved provider name, read via the same resolution path driver-factory.ts uses for MINER_CODING_AGENT_PROVIDER.
  3. The driver section must include the name of the relevant model-env-var for the resolved provider (e.g. MINER_CODING_AGENT_CLAUDE_MODEL or MINER_CODING_AGENT_CODEX_MODEL) — never its value.
  4. The driver section must include a boolean indicating whether the corresponding CLI binary (claude-cli / codex-cli) is present on PATH, reusing the existing presence-check helpers already implemented in laptop-init.js rather than duplicating that logic.
  5. The implementation must never print, log, or return any secret value (API keys, tokens, auth file contents) under any circumstance — only names and booleans.
  6. The human-readable (non-JSON) status output should also reflect this new driver info in a readable form, consistent with how other status fields are already rendered.

Deliverables / Acceptance Criteria

  • status.js returns a driver object with provider name, model-env-var name, and CLI-presence boolean fields in --json mode
  • Human-readable status output includes the same information in plain text
  • No secret values (env var values, auth file contents) appear anywhere in the output
  • Existing presence-check helpers from laptop-init.js are reused, not duplicated
  • Updated/added tests covering the new section

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 status.js's new driver section for each supported provider value (noop/claude-cli/codex-cli/agent-sdk) and for both CLI-present and CLI-absent cases, (2) an invariant test asserting that no output of status --json (across all provider/CLI-presence permutations) ever contains a raw env-var value or any secret-shaped string — only names and booleans, and (3) a regression test is not applicable since this is a new feature, not a bug fix.

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 can run gittensory-miner status --json (or the plain-text form) and immediately see which coding-agent provider is configured and whether its CLI is installed, without needing to separately inspect environment variables or PATH.

Links & Resources

  • packages/gittensory-engine/src/miner/driver-factory.ts
  • packages/gittensory-miner/lib/status.js
  • packages/gittensory-miner/lib/laptop-init.js (existing presence-check helpers)
  • Theme: Claude/Codex self-host operational parity

Metadata

Metadata

Assignees

No one assigned

    Labels

    gittensor:featureGittensor-scored feature linked to a feature issue — scores a 0.25x multiplier.help wantedExtra attention is needed

    Projects

    Status
    Done

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions