Skip to content

Add API contract verification tests for FormulaStruct and CaskStruct#21632

Merged
Rylan12 merged 1 commit intoHomebrew:mainfrom
mmatus3:nightshift/api-contract-verify
Feb 26, 2026
Merged

Add API contract verification tests for FormulaStruct and CaskStruct#21632
Rylan12 merged 1 commit intoHomebrew:mainfrom
mmatus3:nightshift/api-contract-verify

Conversation

@mmatus3
Copy link
Contributor

@mmatus3 mmatus3 commented Feb 26, 2026

Summary

  • Add new cask_struct_spec.rb test file covering from_hash construction, all 9 predicate methods, artifact/caveats placeholder replacement, and unknown key handling
  • Extend formula_struct_spec.rb with deserialize contract tests (bottle reconstruction, _present field inference, _url_args/uses_from_macos/service_args/conflicts formatting), all 11 predicate method tests, and a serialize/deserialize round-trip consistency check

Test plan

  • brew tests --only=api/formula_struct — 16 examples, 0 failures
  • brew tests --only=api/cask_struct — 7 examples, 0 failures
  • brew style — no offenses
  • brew typecheck — no errors

🤖 Generated with Claude Code


Automated by nightshift

Nightshift-Task: api-contract-verify
Nightshift-Ref: https://github.com/marcus/nightshift
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@MikeMcQuaid MikeMcQuaid requested a review from Rylan12 February 26, 2026 19:26
Copy link
Member

@Rylan12 Rylan12 left a comment

Choose a reason for hiding this comment

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

Nice, thanks @mmatus3!

@Rylan12 Rylan12 added this pull request to the merge queue Feb 26, 2026
Merged via the queue into Homebrew:main with commit 3e682d3 Feb 26, 2026
36 checks passed
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