feat(miner): add gittensory-miner init --interactive onboarding wizard - #5624
feat(miner): add gittensory-miner init --interactive onboarding wizard#5624JSONbored wants to merge 1 commit into
Conversation
Adds an opt-in --interactive flag to `init` that prompts for a masked GITHUB_TOKEN and a coding-agent provider (with provider-specific model/timeout follow-ups), writes a starter .env to the state dir, and reruns doctor so the operator immediately sees whether the config passes. Plain `init` is untouched. Also fixes a real bug caught while manually verifying the CLI end-to-end: piped/non-TTY stdin can deliver multiple answers in a single data chunk, which an earlier version of the prompt reader silently dropped past the first newline.
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
loopover-ui | 84f669e | Commit Preview URL Branch Preview URL |
Jul 13 2026, 12:44 PM |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5624 +/- ##
==========================================
+ Coverage 95.01% 95.02% +0.01%
==========================================
Files 575 575
Lines 45738 45837 +99
Branches 14661 14661
==========================================
+ Hits 43459 43558 +99
Misses 1528 1528
Partials 751 751
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
|
Warning 🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 ⏸️ LoopOver review result - manual review recommendedReview updated: 2026-07-13 17:22:27 UTC
⏸️ Suggested Action - Manual Review Review summary Nits — 6 non-blocking
Concerns raised — review before merging
📋 Copy for AI agents — paste into your coding agent
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 LoopOver, a quiet PR intelligence layer for OSS maintainers.
|
Summary
--interactiveflag togittensory-miner init: prompts for a maskedGITHUB_TOKENand a coding-agent provider (claude-cli/codex-cli/agent-sdk/noop) from an explicit menu, with provider-specific model/timeout follow-ups (skippable via a blank line)..envin the state dir (mode0600), not auto-loaded by the CLI itself — mirrors the existing systemdEnvironmentFile=/.gittensory-miner.env.exampleconvention already documented for fleet mode.doctorafter a successful interactiveinitso the operator immediately sees whether the new config passes, reusingdoctor's existing check list/output formatting rather than duplicating it.init(no flag) is untouched — verified via a dedicated regression test asserting identical output and zero interaction with the injected input/output streams.Along the way
Manually running the real CLI end-to-end with piped stdin (
printf 'token\n1\n...' | gittensory-miner init --interactive) surfaced a real bug the mocked unit tests hadn't caught: a piped/non-TTY stdin can deliver several answers in a singledatachunk (no "one keystroke per event" guarantee the way a raw-mode TTY has), and the first version of the prompt reader discarded everything after the first prompt's newline, silently dropping the next prompt's answer and hanging forever. Fixed by threading a small per-wizard-run leftover buffer through the prompt reader, with new regression tests covering both the single-chunk and keystroke-by-keystroke delivery shapes.Test plan
npm run typechecknpm run build:miner/npm run test:miner-packtest/unit/miner-init-interactive.test.ts(26 cases): happy path, re-prompt-on-invalid-input for both the token and provider menu, provider-specific companion prompts (present/skippable), masking/backspace/raw-mode-toggle behavior, Ctrl+C abort, the piped-chunk and partial-leftover regressions, the never-echoed-token invariant, and the non-interactive byte-for-byte regressionbin/gittensory-miner.jswith piped stdin, confirming the fix, the.envfile contents/perms, and the automaticdoctorrerun (including a realFAILsurfacing correctly with exit code 1)Closes #5176