Skip to content

bug(pr_create): GitLab adapter uses unsupported '-F' flag — caller can't tell if MR was created #422

@bakeb7j0

Description

@bakeb7j0

Summary

mcp__sdlc-server__pr_create's GitLab adapter invokes glab with the -F shorthand flag, but glab does not accept -F for mr create (or mr view). The tool returns: glab mr view failed: unknown shorthand flag: 'F' in -F.

Environment

  • Where observed: mcp__sdlc-server__pr_create({base, head, title, body}) against an analogicdev/internal/tools/wellofsouls MR (Wave 2 Plan feat(wave-mcp): implement flight_overlap + lib/flight_overlap #74), 2026-05-06
  • glab version: local glab does not accept -F (verified by inspecting the error and glab mr create --help flags — body is passed via --description, not -F)

Steps to Reproduce

  1. Call mcp__sdlc-server__pr_create({base: "<base>", head: "<head>", title: "...", body: "<long body>"}) against a GitLab project.
  2. Observe: {"ok": false, "error": "glab mr view failed: unknown shorthand flag: 'F' in -F\n\nUsage: glab mr view {<id> | <branch>} [flags]\n..."}

Curiously the error names glab mr view, not glab mr create — suggests the adapter creates the MR successfully then tries to query it back via glab mr view -F ... (or similar) and fails on that follow-up. In my reproduction, MR !70 was actually created on the GitLab side despite the error response. The adapter's failure surface is misleading: caller treats it as a creation failure when the MR actually exists.

Expected Behavior

  • pr_create returns {ok: true, number, url, ...} for successfully-created MRs.
  • The body argument flows through to glab mr create --description <text> (the canonical glab flag).

Actual Behavior

  • Adapter shells glab with -F somewhere in the chain; glab rejects.
  • MR may already be created; caller can't tell.

Severity

severity::major/wavemachine's gate flow depends on pr_create to open the kahuna→base MR. Workaround is direct glab mr create --description "$(cat body.md)" from the orchestrator's Bash tool, but that bypasses the MCP layer entirely and the wave-pattern's idempotency / structured-return contract.

Workaround

Skip pr_create; use Bash + glab directly:

glab mr create \
  --source-branch <head> \
  --target-branch <base> \
  --title "<title>" \
  --description "$(cat body.md)" \
  --no-editor

Acceptance Criteria

  • pr_create against GitLab succeeds and returns a properly populated {ok: true, number, url, state, head, base}.
  • No -F shorthand in the glab invocation; use --description (or --body-file if glab gains it).
  • If the adapter does an mr view follow-up to populate the response, that call also avoids unsupported flags.
  • Regression test: pr_create against a GitLab fixture project returns the expected normalized envelope.

Dependencies

  • None.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions