Skip to content

A star extension's flag cannot repeat: extension.yaml has no list type, so --repo A --repo B keeps the last #1062

Closed as not planned

Description

@David-Noble-at-work

Found 2026-10-19 planning NobleFactor/noblefactor-engprod#253 (lane 29 of #949), at 65c8b40f, where it blocks the lane. Ruled 2026-10-19 of the gh extension's --repo: "--repo is repeatable."

A star extension's flag cannot repeat. extension.yaml admits four flag types, bool, string, int and glob (cmd/star/extension/extension.go:162); defineFlags binds anything but bool and int as one string (cmd/star/star/root.go:621-647); collectFlagValues hands the script one string per flag (:584-608), and flagToStarlark makes it a starlark.String (cmd/star/extension/command.go:191-202). So star gh issues report --repo A --repo B keeps the last, and the extension splits commas out of one string instead, which noblefactor-ops#140's plan records as a workaround: "--repo comma-separated (no slice flag type in the spec)".

Resolution

extension.yaml admits a repeatable string flag, bound with cobra's StringArray and handed to the script as a Starlark list of strings, each occurrence one element, in order; its default is a list. 9-star-extensions.md documents the type, and a test proves --x a --x b reaches the script as ["a", "b"].

Plan and design documents

Kind Document
Plan Not yet opened
Design docs/architecture/9-star-extensions.md, § Extension Specification

Activity

  1. David-Noble-at-work commented on Oct 19, 2026

    @David-Noble-at-work
    ContributorAuthor

    Not planned as its own work. Ruled 2026-10-19: "Add the repeatable flag requirement to the unified configuration design requirements. We will design that later. For now, it is not repeatable." The requirement goes into docs/architecture/configuration.md, with the extension-flag questions, in devlore-cli's next pull request (NobleFactor/noblefactor-engprod#253's plan records it as owed). Lane 29 of #949 keeps --repo as it is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions