Origin Trial when the OT flag implies another flag

15 views
Skip to first unread message

Christian Biesinger

unread,
Jun 8, 2023, 3:00:27 PM6/8/23
to experimen...@chromium.org
Hi there,

The FedCM team would like to run an origin trial for a feature. The problem is that we have an interface that currently only exists if one of several flags is enabled. Now we want to run the OT for one of those flags.

In other words, we have this situation:
[RuntimeEnabled=InterfaceFlag]
interface Foo {
  [RuntimeEnabled=Feature1]
  foo();
  [RuntimeEnabled=Feature2]
  bar();
}

with this in runtime_enabled_features.json5:
{
// This only exists so we can use RuntimeEnabled in the IDL file
// when either implied_by flag is enabled.
name: "InterfaceFlag",
implied_by: ["Feature1", "Feature2"],

but if I just add the origin trial flag to Feature1, I get this error:

AssertionError: runtime_enabled_features.json5: FedCmIdentityProviderInterface: A feature must be in origin trial if implied by an origin trial feature: FedCmIdpSigninStatus


What is the best way to handle this? I certainly don't want to require web authors to get two tokens (one for each of those features) to make this work.

Why can't implied_by check the OT status of the implied flags?

Thanks!
Christian

Christian Biesinger

unread,
Jun 8, 2023, 3:04:50 PM6/8/23
to experimen...@chromium.org
For my immediate problem I realized that I can use the same origin trial name for multiple flags, so that should work OK

But I don't understand why this is needed.

Christian

Jason Chase

unread,
Jun 8, 2023, 10:44:24 PM6/8/23
to Christian Biesinger, experimen...@chromium.org
This is crbug.com/1061959. For now, this WAI as described in the error message you encountered. That is, we don't want a feature to be inadvertently exposed by an origin trial, due to being implied by another feature.

In this case, "InterfaceFlag" doesn't represent an actual feature. It sounds like a workaround for a limitation in the IDL bindings, where you want an interface to be conditionally exposed only if at least one of its members is exposed. It does seem unfortunate that it causes an error with an origin trial configured. I don't recall hearing about this scenario very often (but maybe people are figuring out the workaround on their own). I think it's reasonable to not address this scenario, until there is evidence that it's happening frequently to cause a lot of pain.

Thanks,
Jason


--
You received this message because you are subscribed to the Google Groups "experimentation-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to experimentation...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/experimentation-dev/CAPTJ0XF0nx2a9L801MG4Rc6rhaiV%3DPBFdRi7ABnUxnttLOW2og%40mail.gmail.com.

Christian Biesinger

unread,
Jun 9, 2023, 11:55:01 AM6/9/23
to Jason Chase, experimen...@chromium.org
OK, thanks for the explanation. I agree that this is a workaround for a bindings/IDL limitation.

For now I'm fine, since I realized that I can use the same origin_trial_name for multiple features.

Christian
Reply all
Reply to author
Forward
0 new messages