Repository navigation
fix(app)!: unify startup policy and listener selection - #111
Merged
Merged
Conversation
This was referenced Sep 14, 2026
6 tasks done
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.
Builder
run()ignoredconfig.server, and automatic configuration errors silently fell back to defaults whileGotchaApp::run()returned errors. Both APIs now use one internal startup pipeline and a strict default configuration policy.Listener selection follows
listen/listen_on> per-field.host()/.port()overrides >config.server> framework defaults. Explicit default values remain overrides. For example, a configured port of 8080 is now honored by builderrun(), while.port(3000)still selects 3000.ConfigErrorPolicyto both APIs, with an explicit fallback factory andfallback_to_default()convenience method. Only selecting the default fallback requiresC: Default.Validation passed locally:
cargo check --workspace --all-features,cargo test -p gotcha,cargo test -p gotcha --all-features,cargo clippy --all-features --workspace -- -D warnings, and formatting/diff checks. Tests cover address precedence once at the resolver, actual HTTP responses through both adapters, strict and explicit fallback policies, publicrun()bind failures, and listener release after initialization errors. Existing tests retain source ordering and runtime types without serde/Default requirements.All 11 GitHub CI checks passed for
07cff9594aabc55cb80595150c714133d1c30d36.Closes #92