Skip to content

chore(miner): remove dead parseJsonFlag from portfolio-queue-cli#6198

Merged
JSONbored merged 1 commit into
JSONbored:mainfrom
dhgoal:chore/remove-dead-parse-json-flag
Jul 15, 2026
Merged

chore(miner): remove dead parseJsonFlag from portfolio-queue-cli#6198
JSONbored merged 1 commit into
JSONbored:mainfrom
dhgoal:chore/remove-dead-parse-json-flag

Conversation

@dhgoal

@dhgoal dhgoal commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Summary

Closes #6164

  • Removes parseJsonFlag from packages/loopover-miner/lib/portfolio-queue-cli.js (was lines 28-49). It was never called and never exported — every subcommand uses the real parsers instead (parseQueueListArgs / parseQueueNextArgs / parseRepoIdentifierArgs / parseQueueClaimBatchArgs).
  • As the issue notes, it duplicated the --dry-run/--json parsing loop and carried the same #4847 comment verbatim as parseRepoIdentifierArgs, which is what marks it as a superseded early draft that was never deleted.
  • Deletion-only: 1 file, -23 lines, no behavior change.

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
  • npm run ui:typecheck
  • npm run ui:build
  • npm audit --audit-level=moderate
  • New or changed behavior has unit/integration tests for new branches, fallback paths, and sanitizer boundaries

If any required check was skipped, explain why:

  • Ran the directly affected suites with vitest, all unmodified and green: miner-portfolio-queue-cli + miner-plan-store-cli (44 tests), plus miner-portfolio-queue, miner-portfolio-queue-manager, miner-portfolio-queue-expiry, miner-portfolio-queue-crash-recovery, portfolio-queue (83 tests) — 127 total.
  • Verified repo-wide (grep -rn parseJsonFlag) that the removed function had zero callers. plan-store-cli.js defines its own separate module-scoped parseJsonFlag that is still used at its line 55; that one is deliberately left untouched.
  • This is a deletion-only diff that adds no lines, so there is no new code for codecov/patch to measure. The UI/MCP/workers suites are untouched by this change; leaving them to CI.

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.

No auth/API/UI/docs surface is touched — this only deletes unreachable code.

Notes

Closes #6164

parseJsonFlag was defined in portfolio-queue-cli.js but never called and
never exported. Every subcommand uses the real parsers instead
(parseQueueListArgs, parseQueueNextArgs, parseRepoIdentifierArgs,
parseQueueClaimBatchArgs), which is why it carried the same JSONbored#4847 comment
verbatim as parseRepoIdentifierArgs -- a superseded early draft that was
never deleted.

Verified repo-wide that it has zero callers. plan-store-cli.js defines its
own separate module-scoped parseJsonFlag that is still in use and is left
untouched.

Closes JSONbored#6164
@dhgoal dhgoal requested a review from JSONbored as a code owner July 15, 2026 21:12
@superagent-security superagent-security Bot added the contributor:flagged Contributor flagged for review by trust analysis. label Jul 15, 2026
@superagent-security

Copy link
Copy Markdown
Contributor

🚨 Contributor flagged. Click here for more info: Superagent Dashboard

@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:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jul 15, 2026
@loopover-orb

loopover-orb Bot commented Jul 15, 2026

Copy link
Copy Markdown

Warning

🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨

⏸️ LoopOver review result - manual review recommended

Review updated: 2026-07-15 23:07:23 UTC

1 file · 1 AI reviewer · no blockers · readiness 80/100 · CI green · unstable

⏸️ Suggested Action - Manual Review

Review summary
This is a clean deletion-only PR that removes an unused, unexported `parseJsonFlag` function from portfolio-queue-cli.js. The function is confirmed dead code — it duplicates parsing logic already handled by `parseQueueListArgs`/`parseQueueNextArgs`/`parseRepoIdentifierArgs`/`parseQueueClaimBatchArgs`, and even carries a stale `#4847` comment copy-pasted from another file. No callers reference it, so removal is behavior-neutral.

Nits — 4 non-blocking
  • The PR description does not include a `Closes #NNN` link to the required open issue, only a reference to 'the issue' without a number — this repo's contribution rules require a linked open issue for every contributor PR.
  • Add the explicit `Closes #NNN` reference in the PR description to satisfy the issue-link requirement.
  • Since this is dead-code removal, no new tests are needed, but confirm no other file (e.g. a test fixture) imports `parseJsonFlag` before merging.
  • Code changes lack test evidence — Add focused regression tests or explain why existing coverage is sufficient.
Flagged checks (non-blocking)
  • Contributor trust — Contributor flagged for review
Signal Result Evidence
Code review ✅ No blockers 1 reviewer
Linked issue ✅ Linked #6164
Related work ⚠️ 2 scoped overlaps Top overlaps are listed below; lower-confidence bulk is hidden.
Change scope ❌ 8/20 High 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: 110 registered-repo PR(s), 57 merged, 34 issue(s).
Contributor context ✅ Confirmed Gittensor contributor dhgoal; Gittensor profile; 110 PR(s), 34 issue(s).
Gate result ✅ Passing No configured blocker found.
Improvement ℹ️ None detected risk: low · value: none
Review context
Contributor next steps
  • Start here: Review top overlaps.
  • Then work through the remaining 2 steps in the Signals table above.
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.
🧪 Chat with LoopOver

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

  • @loopover ask <question> answers contribution-quality Q&A with source citations and freshness.
  • @loopover chat <question> answers in natural prose from cached decision-pack facts via local inference (maintainer/collaborator; read-only).
  • A plain-language @loopover 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/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.

  • Re-run LoopOver review

@loopover-orb loopover-orb Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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

@JSONbored JSONbored merged commit df44752 into JSONbored:main Jul 15, 2026
8 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contributor:flagged Contributor flagged for review by trust analysis. gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

chore(miner): remove dead parseJsonFlag in portfolio-queue-cli.js (superseded early draft never deleted)

2 participants