Skip to content

Feature: Project Bootstrap & Discovery (US-G1) #3

@flyingrobots

Description

@flyingrobots

User Story: US-G1 - As an operator, I want to provision the Stargate and make pushes transparent for developers.

Acceptance Criteria:

  • The .kv/policy.yaml file contains a stargate.push_url.
  • The git kv remote setup command exists and is executable.
  • When a developer runs git kv remote setup, it correctly reads the push_url from the policy file.
  • The command then correctly executes git config remote.origin.pushurl <url>.
  • The command provides clear output to the user confirming the action taken.
  • On GitHub, the refs/kv/* branches are configured as "protected" to block direct pushes (manual step, but should be documented).

Test Plan:

  • Success Case: Run git kv remote setup in a fresh clone and verify with git remote -v that the pushurl is set correctly.
  • Failure Case: Run the command when .kv/policy.yaml is missing or does not contain the push_url key; ensure a clear error is shown.
  • Idempotency: Run the command a second time and verify it either does nothing or correctly overwrites the existing pushurl without error.

Tasks

  • Create the initial git-kv CLI application structure in Go.
  • Implement a remote setup command within the CLI.
  • Implement YAML parsing logic to read the .kv/policy.yaml file.
  • Implement the git command execution to set the origin.pushurl config.
  • Add unit tests for the YAML parsing and command logic.
  • Add an integration test that runs git kv remote setup and checks the resulting git config.
  • Add documentation for the remote setup command to the README.md.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions