fix(miner): add optional token verification to init - #5422
Conversation
|
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 #5422 +/- ##
=======================================
Coverage 94.40% 94.41%
=======================================
Files 550 550
Lines 44119 44166 +47
Branches 14632 14632
=======================================
+ Hits 41652 41699 +47
Misses 1792 1792
Partials 675 675
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 18:23:30 UTC
✅ Suggested Action - Approve/Merge
Review summary Nits — 5 non-blocking
Linked issue satisfactionAddressed 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
Add an opt-in
--verify-tokenflag togittensory-miner initthat makes one authenticated GitHub API call, reports the returned scopes on success, and fails fast on invalid or under-scoped tokens. Defaultinitbehavior is unchanged when the flag is omitted.Closes #5171.
Supersedes #5419.
Scope
type(scope): short summaryConventional Commit format.CONTRIBUTING.mdand does not reintroduce GitHub Pages, VitePress,site/, orCNAME.Closes #5171).Validation
git diff --checknpm run build --workspace @jsonbored/gittensory-enginenpm run typechecknpm run test -- test/unit/miner-init-verify-token.test.ts test/unit/miner-laptop-init.test.tsx-oauth-scopesheadernpm run actionlintnpm run test:coveragenpm run test:workersnpm run build:mcpnpm run test:mcp-packnpm run ui:openapi:checknpm run ui:lintnpm run ui:typechecknpm run ui:buildnpm audit --audit-level=moderateIf any required check was skipped, explain why:
Safety
Notes
doctorremains untouched and still makes no network calls.initonly performs a GitHub request when--verify-tokenis passed.x-oauth-scopeshandling now distinguishes an omitted header from an explicitly empty one and rejects the latter.