Skip to content

fix(miner): registerPortfolioChatActions is a fully-tested, fully-orphaned duplicate of the live portfolio chat-action registration #8640

Description

@JSONbored

⚠️ Definition of Done: this issue must be completed in full, in a single PR. Do not split this
work across multiple PRs, and do not defer any Deliverable below to a follow-up issue. A PR that
satisfies only some of the Deliverables, stubs a required test, or leaves a checkbox
partially-done does NOT resolve this issue and will be closed.

Context

packages/loopover-miner/lib/chat-action-registry.ts's header documents three "child issues" that
register chat actions into the shared chatActionRegistry singleton: portfolio release/requeue,
governor pause/resume, and discover/attempt. The governor and discover/attempt registrations are
genuinely wired into apps/loopover-miner-ui (via vite-chat-governor-actions.ts /
vite-chat-discover-attempt-actions.ts and their matching src/lib/*.ts client modules).

The portfolio registration is not. packages/loopover-miner/lib/chat-portfolio-actions.ts
(introduced by commit 61202e332, PR #6838/#6850, 2026-07-17) exports
registerPortfolioChatActions, which registers action names portfolio_release /
portfolio_requeue onto the shared registry. Grepping the entire repo shows this function is
called from nowhere except its own isolated unit test
(test/unit/miner-chat-portfolio-actions.test.ts).

The reason: portfolio release/requeue chat actions were already shipped a day earlier by commit
60be628ad (PR #6586, 2026-07-16), directly in
apps/loopover-miner-ui/src/lib/chat-portfolio-queue-actions.ts and
apps/loopover-miner-ui/src/lib/chat-portfolio-queue-resolve.ts, registering different action-name
strings (portfolio.release / portfolio.requeue — dots, not underscores) straight onto the same
shared registry. chat-portfolio-actions.ts is a fully-implemented, fully-tested, but completely
orphaned duplicate that never reaches a real chat request.

Requirements

  • Confirm (as part of the PR body, citing the grep) that registerPortfolioChatActions,
    PORTFOLIO_RELEASE_CHAT_ACTION, and PORTFOLIO_REQUEUE_CHAT_ACTION (all exported from
    packages/loopover-miner/lib/chat-portfolio-actions.ts) have zero non-test callers anywhere in
    the repo.
  • Delete packages/loopover-miner/lib/chat-portfolio-actions.ts and its test file
    test/unit/miner-chat-portfolio-actions.test.ts in full, since the real, live implementation
    already exists at apps/loopover-miner-ui/src/lib/chat-portfolio-queue-actions.ts /
    chat-portfolio-queue-resolve.ts under the portfolio.release / portfolio.requeue action
    names.
  • Update chat-action-registry.ts's header comment, which currently claims three child issues
    register in from packages/loopover-miner, to accurately describe that portfolio release/requeue
    registration lives in apps/loopover-miner-ui instead.
  • Do not touch chat-governor-actions.ts or the discover/attempt registration — both are correctly
    wired and out of scope for this issue.

Deliverables

  • packages/loopover-miner/lib/chat-portfolio-actions.ts and
    test/unit/miner-chat-portfolio-actions.test.ts are deleted.
  • A new regression test (in the existing apps/loopover-miner-ui chat-action test suite)
    asserting that portfolio_release/portfolio_requeue (the underscore action-name variant)
    are NOT registered anywhere, so a future reintroduction of the duplicate module would be
    caught immediately.
  • chat-action-registry.ts's header comment is corrected to name the real location of the
    portfolio release/requeue registration.
  • Full repo build + npm run test:ci still pass with the module removed (proving nothing else
    imported it).

All Deliverables above are required in the same PR.

Test Coverage Requirements

Deleting the dead module removes its own 100%-covered test file; the new regression test above is
the coverage addition this issue requires (packages/loopover-miner/** is measured by
codecov/patch, but a deletion-plus-new-assertion PR should net-neutral or improve patch coverage
since no new source lines are added beyond the registry-absence assertion and comment fix).

Expected Outcome

There is exactly one implementation of portfolio release/requeue chat actions in the repo (the live
one in apps/loopover-miner-ui), and chat-action-registry.ts's header accurately reflects where
each of its three documented child registrations actually lives.

Links & Resources

Metadata

Metadata

Assignees

No one assigned

    Labels

    gittensor:bugGittensor-scored bug fix — scores a 0.05x multiplier.gittensor:priorityMaintainer-selected Gittensor priority — scores a 1.5x multiplier.help wantedExtra attention is needed

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions