Skip to content

docs(miner): add coding-agent credential troubleshooting table (#5175) - #5451

Merged
loopover-orb[bot] merged 2 commits into
JSONbored:mainfrom
andriypolanski:docs/miner-credential-troubleshooting-5175
Jul 12, 2026
Merged

docs(miner): add coding-agent credential troubleshooting table (#5175)#5451
loopover-orb[bot] merged 2 commits into
JSONbored:mainfrom
andriypolanski:docs/miner-credential-troubleshooting-5175

Conversation

@andriypolanski

Copy link
Copy Markdown
Contributor

Summary

  • Adds a "Recognizing a stale or missing coding-agent credential" table to packages/gittensory-miner/README.md, mapping each credential/auth failure string the CLI-subprocess driver emits to a plain-language symptom and a concrete remediation.
  • Covers the three required failure modes, each sourced verbatim from shipped packages/gittensory-engine/src/miner/cli-subprocess-driver.ts (no invented strings): the Claude Code error-envelope case (claude_code_error_<status>, Parse Claude Code's JSON error envelope into actionable diagnostics in the CLI-subprocess driver #5168), the Codex auth-failure case (codex_no_auth, Parse Codex's JSONL stdout for its real error object in the CLI-subprocess driver #5169), and the generic non-zero-exit fallback (<command>_exit_<code>).
  • Mirrors ORB's hosted-side troubleshooting table in apps/gittensory-ui/src/routes/docs.self-hosting-ai-providers.tsx for cross-doc consistency (error string / symptom / remediation columns).
  • Adds a drift-guard unit test asserting every error string in the README table is backed by a literal constant in the driver source, so the docs cannot silently drift from the code.

Closes #5175.

Scope

  • The PR title follows type(scope): short summary Conventional Commit format, for example fix(api): restore profile access checks.
  • This PR is focused and does not mix unrelated backend, UI, MCP, docs, dependency, and deploy changes.
  • This follows CONTRIBUTING.md and does not reintroduce GitHub Pages, VitePress, site/, or CNAME.
  • I linked a currently open issue this PR resolves (e.g. Closes #123) — a linked open issue is required for every contributor PR.

Validation

  • git diff --check
  • npm run actionlint
  • npm run typecheck
  • npm run test:coverage locally; codecov/patch requires ≥99% coverage of the lines AND branches you changed (aim for 100% on your diff so CI variance does not fail near the threshold). Global coverage is a non-blocking trend with a loose 90% backstop, not the gate.
  • npm run test:workers
  • npm run build:mcp
  • npm run test:mcp-pack
  • npm run ui:openapi:check
  • npm run ui:lint
  • New or changed behavior has unit/integration tests for new branches, fallback paths, and sanitizer boundaries

If any required check was skipped, explain why:

Safety

  • No secrets, wallet details, hotkeys, coldkeys, user PATs, private keys, raw trust scores, private rankings, or private maintainer evidence are exposed.
  • Public GitHub text stays sanitized, low-noise, and does not imply compensation guarantees or optimization tactics.
  • Auth, cookie, CORS, GitHub App, Cloudflare, or session changes include negative-path tests.
  • API/OpenAPI/MCP behavior is updated and tested where needed.
  • UI changes use live API data or real empty/error/loading states, not production mock/demo fallbacks.
  • Visible UI changes include a UI Evidence section below with JPG/JPEG or PNG screenshots arranged as organized, captioned, clickable thumbnails. SVG screenshots are not used as review evidence. Review-only screenshots or recordings are not committed to the repository.
  • Public docs/changelogs are updated where needed; changelogs are only edited for release-prep PRs.

UI Evidence

Not applicable — this change edits a package README (Markdown docs), not the web UI. No rendered frontend surface changed.

Notes

  • Every row's error string is verifiable against shipped source: claude_code_error_ and the ${command}_exit_ template are emitted by createCliSubprocessCodingAgentDriver, and codex_no_auth: auth.json missing or expired -- run \codex auth` to authenticateis the exact Codex no-auth string. The Claude row also cross-references thegittensory-miner doctor not authenticated: set CLAUDE_CODE_OAUTH_TOKEN check (packages/gittensory-miner/lib/laptop-init.js`).

@andriypolanski
andriypolanski marked this pull request as draft July 12, 2026 19:53
@superagent-security

Copy link
Copy Markdown
Contributor

Superagent didn't find any vulnerabilities or security issues in this PR.

@loopover-orb loopover-orb Bot added the gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier. label Jul 12, 2026
@loopover-orb

loopover-orb Bot commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

Tip

🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩

✅ Gittensory review result - approve/merge recommended

Review updated: 2026-07-12 20:07:10 UTC

2 files · 2 AI reviewers · no blockers · readiness 100/100 · CI green · clean

✅ Suggested Action - Approve/Merge

  • safe to merge

Review summary
This is a documentation-only PR that adds a credential-troubleshooting table to the miner README, mapping the three CLI-subprocess driver error strings (`claude_code_error_<status>`, `codex_no_auth`, `<command>_exit_<code>`) to symptoms and remediations, plus a drift-guard test that parses the README table and asserts each first-column token is backed by a literal stem in `cli-subprocess-driver.ts`. The diff is well-scoped, closes the linked issue #5175, and mirrors the existing hosted-side troubleshooting table pattern for consistency. The drift-guard test is a reasonable idea (docs↔code linkage) though it only checks a substring appears anywhere in the driver file rather than that the string is actually emitted as an error value, so it wouldn't catch e.g. the stem appearing only in a comment.

Nits — 5 non-blocking
  • test/unit/miner-credential-troubleshooting-readme.test.ts: the drift guard checks `driverSrc.toContain(stem)`, which passes if the stem appears anywhere in the file (e.g., a comment or unrelated string) rather than confirming it's actually part of an emitted error value — a regex anchored to the actual error-construction site would be a tighter guard.
  • packages/gittensory-miner/README.md: the relative link `../../apps/gittensory-ui/src/routes/docs.self-hosting-ai-providers.tsx` points at a `.tsx` route file rather than rendered docs — worth confirming that's the intended cross-reference target rather than a rendered docs URL.
  • Consider tightening the driver-source assertion in the test to match the stem within a template-literal/string-construction context (e.g. a regex like `` `${stem}[\w<>]*`` near an `error =` assignment) so the guard can't be satisfied by a stray comment mention.
  • If the hosted-side table (docs.self-hosting-ai-providers.tsx) ever changes its column headers or structure, consider a similar drift note or shared fixture so the two tables don't silently diverge in format.
  • nit: test/unit/miner-credential-troubleshooting-readme.test.ts:67 describes a literal driver constant invariant, but the placeholder-stripped check for `<command>_exit_<code>` only asserts the broad substring `_exit_`, so it is weaker than the comment and test name imply.
Signal Result Evidence
Code review ✅ No blockers 2 reviewers, synthesized
Linked issue ✅ Linked #5175
Related work ✅ No active overlap found No same-issue or scoped active PR overlap found.
Change scope ✅ 20/20 Low review scope from cached public metadata (1 linked issue).
Validation posture ✅ 25/25 PR body includes validation/test evidence.
Contributor workload ✅ 10/10 Author activity: 155 registered-repo PR(s), 104 merged, 29 issue(s).
Contributor context ✅ Confirmed Gittensor contributor andriypolanski; Gittensor profile; 155 PR(s), 29 issue(s).
Gate result ✅ Passing No configured blocker found.
Improvement ⚠️ ℹ️ Insufficient signal risk: clean · value: insufficient-signal — Nothing measurable for the structural-improvement analyzers on this PR (e.g. no code files changed). LLM value judgment: minor — The change is narrow but useful because it turns three opaque provider failure tokens into actionable remediation steps and adds a small guard against documentation drift.
Review context
  • Author: andriypolanski
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: not available
  • Official Gittensor activity: 155 PR(s), 29 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Keep the PR focused and include validation evidence before maintainer review.
Signal definitions
  • Related work = same linked issue, overlapping active PRs, or title/path similarity.
  • Change scope = cached public metadata such as size labels, draft state, and review-burden hints.
  • Validation posture = whether the PR provides enough public validation/test evidence for maintainer review.
  • Contributor workload = public contributor activity and cleanup pressure, not a repo-wide quality failure.
  • Contributor context = public GitHub/Gittensor identity context; non-Gittensor status is not a blocker.
[BETA] Chat with Gittensory

Ask 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.

  • @gittensory ask &lt;question&gt; answers contribution-quality Q&A with source citations and freshness.
  • @gittensory chat &lt;question&gt; answers in natural prose from cached decision-pack facts via local inference (maintainer/collaborator; read-only).
  • A plain-language @gittensory mention with a real question is routed to the closest matching read-only command automatically -- no exact syntax required.

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.

  • Re-run Gittensory review

@codecov

codecov Bot commented Jul 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.46%. Comparing base (e0c1000) to head (24c69cf).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5451   +/-   ##
=======================================
  Coverage   94.46%   94.46%           
=======================================
  Files         554      554           
  Lines       44438    44438           
  Branches    14663    14663           
=======================================
  Hits        41979    41979           
  Misses       1784     1784           
  Partials      675      675           
Flag Coverage Δ
shard-1 43.86% <ø> (-0.25%) ⬇️
shard-2 34.89% <ø> (+0.02%) ⬆️
shard-3 31.65% <ø> (+0.06%) ⬆️
shard-4 31.20% <ø> (-0.21%) ⬇️
shard-5 32.88% <ø> (-0.39%) ⬇️
shard-6 43.90% <ø> (+0.53%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@andriypolanski
andriypolanski marked this pull request as ready for review July 12, 2026 20:00

@loopover-orb loopover-orb Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gittensory approves — the gate is satisfied and CI is green.

@loopover-orb
loopover-orb Bot merged commit 86c143c into JSONbored:main Jul 12, 2026
16 checks passed
@andriypolanski
andriypolanski deleted the docs/miner-credential-troubleshooting-5175 branch July 16, 2026 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a 'recognizing a stale or missing coding-agent credential' troubleshooting table to the miner docs

2 participants