Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Spec] Add trustedBiddingSignalsSlotSizeMode #954

Merged

Conversation

MattMenke2
Copy link
Contributor

@MattMenke2 MattMenke2 commented Dec 15, 2023

These are the spec changes associated with #928.


Preview | Diff

@dmdabbs
Copy link
Contributor

dmdabbs commented Dec 15, 2023

@MattMenke2 will the new sizemode setting be updateable? I'm thinking of executionMode which recently needed to have update logic tweaked.

@MattMenke2
Copy link
Contributor Author

@MattMenke2 will the new sizemode setting be updateable? I'm thinking of executionMode which recently needed to have update logic tweaked.

Yes, it will (And updating should already work on Canary). I was the one who noticed the executionMode update issues when I was implementing updating for this, actually. :)

@JensenPaul JensenPaul added the spec Relates to the spec label Dec 22, 2023
@JensenPaul JensenPaul requested a review from domfarolino January 5, 2024 20:34
@domfarolino
Copy link
Collaborator

Before I take a look at this, can I ask for someone else on the team with recent spec experience to give it a first pass for me?

@qingxinwu qingxinwu self-requested a review January 9, 2024 18:44
spec.bs Show resolved Hide resolved
spec.bs Show resolved Hide resolved
spec.bs Outdated Show resolved Hide resolved
spec.bs Show resolved Hide resolved
spec.bs Outdated Show resolved Hide resolved
spec.bs Outdated Show resolved Hide resolved
spec.bs Outdated Show resolved Hide resolved
spec.bs Outdated Show resolved Hide resolved
spec.bs Outdated Show resolved Hide resolved
spec.bs Outdated Show resolved Hide resolved
spec.bs Outdated Show resolved Hide resolved
@MattMenke2
Copy link
Contributor Author

Didn't realize "build an interest group passed to generateBid" was separate from GenerateBidInterestGroup, so I added the new field there.

Also, I pulled in the latest upstream - there was apparently a CL that changed indent of a code block, and the entire block was, unfortunately, marked as a conflict. There was more than the indent change, so I had to go through and try and fix everything. I think things are correct now, but fixing that sort of thing in a web-based text editor is very error prone.

@MattMenke2
Copy link
Contributor Author

Note that there is a compile error, but it's because "[=UTF-8=]" no longer uniquely resolves (This CL doesn't touch that - looks like that was added over 8 months ago)

@qingxinwu
Copy link
Collaborator

Note that there is a compile error, but it's because "[=UTF-8=]" no longer uniquely resolves (This CL doesn't touch that - looks like that was added over 8 months ago)

Yeah, I saw the same error. Seems there are more [=UTF-8=] defined in different specs now. Sent a PR to fix it.

@qingxinwu
Copy link
Collaborator

Didn't realize "build an interest group passed to generateBid" was separate from GenerateBidInterestGroup, so I added the new field there.

Also, I pulled in the latest upstream - there was apparently a CL that changed indent of a code block, and the entire block was, unfortunately, marked as a conflict. There was more than the indent change, so I had to go through and try and fix everything. I think things are correct now, but fixing that sort of thing in a web-based text editor is very error prone.

yeah, sorry for the inconvience. Some of my readability improvement PRs got merged recently, and it's not that easy to resolve merge conflicts using the text editor. I'll take a look

@domfarolino
Copy link
Collaborator

It's a good catch! I treated the way we estimate IG size as an implemention detail and accepted some deviations.
We can change it to "4" to match our code exactly, but [=interest group/execution mode=] is [=string=] currently, and the size of enum is language-specific, right? @domfarolino How should we handle the difference here between code and spec? If we want to make them to match, is there an infra type "enum" so that we can define the fields' data types to enums instead of strings, and get a standard size of enum? I don't find one. The IDL enumeration's value is a list of strings, still different from C++'s enum which stores ints.

