[PWA] Revalidate PWA association metadata on launch to detect revocation [chromium/src : main]

0 views
Skip to first unread message

gwsq (Gerrit)

unread,
May 28, 2026, 5:00:27 PM (4 days ago) May 28
to Chromium Web Applications Reviews, Marijn Kruisselbrink, Chromium LUCI CQ, chromium...@chromium.org, aixba+wat...@chromium.org, chromium-a...@chromium.org, dibyapal+wa...@chromium.org, dmurph+watc...@chromium.org, extension...@chromium.org, japhet+...@chromium.org, kuragin+web-ap...@chromium.org, loyso...@chromium.org, mek+w...@chromium.org, mgiuca...@chromium.org, philli...@chromium.org, webap...@microsoft.com, zelin+watch-we...@chromium.org
Attention needed from Marijn Kruisselbrink

Message from gwsq

Reviewer source(s):
m...@chromium.org is from context(googleclient/chrome/chromium_gwsq/chrome/browser/ui/web_applications/config.gwsq,googleclient/chrome/chromium_gwsq/chrome/browser/web_applications/config.gwsq)

Open in Gerrit

Related details

Attention is currently required from:
  • Marijn Kruisselbrink
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I7a8e9efb4a512b9b9216bd4c289c3eeab42c1040
Gerrit-Change-Number: 7881954
Gerrit-PatchSet: 8
Gerrit-Owner: Dibyajyoti Pal <diby...@chromium.org>
Gerrit-Reviewer: Dibyajyoti Pal <diby...@chromium.org>
Gerrit-Reviewer: Marijn Kruisselbrink <m...@chromium.org>
Gerrit-CC: Chromium Web Applications Reviews <chromium-web...@google.com>
Gerrit-CC: gwsq
Gerrit-Attention: Marijn Kruisselbrink <m...@chromium.org>
Gerrit-Comment-Date: Thu, 28 May 2026 21:00:13 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Kunjan Patel (Gerrit)

unread,
May 28, 2026, 7:20:11 PM (4 days ago) May 28
to Dibyajyoti Pal, Chromium Web Applications Reviews, Marijn Kruisselbrink, Chromium LUCI CQ, chromium...@chromium.org, aixba+wat...@chromium.org, chromium-a...@chromium.org, dibyapal+wa...@chromium.org, dmurph+watc...@chromium.org, extension...@chromium.org, japhet+...@chromium.org, kuragin+web-ap...@chromium.org, loyso...@chromium.org, mek+w...@chromium.org, mgiuca...@chromium.org, philli...@chromium.org, webap...@microsoft.com, zelin+watch-we...@chromium.org
Attention needed from Dibyajyoti Pal and Marijn Kruisselbrink

Kunjan Patel voted and added 1 comment

Votes added by Kunjan Patel

Code-Review+1

1 comment

File chrome/browser/web_applications/commands/launch_web_app_command.cc
Line 168, Patchset 8 (Latest): // have scope extensions and migration sources
Kunjan Patel . unresolved

nit: Nicely used 'or' in the CL description! Can we change 'and' to 'or' here to match that exact logic? What do you think?

Open in Gerrit

Related details

