Repository navigation
Lemonade API Contracts & Downstream Compatibility Testing #3732
Replies: 5 comments 9 replies
|
Thank you for starting this discussion @iswaryaalex! Very important. @danielholanda : would you kindly see if you can map the breaking-changes protections needed for Skills into this? IMO this is a much more maintainable way to provide protections for Skills than running Skills CI in the main lemonade repo. |
Where is this concern coming from? ie, would would it even take for us to break this? It is quite hardened. |
|
@iswaryaalex I'm highly aligned to the concept of a contract. What would help us most at this juncture is to understand what that contract would look like. You have some specifics already, like "Version-specific embeddable download URLs continue to resolve." Can we get a robust set of specifics here? Especially which APIs need to be protected. I'd also like to see a plan for protecting the contract from accidental degradation. Imagine if some rando asked their agent to change how |
|
I'm also highly aligned with the idea of a contract and that those should be programmatically tested.
|
|
You know what would be really cool? This could be part of a "v2" of this: Every line item in the contract could be explicitly numbered/registered. Apps could then (with the help of a script we author) list which parts of the contract they rely on and have a CI/CD test that programmatically checks those parts for upcoming breaking changes. The great thing is that downstream users wouldn't have to care about breaks in parts of the contract they don't rely on. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Proposal size
Minor feature (a single PR)
Updates
No response
User story
Lemonade already has API and integration tests covering much of the lemond server functionality.
As Lemonade is increasingly consumed by downstream applications such as Unsloth, we need to make the existing coverage explicitly protect the release-to-release compatibility contract.
This RFC proposes extending the existing test infrastructure to validate two downstream contracts:
Runtime contract : the released lemond behaves as expected by consumers.
Distribution contract : consumers can reliably obtain and launch the correct version of the embeddable lemond artifact.
The goal is to detect unintended breaking changes before a Lemonade release reaches downstream consumers.
A downstream integration can break even when Lemonade's existing tests pass.
For example:
Lemonade Changes
API behavior changes
→ Unsloth integration breaks
Artifact naming changes
→ Download fails
Release URL changes
→ Unsloth gets 404
Artifact contents change
→ Embedded
lemondfails to startVersion/artifact mismatch
→ Downstream receives unexpected
lemondThese are all part of the effective Lemonade integration contract.
Primary goals
Non-goals
High-level design
Compatibility Contracts and Testing
The compatibility contract includes both runtime behavior and distribution:
Tests should verify that:
Where possible, the existing tests should be reused rather than duplicated.
Downstream Compatibility for a few Apps
Add a small number of consumer-level tests representing real integrations.
These tests should exercise the actual integration path used by Unsloth rather than a separate mock implementation. Additional downstream consumers can be added over time.
Breaking changes
None
Maintenance plan
Risks
None
All reactions