Skip to content

fix(launchtools): bind start flags to viper directly#195

Merged
traviolus merged 1 commit into
mainfrom
fix/launch-prerun
May 14, 2026
Merged

fix(launchtools): bind start flags to viper directly#195
traviolus merged 1 commit into
mainfrom
fix/launch-prerun

Conversation

@traviolus
Copy link
Copy Markdown
Contributor

@traviolus traviolus commented May 14, 2026

Description

Closes: #XXXX


Author Checklist

All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.

I have...

  • included the correct type prefix in the PR title, you can find examples of the prefixes below:
  • confirmed ! in the type prefix if API or client breaking change
  • targeted the correct branch
  • provided a link to the relevant issue or specification
  • reviewed "Files changed" and left comments if necessary
  • included the necessary unit and integration tests
  • updated the relevant documentation or specification, including comments for documenting Go code
  • confirmed all CI checks have passed

Reviewers Checklist

All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.

I have...

  • confirmed the correct type prefix in the PR title
  • confirmed all author checklist items have been addressed
  • reviewed state machine logic, API design and naming, documentation is accurate, tests and test coverage

Summary by CodeRabbit

  • Bug Fixes

    • Fixed how startup flags are processed and made available during application initialization, addressing potential startup issues and improving overall system reliability.
  • Refactor

    • Updated the internal mechanism for managing startup configuration settings to enhance compatibility with the runtime environment and provide a more streamlined approach.

@traviolus traviolus requested a review from a team as a code owner May 14, 2026 08:31
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 14, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 079156a8-551d-4381-92c8-f62510551fa6

📥 Commits

Reviewing files that changed from the base of the PR and between a27b7b0 and 26c7fed.

📒 Files selected for processing (1)
  • contrib/launchtools/steps/runapp.go

Walkthrough

RunAppWithPostAction now directly binds startup command flags to the server context's Viper configuration instead of invoking PreRunE. This change addresses Cosmos SDK version behavior differences between v0.50 and v0.53, ensuring flags are properly available to RunE.

Changes

Flag Binding Refactor

Layer / File(s) Summary
Direct Viper flag binding
contrib/launchtools/steps/runapp.go
Replaces startCmd.PreRunE(...) invocation with explicit ctx.ServerContext().Viper.BindPFlags(startCmd.Flags()) call, adding error handling that wraps binding failures with context.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 Flags now bind straight to Viper's heart,
No PreRunE prelude to start,
SDK versions dance in perfect rhyme,
Zero-point-fifty to fifty-three time!
Direct and true, this binding way,
Makes Cosmos flags work and play!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main change: directly binding start flags to Viper, which aligns with the code modification of binding startCmd.Flags() into the server context's Viper.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/launch-prerun

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Member

@beer-1 beer-1 left a comment

Choose a reason for hiding this comment

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

utACK

@codecov
Copy link
Copy Markdown

codecov Bot commented May 14, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 43.33%. Comparing base (a27b7b0) to head (26c7fed).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #195   +/-   ##
=======================================
  Coverage   43.33%   43.33%           
=======================================
  Files          74       74           
  Lines        7424     7424           
=======================================
  Hits         3217     3217           
  Misses       3614     3614           
  Partials      593      593           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@traviolus traviolus merged commit f0b6618 into main May 14, 2026
11 checks passed
@traviolus traviolus deleted the fix/launch-prerun branch May 14, 2026 08:38
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.

2 participants