Skip to content

fix: complete Flags migration and remove deprecated#760

Draft
jrschumacher wants to merge 2 commits intoopentdf:mainfrom
jrschumacher:jrschumacher/doc-architecture
Draft

fix: complete Flags migration and remove deprecated#760
jrschumacher wants to merge 2 commits intoopentdf:mainfrom
jrschumacher:jrschumacher/doc-architecture

Conversation

@jrschumacher
Copy link
Member

  • Replace all 20 remaining .FlagHelper usages with .Flags across 6 files, completing the migration started in d6932f3
  • Remove the FlagHelper field alias from Cli struct
  • Remove deprecated config command and docs (functionality migrated to profile in PR feat(core)!: Store output format to profile. #719)
  • Add docs/ARCHITECTURE.md documenting current and intended architecture with alignment assessment

Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com

jrschumacher and others added 2 commits February 23, 2026 21:27
…onfig cmd

- Replace all 20 remaining `.FlagHelper` usages with `.Flags` across 6 files, completing the migration started in d6932f3
- Remove the `FlagHelper` field alias from `Cli` struct
- Remove deprecated `config` command and docs (functionality migrated to `profile` in PR opentdf#719)
- Add `docs/ARCHITECTURE.md` documenting current and intended architecture with alignment assessment

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Update doc to reflect the actual codebase state: FlagHelper alias
is removed, config command is deleted, alignment table is current.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@jrschumacher jrschumacher requested a review from a team as a code owner February 24, 2026 13:32
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @jrschumacher, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly refactors the codebase by finalizing the migration to a unified flag access mechanism, which involved removing a deprecated helper and simplifying the Cli struct. It also cleans up the project by eliminating the outdated config command, whose functionality was previously superseded by profile management. Furthermore, a new architectural document has been added to provide clarity on the project's current state and intended evolution, aiding future development and understanding.

Highlights

  • Flag Migration Completed: The migration from FlagHelper to Flags has been completed across all relevant command files, standardizing flag access within the cli.Cli struct.
  • Deprecated config Command Removed: The deprecated config command and its associated documentation have been entirely removed, streamlining the CLI and eliminating outdated functionality.
  • Architectural Documentation Added: A new ARCHITECTURE.md document has been introduced to provide a comprehensive overview of the project's current design and intended future direction.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • cmd/auth/login.go
    • Updated flag access from c.FlagHelper to c.Flags.
  • cmd/auth/logout.go
    • Updated flag access from c.FlagHelper to c.Flags.
  • cmd/common/common.go
    • Updated flag access from c.FlagHelper to c.Flags in InitProfile and NewHandler functions.
  • cmd/config/config.go
    • Removed the entire file, which contained the deprecated config command implementation.
  • cmd/policy/attributeValues.go
    • Updated flag access from c.FlagHelper to c.Flags.
  • cmd/policy/kasRegistry.go
    • Updated flag access from c.FlagHelper to c.Flags.
  • cmd/profile.go
    • Updated flag access from c.FlagHelper to c.Flags.
  • cmd/root.go
    • Removed import statements and command additions related to the deprecated config package.
  • docs/ARCHITECTURE.md
    • Added a new document detailing the otdfctl architecture, including 'As-Is' and 'To-Be' sections.
  • docs/man/config/_index.md
    • Removed the documentation file for the deprecated config command.
  • docs/man/config/output.md
    • Removed the documentation file for the deprecated config output subcommand.
  • pkg/cli/cli.go
    • Removed the FlagHelper field and its alias assignment from the Cli struct, standardizing on Flags.
Activity
  • The pull request was co-authored by Claude Opus 4.6, indicating collaborative development.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@jrschumacher jrschumacher changed the title refactor: complete Flags migration and remove deprecated fix: complete Flags migration and remove deprecated Feb 24, 2026
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request is a solid refactoring effort that successfully completes the migration from .FlagHelper to .Flags and removes the deprecated config command. The changes are clean, consistent, and improve the overall health of the codebase. The addition of the ARCHITECTURE.md file is particularly valuable, providing a comprehensive overview of the project's design. I've included one minor suggestion to correct a typo in this new documentation file. Overall, great work on this cleanup and documentation effort.

otdfctl is a Go CLI application built on [Cobra](https://cobra.dev/) that provides CRUD operations for the OpenTDF Platform's policy objects, TDF encrypt/decrypt, and profile-based configuration. It communicates with the platform via gRPC through the `opentdf/platform/sdk`.

**Module**: `github.com/opentdf/otdfctl`
**Go version**: 1.25.0
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

There appears to be a typo in the Go version specified. Version 1.25.0 is a future, unreleased version of Go. Based on the go.mod file in the repository, this should likely be 1.22.

Suggested change
**Go version**: 1.25.0
**Go version**: 1.22

@jrschumacher jrschumacher marked this pull request as draft February 24, 2026 13:40
@jrschumacher jrschumacher changed the title fix: complete Flags migration and remove deprecated \fix: complete Flags migration and remove deprecated Feb 24, 2026
@jrschumacher jrschumacher changed the title \fix: complete Flags migration and remove deprecated fix: complete Flags migration and remove deprecated Feb 24, 2026
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.

1 participant