fix: accept beta-patch wire aliases (e.g. 3.1-beta.5) in detect_wire_version (closes #883)#894
Conversation
|
The automated review encountered an issue (possibly reached max turns, timed out, or failed to post the final This is an automated message from the Argus AI review workflow. |
IPR Policy Agreement Required@botbikamordehai2-sketch — thanks for the contribution. Before this PR can be merged, the AgenticAdvertising.Org IPR Policy requires your agreement. To agree, post a new comment on this PR with the exact phrase: Your signature is recorded once and covers all contributions to AAO repositories. See |
|
I have read the IPR Policy |
IPR Policy — signedThanks, @botbikamordehai2-sketch. Your agreement to the IPR Policy is recorded at |
What
detect_wire_version({"adcp_version": "3.1-beta.5"})raisesUnsupportedVersionErrorbecausenormalize_to_release_precisionpreserves the prerelease patch label andSUPPORTED_WIRE_VERSIONSonly contains'3.1-beta.4'. Buyers emitting3.1-beta.5(e.g. the current JS SDK) are rejected, forcing downstream adopters (e.g. Prebid Sales Agent #632) to monkey-patch the SDK.Fix
After the strict membership check fails, apply a beta-patch alias tolerance rule: if the normalized incoming version matches
MAJOR.MINOR-PRERELEASE.Nand at least one entry insupportedshares the sameMAJOR.MINOR-PRERELEASEbase (differing only by the trailing patch counter), treat the version as wire-compatible and return the normalized value. This is safe because the AdCP 3.1 envelope shape has not changed between beta.4 and beta.5.Acceptance criteria
detect_wire_version({"adcp_version": "3.1-beta.5"})returns"3.1-beta.5"instead of raising.UnsupportedVersionError.Closes #883