Skip to content

REST + CLI mirror for loopover_propose_action #6744

Description

@JSONbored

Context

The MCP tool loopover_propose_action (src/mcp/server.ts:2502, via proposeAction at src/mcp/server.ts:4109-4137) stages a new pending agent action for later maintainer approval (never auto-executes) via createPendingAgentActionIfAbsent. REST already has the accept/reject side (POST /v1/repos/:owner/:repo/agent/pending-actions/:id/:decision) and the list side (GET .../agent/pending-actions), both CLI-mirrored, but no REST route exists to CREATE a new staged action, and no maintain propose CLI subcommand exists.

Requirements

  • Add POST /v1/repos/:owner/:repo/agent/pending-actions in src/api/routes.ts, requireRepoManageAccess/requireRepoWriteAccess-gated, calling createPendingAgentActionIfAbsent with the head-SHA pinning proposeAction already does (src/mcp/server.ts:4118-4127).
  • Add maintain propose <action-class> <pull-number> [--reason ...] CLI subcommand.

Deliverables

  • POST /v1/repos/:owner/:repo/agent/pending-actions route
  • maintain propose CLI subcommand
  • Unit test

Test Coverage Requirements

99%+ Codecov patch coverage on every changed line and branch in the new route/tool/CLI code, plus a test asserting output parity between the mirrored surfaces for identical input.

Expected Outcome

A new pending agent action can be staged over REST/CLI, completing the create/list/decide trio that only had list/decide before.

Links & Resources

Precedent: the sibling decision route/CLI pair (src/api/routes.ts:2593, loopover-mcp.js:2753-2760).

Metadata

Metadata

Assignees

No one assigned

    Labels

    gittensor:featureGittensor-scored feature linked to a feature issue — scores a 0.25x multiplier.help wantedExtra attention is needed

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions