[codex] Add failing release asset specs#745
Merged
iangmaia merged 1 commit intoJun 26, 2026
Merged
Conversation
These examples document the helper validation gaps from PR #743: non-string asset entries should fail through `UI.user_error!`, and duplicate local filenames should be rejected before GitHub mutations. --- Generated with the help of Codex, https://openai.com/codex Co-Authored-By: Codex GPT-5 <noreply@openai.com>
Collaborator
Generated by 🚫 Danger |
5 tasks
iangmaia
approved these changes
Jun 26, 2026
iangmaia
left a comment
Contributor
There was a problem hiding this comment.
Looking good, thanks a lot!
d1d2011
into
iangmaia/upload-github-release-assets
8 of 10 checks passed
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds new RSpec examples to document two validation gaps in GithubHelper#upload_release_assets, specifically around invalid assets entries and duplicate local asset filenames, with the intent that these cases should fail early via UI.user_error! before any GitHub-side mutation occurs.
Changes:
- Add a spec asserting non-string asset entries should fail with a clear
UI.user_error!message. - Add a spec asserting duplicate local asset filenames should fail before any GitHub release API mutation.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+668
to
+673
| it 'fails clearly if an asset is not a file path' do | ||
| expect(client).not_to receive(:release_for_tag) | ||
| expect(client).not_to receive(:release_assets) | ||
| expect(client).not_to receive(:upload_asset) | ||
|
|
||
| expect do |
Comment on lines
+678
to
+679
| it 'fails without mutating GitHub when local assets have duplicate filenames' do | ||
| in_tmp_dir do |tmpdir| |
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.
What does it do?
Adds failing specs stacked on #743 to document two helper validation gaps:
release_assetsentries should fail throughUI.user_error!Checklist before requesting a review
Sort of irrelevant here...
bundle exec rubocopto test for code style violations and recommendations. (rubocop --cache false spec/github_helper_spec.rb)specs/*_spec.rb) if applicable.bundle exec rspecto run the whole test suite and ensure all your tests pass. Intentionally failing specs; local RSpec startup is also blocked here by the repo bundle/nativenokogirisetup.CHANGELOG.mdfile to describe your changes under the appropriate existing###subsection of the existing## Trunksection. Not applicable: tests-only stacked PR.MIGRATION.mdfile to describe how the changes will affect the migration from the previous major version and what the clients will need to change and consider. Not applicable.