fix(miner): fail fast instead of hanging when init --interactive has no TTY#6907
Conversation
…no TTY init --interactive's first prompt blocks forever on a stdin that can never receive a real line of input -- a plain `ssh host "loopover- miner init --interactive"` with no allocated pty, or any other no-TTY/CI invocation, previously just hung until something external killed the process. createWizardIo now exposes isInteractive (the real input stream's own isTTY), and runInteractiveInit checks it before issuing any prompt: a non-interactive io fails fast with a clear message pointing at the env-var-only setup path (GITHUB_TOKEN, MINER_CODING_AGENT_PROVIDER, ANTHROPIC_API_KEY/OPENAI_API_KEY) recommended for unattended/fleet deployments, then loopover-miner doctor to verify -- matching #6845's recommendation. Closes #6846
|
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 #6907 +/- ##
=======================================
Coverage 93.70% 93.70%
=======================================
Files 685 685
Lines 68298 68306 +8
Branches 18719 18719
=======================================
+ Hits 63999 64007 +8
Misses 3302 3302
Partials 997 997
Flags with carried forward coverage won't be shown. Click here to find out more.
|
|
Tip ✅ LoopOver review result - approve/merge recommendedReview updated: 2026-07-17 12:24:54 UTC
Review summary Nits — 4 non-blocking
Decision drivers
Context & advisory signals — never blocks the verdict
Review context
Contributor next steps
Signal definitions
🧪 Chat with LoopOverAsk LoopOver 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://loopover.ai/docs/loopover-commands 🧪 Experimental — new and may change. 🟩 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 LoopOver, a quiet PR intelligence layer for OSS maintainers.
|
Summary
init --interactive's first prompt previously blocked forever on a stdin that can never receive a real line of input — a plainssh host "loopover-miner init --interactive"with no allocated pty, or any other no-TTY/CI invocation, just hung until something external killed the process. Confirmed directly during Verify + document AMS's standalone usage end-to-end against a real, non-gittensor GitHub repo #6205's live verification.createWizardIonow exposesisInteractive(the real input stream's ownisTTY), andrunInteractiveInitchecks it before issuing any prompt: a non-interactiveiofails fast with a clear message pointing at the env-var-only setup path (GITHUB_TOKEN,MINER_CODING_AGENT_PROVIDER,ANTHROPIC_API_KEY/OPENAI_API_KEY) recommended for unattended/fleet deployments per AMS credentials: decide the recommended default (subscription OAuth vs API key) for claude-cli and codex-cli #6845, thenloopover-miner doctorto verify.Closes #6846
Test plan
npm run test:ci— full local gate greenrunInteractiveInitcheck andcreateWizardIo's real-adapterisInteractivedetection)