feat(miner): surface a codex auth-freshness remediation detail in doctor (#5166)#5297
Conversation
…tor (JSONbored#5166) checkCodexCliPresent already stats auth.json for readability but reported a generic advisory string regardless of whether codex-cli is actually the configured driver. When MINER_CODING_AGENT_PROVIDER is codex-cli and auth.json is missing or unreadable, the check now surfaces a specific, actionable remediation ("run `codex auth` to authenticate before attempts run") instead of the generic aside. The unconfigured (or differently-configured) case's message is unchanged, and ok stays true either way -- this is a message-quality refinement on top of JSONbored#5165's gating, not a change to the ok logic itself.
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5297 +/- ##
=======================================
Coverage 94.37% 94.37%
=======================================
Files 474 474
Lines 40128 40128
Branches 14631 14631
=======================================
Hits 37869 37869
Misses 1583 1583
Partials 676 676
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
|
Tip 🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩 ✅ Gittensory review result - approve/merge recommendedReview updated: 2026-07-12 13:32:01 UTC
✅ Suggested Action - Approve/Merge
Review summary Nits — 5 non-blocking
Review context
Contributor next steps
Signal definitions
[BETA] Chat with GittensoryAsk Gittensory a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.
Full command reference: https://gittensory.aethereal.dev/docs/gittensory-commands 🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers.
|
Summary
checkCodexCliPresentinpackages/gittensory-miner/lib/laptop-init.jsalready statsauth.jsonfor readability, but reported the same generic advisory string regardless of whethercodex-cliis actually the configured driver. Now that Gatedoctor's claude/codex CLI-presence checks by the configuredMINER_CODING_AGENT_PROVIDER#5165 landed the provider-gating this depends on, this issue narrows the codex-specific message further.MINER_CODING_AGENT_PROVIDER === "codex-cli"andauth.jsonis missing or unreadable, the check now surfaces a specific, actionable remediation:found at <path> but auth.json is missing or expired — run \codex auth` to authenticate before attempts run`.found at <path> (not authenticated: run \codex auth`)`.ok's gating logic itself is untouched (owned entirely by Gatedoctor's claude/codex CLI-presence checks by the configuredMINER_CODING_AGENT_PROVIDER#5165) -- this is a message-quality refinement for the already-ok: true(CLI-present-but-unauthenticated) case, not a behavioral bug fix.Test plan
npx vitest run test/unit/miner-cli-doctor-checks.test.ts-- 20/20 passing, including 4 new cases: the codex-configured + auth-missing remediation message, the codex-configured + auth-present case (no remediation text), a different-provider-configured case keeping the generic message unchanged, and an invariant that the unconfigured-provider message shape never changes regardless ofauth.jsonstate.npm run typecheck-- clean.npm run build:miner-- clean (node --checkon every shipped miner lib file passes).npm run docs:drift-check-- clean.packages/gittensory-miner/**currently sits outside vitest'scoverage.includeglob (per the issue's own Codecov-visibility note), socodecov/patchcannot measure this change yet -- treating the tests above as the enforced house standard regardless, per the issue's instructions.npm run test:coveragelocally (shared/resource-contended machine); relying on the targeted test run above plusnpm run typecheck/build:miner.Fixes #5166.