So if I understand correctly, you want to use an enum in the spec, to match what we do in the implementation, but don't want to just use a Web IDL enum because those are just DOMStrings and don't have a fixed integer length like our C++ enums do in the implementation, right?

If that's right, then I would recommend doing something that the HTML Standard does on occasion. Consider "cross origin isolation mode", which isn't explicitly a Web IDL enum, but is effectively a "spec enum" because it is "one of three values". Each value is descriptive in name, and in your spec, I would go a step further and say that each value represents an unsigned short or whatever size integer you need. So you'll effectively have a new "type" for each member inside the struct, and each of these types will have a range of possible/allowed descriptive values that are all actually Web IDL integer types under the hood, meaning they have a fixed size in bits.

Does that make sense? It can come after this PR possibly, since that's kind of an overhaul to some of that pre-existing infrastructure.

@domfarolino
Copy link
Collaborator

It looks like something to do with utf-8 is breaking the build again maybe? Does this need to be rebased or something?

@qingxinwu
Copy link
Collaborator

It looks like something to do with utf-8 is breaking the build again maybe? Does this need to be rebased or something?

Yeah, this PR hasn't pulled the fix yet. It needs to sync to get the fix.

@qingxinwu
Copy link
Collaborator

qingxinwu commented Jan 20, 2024

It's a good catch! I treated the way we estimate IG size as an implemention detail and accepted some deviations.
We can change it to "4" to match our code exactly, but [=interest group/execution mode=] is [=string=] currently, and the size of enum is language-specific, right? @domfarolino How should we handle the difference here between code and spec? If we want to make them to match, is there an infra type "enum" so that we can define the fields' data types to enums instead of strings, and get a standard size of enum? I don't find one. The IDL enumeration's value is a list of strings, still different from C++'s enum which stores ints.

So if I understand correctly, you want to use an enum in the spec, to match what we do in the implementation, but don't want to just use a Web IDL enum because those are just DOMStrings and don't have a fixed integer length like our C++ enums do in the implementation, right?

If that's right, then I would recommend doing something that the HTML Standard does on occasion. Consider "cross origin isolation mode", which isn't explicitly a Web IDL enum, but is effectively a "spec enum" because it is "one of three values". Each value is descriptive in name, and in your spec, I would go a step further and say that each value represents an unsigned short or whatever size integer you need. So you'll effectively have a new "type" for each member inside the struct, and each of these types will have a range of possible/allowed descriptive values that are all actually Web IDL integer types under the hood, meaning they have a fixed size in bits.

Does that make sense? It can come after this PR possibly, since that's kind of an overhaul to some of that pre-existing infrastructure.

yeah, I can do this for execution mode in a follow up PR (find another bug about it, will fix it as well).
For the size mode, maybe you can add a TODO in [=estimate size=] to add sizeMode's size which I can also add in the follow up PR. Does this look good to you, @MattMenke2?

Copy link
Collaborator

@qingxinwu qingxinwu left a comment

Choose a reason for hiding this comment

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

still LGTM % minor comments. Rebase looks correct, but need to pull again to get the fix.

spec.bs Outdated Show resolved Hide resolved
spec.bs Show resolved Hide resolved
@JensenPaul
Copy link
Collaborator

@domfarolino, it looks like @qingxinwu finished up his review and approved; could you review it now that the first review is complete?

Copy link
Collaborator

@domfarolino domfarolino left a comment

Choose a reason for hiding this comment

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

LGTM % some nits

spec.bs Show resolved Hide resolved
spec.bs Show resolved Hide resolved
spec.bs Outdated Show resolved Hide resolved
spec.bs Show resolved Hide resolved
@MattMenke2
Copy link
Contributor Author

Thanks for all the help, Dominic and Qingxin!

@JensenPaul JensenPaul merged commit ff47c12 into WICG:main Jan 31, 2024
2 checks passed
github-actions bot added a commit that referenced this pull request Jan 31, 2024
SHA: ff47c12
Reason: push, by JensenPaul

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
spec Relates to the spec
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants