Skip to content

HTTP API for Measure Conversion#280

Merged
apasel422 merged 14 commits intow3c:mainfrom
apasel422:conv-http
Dec 18, 2025
Merged

HTTP API for Measure Conversion#280
apasel422 merged 14 commits intow3c:mainfrom
apasel422:conv-http

Conversation

@apasel422
Copy link
Collaborator

@apasel422 apasel422 commented Sep 16, 2025

Fixes #31


Preview | Diff

Copy link
Member

@martinthomson martinthomson left a comment

Choose a reason for hiding this comment

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

This is the easy part. Getting the answer is the hard part.

@csharrison
Copy link
Collaborator

Discussed in the Oct 14 call - let's wait to merge until we have support for sending the report.

@apasel422
Copy link
Collaborator Author

Discussed in the Oct 14 call - let's wait to merge until we have support for sending the report.

I think we need to deal with #189 first.

@apasel422
Copy link
Collaborator Author

@martinthomson Please take another look.

Copy link
Member

@martinthomson martinthomson left a comment

Choose a reason for hiding this comment

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

Hopefully, these responses help.

I'll not be around for a few weeks. I'm happy for you to merge on the basis of the suggestions I've made; though if you want to discuss more, you might either have to be patient or open issues to track those.

@apasel422 apasel422 merged commit 15d88f3 into w3c:main Dec 18, 2025
3 checks passed
@apasel422 apasel422 deleted the conv-http branch December 18, 2025 13:37
martinthomson added a commit that referenced this pull request Jan 7, 2026
apasel422 added a commit that referenced this pull request Jan 15, 2026
* Add implementation-defined maximums

This includes a bunch of values that I essentially made up.
Rationale for that is listed in #174.
We'll have to discuss what appropriate values are
before we can merge this change.

Closes #174.

* Fix linking snafu

* Change based on Michael's feedback

* Look back 90 days

* No need to null check

Co-authored-by: Andrew Paseltiner <[email protected]>

* Apply suggestion from @apasel422

Co-authored-by: Andrew Paseltiner <[email protected]>

* error message correction

Co-authored-by: Andrew Paseltiner <[email protected]>

* Comment on small values

* Use more obviously invalid sites in e2e tests

Some systems may consider `a` to be a registrable domain.

* Use valid domains in list-size e2e tests

Otherwise, the test may inadvertently be covering the behavior of the
invalid `a` domain, rather than the size check.

* Remove unnecessary cast to Delegate

* Simplify current-time construction in TestConfig

* Bump Python to Bikeshed's minimum required version of 3.12

* Add JSON schema for e2e tests

* Reorder validation vs test

* Extract impression/conversion options into def

* Require aggregationService

* Add lint step to make check

* Add coverage for errors at structured-headers level

* Update http.test.ts

Co-authored-by: Martin Thomson <[email protected]>

* Add coverage for parsing impression/conversion sites/callers as sites

* Enforce minimum values for non-user-input integers

* Validate aggregation service format

* Link directly to forgetVisits parameter

* Add basic e2e test for clearing site state without forgetting visits

* Add basic e2e test for clearing site state with forgetting visits

* Add impression after clearing

* Remove document, frame, and iframe from fetch destinations

Per
#189 (comment),
who to associate the Save-Impression operation with is unclear in these
cases. Support for them could be restored in the future if we hear of
use cases and are able to resolve the association question.

* Replace hardcoded "randomness" in e2e tests with configurable value

To make those tests less dependent on fixed behavior.

In the future, we might consider allowing these values to be specified
in individual events at a higher level in order to avoid mandating the
exact way in which randomness is used.

* Add e2e coverage for lifetime/lookback clamping

* Allow arrays of comments for readability

* Update impl/e2e-tests/expiry-clamping.json

Co-authored-by: Martin Thomson <[email protected]>

* HTTP API for Measure Conversion (#280)

Co-authored-by: Martin Thomson <[email protected]>

* Add test coverage for ignoring unknown dictionary keys and parameters (#349)

* Require e2e tests to conform to WebIDL definitions (#350)

The WebIDL interfaces for AttributionImpressionOptions and
AttributionConversionOptions specify multiple fields as either
`unsigned long` or `long`, and therefore no e2e test should attempt to
pass values outside these ranges, as the associated type conversion
(e.g. from JavaScript) is assumed to occur strictly before the API (i.e.
the simulator) receives the final values.

Enforcing this at the JSON schema level ensures that test suites that
import the e2e tests need not concern themselves with the WebIDL-level
conversions.

The change to the JSON schema revealed one such offending test case in
save-impression-errors.json, which attempted to pass
`histogramIndex: -1`.

* Bump qs from 6.14.0 to 6.14.1 in /impl (#353)

Bumps [qs](https://github.com/ljharb/qs) from 6.14.0 to 6.14.1.
- [Changelog](https://github.com/ljharb/qs/blob/main/CHANGELOG.md)
- [Commits](ljharb/qs@v6.14.0...v6.14.1)

---
updated-dependencies:
- dependency-name: qs
  dependency-version: 6.14.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* update editors (#355)

* update editors

add Ben Case as editor as discussed in editors sync.

* Update api.bs

* Add e2e test for single-epoch budgeting (#356)

* Update the test schema

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: Andrew Paseltiner <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Benjamin M. Case <[email protected]>
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.

HTTP API

3 participants