Skip to content

AC-245: block_key is optional, priority is i32 - #7835

Draft
thesuzerain wants to merge 1 commit into
mainfrom
AC-245-Don't-fail-requests-or-silently-drop-ads-on-unexpected-data
Draft

thesuzerain wants to merge 1 commit into
mainfrom
AC-245-Don't-fail-requests-or-silently-drop-ads-on-unexpected-data

Conversation

@thesuzerain

Copy link
Copy Markdown
Collaborator

This addresses two possible mismatches between MARS and the Ads-Client that can theoretically result in spocs being dropped:

  • block_key, if it fails to build in MARS, it can still be sent
  • priority is mostly forwarded from equativ, and MARs reverses the order by subtracting from a const max. So it's theoretically possible to be negative (if equativ increased their max).

Both of these are issues where MARS 'would have sent this over', so we expect these to work fine in newtab et. al.

Pull Request checklist

  • Breaking changes: This PR follows our breaking change policy
    • This PR follows the breaking change policy:
      • This PR has no breaking API changes, or
      • There are corresponding PRs for our consumer applications that resolve the breaking changes and have been approved
  • Quality: This PR builds and tests run cleanly
    • Note:
      • For changes that need extra cross-platform testing, consider adding [ci full] to the PR title.
      • If this pull request includes a breaking change, consider cutting a new release after merging.
  • Tests: This PR includes thorough tests or an explanation of why it does not
  • Changelog: This PR includes a changelog entry in CHANGELOG.md or an explanation of why it does not need one
    • Any breaking changes to Swift or Kotlin binding APIs are noted explicitly
  • Dependencies: This PR follows our dependency management guidelines
    • Any new dependencies are accompanied by a summary of the due diligence applied in selecting them.

@thesuzerain thesuzerain changed the title feat: block_key is optional, priority is i32 AC-243: block_key is optional, priority is i32 Nov 24, 2026
@thesuzerain thesuzerain changed the title AC-243: block_key is optional, priority is i32 AC-245: block_key is optional, priority is i32 Nov 24, 2026
@copyrighthero

Copy link
Copy Markdown
Contributor

Thanks @thesuzerain! Verified locally: tests, clippy and fmt are green, and an ad with a null block_key or a negative priority is now kept on this branch (it gets dropped on main)! Do you think we should add some unit tests for these two edge cases?

And I think we should update the changelog and the docs/usage-*.md files as well! 🙌

This branch has not been deployed

No deployments
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