Skip to content

Full Go/Cobra port of sumctl to replace the Python CLI (owner-directed, supersedes #38/#39 prototype scope) #94

Description

@douglasjarquin

Decision

Owner (douglasjarquin) has decided to proceed with a full Go/Cobra port of sumctl, replacing the Python implementation as the production CLI. This is separate from and does not reopen #38/#39: those issues correctly closed a bounded, benchmark-gated prototype whose measured surface did not clear the adoption gate (see PR #90, benchmarks/issue-38/report.md). PR #90 stays open on its own merits and is not touched by this issue.

This issue authorizes what #38 explicitly said not to do by default: translate the full sumctl.py (and its lib/ modules) into Go, not just the previously measured narrow surface.

Scope

  • Full command-for-command parity port of sumctl (all subcommands currently in bin/sumctl / lib/sumctl.py and its lib/ modules) to Go using Cobra, per the roadmap's Roadmap: reliability first, independently usable feature tracks, and direct Remainder integration #29 Go/Cobra decision (spf13/cobra, no Viper, no second parser).
  • Exact behavior parity: command paths/names, flags (including leading-dash values, repeated options, global vs local flags, --), aliases, help text, stdout/JSON shapes, exit codes, env/settings precedence.
  • Domain/state/Herdr logic must not depend on cobra.Command — small ordinary Go functions own operations, consistent with Build the Sum-owned Herdr Mesh builtin in Go with Cobra, preserving CLI and MCP contracts #41's Mesh builtin split.
  • Differential testing against the frozen Python reference revision: outputs, filesystem/Git/Herdr side effects, state/brief/evidence formats, role/instance/occupant checks, locking/atomic writes, subprocess argv, cancellation/timeouts.
  • Reuse the existing benchmarks/issue-38/ measurements and in-repo Go module scaffolding where still applicable; do not repeat Measure actual hot-path costs before choosing any Sum rewrite #37's measurement work merely to re-justify the language choice — this issue's authorization comes from the owner, not a new benchmark gate.
  • Preserve worker verification → independent root verification → human review → human merge. No installation update, default binary switch, or fleet restart as part of this issue; that is Conditionally roll out the Go/Cobra helper surface with known-good rollback #39-equivalent rollout, tracked separately once parity is demonstrated.
  • Unported edge cases must be explicitly listed rather than silently dropped.

Out of scope

References

Roadmap: #29 (Go/Cobra implementation decision, section 3 and section 6).
Prior bounded prototype and no-go: #38, #39, PR #90.

Activity

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions