Context
checkCodexCliPresent in packages/gittensory-miner/lib/laptop-init.js already stats auth.json for readability, but today it reports a generic advisory string regardless of whether codex-cli is actually the configured provider. Once the provider-gating issue in this batch lands, the check will be able to distinguish "configured and broken" from "not configured" — this issue narrows the codex-specific message further so operators get an actionable remediation instead of a vague aside.
Dependencies
Depends on the provider-gating issue in this same batch ("Gate doctor's claude/codex CLI-presence checks by the configured MINER_CODING_AGENT_PROVIDER") landing first — do not start until that ships, since this issue extends the same checkCodexCliPresent function's now-gated ok logic with a more specific message for the codex-configured-and-broken case.
Requirements
- Extend
checkCodexCliPresent so that when MINER_CODING_AGENT_PROVIDER === 'codex-cli' (per the now-landed gating) and auth.json is missing or unreadable, the reported message names the exact remediation step: run codex auth.
- The message text should mirror ORB's
codexAuthReadinessProbe messaging convention for consistency across the codebase.
- When codex-cli is not the configured provider, the check must retain its existing generic advisory behavior (no change to the unconfigured case's message).
- Do not introduce any new subprocess execution or network call — this only refines an already-existing filesystem-stat-based check's message text.
- Do not change the
ok boolean's gating logic itself — that is fully owned by the provider-gating issue this depends on; this issue only changes the message content for the already-gated failure case.
Deliverables / Acceptance Criteria
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 both the codex-configured/auth-missing case (asserting the exact "run codex auth" string appears) and the codex-configured/auth-present case (no remediation message), (2) an invariant test asserting the unconfigured-provider case's message never changes shape regardless of auth.json state, and (3) a regression test is not applicable since this is a message-quality refinement, not a behavioral 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 who has configured codex-cli as their coding-agent provider and whose codex auth has gone stale sees a precise "run codex auth" instruction in doctor output instead of a generic, unhelpful "not authenticated" note.
Links & Resources
- packages/gittensory-miner/lib/laptop-init.js (
checkCodexCliPresent)
- ORB's
codexAuthReadinessProbe messaging (self-host AI provider checks)
- See the provider-gating issue in this same batch (required dependency)
- Theme: Claude/Codex self-host operational parity
Context
checkCodexCliPresentin packages/gittensory-miner/lib/laptop-init.js already statsauth.jsonfor readability, but today it reports a generic advisory string regardless of whether codex-cli is actually the configured provider. Once the provider-gating issue in this batch lands, the check will be able to distinguish "configured and broken" from "not configured" — this issue narrows the codex-specific message further so operators get an actionable remediation instead of a vague aside.Dependencies
Depends on the provider-gating issue in this same batch ("Gate
doctor's claude/codex CLI-presence checks by the configuredMINER_CODING_AGENT_PROVIDER") landing first — do not start until that ships, since this issue extends the samecheckCodexCliPresentfunction's now-gatedoklogic with a more specific message for the codex-configured-and-broken case.Requirements
checkCodexCliPresentso that whenMINER_CODING_AGENT_PROVIDER === 'codex-cli'(per the now-landed gating) andauth.jsonis missing or unreadable, the reported message names the exact remediation step: runcodex auth.codexAuthReadinessProbemessaging convention for consistency across the codebase.okboolean's gating logic itself — that is fully owned by the provider-gating issue this depends on; this issue only changes the message content for the already-gated failure case.Deliverables / Acceptance Criteria
checkCodexCliPresentemits the specific "runcodex auth" remediation string when codex-cli is configured and auth.json is missing/unreadablecodexAuthReadinessProbeconventionTest 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 both the codex-configured/auth-missing case (asserting the exact "run
codex auth" string appears) and the codex-configured/auth-present case (no remediation message), (2) an invariant test asserting the unconfigured-provider case's message never changes shape regardless of auth.json state, and (3) a regression test is not applicable since this is a message-quality refinement, not a behavioral bug fix.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 who has configured codex-cli as their coding-agent provider and whose codex auth has gone stale sees a precise "run
codex auth" instruction indoctoroutput instead of a generic, unhelpful "not authenticated" note.Links & Resources
checkCodexCliPresent)codexAuthReadinessProbemessaging (self-host AI provider checks)