Skip to content

feat: enable uds cli next mode - #1463

Merged
joelmccoy merged 6 commits into
mainfrom
wire-up-next-command
Aug 21, 2026
Merged

joelmccoy merged 6 commits into
mainfrom
wire-up-next-command

Conversation

@joelmccoy

@joelmccoy joelmccoy commented Aug 20, 2026 •

Copy link
Copy Markdown
Member

Description

Enables UDS CLI Next mode. Also enables the unit tests.

Related Issue

Relates to CLI-263

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Other (security config, docs update, etc)

Checklist before merging

@joelmccoy
joelmccoy requested a review from a team as a code owner August 20, 2026 19:29
Copilot AI lite review requested due to automatic review settings August 20, 2026 19:29
@joelmccoy joelmccoy changed the title feat: wire up uds cli next commands feat: enable uds cli next mode Aug 20, 2026
bradclawsie
bradclawsie previously approved these changes Aug 20, 2026
@greptile-apps

greptile-apps Bot commented Aug 20, 2026 •

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR enables Next mode while retaining legacy non-bundle commands and updates Zarf argument forwarding and feature resolution. It also broadens unit-test coverage and repairs the preparation task dependency.

  • Enables the Next CLI root command behind NextMode.
  • Reconstructs Zarf arguments from Cobra-resolved arguments.
  • Runs unit tests across all command, internal, and package trees.
  • Updates preparation to invoke the existing unit task directly.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains; the previously reported dangling legacy:unit dependency is fixed because preparation now invokes the defined unit task and no references to the removed task remain.

Important Files Changed

Filename Overview
cmd/uds/main.go Enables the Next CLI root and attaches legacy non-bundle commands.
internal/cli/zarf/zarf.go Forwards Cobra-resolved arguments to the vendored Zarf CLI.
internal/mode/mode.go Recognizes the nested tools zarf command when placing Zarf feature arguments.
tasks/tests.yaml Broadens unit-test coverage and fixes preparation to reference the existing unit task.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  Default[default task] --> Test[test task]
  Test --> Preparation[test:preparation]
  Preparation --> Unit[unit]
  Preparation --> Architecture[architecture]
Loading

Reviews (2): Last reviewed commit: "fix: command propogation with zarf" | Re-trigger Greptile

Comment thread tasks/tests.yaml Resolved

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR enables the β€œNext” mode in uds by wiring the entrypoint to the new CLI root command when the NextMode feature flag is enabled, and broadens the unit test task to run across all Go packages.

Changes:

  • Enable mode.Next in cmd/uds/main.go by constructing the Next CLI root command with iostreams.
  • Update the unit test task to run go test across cmd, internal, and pkg package trees.
  • Update cmd/uds/main_test.go to assert run() succeeds when NextMode=true is provided via --features.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
tasks/tests.yaml Expands unit test scope and removes the legacy:unit task alias.
cmd/uds/main.go Enables Next-mode CLI root command creation and execution.
cmd/uds/main_test.go Updates tests to validate Next-mode execution succeeds.

πŸ’‘ Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread tasks/tests.yaml Resolved

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

πŸ’‘ Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 10081b92d6

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with πŸ‘.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread cmd/uds/main.go Resolved
Comment thread cmd/uds/main.go Resolved
Comment thread tasks/tests.yaml Resolved
Comment thread cmd/uds/main.go Resolved
@joelmccoy

Copy link
Copy Markdown
Member Author

@greptileai review

@joelmccoy

Copy link
Copy Markdown
Member Author

@codex review

bradclawsie
bradclawsie previously approved these changes Aug 20, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

πŸ’‘ Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 58e0725d0b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with πŸ‘.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread internal/cli/zarf/zarf.go Resolved
Comment thread internal/mode/mode.go Resolved
@joelmccoy

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

πŸ’‘ Codex Review

if arg == "zarf" || arg == "z" {
return i

P3 Badge Register the nested Zarf alias before forwarding it

When Next mode is invoked through the shorthand tested here, for example CLI_FEATURES=NextMode=true,values=false uds tools z version, this branch recognizes z and injects the Zarf feature flag, but NewZarfCommand declares only Use: "zarf" and no Aliases. Cobra therefore rejects z as an unknown command before the wrapper runs, so the newly added alias path and its test of Resolve do not correspond to an executable CLI path; either register z on the nested command or stop treating it as supported.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with πŸ‘.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread internal/mode/mode.go Resolved
@joelmccoy
joelmccoy merged commit bae0706 into main Aug 21, 2026
20 checks passed
@joelmccoy
joelmccoy deleted the wire-up-next-command branch August 21, 2026 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants