Repository navigation
Making copi.owasp.org more stable by adding retry logic when there are glitches. - #3020
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR aims to improve stability of the copi.owasp.org Phoenix app by adding retry logic for transient load failures (primarily in LiveViews and API flows), and updates the finished-game UI to provide a clearer “go to summary” action.
Changes:
- Introduced configurable resilience settings (retry delay + retry limits) and applied retry/“temporary issue” handling to
GameLive.ShowandPlayerLive.Index/Show. - Improved API/health controller resilience paths and expanded test coverage with stubs for transient/not-found scenarios.
- Updated the finished-game Player view to present a game-summary navigation button/link.
Reviewed changes
Copilot reviewed 31 out of 31 changed files in this pull request and generated 16 comments.
Show a summary per file
| File | Description |
|---|---|
| copi.owasp.org/test/copi/release_test.exs | Adds release task coverage for migrate/rollback edge cases. |
| copi.owasp.org/test/copi/ip_helper_test.exs | Adds more socket/connect_info IP extraction cases. |
| copi.owasp.org/test/copi/encrypted/binary_test.exs | Adds coverage for invalid encryption key failure modes. |
| copi.owasp.org/test/copi/cornucopia_test.exs | Adds Player.find/1 not-found expectation test. |
| copi.owasp.org/test/copi_web/resilience_test.exs | Tests CopiWeb.Resilience config/default behavior. |
| copi.owasp.org/test/copi_web/live/player_live/show_test.exs | Adds extensive coverage for retry/transient/not-found branches via stubs. |
| copi.owasp.org/test/copi_web/live/player_live/index_pure_test.exs | Adds direct callback tests for PlayerLive.Index edge branches. |
| copi.owasp.org/test/copi_web/live/player_live/form_component_test.exs | Adds direct callback tests for the form component update/validate paths. |
| copi.owasp.org/test/copi_web/live/player_live_test.exs | Expands Player LiveView tests for redirects and retry handling. |
| copi.owasp.org/test/copi_web/live/game_live/show_test.exs | Expands Game show tests incl. retry flow + invalid round behavior. |
| copi.owasp.org/test/copi_web/live/game_live/show_pure_test.exs | Adds pure tests for mount hook + put_uri_hook. |
| copi.owasp.org/test/copi_web/live/game_live/game_form_helpers_test.exs | Adds tests for companion-suit helper behavior. |
| copi.owasp.org/test/copi_web/live/game_live/create_game_form_test.exs | Adds test that validates form updates when edition changes. |
| copi.owasp.org/test/copi_web/live/game_live_test.exs | Removes /error redirect expectations now replaced by softer handling. |
| copi.owasp.org/test/copi_web/copi_web_test.exs | Adds basic CopiWeb macro/static_paths sanity tests. |
| copi.owasp.org/test/copi_web/controllers/health_controller_test.exs | Adds resilience tests for repo failures via stub module. |
| copi.owasp.org/test/copi_web/controllers/api_controller_test.exs | Adds tests for transient/not-found/update-failure API branches via stubs. |
| copi.owasp.org/lib/copi/cornucopia/player.ex | Adds warning logging when player lookup returns nil. |
| copi.owasp.org/lib/copi/cornucopia/game.ex | Adds warning logging when game lookup returns nil. |
| copi.owasp.org/lib/copi/cornucopia/dealt_card.ex | Adds warning logging when dealt-card lookup returns nil. |
| copi.owasp.org/lib/copi_web/resilience.ex | Introduces centralized resilience configuration accessors + defaults. |
| copi.owasp.org/lib/copi_web/live/player_live/show.html.heex | Updates finished-game UI navigation to game summary. |
| copi.owasp.org/lib/copi_web/live/player_live/show.ex | Adds retry logic, dependency-injection hooks for testing, and better error handling. |
| copi.owasp.org/lib/copi_web/live/player_live/index.ex | Adds retry logic for transient game load failures and module injection for tests. |
| copi.owasp.org/lib/copi_web/live/game_live/show.ex | Adds retry logic for transient game load failures; soft-handles invalid round. |
| copi.owasp.org/lib/copi_web/controllers/health_controller.ex | Allows injectable repo module and catches failures for readiness checks. |
| copi.owasp.org/lib/copi_web/controllers/api_controller.ex | Adds transient/second-read handling and injectable game/repo modules for tests. |
| copi.owasp.org/config/test.exs | Configures resilience settings for faster test retries. |
| copi.owasp.org/config/prod.exs | Configures resilience settings for production. |
| copi.owasp.org/config/dev.exs | Configures resilience settings for development. |
| copi.owasp.org/config/config.exs | Adds baseline resilience config defaults. |
rewtd
approved these changes
May 21, 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.
Description
Created with ai. Here is the chat:
conversation-transcript.txt
AI Tool Disclosure
[e.g. GitHub CoPilot, ChatGPT, JetBrains Junie etc.][e.g. GPT-4.1, Claude Haiku 4.5, Gemini 2.5 Pro etc.][Summarize the key prompts or instructions given to the AI tools]Affirmation