Attention is currently required from:
  • Dibyajyoti Pal
  • Marijn Kruisselbrink
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement satisfiedCode-Owners
    • requirement satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I7a8e9efb4a512b9b9216bd4c289c3eeab42c1040
    Gerrit-Change-Number: 7881954
    Gerrit-PatchSet: 8
    Gerrit-Owner: Dibyajyoti Pal <diby...@chromium.org>
    Gerrit-Reviewer: Dibyajyoti Pal <diby...@chromium.org>
    Gerrit-Reviewer: Kunjan Patel <ks...@chromium.org>
    Gerrit-Reviewer: Marijn Kruisselbrink <m...@chromium.org>
    Gerrit-CC: Chromium Web Applications Reviews <chromium-web...@google.com>
    Gerrit-CC: gwsq
    Gerrit-Attention: Dibyajyoti Pal <diby...@chromium.org>
    Gerrit-Attention: Marijn Kruisselbrink <m...@chromium.org>
    Gerrit-Comment-Date: Thu, 28 May 2026 23:19:57 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Dibyajyoti Pal (Gerrit)

    unread,
    May 28, 2026, 8:09:38 PM (4 days ago) May 28
    to Kunjan Patel, Chromium Web Applications Reviews, Marijn Kruisselbrink, Chromium LUCI CQ, chromium...@chromium.org, aixba+wat...@chromium.org, chromium-a...@chromium.org, dibyapal+wa...@chromium.org, dmurph+watc...@chromium.org, extension...@chromium.org, japhet+...@chromium.org, kuragin+web-ap...@chromium.org, loyso...@chromium.org, mek+w...@chromium.org, mgiuca...@chromium.org, philli...@chromium.org, webap...@microsoft.com, zelin+watch-we...@chromium.org
    Attention needed from Marijn Kruisselbrink

    Dibyajyoti Pal added 1 comment

    File chrome/browser/web_applications/commands/launch_web_app_command.cc
    Line 168, Patchset 8: // have scope extensions and migration sources
    Kunjan Patel . resolved

    nit: Nicely used 'or' in the CL description! Can we change 'and' to 'or' here to match that exact logic? What do you think?

    Dibyajyoti Pal

    Aah thanks for catching, fixed it.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Marijn Kruisselbrink
    Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement satisfiedCode-Owners
      • requirement satisfiedCode-Review
      • requirement satisfiedReview-Enforcement
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: I7a8e9efb4a512b9b9216bd4c289c3eeab42c1040
      Gerrit-Change-Number: 7881954
      Gerrit-PatchSet: 9
      Gerrit-Owner: Dibyajyoti Pal <diby...@chromium.org>
      Gerrit-Reviewer: Dibyajyoti Pal <diby...@chromium.org>
      Gerrit-Reviewer: Kunjan Patel <ks...@chromium.org>
      Gerrit-Reviewer: Marijn Kruisselbrink <m...@chromium.org>
      Gerrit-CC: Chromium Web Applications Reviews <chromium-web...@google.com>
      Gerrit-CC: gwsq
      Gerrit-Attention: Marijn Kruisselbrink <m...@chromium.org>
      Gerrit-Comment-Date: Fri, 29 May 2026 00:09:25 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Kunjan Patel <ks...@chromium.org>
      satisfied_requirement
      open
      diffy

      Marijn Kruisselbrink (Gerrit)

      unread,
      May 29, 2026, 12:40:03 PM (3 days ago) May 29
      to Dibyajyoti Pal, Kunjan Patel, Chromium Web Applications Reviews, Marijn Kruisselbrink, Chromium LUCI CQ, chromium...@chromium.org, aixba+wat...@chromium.org, chromium-a...@chromium.org, dibyapal+wa...@chromium.org, dmurph+watc...@chromium.org, extension...@chromium.org, japhet+...@chromium.org, kuragin+web-ap...@chromium.org, loyso...@chromium.org, mek+w...@chromium.org, mgiuca...@chromium.org, philli...@chromium.org, webap...@microsoft.com, zelin+watch-we...@chromium.org
      Attention needed from Dibyajyoti Pal

      Marijn Kruisselbrink added 1 comment

      Patchset-level comments
      File-level comment, Patchset 9 (Latest):
      Marijn Kruisselbrink . unresolved

      Things might have changed since the revalidation logic was originally implemented for IWAs, however one big concern we had with the logic at the time is that it would be not great if a temporary network/server issue would cause a valid scope extension to suddenly be no longer considered valid because revalidation happened at just the wrong time. If for example the user happens to be offline we'd throw away all perfectly valid origin associations and migration targets. So for those reasons we intentionally limited this to just IWAs at the time.

      I think it is good to somehow extend revalidation to PWAs as well, but especially revalidation that can result in previously validated scope extensions/migration targets to no longer be considered valid probably needs more complicated logic than what is currently implemented in AddValidatedOriginAssociationsCommand?

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Dibyajyoti Pal
      Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement satisfiedCode-Owners
        • requirement satisfiedCode-Review
        • requirement is not satisfiedNo-Unresolved-Comments
        • requirement satisfiedReview-Enforcement
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: I7a8e9efb4a512b9b9216bd4c289c3eeab42c1040
        Gerrit-Change-Number: 7881954
        Gerrit-PatchSet: 9
        Gerrit-Owner: Dibyajyoti Pal <diby...@chromium.org>
        Gerrit-Reviewer: Dibyajyoti Pal <diby...@chromium.org>
        Gerrit-Reviewer: Kunjan Patel <ks...@chromium.org>
        Gerrit-Reviewer: Marijn Kruisselbrink <m...@chromium.org>
        Gerrit-CC: Chromium Web Applications Reviews <chromium-web...@google.com>
        Gerrit-CC: gwsq
        Gerrit-Attention: Dibyajyoti Pal <diby...@chromium.org>
        Gerrit-Comment-Date: Fri, 29 May 2026 16:39:50 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Marijn Kruisselbrink (Gerrit)

        unread,
        May 29, 2026, 12:44:23 PM (3 days ago) May 29
        to Dibyajyoti Pal, Kunjan Patel, Chromium Web Applications Reviews, Marijn Kruisselbrink, Chromium LUCI CQ, chromium...@chromium.org, aixba+wat...@chromium.org, chromium-a...@chromium.org, dibyapal+wa...@chromium.org, dmurph+watc...@chromium.org, extension...@chromium.org, japhet+...@chromium.org, kuragin+web-ap...@chromium.org, loyso...@chromium.org, mek+w...@chromium.org, mgiuca...@chromium.org, philli...@chromium.org, webap...@microsoft.com, zelin+watch-we...@chromium.org
        Attention needed from Dibyajyoti Pal

        Marijn Kruisselbrink added 1 comment

        Patchset-level comments
        Marijn Kruisselbrink . unresolved

        Things might have changed since the revalidation logic was originally implemented for IWAs, however one big concern we had with the logic at the time is that it would be not great if a temporary network/server issue would cause a valid scope extension to suddenly be no longer considered valid because revalidation happened at just the wrong time. If for example the user happens to be offline we'd throw away all perfectly valid origin associations and migration targets. So for those reasons we intentionally limited this to just IWAs at the time.

        I think it is good to somehow extend revalidation to PWAs as well, but especially revalidation that can result in previously validated scope extensions/migration targets to no longer be considered valid probably needs more complicated logic than what is currently implemented in AddValidatedOriginAssociationsCommand?

        Marijn Kruisselbrink

        That was also the reason why (until recently crrev.com/c/7845255 changed that) this command explicitly only added newly validated origins, and would never remove pre-existing validated ones (hence the name of the command).

        Gerrit-Comment-Date: Fri, 29 May 2026 16:44:08 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        Comment-In-Reply-To: Marijn Kruisselbrink <m...@chromium.org>
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Dibyajyoti Pal (Gerrit)

        unread,
        May 29, 2026, 1:29:37 PM (3 days ago) May 29
        to Kunjan Patel, Chromium Web Applications Reviews, Marijn Kruisselbrink, Chromium LUCI CQ, chromium...@chromium.org, aixba+wat...@chromium.org, chromium-a...@chromium.org, dibyapal+wa...@chromium.org, dmurph+watc...@chromium.org, extension...@chromium.org, japhet+...@chromium.org, kuragin+web-ap...@chromium.org, loyso...@chromium.org, mek+w...@chromium.org, mgiuca...@chromium.org, philli...@chromium.org, webap...@microsoft.com, zelin+watch-we...@chromium.org
        Attention needed from Marijn Kruisselbrink

        Dibyajyoti Pal added 1 comment

        Patchset-level comments
        Marijn Kruisselbrink . unresolved

        Things might have changed since the revalidation logic was originally implemented for IWAs, however one big concern we had with the logic at the time is that it would be not great if a temporary network/server issue would cause a valid scope extension to suddenly be no longer considered valid because revalidation happened at just the wrong time. If for example the user happens to be offline we'd throw away all perfectly valid origin associations and migration targets. So for those reasons we intentionally limited this to just IWAs at the time.

        I think it is good to somehow extend revalidation to PWAs as well, but especially revalidation that can result in previously validated scope extensions/migration targets to no longer be considered valid probably needs more complicated logic than what is currently implemented in AddValidatedOriginAssociationsCommand?

        Dibyajyoti Pal

        Hmmmm, do you have any ideas on how we can fix this? Some ideas off the top of the head:

        1. If the user is offline, skip revalidation. Allow revalidation if there is an active network connection.
        2. If there is a 404 error or the associations file doesn't show the manifest id of the web app, then we remove validation. Other HTTP errors (like a 5xx server error) doesn't revalidate.
        3. Some sort of TTL (X days), where we only revalidate if more than X days have passed.

        Option 1 is probably the easiest, wdyt?

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Marijn Kruisselbrink
        Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement satisfiedCode-Owners
        • requirement satisfiedCode-Review
        • requirement is not satisfiedNo-Unresolved-Comments
        • requirement satisfiedReview-Enforcement
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: I7a8e9efb4a512b9b9216bd4c289c3eeab42c1040
        Gerrit-Change-Number: 7881954
        Gerrit-PatchSet: 9
        Gerrit-Owner: Dibyajyoti Pal <diby...@chromium.org>
        Gerrit-Reviewer: Dibyajyoti Pal <diby...@chromium.org>
        Gerrit-Reviewer: Kunjan Patel <ks...@chromium.org>
        Gerrit-Reviewer: Marijn Kruisselbrink <m...@chromium.org>
        Gerrit-CC: Chromium Web Applications Reviews <chromium-web...@google.com>
        Gerrit-CC: gwsq
        Gerrit-Attention: Marijn Kruisselbrink <m...@chromium.org>
        Gerrit-Comment-Date: Fri, 29 May 2026 17:29:22 +0000
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Dibyajyoti Pal (Gerrit)

        unread,
        May 29, 2026, 1:30:29 PM (3 days ago) May 29
        to Kunjan Patel, Chromium Web Applications Reviews, Marijn Kruisselbrink, Chromium LUCI CQ, chromium...@chromium.org, aixba+wat...@chromium.org, chromium-a...@chromium.org, dibyapal+wa...@chromium.org, dmurph+watc...@chromium.org, extension...@chromium.org, japhet+...@chromium.org, kuragin+web-ap...@chromium.org, loyso...@chromium.org, mek+w...@chromium.org, mgiuca...@chromium.org, philli...@chromium.org, webap...@microsoft.com, zelin+watch-we...@chromium.org
        Attention needed from Marijn Kruisselbrink

        Dibyajyoti Pal added 1 comment

        Patchset-level comments
        Marijn Kruisselbrink . unresolved

        Things might have changed since the revalidation logic was originally implemented for IWAs, however one big concern we had with the logic at the time is that it would be not great if a temporary network/server issue would cause a valid scope extension to suddenly be no longer considered valid because revalidation happened at just the wrong time. If for example the user happens to be offline we'd throw away all perfectly valid origin associations and migration targets. So for those reasons we intentionally limited this to just IWAs at the time.

        I think it is good to somehow extend revalidation to PWAs as well, but especially revalidation that can result in previously validated scope extensions/migration targets to no longer be considered valid probably needs more complicated logic than what is currently implemented in AddValidatedOriginAssociationsCommand?

        Dibyajyoti Pal

        Hmmmm, do you have any ideas on how we can fix this? Some ideas off the top of the head:

        1. If the user is offline, skip revalidation. Allow revalidation if there is an active network connection.
        2. If there is a 404 error or the associations file doesn't show the manifest id of the web app, then we remove validation. Other HTTP errors (like a 5xx server error) doesn't revalidate.
        3. Some sort of TTL (X days), where we only revalidate if more than X days have passed.

        Option 1 is probably the easiest, wdyt?

        Dibyajyoti Pal

        AI also had this idea: Asynchronous Background Sync Revalidation
        Instead of running revalidation on the critical path of launching the web app (where failures immediately affect the launch environment):

        • Decouple revalidation from LaunchWebAppCommand.
        • Schedule revalidation via a background task runner or a background sync manager that runs periodically or when the device is detected to be online and idle.
        • While the background revalidation is pending or failing, the active web app continues to use its last successfully validated associations cached in the registry.
        Gerrit-Comment-Date: Fri, 29 May 2026 17:30:15 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        Comment-In-Reply-To: Dibyajyoti Pal <diby...@chromium.org>
        Comment-In-Reply-To: Marijn Kruisselbrink <m...@chromium.org>
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Daniel Murphy (Gerrit)

        unread,
        May 29, 2026, 1:44:07 PM (3 days ago) May 29
        to Dibyajyoti Pal, Daniel Murphy, Kunjan Patel, Chromium Web Applications Reviews, Marijn Kruisselbrink, Chromium LUCI CQ, chromium...@chromium.org, aixba+wat...@chromium.org, chromium-a...@chromium.org, dibyapal+wa...@chromium.org, dmurph+watc...@chromium.org, extension...@chromium.org, japhet+...@chromium.org, kuragin+web-ap...@chromium.org, loyso...@chromium.org, mek+w...@chromium.org, mgiuca...@chromium.org, philli...@chromium.org, webap...@microsoft.com, zelin+watch-we...@chromium.org
        Attention needed from Dibyajyoti Pal and Marijn Kruisselbrink

        Daniel Murphy added 1 comment

        Patchset-level comments
        Marijn Kruisselbrink . unresolved

        Things might have changed since the revalidation logic was originally implemented for IWAs, however one big concern we had with the logic at the time is that it would be not great if a temporary network/server issue would cause a valid scope extension to suddenly be no longer considered valid because revalidation happened at just the wrong time. If for example the user happens to be offline we'd throw away all perfectly valid origin associations and migration targets. So for those reasons we intentionally limited this to just IWAs at the time.

        I think it is good to somehow extend revalidation to PWAs as well, but especially revalidation that can result in previously validated scope extensions/migration targets to no longer be considered valid probably needs more complicated logic than what is currently implemented in AddValidatedOriginAssociationsCommand?

        Dibyajyoti Pal

        Hmmmm, do you have any ideas on how we can fix this? Some ideas off the top of the head:

        1. If the user is offline, skip revalidation. Allow revalidation if there is an active network connection.
        2. If there is a 404 error or the associations file doesn't show the manifest id of the web app, then we remove validation. Other HTTP errors (like a 5xx server error) doesn't revalidate.
        3. Some sort of TTL (X days), where we only revalidate if more than X days have passed.

        Option 1 is probably the easiest, wdyt?

        Dibyajyoti Pal

        AI also had this idea: Asynchronous Background Sync Revalidation
        Instead of running revalidation on the critical path of launching the web app (where failures immediately affect the launch environment):

        • Decouple revalidation from LaunchWebAppCommand.
        • Schedule revalidation via a background task runner or a background sync manager that runs periodically or when the device is detected to be online and idle.
        • While the background revalidation is pending or failing, the active web app continues to use its last successfully validated associations cached in the registry.
        Daniel Murphy

        sooooo FYI this doesn't actually revoke? We only add new validated ones.

        I would recommend

        • a totally new command
        • some leniency with failures that are due to network conditions (store failure #s and time of first failure?)
        • can be run on launch and/or delayed on startup, after network is back?

        I don't have opinions on best thing, but definitely a new command as the addvalidated is pretty specific to this one case (As it ended up being kinda complicated)

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Dibyajyoti Pal
        • Marijn Kruisselbrink
        Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement satisfiedCode-Owners
        • requirement satisfiedCode-Review
        • requirement is not satisfiedNo-Unresolved-Comments
        • requirement satisfiedReview-Enforcement
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: I7a8e9efb4a512b9b9216bd4c289c3eeab42c1040
        Gerrit-Change-Number: 7881954
        Gerrit-PatchSet: 9
        Gerrit-Owner: Dibyajyoti Pal <diby...@chromium.org>
        Gerrit-Reviewer: Dibyajyoti Pal <diby...@chromium.org>
        Gerrit-Reviewer: Kunjan Patel <ks...@chromium.org>
        Gerrit-Reviewer: Marijn Kruisselbrink <m...@chromium.org>
        Gerrit-CC: Chromium Web Applications Reviews <chromium-web...@google.com>
        Gerrit-CC: Daniel Murphy <dmu...@chromium.org>
        Gerrit-CC: gwsq
        Gerrit-Attention: Dibyajyoti Pal <diby...@chromium.org>
        Gerrit-Attention: Marijn Kruisselbrink <m...@chromium.org>
        Gerrit-Comment-Date: Fri, 29 May 2026 17:43:50 +0000
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Dibyajyoti Pal (Gerrit)

        unread,
        May 29, 2026, 2:00:21 PM (3 days ago) May 29
        to Daniel Murphy, Kunjan Patel, Chromium Web Applications Reviews, Marijn Kruisselbrink, Chromium LUCI CQ, chromium...@chromium.org, aixba+wat...@chromium.org, chromium-a...@chromium.org, dibyapal+wa...@chromium.org, dmurph+watc...@chromium.org, extension...@chromium.org, japhet+...@chromium.org, kuragin+web-ap...@chromium.org, loyso...@chromium.org, mek+w...@chromium.org, mgiuca...@chromium.org, philli...@chromium.org, webap...@microsoft.com, zelin+watch-we...@chromium.org
        Attention needed from Daniel Murphy and Marijn Kruisselbrink

        Dibyajyoti Pal added 1 comment

        Patchset-level comments
        Marijn Kruisselbrink . unresolved

        Things might have changed since the revalidation logic was originally implemented for IWAs, however one big concern we had with the logic at the time is that it would be not great if a temporary network/server issue would cause a valid scope extension to suddenly be no longer considered valid because revalidation happened at just the wrong time. If for example the user happens to be offline we'd throw away all perfectly valid origin associations and migration targets. So for those reasons we intentionally limited this to just IWAs at the time.

        I think it is good to somehow extend revalidation to PWAs as well, but especially revalidation that can result in previously validated scope extensions/migration targets to no longer be considered valid probably needs more complicated logic than what is currently implemented in AddValidatedOriginAssociationsCommand?

        Dibyajyoti Pal

        Hmmmm, do you have any ideas on how we can fix this? Some ideas off the top of the head:

        1. If the user is offline, skip revalidation. Allow revalidation if there is an active network connection.
        2. If there is a 404 error or the associations file doesn't show the manifest id of the web app, then we remove validation. Other HTTP errors (like a 5xx server error) doesn't revalidate.
        3. Some sort of TTL (X days), where we only revalidate if more than X days have passed.

        Option 1 is probably the easiest, wdyt?

        Dibyajyoti Pal

        AI also had this idea: Asynchronous Background Sync Revalidation
        Instead of running revalidation on the critical path of launching the web app (where failures immediately affect the launch environment):

        • Decouple revalidation from LaunchWebAppCommand.
        • Schedule revalidation via a background task runner or a background sync manager that runs periodically or when the device is detected to be online and idle.
        • While the background revalidation is pending or failing, the active web app continues to use its last successfully validated associations cached in the registry.
        Daniel Murphy

        sooooo FYI this doesn't actually revoke? We only add new validated ones.

        I would recommend

        • a totally new command
        • some leniency with failures that are due to network conditions (store failure #s and time of first failure?)
        • can be run on launch and/or delayed on startup, after network is back?

        I don't have opinions on best thing, but definitely a new command as the addvalidated is pretty specific to this one case (As it ended up being kinda complicated)

        Dibyajyoti Pal

        The command does revoke, ever since [this CL](https://chromium-review.git.corp.google.com/c/chromium/src/+/7845255) went in. The browser tests added here are proof that it revokes. Maybe we should rename the command to "UpdateValidatedOriginAssociations" or something like that?

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Daniel Murphy
        • Marijn Kruisselbrink
        Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement satisfiedCode-Owners
        • requirement satisfiedCode-Review
        • requirement is not satisfiedNo-Unresolved-Comments
        • requirement satisfiedReview-Enforcement
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: I7a8e9efb4a512b9b9216bd4c289c3eeab42c1040
        Gerrit-Change-Number: 7881954
        Gerrit-PatchSet: 9
        Gerrit-Owner: Dibyajyoti Pal <diby...@chromium.org>
        Gerrit-Reviewer: Dibyajyoti Pal <diby...@chromium.org>
        Gerrit-Reviewer: Kunjan Patel <ks...@chromium.org>
        Gerrit-Reviewer: Marijn Kruisselbrink <m...@chromium.org>
        Gerrit-CC: Chromium Web Applications Reviews <chromium-web...@google.com>
        Gerrit-CC: Daniel Murphy <dmu...@chromium.org>
        Gerrit-CC: gwsq
        Gerrit-Attention: Daniel Murphy <dmu...@chromium.org>
        Gerrit-Attention: Marijn Kruisselbrink <m...@chromium.org>
        Gerrit-Comment-Date: Fri, 29 May 2026 18:00:06 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        Comment-In-Reply-To: Daniel Murphy <dmu...@chromium.org>
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Dibyajyoti Pal (Gerrit)

        unread,
        May 29, 2026, 2:24:32 PM (3 days ago) May 29
        to Daniel Murphy, Kunjan Patel, Chromium Web Applications Reviews, Marijn Kruisselbrink, Chromium LUCI CQ, chromium...@chromium.org, aixba+wat...@chromium.org, chromium-a...@chromium.org, dibyapal+wa...@chromium.org, dmurph+watc...@chromium.org, extension...@chromium.org, japhet+...@chromium.org, kuragin+web-ap...@chromium.org, loyso...@chromium.org, mek+w...@chromium.org, mgiuca...@chromium.org, philli...@chromium.org, webap...@microsoft.com, zelin+watch-we...@chromium.org
        Patchset-level comments
        Dibyajyoti Pal

        Offline discussion with Dan to resolve the issues highlighted here:
        1. We'll rename the command to `UpdateValidatedOriginAssociations`.
        2. Update the behavior so that the command doesn't run if the user is offline.
        3. PWAs will be limited to one check per app for 10 days post launch.

        Gerrit-Comment-Date: Fri, 29 May 2026 18:24:14 +0000
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Dibyajyoti Pal (Gerrit)

        unread,
        12:59 PM (4 hours ago) 12:59 PM
        to Chromium Metrics Reviews, android-bu...@system.gserviceaccount.com, Daniel Murphy, Kunjan Patel, Chromium Web Applications Reviews, Marijn Kruisselbrink, Chromium LUCI CQ, chromium...@chromium.org, asvitkine...@chromium.org, aixba+wat...@chromium.org, chromium-a...@chromium.org, dibyapal+wa...@chromium.org, dmurph+watc...@chromium.org, extension...@chromium.org, japhet+...@chromium.org, kuragin+web-ap...@chromium.org, loyso...@chromium.org, mek+w...@chromium.org, mgiuca...@chromium.org, philli...@chromium.org, webap...@microsoft.com, zelin+watch-we...@chromium.org

        Dibyajyoti Pal added 2 comments

        Patchset-level comments
        File-level comment, Patchset 9:
        Marijn Kruisselbrink . resolved
        Dibyajyoti Pal

        Implemented as per discussion, resolving.

        File chrome/browser/web_applications/commands/update_validated_origin_associations_command_unittest.cc
        Line 545, Patchset 14 (Latest):
        TEST_F(UpdateValidatedOriginAssociationsCommandTest, Offline) {
        auto mock_network_change_notifier =
        std::make_unique<net::test::ScopedMockNetworkChangeNotifier>();
        mock_network_change_notifier->mock_network_change_notifier()
        ->SetConnectionType(net::NetworkChangeNotifier::CONNECTION_NONE);

        GURL start_url("https://example.com/");
        ScopeExtensionInfo extension = ScopeExtensionInfo::CreateForScope(
        GURL("https://example.org/scope"), /*has_origin_wildcard=*/false);

        webapps::AppId app_id = InstallApp(start_url, {extension});

        base::HistogramTester tester;
        base::test::TestFuture<UpdateValidatedOriginAssociationsResult> future;
        provider().scheduler().UpdateValidatedOriginAssociations(
        app_id, future.GetCallback());
        ASSERT_EQ(UpdateValidatedOriginAssociationsResult::kOffline, future.Get());

        tester.ExpectUniqueSample("WebApp.ValidatedOriginAssociations.Updated",
        UpdateValidatedOriginAssociationsResult::kOffline,
        1);

        const WebApp* app = provider().registrar_unsafe().GetAppById(app_id);
        EXPECT_TRUE(app->validated_scope_extensions().empty());
        }
        Dibyajyoti Pal . unresolved

        Apart from this test, the whole file is a rename of the previous `add_<>_unittest.cc` file.

        Open in Gerrit

        Related details

        Attention set is empty
        Submit Requirements:
          • requirement satisfiedCode-Coverage
          • requirement satisfiedCode-Owners
          • requirement is not satisfiedCode-Review
          • requirement is not satisfiedNo-Unresolved-Comments
          • requirement is not satisfiedReview-Enforcement
          Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
          Gerrit-MessageType: comment
          Gerrit-Project: chromium/src
          Gerrit-Branch: main
          Gerrit-Change-Id: I7a8e9efb4a512b9b9216bd4c289c3eeab42c1040
          Gerrit-Change-Number: 7881954
          Gerrit-PatchSet: 14
          Gerrit-Owner: Dibyajyoti Pal <diby...@chromium.org>
          Gerrit-Reviewer: Dibyajyoti Pal <diby...@chromium.org>
          Gerrit-Reviewer: Kunjan Patel <ks...@chromium.org>
          Gerrit-Reviewer: Marijn Kruisselbrink <m...@chromium.org>
          Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
          Gerrit-CC: Chromium Web Applications Reviews <chromium-web...@google.com>
          Gerrit-CC: Daniel Murphy <dmu...@chromium.org>
          Gerrit-CC: gwsq
          Gerrit-Comment-Date: Mon, 01 Jun 2026 16:59:10 +0000
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Dibyajyoti Pal (Gerrit)

          unread,
          2:11 PM (3 hours ago) 2:11 PM
          to Chromium Metrics Reviews, android-bu...@system.gserviceaccount.com, Daniel Murphy, Kunjan Patel, Chromium Web Applications Reviews, Marijn Kruisselbrink, Chromium LUCI CQ, chromium...@chromium.org, asvitkine...@chromium.org, aixba+wat...@chromium.org, chromium-a...@chromium.org, dibyapal+wa...@chromium.org, dmurph+watc...@chromium.org, extension...@chromium.org, japhet+...@chromium.org, kuragin+web-ap...@chromium.org, loyso...@chromium.org, mek+w...@chromium.org, mgiuca...@chromium.org, philli...@chromium.org, webap...@microsoft.com, zelin+watch-we...@chromium.org

          Dibyajyoti Pal added 1 comment

          Patchset-level comments
          File-level comment, Patchset 14 (Latest):
          Dibyajyoti Pal . resolved

          PTAL again! This CL is a bit big, but:
          1. Most of it is renaming `Add_<X>` to `Update_<X>`, including the tests and metrics.
          2. For the added behavior, the rename diff for `UpdateValidatedOriginAssociations` command. will have all of that information.
          3. The behavior change being added is in the `LaunchWebAppCommand`.

          Gerrit-Comment-Date: Mon, 01 Jun 2026 18:11:32 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Dibyajyoti Pal (Gerrit)

          unread,
          2:12 PM (3 hours ago) 2:12 PM
          to Chromium Metrics Reviews, android-bu...@system.gserviceaccount.com, Daniel Murphy, Kunjan Patel, Chromium Web Applications Reviews, Marijn Kruisselbrink, Chromium LUCI CQ, chromium...@chromium.org, asvitkine...@chromium.org, aixba+wat...@chromium.org, chromium-a...@chromium.org, dibyapal+wa...@chromium.org, dmurph+watc...@chromium.org, extension...@chromium.org, japhet+...@chromium.org, kuragin+web-ap...@chromium.org, loyso...@chromium.org, mek+w...@chromium.org, mgiuca...@chromium.org, philli...@chromium.org, webap...@microsoft.com, zelin+watch-we...@chromium.org

          Dibyajyoti Pal added 1 comment

          Patchset-level comments
          Dibyajyoti Pal . resolved

          PTAL again! This CL is a bit big, but:
          1. Most of it is renaming `Add_<X>` to `Update_<X>`, including the tests and metrics.
          2. For the added behavior, the rename diff for `UpdateValidatedOriginAssociations` command. will have all of that information.
          3. The behavior change being added is in the `LaunchWebAppCommand`.

          Dibyajyoti Pal

          Happy to break it into chunks if that makes reviewing simpler.

          Gerrit-Comment-Date: Mon, 01 Jun 2026 18:11:49 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          Comment-In-Reply-To: Dibyajyoti Pal <diby...@chromium.org>
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy
          Reply all
          Reply to author
          Forward
          0 new messages