feat(manabrew-compat): depend on manabrew-protocol 3.0.0 instead of mirroring it - #6734
Merged
Conversation
matthewevans
enabled auto-merge
July 28, 2026 18:32
Contributor
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThe ManaBrew adapter migrates from protocol v2 to v3, introduces extension-aware prompt wrappers and Serum Powder mulligan handling, updates card and capability payloads, and revises serialization, validation, documentation, and conformance tests. ChangesManaBrew protocol v3 adapter
Estimated code review effort: 4 (Complex) | ~60 minutes Sequence Diagram(s)sequenceDiagram
participant Client
participant ManaBrewCompat
participant Engine
Client->>ManaBrewCompat: Send wrapped PromptOutput
ManaBrewCompat->>ManaBrewCompat: Validate upstream or local response
ManaBrewCompat->>Engine: Translate response into engine action
Engine-->>ManaBrewCompat: Produce next prompt or result
ManaBrewCompat-->>Client: Serialize protocol v3 message
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Parse changes introduced by this PR✓ No card-parse changes detected. |
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.
Replaces the ~750-line hand-mirror of the ManaBrew wire DTOs with a real
manabrew-protocol = "3"dependency, and adopts the 3.0.0 additions.Licensing.
manabrew-protocolis AGPL-3.0-or-later. Copyleft flows downstream,so this crate now declares
license = "AGPL-3.0-or-later"explicitly instead ofinheriting the workspace's
MIT OR Apache-2.0.engineis unaffected — a permissivelibrary consumed by an AGPL work stays permissive. This crate has zero dependents
and must stay a leaf: if a distributed binary ever links it, that binary becomes AGPL
and AGPL §13's network clause applies.
The mirror was a superset, not a copy. It carried two deliberate vendor extensions
that upstream lacks —
MulliganOutput::MulliganUseSerumPowderandMulliganPutBackInput.excluded_card_id— supporting a play the engine genuinely models(
MulliganChoice::UseSerumPowder). An independent diff of all 81 shared types foundexactly these two and no others. Both are preserved as documented local supersets over
the upstream types; every other type now comes from the dependency. The wire format is
byte-identical to before.
New 3.0.0 fields.
final_chapterandclass_levelare populated from engine state.class_levels,saga_chaptersandis_class_level_upneed printed Oracle sections theengine does not expose after lowering, so they stay at protocol defaults with explicit
capability-registry entries rather than inferred values. Registry 83 -> 87.
Verification (run first-hand, not taken on report): 92 tests pass, 0 failed;
clippy --all-targets -- -D warningsclean. The restored wire-shape test was falsifiedtwice — dropping
skip_serializing_ifand renaming the variant tag each turn it red atdifferent assertions — then confirmed green on restore.
Summary by CodeRabbit
New Features
Compatibility