Repository navigation
Use x/cli for PSBs - #826
Merged
Merged
Conversation
nolag
force-pushed
the
rtinianov_flags
branch
from
October 15, 2026 20:16
feb9d39 to
e429e20
Compare
There was a problem hiding this comment.
🟡 Changes recommended
The new binder rejects existing kebab-case TOML keys, preventing affected binaries from starting.
1 open finding
What changed in this PR
Migrates PSB configuration binding from the local Viper implementation to the shared x/config/cli package.
Changes:
- Replaces local flag binding with shared namespace registration.
- Generates flag help from configuration field comments.
- Updates configuration types, tests, and dependencies.
| File | Description |
|---|---|
| libs/go.sum | Updates dependency checksums. |
| libs/go.mod | Adds shared configuration dependency; removes Viper. |
| libs/capability/webserver.go | Converts flag help to field comments. |
| libs/capability/telemetry.go | Documents telemetry configuration fields. |
| libs/capability/telemetry_test.go | Adapts binding tests and checks documentation coverage. |
| libs/capability/settings.go | Exports and documents settings configuration. |
| libs/capability/settings_test.go | Uses the exported configuration type. |
| libs/capability/run.go | Delegates configuration flag registration to the binder. |
| libs/capability/registry.go | Uses exported configuration types. |
| libs/capability/registry_test.go | Updates configuration type references. |
| libs/capability/pyroscope.go | Converts flag help to field comments. |
| libs/capability/observability.go | Removes local namespace enumeration. |
| libs/capability/internal/docgen/main.go | Adds configuration documentation generator. |
| libs/capability/flags.go | Removes the local Viper binder. |
| libs/capability/doccomments_gen.go | Adds generated configuration documentation. |
| libs/capability/config.go | Registers configuration with the shared binder. |
| libs/capability/capability.go | Exports and documents capability configuration. |
Files not reviewed (1)
- libs/capability/doccomments_gen.go: Generated file
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| // bind binds every config to root, each under the namespace that owns it. Each is settable by | ||
| // flag, CRE_/CL_ env var, or config file, in that order of precedence, over its defaults. | ||
| func (c *config) bind(root *cobra.Command) (*cli.Binder, error) { | ||
| b, err := cli.New(cli.Options{Markup: tomlmarkup.New(), Prefixes: []string{"CRE", "CL"}}) |
Contributor
Author
There was a problem hiding this comment.
Nothing used this, I don't care about preservation.
|
nolag
marked this pull request as ready for review
October 15, 2026 20:23
nolag
enabled auto-merge
October 15, 2026 20:24
product-security-plaid-production
Bot
requested review from
Krish-vemula,
justinkaseman and
patrickhuie19
October 15, 2026 20:24
cedric-cordenier
approved these changes
Oct 15, 2026
DylanTinianov
approved these changes
Oct 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.





No description provided.